init project

This commit is contained in:
Drygin 2022-01-27 14:51:34 +03:00
parent f45d491346
commit 55c990759d
7 changed files with 10317 additions and 1 deletions

4
.env.example Normal file
View File

@ -0,0 +1,4 @@
ETHERSCAN_KEY=
MORALIS_API_KEY=
ALCHEMY_KEY=
PRIVATE_KEY=

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
node_modules/
.vscode/
.env
cache
artifacts

View File

@ -1 +1,30 @@
# nova-upgrade-proposal # Nova upgrade proposal
There is Tornado governance proposal for upgrade nova contract on Xdai chain.
## Tests
1. Install dependencies:
```
yarn install
```
2. Create `.env` file with actual values from `.env.sample`.
3. Run tests:
```
yarn test
```
4. Run linter:
```
yarn lint
```
## Deploy
1. Check `config.json` for actual values.
2. Run deploy:
```
npx hardhat run scripts/deploy.js --network <network-name>
```

10
config.json Normal file
View File

@ -0,0 +1,10 @@
{
"snapshotBlockNumber": 13685625,
"novaProxy": "0xD692Fd2D0b2Fbd2e52CFa5B5b9424bC981C30696",
"newNovaImpl": "TODO",
"ethAmbBridge": "0x75df5af045d91108662d8080fd1fefad6aa0bb59",
"gasLimit": 200000,
"singletonFactory": "0xce0042B868300000d44A59004Da54A005ffdcf9f",
"singletonFactoryVerboseWrapper": "0xCEe71753C9820f063b38FDbE4cFDAf1d3D928A80",
"salt": "0x746f726e61646f00000000000000000000000000000000000000000000000000"
}

43
hardhat.config.js Normal file
View File

@ -0,0 +1,43 @@
require('@nomiclabs/hardhat-waffle')
require('@nomiclabs/hardhat-etherscan')
require('solidity-coverage')
require('dotenv').config()
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
version: '0.6.12',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
networks: {
rinkeby: {
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: [`0x${process.env.PRIVATE_KEY}`],
},
ropsten: {
url: `https://ropsten.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: [`0x${process.env.PRIVATE_KEY}`],
},
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: [`0x${process.env.PRIVATE_KEY}`],
},
bsc_testnet: {
url: `https://speedy-nodes-nyc.moralis.io/${process.env.MORALIS_API_KEY}/bsc/testnet`,
accounts: [`0x${process.env.PRIVATE_KEY}`],
gasPrice: 10 * 1000000000,
},
bsc_mainnet: {
url: `https://speedy-nodes-nyc.moralis.io/${process.env.MORALIS_API_KEY}/bsc/mainnet`,
accounts: [`0x${process.env.PRIVATE_KEY}`],
gasPrice: 5 * 1000000000,
},
}
}

49
package.json Normal file
View File

@ -0,0 +1,49 @@
{
"name": "nova-upgrade-proposal",
"version": "1.0.0",
"description": "Nova upgrade proposal",
"main": "index.js",
"scripts": {
"eslint": "eslint --ext .js --ignore-path .gitignore .",
"prettier:check": "prettier --check . --config .prettierrc",
"prettier:fix": "prettier --write . --config .prettierrc",
"lint": "yarn eslint && yarn prettier:check",
"test": "yarn hardhat test",
"build": "yarn hardhat compile",
"compile": "yarn prettier:fix && yarn hardhat compile",
"clean": "yarn prettier:fix && yarn lint",
"coverage": "yarn hardhat coverage --testfiles \"test/*.test.js\"",
"deploy": "yarn hardhat run scripts/deploy.js"
},
"repository": "https://github.com/tornadocash/nova-upgrade-proposal",
"author": "Drygin <DryginAlexander@gmail.com>",
"license": "MIT",
"dependencies": {
"ethereum-waffle": "^3.4.0",
"ethers": "^5.5.1",
"tornado-governance": "2.0.0"
},
"devDependencies": {
"@ethersproject/testcases": "^5.4.0",
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-etherscan": "^2.1.6",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"babel-eslint": "^10.1.0",
"chai": "^4.3.4",
"coveralls": "^3.1.1",
"dotenv": "^10.0.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"hardhat": "^2.8.2",
"hardhat-contract-sizer": "^2.0.3",
"hardhat-log-remover": "^2.0.2",
"hardhat-spdx-license-identifier": "^2.0.3",
"hardhat-storage-layout": "^0.1.6",
"mocha-lcov-reporter": "^1.3.0",
"prettier": "^2.3.2",
"prettier-plugin-solidity": "^1.0.0-beta.17",
"solhint-plugin-prettier": "^0.0.5",
"solidity-coverage": "^0.7.17"
}
}

10176
yarn.lock Normal file

File diff suppressed because it is too large Load Diff