This page will answer a number of common questions you may have when starting to build smart contracts with Substrate.
What is the difference between memory and storage?
In ink! we refer
memory to being the computer memory that is commonly known to programmers while
storage we refer to the contract instance's memory. The
storage is backed up by the runtime
in a database. Accesses to it are considered to be slow.
How do I run tests?
When building a smart contract with ink, you can define a set of tests.
For example, in the minimal flipper contract, you can find a small test at the bottom of the contract.
To run this test, type the following command:
cargo +nightly test
How do I add the Contracts pallet to my custom chain?
You can follow our guide here for instructions to add the Contracts pallet and other FRAME pallets to your blockchain runtime.