In this exercise, the entry point may only be called by the
admin address; it also requires:
- that the argument value
vbe between 10 (included) and 20 (strictly)
- be even
If not even, it must fail with this following message :
Expected even value:
It is also possible to establish execution conditions with a
Execution conditions have identifiers (here
r2) used for fail message when no
otherwise is established, and to name the property in contract formal verification.
One of the key requirements of a smart contract's entry point is to establish execution conditions:
- Who can call the contract?
- Under which logical conditions?
Archetype provides dedicated syntax to make execution conditions very explicit and non ambiguous.
The following Completium CLI command deploys the contract on the Tezos network:
The following command calls the unique entry point with the argument
14 using the
The following command generates the URL to view the contract in Better call Dev:
Open '3-rat_transfer.arl' and click on "Next: Rationals & transfers" below.