Documentation ¶
Index ¶
- Constants
- Variables
- func ClientWithValue(value *big.Int) func(*Client)
- func OptsWithValue(value *big.Int) func(*bind.TransactOpts)
- type Client
- func (c *Client) CallOpts() *bind.CallOpts
- func (c *Client) ClientWithArgs(args ...func(*Client))
- func (c *Client) Close()
- func (c *Client) Connect() error
- func (c *Client) EnsureHasBytecode(addr ethcommon.Address) error
- func (c *Client) Keypair() *secp256k1.Keypair
- func (c *Client) LatestBlock() (*big.Int, error)
- func (c *Client) LockAndUpdateNonce() error
- func (c *Client) LockAndUpdateOpts() error
- func (c *Client) Opts() *bind.TransactOpts
- func (c *Client) OptsCopyWithArgs(opts ...func(*bind.TransactOpts)) *bind.TransactOpts
- func (c *Client) SafeEstimateGas(ctx context.Context) (*big.Int, error)
- func (c *Client) UnlockNonce()
- func (c *Client) UnlockOpts()
- func (c *Client) WaitForBlock(block *big.Int) error
- type LogFilterWithLatestBlock
Constants ¶
const DefaultGasLimit = 6721975
const DefaultGasPrice = 20000000000
Variables ¶
var BlockRetryInterval = time.Second * 5
Functions ¶
func ClientWithValue ¶
ClientWithValue arg updater of Client that sets opts.Value with provided value
func OptsWithValue ¶
func OptsWithValue(value *big.Int) func(*bind.TransactOpts)
OptsWithValue args updating function that updates opts.Value argument
Types ¶
type Client ¶
func NewClient ¶
func NewClient(endpoint string, http bool, kp *secp256k1.Keypair, gasLimit *big.Int, gasPrice *big.Int, gasMultiplier *big.Float) (*Client, error)
NewConnection returns an uninitialized connection, must call Client.Connect() before using.
func (*Client) ClientWithArgs ¶
ClientWithArgs updates client with provided array of arg updaters
func (*Client) Close ¶
func (c *Client) Close()
Close terminates the client connection and stops any running routines
func (*Client) EnsureHasBytecode ¶
EnsureHasBytecode asserts if contract code exists at the specified address
func (*Client) LatestBlock ¶
LatestBlock returns the latest block from the current chain
func (*Client) LockAndUpdateNonce ¶
func (*Client) LockAndUpdateOpts ¶
LockAndUpdateOpts acquires a lock on the opts before updating the nonce and gas price.
func (*Client) Opts ¶
func (c *Client) Opts() *bind.TransactOpts
func (*Client) OptsCopyWithArgs ¶
func (c *Client) OptsCopyWithArgs(opts ...func(*bind.TransactOpts)) *bind.TransactOpts
OptsCopyWithArgs returns copy of Client.opts with updated by args updaters functions aruments
func (*Client) SafeEstimateGas ¶
func (*Client) UnlockNonce ¶
func (c *Client) UnlockNonce()
func (*Client) UnlockOpts ¶
func (c *Client) UnlockOpts()