geth

package
v9.0.0-...-e599657 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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 NewGethChain(testName string, chainConfig ibc.ChainConfig, log *zap.Logger) *GethChain

func (*GethChain) BuildWallet

func (c *GethChain) BuildWallet(ctx context.Context, keyName string, mnemonic string) (ibc.Wallet, error)

func (*GethChain) CreateKey

func (c *GethChain) CreateKey(ctx context.Context, keyName string) error

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

func (c *GethChain) GetAddress(ctx context.Context, keyName string) ([]byte, error)

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 (c *GethChain) RecoverKey(ctx context.Context, keyName, mnemonic string) error

func (*GethChain) SendFunds

func (c *GethChain) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error

func (*GethChain) SendFundsWithNote

func (c *GethChain) SendFundsWithNote(ctx context.Context, keyName string, amount ibc.WalletAmount, note string) (string, error)

func (*GethChain) Start

func (c *GethChain) Start(testName string, ctx context.Context, additionalGenesisWallets ...ibc.WalletAmount) error

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL