Skip to content

Commit 31f4882

Browse files
authored
Remove use of package keyword (#720)
* Remoce use of package keyword * Add decision to executed event * Update UpgradeScheme.sol
1 parent cc6be2f commit 31f4882

File tree

3 files changed

+73
-33
lines changed

3 files changed

+73
-33
lines changed

contracts/schemes/UpgradeScheme.sol

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ contract UpgradeScheme is VotingMachineCallbacks, ProposalExecuteInterface, Init
2727

2828
event ProposalExecuted(
2929
address indexed _avatar,
30-
bytes32 indexed _proposalId
30+
bytes32 indexed _proposalId,
31+
bool _decision
3132
);
3233

3334
event ProposalDeleted(address indexed _avatar, bytes32 indexed _proposalId);
@@ -45,7 +46,7 @@ contract UpgradeScheme is VotingMachineCallbacks, ProposalExecuteInterface, Init
4546
IntVoteInterface public votingMachine;
4647
bytes32 public voteParams;
4748
Avatar public avatar;
48-
Package public package;
49+
Package public arcPackage;
4950

5051
/**
5152
* @dev initialize
@@ -66,7 +67,7 @@ contract UpgradeScheme is VotingMachineCallbacks, ProposalExecuteInterface, Init
6667
avatar = _avatar;
6768
votingMachine = _votingMachine;
6869
voteParams = _voteParams;
69-
package = _package;
70+
arcPackage = _package;
7071
}
7172

7273
/**
@@ -89,7 +90,7 @@ contract UpgradeScheme is VotingMachineCallbacks, ProposalExecuteInterface, Init
8990
bytes32 contractNameBytes = proposal.contractsNames[i];
9091
string memory contractName = contractNameBytes.toStr();
9192
address updatedImp = ImplementationProvider(
92-
package.getContract(proposal.packageVersion)
93+
arcPackage.getContract(proposal.packageVersion)
9394
).getImplementation(contractName);
9495

9596
Controller controller = Controller(avatar.owner());
@@ -103,7 +104,7 @@ contract UpgradeScheme is VotingMachineCallbacks, ProposalExecuteInterface, Init
103104

104105
delete organizationProposals[_proposalId];
105106
emit ProposalDeleted(address(avatar), _proposalId);
106-
emit ProposalExecuted(address(avatar), _proposalId);
107+
emit ProposalExecuted(address(avatar), _proposalId, _decision == 1);
107108
return true;
108109
}
109110

@@ -129,11 +130,11 @@ contract UpgradeScheme is VotingMachineCallbacks, ProposalExecuteInterface, Init
129130
_contractsNames.length == _contractsToUpgrade.length,
130131
"upgrade name and address arrays must have equal lengths"
131132
);
132-
require(package.hasVersion(_packageVersion), "Specified version doesn't exist in the Package");
133+
require(arcPackage.hasVersion(_packageVersion), "Specified version doesn't exist in the Package");
133134
for (uint256 i = 0; i < _contractsToUpgrade.length; i++) {
134135
require(
135136
ImplementationProvider(
136-
package.getContract(_packageVersion)
137+
arcPackage.getContract(_packageVersion)
137138
).getImplementation(_contractsNames[i].toStr()) != address(0),
138139
"Contract name does not exist in ArcHive package"
139140
);

package-lock.json

Lines changed: 64 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@daostack/arc-experimental",
3-
"version": "0.1.1-rc.6",
3+
"version": "0.1.1-rc.7",
44
"description": "A platform for building DAOs",
55
"files": [
66
"contracts/",

0 commit comments

Comments
 (0)