Skip to content

Commit

Permalink
Update smoke test storage hashes
Browse files Browse the repository at this point in the history
This branch has added extra functions to IColony, which as discussed
in #644 means these variables need updating.
  • Loading branch information
area authored and kronosapiens committed Sep 17, 2020
1 parent 9b4f9e3 commit 520a6e3
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 62 deletions.
51 changes: 51 additions & 0 deletions docs/_Interface_IColony.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,19 @@ Deobligate the user some amount of tokens, releasing the stake.
|_amount|uint256|Amount of internal token we are deobligating.


### `deprecateExtension`

Upgrade an extension in a colony. Secured function to authorised members.


**Parameters**

|Name|Type|Description|
|---|---|---|
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
|deprecated|bool|Whether to deprecate the extension or not


### `emitDomainReputationPenalty`

Emit a negative domain reputation update. Available only to Arbitration role holders
Expand Down Expand Up @@ -881,6 +894,19 @@ Called once when the colony is created to initialise certain storage slot values
|_token|address|Address of the colony ERC20 Token


### `installExtension`

Install an extension to the colony. Secured function to authorised members.


**Parameters**

|Name|Type|Description|
|---|---|---|
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
|version|uint256|The new extension version to install


### `makeExpenditure`

Add a new expenditure in the colony. Secured function to authorised members.
Expand Down Expand Up @@ -1536,6 +1562,18 @@ Transfer some amount of obligated tokens. Can be called by the arbitration role.
|_recipient|address|Recipient of the transferred tokens.


### `uninstallExtension`

Uninstall an extension from a colony. Secured function to authorised members.


**Parameters**

|Name|Type|Description|
|---|---|---|
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier


### `updateColonyOrbitDB`

Update a colony's orbitdb address. Can only be called by a colony with a registered subdomain
Expand All @@ -1561,6 +1599,19 @@ Upgrades a colony to a new Colony contract version `_newVersion`.
|_newVersion|uint|The target version for the upgrade


### `upgradeExtension`

Upgrade an extension in a colony. Secured function to authorised members.


**Parameters**

|Name|Type|Description|
|---|---|---|
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
|newVersion|uint256|The version to upgrade to (must be one larger than the current version)


### `userCanSetRoles`

Check whether a given user can modify roles in the target domain `_childDomainId`. Mostly a convenience function to provide a uniform interface for extension contracts validating permissions
Expand Down
97 changes: 44 additions & 53 deletions docs/_Interface_IColonyNetwork.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,16 @@ Adds a new Colony contract version and the address of associated `_resolver` con

### `addExtension`

Add a new extension/version to the Extensions repository.
Add a new extension resolver to the Extensions repository.

*Note: The extension version is queried from the resolver itself.*
*Note: Can only be called by the MetaColony.*

**Parameters**

|Name|Type|Description|
|---|---|---|
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
|resolver|address|The deployed resolver containing the extension contract logic
|roles|bytes32|A bytes array containing the roles required by the extension


### `addr`
Expand Down Expand Up @@ -131,18 +130,15 @@ Used by a user to claim any mining rewards due to them. This will place them in

### `createColony`

Overload of the simpler `createColony` -- creates a new colony in the network with a variety of options
Creates a new colony in the network, at version 3

*Note: For the colony to mint tokens, token ownership must be transferred to the new colony*
*Note: This is now deprecated and will be removed in a future version*

**Parameters**

|Name|Type|Description|
|---|---|---|
|_tokenAddress|address|Address of an ERC20 token to serve as the colony token
|_version|uint256|The version of colony to deploy (pass 0 for the current version)
|_colonyName|string|The label to register (if null, no label is registered)
|_orbitdb|string|The path of the orbitDB database associated with the user profile
|_tokenAddress|address|Address of an ERC20 token to serve as the colony token.

**Return Parameters**

Expand All @@ -152,15 +148,17 @@ Overload of the simpler `createColony` -- creates a new colony in the network wi

### `createColony`

Creates a new colony in the network, at version 3
Creates a new colony in the network, with an optional ENS name

