Skip to content

Commit e2c80e6

Browse files
Rename common testnet GH secrets
We don't need to differenciate between Sepolia and Goerli secrets storing private keys of the deployers - in both cases we're using the same deployer address.
1 parent 440c305 commit e2c80e6

File tree

1 file changed

+16
-28
lines changed

1 file changed

+16
-28
lines changed

.github/workflows/contracts.yml

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -153,22 +153,16 @@ jobs:
153153

154154
- name: Deploy contracts
155155
env:
156-
# Use fake ternary expressions to decide which credentials to use,
157-
# depending on chosen environment. Note: if `GOERLI...` credentials
158-
# are empty, the expressions will be evaluated to the `SEPOLIA...`
159-
# ones.
156+
# Using fake ternary expressions to decide which credentials to use,
157+
# depending on chosen environment. Note: if `GOERLI_ETH_HOSTNAME_HTTP`
158+
# is empty, the expression will be evaluated to
159+
# `SEPOLIA_ETH_HOSTNAME_HTTP`'s value.
160160
CHAIN_API_URL: |
161161
${{ inputs.github.event.inputs.environment == 'goerli'
162162
&& secrets.GOERLI_ETH_HOSTNAME_HTTP
163163
|| secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
164-
CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: |
165-
${{ inputs.github.event.inputs.environment == 'goerli'
166-
&& secrets.GOERLI_ETH_CONTRACT_OWNER_PRIVATE_KEY
167-
|| secrets.SEPOLIA_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
168-
KEEP_CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: |
169-
${{ inputs.github.event.inputs.environment == 'goerli'
170-
&& secrets.GOERLI_KEEP_ETH_CONTRACT_OWNER_PRIVATE_KEY
171-
|| secrets.SEPOLIA_KEEP_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
164+
CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: secrets.TESTNET_ETH_CONTRACT_OWNER_PRIVATE_KEY
165+
KEEP_CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: secrets.TESTNET_KEEP_ETH_CONTRACT_OWNER_PRIVATE_KEY
172166
run: yarn deploy --network ${{ github.event.inputs.environment }}
173167

174168
- name: Bump up package version
@@ -237,10 +231,10 @@ jobs:
237231
- name: Verify contracts on Etherscan
238232
env:
239233
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
240-
# Use fake ternary expression to decide which credentials to use,
241-
# depending on chosen environment. Note: if `GOERLI...` credential
242-
# is empty, the expressions will be evaluated to the `SEPOLIA...`
243-
# one.
234+
# Using fake ternary expressions to decide which credentials to use,
235+
# depending on chosen environment. Note: if `GOERLI_ETH_HOSTNAME_HTTP`
236+
# is empty, the expression will be evaluated to
237+
# `SEPOLIA_ETH_HOSTNAME_HTTP`'s value.
244238
CHAIN_API_URL: |
245239
${{ inputs.github.event.inputs.environment == 'goerli'
246240
&& secrets.GOERLI_ETH_HOSTNAME_HTTP
@@ -279,22 +273,16 @@ jobs:
279273

280274
- name: Deploy contracts
281275
env:
282-
# Use fake ternary expressions to decide which credentials to use,
283-
# depending on chosen environment. Note: if `GOERLI...` credentials
284-
# are empty, the expressions will be evaluated to the `SEPOLIA...`
285-
# ones.
276+
# Using fake ternary expressions to decide which credentials to use,
277+
# depending on chosen environment. Note: if `GOERLI_ETH_HOSTNAME_HTTP`
278+
# is empty, the expression will be evaluated to
279+
# `SEPOLIA_ETH_HOSTNAME_HTTP`'s value.
286280
CHAIN_API_URL: |
287281
${{ inputs.github.event.inputs.environment == 'goerli'
288282
&& secrets.GOERLI_ETH_HOSTNAME_HTTP
289283
|| secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
290-
CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: |
291-
${{ inputs.github.event.inputs.environment == 'goerli'
292-
&& secrets.DAPP_DEV_GOERLI_ETH_CONTRACT_OWNER_PRIVATE_KEY
293-
|| secrets.DAPP_DEV_SEPOLIA_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
294-
KEEP_CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: |
295-
${{ inputs.github.event.inputs.environment == 'goerli'
296-
&& secrets.GOERLI_KEEP_ETH_CONTRACT_OWNER_PRIVATE_KEY
297-
|| secrets.SEPOLIA_KEEP_ETH_CONTRACT_OWNER_PRIVATE_KEY }}
284+
CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: secrets.DAPP_DEV_TESTNET_ETH_CONTRACT_OWNER_PRIVATE_KEY
285+
KEEP_CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY: secrets.TESTNET_KEEP_ETH_CONTRACT_OWNER_PRIVATE_KEY
298286
run: yarn deploy --network ${{ github.event.inputs.environment }}
299287

300288
- name: Bump up package version

0 commit comments

Comments
 (0)