Documentation
¶
Index ¶
- Constants
- func NewChainApp(chainCfg ChainConfig, disableCometBFT bool, testConfig TestConfig, ...) (chainApp ChainApp, cometApp CometBftApp, validatorSet *cmttypes.ValidatorSet)
- func NewIntegrationTestKeyring(accounts TestAccounts) keyring.Keyring
- func NewSigner(sk cryptotypes.PrivKey) keyring.Signer
- type AnteTestSpec
- func (ts *AnteTestSpec) OnFail(f func(ctx sdk.Context, anteErr error, tx sdk.Tx)) *AnteTestSpec
- func (ts *AnteTestSpec) OnSuccess(f func(ctx sdk.Context, tx sdk.Tx)) *AnteTestSpec
- func (ts *AnteTestSpec) PostRun(f func(ctx sdk.Context, anteErr error, tx sdk.Tx)) *AnteTestSpec
- func (ts *AnteTestSpec) WantsErr() *AnteTestSpec
- func (ts *AnteTestSpec) WantsErrMsgContains(msg string) *AnteTestSpec
- func (ts *AnteTestSpec) WantsErrMultiEthTx() *AnteTestSpec
- func (ts *AnteTestSpec) WantsPanic() *AnteTestSpec
- func (ts *AnteTestSpec) WantsPriority(wantPriority int64) *AnteTestSpec
- func (ts *AnteTestSpec) WantsSuccess() *AnteTestSpec
- func (ts *AnteTestSpec) WithCheckTx() *AnteTestSpec
- func (ts *AnteTestSpec) WithDecorator(d sdk.AnteDecorator) *AnteTestSpec
- func (ts *AnteTestSpec) WithNodeMinGasPrices(minGasPrices sdk.DecCoins) *AnteTestSpec
- func (ts *AnteTestSpec) WithReCheckTx() *AnteTestSpec
- func (ts *AnteTestSpec) WithSimulateOn() *AnteTestSpec
- type ChainApp
- type ChainConfig
- type ChainConstantConfig
- type CometBftApp
- type QueryClients
- type ResponseDeliverEthTx
- type TemporaryHolder
- 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) GetEthAddressP() *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
- type TxBuilder
- func (tb *TxBuilder) AutoFee() *TxBuilder
- func (tb *TxBuilder) AutoGasLimit() *TxBuilder
- func (tb *TxBuilder) BigFeeAmount(amountDisplay int64) *TxBuilder
- func (tb *TxBuilder) BigGasLimit() *TxBuilder
- func (tb *TxBuilder) ClientTxBuilder() client.TxBuilder
- func (tb *TxBuilder) SetBankSendMsg(from, to *TestAccount, amount int64) *TxBuilder
- func (tb *TxBuilder) SetExtensionOptions(extOpts ...proto.Message) *TxBuilder
- func (tb *TxBuilder) SetFeeAmount(fee sdk.Coins) *TxBuilder
- func (tb *TxBuilder) SetFeeGranter(feeGranter sdk.AccAddress) *TxBuilder
- func (tb *TxBuilder) SetGasLimit(gasLimit uint64) *TxBuilder
- func (tb *TxBuilder) SetMemo(memo string) *TxBuilder
- func (tb *TxBuilder) SetMsgs(msgs ...sdk.Msg) *TxBuilder
- func (tb *TxBuilder) SetMultiBankSendMsg(from, to *TestAccount, amount int64, count int) *TxBuilder
- func (tb *TxBuilder) SetSignatures(signatures ...signingtypes.SignatureV2) *TxBuilder
- func (tb *TxBuilder) SetTimeoutHeight(height uint64) *TxBuilder
- func (tb *TxBuilder) Tx() sdk.Tx
- func (tb *TxBuilder) WithExtOptDynamicFeeTx() *TxBuilder
- func (tb *TxBuilder) WithExtOptEthTx() *TxBuilder
Constants ¶
View Source
const CometBFTGovVotingPeriod = 5 * time.Second
Variables ¶
This section is empty.
Functions ¶
func NewChainApp ¶
func NewChainApp(chainCfg ChainConfig, disableCometBFT bool, testConfig TestConfig, encCfg params.EncodingConfig, db cmtdb.DB, validatorAccounts TestAccounts, walletAccounts TestAccounts, genesisAccountBalance sdk.Coins, tempHolder *TemporaryHolder, logger log.Logger) (chainApp ChainApp, cometApp CometBftApp, validatorSet *cmttypes.ValidatorSet)
func NewIntegrationTestKeyring ¶
func NewIntegrationTestKeyring(accounts TestAccounts) keyring.Keyring
Types ¶
type AnteTestSpec ¶
type AnteTestSpec struct { Ante sdk.AnteHandler Simulate bool NodeMinGasPrices *sdk.DecCoins CheckTx bool ReCheckTx bool WantPriority *int64 WantErr bool WantErrMsgContains *string WantPanic bool PostRunOnSuccess func(ctx sdk.Context, tx sdk.Tx) // will be executed only when ante ran success PostRunOnFail func(ctx sdk.Context, anteErr error, tx sdk.Tx) // will be executed only when ante ran failed PostRunRegardlessStatus func(ctx sdk.Context, anteErr error, tx sdk.Tx) // will be executed regardless ante ran success or not }
func NewAnteTestSpec ¶
func NewAnteTestSpec() *AnteTestSpec
func (*AnteTestSpec) OnFail ¶
func (ts *AnteTestSpec) OnFail(f func(ctx sdk.Context, anteErr error, tx sdk.Tx)) *AnteTestSpec
func (*AnteTestSpec) OnSuccess ¶
func (ts *AnteTestSpec) OnSuccess(f func(ctx sdk.Context, tx sdk.Tx)) *AnteTestSpec
func (*AnteTestSpec) PostRun ¶
func (ts *AnteTestSpec) PostRun(f func(ctx sdk.Context, anteErr error, tx sdk.Tx)) *AnteTestSpec
func (*AnteTestSpec) WantsErr ¶
func (ts *AnteTestSpec) WantsErr() *AnteTestSpec
func (*AnteTestSpec) WantsErrMsgContains ¶
func (ts *AnteTestSpec) WantsErrMsgContains(msg string) *AnteTestSpec
func (*AnteTestSpec) WantsErrMultiEthTx ¶
func (ts *AnteTestSpec) WantsErrMultiEthTx() *AnteTestSpec
func (*AnteTestSpec) WantsPanic ¶
func (ts *AnteTestSpec) WantsPanic() *AnteTestSpec
func (*AnteTestSpec) WantsPriority ¶
func (ts *AnteTestSpec) WantsPriority(wantPriority int64) *AnteTestSpec
func (*AnteTestSpec) WantsSuccess ¶
func (ts *AnteTestSpec) WantsSuccess() *AnteTestSpec
func (*AnteTestSpec) WithCheckTx ¶
func (ts *AnteTestSpec) WithCheckTx() *AnteTestSpec
func (*AnteTestSpec) WithDecorator ¶
func (ts *AnteTestSpec) WithDecorator(d sdk.AnteDecorator) *AnteTestSpec
func (*AnteTestSpec) WithNodeMinGasPrices ¶
func (ts *AnteTestSpec) WithNodeMinGasPrices(minGasPrices sdk.DecCoins) *AnteTestSpec
func (*AnteTestSpec) WithReCheckTx ¶
func (ts *AnteTestSpec) WithReCheckTx() *AnteTestSpec
func (*AnteTestSpec) WithSimulateOn ¶
func (ts *AnteTestSpec) WithSimulateOn() *AnteTestSpec
type ChainApp ¶
type ChainApp interface { App() abci.Application BaseApp() *baseapp.BaseApp IbcTestingApp() ibctesting.TestingApp InterfaceRegistry() codectypes.InterfaceRegistry BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) AccountKeeper() *authkeeper.AccountKeeper BankKeeper() bankkeeper.Keeper DistributionKeeper() distkeeper.Keeper EvmKeeper() *evmkeeper.Keeper FeeMarketKeeper() *feemarketkeeper.Keeper GovKeeper() *govkeeper.Keeper IbcTransferKeeper() *ibctransferkeeper.Keeper IbcKeeper() *ibckeeper.Keeper SlashingKeeper() *slashingkeeper.Keeper StakingKeeper() *stakingkeeper.Keeper FeeGrantKeeper() *feegrantkeeper.Keeper VAuthKeeper() *vauthkeeper.Keeper CpcKeeper() *cpckeeper.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 CometBftApp ¶
type CometBftApp interface { CometBftNode() *cmtnode.Node GetRpcAddr() (addr string, supported bool) Shutdown() }
func NewCometBftApp ¶
func NewCometBftApp(cometNode *cmtnode.Node, rpcPort int) CometBftApp
type QueryClients ¶
type QueryClients struct { GrpcConnection grpc1.ClientConn ClientQueryCtx client.Context CometBFTRpcHttpClient *httpclient.HTTP Auth authtypes.QueryClient Bank banktypes.QueryClient Distribution disttypes.QueryClient EVM evmtypes.QueryClient CPC cpctypes.QueryClient GovV1 govtypesv1.QueryClient GovLegacy govtypeslegacy.QueryClient IbcTransfer ibctransfertypes.QueryClient Slashing slashingtypes.QueryClient Staking stakingtypes.QueryClient ServiceClient sdktxtypes.ServiceClient Rpc *rpctypes.QueryClient }
type ResponseDeliverEthTx ¶
type ResponseDeliverEthTx struct { CosmosTxHash string EthTxHash string EvmError string ResponseDeliverEthTx *abci.ExecTxResult }
func NewResponseDeliverEthTx ¶
func NewResponseDeliverEthTx(responseDeliverTx *abci.ExecTxResult) *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 *cmttypes.GenesisDoc)
func (*TemporaryHolder) GetCachedGenesisDoc ¶
func (h *TemporaryHolder) GetCachedGenesisDoc() (*cmttypes.GenesisDoc, bool)
func (*TemporaryHolder) GetTempFiles ¶
func (h *TemporaryHolder) GetTempFiles() ([]string, bool)
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) GetEthAddressP ¶
func (a TestAccount) GetEthAddressP() *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 CometBFT 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
type TestConfig ¶
type TxBuilder ¶
type TxBuilder struct {
// contains filtered or unexported fields
}
func NewTxBuilder ¶
func NewTxBuilder(encodingConfig params.EncodingConfig, r func() *require.Assertions) *TxBuilder
func (*TxBuilder) AutoGasLimit ¶
func (*TxBuilder) BigFeeAmount ¶
func (*TxBuilder) BigGasLimit ¶
func (*TxBuilder) ClientTxBuilder ¶
func (*TxBuilder) SetBankSendMsg ¶
func (tb *TxBuilder) SetBankSendMsg(from, to *TestAccount, amount int64) *TxBuilder
func (*TxBuilder) SetExtensionOptions ¶
func (*TxBuilder) SetFeeGranter ¶
func (tb *TxBuilder) SetFeeGranter(feeGranter sdk.AccAddress) *TxBuilder
func (*TxBuilder) SetGasLimit ¶
func (*TxBuilder) SetMultiBankSendMsg ¶
func (tb *TxBuilder) SetMultiBankSendMsg(from, to *TestAccount, amount int64, count int) *TxBuilder
func (*TxBuilder) SetSignatures ¶
func (tb *TxBuilder) SetSignatures(signatures ...signingtypes.SignatureV2) *TxBuilder
func (*TxBuilder) SetTimeoutHeight ¶
func (*TxBuilder) WithExtOptDynamicFeeTx ¶
func (*TxBuilder) WithExtOptEthTx ¶
Click to show internal directories.
Click to hide internal directories.