*Note: This is now deprecated and will be removed in a future version*
*Note: For the colony to mint tokens, token ownership must be transferred to the new colony*

**Parameters**

|Name|Type|Description|
|---|---|---|
|_tokenAddress|address|Address of an ERC20 token to serve as the colony token.
|_tokenAddress|address|Address of an ERC20 token to serve as the colony token
|_version|uint256|The version of colony to deploy (pass 0 for the current version)
|_colonyName|string|The label to register (if null, no label is registered)

**Return Parameters**

Expand All @@ -170,7 +168,7 @@ Creates a new colony in the network, at version 3

### `createColony`

Overload of the simpler `createColony` -- creates a new colony in the network with a variety of options
Overload of the simpler `createColony` -- creates a new colony in the network with a variety of options, at version 4

*Note: This is now deprecated and will be removed in a future version*

Expand All @@ -181,7 +179,7 @@ Overload of the simpler `createColony` -- creates a new colony in the network wi
|_tokenAddress|address|Address of an ERC20 token to serve as the colony token
|_version|uint256|The version of colony to deploy (pass 0 for the current version)
|_colonyName|string|The label to register (if null, no label is registered)
|_orbitdb|string|The path of the orbitDB database associated with the user profile
|_orbitdb|string|DEPRECATED Currently a no-op
|_useExtensionManager|bool|DEPRECATED Currently a no-op

**Return Parameters**
Expand All @@ -202,6 +200,19 @@ Create the Meta Colony, same as a normal colony plus the root skill.
|_tokenAddress|address|Address of the CLNY token


### `deprecateExtension`

Deprecate an extension in a colony. Can only be called by a Colony.


**Parameters**

|Name|Type|Description|
|---|---|---|
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
|deprecated|bool|Whether to deprecate the extension or not


### `deprecateSkill`

Mark a global skill as deprecated which stops new tasks and payments from using it.
Expand Down Expand Up @@ -316,56 +327,39 @@ Returns the address of the ENSRegistrar for the Network.

### `getExtensionInstallation`


Get an extension's installation.


**Parameters**

|Name|Type|Description|
|---|---|---|
|extensionId|bytes32|
|colony|address|
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
|colony|address|Address of the colony the extension is installed in

**Return Parameters**

|Name|Type|Description|
|---|---|---|
|address|address|
|installation|address|The address of the installed extension

### `getExtensionResolver`


Get an extension's resolver.


**Parameters**

|Name|Type|Description|
|---|---|---|
|extensionId|bytes32|
|version|uint256|

**Return Parameters**

|Name|Type|Description|
|---|---|---|
|address|address|

### `getExtensionRoles`




**Parameters**

|Name|Type|Description|
|---|---|---|
|extensionId|bytes32|
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
|version|uint256|Version of the extension

**Return Parameters**

|Name|Type|Description|
|---|---|---|
|bytes32|bytes32|
|resolver|address|The address of the deployed resolver

### `getFeeInverse`

Expand Down Expand Up @@ -633,16 +627,15 @@ Creates initial inactive reputation mining cycle.

### `installExtension`


Install an extension in a colony. Can only be called by a Colony.


**Parameters**

|Name|Type|Description|
|---|---|---|
|extensionId|bytes32|
|version|uint256|
|colony|address|
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
|version|uint256|Version of the extension to install


### `isColony`
Expand Down Expand Up @@ -812,7 +805,7 @@ Called to set the total per-cycle reputation reward, which will be split between

