-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gabriel
committed
May 31, 2021
1 parent
619784d
commit d5df3ed
Showing
9 changed files
with
7,907 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# network specific node uri : `"ETH_NODE_URI_" + networkName.toUpperCase()` | ||
ETH_NODE_URI_MAINNET=https://mainnet.eth.aragon.network | ||
ETH_NODE_URI_RINKEBY=https://rinkeby.eth.aragon.network | ||
|
||
# generic node uri (if no specific found) : | ||
ETH_NODE_URI=https://{{networkName}}.infura.io/v3/<apiKey> | ||
|
||
# network specific mnemonic : `"MNEMONIC_ " + networkName.toUpperCase()` | ||
MNEMONIC_MAINNET=<mnemonic for mainnet> | ||
# generic mnemonic (if no specific found): | ||
MNEMONIC=<mnemonic> | ||
|
||
# pinata pinning service keys | ||
PINATA_KEY= | ||
PINATA_SECRET_KEY= |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
node_modules | ||
artifacts | ||
.cache | ||
cache | ||
artifacts | ||
dist | ||
ipfs.cmd | ||
package-lock.json | ||
.DS_STORE | ||
coverage.json | ||
coverage | ||
.env | ||
.DS_STORE |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
require("dotenv").config(); | ||
|
||
require("@1hive/hardhat-aragon"); | ||
require("@nomiclabs/hardhat-ethers"); | ||
require("@nomiclabs/hardhat-truffle5"); | ||
require("@nomiclabs/hardhat-web3"); | ||
require("hardhat-deploy"); | ||
require("hardhat-gas-reporter"); | ||
require("solidity-coverage"); | ||
|
||
const { node_url, accounts } = require("./utils/network"); | ||
|
||
process.removeAllListeners("warning"); | ||
module.exports = { | ||
solidity: { | ||
version: "0.4.24", | ||
settings: { | ||
optimizer: { | ||
enabled: true, | ||
runs: 10000, | ||
}, | ||
}, | ||
}, | ||
aragon: { | ||
appEnsName: "dcl-list22.open.aragonpm.eth", | ||
appContractName: "ListApp", | ||
appRoles: [ | ||
{ | ||
name: "Add an item to the list", | ||
id: "ADD_ROLE", | ||
params: [], | ||
}, | ||
{ | ||
name: "Remove an item from the list", | ||
id: "REMOVE_ROLE", | ||
params: [], | ||
}, | ||
], | ||
}, | ||
networks: { | ||
hardhat: { | ||
// process.env.HARDHAT_FORK will specify the network that the fork is made from. | ||
// this line ensure the use of the corresponding accounts | ||
accounts: accounts(process.env.HARDHAT_FORK), | ||
forking: process.env.HARDHAT_FORK | ||
? { | ||
url: node_url(process.env.HARDHAT_FORK), | ||
blockNumber: process.env.HARDHAT_FORK_NUMBER | ||
? parseInt(process.env.HARDHAT_FORK_NUMBER) | ||
: undefined, | ||
} | ||
: undefined, | ||
}, | ||
localhost: { | ||
url: node_url("localhost"), | ||
accounts: accounts(), | ||
ensRegistry: "0x4E065c622d584Fbe5D9078C3081840155FA69581", | ||
}, | ||
mainnet: { | ||
url: node_url("mainnet"), | ||
accounts: accounts("mainnet"), | ||
}, | ||
rinkeby: { | ||
url: node_url("rinkeby"), | ||
accounts: accounts("rinkeby"), | ||
ensRegistry: "0x98Df287B6C145399Aaa709692c8D308357bC085D", | ||
}, | ||
ropsten: { | ||
url: node_url("ropsten"), | ||
accounts: accounts("ropsten"), | ||
ensRegistry: "0x6afe2cacee211ea9179992f89dc61ff25c61e923", | ||
}, | ||
xdai: { | ||
url: node_url("xdai"), | ||
accounts: accounts("xdai"), | ||
ensRegistry: "0xaafca6b0c89521752e559650206d7c925fd0e530", | ||
}, | ||
polygon: { | ||
url: node_url("polygon"), | ||
accounts: accounts("polygon"), | ||
ensRegistry: "0x4E065c622d584Fbe5D9078C3081840155FA69581", | ||
}, | ||
frame: { | ||
url: "http://localhost:1248", | ||
httpHeaders: { origin: "hardhat" }, | ||
}, | ||
}, | ||
ipfs: { | ||
pinata: { | ||
key: process.env.PINATA_KEY || "", | ||
secret: process.env.PINATA_SECRET_KEY || "", | ||
}, | ||
}, | ||
gasReporter: { | ||
enabled: process.env.REPORT_GAS ? true : false, | ||
}, | ||
mocha: { | ||
timeout: 0, | ||
}, | ||
external: process.env.HARDHAT_FORK | ||
? { | ||
contracts: [ | ||
{ | ||
artifacts: "node_modules/@aragon/os/build/contracts", | ||
}, | ||
], | ||
deployments: { | ||
// process.env.HARDHAT_FORK will specify the network that the fork is made from. | ||
// these lines allow it to fetch the deployments from the network being forked from both for node and deploy task | ||
hardhat: ["deployments/" + process.env.HARDHAT_FORK], | ||
localhost: ["deployments/" + process.env.HARDHAT_FORK], | ||
}, | ||
} | ||
: { | ||
contracts: [ | ||
{ | ||
artifacts: "node_modules/@aragon/os/build/contracts", | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
require("dotenv").config(); | ||
|
||
function node_url(networkName) { | ||
if (networkName) { | ||
const uri = process.env["ETH_NODE_URI_" + networkName.toUpperCase()]; | ||
if (uri && uri !== "") { | ||
return uri; | ||
} | ||
} | ||
|
||
if (networkName === "localhost") { | ||
// do not use ETH_NODE_URI | ||
return "http://localhost:8545"; | ||
} | ||
|
||
let uri = process.env.ETH_NODE_URI; | ||
if (uri) { | ||
uri = uri.replace("{{networkName}}", networkName); | ||
} | ||
if (!uri || uri === "") { | ||
// throw new Error(`environment variable "ETH_NODE_URI" not configured `); | ||
return ""; | ||
} | ||
if (uri.indexOf("{{") >= 0) { | ||
throw new Error( | ||
`invalid uri or network not supported by node provider : ${uri}` | ||
); | ||
} | ||
return uri; | ||
} | ||
|
||
function getMnemonic(networkName) { | ||
if (networkName) { | ||
const mnemonic = process.env["MNEMONIC_" + networkName.toUpperCase()]; | ||
if (mnemonic && mnemonic !== "") { | ||
return mnemonic; | ||
} | ||
} | ||
|
||
const mnemonic = process.env.MNEMONIC; | ||
if (!mnemonic || mnemonic === "") { | ||
return "test test test test test test test test test test test junk"; | ||
} | ||
return mnemonic; | ||
} | ||
|
||
function accounts(networkName) { | ||
return { mnemonic: getMnemonic(networkName) }; | ||
} | ||
|
||
module.exports = { | ||
accounts, | ||
node_url, | ||
}; |
Oops, something went wrong.