Documentation ¶
Index ¶
- Constants
- func CaptureCreateFn() (...)
- func CaptureExecuteFn() (...)
- func CaptureInstantiateFn(codeIDs ...uint64) (...)
- func CapturePinCodeFn() (func(ctx sdk.Context, codeID uint64) error, *[]uint64)
- type CapturedCreateCalls
- type CapturedExecuteCalls
- type CapturedInstantiateCalls
- type ContractOpsKeeperMock
- func (m ContractOpsKeeperMock) ClearContractAdmin(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress) error
- func (m ContractOpsKeeperMock) Create(ctx sdk.Context, creator sdk.AccAddress, wasmCode []byte, ...) (codeID uint64, checksum []byte, err error)
- func (m ContractOpsKeeperMock) Execute(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress, ...) ([]byte, error)
- func (m ContractOpsKeeperMock) Instantiate(ctx sdk.Context, codeID uint64, creator, admin sdk.AccAddress, initMsg []byte, ...) (sdk.AccAddress, []byte, error)
- func (m ContractOpsKeeperMock) Instantiate2(ctx sdk.Context, codeID uint64, creator, admin sdk.AccAddress, initMsg []byte, ...) (sdk.AccAddress, []byte, error)
- func (m ContractOpsKeeperMock) Migrate(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress, ...) ([]byte, error)
- func (m ContractOpsKeeperMock) PinCode(ctx sdk.Context, codeID uint64) error
- func (m ContractOpsKeeperMock) SetAccessConfig(ctx sdk.Context, codeID uint64, caller sdk.AccAddress, ...) error
- func (m ContractOpsKeeperMock) SetContractInfoExtension(ctx sdk.Context, contract sdk.AccAddress, ...) error
- func (m ContractOpsKeeperMock) Sudo(ctx sdk.Context, contractAddress sdk.AccAddress, msg []byte) ([]byte, error)
- func (m ContractOpsKeeperMock) UnpinCode(ctx sdk.Context, codeID uint64) error
- func (m ContractOpsKeeperMock) UpdateContractAdmin(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress, ...) error
Constants ¶
View Source
const DefaultCaptureInstantiateFnCodeID uint64 = 0
DefaultCaptureInstantiateFnCodeID value used for building the contract address
Variables ¶
This section is empty.
Functions ¶
func CaptureCreateFn ¶
func CaptureCreateFn() (func(ctx sdk.Context, creator sdk.AccAddress, wasmCode []byte, instantiateAccess *wasmtypes.AccessConfig) (codeID uint64, err error), *[]CapturedCreateCalls)
CaptureCreateFn records all calls in the returned slice
func CaptureExecuteFn ¶
func CaptureExecuteFn() (func(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress, msg []byte, coins sdk.Coins) ([]byte, error), *[]CapturedExecuteCalls)
CaptureExecuteFn records all calls in the returned slice
func CaptureInstantiateFn ¶
func CaptureInstantiateFn(codeIDs ...uint64) (func(ctx sdk.Context, codeID uint64, creator, admin sdk.AccAddress, initMsg []byte, label string, deposit sdk.Coins) (sdk.AccAddress, []byte, error), *[]CapturedInstantiateCalls)
CaptureInstantiateFn records all calls in the returned slice
Types ¶
type CapturedCreateCalls ¶
type CapturedCreateCalls struct { Creator sdk.AccAddress WasmCode []byte InstantiateAccess *wasmtypes.AccessConfig }
type CapturedExecuteCalls ¶
type CapturedExecuteCalls struct { ContractAddress sdk.AccAddress Caller sdk.AccAddress Msg []byte Coins sdk.Coins }
type ContractOpsKeeperMock ¶
type ContractOpsKeeperMock struct { CreateFn func(ctx sdk.Context, creator sdk.AccAddress, wasmCode []byte, instantiateAccess *wasmtypes.AccessConfig) (codeID uint64, checksum []byte, err error) InstantiateFn func(ctx sdk.Context, codeID uint64, creator, admin sdk.AccAddress, initMsg []byte, label string, deposit sdk.Coins) (sdk.AccAddress, []byte, error) Instantiate2Fn func(ctx sdk.Context, codeID uint64, creator, admin sdk.AccAddress, initMsg []byte, label string, deposit sdk.Coins, salt []byte, fixMsg bool) (sdk.AccAddress, []byte, error) ExecuteFn func(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress, msg []byte, coins sdk.Coins) ([]byte, error) MigrateFn func(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress, newCodeID uint64, msg []byte) ([]byte, error) UpdateContractAdminFn func(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress, newAdmin sdk.AccAddress) error ClearContractAdminFn func(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress) error PinCodeFn func(ctx sdk.Context, codeID uint64) error UnpinCodeFn func(ctx sdk.Context, codeID uint64) error SetContractInfoExtensionFn func(ctx sdk.Context, contract sdk.AccAddress, extra wasmtypes.ContractInfoExtension) error SudoFn func(ctx sdk.Context, contractAddress sdk.AccAddress, msg []byte) ([]byte, error) SetAccessConfigFn func(ctx sdk.Context, codeID uint64, caller sdk.AccAddress, config wasmtypes.AccessConfig) error }
ContractOpsKeeperMock implements wasmtypes.ContractOpsKeeper for testing purpose
func (ContractOpsKeeperMock) ClearContractAdmin ¶
func (m ContractOpsKeeperMock) ClearContractAdmin(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress) error
func (ContractOpsKeeperMock) Create ¶
func (m ContractOpsKeeperMock) Create(ctx sdk.Context, creator sdk.AccAddress, wasmCode []byte, instantiateAccess *wasmtypes.AccessConfig) (codeID uint64, checksum []byte, err error)
func (ContractOpsKeeperMock) Execute ¶
func (m ContractOpsKeeperMock) Execute(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress, msg []byte, coins sdk.Coins) ([]byte, error)
func (ContractOpsKeeperMock) Instantiate ¶
func (m ContractOpsKeeperMock) Instantiate(ctx sdk.Context, codeID uint64, creator, admin sdk.AccAddress, initMsg []byte, label string, deposit sdk.Coins) (sdk.AccAddress, []byte, error)
func (ContractOpsKeeperMock) Instantiate2 ¶
func (ContractOpsKeeperMock) Migrate ¶
func (m ContractOpsKeeperMock) Migrate(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress, newCodeID uint64, msg []byte) ([]byte, error)
func (ContractOpsKeeperMock) PinCode ¶
func (m ContractOpsKeeperMock) PinCode(ctx sdk.Context, codeID uint64) error
func (ContractOpsKeeperMock) SetAccessConfig ¶
func (m ContractOpsKeeperMock) SetAccessConfig(ctx sdk.Context, codeID uint64, caller sdk.AccAddress, config wasmtypes.AccessConfig) error
func (ContractOpsKeeperMock) SetContractInfoExtension ¶
func (m ContractOpsKeeperMock) SetContractInfoExtension(ctx sdk.Context, contract sdk.AccAddress, extra wasmtypes.ContractInfoExtension) error
func (ContractOpsKeeperMock) Sudo ¶
func (m ContractOpsKeeperMock) Sudo(ctx sdk.Context, contractAddress sdk.AccAddress, msg []byte) ([]byte, error)
func (ContractOpsKeeperMock) UnpinCode ¶
func (m ContractOpsKeeperMock) UnpinCode(ctx sdk.Context, codeID uint64) error
func (ContractOpsKeeperMock) UpdateContractAdmin ¶
func (m ContractOpsKeeperMock) UpdateContractAdmin(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress, newAdmin sdk.AccAddress) error
Click to show internal directories.
Click to hide internal directories.