Documentation ¶
Index ¶
- Constants
- func NewChainApp(chainCfg ChainConfig, disableTendermint bool, testConfig TestConfig, ...) (chainApp ChainApp, tendermintApp TendermintApp, ...)
- func NewIntegrationTestKeyring(accounts TestAccounts) keyring.Keyring
- func NewSigner(sk cryptotypes.PrivKey) keyring.Signer
- type ChainApp
- type ChainConfig
- type ChainConstantConfig
- type MemDB
- func (w *MemDB) AsCometBFT() cdb.DB
- func (w *MemDB) Close() error
- func (w *MemDB) Delete(bytes []byte) error
- func (w *MemDB) DeleteSync(bytes []byte) error
- func (w *MemDB) Get(bytes []byte) ([]byte, error)
- func (w *MemDB) Has(key []byte) (bool, error)
- func (w *MemDB) Iterator(start, end []byte) (cdb.Iterator, error)
- func (w *MemDB) NewBatch() cdb.Batch
- func (w *MemDB) Print() error
- func (w *MemDB) ReverseIterator(start, end []byte) (cdb.Iterator, error)
- func (w *MemDB) Set(bytes []byte, bytes2 []byte) error
- func (w *MemDB) SetSync(bytes []byte, bytes2 []byte) error
- func (w *MemDB) Stats() map[string]string
- type QueryClients
- type ResponseDeliverEthTx
- type TemporaryHolder
- type TendermintApp
- type TestAccount
- func (a TestAccount) ComputeContractAddress(nonce uint64) common.Address
- func (a TestAccount) GetConsensusAddress() sdk.ConsAddress
- func (a TestAccount) GetCosmosAddress() sdk.AccAddress
- func (a TestAccount) GetEthAddress() common.Address
- func (a TestAccount) GetPubKey() cryptotypes.PubKey
- func (a TestAccount) GetSdkPubKey() cryptotypes.PubKey
- func (a TestAccount) GetTmPrivKey() tmcrypto.PrivKey
- func (a TestAccount) GetTmPubKey() tmcrypto.PubKey
- func (a TestAccount) GetValidatorAddress() sdk.ValAddress
- type TestAccountType
- type TestAccounts
- type TestConfig
Constants ¶
View Source
const TendermintGovVotingPeriod = 5 * time.Second
Variables ¶
This section is empty.
Functions ¶
func NewChainApp ¶
func NewChainApp(chainCfg ChainConfig, disableTendermint bool, testConfig TestConfig, encCfg params.EncodingConfig, db *MemDB, validatorAccounts TestAccounts, walletAccounts TestAccounts, genesisAccountBalance sdk.Coins, tempHolder *TemporaryHolder, logger log.Logger) (chainApp ChainApp, tendermintApp TendermintApp, validatorSet *tmtypes.ValidatorSet)
func NewIntegrationTestKeyring ¶
func NewIntegrationTestKeyring(accounts TestAccounts) keyring.Keyring
Types ¶
type ChainApp ¶
type ChainApp interface { App() abci.Application BaseApp() *baseapp.BaseApp IbcTestingApp() ibctesting.TestingApp InterfaceRegistry() codectypes.InterfaceRegistry AccountKeeper() *authkeeper.AccountKeeper BankKeeper() bankkeeper.Keeper DistributionKeeper() distkeeper.Keeper Erc20Keeper() *erc20keeper.Keeper EvmKeeper() *evmkeeper.Keeper FeeMarketKeeper() *feemarketkeeper.Keeper GovKeeper() *govkeeper.Keeper IbcTransferKeeper() *ibctransferkeeper.Keeper IbcKeeper() *ibckeeper.Keeper SlashingKeeper() *slashingkeeper.Keeper StakingKeeper() *stakingkeeper.Keeper FundAccount(ctx sdk.Context, account *TestAccount, amounts sdk.Coins) error }
type ChainConfig ¶
type ChainConstantConfig ¶
type ChainConstantConfig struct {
// contains filtered or unexported fields
}
func NewChainConstantConfig ¶
func NewChainConstantConfig(cosmosChainId, minDenom string, baseExponent int) ChainConstantConfig
func (ChainConstantConfig) GetBaseExponent ¶
func (c ChainConstantConfig) GetBaseExponent() int
func (ChainConstantConfig) GetCosmosChainID ¶
func (c ChainConstantConfig) GetCosmosChainID() string
func (ChainConstantConfig) GetMinDenom ¶
func (c ChainConstantConfig) GetMinDenom() string
type MemDB ¶
type MemDB struct {
// contains filtered or unexported fields
}
MemDB is a wrapper of Tendermint/CometBFT DB that is backward-compatible with CometBFT chains pre-rename package.
(eg: replace github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.29)
func WrapCometBftDB ¶
func (*MemDB) AsCometBFT ¶
func (*MemDB) DeleteSync ¶
func (*MemDB) ReverseIterator ¶
type QueryClients ¶
type QueryClients struct { GrpcConnection grpc1.ClientConn ClientQueryCtx cosmosclient.Context TendermintRpcHttpClient *httpclient.HTTP Auth authtypes.QueryClient Bank banktypes.QueryClient Distribution disttypes.QueryClient Erc20 erc20types.QueryClient EVM evmtypes.QueryClient GovV1 govtypesv1.QueryClient GovLegacy govtypeslegacy.QueryClient IbcTransfer ibctransfertypes.QueryClient Slashing slashingtypes.QueryClient Staking stakingtypes.QueryClient ServiceClient cosmostxtypes.ServiceClient Rpc *rpctypes.QueryClient }
type ResponseDeliverEthTx ¶
type ResponseDeliverEthTx struct { CosmosTxHash string EthTxHash string EvmError string ResponseDeliverEthTx *abci.ResponseDeliverTx }
func NewResponseDeliverEthTx ¶
func NewResponseDeliverEthTx(responseDeliverTx *abci.ResponseDeliverTx) *ResponseDeliverEthTx
type TemporaryHolder ¶
type TemporaryHolder struct {
// contains filtered or unexported fields
}
func NewTemporaryHolder ¶
func NewTemporaryHolder() *TemporaryHolder
func (*TemporaryHolder) AddTempFile ¶
func (h *TemporaryHolder) AddTempFile(file string)
func (*TemporaryHolder) CacheGenesisDoc ¶
func (h *TemporaryHolder) CacheGenesisDoc(doc *tmtypes.GenesisDoc)
func (*TemporaryHolder) GetCachedGenesisDoc ¶
func (h *TemporaryHolder) GetCachedGenesisDoc() (*tmtypes.GenesisDoc, bool)
func (*TemporaryHolder) GetTempFiles ¶
func (h *TemporaryHolder) GetTempFiles() ([]string, bool)
type TendermintApp ¶
type TendermintApp interface { TendermintNode() *nm.Node GetRpcAddr() (addr string, supported bool) Shutdown() }
func NewTendermintApp ¶
func NewTendermintApp(tendermintNode *nm.Node, rpcPort int) TendermintApp
type TestAccount ¶
type TestAccount struct { PrivateKey *ethsecp256k1.PrivKey Signer keyring.Signer Type TestAccountType }
func (TestAccount) ComputeContractAddress ¶
func (a TestAccount) ComputeContractAddress(nonce uint64) common.Address
func (TestAccount) GetConsensusAddress ¶
func (a TestAccount) GetConsensusAddress() sdk.ConsAddress
func (TestAccount) GetCosmosAddress ¶
func (a TestAccount) GetCosmosAddress() sdk.AccAddress
func (TestAccount) GetEthAddress ¶
func (a TestAccount) GetEthAddress() common.Address
func (TestAccount) GetPubKey ¶
func (a TestAccount) GetPubKey() cryptotypes.PubKey
func (TestAccount) GetSdkPubKey ¶
func (a TestAccount) GetSdkPubKey() cryptotypes.PubKey
func (TestAccount) GetTmPrivKey ¶
func (a TestAccount) GetTmPrivKey() tmcrypto.PrivKey
func (TestAccount) GetTmPubKey ¶
func (a TestAccount) GetTmPubKey() tmcrypto.PubKey
func (TestAccount) GetValidatorAddress ¶
func (a TestAccount) GetValidatorAddress() sdk.ValAddress
GetValidatorAddress returns validator address of the account, deliver from sdk pubkey. Should use suite.GetValidatorAddress() instead for correcting with Tendermint node mode.
type TestAccountType ¶
type TestAccountType int8
const ( TestAccountTypeValidator TestAccountType = iota TestAccountTypeWallet )
type TestAccounts ¶
type TestAccounts []*TestAccount
func (TestAccounts) Number ¶
func (a TestAccounts) Number(num int) *TestAccount
Click to show internal directories.
Click to hide internal directories.