-
Notifications
You must be signed in to change notification settings - Fork 2
hardhat script and readme improvements #84
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
base: master
Are you sure you want to change the base?
Changes from 2 commits
29580e1
4d65d09
74d729c
a01bdd0
058b711
9134581
ffcd66d
89f9536
7426ef7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,11 @@ | |
"test:mainnet-fork": "npx hardhat test --network hardhat", | ||
"node": "npx hardhat node", | ||
"dev:size-contracts": "npm run compile-all && npx hardhat size-contracts", | ||
"deploy:all": "npx hardhat run scripts/deployment/", | ||
"deploy:test-tokens": "npm run compile-all && npx hardhat run scripts/deployment/deploy-test-tokens.js --network goerli", | ||
"deploy:all": "npx hardhat run scripts/deployment/ --network", | ||
"deploy:test-tokens": "npm run compile-all && npx hardhat run scripts/deployment/deploy-test-tokens.js --network", | ||
sept-en marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
"deploy:bridge": "npm run compile-all && npx hardhat run scripts/deployment/deploy-bridge.js --network ", | ||
"deploy:verify:bridge": "npm run compile-all && npx hardhat run scripts/EthErc20FastBridge/deploy_and_verify_bridge.js --network", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't work for me:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but I see your contract is verified :( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For me, this function works 50/50. Sometimes it works, but sometimes returns strange errors. Looks like a race condition. Do we really need this function? We already have a command to deploy and verify. I am not sure that it is worth to debug it. What do you think? |
||
"verify:bridge": "npm run compile-all && npx hardhat run scripts/EthErc20FastBridge/verify.js --network", | ||
"upgrade:bridge": "npm run compile-all && npx hardhat run scripts/EthErc20FastBridge/upgrade_bridge.js --network ", | ||
"dev:abi": "npx hardhat clear-abi && npx hardhat export-abi", | ||
"dev:coverage": "npx hardhat coverage", | ||
|
@@ -72,6 +73,7 @@ | |
"mocha": "^10.2.0", | ||
"prettier": "^2.8.1", | ||
"prettier-plugin-solidity": "^1.1.0", | ||
"prompt-sync": "^4.2.0", | ||
"shx": "^0.3.4", | ||
"solc": "0.8.17", | ||
"solhint": "^3.3.7", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const { verify } = require("../utilities/helpers"); | ||
|
||
const main = async () => { | ||
const tokensAddresses = Object.values(require("../deployment/deploymentAddresses.json").tokens); | ||
const whitelistedTokens = Object.values(require("../deployment/deploymentAddresses.json").whitelisted_tokens); | ||
const network = (await ethers.getDefaultProvider().getNetwork()); | ||
const bridgeAddress = require("../deployment/deploymentAddresses.json")[network.name].new.bridge; | ||
|
||
console.log("Verifing Contract"); | ||
await verify(bridgeAddress, [tokensAddresses, whitelistedTokens]); | ||
olga24912 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
main().catch((error) => { | ||
console.error(error); | ||
process.exitCode = 1; | ||
}); | ||
|
||
exports.verifyBridge = main |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const {deployBridge} = require("./deploy-bridge"); | ||
const {deployTestToken} = require("./deploy-test-tokens"); | ||
|
||
const main = async () => { | ||
console.log("deploying test tokens"); | ||
await deployTestToken(); | ||
console.log("deploying bridge with tokens whitelisted"); | ||
await deployBridge(); | ||
} | ||
|
||
main().catch((error) => { | ||
console.error(error); | ||
process.exitCode = 1; | ||
}); | ||
sept-en marked this conversation as resolved.
Show resolved
Hide resolved
|
Uh oh!
There was an error while loading. Please reload this page.