Contracts

#29

WASM smart contracts (ink!)

Part of EVM & Smart Contracts: Ethereum compatibility and smart contract execution

Filter by:
ApiVersion constant v334 → v393

API version of the contracts pallet.

call call v334 → v393 #6

Calls a deployed WASM smart contract, executing its code with provided data.

Emits: ContractEmitted, Called +3 Modifies: ContractInfoOf
SystemContracts
call_old_weight call v334 → v393 #0

Legacy call interface using old weight format (deprecated).

Emits: ContractEmitted, Called +1 Modifies: ContractInfoOf
SystemContracts
Called event v334 → v393 #6

Emitted when a smart contract is called and executed.

Emitted by: call, call_old_weight Modifies: ContractInfoOf
SystemContracts
CannotAddSelfAsDelegateDependency error v334 → v393 #35

A contract cannot add its own code hash as a delegate dependency.

CodeHashLockupDepositPercent constant v334 → v393

Percentage of code deposit locked during instance lifetime.

CodeInfoNotFound error v334 → v393 #9

No code info could be found at the supplied code hash.

CodeInfoOf storage v334 → v393

Metadata about stored contract code.

Modified by: instantiate, instantiate_old_weight +6
SystemContracts
CodeInUse error v334 → v393 #26

Cannot remove code because contract instances still use it.

CodeNotFound error v334 → v393 #8

No code exists with the specified code hash.

CodeRejected error v334 → v393 #28

The WASM code was rejected during validation.

CodeRemoved event v334 → v393 #4

Emitted when contract code is removed from on-chain storage.

Emitted by: remove_code Modifies: CodeInfoOf, PristineCode
SystemContracts
CodeStored event v334 → v393 #2

Emitted when contract code is uploaded and stored on-chain.

Emitted by: upload_code, instantiate_with_code +1 Modifies: CodeInfoOf, ContractInfoOf +2
SystemContracts
CodeTooLarge error v334 → v393 #7

The WASM code exceeds the maximum allowed size.

ContractCodeUpdated event v334 → v393 #5

Emitted when a contract's code is updated to a different code hash.

Emitted by: set_code Modifies: CodeInfoOf, ContractInfoOf
SystemContracts
ContractEmitted event v334 → v393 #3

Emitted when a contract emits a custom event during execution.

Emitted by: call, call_old_weight Modifies: ContractInfoOf
SystemContracts
ContractInfoOf storage v334 → v393

Information about deployed contract instances.

Modified by: call, call_old_weight +6
SystemContracts
ContractNotFound error v334 → v393 #6

No contract exists at the specified address.

ContractReverted error v334 → v393 #27

The contract execution was reverted.

ContractTrapped error v334 → v393 #12

The contract execution trapped (crashed) during execution.

DecodingFailed error v334 → v393 #11

Failed to decode input data for the contract.

DefaultDepositLimit constant v334 → v393

Default maximum deposit for a contract deployment.

DelegateCalled event v334 → v393 #7

Emitted when a contract executes code from another contract in its own context.

Emitted by: call, call_old_weight Modifies: ContractInfoOf
SystemContracts
DelegateDependencyAlreadyExists error v334 → v393 #34

The contract already depends on the given delegate dependency.

DelegateDependencyNotFound error v334 → v393 #33

The dependency was not found in the contract's delegate dependencies.

DeletionQueue storage v334 → v393

Queue of contracts marked for deletion.

SystemContracts
DeletionQueueCounter storage v334 → v393

Counter for the deletion queue.

SystemContracts
DepositPerByte constant v334 → v393

Storage deposit per byte of code or contract storage.

DepositPerItem constant v334 → v393

Deposit per storage item (key) in a contract.

DuplicateContract error v334 → v393 #20

A contract already exists at the target address.

Environment constant v334 → v393

Environment constants available to contracts at runtime.

Indeterministic error v334 → v393 #29

The code contains non-deterministic operations.

InputForwarded error v334 → v393 #15

Input data was forwarded to a nested call unexpectedly.

instantiate call v334 → v393 #8

Creates a new contract instance from previously uploaded code.

Emits: Instantiated, StorageDepositTransferredAndHeld Modifies: ContractInfoOf, CodeInfoOf +1
SystemContracts
instantiate_old_weight call v334 → v393 #2

Legacy instantiate using old weight format (deprecated).

Emits: Instantiated Modifies: ContractInfoOf, CodeInfoOf +1
SystemContracts
instantiate_with_code call v334 → v393 #7

Deploys new WASM contract code and instantiates a contract from it in one operation.

Emits: Instantiated, CodeStored +1 Modifies: PristineCode, CodeInfoOf +2
SystemContracts
instantiate_with_code_old_weight call v334 → v393 #1

Legacy instantiate_with_code using old weight format (deprecated).

