Skip to content

Commit 903e147

Browse files
Remove support for Goerli testnet
As the Goerli testnet will become deprecated with end of year 2023 and we've already migrated to Sepolia testnet, we'll no longer need the Goerli-related code past that date.
1 parent 35f9ceb commit 903e147

File tree

6 files changed

+17
-90
lines changed

6 files changed

+17
-90
lines changed

.github/workflows/contracts-ecdsa.yml

+2-16
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,7 @@ jobs:
252252

253253
- name: Deploy contracts
254254
env:
255-
# Using fake ternary expression to decide which credentials to use,
256-
# depending on chosen environment. Note: if `GOERLI_ETH_HOSTNAME_HTTP`
257-
# is empty, the expression will be evaluated to
258-
# `SEPOLIA_ETH_HOSTNAME_HTTP`'s value.
259-
CHAIN_API_URL: |
260-
${{ inputs.github.event.inputs.environment == 'goerli'
261-
&& secrets.GOERLI_ETH_HOSTNAME_HTTP
262-
|| secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
255+
CHAIN_API_URL: ${{ secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
263256
ACCOUNTS_PRIVATE_KEYS: ${{ secrets.TESTNET_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
264257
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
265258
run: yarn deploy --network ${{ github.event.inputs.environment }}
@@ -347,14 +340,7 @@ jobs:
347340
348341
- name: Deploy contracts
349342
env:
350-
# Using fake ternary expression to decide which credentials to use,
351-
# depending on chosen environment. Note: if `GOERLI_ETH_HOSTNAME_HTTP`
352-
# is empty, the expression will be evaluated to
353-
# `SEPOLIA_ETH_HOSTNAME_HTTP`'s value.
354-
CHAIN_API_URL: |
355-
${{ inputs.github.event.inputs.environment == 'goerli'
356-
&& secrets.GOERLI_ETH_HOSTNAME_HTTP
357-
|| secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
343+
CHAIN_API_URL: ${{ secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
358344
ACCOUNTS_PRIVATE_KEYS: ${{ secrets.DAPP_DEV_TESTNET_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
359345
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
360346
run: yarn deploy --network ${{ github.event.inputs.environment }}

.github/workflows/contracts-random-beacon.yml

+2-16
Original file line numberDiff line numberDiff line change
@@ -248,14 +248,7 @@ jobs:
248248

249249
- name: Deploy contracts
250250
env:
251-
# Using fake ternary expression to decide which credentials to use,
252-
# depending on chosen environment. Note: if `GOERLI_ETH_HOSTNAME_HTTP`
253-
# is empty, the expression will be evaluated to
254-
# `SEPOLIA_ETH_HOSTNAME_HTTP`'s value.
255-
CHAIN_API_URL: |
256-
${{ inputs.github.event.inputs.environment == 'goerli'
257-
&& secrets.GOERLI_ETH_HOSTNAME_HTTP
258-
|| secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
251+
CHAIN_API_URL: ${{ secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
259252
ACCOUNTS_PRIVATE_KEYS: ${{ secrets.TESTNET_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
260253
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
261254
run: yarn deploy --network ${{ github.event.inputs.environment }}
@@ -341,14 +334,7 @@ jobs:
341334
342335
- name: Deploy contracts
343336
env:
344-
# Using fake ternary expression to decide which credentials to use,
345-
# depending on chosen environment. Note: if `GOERLI_ETH_HOSTNAME_HTTP`
346-
# is empty, the expression will be evaluated to
347-
# `SEPOLIA_ETH_HOSTNAME_HTTP`'s value.
348-
CHAIN_API_URL: |
349-
${{ inputs.github.event.inputs.environment == 'goerli'
350-
&& secrets.GOERLI_ETH_HOSTNAME_HTTP
351-
|| secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
337+
CHAIN_API_URL: ${{ secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
352338
ACCOUNTS_PRIVATE_KEYS: ${{ secrets.DAPP_DEV_TESTNET_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
353339
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
354340
run: yarn deploy --network ${{ github.event.inputs.environment }}

solidity-v1/truffle-config.js

+11-25
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
require("babel-register")
2-
require("babel-polyfill")
3-
const HDWalletProvider = require("@truffle/hdwallet-provider")
4-
const Kit = require("@celo/contractkit")
1+
require("babel-register");
2+
require("babel-polyfill");
3+
const HDWalletProvider = require("@truffle/hdwallet-provider");
4+
const Kit = require("@celo/contractkit");
55

66
module.exports = {
77
networks: {
@@ -15,7 +15,7 @@ module.exports = {
1515
return new HDWalletProvider({
1616
privateKeys: [process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY],
1717
providerOrUrl: "http://localhost:8545",
18-
})
18+
});
1919
},
2020
gas: 6721975,
2121
network_id: 1101,
@@ -26,32 +26,18 @@ module.exports = {
2626
return new HDWalletProvider({
2727
privateKeys: [process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY],
2828
providerOrUrl: "http://eth-tx-node.default.svc.cluster.local:8545",
29-
})
29+
});
3030
},
3131
gas: 6721975,
3232
network_id: 1101,
3333
},
3434

35-
goerli: {
36-
provider: function () {
37-
return new HDWalletProvider({
38-
privateKeys: [process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY],
39-
providerOrUrl: process.env.CHAIN_API_URL,
40-
})
41-
},
42-
gas: 6000000,
43-
network_id: 5,
44-
skipDryRun: true,
45-
networkCheckTimeout: 120000,
46-
timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
47-
},
48-
4935
sepolia: {
5036
provider: function () {
5137
return new HDWalletProvider({
5238
privateKeys: [process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY],
5339
providerOrUrl: process.env.CHAIN_API_URL,
54-
})
40+
});
5541
},
5642
gas: 6000000,
5743
network_id: 11155111,
@@ -62,9 +48,9 @@ module.exports = {
6248

6349
alfajores: {
6450
provider: function () {
65-
const kit = Kit.newKit(process.env.CHAIN_API_URL)
66-
kit.addAccount(process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY)
67-
return kit.web3.currentProvider
51+
const kit = Kit.newKit(process.env.CHAIN_API_URL);
52+
kit.addAccount(process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY);
53+
return kit.web3.currentProvider;
6854
},
6955
network_id: 44787,
7056
},
@@ -95,4 +81,4 @@ module.exports = {
9581
api_keys: {
9682
etherscan: process.env.ETHERSCAN_API_KEY,
9783
},
98-
}
84+
};

solidity/ecdsa/deploy/09_deploy_wallet_registry_governance.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
77

88
const WalletRegistry = await deployments.get("WalletRegistry")
99

10-
// 60 seconds for Goerli/Sepolia. 1 week otherwise.
11-
const GOVERNANCE_DELAY =
12-
hre.network.name === "goerli" || hre.network.name === "sepolia"
13-
? 60
14-
: 604800
10+
// 60 seconds for Sepolia. 1 week otherwise.
11+
const GOVERNANCE_DELAY = hre.network.name === "sepolia" ? 60 : 604800
1512

1613
const WalletRegistryGovernance = await deployments.deploy(
1714
"WalletRegistryGovernance",

solidity/ecdsa/hardhat.config.ts

-16
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,6 @@ const config: HardhatUserConfig = {
113113
chainId: 1101,
114114
tags: ["allowStubs", "useRandomBeaconChaosnet"],
115115
},
116-
goerli: {
117-
url: process.env.CHAIN_API_URL || "",
118-
chainId: 5,
119-
accounts: process.env.ACCOUNTS_PRIVATE_KEYS
120-
? process.env.ACCOUNTS_PRIVATE_KEYS.split(",")
121-
: undefined,
122-
tags: ["etherscan", "tenderly", "useRandomBeaconChaosnet"],
123-
},
124116
sepolia: {
125117
url: process.env.CHAIN_API_URL || "",
126118
chainId: 11155111,
@@ -150,25 +142,21 @@ const config: HardhatUserConfig = {
150142
namedAccounts: {
151143
deployer: {
152144
default: 1, // take the second account
153-
goerli: 0,
154145
sepolia: 0,
155146
mainnet: 0, // "0x123694886DBf5Ac94DDA07135349534536D14cAf"
156147
},
157148
governance: {
158149
default: 2,
159-
goerli: 0,
160150
sepolia: 0,
161151
mainnet: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f", // Threshold Council
162152
},
163153
chaosnetOwner: {
164154
default: 3,
165-
goerli: 0,
166155
sepolia: 0,
167156
mainnet: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f", // Threshold Council
168157
},
169158
esdm: {
170159
default: 4,
171-
goerli: 0,
172160
sepolia: 0,
173161
mainnet: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f", // Threshold Council
174162
},
@@ -200,10 +188,6 @@ const config: HardhatUserConfig = {
200188
"node_modules/@threshold-network/solidity-contracts/deployments/development",
201189
"node_modules/@keep-network/random-beacon/deployments/development",
202190
],
203-
goerli: [
204-
"node_modules/@threshold-network/solidity-contracts/artifacts",
205-
"node_modules/@keep-network/random-beacon/artifacts",
206-
],
207191
sepolia: [
208192
"node_modules/@threshold-network/solidity-contracts/artifacts",
209193
"node_modules/@keep-network/random-beacon/artifacts",

solidity/random-beacon/hardhat.config.ts

-12
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,6 @@ const config: HardhatUserConfig = {
101101
chainId: 1101,
102102
tags: ["allowStubs"],
103103
},
104-
goerli: {
105-
url: process.env.CHAIN_API_URL || "",
106-
chainId: 5,
107-
accounts: process.env.ACCOUNTS_PRIVATE_KEYS
108-
? process.env.ACCOUNTS_PRIVATE_KEYS.split(",")
109-
: undefined,
110-
tags: ["etherscan", "tenderly"],
111-
},
112104
sepolia: {
113105
url: process.env.CHAIN_API_URL || "",
114106
chainId: 11155111,
@@ -138,19 +130,16 @@ const config: HardhatUserConfig = {
138130
namedAccounts: {
139131
deployer: {
140132
default: 1,
141-
goerli: 0,
142133
sepolia: 0,
143134
mainnet: 0, // "0x123694886DBf5Ac94DDA07135349534536D14cAf"
144135
},
145136
governance: {
146137
default: 2,
147-
goerli: 0,
148138
sepolia: 0,
149139
mainnet: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f", // Threshold Council
150140
},
151141
chaosnetOwner: {
152142
default: 3,
153-
goerli: 0,
154143
sepolia: 0,
155144
mainnet: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f", // Threshold Council
156145
},
@@ -176,7 +165,6 @@ const config: HardhatUserConfig = {
176165
development: [
177166
"node_modules/@threshold-network/solidity-contracts/deployments/development",
178167
],
179-
goerli: ["node_modules/@threshold-network/solidity-contracts/artifacts"],
180168
sepolia: ["node_modules/@threshold-network/solidity-contracts/artifacts"],
181169
mainnet: ["./external/mainnet"],
182170
},

0 commit comments

Comments
 (0)