Skip to content

Commit f2a8604

Browse files
committed
Remove deprecated moveFundsBetweenPots transactions
1 parent 427dbf3 commit f2a8604

File tree

3 files changed

+2
-47
lines changed

3 files changed

+2
-47
lines changed

test/contracts-network/colony-expenditure.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,7 @@ contract("Colony Expenditure", (accounts) => {
189189
it("should error if the expenditure does not exist", async () => {
190190
await checkErrorRevert(colony.setExpenditureSkills(100, [SLOT0], [localSkillId]), "colony-expenditure-does-not-exist");
191191
await checkErrorRevert(colony.transferExpenditure(100, USER), "colony-expenditure-does-not-exist");
192-
await checkErrorRevert(
193-
colony.transferExpenditureViaArbitration(0, UINT256_MAX, 100, USER, { from: ARBITRATOR }),
194-
"colony-expenditure-does-not-exist",
195-
);
192+
await checkErrorRevert(colony.cancelExpenditureViaArbitration(0, UINT256_MAX, 100, { from: ARBITRATOR }), "colony-expenditure-does-not-exist");
196193
await checkErrorRevert(colony.cancelExpenditure(100), "colony-expenditure-does-not-exist");
197194
await checkErrorRevert(colony.lockExpenditure(100), "colony-expenditure-does-not-exist");
198195
await checkErrorRevert(colony.finalizeExpenditure(100), "colony-expenditure-does-not-exist");

test/extensions/multisig-permissions.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,6 @@ contract("Multisig Permissions", (accounts) => {
252252
);
253253
});
254254

255-
it("can't propose an action that summarises to a forbidden action", async () => {
256-
const action = await encodeTxData(colony, "moveFundsBetweenPots", [1, 2, 3, 4, 5, 6, ADDRESS_ZERO]);
257-
await checkErrorRevert(multisigPermissions.createMotion(1, UINT256_MAX, [ADDRESS_ZERO], [action]), "colony-action-summary-forbidden-sig");
258-
});
259-
260255
it("can propose an action requiring the same permissions for multiple actions in the same domain", async () => {
261256
await setRootRoles(multisigPermissions, USER2, rolesToBytes32([ARCHITECTURE_ROLE]));
262257

@@ -865,7 +860,7 @@ contract("Multisig Permissions", (accounts) => {
865860
const d1 = await colony.getDomain(1);
866861
const d2 = await colony.getDomain(2);
867862

868-
await colony.moveFundsBetweenPots(1, UINT256_MAX, 0, d1.fundingPotId, d2.fundingPotId, WAD, token.address);
863+
await colony.moveFundsBetweenPots(1, UINT256_MAX, 1, UINT256_MAX, 0, d1.fundingPotId, d2.fundingPotId, WAD, token.address);
869864

870865
await colony.installExtension(ONE_TX_PAYMENT, oneTxPaymentVersion);
871866
const oneTxPaymentAddress = await colonyNetwork.getExtensionInstallation(ONE_TX_PAYMENT, colony.address);

test/extensions/voting-rep.js

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,9 +1822,6 @@ contract("Voting Reputation", (accounts) => {
18221822
});
18231823

18241824
it("can correctly summarize a multicall action", async () => {
1825-
const OLD_MOVE_FUNDS_SIG = soliditySha3("moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,address)").slice(0, 10);
1826-
// NB This is still not a full call, but it's long enough that it has a permissions signature
1827-
const OLD_MOVE_FUNDS_CALL = `${OLD_MOVE_FUNDS_SIG}${"0".repeat(63)}1${bn2bytes32(UINT256_MAX).slice(2)}`;
18281825
const SET_EXPENDITURE_STATE = soliditySha3("setExpenditureState(uint256,uint256,uint256,uint256,bool[],bytes32[],bytes32)").slice(0, 10);
18291826
const SET_EXPENDITURE_PAYOUT = soliditySha3("setExpenditurePayout(uint256,uint256,uint256,uint256,address,uint256)").slice(0, 10);
18301827

@@ -1857,8 +1854,6 @@ contract("Voting Reputation", (accounts) => {
18571854
const action12 = await encodeTxData(tokenLocking, "obligateStake", [USER0, WAD, token.address]);
18581855
const action13 = await encodeTxData(tokenLocking, "obligateStake", [USER1, WAD, token.address]);
18591856

1860-
const action14 = await encodeTxData(colony, "moveFundsBetweenPots", [1, UINT256_MAX, 1, 1, 1, 1, 1, UINT256_MAX, token.address]);
1861-
18621857
let multicall;
18631858
let summary;
18641859

@@ -1869,11 +1864,6 @@ contract("Voting Reputation", (accounts) => {
18691864
expect(summary.expenditureId).to.eq.BN(expenditure2Id);
18701865
expect(summary.domainSkillId).to.eq.BN(domain3.skillId);
18711866

1872-
// Blacklisted function
1873-
multicall = await encodeTxData(colony, "multicall", [[OLD_MOVE_FUNDS_CALL, action14]]);
1874-
summary = await voting.getActionSummary(multicall, ADDRESS_ZERO);
1875-
await checkErrorRevertEstimateGas(voting.getActionSummary.estimateGas(multicall, ADDRESS_ZERO), "colony-action-summary-forbidden-sig");
1876-
18771867
// Special NO_ACTION
18781868
multicall = await encodeTxData(colony, "multicall", [[action9, NO_ACTION]]);
18791869
summary = await voting.getActionSummary(multicall, ADDRESS_ZERO);
@@ -3121,33 +3111,6 @@ contract("Voting Reputation", (accounts) => {
31213111
expect(await voting.getMotionState(motionId)).to.eq.BN(FINALIZED);
31223112
});
31233113

3124-
it("cannot let an invalid motion involving multicalling OLD_MOVE_FUNDS be finalized", async () => {
3125-
const action1 = await encodeTxData(colony, "moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,address)", [
3126-
1,
3127-
0,
3128-
2,
3129-
0,
3130-
0,
3131-
0,
3132-
ADDRESS_ZERO,
3133-
]);
3134-
const multicall = await encodeTxData(colony, "multicall", [[action1]]);
3135-
3136-
await voting.createMotion(1, UINT256_MAX, ADDRESS_ZERO, multicall, domain1Key, domain1Value, domain1Mask, domain1Siblings);
3137-
const motionId = await voting.getMotionCount();
3138-
3139-
await colony.approveStake(voting.address, 1, WAD, { from: USER0 });
3140-
await voting.stakeMotion(motionId, 1, UINT256_MAX, YAY, REQUIRED_STAKE, user0Key, user0Value, user0Mask, user0Siblings, { from: USER0 });
3141-
3142-
await forwardTime(STAKE_PERIOD, this);
3143-
3144-
expect(await voting.getMotionState(motionId)).to.eq.BN(FINALIZABLE);
3145-
3146-
await upgradeFromV9ToLatest(colony);
3147-
3148-
expect(await voting.getMotionState(motionId)).to.eq.BN(FINALIZED);
3149-
});
3150-
31513114
it("cannot let an invalid motion involving multicalling NO_ACTION be finalized", async () => {
31523115
const multicall = await encodeTxData(colony, "multicall", [[NO_ACTION]]);
31533116

0 commit comments

Comments
 (0)