π¨βπ»How to use the libraries
Deployments
List of deployed Registries per network can be found here.
Installation
npm i @zero-labs/smart-contractsSetup
import { CertificateContracts } from '@zero-labs/smart-contracts';
...
const provider = new providers.JsonRpcProvider('https://volta-rpc.energyweb.org'); // Replace with your RPC node of choice
const signer = new Wallet('0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1', provider); // Replace with your private key for deployment
const certificateContracts = new CertificateContracts(signer);
await certificateContracts.deploy(
1 // (OPTIONAL): Replace with your desired topic of choice, otherwise the next available topic will be assigned to you
);
const {
registry, // Registry smart contract
batches, // Batches smart contract
topic // Topic under which the certificates would be minted
} = certificateContracts; Usage
Creating an empty batch
Setting an redemption statement for a batch
Minting tokens
Transferring the tokens
Claiming the tokens
Last updated