-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrote the project to utilize the Hardhat framework with TS
- Loading branch information
Showing
54 changed files
with
10,966 additions
and
28,196 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
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,12 +1,15 @@ | ||
# Deployer private key | ||
PRIVATE_KEY = "YOUR PRIVATE KEY" | ||
|
||
# RPC Endpoints | ||
INFURA_KEY = "INFURA PROJECT ID" | ||
|
||
# Additional keys | ||
ETHERSCAN_KEY = "ETHERSCAN API KEY" | ||
BSCSCAN_KEY = "BSCSCAN API KEY" | ||
COINMARKETCAP_KEY = "COINMARKETCAP API KEY" | ||
|
||
# Bridge configuration | ||
BRIDGE_OWNER = "bridge contract owner" | ||
BRIDGE_VALIDATORS = "addresses separated by ',' that can sign withdrawals to bridge contract" | ||
BRIDGE_THRESHHOLD = int, number of signatures needed to check withdraw by bridge contract, example: 1 | ||
|
||
# Available targets: 'ethers-v5', 'truffle-v5' and 'web3-v1' | ||
# By default 'ethers-v5' | ||
TYPECHAIN_TARGET = "TYPECHAIN TARGET" |
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,4 +1,5 @@ | ||
{ | ||
"plugins": ["prettier-plugin-solidity"], | ||
"overrides": [ | ||
{ | ||
"files": "*.sol", | ||
|
File renamed without changes.
Empty file.
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 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 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 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 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 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 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 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 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 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,24 @@ | ||
import { Deployer, Reporter } from "@solarity/hardhat-migrate"; | ||
|
||
import { Bridge__factory, ERC1967Proxy__factory } from "@ethers-v6"; | ||
|
||
const OWNER = process.env.BRIDGE_OWNER!; | ||
const validators = process.env.BRIDGE_VALIDATORS!.split(","); | ||
const threshold = parseInt(process.env.BRIDGE_THRESHHOLD!, 10); | ||
|
||
export = async (deployer: Deployer) => { | ||
const bridgeImplementation = await deployer.deploy(Bridge__factory); | ||
const proxy = await deployer.deploy(ERC1967Proxy__factory, [ | ||
await bridgeImplementation.getAddress(), | ||
bridgeImplementation.interface.encodeFunctionData("__Bridge_init", [validators, threshold]), | ||
]); | ||
|
||
const bridge = await deployer.deployed(Bridge__factory, await proxy.getAddress()); | ||
|
||
await bridge.transferOwnership(OWNER); | ||
|
||
Reporter.reportContracts( | ||
["Bridge Implementation", await bridgeImplementation.getAddress()], | ||
["Bridge Proxy", await proxy.getAddress()], | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.