Documentation ¶
Index ¶
- Constants
- Variables
- func DryRunTx(client *ethclient.Client, fromAddress common.Address, toAddress common.Address, ...) (uint64, error)
- func DryRunTxAbi(client *ethclient.Client, timeout time.Duration, fromAddress common.Address, ...) (uint64, error)
- func EventIDFromMetadata(metaData *bind.MetaData, eventName string) (common.Hash, error)
- func FunctionSelector(signature string) (selector [4]byte)
- func GetGasPrice(gasConfig *config.Gas, client *ethclient.Client, timeout time.Duration) (*big.Int, error)
- func ParseTopic(topic string) common.Hash
- func PrivateKeyToEthAddress(privateKey *ecdsa.PrivateKey) (common.Address, error)
- func SendRawTx(client *ethclient.Client, privateKey *ecdsa.PrivateKey, ...) error
- func SendRawType2Tx(client *ethclient.Client, privateKey *ecdsa.PrivateKey, ...) error
- type Client
- type ClientImpl
- type TxVerifier
Constants ¶
View Source
const ( // default timeout for waiting for a tx to be mined. DefaultTxTimeout = 60 * time.Second DefaultGasLimit = 2_500_000 DefaultTipPerGasCap = 20_000_000_000 //20 GWei )
Variables ¶
View Source
var (
DefaultTipCap = big.NewInt(DefaultTipPerGasCap)
)
View Source
var (
EmptyAddress = common.Address{}
)
Functions ¶
func DryRunTx ¶
func DryRunTx(client *ethclient.Client, fromAddress common.Address, toAddress common.Address, value *big.Int, data []byte, timeout time.Duration) (uint64, error)
DryRunTx locally executes a transaction with the current state of blockchain and returns estimated Gas multiplied with 1.5 and potential errors.
func DryRunTxAbi ¶
func DryRunTxAbi(client *ethclient.Client, timeout time.Duration, fromAddress common.Address, toAddress common.Address, value *big.Int, abi *abi.ABI, method string, arguments ...any) (uint64, error)
DryRunTxAbi locally executes a transaction to method with arguments with the current state of blockchain and returns estimated Gas multiplied with 1.5 and potential errors.
func EventIDFromMetadata ¶
func FunctionSelector ¶
func GetGasPrice ¶
func ParseTopic ¶
func PrivateKeyToEthAddress ¶
func PrivateKeyToEthAddress(privateKey *ecdsa.PrivateKey) (common.Address, error)
Types ¶
type ClientImpl ¶
type TxVerifier ¶
type TxVerifier struct {
// contains filtered or unexported fields
}
func NewTxVerifier ¶
func NewTxVerifier(eth *ethclient.Client) *TxVerifier
func (TxVerifier) WaitUntilMined ¶
func (t TxVerifier) WaitUntilMined(from common.Address, tx *types.Transaction, timeout time.Duration) error
Click to show internal directories.
Click to hide internal directories.