Documentation
¶
Index ¶
- type ChainClient
- func (cc *ChainClient) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)
- func (cc *ChainClient) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
- func (cc *ChainClient) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
- func (cc *ChainClient) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
- func (cc *ChainClient) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
- func (cc *ChainClient) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)
- func (cc *ChainClient) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
- func (cc *ChainClient) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
- func (cc *ChainClient) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)
- func (cc *ChainClient) ToBigInt() *big.Int
- func (cc *ChainClient) TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error)
- func (cc *ChainClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
- type Manager
- func (nm *Manager) Delete(chainID uint64) error
- func (nm *Manager) Find(chainID uint64) *Network
- func (nm *Manager) Get(onlyEnabled bool) ([]*Network, error)
- func (nm *Manager) GetChainClient(chainID uint64) (*ChainClient, error)
- func (nm *Manager) GetChainClients(chainIDs []uint64) (res []*ChainClient, err error)
- func (nm *Manager) Init(networks []Network) error
- func (nm *Manager) Upsert(network *Network) error
- type Network
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainClient ¶
type ChainClient struct { ChainID uint64 // contains filtered or unexported fields }
func (*ChainClient) BlockByHash ¶
func (*ChainClient) BlockByNumber ¶
func (*ChainClient) CallContract ¶
func (*ChainClient) FilterLogs ¶
func (*ChainClient) HeaderByHash ¶
func (*ChainClient) HeaderByNumber ¶
func (*ChainClient) ToBigInt ¶
func (cc *ChainClient) ToBigInt() *big.Int
func (*ChainClient) TransactionByHash ¶
func (cc *ChainClient) TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error)
func (*ChainClient) TransactionReceipt ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) GetChainClient ¶
func (nm *Manager) GetChainClient(chainID uint64) (*ChainClient, error)
func (*Manager) GetChainClients ¶
func (nm *Manager) GetChainClients(chainIDs []uint64) (res []*ChainClient, err error)
type Network ¶
type Network struct { ChainID uint64 `json:"chainId"` ChainName string `json:"chainName"` RPCURL string `json:"rpcUrl"` BlockExplorerURL string `json:"blockExplorerUrl,omitempty"` IconURL string `json:"iconUrl,omitempty"` NativeCurrencyName string `json:"nativeCurrencyName,omitempty"` NativeCurrencySymbol string `json:"nativeCurrencySymbol,omitempty"` NativeCurrencyDecimals uint64 `json:"nativeCurrencyDecimals"` IsTest bool `json:"isTest"` Layer uint64 `json:"layer"` Enabled bool `json:"enabled"` }
Click to show internal directories.
Click to hide internal directories.