-
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.
Merge pull request #1 from dl-tokene/feature/hardhat-ts
Rewrite the project to utilize the Hardhat framework with TS
- Loading branch information
Showing
59 changed files
with
11,049 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Bug Report | ||
description: File a bug report | ||
labels: ['bug'] | ||
assignees: | ||
- Arvolear | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: Thanks for taking the time to fill out this bug report! | ||
- type: input | ||
id: version | ||
attributes: | ||
label: "Project version" | ||
placeholder: "1.2.3" | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: what-happened | ||
attributes: | ||
label: What happened? | ||
description: A brief description of what happened and what you expected to happen | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: reproduction-steps | ||
attributes: | ||
label: "Minimal reproduction steps" | ||
description: "The minimal steps needed to reproduce the bug" | ||
validations: | ||
required: true |
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,13 @@ | ||
name: Feature request | ||
description: Suggest a new feature | ||
labels: ['feature'] | ||
assignees: | ||
- Arvolear | ||
body: | ||
- type: textarea | ||
id: feature-description | ||
attributes: | ||
label: "Describe the feature" | ||
description: "A description of what you would like to see in the project" | ||
validations: | ||
required: true |
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,4 @@ | ||
--- | ||
name: Other issue | ||
about: Other kind of issue | ||
--- |
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,15 @@ | ||
name: setup | ||
|
||
description: setup | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16.18.x" | ||
cache: npm | ||
- name: Install packages | ||
run: npm install | ||
shell: bash |
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,21 @@ | ||
name: "checks" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
- name: Run tests | ||
run: npm run test |
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.
Oops, something went wrong.