Documentation ¶
Index ¶
- func WaitForTxnReceipt(ctx context.Context, provider *Provider, txHash common.Hash) (*types.Receipt, error)
- type Config
- type NodeConfig
- type Provider
- func (s *Provider) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
- func (s *Provider) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
- func (s *Provider) ChainID(ctx context.Context) (*big.Int, error)
- func (s *Provider) Dial() error
- func (s *Provider) QueryContract(ctx context.Context, contractAddress string, ...) ([]string, error)
- func (s *Provider) SendRawTransaction(ctx context.Context, signedTxHex string) (common.Hash, error)
- func (s *Provider) TransactionDetails(ctx context.Context, txnHash common.Hash) (bool, *types.Receipt, *types.Transaction, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Nodes []NodeConfig ChaindID int // expected ChainID so we confirm on connect.. TestMode bool }
func (*Config) AddNode ¶
func (c *Config) AddNode(nodeConfig NodeConfig)
type NodeConfig ¶
type Provider ¶
type Provider struct { *ethclient.Client Config *Config RPC *rpc.Client // contains filtered or unexported fields }
func NewProviderWithConfig ¶
func (*Provider) BlockByHash ¶ added in v1.1.7
func (*Provider) BlockByNumber ¶
func (*Provider) QueryContract ¶ added in v1.3.4
func (s *Provider) QueryContract(ctx context.Context, contractAddress string, inputAbiExpr, outputAbiExpr string, args []string) ([]string, error)
ie, QueryContext(context.Background(), "0xabcdef..", "balanceOf(uint256)", "uint256", []string{"1"})
func (*Provider) SendRawTransaction ¶ added in v1.3.6
Click to show internal directories.
Click to hide internal directories.