zkEVM Contracts is a library of smart contracts targeted at developers who wish to quickly build and deploy their smart contracts on the Immutable zkEVM, a general-purpose permissionless L2 zero-knowledge rollup. The library allows developers to build on contracts curated by Immutable, including (but not limited to):
-
Token presets, e.g. ERC721
-
Bridging contracts
-
Marketplace and AMM contracts
-
Smart Contract Wallets
These contracts are feature-rich and are the recommended standard on Immutable zkEVM intended for all users and partners within the ecosystem.
$ yarn install @imtbl/zkevm-contracts
Once the zkevm-contracts
package is installed, use the contracts from the library by importing them:
pragma solidity ^0.8.0;
import "@imtbl/zkevm-contracts/contracts/token/erc721/preset/ImmutableERC721.sol";
contract MyERC721 is ImmutableERC721 {
constructor(
address owner,
string memory name,
string memory symbol,
string memory baseURI,
string memory contractURI,
address operatorAllowlist,
address receiver,
uint96 feeNumerator
) ImmutableERC721(
owner,
name,
symbol,
baseURI,
contractURI,
operatorAllowlist,
receiver,
feeNumerator
)
{}
}
zkevm-contracts
comes with a Typescript SDK client that can be used to interface with Immutable preset contracts:
- ImmutableERC721
- ImmutableERC721MintByID
To import and use the ImmutableERC721 contract client:
import { ERC721Client } from "@imtbl/zkevm-contracts";
const contractAddress = YOUR_CONTRACT_ADDRESS;
const client = new ERC721Client(contractAddress);
const mintTransaction = await client.populateMint(receiver, 1);
const tx = await signer.sendTransaction(mintTransaction);
We aim to build robust and feature-rich standards to help all developers onboard and build their projects on Immuable zkEVM, and we welcome any and all feedback and contributions to this repository! See our contribution guideline for more details on opening Github issues, pull requests requesting features, minor security vulnerabilities and providing general feedback.
These contracts are in an experimental stage and are subject to change without notice. The code must still be formally audited or reviewed and may have security vulnerabilities. Do not use it in production. We take no responsibility for your implementation decisions and any security problems you might experience.
We will audit these contracts before our mainnet launch.
Please responsibly disclose any major security issues you find by reaching out to [email protected].
Immutable zkEVM Contracts are released under the Apache-2.0 license. See LICENSE.md for more details.