Documentation ¶
Index ¶
- Variables
- func AccAddress() sdk.AccAddress
- func AddTestAddrs(app *app.App, ctx sdk.Context, accNum int, accAmt math.Int) []sdk.AccAddress
- func CreateTestPubKeys(numPubKeys int) []cryptotypes.PubKey
- func FundModuleAccount(app *app.App, ctx sdk.Context, moduleName string, coins sdk.Coins)
- func InitAccountWithCoins(app *app.App, ctx sdk.Context, addr sdk.AccAddress, coins sdk.Coins)
- func NewPubKeyFromHex(pk string) (res cryptotypes.PubKey)
- func Setup(t *testing.T, isCheckTx bool) *app.App
- func SetupChain(t *testing.T, coord *ibctesting.Coordinator, chainID, rollAppDenom string) *ibctesting.TestChain
- func SetupWithGenesisValSet(t *testing.T, chainID, rollAppDenom string, valSet *tmtypes.ValidatorSet, ...) *app.App
- type EmptyAppOptions
Constants ¶
This section is empty.
Variables ¶
var ( ProposerPK = simapp.CreateTestPubKeys(1)[0] ProposerConsAddr = sdk.ConsAddress(ProposerPK.Address()) OperatorPK = secp256k1.GenPrivKey().PubKey() )
var DefaultConsensusParams = &abci.ConsensusParams{ Block: &abci.BlockParams{ MaxBytes: 200000, MaxGas: -1, }, Evidence: &tmproto.EvidenceParams{ MaxAgeNumBlocks: 302400, MaxAgeDuration: 504 * time.Hour, MaxBytes: 10000, }, Validator: &tmproto.ValidatorParams{ PubKeyTypes: []string{ tmtypes.ABCIPubKeyTypeEd25519, }, }, }
Functions ¶
func AccAddress ¶
func AccAddress() sdk.AccAddress
-------------------------------------------------------------------------- utils --------------------------------------------------------------------------
AccAddress returns a sample account address
func AddTestAddrs ¶
AddTestAddrs constructs and returns accNum amount of accounts with an initial balance of accAmt in random order
func CreateTestPubKeys ¶
func CreateTestPubKeys(numPubKeys int) []cryptotypes.PubKey
CreateTestPubKeys returns a total of numPubKeys public keys in ascending order.
func FundModuleAccount ¶
func InitAccountWithCoins ¶
func NewPubKeyFromHex ¶
func NewPubKeyFromHex(pk string) (res cryptotypes.PubKey)
NewPubKeyFromHex returns a PubKey from a hex string.
func SetupChain ¶
func SetupChain(t *testing.T, coord *ibctesting.Coordinator, chainID, rollAppDenom string) *ibctesting.TestChain
TODO: tech debt - this is almost exactly like the code in github.com/cosmos/ibc-go/v6/testing/chain.go the only difference is the different way the app is setup
func SetupWithGenesisValSet ¶
func SetupWithGenesisValSet(t *testing.T, chainID, rollAppDenom string, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances []banktypes.Balance) *app.App
TODO: tech debt - this is almost the same as in github.com/cosmos/ibc-go/v6/testing/app.go but unlike the other one, this one adds the sequencer to the genesis state on InitChain
Types ¶
type EmptyAppOptions ¶
type EmptyAppOptions struct{}
EmptyAppOptions is a stub implementing AppOptions
func (EmptyAppOptions) Get ¶
func (ao EmptyAppOptions) Get(o string) interface{}
Get implements AppOptions