Skip to content

Commit

Permalink
add more documentation (#166)
Browse files Browse the repository at this point in the history
* making a mess

* working id system to map a removal to its tokenid

* terminology

* linting

* probably nothing

* restore listing in 0deploy

* removal can list while minting, update tests

* .json

* check parcelid and vintage lengths for tokenId retrieval func

* remove dupe vintage decl

* .jsons

* lint Removal.sol

* catch em all

* checkpoint

* add latest tests without legacy contracts; add docs

Co-authored-by: amiecorso <[email protected]>
Co-authored-by: Amie <[email protected]>
  • Loading branch information
3 people authored Feb 11, 2022
1 parent 8b105d8 commit 4776633
Show file tree
Hide file tree
Showing 56 changed files with 2,236 additions and 2,908 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ artifacts/*
!artifacts/contracts
.openzeppelin/unknown-*.json
!.openzeppelin/unknown-80001.json
docs

# typechain
typechain-types
8 changes: 1 addition & 7 deletions .openzeppelin/kovan.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,6 @@
"label": "______gap",
"type": "t_array(t_uint256)50_storage",
"src": "@openzeppelin/contracts-ethereum-package/contracts/token/ERC721/ERC721Pausable.sol"
},
{
"contract": "NCCR_V0",
"label": "_tokenData",
"type": "t_mapping(unknown,t_string)",
"src": "contracts/NCCR_V0.sol"
}
],
"types": {
Expand Down Expand Up @@ -405,4 +399,4 @@
"admin": {
"address": "0x7744b57884c6A847970Dd84fF61d373469fED911"
}
}
}
8 changes: 1 addition & 7 deletions .openzeppelin/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,6 @@
"label": "______gap",
"type": "t_array(t_uint256)50_storage",
"src": "@openzeppelin/contracts-ethereum-package/contracts/token/ERC721/ERC721Pausable.sol"
},
{
"contract": "NCCR_V0",
"label": "_tokenData",
"type": "t_mapping(unknown,t_string)",
"src": "contracts/NCCR_V0.sol"
}
],
"types": {
Expand Down Expand Up @@ -405,4 +399,4 @@
"admin": {
"address": "0x4555cE4ef3F7DAEEC9535914b58e9b3C712D5612"
}
}
}
8 changes: 1 addition & 7 deletions .openzeppelin/ropsten.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,6 @@
"label": "______gap",
"type": "t_array(t_uint256)50_storage",
"src": "@openzeppelin/contracts-ethereum-package/contracts/token/ERC721/ERC721Pausable.sol"
},
{
"contract": "NCCR_V0",
"label": "_tokenData",
"type": "t_mapping(unknown,t_string)",
"src": "contracts/NCCR_V0.sol"
}
],
"types": {
Expand Down Expand Up @@ -405,4 +399,4 @@
"admin": {
"address": "0xC851841BD41DB21C81a69D07Af79238C3f0a158F"
}
}
}
6 changes: 0 additions & 6 deletions .openzeppelin/unknown-80001.json
Original file line number Diff line number Diff line change
Expand Up @@ -1094,12 +1094,6 @@
"label": "______gap",
"type": "t_array(t_uint256)50_storage",
"src": "@openzeppelin/contracts-ethereum-package/contracts/token/ERC721/ERC721Pausable.sol:29"
},
{
"contract": "NCCR_V0",
"label": "_tokenData",
"type": "t_mapping(t_uint256,t_string_storage)",
"src": "contracts/NCCR_V0.sol:11"
}
],
"types": {
Expand Down
36 changes: 25 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
# About

The Ethereum smart contracts that power nori.com
The Ethereum smart contracts that power [nori](https://nori.com)

---

## Local Development
## Development

### Deploying to a local testnet

Deploy to hardhat using:

```
hardhat node
```

---

## Testing

Run tests with:

```
yarn test
```

## Reporting gas usage
### Reporting gas usage from tests

Note that gas reporting is disabled by default because it slows tests down significantly.

First, set REPORT_GAS and COINMARKETCAP_API_KEY environment variables.
First, set `REPORT_GAS` and `COINMARKETCAP_API_KEY` environment variables.

Then, in a first terminal, run the following:

Expand All @@ -40,6 +46,8 @@ REPORT_GAS=true hardhat test --network localhost

## Hardhat Tasks

### Interact with contracts

https://hardhat.org/guides/create-task.html
Custom hardhat tasks have been implemented that allow for calling any function (read or write) on the existing contracts.

Expand All @@ -53,20 +61,26 @@ Example: mints 1 NORI on mumbai to given address
hardhat NORI --func mint "0x321af43416f670ce8b4ba214dfb87c4199e2a77f" 1000000000000000000 "0x" "0x" --network mumbai
```

### Generate docs

Generate docs using

```
hardhat docgen
```

---

## Contracts

### Upgradeability

Contracts in this repo use the [OpenZeppelin Upgrades Plugin](https://docs.openzeppelin.com/upgrades-plugins/1.x/) to manage upgradeability

---

## Additional tooling notes

## CLI
### CLI

Install hardhat [shorthand and autocomplete](https://hardhat.org/guides/shorthand.html)

### IDE support

#### Solidity linting via Solium

If you are using vscode, use the [solidity plugin](https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity) and set the following user setting: `"solidity.linter": "solium",`
4 changes: 2 additions & 2 deletions artifacts/contracts/Certificate.sol/Certificate.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions artifacts/contracts/FIFOMarket.sol/FIFOMarket.json

Large diffs are not rendered by default.

135 changes: 10 additions & 125 deletions artifacts/contracts/LockedNORI.sol/LockedNORI.json

Large diffs are not rendered by default.

Loading

0 comments on commit 4776633

Please sign in to comment.