Documentation ¶
Index ¶
- func DefaultBscChainConfig(name string) ibc.ChainConfig
- func DefaultEthereumGethChainConfig(name string) ibc.ChainConfig
- type GethChain
- func (c *GethChain) BuildWallet(ctx context.Context, keyName string, mnemonic string) (ibc.Wallet, error)
- func (c *GethChain) CreateKey(ctx context.Context, keyName string) error
- func (c *GethChain) DeployContract(ctx context.Context, keyName string, abi []byte, byteCode []byte) (string, error)
- func (c *GethChain) GetAddress(ctx context.Context, keyName string) ([]byte, error)
- func (c *GethChain) JavaScriptExec(ctx context.Context, jsCmd string) (stdout, stderr []byte, err error)
- func (c *GethChain) JavaScriptExecTx(ctx context.Context, account *NodeWallet, jsCmd string) (stdout, stderr []byte, err error)
- func (c *GethChain) RecoverKey(ctx context.Context, keyName, mnemonic string) error
- func (c *GethChain) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error
- func (c *GethChain) SendFundsWithNote(ctx context.Context, keyName string, amount ibc.WalletAmount, note string) (string, error)
- func (c *GethChain) Start(testName string, ctx context.Context, ...) error
- func (c *GethChain) UnlockAccount(ctx context.Context, account *NodeWallet) error
- type NodeWallet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultBscChainConfig ¶
func DefaultBscChainConfig( name string, ) ibc.ChainConfig
func DefaultEthereumGethChainConfig ¶
func DefaultEthereumGethChainConfig( name string, ) ibc.ChainConfig
Types ¶
type GethChain ¶
type GethChain struct { *ethereum.EthereumChain // contains filtered or unexported fields }
func NewGethChain ¶
func (*GethChain) BuildWallet ¶
func (*GethChain) DeployContract ¶
func (c *GethChain) DeployContract(ctx context.Context, keyName string, abi []byte, byteCode []byte) (string, error)
DeployContract creates a new contract on-chain, returning the contract address Constructor params are appended to the byteCode
func (*GethChain) GetAddress ¶
Get address of account, cast to a string to use
func (*GethChain) JavaScriptExec ¶
func (c *GethChain) JavaScriptExec(ctx context.Context, jsCmd string) (stdout, stderr []byte, err error)
JavaScriptExec() - Execute web3 code via geth's attach command
func (*GethChain) JavaScriptExecTx ¶
func (c *GethChain) JavaScriptExecTx(ctx context.Context, account *NodeWallet, jsCmd string) (stdout, stderr []byte, err error)
JavaScriptExecTx() - Execute a tx via web3, function ensures account is unlocked and blocks multiple txs
func (*GethChain) RecoverKey ¶
func (*GethChain) SendFundsWithNote ¶
func (*GethChain) UnlockAccount ¶
func (c *GethChain) UnlockAccount(ctx context.Context, account *NodeWallet) error
UnlockAccount() unlocks a non-default account for use. We will unlock when sending funds and deploying contracts. Accounts are unlocked for 100 seconds which is plenty of time for the transaction.
type NodeWallet ¶
type NodeWallet struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.