Type Alias ContractsEvent

Source
pub type ContractsEvent = ContractsEvent;

Aliased Type§

pub enum ContractsEvent {
    Instantiated {
        deployer: AccountId,
        contract: AccountId,
    },
    Terminated {
        contract: AccountId,
        beneficiary: AccountId,
    },
    CodeStored {
        code_hash: H256,
    },
    ContractEmitted {
        contract: AccountId,
        data: Vec<u8>,
    },
    CodeRemoved {
        code_hash: H256,
    },
    ContractCodeUpdated {
        contract: AccountId,
        new_code_hash: H256,
        old_code_hash: H256,
    },
    Called {
        caller: AccountId,
        contract: AccountId,
    },
    DelegateCalled {
        contract: AccountId,
        code_hash: H256,
    },
}

Variants§

§

Instantiated

Contract deployed by address at the specified address.

Fields

§deployer: AccountId
§contract: AccountId
§

Terminated

Contract has been removed.

§Note

The only way for a contract to be removed and emitting this event is by calling seal_terminate.

Fields

§contract: AccountId

The contract that was terminated.

§beneficiary: AccountId

The account that received the contracts remaining balance

§

CodeStored

Code with the specified hash has been stored.

Fields

§code_hash: H256
§

ContractEmitted

A custom event emitted by the contract.

Fields

§contract: AccountId

The contract that emitted the event.

§data: Vec<u8>

Data supplied by the contract. Metadata generated during contract compilation is needed to decode it.

§

CodeRemoved

A code with the specified hash was removed.

Fields

§code_hash: H256
§

ContractCodeUpdated

A contract’s code was updated.

Fields

§contract: AccountId

The contract that has been updated.

§new_code_hash: H256

New code hash that was set for the contract.

§old_code_hash: H256

Previous code hash of the contract.

§

Called

A contract was called either by a plain account or another contract.

§Note

Please keep in mind that like all events this is only emitted for successful calls. This is because on failure all storage changes including events are rolled back.

Fields

§caller: AccountId

The account that called the contract.

§contract: AccountId

The contract that was called.

§

DelegateCalled

A contract delegate called a code hash.

§Note

Please keep in mind that like all events this is only emitted for successful calls. This is because on failure all storage changes including events are rolled back.

Fields

§contract: AccountId

The contract that performed the delegate call and hence in whose context the code_hash is executed.

§code_hash: H256

The code hash that was delegate called.