Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop > Main Add goerli testnet for truffle and update Readme #22

Merged
merged 2 commits into from
Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,20 @@
- Solidity - ^0.8.0 (solc-js)
- @OpenZeppelin/contracts@4.3.0
- @truffle/hdwallet-provider

### Truffle deployment

A .env file with following entries is needed for Truffle deployment:

MNEMONIC= # Mnemonic phrase for local Ganache testing
MNEMONIC_DEVNET= # Mnemonic phrase for Devnet
MNEMONIC_TESTNET= # Mnemonic phrase for Testnet
APP_ID= # Infura API key
POLYGONSCAN_API_KEY= # Polygonscan API key
CUSTODIANS_DEVNET= # Comma separated list of initial 10 custodians
CUSTODIANS_TESTNET= # Comma separated list of initial 10 custodians
# Local testing only
CUSTODIANS_LOCAL= # Comma separated list of initial 10 custodians
ORACLE= # Oracle public key used by reg-oracle.js
# Optional if deploying to Goerli Testnet
ETHERSCAN_API_KEY=
2 changes: 1 addition & 1 deletion migrations/2_nft_migration.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = async function (deployer, network) {
await deployer.deploy(FIONFT, custodiansLocal);
} else if (network == "mumbai_devnet") {
await deployer.deploy(FIONFT, custodiansDevnet);
} else if (network == "mumbai_testnet") {
} else if (network == "mumbai_testnet" | network == "goerli_testnet") {
await deployer.deploy(FIONFT, custodiansTestnet);
}
};
20 changes: 14 additions & 6 deletions truffle-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ require('dotenv').config();
const mnemonicDevnet = process.env["MNEMONIC_DEVNET"];
const mnemonicTestnet = process.env["MNEMONIC_TESTNET"];
const appid = process.env["APP_ID"];
const apikey = process.env["POLYGONSCAN_API_KEY"];
const apikeyPoloygonscan = process.env["POLYGONSCAN_API_KEY"];
const apikeyEtherscan = process.env["ETHERSCAN_API_KEY"];

module.exports = {

Expand Down Expand Up @@ -38,9 +39,15 @@ module.exports = {
network_id: 80001,
confirmations: 2,
timeoutBlocks: 50,
skipDryRun: true,
chainId: 80001
}
},
goerli_testnet: {
provider: () => new HDWalletProvider(mnemonicTestnet, 'https://goerli.infura.io/v3/' + appid),
network_id: 5,
gas: 9000000,
confirmations: 2, // # of confs to wait between deployments. (default: 0)
timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
skipDryRun: false // Skip dry run before migrations? (default: false for public nets )
},
},

// Set default mocha options here, use special reporters etc.
Expand All @@ -67,9 +74,10 @@ module.exports = {
enabled: true
},

// Used to automatically verifiy the contract on etherscan
// Used to automatically verifiy the contract
api_keys: {
polygonscan: apikey,
polygonscan: apikeyPoloygonscan,
//etherscan: apikeyEtherscan,
},
plugins: [
'truffle-plugin-verify'
Expand Down