Anatomy of a Smart Contract
Each smart contract instance has a program with a collection of entry points and a state.
Each smart contract instance has a program with a collection of entry points and a state.
The code generated for Funcs will be able to inspect and modify the smart contract state, whereas the code generated for Views will only be able to inspect the state.
The smart contract state storage on the host consists of a single key/value map, as long as you access the data in the same way that you used to store it, you will always get valid data back.
What happens when a smart contract invocation fails?
The state of the chain consists of balances of native IOTA digital assets and a collection of key/value pairs which represents use case-specific data stored in the chain by its smart contracts outside the UTXO ledger.
You can use structs directly as a type in state storage definitions and the schema tool will automatically generate the proxy code to access it properly.