https://github.com/renproject/darknode-sol
An implementation of Darknode smart contracts, written in Solidity
https://github.com/renproject/darknode-sol
Last synced: about 1 year ago
JSON representation
An implementation of Darknode smart contracts, written in Solidity
- Host: GitHub
- URL: https://github.com/renproject/darknode-sol
- Owner: renproject
- License: gpl-3.0
- Created: 2018-01-02T01:40:17.000Z (over 8 years ago)
- Default Branch: mainnet
- Last Pushed: 2023-01-23T22:39:05.000Z (over 3 years ago)
- Last Synced: 2024-11-08T10:12:47.840Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://renproject.io
- Size: 13 MB
- Stars: 86
- Watchers: 19
- Forks: 28
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `⚖️ darknode-sol`
## Ethereum smart contracts for managing darknodes
[](https://circleci.com/gh/renproject/darknode-sol)
[](https://coveralls.io/github/renproject/darknode-sol?branch=master)
Ren has two repositories for its Solidity contract:
- `darknode-sol` (this repository) - contracts on Ethereum for managing darknode registrations.
- [`gateway-sol`](https://github.com/renproject/gateway-sol) - contracts on multiple EVM chains for minting and burning of ren-assets.
Ren bootstraps off Ethereum to handle the REN token and darknode registrations.
## ~ [Documentation](https://renproject.github.io/ren-client-docs/contracts/) ~
- For the latest contract addresses, see the [contract addresses](https://renproject.github.io/ren-client-docs/contracts/deployments) page.
- For a summary of each contract, see the [summary of contracts](https://renproject.github.io/ren-client-docs/contracts/summary) page.
Development notes
## Tests
Install the dependencies.
```
yarn install
```
Run the `ganache-cli` or an alternate Ethereum test RPC server on port 8545. The `-d` flag will use a deterministic mnemonic for reproducibility.
```sh
yarn ganache-cli -d
```
Run the Truffle test suite.
```sh
yarn run test
```
## Coverage
Run the Truffle test suite with coverage.
```sh
yarn run coverage
```
Open the coverage file.
```sh
open ./coverage/index.html
```
## Deploying
Add a `.env`, filling in the mnemonic and Infura key:
```sh
MNEMONIC_KOVAN="..."
MNEMONIC_MAINNET="..."
INFURA_KEY="..."
```
Deploy to Kovan:
```sh
NETWORK=kovan yarn run deploy
```
See `1_darknodes.js` for additional instructions.
## Verifying Contract Code
Add an Etherscan API key to your `.env`:
```
ETHERSCAN_KEY="..."
```
Run the following (replacing the network and contract name):
```sh
NETWORK=mainnet yarn run verify Contract1 Contract2
```