cns-contracts
The source code of CoreID Name Domain Contracts.
npm package
This repo doubles as an npm package with the compiled JSON contracts
import {
CNS,
BaseRegistrarImplementation,
Web3RegistrarController,
PublicResolver,
ReverseRegistrar,
NameWrapper,
} from '@web3identity/cns-contracts'
Importing from solidity
// Registry
import '@web3identity/cns-contracts/contracts/cns/CNS.sol';
Accessing to binary file
If your environment does not have compiler, you can access to the raw hardhat artifacts files at node_modules/@web3identity/cns-contracts/artifacts/contracts/${modName}/${contractName}.sol/${contractName}.json
Contracts
Registry
The Registry contract is same with ENSRegistry.sol
.
Contributing
Install
yarn
Build
npm run build
Add config file
cp .env.example .env
Then edit .env
file. Set PRIVATE_KEY
to your private key.