Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GasPriceDecider ¶ added in v0.0.38
func NewGasStationGasPriceDecider ¶ added in v0.0.38
func NewGasStationGasPriceDecider(fallbackGasPrice decimal.Decimal) GasPriceDecider
func NewStaticGasPriceDecider ¶ added in v0.0.38
func NewStaticGasPriceDecider(gasPrice decimal.Decimal) GasPriceDecider
type GasStationPriceDeciderWithFallback ¶ added in v0.0.38
func (GasStationPriceDeciderWithFallback) GasPriceInWei ¶ added in v0.0.38
func (s GasStationPriceDeciderWithFallback) GasPriceInWei() decimal.Decimal
type GasStationRespBody ¶ added in v0.0.38
type ISignService ¶
type ISignService interface { Sign(launchLog *LaunchLog) string AfterSign() //what you want to do when signature has been used }
func NewDefaultSignService ¶
func NewDefaultSignService(privateKeyStr string, getNonce func(string) (int, error)) ISignService
type LaunchLog ¶
type LaunchLog struct { ID int64 `db:"id" auto:"true" primaryKey:"true" autoIncrement:"true"` ItemType string `db:"item_type"` ItemID int64 `db:"item_id"` Status string `db:"status"` Hash sql.NullString `db:"transaction_hash"` BlockNumber sql.NullInt64 `db:"block_number"` From string `db:"t_from"` To string `db:"t_to"` Value decimal.Decimal `db:"value"` GasLimit int64 `db:"gas_limit"` GasUsed sql.NullInt64 `db:"gas_used"` GasPrice decimal.NullDecimal `db:"gas_price"` Nonce sql.NullInt64 `db:"nonce"` Data string `db:"data"` ExecutedAt time.Time `db:"executed_at"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
type Launcher ¶
type Launcher struct { Ctx context.Context `json:"ctx"` GasPriceDecider GasPriceDecider SignService ISignService BlockChain sdk.BlockChain }
func NewLauncher ¶
func NewLauncher(ctx context.Context, sign ISignService, hydro sdk.Hydro, gasPriceDecider GasPriceDecider) *Launcher
type StaticGasPriceDecider ¶ added in v0.0.38
func (StaticGasPriceDecider) GasPriceInWei ¶ added in v0.0.38
func (s StaticGasPriceDecider) GasPriceInWei() decimal.Decimal
Click to show internal directories.
Click to hide internal directories.