Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (client *Client) Aggregate(opts *bind.CallOpts, methods []*MethodCall) (blockNumber *big.Int, results []any, err error)
- func (client *Client) Execute(opts *bind.CallOpts, gasLimitPerCall *big.Int, resultSizeLimit *big.Int, ...) (result *QuickCallResults, err error)
- func (client *Client) GetBlockHash(blockNumber *big.Int) (*common.Hash, error)
- func (client *Client) GetCurrentBlockCoinbase() (*common.Address, error)
- func (client *Client) GetCurrentBlockDifficulty() (*big.Int, error)
- func (client *Client) GetCurrentBlockGasLimit() (*big.Int, error)
- func (client *Client) GetCurrentBlockTimestamp() (uint64, error)
- func (client *Client) GetEthBalance(address common.Address) (*big.Int, error)
- func (client *Client) GetLastBlockHash() (*common.Hash, error)
- type MethodCall
- type QuickCallResult
- type QuickCallResults
- type Version
Constants ¶
const ( EthereumMainnet = "0x5ba1e12693dc8f9c48aad8770482f4739beed696" Kovan = "0x5ba1e12693dc8f9c48aad8770482f4739beed696" Rinkeby = "0x5ba1e12693dc8f9c48aad8770482f4739beed696" Gorli = "0x5ba1e12693dc8f9c48aad8770482f4739beed696" Ropsten = "0x5ba1e12693dc8f9c48aad8770482f4739beed696" BSCMainnet = "0x41263cba59eb80dc200f3e2544eda4ed6a90e76c" BSCTestnet = "0xae11C5B5f29A6a25e955F0CB8ddCc416f522AF5C" CronosMainnet = "0xF33d2E47001ddbD7b71301363f68F57e318Bd4c8" CronosTestnet = "0x2F953EA963E0243528186b3C92ea86355af532eb" CronosQuickCall = "0x0F278822981A28b1Ecd4E790c414FAC0d52b6B44" )
Variables ¶
var ( ErrQuickCallRequired = errors.New("quickcall is required for this function") ErrMulticallRequired = errors.New("multicall is required for this function") )
Errors
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Aggregate ¶
func (client *Client) Aggregate(opts *bind.CallOpts, methods []*MethodCall) (blockNumber *big.Int, results []any, err error)
Aggregate makes multiple calls to the target contracts and returns the results.
func (*Client) Execute ¶
func (client *Client) Execute(opts *bind.CallOpts, gasLimitPerCall *big.Int, resultSizeLimit *big.Int, methods []*MethodCall) (result *QuickCallResults, err error)
Execute makes multiple calls to the target contracts and returns the results.
func (*Client) GetBlockHash ¶
GetBlockHash returns the block hash for the given block number. Note: not available with quickcall.
func (*Client) GetCurrentBlockCoinbase ¶
GetCurrentBlockCoinbase returns the current block coinbase. Note: not available with quickcall.
func (*Client) GetCurrentBlockDifficulty ¶
GetCurrentBlockDifficulty returns the current block difficulty. Note: not available with quickcall.
func (*Client) GetCurrentBlockGasLimit ¶
GetCurrentBlockGasLimit returns the current block gas limit. Note: not available with quickcall.
func (*Client) GetCurrentBlockTimestamp ¶
GetCurrentBlockTimestamp returns the current block timestamp. Note: not available with quickcall.
func (*Client) GetEthBalance ¶
GetEthBalance returns the balance of the given address. Note: not available with quickcall.
type MethodCall ¶
func NewMethodCall ¶
NewMethodCall creates a new method call
type QuickCallResult ¶
func (*QuickCallResult) IsStatusZero ¶
func (qcr *QuickCallResult) IsStatusZero() bool
IsStatusZero returns true if the status is zero, false otherwise. This is useful for checking if a call was successful or not. Typically, a status of zero means the call has reverted or failed.
type QuickCallResults ¶
type QuickCallResults struct { BlockNumber *big.Int Results []QuickCallResult }