Skip to content

Commit

Permalink
Fix deployments type
Browse files Browse the repository at this point in the history
  • Loading branch information
alavarello committed Dec 30, 2024
1 parent b199e5f commit f1df33e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-rivers-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@secure-ci/core': patch
---

Fix deployments types
12 changes: 11 additions & 1 deletion deployments.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
export const deployments = {
type DeploymentKeys =
| 'ProxyModule#SCI'
| 'SciRegistry#SciRegistry'
| 'EnsRegistrar#EnsRegistrar'
| 'PublicListVerifier#PublicListVerifier'
| 'ProxyModule#TransparentUpgradeableProxy'
| 'ProxyModule#ProxyAdmin'
| 'SciModule#SCI'
| 'SciRegstrar#SciRegistrar';

export const deployments: { [key: string]: { [key: DeploymentKeys]: string } } = {
'10': {
'ProxyModule#SCI': '0xe324A37594561b3Bfe3f535Aa7108224a703710F',
'SciRegistry#SciRegistry': '0xaDD75Aecd98f0ADAD899729c88BfED4f8951c02A',
Expand Down
17 changes: 16 additions & 1 deletion scripts/build-deployment-address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,22 @@ async function main() {
}

// Convert the output data into a TypeScript file
const tsContent = `export const deployments = ${JSON.stringify(outputData, null, 2)
const tsContent =
`type DeploymentKeys =
| 'ProxyModule#SCI'
| 'SciRegistry#SciRegistry'
| 'EnsRegistrar#EnsRegistrar'
| 'PublicListVerifier#PublicListVerifier'
| 'ProxyModule#TransparentUpgradeableProxy'
| 'ProxyModule#ProxyAdmin'
| 'SciModule#SCI'
| 'SciRegstrar#SciRegistrar';
export const deployments: { [key: string]: { [key: DeploymentKeys]: string } } = ${JSON.stringify(
outputData,
null,
2,
)
.replace(/"/g, "'")
.replace(/(?<=['}\]]),?\n/g, ',\n')};\n`;

Expand Down

0 comments on commit f1df33e

Please sign in to comment.