Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Commit ba8e3bb

Browse files
jbcarpanellispalladino
authored andcommitted
Set proxy admin on first create
1 parent 06cb6c4 commit ba8e3bb

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

packages/cli/src/models/network/NetworkController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ export default class NetworkController {
786786
address: instance.address,
787787
version: semanticVersionToString(packageVersion),
788788
implementation: implementationAddress,
789-
admin: admin || this.networkFile.proxyAdminAddress,
789+
admin: admin || this.networkFile.proxyAdminAddress || (await this.project.getAdminAddress()),
790790
kind,
791791
});
792792
return instance;

packages/cli/test/scripts/create.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ contract('create script', function([_, owner, otherAdmin]) {
116116
proxyImplementation.should.equalIgnoreCase(minimal);
117117
}
118118

119+
if(!minimal) {
120+
proxyInfo.admin.should.not.be.undefined;
121+
}
122+
119123
return proxyInfo;
120124
};
121125

0 commit comments

Comments
 (0)