LACChain DNS is a Decentralized Name Service that helps to maintain a registry of verified entities through a set of certificates issued by Certification Authorities (CA) associated with a DID (ethr). Certificates will be used to register and validate the entity in an Ethereum Smart contract, which we called: DNSRegistry.
LACChain DNS also provides a Decentralized Application (DApp) to control the entities registered in the DNSRegistry (listing, registration and revocation). As well as, a smart contract in solidity, which is based on the OpenZeppelin standard for upgradeable contracts.
Important: The dependency chain for this implementation of onchain permisioning includes web3js which is LGPL licensed.
The LACChain DNS Registry has been deployed in the following addresses.
Network | Address |
---|---|
Pro TestNet (id: 648529) | 0x87570d1Be0174a214465E27D70647a564CaB595c |
MultiLedgers (id: 648539) | 0x1024d31846670b356f952F4c002E3758Ab9c4FFC |
David19 (id: 648530) | Pending to deploy... |
Note: The build process for the Dapp is currently not supported on Windows.
Run yarn install
to initialise project dependencies. This step is only required when setting up project
for the first time.
The DApp will facilitate managing DIDs records and maintaining the list of authorized entities.
- NodeJS v12.4.0
- Run
yarn install
to install dependencies. - Configure environment variables or provide a .env file in the root of this project that configures the following variables
REACT_APP_CONTRACT
: The DNSRegistry contract address
- Run
yarn run start
to start the web server that is serving our Dapp. - The default endpoint of application is http://localhost:3000
- In your browser, connect Metamask to the LACChain network (the default endpoint is
http://35.184.61.29:4545/
) - All changes made to the smart contracts or to the DApp code will be automatically refreshed on the website. There is no need to restart the web server after making changes.
The deployment process covers 5 steps:
- If this is the first time setting up the project, run
yarn install
to initialise project dependencies, otherwise skip this step. - Configure environment variables or provide a .env file in the root of this project that configures the following variables
REACT_APP_CONTRACT
: The DNSRegistry contract address
- With these environment variables provided run
yarn run build
to create a production bundle - Use a webserver of your choice to host the contents of the folder as static files directing root requests to
index.html
This smart contract will serve as a public database to store a list of validated DIDs. The DNS Registry will be public and acceisble from different apps/wallets to verify if a DID is validated. There is also a set of methods to be used with the DApp in this project to manage (create, revoke and enable) the DID List.
Summarizing, this smart contract allows to register, revoke and verify if a DID is been validated.
We are using Openzeppelin Cli to deploy the upgradable smart contract.
This is the easiest way to get started for development with the smart contract:
First, you need to install openzeppelin cli dependencies.
$ npm install --save-dev @openzeppelin/cli
Second, you need to rename truffle-config.js.default to truffle-config.js and modify the file to set the node and private key to deploy the smart contract. Next execute the command to deploy.
$ npx oz deploy
If you need to upgrade the smart contract then execute the following command.
npx oz upgrade
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.