Skip to main content

Extensions

Each extension (i.e. Solidity interface) that your smart contract implements unlocks new functionality for you to use in the SDK. For example, NFT collection smart contracts implements the ERC721 extension, allowing you can to use the ERC721 extension in the SDK when interacting with that contract.

These extension interfaces are available for the most common EIP standards, including support for ERC20, ERC721, ERC1155, permissions, metadata, and more. They handle the pre-processing of calling the smart contract functions for you, such as checking for token approval, uploading metadata to IPFS, formatting inputs, etc. Making your code safer and easier to write.

For interacting with non-standard smart contracts, the call function can be used to call any function on the contract.

MyContract.sol
contract MyContract is 
ERC721,
IERC721Mintable {
// ...
}
MyApp.js
const MyApp = () => {
// ERC721 -> ".erc721"
// IERC721Mintable -> ".mint"
const tx = await contract.erc721.mint({...})
}

Example: the "mint" function above uploads and pins your NFT metadata to IPFS for you before minting.

Supported Extensions

View the full list of supported extensions in the ContractKit Extensions Documentation (TODO).