Skip to content

Commit

Permalink
Rename deployCreateXIfNeeded
Browse files Browse the repository at this point in the history
  • Loading branch information
area committed Sep 26, 2024
1 parent ca38fe8 commit 569309e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
36 changes: 18 additions & 18 deletions docs/interfaces/icolonynetwork.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,24 +209,6 @@ Calculate raw miner weight in WADs.
|---|---|---|
|_minerWeight|uint256|The weight of miner reward

### `checkDomainTokenReceiverDeployed(uint256 _domainId):address domainTokenReceiverAddress`

Function called by a colony to ensure that a DomainTokenReceiver has been deployed and set up correctly for a particular domain.

*Note: Should only be called by a colony.*

**Parameters**

|Name|Type|Description|
|---|---|---|
|_domainId|uint256|The domainId of the domain to check the deployment for

**Return Parameters**

|Name|Type|Description|
|---|---|---|
|domainTokenReceiverAddress|address|The address of the DomainTokenReceiver

### `claimMiningReward(address _recipient)`

Used by a user to claim any mining rewards due to them. This will place them in their balance or pending balance, as appropriate.
Expand Down Expand Up @@ -984,6 +966,24 @@ Get token locking contract address.
|---|---|---|
|_lockingAddress|address|Token locking contract address

### `idempotentDeployDomainTokenReceiver(uint256 _domainId):address domainTokenReceiverAddress`

Function called by a colony to ensure that a DomainTokenReceiver has been deployed and set up correctly for a particular domain.

*Note: Should only be called by a colony.*

**Parameters**

|Name|Type|Description|
|---|---|---|
|_domainId|uint256|The domainId of the domain to check the deployment for

**Return Parameters**

|Name|Type|Description|
|---|---|---|
|domainTokenReceiverAddress|address|The address of the DomainTokenReceiver

### `initialise(address _resolver, uint256 _version)`

Initialises the colony network by setting the first Colony version resolver to `_resolver` address.
Expand Down
2 changes: 1 addition & 1 deletion helpers/test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,7 @@ exports.isXdai = async function isXdai() {
return chainId === XDAI_CHAINID || chainId === FORKED_XDAI_CHAINID;
};

exports.deployCreateXIfNeeded = async function deployCreateXIfNeeded() {
exports.idempotentDeployCreateX = async function idempotentDeployCreateX() {
// Deploy CreateX if it's not already deployed
const createXCode = await web3.eth.getCode(CREATEX_ADDRESS);
if (createXCode === "0x") {
Expand Down
4 changes: 2 additions & 2 deletions test/truffle-fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const {
setupDomainTokenReceiverResolver,
} = require("../helpers/upgradable-contracts");
const { FORKED_XDAI_CHAINID, XDAI_CHAINID, UINT256_MAX, CREATEX_ADDRESS } = require("../helpers/constants");
const { getChainId, hardhatRevert, hardhatSnapshot, deployCreateXIfNeeded, isXdai } = require("../helpers/test-helper");
const { getChainId, hardhatRevert, hardhatSnapshot, idempotentDeployCreateX, isXdai } = require("../helpers/test-helper");

module.exports = async () => {
if (postFixtureSnapshotId) {
Expand Down Expand Up @@ -143,7 +143,7 @@ async function deployContracts() {
const reputationMiningCycleBinarySearch = await ReputationMiningCycleBinarySearch.new();
ReputationMiningCycleBinarySearch.setAsDeployed(reputationMiningCycleBinarySearch);

await deployCreateXIfNeeded();
await idempotentDeployCreateX();
}

async function setupColonyNetwork() {
Expand Down

0 comments on commit 569309e

Please sign in to comment.