Skip to content

Commit

Permalink
add contract clients
Browse files Browse the repository at this point in the history
  • Loading branch information
allan-almeida-imtbl committed Sep 25, 2023
1 parent 7c1114e commit bb307eb
Show file tree
Hide file tree
Showing 8 changed files with 1,224 additions and 17 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ typechain
typechain-types
node.json

#Hardhat files
# Hardhat files
cache
artifacts

# Build files
dist/
32 changes: 27 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

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
- Token presets, e.g. ERC721

* Bridging contracts
- Bridging contracts

* Marketplace and AMM contracts
- Marketplace and AMM contracts

* Smart Contract Wallets
- 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.

Expand All @@ -23,6 +23,9 @@ $ npm install @imtbl/zkevm-contracts
```

### Usage

#### Contracts

Once the `zkevm-contracts` package is installed, use the contracts from the library by importing them:

```solidity
Expand Down Expand Up @@ -54,11 +57,30 @@ contract MyERC721 is ImmutableERC721 {
}
```

#### SDK client

`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:

```typescript
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);
```

## Contribution

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](CONTRIBUTING.md) for more details on opening Github issues, pull requests requesting features, minor security vulnerabilities and providing general feedback.


## Disclaimers

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.
Expand Down
Loading

0 comments on commit bb307eb

Please sign in to comment.