* Revert default instance address generation to classic sequence based method Please enter the commit message for your changes. Lines starting * Start re-adding classic address generator * Extract address generation to file; minor updates * Review comments * Set max salt size * Support predictable address on instantiation * Switch attribute order for backwards compatiblity * Fix salt param check in CLI * Enable tests * Add more tests * Minor fix * Remove migration * Better cli description * Fix init message length prefix * Add sanity checks to address generation and minor updates * Reduce max length in tests for CI * CLI and address generation updates * Add test vectors * Minor updates * Fix cli long doc
29 lines
950 B
Go
29 lines
950 B
Go
package wasmtesting
|
|
|
|
import (
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
|
)
|
|
|
|
type MockCoinTransferrer struct {
|
|
TransferCoinsFn func(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
|
|
}
|
|
|
|
func (m *MockCoinTransferrer) TransferCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error {
|
|
if m.TransferCoinsFn == nil {
|
|
panic("not expected to be called")
|
|
}
|
|
return m.TransferCoinsFn(ctx, fromAddr, toAddr, amt)
|
|
}
|
|
|
|
type AccountPrunerMock struct {
|
|
CleanupExistingAccountFn func(ctx sdk.Context, existingAccount authtypes.AccountI) (handled bool, err error)
|
|
}
|
|
|
|
func (m AccountPrunerMock) CleanupExistingAccount(ctx sdk.Context, existingAccount authtypes.AccountI) (handled bool, err error) {
|
|
if m.CleanupExistingAccountFn == nil {
|
|
panic("not expected to be called")
|
|
}
|
|
return m.CleanupExistingAccountFn(ctx, existingAccount)
|
|
}
|