Documentation ¶
Index ¶
- Constants
- Variables
- func Instantiate2Address(ctx sdk.Context, wasmKeeper wasmkeeper.Keeper, codeId uint64, initMsg []byte, ...) (sdk.AccAddress, error)
- func IsOutOfGasError(err any) (bool, string)
- func KeyPrefix(p string) []byte
- type AccountKeeper
- type AccountMsg
- type AfterExecuteTx
- type Any
- type AuthzInfo
- type BankKeeper
- type CallInfo
- type PreExecuteTx
- type RecoverTx
Constants ¶
View Source
const ( EventTypeSmartAccountTx = "smart_account_tx" EventTypeSmartAccountActivated = "smart_account_activated" EventTypeSmartAccountRecovery = "smart_account_recovery" AttributeKeyCreator = "creator" AttributeKeyCodeID = "code_id" AttributeKeyContractAddr = "contract_addr" )
View Source
const ( // ModuleName defines the module name ModuleName = "smartaccount" // StoreKey defines the primary module store key StoreKey = ModuleName // RouterKey is the message route for slashing RouterKey = ModuleName // QuerierRoute defines the module's query routing key QuerierRoute = ModuleName // MemStoreKey defines the in-memory store key MemStoreKey = "mem_smartaccount" AccountIDKey = "smartaccount_id" // In the AnteHandler, if the tx only has one sender and this sender is an // AbstractAccount, we store its address here. This way, in the PostHandler, // we know whether to call the after_tx method. SignerAddressKey = "smartaccount_signer" // free gas remaining in ante and post handlers // each smartaccount tx will have a limited amount of gas that can be used for free // the limitation will be determined by the government GasRemainingKey = "gas_remaining" )
Variables ¶
View Source
var ( ErrBadInstantiateMsg = errorsmod.Register(ModuleName, 1, "bad instantiate message") ErrInvalidPubKey = errorsmod.Register(ModuleName, 2, "invalid publickey") ErrAccountNotFoundForAddress = errorsmod.Register(ModuleName, 3, "account not found for address") ErrInvalidAddress = errorsmod.Register(ModuleName, 4, "invalid address") ErrInvalidBench32 = errorsmod.Register(ModuleName, 5, "invalid bench32") ErrInvalidTx = errorsmod.Register(ModuleName, 6, "invalid tx") ErrInvalidMsg = errorsmod.Register(ModuleName, 7, "invalid smart-account messages") ErrNoSuchCodeID = errorsmod.Register(ModuleName, 8, "code id not found") ErrNilPubkey = errorsmod.Register(ModuleName, 9, "nil pubkey") ErrAccountAlreadyExists = errorsmod.Register(ModuleName, 10, "account already exists") ErrInstantiateDuplicate = errorsmod.Register(ModuleName, 11, "instance with this code id, sender, salt and label exists") ErrInvalidCredentials = errorsmod.Register(ModuleName, 12, "invalid credentials") ErrInvalidCodeID = errorsmod.Register(ModuleName, 13, "invalid code id") ErrNotSupported = errorsmod.Register(ModuleName, 14, "not supported") ErrNotAllowedMsg = errorsmod.Register(ModuleName, 15, "not allowed message") ErrOutOfGas = errorsmod.Register(ModuleName, 16, "contract sudo execution ran out of gas") ErrContractExecutionPanic = errorsmod.Register(ModuleName, 17, "contract sudo execution panicked") )
x/aa module sentinel errors
View Source
var (
ParamsKey = []byte{0x00}
)
Functions ¶
func Instantiate2Address ¶
func Instantiate2Address( ctx sdk.Context, wasmKeeper wasmkeeper.Keeper, codeId uint64, initMsg []byte, salt []byte, pubKey cryptotypes.PubKey, ) (sdk.AccAddress, error)
generate predictable contract address
func IsOutOfGasError ¶ added in v0.7.3
Check if error is out of gas error
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { GetParams(ctx sdk.Context) (params authtypes.Params) GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI SetAccount(ctx sdk.Context, acc authtypes.AccountI) GetModuleAddress(moduleName string) sdk.AccAddress }
AccountKeeper defines the expected account keeper used for simulations (noalias)
type AccountMsg ¶
type AccountMsg struct { PreExecuteTx *PreExecuteTx `json:"pre_execute,omitempty"` AfterExecuteTx *AfterExecuteTx `json:"after_execute,omitempty"` RecoverTx *RecoverTx `json:"recover,omitempty"` }
type AfterExecuteTx ¶
type BankKeeper ¶
BankKeeper defines the expected interface needed to retrieve account balances.
type PreExecuteTx ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.