Skip to content

Commit

Permalink
Merge branch 'main' into abstract-depositor-proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-zimnoch authored Jan 29, 2024
2 parents 0ed4d7f + d1fad9f commit f40a560
Show file tree
Hide file tree
Showing 26 changed files with 77 additions and 7,207 deletions.
27 changes: 3 additions & 24 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,7 @@ jobs:

- name: Deploy contracts
env:
# Using fake ternary expression to decide which credentials to use,
# depending on chosen environment. Note: if `GOERLI_ETH_HOSTNAME_HTTP`
# is empty, the expression will be evaluated to
# `SEPOLIA_ETH_HOSTNAME_HTTP`'s value.
CHAIN_API_URL: |
${{ inputs.github.event.inputs.environment == 'goerli'
&& secrets.GOERLI_ETH_HOSTNAME_HTTP
|| secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
CHAIN_API_URL: ${{ secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
ACCOUNTS_PRIVATE_KEYS: ${{ secrets.TESTNET_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
run: yarn deploy --network ${{ github.event.inputs.environment }}

Expand Down Expand Up @@ -275,14 +268,7 @@ jobs:
- name: Verify contracts on Etherscan
env:
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
# Using fake ternary expression to decide which credentials to use,
# depending on chosen environment. Note: if `GOERLI_ETH_HOSTNAME_HTTP`
# is empty, the expression will be evaluated to
# `SEPOLIA_ETH_HOSTNAME_HTTP`'s value.
CHAIN_API_URL: |
${{ inputs.github.event.inputs.environment == 'goerli'
&& secrets.GOERLI_ETH_HOSTNAME_HTTP
|| secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
CHAIN_API_URL: ${{ secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
run: yarn run hardhat --network ${{ github.event.inputs.environment }} etherscan-verify

# This job is responsible for publishing packackes with slightly modified
Expand Down Expand Up @@ -340,14 +326,7 @@ jobs:
- name: Deploy contracts
env:
# Using fake ternary expression to decide which credentials to use,
# depending on chosen environment. Note: if `GOERLI_ETH_HOSTNAME_HTTP`
# is empty, the expression will be evaluated to
# `SEPOLIA_ETH_HOSTNAME_HTTP`'s value.
CHAIN_API_URL: |
${{ inputs.github.event.inputs.environment == 'goerli'
&& secrets.GOERLI_ETH_HOSTNAME_HTTP
|| secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
CHAIN_API_URL: ${{ secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
ACCOUNTS_PRIVATE_KEYS: ${{ secrets.DAPP_DEV_TESTNET_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
run: yarn deploy --network ${{ github.event.inputs.environment }}

Expand Down
48 changes: 0 additions & 48 deletions solidity/contracts/test/GoerliLightRelay.sol

This file was deleted.

3 changes: 0 additions & 3 deletions solidity/deploy/01_deploy_light_relay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployer } = await getNamedAccounts()

function resolveRelayContract() {
if (hre.network.name === "goerli") {
return "GoerliLightRelay"
}
if (hre.network.name === "sepolia") {
return "SepoliaLightRelay"
}
Expand Down
7 changes: 2 additions & 5 deletions solidity/deploy/09_deploy_bridge_governance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
}
)

// 60 seconds for Goerli/Sepolia. 48 hours otherwise.
const GOVERNANCE_DELAY =
hre.network.name === "goerli" || hre.network.name === "sepolia"
? 60
: 172800
// 60 seconds for Sepolia. 48 hours otherwise.
const GOVERNANCE_DELAY = hre.network.name === "sepolia" ? 60 : 172800

const bridgeGovernance = await deploy("BridgeGovernance", {
contract: "BridgeGovernance",
Expand Down
4 changes: 2 additions & 2 deletions solidity/deploy/19_authorize_spv_maintainer_in_bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ func.tags = ["AuthorizeSpvMaintainer"]
func.dependencies = ["Bridge"]

// SPV maintainer can submit SPV proofs to the Bridge. We authorize spvMaintainer
// account for Hardhat network (unit tests) and Goerli/Sepolia (testnets) but we
// DO NOT want to authorize it for Mainnet deployment. SPV maintainer will be
// account for Hardhat network (unit tests) and Sepolia (testnet) but we DO NOT
// want to authorize it for Mainnet deployment. SPV maintainer will be
// authorized separately by the Governance when sweeping will be activated.
//
// Note that at this point MaintainerProxy contract is already authorized in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ func.dependencies = ["ReimbursementPool", "MaintainerProxy"]
// On mainnet, the ReimbursementPool ownership is passed to the Threshold
// Council / DAO and that address is not controlled by the dev team.
// Hence, this step can be executed only for non-mainnet networks such as
// Hardhat (unit tests) and Goerli (testnet).
// Hardhat (unit tests) and Sepolia (testnet).
func.skip = async (hre: HardhatRuntimeEnvironment): Promise<boolean> =>
hre.network.name === "mainnet"
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ func.dependencies = ["ReimbursementPool", "Bridge"]
// On mainnet, the ReimbursementPool ownership is passed to the Threshold
// Council / DAO and that address is not controlled by the dev team.
// Hence, this step can be executed only for non-mainnet networks such as
// Hardhat (unit tests) and Goerli or Sepolia (testnets).
// Hardhat (unit tests) and Sepolia (testnet).
func.skip = async (hre: HardhatRuntimeEnvironment): Promise<boolean> =>
hre.network.name === "mainnet"
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ func.dependencies = ["ReimbursementPool", "LightRelayMaintainerProxy"]
// On mainnet, the ReimbursementPool ownership is passed to the Threshold
// Council / DAO and that address is not controlled by the dev team.
// Hence, this step can be executed only for non-mainnet networks such as
// Hardhat (unit tests) and Goerli or Sepolia (testnets).
// Hardhat (unit tests) and Sepolia (testnet).
func.skip = async (hre: HardhatRuntimeEnvironment): Promise<boolean> =>
hre.network.name === "mainnet"
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@ func.tags = ["AuthorizeLightRelayMaintainerProxyInLightRelay"]
func.dependencies = ["LightRelay", "LightRelayMaintainerProxy"]

func.skip = async (hre: HardhatRuntimeEnvironment): Promise<boolean> =>
hre.network.name === "goerli" ||
hre.network.name === "sepolia" ||
hre.network.name === "system_tests"
hre.network.name === "sepolia" || hre.network.name === "system_tests"
22 changes: 0 additions & 22 deletions solidity/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,6 @@ const config: HardhatUserConfig = {
chainId: 1101,
tags: ["allowStubs"],
},
goerli: {
url: process.env.CHAIN_API_URL || "",
chainId: 5,
accounts: process.env.ACCOUNTS_PRIVATE_KEYS
? process.env.ACCOUNTS_PRIVATE_KEYS.split(",")
: undefined,
tags: ["tenderly"],
},
sepolia: {
url: process.env.CHAIN_API_URL || "",
chainId: 11155111,
Expand Down Expand Up @@ -175,11 +167,6 @@ const config: HardhatUserConfig = {
"node_modules/@keep-network/random-beacon/deployments/development",
"node_modules/@keep-network/ecdsa/deployments/development",
],
goerli: [
"node_modules/@keep-network/tbtc/artifacts",
"node_modules/@keep-network/random-beacon/artifacts",
"node_modules/@keep-network/ecdsa/artifacts",
],
sepolia: [
"node_modules/@keep-network/tbtc/artifacts",
"node_modules/@keep-network/random-beacon/artifacts",
Expand All @@ -192,57 +179,48 @@ const config: HardhatUserConfig = {
namedAccounts: {
deployer: {
default: 1,
goerli: 0,
sepolia: 0,
mainnet: 0, // "0x123694886DBf5Ac94DDA07135349534536D14cAf"
},
governance: {
default: 2,
goerli: 0,
sepolia: 0,
mainnet: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f", // Threshold Council
},
chaosnetOwner: {
default: 3,
goerli: 0,
sepolia: 0,
// Not used for mainnet deployment scripts of `@keepn-network/tbtc-v2`.
// Used by `@keep-network/random-beacon` and `@keep-network/ecdsa`
// when deploying `SortitionPool`s.
},
esdm: {
default: 4,
goerli: 0,
sepolia: 0,
mainnet: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f", // Threshold Council
},
keepTechnicalWalletTeam: {
default: 5,
goerli: 0,
sepolia: 0,
mainnet: "0xB3726E69Da808A689F2607939a2D9E958724FC2A",
},
keepCommunityMultiSig: {
default: 6,
goerli: 0,
sepolia: 0,
mainnet: "0x19FcB32347ff4656E4E6746b4584192D185d640d",
},
treasury: {
default: 7,
goerli: 0,
sepolia: 0,
mainnet: "0x87F005317692D05BAA4193AB0c961c69e175f45f", // Token Holder DAO
},
spvMaintainer: {
default: 8,
goerli: 0,
sepolia: 0,
// We are not setting SPV maintainer for mainnet in deployment scripts.
},
v1Redeemer: {
default: 10,
goerli: 0,
sepolia: 0,
mainnet: "0x8Bac178fA95Cb56D11A94d4f1b2B1F5Fc48A30eA",
},
Expand Down
10 changes: 5 additions & 5 deletions typescript/api-reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,13 @@ ___

### EthereumNetwork

Ƭ **EthereumNetwork**: ``"local"`` \| ``"goerli"`` \| ``"sepolia"`` \| ``"mainnet"``
Ƭ **EthereumNetwork**: ``"local"`` \| ``"sepolia"`` \| ``"mainnet"``

Supported Ethereum networks.

#### Defined in

[src/lib/ethereum/index.ts:77](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/index.ts#L77)
[src/lib/ethereum/index.ts:75](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/index.ts#L75)

___

Expand Down Expand Up @@ -719,7 +719,7 @@ Throws an error if the address of the signer is not a proper

#### Defined in

[src/lib/ethereum/index.ts:64](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/index.ts#L64)
[src/lib/ethereum/index.ts:62](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/index.ts#L62)

___

Expand Down Expand Up @@ -799,7 +799,7 @@ Throws an error if the signer's Ethereum network is other than

#### Defined in

[src/lib/ethereum/index.ts:88](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/index.ts#L88)
[src/lib/ethereum/index.ts:86](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/index.ts#L86)

___

Expand Down Expand Up @@ -843,7 +843,7 @@ Packed parameters.

#### Defined in

[src/lib/ethereum/bridge.ts:691](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L691)
[src/lib/ethereum/bridge.ts:687](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L687)

___

Expand Down
Loading

0 comments on commit f40a560

Please sign in to comment.