Documentation
¶
Overview ¶
xk6 build --with github.com/distribworks/xk6-ethereum=.
xk6 build --with github.com/grafana/xk6-ethereum=.
Index ¶
- func Retry(fn func() error, maxAttempts int, sleepTime time.Duration)
- type Client
- func (c *Client) Accounts() ([]string, error)
- func (c *Client) BlockNumber() (uint64, error)
- func (c *Client) Call(method string, params ...interface{}) (interface{}, error)
- func (c *Client) DeployContract(abistr string, bytecode string, args ...interface{}) (*ethgo.Receipt, error)
- func (c *Client) EstimateGas(tx Transaction) (uint64, error)
- func (c *Client) Exports() modules.Exports
- func (c *Client) GasPrice() (uint64, error)
- func (c *Client) GetBalance(address string) (uint64, error)
- func (c *Client) GetBlockByNumber(number ethgo.BlockNumber, full bool) (*ethgo.Block, error)
- func (c *Client) GetNonce(address string) (uint64, error)
- func (c *Client) GetTransactionReceipt(hash string) (*ethgo.Receipt, error)
- func (c *Client) NewContract(address string, abistr string, signerKey string) (*Contract, error)
- func (c *Client) SendRawTransaction(tx Transaction) (string, error)
- func (c *Client) SendTransaction(tx Transaction) (string, error)
- func (c *Client) WaitForTransactionReceipt(hash string, maxAttempts int) *ethgo.Receipt
- type ClientTmp
- type Contract
- func (c *Contract) Call(method string, args ...interface{}) (map[string]interface{}, error)
- func (c *Contract) FillInput(abiString string, method string, args ...interface{}) ([]byte, error)
- func (c *Contract) GetAddress() string
- func (c *Contract) Txn(method string, opts TxnOpts, args ...interface{}) (string, error)
- type EthRoot
- type Key
- type ModuleInstance
- type Transaction
- type TxnOpts
- type Wallet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Accounts ¶
Accounts returns a list of addresses owned by client. This endpoint is not enabled in infrastructure providers.
func (*Client) BlockNumber ¶
BlockNumber returns the current block number.
func (*Client) DeployContract ¶
func (c *Client) DeployContract(abistr string, bytecode string, args ...interface{}) (*ethgo.Receipt, error)
DeployContract deploys a contract to the blockchain.
func (*Client) EstimateGas ¶
func (c *Client) EstimateGas(tx Transaction) (uint64, error)
EstimateGas returns the estimated gas for the given transaction.
func (*Client) GetBlockByNumber ¶
GetBlockByNumber returns the block with the given block number.
func (*Client) GetTransactionReceipt ¶
GetTransactionReceipt returns the transaction receipt for the given transaction hash.
func (*Client) NewContract ¶
NewContract creates a new contract instance with the given ABI.
func (*Client) SendRawTransaction ¶
func (c *Client) SendRawTransaction(tx Transaction) (string, error)
SendRawTransaction signs and sends transaction to the network.
func (*Client) SendTransaction ¶
func (c *Client) SendTransaction(tx Transaction) (string, error)
SendTransaction sends a transaction to the network.
type ClientTmp ¶
type ClientTmp struct {
// contains filtered or unexported fields
}
func (*ClientTmp) BlockNumber ¶
type Contract ¶
Contract exposes a contract
func (*Contract) GetAddress ¶
type ModuleInstance ¶
type ModuleInstance struct {
// contains filtered or unexported fields
}
func (*ModuleInstance) Exports ¶
func (mi *ModuleInstance) Exports() modules.Exports
Exports implements the modules.Instance interface and returns the exported types for the JS module.
func (*ModuleInstance) NewClient ¶
func (mi *ModuleInstance) NewClient(call sobek.ConstructorCall) *sobek.Object