-
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
Open
UrAvgDeveloper
wants to merge
9
commits into
master
Choose a base branch
from
fix-hardhat-scripts
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
29580e1
resolved issue and updated readme
UrAvgDeveloper 4d65d09
Update README.md
UrAvgDeveloper 74d729c
Apply suggestions from code review
sept-en a01bdd0
resolved PR comments
UrAvgDeveloper 058b711
Update README.md
UrAvgDeveloper 9134581
updated verify address command
UrAvgDeveloper ffcd66d
fix README
olga24912 89f9536
resolved comment
UrAvgDeveloper 7426ef7
resolved comment
UrAvgDeveloper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 contains hidden or 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 contains hidden or 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 contains hidden or 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
31 changes: 4 additions & 27 deletions
31
eth/scripts/EthErc20FastBridge/deploy_and_verify_bridge.js
This file contains hidden or 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 contains hidden or 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 contains hidden or 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 contains hidden or 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,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.
|
||
| } | ||
|
|
||
| main().catch((error) => { | ||
| console.error(error); | ||
| process.exitCode = 1; | ||
| }); | ||
|
|
||
| exports.verifyBridge = main | ||
11 changes: 1 addition & 10 deletions
11
...pts/EthErc20FastBridge/whitelistTokens.js → ...ts/EthErc20FastBridge/whitelist_tokens.js
This file contains hidden or 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 contains hidden or 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 contains hidden or 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 contains hidden or 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
20 changes: 20 additions & 0 deletions
20
eth/scripts/deployment/deploy_testnet_bridge_with_test_tokens.js
This file contains hidden or 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,20 @@ | ||
| const { ethers } = require("hardhat"); | ||
| const {deployBridge} = require("./deploy-bridge"); | ||
| const {deployTestToken} = require("./deploy-test-tokens"); | ||
|
|
||
| const main = async () => { | ||
| const chainID = (await ethers.provider.getNetwork()).chainId; | ||
| if (chainID == 1){ | ||
| console.log("deploying test tokens only available for testnets!!!"); | ||
| return; | ||
| } | ||
| 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; | ||
| }); |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
but I see your contract is verified :(
https://goerli.etherscan.io/address/0xdEeDfE06F6331ff22FfB9BC5647CB5cDddB7f309#code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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?