Skip to content

Commit 1fc3120

Browse files
Merge pull request #224 from BitGo/WIN-5784-creditcoin-contracts-testnet
chore(eth-multisig-v4): add creditcoin config for contract deployment
2 parents 861b87c + 2670b21 commit 1fc3120

File tree

5 files changed

+53
-7
lines changed

5 files changed

+53
-7
lines changed

.github/workflows/deploy_and_release.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
SOMNIA_EXPLORER_API_KEY: ${{ secrets.SOMNIA_EXPLORER_API_KEY }}
5252
SONEIUM_EXPLORER_API_KEY: ${{ secrets.SONEIUM_EXPLORER_API_KEY }}
5353
WORLD_EXPLORER_API_KEY: ${{ secrets.WORLD_EXPLORER_API_KEY }}
54+
CTC_EXPLORER_API_KEY: ${{ secrets.CTC_EXPLORER_API_KEY }}
5455
APECHAIN_EXPLORER_API_KEY: ${{ secrets.APECHAIN_EXPLORER_API_KEY }}
5556
PHAROS_EXPLORER_API_KEY: ${{ secrets.PHAROS_EXPLORER_API_KEY }}
5657

@@ -68,13 +69,13 @@ jobs:
6869
result-encoding: string
6970
script: |
7071
const tag = process.env.GITHUB_REF_NAME;
71-
const regex = /v.*\-(eth|hteth|matic|tmatic|bsc|tbsc|arbeth|tarbeth|opeth|topeth|zketh|tzketh|baseeth|tbaseeth|bera|tbera|tavaxc|avaxc|toas|oas|tcoredao|coredao|tflr|flr|tsgb|sgb|txdc|xdc|twemix|wemix|tmon|mon|tstt|stt|tsoneium|soneium|world|tworld|tapechain|apechain|tphrs|phrs)$/;
72+
const regex = /v.*\-(eth|hteth|matic|tmatic|bsc|tbsc|arbeth|tarbeth|opeth|topeth|zketh|tzketh|baseeth|tbaseeth|bera|tbera|tavaxc|avaxc|toas|oas|tcoredao|coredao|tflr|flr|tsgb|sgb|txdc|xdc|twemix|wemix|tmon|mon|tstt|stt|tsoneium|soneium|world|tworld|tctc|ctc|tapechain|apechain|tphrs|phrs)$/;
7273
const network = tag.match(regex);
7374
return network ? network[1] : "hteth";
7475
deploy-to-test:
7576
runs-on: ubuntu-latest
7677
needs: [lint-and-test, get-network]
77-
if: ${{ (needs.get-network.outputs.network == 'hteth' ) || (needs.get-network.outputs.network == 'tmatic' ) || (needs.get-network.outputs.network == 'tbsc' ) || (needs.get-network.outputs.network == 'tarbeth' ) || (needs.get-network.outputs.network == 'topeth' ) || (needs.get-network.outputs.network == 'tzketh' ) || (needs.get-network.outputs.network == 'tbaseeth' ) || (needs.get-network.outputs.network == 'tbera' ) || (needs.get-network.outputs.network == 'tavaxc' ) || (needs.get-network.outputs.network == 'toas' ) || (needs.get-network.outputs.network == 'tcoredao' ) || (needs.get-network.outputs.network == 'tflr' ) || (needs.get-network.outputs.network == 'tsgb' ) || (needs.get-network.outputs.network == 'txdc' ) || (needs.get-network.outputs.network == 'twemix' ) || (needs.get-network.outputs.network == 'tmon' ) || (needs.get-network.outputs.network == 'tstt' ) || (needs.get-network.outputs.network == 'tsoneium' ) || (needs.get-network.outputs.network == 'tworld' ) || (needs.get-network.outputs.network == 'tapechain' ) || (needs.get-network.outputs.network == 'tphrs' ) }}
78+
if: ${{ (needs.get-network.outputs.network == 'hteth' ) || (needs.get-network.outputs.network == 'tmatic' ) || (needs.get-network.outputs.network == 'tbsc' ) || (needs.get-network.outputs.network == 'tarbeth' ) || (needs.get-network.outputs.network == 'topeth' ) || (needs.get-network.outputs.network == 'tzketh' ) || (needs.get-network.outputs.network == 'tbaseeth' ) || (needs.get-network.outputs.network == 'tbera' ) || (needs.get-network.outputs.network == 'tavaxc' ) || (needs.get-network.outputs.network == 'toas' ) || (needs.get-network.outputs.network == 'tcoredao' ) || (needs.get-network.outputs.network == 'tflr' ) || (needs.get-network.outputs.network == 'tsgb' ) || (needs.get-network.outputs.network == 'txdc' ) || (needs.get-network.outputs.network == 'twemix' ) || (needs.get-network.outputs.network == 'tmon' ) || (needs.get-network.outputs.network == 'tstt' ) || (needs.get-network.outputs.network == 'tsoneium' ) || (needs.get-network.outputs.network == 'tworld' ) || (needs.get-network.outputs.network == 'tctc' ) || (needs.get-network.outputs.network == 'tapechain' ) || (needs.get-network.outputs.network == 'tphrs' ) }}
7879
environment: testnet
7980
steps:
8081
- uses: actions/checkout@v2
@@ -121,6 +122,7 @@ jobs:
121122
SOMNIA_EXPLORER_API_KEY: ${{ secrets.SOMNIA_EXPLORER_API_KEY }}
122123
SONEIUM_EXPLORER_API_KEY: ${{ secrets.SONEIUM_EXPLORER_API_KEY }}
123124
WORLD_EXPLORER_API_KEY: ${{ secrets.WORLD_EXPLORER_API_KEY }}
125+
CTC_EXPLORER_API_KEY: ${{ secrets.CTC_EXPLORER_API_KEY }}
124126
APECHAIN_EXPLORER_API_KEY: ${{ secrets.APECHAIN_EXPLORER_API_KEY }}
125127
PHAROS_EXPLORER_API_KEY: ${{ secrets.PHAROS_EXPLORER_API_KEY }}
126128
- name: Update release notes
@@ -154,7 +156,7 @@ jobs:
154156
deploy-to-prod:
155157
runs-on: ubuntu-latest
156158
needs: [lint-and-test, get-network]
157-
if: ${{ (needs.get-network.outputs.network == 'eth' ) || (needs.get-network.outputs.network == 'matic' ) || (needs.get-network.outputs.network == 'bsc' ) || (needs.get-network.outputs.network == 'arbeth' ) || (needs.get-network.outputs.network == 'opeth' ) || (needs.get-network.outputs.network == 'zketh' ) || (needs.get-network.outputs.network == 'baseeth' ) || (needs.get-network.outputs.network == 'bera' ) || (needs.get-network.outputs.network == 'avaxc' ) || (needs.get-network.outputs.network == 'coredao' ) || (needs.get-network.outputs.network == 'oas' ) || (needs.get-network.outputs.network == 'flr' ) || (needs.get-network.outputs.network == 'sgb' ) || (needs.get-network.outputs.network == 'xdc' ) || (needs.get-network.outputs.network == 'wemix' ) || (needs.get-network.outputs.network == 'mon' ) || (needs.get-network.outputs.network == 'stt' ) || (needs.get-network.outputs.network == 'soneium' ) || (needs.get-network.outputs.network == 'world' ) || (needs.get-network.outputs.network == 'apechain' ) || (needs.get-network.outputs.network == 'phrs' ) }}
159+
if: ${{ (needs.get-network.outputs.network == 'eth' ) || (needs.get-network.outputs.network == 'matic' ) || (needs.get-network.outputs.network == 'bsc' ) || (needs.get-network.outputs.network == 'arbeth' ) || (needs.get-network.outputs.network == 'opeth' ) || (needs.get-network.outputs.network == 'zketh' ) || (needs.get-network.outputs.network == 'baseeth' ) || (needs.get-network.outputs.network == 'bera' ) || (needs.get-network.outputs.network == 'avaxc' ) || (needs.get-network.outputs.network == 'coredao' ) || (needs.get-network.outputs.network == 'oas' ) || (needs.get-network.outputs.network == 'flr' ) || (needs.get-network.outputs.network == 'sgb' ) || (needs.get-network.outputs.network == 'xdc' ) || (needs.get-network.outputs.network == 'wemix' ) || (needs.get-network.outputs.network == 'mon' ) || (needs.get-network.outputs.network == 'stt' ) || (needs.get-network.outputs.network == 'soneium' ) || (needs.get-network.outputs.network == 'world' ) || (needs.get-network.outputs.network == 'ctc' ) || (needs.get-network.outputs.network == 'apechain' ) || (needs.get-network.outputs.network == 'phrs' ) }}
158160
environment: mainnet
159161
steps:
160162
- uses: actions/checkout@v2
@@ -201,6 +203,7 @@ jobs:
201203
SOMNIA_EXPLORER_API_KEY: ${{ secrets.SOMNIA_EXPLORER_API_KEY }}
202204
SONEIUM_EXPLORER_API_KEY: ${{ secrets.SONEIUM_EXPLORER_API_KEY }}
203205
WORLD_EXPLORER_API_KEY: ${{ secrets.WORLD_EXPLORER_API_KEY }}
206+
CTC_EXPLORER_API_KEY: ${{ secrets.CTC_EXPLORER_API_KEY }}
204207
APECHAIN_EXPLORER_API_KEY: ${{ secrets.APECHAIN_EXPLORER_API_KEY }}
205208
PHAROS_EXPLORER_API_KEY: ${{ secrets.PHAROS_EXPLORER_API_KEY }}
206209
- name: Update release notes

