A Starknet contract can be created by annotating a Cairo module with the #[starknet::contract]
attribute.
Starknet contract don't require a main
function.
Functions in the contract module may be annotated as #[external(v0)]
function. External functions can be called by the users of Starknet, and by other contracts.
The functions outside of these blocks are internal and cannot be accessed by users nor by other contract.
Functions in starknet contract have to explicitly define when writing to storage or reading from storage, by specifying the ref self:ContractState
when writing to storage or self:@ContractState
when reading from state.