Instantiation
Types of contract access
There are 2 types of contract access
Write - Instantiate a contract with a signer/executor. You can broadcast transactions and read contract's tables
Read only - Instantiate a contract without a signer/executor. You can only read the contract's tables
In the case of local development a default signer/executor is set to eosio account for you
In the case of non-local development, default signer is undefined
fromFile(abi/abiPath, contractName, ?executor)
You can provide the ABI in two ways
The whole ABI
The ABI path
Defaults/Optionals:
executor - Default account
If you don't provide CONTRACT_EXECUTOR
the provider default account will be applied as executor
at(contractName, ?executor)
This function is useful when you want to read the ABI from the blockchain instead of providing it as a path
Defaults/Optionals:
executor - Default account
If you don't provide CONTRACT_EXECUTOR
the provider default account will be applied as executor
Events
init
You can process some logic every time a new contract is instantiated.
Last updated