.github/workflows/deploy_batcher_contract.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
SOMNIA_EXPLORER_API_KEY: ${{ secrets.SOMNIA_EXPLORER_API_KEY }}
5252
SONEIUM_EXPLORER_API_KEY: ${{ secrets.SONEIUM_EXPLORER_API_KEY }}
5353
WORLD_EXPLORER_API_KEY: ${{ secrets.WORLD_EXPLORER_API_KEY }}
54+
CTC_EXPLORER_API_KEY: ${{ secrets.CTC_EXPLORER_API_KEY }}
5455
APECHAIN_EXPLORER_API_KEY: ${{ secrets.APECHAIN_EXPLORER_API_KEY }}
5556
PHAROS_EXPLORER_API_KEY: ${{ secrets.PHAROS_EXPLORER_API_KEY }}
5657
get-network:
@@ -67,7 +68,7 @@ jobs:
6768
result-encoding: string
6869
script: |
6970
const tag = process.env.GITHUB_REF_NAME;
70-
const regex = /v.*\-(eth|hteth|matic|tmatic|bsc|tbsc|arbeth|tarbeth|opeth|topeth|zketh|tzketh|baseeth|tbaseeth|bera|tbera|tavaxc|avaxc|toas|oas|tcoredao|coredao|flr|tflr|sgb|tsgb|txdc|xdc|twemix|wemix|tmon|mon|tstt|stt|tsoneium|soneium|tworld|world|tapechain|apechain|tphrs|phrs)$/;
71+
const regex = /v.*\-(eth|hteth|matic|tmatic|bsc|tbsc|arbeth|tarbeth|opeth|topeth|zketh|tzketh|baseeth|tbaseeth|bera|tbera|tavaxc|avaxc|toas|oas|tcoredao|coredao|flr|tflr|sgb|tsgb|txdc|xdc|twemix|wemix|tmon|mon|tstt|stt|tsoneium|soneium|tworld|world|tctc|ctc|tapechain|apechain|tphrs|phrs)$/;
7172
const matchedNetwork = tag.match(regex);
7273
if (!matchedNetwork) {
7374
console.log("No match found for the network name, defaulting to 'hteth'.");
@@ -77,7 +78,7 @@ jobs:
7778
deploy-batcher-contract-to-test:
7879
runs-on: ubuntu-latest
7980
needs: [lint-and-test, get-network]
80-
if: ${{ (needs.get-network.outputs.network == 'hteth' ) || (needs.get-network.outputs.network == 'tmatic' ) || (needs.get-network.outputs.network == 'tbsc' ) || (needs.get-network.outputs.network == 'tarbeth' ) || (needs.get-network.outputs.network == 'topeth' ) || (needs.get-network.outputs.network == 'tzketh' ) || (needs.get-network.outputs.network == 'tbaseeth' ) || (needs.get-network.outputs.network == 'tbera' ) || (needs.get-network.outputs.network == 'tavaxc' ) || (needs.get-network.outputs.network == 'tcoredao' ) || (needs.get-network.outputs.network == 'toas' ) || (needs.get-network.outputs.network == 'tflr' ) || (needs.get-network.outputs.network == 'tsgb' ) || (needs.get-network.outputs.network == 'txdc' ) || (needs.get-network.outputs.network == 'twemix' ) || (needs.get-network.outputs.network == 'tmon' ) || (needs.get-network.outputs.network == 'tstt' ) || (needs.get-network.outputs.network == 'tsoneium' ) || (needs.get-network.outputs.network == 'tworld' ) || (needs.get-network.outputs.network == 'tapechain' ) || (needs.get-network.outputs.network == 'tphrs' )}}
81+
if: ${{ (needs.get-network.outputs.network == 'hteth' ) || (needs.get-network.outputs.network == 'tmatic' ) || (needs.get-network.outputs.network == 'tbsc' ) || (needs.get-network.outputs.network == 'tarbeth' ) || (needs.get-network.outputs.network == 'topeth' ) || (needs.get-network.outputs.network == 'tzketh' ) || (needs.get-network.outputs.network == 'tbaseeth' ) || (needs.get-network.outputs.network == 'tbera' ) || (needs.get-network.outputs.network == 'tavaxc' ) || (needs.get-network.outputs.network == 'tcoredao' ) || (needs.get-network.outputs.network == 'toas' ) || (needs.get-network.outputs.network == 'tflr' ) || (needs.get-network.outputs.network == 'tsgb' ) || (needs.get-network.outputs.network == 'txdc' ) || (needs.get-network.outputs.network == 'twemix' ) || (needs.get-network.outputs.network == 'tmon' ) || (needs.get-network.outputs.network == 'tstt' ) || (needs.get-network.outputs.network == 'tsoneium' ) || (needs.get-network.outputs.network == 'tworld' ) || (needs.get-network.outputs.network == 'tctc' ) || (needs.get-network.outputs.network == 'tapechain' ) || (needs.get-network.outputs.network == 'tphrs' )}}
8182
environment: testnet
8283
steps:
8384
- uses: actions/checkout@v4
@@ -121,7 +122,8 @@ jobs:
121122
MONAD_EXPLORER_API_KEY: ${{ secrets.MONAD_EXPLORER_API_KEY }}
122123
SOMNIA_EXPLORER_API_KEY: ${{ secrets.SOMNIA_EXPLORER_API_KEY }}
123124
SONEIUM_EXPLORER_API_KEY: ${{ secrets.SONEIUM_EXPLORER_API_KEY }}
124-
WORLD_EXPLORER_API_KEY: ${{ secrets.WORLD_EXPLORER_API_KEY }}
125+
WORLD_EXPLORER_API_KEY: ${{ secrets.WORLD_EXPLORER_API_KEY }}
126+
CTC_EXPLORER_API_KEY: ${{ secrets.CTC_EXPLORER_API_KEY }}
125127
APECHAIN_EXPLORER_API_KEY: ${{ secrets.APECHAIN_EXPLORER_API_KEY }}
126128
PHAROS_EXPLORER_API_KEY: ${{ secrets.PHAROS_EXPLORER_API_KEY }}
127129
- name: Update release notes
@@ -135,7 +137,7 @@ jobs:
135137
deploy-batcher-contract-to-prod:
136138
runs-on: ubuntu-latest
137139
needs: [lint-and-test, get-network]
138-
if: ${{ (needs.get-network.outputs.network == 'eth' ) || (needs.get-network.outputs.network == 'matic' ) || (needs.get-network.outputs.network == 'bsc' ) || (needs.get-network.outputs.network == 'arbeth' ) || (needs.get-network.outputs.network == 'opeth' ) || (needs.get-network.outputs.network == 'zketh' ) || (needs.get-network.outputs.network == 'baseeth' ) || (needs.get-network.outputs.network == 'bera' ) || (needs.get-network.outputs.network == 'avaxc' ) || (needs.get-network.outputs.network == 'coredao' ) || (needs.get-network.outputs.network == 'oas' ) || (needs.get-network.outputs.network == 'sgb' ) || (needs.get-network.outputs.network == 'flr' ) || (needs.get-network.outputs.network == 'xdc' ) || (needs.get-network.outputs.network == 'wemix' ) || (needs.get-network.outputs.network == 'mon' ) || (needs.get-network.outputs.network == 'stt' ) || (needs.get-network.outputs.network == 'soneium' ) || (needs.get-network.outputs.network == 'world' ) || (needs.get-network.outputs.network == 'apechain' ) || (needs.get-network.outputs.network == 'phrs' )}}
140+
if: ${{ (needs.get-network.outputs.network == 'eth' ) || (needs.get-network.outputs.network == 'matic' ) || (needs.get-network.outputs.network == 'bsc' ) || (needs.get-network.outputs.network == 'arbeth' ) || (needs.get-network.outputs.network == 'opeth' ) || (needs.get-network.outputs.network == 'zketh' ) || (needs.get-network.outputs.network == 'baseeth' ) || (needs.get-network.outputs.network == 'bera' ) || (needs.get-network.outputs.network == 'avaxc' ) || (needs.get-network.outputs.network == 'coredao' ) || (needs.get-network.outputs.network == 'oas' ) || (needs.get-network.outputs.network == 'sgb' ) || (needs.get-network.outputs.network == 'flr' ) || (needs.get-network.outputs.network == 'xdc' ) || (needs.get-network.outputs.network == 'wemix' ) || (needs.get-network.outputs.network == 'mon' ) || (needs.get-network.outputs.network == 'stt' ) || (needs.get-network.outputs.network == 'soneium' ) || (needs.get-network.outputs.network == 'world' ) || (needs.get-network.outputs.network == 'ctc' ) || (needs.get-network.outputs.network == 'apechain' ) || (needs.get-network.outputs.network == 'phrs' )}}
139141
environment: mainnet
140142
steps:
141143
- uses: actions/checkout@v4
@@ -180,6 +182,7 @@ jobs:
180182
SOMNIA_EXPLORER_API_KEY: ${{ secrets.SOMNIA_EXPLORER_API_KEY }}
181183
SONEIUM_EXPLORER_API_KEY: ${{ secrets.SONEIUM_EXPLORER_API_KEY }}
182184
WORLD_EXPLORER_API_KEY: ${{ secrets.WORLD_EXPLORER_API_KEY }}
185+
CTC_EXPLORER_API_KEY: ${{ secrets.CTC_EXPLORER_API_KEY }}
183186
APECHAIN_EXPLORER_API_KEY: ${{ secrets.APECHAIN_EXPLORER_API_KEY }}
184187
PHAROS_EXPLORER_API_KEY: ${{ secrets.PHAROS_EXPLORER_API_KEY }}
185188
- name: Update release notes

.github/workflows/push.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
SOMNIA_EXPLORER_API_KEY: ${{ secrets.SOMNIA_EXPLORER_API_KEY }}
6060
SONEIUM_EXPLORER_API_KEY: ${{ secrets.SONEIUM_EXPLORER_API_KEY }}
6161
WORLD_EXPLORER_API_KEY: ${{ secrets.WORLD_EXPLORER_API_KEY }}
62+
CTC_EXPLORER_API_KEY: ${{ secrets.CTC_EXPLORER_API_KEY }}
6263
APECHAIN_EXPLORER_API_KEY: ${{ secrets.APECHAIN_EXPLORER_API_KEY }}
6364
PHAROS_EXPLORER_API_KEY: ${{ secrets.PHAROS_EXPLORER_API_KEY }}
6465
- run: npm run lint

hardhat.config.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const {
4444
SOMNIA_EXPLORER_API_KEY,
4545
SONEIUM_EXPLORER_API_KEY,
4646
WORLD_EXPLORER_API_KEY,
47+
CTC_EXPLORER_API_KEY,
4748
APECHAIN_EXPLORER_API_KEY,
4849
PHAROS_EXPLORER_API_KEY
4950
} = process.env;
@@ -403,6 +404,22 @@ const config: HardhatUserConfig = {
403404
`${PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT}`
404405
]
405406
},
407+
tctc: {
408+
url: `https://rpc.cc3-testnet.creditcoin.network`,
409+
accounts: [
410+
`${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`,
411+
`${PLACEHOLDER_KEY}`,
412+
`${PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT}`
413+
]
414+
},
415+
ctc: {
416+
url: `https://mainnet3.creditcoin.network`,
417+
accounts: [
418+
`${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`,
419+
`${PLACEHOLDER_KEY}`,
420+
`${PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT}`
421+
]
422+
},
406423
tapechain: {
407424
url: `https://rpc.curtis.apechain.com`,
408425
accounts: [
@@ -499,6 +516,9 @@ const config: HardhatUserConfig = {
499516
//World
500517
worldTestnet: `${WORLD_EXPLORER_API_KEY}`,
501518
worldMainnet: `${WORLD_EXPLORER_API_KEY}`,
519+
//Creditcoin
520+
ctcTestnet: `${CTC_EXPLORER_API_KEY}`,
521+
ctcMainnet: `${CTC_EXPLORER_API_KEY}`,
502522
//Apechain
503523
apechainTestnet: `${APECHAIN_EXPLORER_API_KEY}`,
504524
apechainMainnet: `${APECHAIN_EXPLORER_API_KEY}`,
@@ -655,6 +675,22 @@ const config: HardhatUserConfig = {
655675
browserURL: 'https://worldscan.org/'
656676
}
657677
},
678+
{
679+
network: 'ctcTestnet',
680+
chainId: 102031,
681+
urls: {
682+
apiURL: 'https://creditcoin-testnet.blockscout.com/api',
683+
browserURL: 'https://creditcoin-testnet.blockscout.com/'
684+
}
685+
},
686+
{
687+
network: 'ctcMainnet',
688+
chainId: 102030,
689+
urls: {
690+
apiURL: 'https://creditcoin.blockscout.com/api',
691+
browserURL: 'https://creditcoin.blockscout.com/'
692+
}
693+
},
658694
{
659695
network: 'apechainTestnet',
660696
chainId: 33111,

scripts/deploy.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ async function main() {
226226
forwarderFactoryContractName = 'ForwarderFactoryV4';
227227
contractPath = `contracts/${walletImplementationContractName}.sol:${walletImplementationContractName}`;
228228
break;
229+
//Creditcoin
230+
case 102031:
231+
case 102030:
229232
//wemix
230233
case 1112:
231234
case 1111:

0 commit comments

Comments
 (0)