-
Notifications
You must be signed in to change notification settings - Fork 2
Deployment scripts changes for localnet testing in fast-bridge-service #60
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
8
commits into
master
Choose a base branch
from
utilize-localnet
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 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e9d649e
WIP: Added deployment scripts for eth-fastBrdige localnet testing
UrAvgDeveloper 8d86935
changed deployment script for localnet test
UrAvgDeveloper 1e265d5
Made eth-erc20 fastBridge deployment scripts as hardhat-task
UrAvgDeveloper 4ec9dbe
minor modification
UrAvgDeveloper 017dee8
Minor changes
UrAvgDeveloper 8694edc
added task to fetch block_hash for localnet testing
UrAvgDeveloper 5b005e1
modified variable name
UrAvgDeveloper 1436fac
resolve PR comments
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,4 +56,5 @@ __pycache__ | |
# Flatten script input | ||
json_inputs | ||
|
||
|
||
# local openzeppelin config | ||
.openzeppelin/unknown-31337.json |
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 |
---|---|---|
|
@@ -169,4 +169,4 @@ | |
} | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
const { ethers, upgrades } = require("hardhat"); | ||
const provider = new ethers.providers.JsonRpcProvider("HTTP://127.0.0.1:8545"); | ||
|
||
async function bridge_deployment_task() { | ||
const usdcDecimals = 6; | ||
const [bridge_deployer, token_deployer] = await ethers.getSigners(); | ||
const tokenInstance = (await ethers.getContractFactory("TestToken")).connect(token_deployer); | ||
let MockToken = await tokenInstance.deploy(usdcDecimals, "TEST_TOKEN", "MT"); | ||
await MockToken.deployed(); | ||
|
||
const bridge = (await ethers.getContractFactory("EthErc20FastBridge")).connect(bridge_deployer); | ||
let proxy = await upgrades.deployProxy(bridge, [[MockToken.address], [true]], { | ||
unsafeAllow: ["delegatecall"] | ||
}); | ||
await proxy.deployed(); | ||
|
||
const bridge_implementation_address = await upgrades.erc1967.getImplementationAddress(proxy.address); | ||
console.log("Deployment is completed."); | ||
console.log("Proxy FastBridge Deployed at: ", proxy.address); | ||
console.log("FastBridge Implemenation Address: ", bridge_implementation_address); | ||
console.log("Proxy FastBridge Deployed by address: ", bridge_deployer.address); | ||
console.log("Token Address: ", MockToken.address); | ||
console.log("Mock Token deployed by address: ", token_deployer.address); | ||
} | ||
|
||
async function getBlockHash(blockNumber) { | ||
const block = await provider.getBlock(blockNumber); | ||
console.log("BLOCK Hash is: ", block.hash); | ||
} | ||
|
||
module.exports = { bridge_deployment_task, getBlockHash }; |
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,11 @@ | ||
{ | ||
|
||
"tokens": { | ||
"USDC": "0xb2d75C5a142A68BDA438e6a318C7FBB2242f9693", | ||
"ETH": "0x0000000000000000000000000000000000000000" | ||
}, | ||
"whitelisted_tokens": { | ||
"USDC": true, | ||
"ETH": true | ||
} | ||
|
||
} |
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.
Better rename
deploy_bridge_Eth.js
to something likedeploy_fastbridge_and_token.js
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.
Updated in 1436fac