- check_witness(hash_or_pubkey: Union[UInt160, ECPoint]) bool
Verifies that the transactions or block of the calling contract has validated the required script hash.
- notify(state: Any, notification_name: Optional[str] = None)
Notifies the client from the executing smart contract.
state (Any) – the notification message
notification_name (str) – name that’ll be linked to the notification
- log(message: str)
Show log messages to the client from the executing smart contract.
message (str) – the log message
- get_trigger() TriggerType
Return the smart contract trigger type.
a value that represents the contract trigger type
- Return type
- get_notifications(script_hash: UInt160 = b'') List[Notification]
This method gets current invocation notifications from specific ‘script_hash’.
- get_network() int
Gets the magic number of the current network.
the magic number of the current network
- Return type
- burn_gas(gas: int)
Burns GAS to benefit the NEO ecosystem.
- invocation_counter: int
Gets the number of times the current contract has been called during the execution.
- class TriggerType(value)
Represents the triggers for running smart contracts. Triggers enable the contract to execute different logic under different usage scenarios.
Indicate that the contract is triggered by the system to execute the OnPersist method of the native contracts.
Indicate that the contract is triggered by the system to execute the PostPersist method of the native contracts.
The combination of all system triggers.
Indicates that the contract is triggered by the verification of a IVerifiable.
Indicates that the contract is triggered by the execution of transactions.
The combination of all triggers.