Emits: Instantiated, CodeStored Modifies: PristineCode, CodeInfoOf +2
SystemContracts
Instantiated event v334 → v393 #0

Emitted when a new smart contract is successfully deployed and instantiated.

Emitted by: instantiate, instantiate_with_code +2 Modifies: CodeInfoOf, ContractInfoOf +2
SystemContracts
InvalidCallFlags error v334 → v393 #1

The call flags specified for this contract call are invalid.

InvalidSchedule error v334 → v393 #0

The cost schedule for contract execution is invalid.

MaxCallDepthReached error v334 → v393 #5

Contract call depth exceeded the maximum allowed nesting level.

MaxCodeLen constant v334 → v393

Maximum size of WASM code that can be uploaded.

MaxDebugBufferLen constant v334 → v393

Maximum size of the debug buffer for contract debugging.

MaxDelegateDependencies constant v334 → v393

Maximum number of delegate dependencies for a contract.

MaxDelegateDependenciesReached error v334 → v393 #32

The contract has reached its maximum number of delegate dependencies.

MaxStorageKeyLen constant v334 → v393

Maximum length of a storage key in a contract.

MaxTransientStorageSize constant v334 → v393

Maximum size of transient storage during contract execution.

migrate call v334 → v393 #9

Runs migration logic for contracts after a runtime upgrade.

Modifies: MigrationInProgress, ContractInfoOf +1
AdminContracts
MigrationInProgress storage v334 → v393

Cursor tracking migration progress after runtime upgrades.

Modified by: migrate
AdminContracts
MigrationInProgress error v334 → v393 #30

A migration is in progress and contract operations are blocked.

NoChainExtension error v334 → v393 #18

The contract tried to use a chain extension that doesn't exist.

NoMigrationPerformed error v334 → v393 #31

No migration was performed (nothing to migrate).

Nonce storage v334 → v393

A running counter used for contract address derivation.

Modified by: instantiate, instantiate_old_weight +2
SystemContracts
OutOfBounds error v334 → v393 #10

A memory access in the contract went out of bounds.

OutOfGas error v334 → v393 #2

The contract execution ran out of gas before completing.

OutOfTransientStorage error v334 → v393 #36

Cannot add more data to transient storage.

OutputBufferTooSmall error v334 → v393 #3

The output buffer provided is too small for the contract's return data.

PristineCode storage v334 → v393

Stored WASM code identified by code hash.

Modified by: instantiate_with_code, instantiate_with_code_old_weight +2
SystemContracts
RandomSubjectTooLong error v334 → v393 #16

The subject provided for random number generation is too long.

ReentranceDenied error v334 → v393 #22

A reentrant call was denied by the contract or runtime.

remove_code call v334 → v393 #4

Removes previously uploaded contract code if no instances exist.

Emits: CodeRemoved Modifies: PristineCode, CodeInfoOf
SystemContracts
Schedule constant v334 → v393

Cost schedule for contract operations.

set_code call v334 → v393 #5

Updates the code of an existing contract to a different code hash (admin only).

Emits: ContractCodeUpdated Modifies: ContractInfoOf, CodeInfoOf
AdminContracts
StateChangeDenied error v334 → v393 #23

A contract attempted to modify state while in read-only mode.

StorageDepositLimitExhausted error v334 → v393 #25

The storage deposit limit for this call was exceeded.

StorageDepositNotEnoughFunds error v334 → v393 #24

Insufficient funds for storage deposit.

StorageDepositTransferredAndHeld event v334 → v393 #8

Emitted when storage deposit is transferred and held by the contract system.

Emitted by: call, instantiate +1 Modifies: CodeInfoOf, ContractInfoOf +2
SystemContractsTransfers
StorageDepositTransferredAndReleased event v334 → v393 #9

Emitted when a storage deposit is refunded due to storage cleanup.

Emitted by: call Modifies: ContractInfoOf
SystemContractsTransfers
Terminated event v334 → v393 #1

Emitted when a contract is terminated and removed from the chain.

SystemContracts
TerminatedInConstructor error v334 → v393 #21

Contract tried to self-destruct in its constructor.

TerminatedWhileReentrant error v334 → v393 #14

Contract was terminated during a reentrant call.

TooManyTopics error v334 → v393 #17

Too many topics were provided for an event.

TransferFailed error v334 → v393 #4

A value transfer within the contract failed.

UnsafeUnstableInterface constant v334 → v393

Whether unstable/experimental host functions are available.

upload_code call v334 → v393 #3

Uploads WASM contract code without instantiating a contract.

Emits: CodeStored Modifies: PristineCode, CodeInfoOf
SystemContracts
ValueTooLarge error v334 → v393 #13

The value being transferred is too large.

XCMDecodeFailed error v334 → v393 #19

Failed to decode the XCM program.

Related Pallets