Skip to content

Commit

Permalink
Update storage tests, revert functional contract change
Browse files Browse the repository at this point in the history
  • Loading branch information
area committed Sep 20, 2022
1 parent 6cc8db3 commit 7d0984e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
10 changes: 10 additions & 0 deletions contracts/extensions/votingReputation/IVotingReputation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,16 @@ interface IVotingReputation is IColonyExtension, VotingReputationDataTypes {
/// @return _penalty The reputation penalty (if any)
function getStakerReward(uint256 _motionId, address _staker, uint256 _vote) external view returns (uint256 _reward, uint256 _penalty);

/// @notice Create the action that should be taken based on the passed action to appropriately
/// set the claim window of an expenditure from starting.
/// @param _action The action being voted on
/// @param _value The value to set the claim delay to
/// @return _delayAction The delay action
/// @dev Not expected to be used directly, could be made private in the future
function createClaimDelayAction(bytes memory _action, uint256 _value)
external
returns (bytes memory _delayAction);

/// @notice Claim the staker's reward from a motion that was created with v4 of the extension, and is
/// now missing and cannot be interacted with via the normal claim function.
/// @param _motionId The id of the motion
Expand Down
2 changes: 1 addition & 1 deletion contracts/extensions/votingReputation/VotingReputation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ contract VotingReputation is ColonyExtension, PatriciaTreeProofs, BasicMetaTrans
}

function createClaimDelayAction(bytes memory action, uint256 value)
internal
public
returns (bytes memory)
{
// See https://solidity.readthedocs.io/en/develop/abi-spec.html#use-of-dynamic-types
Expand Down
19 changes: 19 additions & 0 deletions docs/interfaces/votingreputation.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,25 @@ Claim the staker's reward
|_vote|uint256|The side being supported (0 = NAY, 1 = YAY)


### `createClaimDelayAction(bytes memory _action, uint256 _value):bytes _delayAction`

Create the action that should be taken based on the passed action to appropriately set the claim window of an expenditure from starting.

*Note: Not expected to be used directly, could be made private in the future*

**Parameters**

|Name|Type|Description|
|---|---|---|
|_action|bytes|The action being voted on
|_value|uint256|The value to set the claim delay to

**Return Parameters**

|Name|Type|Description|
|---|---|---|
|_delayAction|bytes|The delay action

### `createDomainMotion(uint256 _domainId, uint256 _childSkillIndex, bytes memory _action, bytes memory _key, bytes memory _value, uint256 _branchMask, bytes32[] memory _siblings)`

Create a motion in any domain (DEPRECATED)
Expand Down
4 changes: 2 additions & 2 deletions test-smoke/colony-storage-consistent.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ contract("Contract Storage", (accounts) => {
console.log("miningCycleStateHash:", miningCycleStateHash);
console.log("tokenLockingStateHash:", tokenLockingStateHash);

expect(colonyNetworkStateHash).to.equal("0x6dc661b568dcd2878e8eb4612dff151713ec0be6be0e3e9f97c3004cc1ecf91b");
expect(colonyStateHash).to.equal("0xfd8b6190cb19b1231bca296d58cc5c1a25930f288925bf713c25f20e3560642e");
expect(colonyNetworkStateHash).to.equal("0xd274dba9b9c02954cf11a9f6b968560bf03bb7f6a3c2b6844409a9dbf8fb93c2");
expect(colonyStateHash).to.equal("0xa49d332bbdd1951f062b1ffc40bbeb7b3a0a16fd2cd1879fca8348eda7b5b587");
expect(metaColonyStateHash).to.equal("0xff23657f917385e6a94f328907443fef625f08b8b3224e065a53b690f91be0bb");
expect(miningCycleStateHash).to.equal("0x264d4a83e21fef92f687f9fabacae9370966b0b30ebc15307653c4c3d33a0035");
expect(tokenLockingStateHash).to.equal("0x983a56a52582ce548e98659e15a9baa5387886fcb0ac1185dbd746dfabf00338");
Expand Down

0 comments on commit 7d0984e

Please sign in to comment.