Skip to main content
Version: v6
Attention!You are viewing unreleased ink! 6 docs. Click here to view the latest docs.

Metadata Title Picture

Solidity & MetaMask Compatibility

caution

This page has not yet been written for ink! v6.

TODO @davidsemakula

With ink! v6, we have introduced a new attribute abi for the #[ink::contract] macro. It allows building your contract in Solidity-compatibility mode (more details here.

The implication of supporting Solidity ABI encoding is that there is a restriction on the types you can use as constructor/message arguments or return types. You won't be able to use Rust types for which no mapping to a Solidity type exists. An error about a missing trait implementation for this type will be thrown.

Please note that your contract sizes will get larger if you support both the ink! and Solidity ABI.

MetaMask

Hardhat, Foundry, etc.

Block explorers