Documentation ¶
Index ¶
- Constants
- func AddSignature(cmd []string, signature string) []string
- func DefaultEthereumAnvilChainConfig(name string) ibc.ChainConfig
- func GetConfigFilePath(configFile, localContractRootDir, solidityContractDir string) string
- func NewWallet(keyname string, address string) ibc.Wallet
- func PanicFunctionName()
- func ReadAndAppendConfigFile(cmd []string, configFile, localContractRootDir, solidityContractDir string) ([]string, []byte, error)
- func WriteConfigFile(configFile string, localContractRootDir string, solidityContractDir string, ...) error
- type EthereumChain
- func (c *EthereumChain) Acknowledgements(ctx context.Context, height int64) ([]ibc.PacketAcknowledgement, error)
- func (c *EthereumChain) AddKey(cmd []string, keyName string) []string
- func (c *EthereumChain) Bind() []string
- func (c *EthereumChain) BuildRelayerWallet(ctx context.Context, keyName string) (ibc.Wallet, error)
- func (c *EthereumChain) BuildWallet(ctx context.Context, keyName string, mnemonic string) (ibc.Wallet, error)
- func (c *EthereumChain) Config() ibc.ChainConfig
- func (c *EthereumChain) CreateKey(ctx context.Context, keyName string) error
- func (c *EthereumChain) Exec(ctx context.Context, cmd []string, env []string) (stdout, stderr []byte, err error)
- func (c *EthereumChain) ExportState(ctx context.Context, height int64) (string, error)
- func (c *EthereumChain) ForgeScript(ctx context.Context, keyName string, opts ForgeScriptOpts) (stdout, stderr []byte, err error)
- func (c *EthereumChain) GetAddress(ctx context.Context, keyName string) ([]byte, error)
- func (c *EthereumChain) GetBalance(ctx context.Context, address string, denom string) (sdkmath.Int, error)
- func (c *EthereumChain) GetGRPCAddress() string
- func (c *EthereumChain) GetGasFeesInNativeDenom(gasPaid int64) int64
- func (c *EthereumChain) GetHostGRPCAddress() string
- func (*EthereumChain) GetHostPeerAddress() string
- func (c *EthereumChain) GetHostRPCAddress() string
- func (c *EthereumChain) GetHostWSAddress() string
- func (c *EthereumChain) GetRPCAddress() string
- func (c *EthereumChain) GetWSAddress() string
- func (c *EthereumChain) Height(ctx context.Context) (int64, error)
- func (c *EthereumChain) HomeDir() string
- func (c *EthereumChain) HostName() string
- func (c *EthereumChain) Initialize(ctx context.Context, testName string, cli *dockerclient.Client, ...) error
- func (c *EthereumChain) KeystoreDir() string
- func (c *EthereumChain) MakeKeystoreDir(ctx context.Context) error
- func (c *EthereumChain) Name() string
- func (c *EthereumChain) RecoverKey(ctx context.Context, keyName, mnemonic string) error
- func (c *EthereumChain) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error
- func (c *EthereumChain) SendIBCTransfer(ctx context.Context, channelID, keyName string, amount ibc.WalletAmount, ...) (ibc.Tx, error)
- func (c *EthereumChain) Start(testName string, ctx context.Context, ...) error
- func (c *EthereumChain) Timeouts(ctx context.Context, height int64) ([]ibc.PacketTimeout, error)
- type EthereumWallet
- type ForgeScriptOpts
- type GenesisWallets
- type NewWalletOutput
Constants ¶
View Source
const ( GWEI = 1_000_000_000 ETHER = 1_000_000_000 * GWEI )
Variables ¶
This section is empty.
Functions ¶
func AddSignature ¶
Add signature function to cmd, if present
func DefaultEthereumAnvilChainConfig ¶
func DefaultEthereumAnvilChainConfig( name string, ) ibc.ChainConfig
func GetConfigFilePath ¶
func PanicFunctionName ¶
func PanicFunctionName()
Types ¶
type EthereumChain ¶
type EthereumChain struct { VolumeName string NetworkID string DockerClient *dockerclient.Client // contains filtered or unexported fields }
func NewEthereumChain ¶
func NewEthereumChain(testName string, chainConfig ibc.ChainConfig, log *zap.Logger) *EthereumChain
func (*EthereumChain) Acknowledgements ¶
func (c *EthereumChain) Acknowledgements(ctx context.Context, height int64) ([]ibc.PacketAcknowledgement, error)
func (*EthereumChain) AddKey ¶
func (c *EthereumChain) AddKey(cmd []string, keyName string) []string
Add private-key or keystore to cmd
func (*EthereumChain) Bind ¶
func (c *EthereumChain) Bind() []string
func (*EthereumChain) BuildRelayerWallet ¶
func (*EthereumChain) BuildWallet ¶
func (*EthereumChain) Config ¶
func (c *EthereumChain) Config() ibc.ChainConfig
func (*EthereumChain) CreateKey ¶
func (c *EthereumChain) CreateKey(ctx context.Context, keyName string) error
func (*EthereumChain) ExportState ¶
func (*EthereumChain) ForgeScript ¶
func (c *EthereumChain) ForgeScript(ctx context.Context, keyName string, opts ForgeScriptOpts) (stdout, stderr []byte, err error)
Run "forge script" see: https://book.getfoundry.sh/reference/forge/forge-script
func (*EthereumChain) GetAddress ¶
Get address of account, cast to a string to use
func (*EthereumChain) GetBalance ¶
func (*EthereumChain) GetGRPCAddress ¶
func (c *EthereumChain) GetGRPCAddress() string
func (*EthereumChain) GetGasFeesInNativeDenom ¶
func (c *EthereumChain) GetGasFeesInNativeDenom(gasPaid int64) int64
func (*EthereumChain) GetHostGRPCAddress ¶
func (c *EthereumChain) GetHostGRPCAddress() string
func (*EthereumChain) GetHostPeerAddress ¶
func (*EthereumChain) GetHostPeerAddress() string
func (*EthereumChain) GetHostRPCAddress ¶
func (c *EthereumChain) GetHostRPCAddress() string
func (*EthereumChain) GetHostWSAddress ¶
func (c *EthereumChain) GetHostWSAddress() string
func (*EthereumChain) GetRPCAddress ¶
func (c *EthereumChain) GetRPCAddress() string
func (*EthereumChain) GetWSAddress ¶
func (c *EthereumChain) GetWSAddress() string
func (*EthereumChain) HomeDir ¶
func (c *EthereumChain) HomeDir() string
func (*EthereumChain) HostName ¶
func (c *EthereumChain) HostName() string
func (*EthereumChain) Initialize ¶
func (c *EthereumChain) Initialize(ctx context.Context, testName string, cli *dockerclient.Client, networkID string) error
func (*EthereumChain) KeystoreDir ¶
func (c *EthereumChain) KeystoreDir() string
func (*EthereumChain) MakeKeystoreDir ¶
func (c *EthereumChain) MakeKeystoreDir(ctx context.Context) error
func (*EthereumChain) Name ¶
func (c *EthereumChain) Name() string
func (*EthereumChain) RecoverKey ¶
func (c *EthereumChain) RecoverKey(ctx context.Context, keyName, mnemonic string) error
cast wallet import requires a password prompt which docker isn't properly handling. For now, we only use CreateKey().
func (*EthereumChain) SendFunds ¶
func (c *EthereumChain) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error
func (*EthereumChain) SendIBCTransfer ¶
func (c *EthereumChain) SendIBCTransfer(ctx context.Context, channelID, keyName string, amount ibc.WalletAmount, options ibc.TransferOptions) (ibc.Tx, error)
func (*EthereumChain) Start ¶
func (c *EthereumChain) Start(testName string, ctx context.Context, additionalGenesisWallets ...ibc.WalletAmount) error
func (*EthereumChain) Timeouts ¶
func (c *EthereumChain) Timeouts(ctx context.Context, height int64) ([]ibc.PacketTimeout, error)
type EthereumWallet ¶
type EthereumWallet struct {
// contains filtered or unexported fields
}
func (*EthereumWallet) Address ¶
func (w *EthereumWallet) Address() []byte
Get Address with chain's prefix
func (*EthereumWallet) FormattedAddress ¶
func (w *EthereumWallet) FormattedAddress() string
Get formatted address, passing in a prefix
func (*EthereumWallet) KeyName ¶
func (w *EthereumWallet) KeyName() string
func (*EthereumWallet) Mnemonic ¶
func (w *EthereumWallet) Mnemonic() string
Get mnemonic, only used for relayer wallets
type ForgeScriptOpts ¶
type ForgeScriptOpts struct { ContractRootDir string // required, root directory of the contract with all local dependencies SolidityContract string // required, contract script to run SignatureFn string // optional, signature function to run, empty string uses default run() ConfigFile string // optional, json config file used for sol contract RawOptions []string // optional, appends additional options to command }
cli options for the `forge script` command see: https://book.getfoundry.sh/reference/forge/forge-script
type GenesisWallets ¶
type GenesisWallets struct {
// contains filtered or unexported fields
}
func NewGenesisWallet ¶
func NewGenesisWallet() GenesisWallets
func (*GenesisWallets) GetFaucetWallet ¶
func (w *GenesisWallets) GetFaucetWallet(keyname string) ibc.Wallet
type NewWalletOutput ¶
Click to show internal directories.
Click to hide internal directories.