### `setReputationRootHash`

Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract.
This version of setReputationRootHash is deprecated and will be removed in a future release. It transparently calls the new version if it is called (essentially, removing the `reward` parameter.


**Parameters**
Expand All @@ -822,11 +815,12 @@ Set a new Reputation root hash and starts a new mining cycle. Can only be called
|newHash|bytes32|The reputation root hash
|newNLeaves|uint256|The updated leaves count value
|stakers|address[]|Array of users who submitted or backed the hash, being accepted here as the new reputation root hash
|reward|uint256|Amount of CLNY to be distributed as reward to miners (not used)


### `setReputationRootHash`

This version of setReputationRootHash is deprecated and will be removed in a future release. It transparently calls the new version if it is called (essentially, removing the `reward` parameter.
Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract.


**Parameters**
Expand All @@ -836,7 +830,6 @@ This version of setReputationRootHash is deprecated and will be removed in a fut
|newHash|bytes32|The reputation root hash
|newNLeaves|uint256|The updated leaves count value
|stakers|address[]|Array of users who submitted or backed the hash, being accepted here as the new reputation root hash
|reward|uint256|Amount of CLNY to be distributed as reward to miners (not used)


### `setTokenLocking`
Expand Down Expand Up @@ -915,15 +908,14 @@ Query if a contract implements an interface

### `uninstallExtension`


Uninstall an extension in a colony. Can only be called by a Colony.


**Parameters**

|Name|Type|Description|
|---|---|---|
|extensionId|bytes32|
|colony|address|
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier


### `unstakeForMining`
Expand Down Expand Up @@ -964,13 +956,12 @@ Update a user's orbitdb address. Can only be called by a user with a registered

### `upgradeExtension`


Upgrade an extension in a colony. Can only be called by a Colony.


**Parameters**

|Name|Type|Description|
|---|---|---|
|extensionId|bytes32|
|colony|address|
|newVersion|uint256|
|extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
|newVersion|uint256|Version of the extension to upgrade to (must be one greater than current)
1 change: 0 additions & 1 deletion docs/_Interface_IMetaColony.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Add a new extension/version to the Extensions repository.
|---|---|---|
|_extensionId|bytes32|keccak256 hash of the extension name, used as an indentifier
|_resolver|address|The deployed resolver containing the extension contract logic
|_roles|bytes32|A byte array containing the roles required by the extension


### `addGlobalSkill`
Expand Down
12 changes: 4 additions & 8 deletions test-smoke/colony-storage-consistent.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,11 @@ contract("Contract Storage", (accounts) => {
console.log("miningCycleStateHash:", miningCycleAccount.stateRoot.toString("hex"));
console.log("tokenLockingStateHash:", tokenLockingAccount.stateRoot.toString("hex"));

expect(colonyNetworkAccount.stateRoot.toString("hex")).to.equal("4795c6cf36580719d2b3122e8a2d314024e5eb67ef0925dc35c5bbbcb26e20c9");

expect(colonyAccount.stateRoot.toString("hex")).to.equal("8de351231d2738f6d6f3a680e986461029afb48b1638e06a40b07e70604dab66");

expect(colonyNetworkAccount.stateRoot.toString("hex")).to.equal("db135eb0f95ae2cc2ae50c14a5f66ee497646024feedcd1f87cc013068989d4a");
expect(colonyAccount.stateRoot.toString("hex")).to.equal("d03908010dec47dd2a1b8e6101e30d3c3546130905e0bdff4b39a0597d0f7980");
expect(metaColonyAccount.stateRoot.toString("hex")).to.equal("867fa1b5d2ada64ae601031e0654f9b2d7a1cc024493fac71e13ef91fb862119");

expect(miningCycleAccount.stateRoot.toString("hex")).to.equal("47ed02166271709fee6816f42d511e3d0c56e4ee5fc1f2e24c5f05a3954d0292");

expect(tokenLockingAccount.stateRoot.toString("hex")).to.equal("97a15b06a12c2300869568a1b32f6f60c9b87d0102ee5de7f52290b49c0eb891");
expect(miningCycleAccount.stateRoot.toString("hex")).to.equal("6e06f76ad3caff1649fad8e2ae3f42eef7bb9c55dab13e6514d45ec65864993f");
expect(tokenLockingAccount.stateRoot.toString("hex")).to.equal("27ec15478ee91943b5d98205085f20fa7255f4b77747931fbf488c5d0d0bfbaa");
});
});
});

0 comments on commit 520a6e3

Please sign in to comment.