Solidity ABI
The Solidity ABI is declared in the contract's manifest file (i.e. the Cargo.toml
file)
as follows:
[package.metadata.ink-lang]
abi = "sol"
When the Solidity ABI is specified, the ink! code generator follows the Solidity ABI specification. This means:
- Message selectors are always generated according to the Solidity ABI specification for function selectors.
- Message selector manual overrides using the
selector
attribute are ignored. - Solidity ABI encoding is used for input/output encoding/decoding.
- Call builders are generated for Solidity ABI calling conventions.
note
The Solidity ABI specification can only be used if all constructor and message argument and return types, and event argument types can be mapped to equivalent Solidity ABI types (more details here).
info
The contract ABI only describes how external interactions with a contract are encoded/decoded. The internal storage representation of a contract is still done in the SCALE codec!
Using the Solidity ABI does not imply switching to a different storage layout!