Skip to content

Commit 27c7099

Browse files
committed
refactor: remove ADMIN_ADDRESS references from deployment and configuration files
1 parent cce1b35 commit 27c7099

File tree

4 files changed

+1
-22
lines changed

4 files changed

+1
-22
lines changed

.github/workflows/sharing-smart-contract-deploy.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ jobs:
8585
RPC_URL: ${{ secrets.RPC_URL }}
8686
DEPLOYER_PRIVATE_KEY: ${{ secrets.DEPLOYER_PRIVATE_KEY }}
8787
ADMIN_PRIVATE_KEY: ${{ secrets.ADMIN_PRIVATE_KEY }}
88-
ADMIN_ADDRESS: ${{ vars.ADMIN_ADDRESS }}
8988
POCO_ADDRESS: ${{ vars.POCO_ADDRESS }}
9089
DATASET_REGISTRY_ADDRESS: ${{ vars.DATASET_REGISTRY_ADDRESS }}
9190
run: |

packages/sharing-smart-contract/.env.template

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ DEPLOYER_PRIVATE_KEY=...
44
# wallet used for admin operations
55
ADMIN_PRIVATE_KEY=...
66

7-
ADMIN_ADDRESS=...
8-
97
# environment to use for configuration (prod/staging). The default is prod.
108
ENV=...
119

packages/sharing-smart-contract/config/env.cjs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ const envSchema = z.object({
2222
.optional()
2323
.or(z.literal('')),
2424

25-
// Address of the admin wallet (alternative to ADMIN_PRIVATE_KEY)
26-
ADMIN_ADDRESS: z
27-
.string()
28-
.regex(addressRegex, 'Invalid address format')
29-
.optional()
30-
.or(z.literal('')),
31-
3225
// environment to use for configuration (prod/staging)
3326
ENV: z.enum(['prod', 'staging'], 'ENV must be either "prod" or "staging"').default('prod'),
3427

packages/sharing-smart-contract/ignition/modules/DataProtectorSharingModule.cjs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,6 @@ module.exports = buildModule('DataProtectorSharingModule', (m) => {
1717
`Using proxy admin owner: ${proxyAdminOwner} (index: ${env.ADMIN_PRIVATE_KEY ? 1 : 0})`,
1818
);
1919

20-
// Determine the admin address for initialization
21-
// Priority: ADMIN_ADDRESS env var > admin account from private key > deployer account
22-
let adminAddress;
23-
if (env.ADMIN_ADDRESS) {
24-
adminAddress = env.ADMIN_ADDRESS;
25-
console.log(`Using admin address from env: ${adminAddress}`);
26-
} else {
27-
adminAddress = proxyAdminOwner;
28-
console.log(`Using admin address from account: ${adminAddress}`);
29-
}
30-
3120
const pocoAddress = env.POCO_ADDRESS || defaultPocoAddress;
3221
const datasetRegistryAddress = env.DATASET_REGISTRY_ADDRESS || defaultDatasetRegistryAddress;
3322

@@ -64,7 +53,7 @@ module.exports = buildModule('DataProtectorSharingModule', (m) => {
6453
[
6554
dataProtectorSharingImpl,
6655
proxyAdminOwner,
67-
m.encodeFunctionCall(dataProtectorSharingImpl, 'initialize', [adminAddress]),
56+
m.encodeFunctionCall(dataProtectorSharingImpl, 'initialize', [proxyAdminOwner]),
6857
],
6958
{
7059
id: 'DataProtectorSharingProxy',

0 commit comments

Comments
 (0)