Documentation ¶
Index ¶
- type CallOpts
- type Contract
- func (a *Contract) Call(methodName string, block ethgo.BlockNumber, args ...interface{}) (map[string]interface{}, error)
- func (a *Contract) CallInternal(m *abi.Method, block ethgo.BlockNumber, args ...interface{}) ([]byte, error)
- func (a *Contract) GetABI() *abi.ABI
- func (a *Contract) Txn(method string, args ...interface{}) (Txn, error)
- type ContractOption
- type Opts
- type Provider
- type Txn
- type TxnOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contract ¶
type Contract struct {
// contains filtered or unexported fields
}
Contract is a wrapper to make abi calls to contract with a state provider
func NewContract ¶
func (*Contract) Call ¶
func (a *Contract) Call(methodName string, block ethgo.BlockNumber, args ...interface{}) (map[string]interface{}, error)
Call interacts with the smart contract function and decodes the raw value into the map[string]interface{}
func (*Contract) CallInternal ¶
func (a *Contract) CallInternal(m *abi.Method, block ethgo.BlockNumber, args ...interface{}) ([]byte, error)
CallInternal interacts with the smart contract function and returns raw value (byte array) and error
type ContractOption ¶
type ContractOption func(*Opts)
func WithEIP1559 ¶
func WithEIP1559() ContractOption
func WithJsonRPC ¶
func WithJsonRPC(client *jsonrpc.Eth) ContractOption
func WithJsonRPCEndpoint ¶
func WithJsonRPCEndpoint(endpoint string) ContractOption
func WithProvider ¶
func WithProvider(provider Provider) ContractOption
func WithSender ¶
func WithSender(sender ethgo.Key) ContractOption
type Provider ¶
type Provider interface { Call(ethgo.Address, []byte, *CallOpts) ([]byte, error) Txn(ethgo.Address, ethgo.Key, []byte) (Txn, error) }
Provider handles the interactions with the Ethereum 1x node
Click to show internal directories.
Click to hide internal directories.