compile_time¶
- CreateNewEvent(arguments: List[Tuple[str, type]] = [], event_name: str = '') → boa3.builtin.type.Event¶
Creates a new event.
- public(name: Optional[str] = None, safe: bool = True, *args, **kwargs)¶
This decorator identifies which methods should be included in the abi file.
- metadata(*args)¶
This decorator identifies the function that returns the metadata object of the smart contract. This can be used to only one function. Using this decorator in multiple functions will raise a compiler error.
- contract(script_hash: Union[str, bytes])¶
This decorator identifies a class that should be interpreted as an interface to an existing contract.
- display_name(name: str)¶
This decorator identifies which methods from a contract interface should have a different identifier from the one interfacing it. It only works in contract interface classes.
- Parameters
name (str) – Method identifier from the contract manifest.
- class NeoMetadata¶
Bases:
object
This class stores the smart contract manifest information.
- Variables
name – the smart contract name. Will be the name of the file by default;
supported_standards (List[str]) – Neo standards supported by this smart contract. Empty by default;
permissions (List[str]) – a list of contracts and methods that this smart contract permits to invoke and call. All contracts and methods permitted by default;
trusts (List[str]) – a list of contracts that this smart contract trust. Empty by default;
author (str or None) – the smart contract author. None by default;
email (str or None) – the smart contract author email. None by default;
description (str or None) – the smart contract description. None by default;
- property extras: Dict[str, Any]¶
Gets the metadata extra information.
- Returns
a dictionary that maps each extra value with its name. Empty by default
- add_trusted_source(hash_or_address: str)¶
Adds a valid contract hash, valid group public key, or the ‘*’ wildcard to trusts.
- Parameters
hash_or_address (str) – a contract hash, group public key or ‘*’
- add_group(pub_key: str, signature: str)¶
Adds a pair of public key and signature to the groups in the manifest.
- add_permission(*, contract: str = '*', methods: Union[List[str], str] = '*')¶
Adds a valid contract and a valid methods to the permissions in the manifest.