Documentation
¶
Index ¶
- func CheckValidRpc(rpc string) (bool, error)
- func CreateEthTransaction(client *ethclient.Client, from common.Address, to common.Address, ...) (*types.Transaction, error)
- func DecodeSignature(signature string) (r [32]byte, s [32]byte, v byte, err error)
- func GenerateAddress() (privKey, pubKey, address string, err error)
- func GenerateAddressFromPrivKey(privKey string) (pubKey, address string, err error)
- func GenerateKeyFromSeedNew(seed string) (string, string, string, error)
- func GenerateKeyFromSeedOld(seed string) (string, string, string, error)
- func GetAccountInfo(privKey string) (*ecdsa.PrivateKey, *common.Address, error)
- func GetCurrentL1BlockNumber(rpc string) (uint64, error)
- func GetLastBlock(rpc string) (uint64, int64, error)
- func NewEthClient(rpc string) (*ethclient.Client, error)
- func NewEthWsClient(ws string) (*ethclient.Client, error)
- func WaitForTx(client *ethclient.Client, tx common.Hash) error
- func WaitForTxReceipt(client *ethclient.Client, tx common.Hash) (*types.Receipt, error)
- func WaitForTxReceiptRetry(client *ethclient.Client, tx common.Hash, sleep int, retry int) (*types.Receipt, error)
- func WaitForTxRetry(client *ethclient.Client, tx common.Hash, sleep int, retry int) error
- type Client
- func (c *Client) NetworkID(ctx context.Context) (*big.Int, error)
- func (c *Client) PendingNonceAt(ctx context.Context, address common.Address) (uint64, error)
- func (c *Client) SendTransaction(ctx context.Context, tx *types.Transaction) error
- func (c *Client) SuggestGasPrice(ctx context.Context) (*big.Int, error)
- func (c *Client) Transfer(senderPrivKey, receiverAddress string, amount, gasPrice *big.Int, ...) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckValidRpc ¶
func CreateEthTransaction ¶
func CreateEthTransaction(client *ethclient.Client, from common.Address, to common.Address, value *big.Int, input []byte) (*types.Transaction, error)
Copy from the function `(c *BoundContract) transact` in the `eth` package.
func DecodeSignature ¶
func GenerateAddress ¶
func GenerateKeyFromSeedNew ¶
func GenerateKeyFromSeedOld ¶
func GetAccountInfo ¶
func GetCurrentL1BlockNumber ¶
func WaitForTxReceipt ¶
func WaitForTxReceiptRetry ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) PendingNonceAt ¶
func (*Client) SendTransaction ¶
func (*Client) SuggestGasPrice ¶
Click to show internal directories.
Click to hide internal directories.