Documentation ¶
Index ¶
- func ConvertRawTransaction(rawTx types.RawTransaction) types.Transaction
- func FormatEther(wei *big.Int) string
- func FormatGwei(wei *big.Int) string
- func GeneratePrivateKey() (string, error)
- func GeneratePrivateKeyEcdsa() (*ecdsa.PrivateKey, error)
- func HexToBigInt(hexStr string) *big.Int
- func HexToUint64(hexStr string) uint64
- func ParseEther(etherStr string) (*big.Int, error)
- func ParseGwei(gweiStr string) (*big.Int, error)
- func PrivateKeyToAccount(privateKeyHex string) (*types.Account, error)
- type RpcClient
- func (c *RpcClient) Call(method string, params interface{}) (json.RawMessage, error)
- func (c *RpcClient) EstimateGas(params types.CallParams) (*big.Int, error)
- func (c *RpcClient) GetBalance(address string) (*big.Int, error)
- func (c *RpcClient) GetBlock(params types.GetBlockParams) (*types.Block, error)
- func (c *RpcClient) GetBlockNumber() (uint64, error)
- func (c *RpcClient) GetBlockTransactionCount(params types.GetBlockTransactionCountParams) (uint64, error)
- func (c *RpcClient) GetGasPrice() (*big.Int, error)
- func (c *RpcClient) GetMaxPriorityFeePerGas() (*big.Int, error)
- func (c *RpcClient) GetTransactionCount(address string) (uint64, error)
- func (c *RpcClient) PrepareTxRequest(params types.TxInteractionParams) (*ethTypes.Transaction, error)
- func (c *RpcClient) ReadContract(params types.ReadContractParams) ([]byte, error)
- func (c *RpcClient) SendTx(params types.TxInteractionParams) (string, error)
- func (c *RpcClient) SimulateContract(params types.ContractInteractionParams) (*types.SimulateTxResult, error)
- func (c *RpcClient) SimulateTx(params types.TxInteractionParams) (*types.SimulateTxResult, error)
- func (c *RpcClient) WriteContract(params types.ContractInteractionParams) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertRawTransaction ¶
func ConvertRawTransaction(rawTx types.RawTransaction) types.Transaction
func FormatEther ¶
func FormatGwei ¶
func GeneratePrivateKey ¶
func GeneratePrivateKeyEcdsa ¶
func GeneratePrivateKeyEcdsa() (*ecdsa.PrivateKey, error)
func HexToBigInt ¶
func HexToUint64 ¶
Types ¶
type RpcClient ¶
type RpcClient struct {
// contains filtered or unexported fields
}
func NewRpcClient ¶
func NewRpcClient(params types.NewRpcClientParams) *RpcClient
func (*RpcClient) Call ¶
func (c *RpcClient) Call(method string, params interface{}) (json.RawMessage, error)
func (*RpcClient) EstimateGas ¶
func (*RpcClient) GetBlockNumber ¶
func (*RpcClient) GetBlockTransactionCount ¶
func (c *RpcClient) GetBlockTransactionCount(params types.GetBlockTransactionCountParams) (uint64, error)
func (*RpcClient) GetMaxPriorityFeePerGas ¶
func (*RpcClient) GetTransactionCount ¶
func (*RpcClient) PrepareTxRequest ¶
func (c *RpcClient) PrepareTxRequest(params types.TxInteractionParams) (*ethTypes.Transaction, error)
func (*RpcClient) ReadContract ¶
func (c *RpcClient) ReadContract(params types.ReadContractParams) ([]byte, error)
func (*RpcClient) SendTx ¶
func (c *RpcClient) SendTx(params types.TxInteractionParams) (string, error)
func (*RpcClient) SimulateContract ¶
func (c *RpcClient) SimulateContract(params types.ContractInteractionParams) (*types.SimulateTxResult, error)
func (*RpcClient) SimulateTx ¶
func (c *RpcClient) SimulateTx(params types.TxInteractionParams) (*types.SimulateTxResult, error)
func (*RpcClient) WriteContract ¶
func (c *RpcClient) WriteContract(params types.ContractInteractionParams) (string, error)
Click to show internal directories.
Click to hide internal directories.