From e80e60f799efca5f11ebf588d6f770779a2e894b Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 17 May 2019 17:12:25 +0300 Subject: [PATCH 1/4] Switch truffle to solc 0.5.8 --- .circleci/config.yml | 2 +- truffle.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0a5b84c8fe..c6d8aaa229 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ step_setup_global_packages: &step_setup_global_packages step_pull_solc_docker: &step_pull_solc_docker run: name: "Pull solc docker image" - command: docker pull ethereum/solc:0.5.6 + command: docker pull ethereum/solc:0.5.8 jobs: lint-and-unit-test: diff --git a/truffle.js b/truffle.js index 1a802ad165..67039b7d1c 100644 --- a/truffle.js +++ b/truffle.js @@ -44,7 +44,7 @@ module.exports = { }, compilers: { solc: { - version: "0.5.6", + version: "0.5.8", docker: true, settings: { optimizer: { From fd38d4ca532939a181886104e7f8538edca30fe7 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 17 May 2019 18:01:01 +0300 Subject: [PATCH 2/4] Skip a bunch of unused dappsys contracts in compilation as these have an issue with the latest solc 0.5.8 Logged https://github.com/dapphub/ds-note/issues/4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 80f5ec36d9..8847d9a939 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "generate:test:contracts": "bash ./scripts/generate-test-contracts.sh", "clean:test:contracts": "rimraf ./contracts/*Updated*.*", "clean:contracts": "rimraf ./build/contracts/*", - "provision:token:contracts": "truffle compile && truffle compile --contracts_directory 'lib/dappsys/[!proxy][!exec]*.sol' && bash ./scripts/provision-token-contracts.sh", + "provision:token:contracts": "truffle compile && truffle compile --contracts_directory 'lib/dappsys/[!note][!stop][!proxy][!thing][!token]*.sol' && bash ./scripts/provision-token-contracts.sh", "start:blockchain:client": "bash ./scripts/start-blockchain-client.sh", "stop:blockchain:client": "bash ./scripts/stop-blockchain-client.sh", "test:contracts": "npm run start:blockchain:client & truffle migrate --reset --compile-all && truffle test --network development", From 01d92a7486373ff660ccbb3346d5f4d266afc02f Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sun, 19 May 2019 16:05:27 +0300 Subject: [PATCH 3/4] Due to dapphub/ds-note#4 removed DSToken from tests and instead use instances of our own Token --- helpers/test-data-generator.js | 1 + test-gas-costs/gasCosts.js | 11 +++++---- test-upgrade/colony-network-upgrade.js | 8 ++++--- test-upgrade/colony-upgrade.js | 7 +++--- test/colony-funding.js | 5 ++-- test/colony-network-auction.js | 14 +++++++---- test/colony-network.js | 13 ++++++----- test/colony-payment.js | 5 ++-- test/colony-reward-payouts.js | 32 +++++++++++++++++--------- test/colony-task.js | 5 ++-- test/colony.js | 5 ++-- test/reputation-update.js | 5 ++-- test/token-locking.js | 8 ++++--- truffle.js | 2 +- 14 files changed, 75 insertions(+), 46 deletions(-) diff --git a/helpers/test-data-generator.js b/helpers/test-data-generator.js index af105dc3f6..c1c388364a 100644 --- a/helpers/test-data-generator.js +++ b/helpers/test-data-generator.js @@ -402,6 +402,7 @@ export async function setupColonyNetwork() { export async function setupRandomColony(colonyNetwork) { const tokenArgs = getTokenArgs(); const token = await Token.new(...tokenArgs); + await token.unlock(); const { logs } = await colonyNetwork.createColony(token.address); const { colonyAddress } = logs[0].args; diff --git a/test-gas-costs/gasCosts.js b/test-gas-costs/gasCosts.js index 89995c14b2..2aaa32d7d8 100644 --- a/test-gas-costs/gasCosts.js +++ b/test-gas-costs/gasCosts.js @@ -46,7 +46,7 @@ import { import ReputationMinerTestWrapper from "../packages/reputation-miner/test/ReputationMinerTestWrapper"; import MaliciousReputationMinerExtraRep from "../packages/reputation-miner/test/MaliciousReputationMinerExtraRep"; -const DSToken = artifacts.require("DSToken"); +const Token = artifacts.require("Token"); const IColony = artifacts.require("IColony"); const IMetaColony = artifacts.require("IMetaColony"); const IColonyNetwork = artifacts.require("IColonyNetwork"); @@ -88,7 +88,8 @@ contract("All", function(accounts) { await IColony.defaults({ gasPrice }); const otherTokenArgs = getTokenArgs(); - otherToken = await DSToken.new(otherTokenArgs[1]); + otherToken = await Token.new(...otherTokenArgs); + await otherToken.unlock(); await fundColonyWithTokens(colony, token, INITIAL_FUNDING); }); @@ -97,7 +98,8 @@ contract("All", function(accounts) { describe("Gas costs", function() { it("when working with the Colony Network", async function() { const tokenArgs = getTokenArgs(); - const colonyToken = await DSToken.new(tokenArgs[1]); + const colonyToken = await Token.new(...tokenArgs); + await colonyToken.unlock(); await colonyNetwork.createColony(colonyToken.address); }); @@ -281,7 +283,8 @@ contract("All", function(accounts) { const managerReputation = WAD.muln(100); const tokenArgs = getTokenArgs(); - const newToken = await DSToken.new(tokenArgs[1]); + const newToken = await Token.new(...tokenArgs); + await newToken.unlock(); const { logs } = await colonyNetwork.createColony(newToken.address); const { colonyAddress } = logs[0].args; const newColony = await IColony.at(colonyAddress); diff --git a/test-upgrade/colony-network-upgrade.js b/test-upgrade/colony-network-upgrade.js index 81ce359564..2a2f221235 100644 --- a/test-upgrade/colony-network-upgrade.js +++ b/test-upgrade/colony-network-upgrade.js @@ -2,7 +2,7 @@ /* eslint-disable prefer-arrow-callback */ import { getTokenArgs } from "../helpers/test-helper"; -const DSToken = artifacts.require("DSToken"); +const Token = artifacts.require("Token"); const IColonyNetwork = artifacts.require("IColonyNetwork"); const EtherRouter = artifacts.require("EtherRouter"); const Resolver = artifacts.require("Resolver"); @@ -20,12 +20,14 @@ contract("ColonyNetwork contract upgrade", function() { // Setup 2 test colonies const tokenArgs1 = getTokenArgs(); - const newToken = await DSToken.new(tokenArgs1[1]); + const newToken = await Token.new(...tokenArgs1); + await newToken.unlock(); let { logs } = await colonyNetwork.createColony(newToken.address); colonyAddress1 = logs[0].args.colonyAddress; const tokenArgs2 = getTokenArgs(); - const newToken2 = await DSToken.new(tokenArgs2[1]); + const newToken2 = await Token.new(...tokenArgs2); + await newToken2.unlock(); ({ logs } = await colonyNetwork.createColony(newToken2.address)); colonyAddress2 = logs[0].args.colonyAddress; diff --git a/test-upgrade/colony-upgrade.js b/test-upgrade/colony-upgrade.js index 12611264da..2467d1ba37 100644 --- a/test-upgrade/colony-upgrade.js +++ b/test-upgrade/colony-upgrade.js @@ -15,7 +15,7 @@ const ColonyPayment = artifacts.require("ColonyPayment"); const ColonyFunding = artifacts.require("ColonyFunding"); const UpdatedColony = artifacts.require("UpdatedColony"); const IUpdatedColony = artifacts.require("IUpdatedColony"); -const DSToken = artifacts.require("DSToken"); +const Token = artifacts.require("Token"); const ContractRecovery = artifacts.require("ContractRecovery"); contract("Colony contract upgrade", accounts => { @@ -43,7 +43,8 @@ contract("Colony contract upgrade", accounts => { dueDate = await currentBlockTime(); const tokenArgs = getTokenArgs(); - const colonyToken = await DSToken.new(tokenArgs[1]); + const colonyToken = await Token.new(...tokenArgs); + await colonyToken.unlock(); const { logs } = await colonyNetwork.createColony(colonyToken.address); const { colonyAddress } = logs[0].args; colony = await IColony.at(colonyAddress); @@ -52,7 +53,7 @@ contract("Colony contract upgrade", accounts => { colonyFunding = await ColonyFunding.new(); contractRecovery = await ContractRecovery.new(); const tokenAddress = await colony.getToken(); - token = await DSToken.at(tokenAddress); + token = await Token.at(tokenAddress); await makeTask({ colony, dueDate }); await makeTask({ colony, dueDate: dueDate + 1, hash: SPECIFICATION_HASH_UPDATED }); diff --git a/test/colony-funding.js b/test/colony-funding.js index 08047a88d2..35533ec461 100755 --- a/test/colony-funding.js +++ b/test/colony-funding.js @@ -30,7 +30,7 @@ chai.use(bnChai(web3.utils.BN)); const EtherRouter = artifacts.require("EtherRouter"); const IColonyNetwork = artifacts.require("IColonyNetwork"); -const DSToken = artifacts.require("DSToken"); +const Token = artifacts.require("Token"); contract("Colony Funding", accounts => { const MANAGER = accounts[0]; @@ -51,7 +51,8 @@ contract("Colony Funding", accounts => { await colony.setRewardInverse(100); const otherTokenArgs = getTokenArgs(); - otherToken = await DSToken.new(otherTokenArgs[0]); + otherToken = await Token.new(...otherTokenArgs); + await otherToken.unlock(); }); describe("when receiving tokens", () => { diff --git a/test/colony-network-auction.js b/test/colony-network-auction.js index 7e3e7511cd..4a877baf30 100644 --- a/test/colony-network-auction.js +++ b/test/colony-network-auction.js @@ -12,7 +12,7 @@ const { expect } = chai; chai.use(bnChai(web3.utils.BN)); const DutchAuction = artifacts.require("DutchAuction"); -const DSToken = artifacts.require("DSToken"); +const Token = artifacts.require("Token"); contract("Colony Network Auction", accounts => { const BIDDER_1 = accounts[1]; @@ -42,7 +42,8 @@ contract("Colony Network Auction", accounts => { await colonyNetwork.startNextCycle(); const args = getTokenArgs(); - token = await DSToken.new(args[1]); + token = await Token.new(...args); + await token.unlock(); await token.mint(colonyNetwork.address, quantity); const { logs, receipt } = await colonyNetwork.startTokenAuction(token.address); createAuctionTxReceipt = receipt; @@ -77,7 +78,8 @@ contract("Colony Network Auction", accounts => { it("should fail with zero quantity", async () => { const args = getTokenArgs(); - const otherToken = await DSToken.new(args[1]); + const otherToken = await Token.new(...args); + await otherToken.unlock(); await checkErrorRevert(colonyNetwork.startTokenAuction(otherToken.address)); }); @@ -104,7 +106,8 @@ contract("Colony Network Auction", accounts => { it("should set the minimum price correctly for quantity < 1e18", async () => { const args = getTokenArgs(); - const otherToken = await DSToken.new(args[1]); + const otherToken = await Token.new(...args); + await otherToken.unlock(); await otherToken.mint(colonyNetwork.address, WAD.divn(10)); const { logs } = await colonyNetwork.startTokenAuction(otherToken.address); const auctionAddress = logs[0].args.auction; @@ -353,7 +356,8 @@ contract("Colony Network Auction", accounts => { let otherToken; beforeEach(async () => { const args = getTokenArgs(); - otherToken = await DSToken.new(args[1]); + otherToken = await Token.new(...args); + await otherToken.unlock(); }); const auctionPropsLowQuantitiesLowPrice = [ diff --git a/test/colony-network.js b/test/colony-network.js index 4b86db4aec..f79f848ce8 100755 --- a/test/colony-network.js +++ b/test/colony-network.js @@ -16,7 +16,7 @@ const ENSRegistry = artifacts.require("ENSRegistry"); const EtherRouter = artifacts.require("EtherRouter"); const Resolver = artifacts.require("Resolver"); const IColonyNetwork = artifacts.require("IColonyNetwork"); -const DSToken = artifacts.require("DSToken"); +const Token = artifacts.require("Token"); contract("Colony Network", accounts => { const SAMPLE_RESOLVER = "0x65a760e7441cf435086ae45e14a0c8fc1080f54c"; @@ -115,7 +115,8 @@ contract("Colony Network", accounts => { }); it("should maintain correct count of colonies", async () => { - const token = await DSToken.new(getTokenArgs()[1]); + const token = await Token.new(...getTokenArgs()); + await token.unlock(); await colonyNetwork.createColony(token.address); await colonyNetwork.createColony(token.address); await colonyNetwork.createColony(token.address); @@ -146,7 +147,7 @@ contract("Colony Network", accounts => { }); it("should fail to create meta colony if it already exists", async () => { - const token = await DSToken.new(TOKEN_ARGS[1]); + const token = await Token.new(...TOKEN_ARGS); await checkErrorRevert(colonyNetwork.createMetaColony(token.address), "colony-meta-colony-exists-already"); }); @@ -174,7 +175,7 @@ contract("Colony Network", accounts => { }); it("should fail if ETH is sent", async () => { - const token = await DSToken.new(TOKEN_ARGS[1]); + const token = await Token.new(...TOKEN_ARGS); await checkErrorRevert(colonyNetwork.createColony(token.address, { value: 1, gas: createColonyGas })); const colonyNetworkBalance = await web3GetBalance(colonyNetwork.address); @@ -182,14 +183,14 @@ contract("Colony Network", accounts => { }); it("should log a ColonyAdded event", async () => { - const token = await DSToken.new(TOKEN_ARGS[1]); + const token = await Token.new(...TOKEN_ARGS); await expectEvent(colonyNetwork.createColony(token.address), "ColonyAdded"); }); }); describe("when getting existing colonies", () => { it("should allow users to get the address of a colony by its index", async () => { - const token = await DSToken.new(TOKEN_ARGS[1]); + const token = await Token.new(...TOKEN_ARGS); await colonyNetwork.createColony(token.address); await colonyNetwork.createColony(token.address); await colonyNetwork.createColony(token.address); diff --git a/test/colony-payment.js b/test/colony-payment.js index e9d3867b07..46bae7c4bd 100644 --- a/test/colony-payment.js +++ b/test/colony-payment.js @@ -14,7 +14,7 @@ chai.use(bnChai(web3.utils.BN)); const EtherRouter = artifacts.require("EtherRouter"); const IColonyNetwork = artifacts.require("IColonyNetwork"); const IMetaColony = artifacts.require("IMetaColony"); -const DSToken = artifacts.require("DSToken"); +const Token = artifacts.require("Token"); contract("Colony Payment", accounts => { const RECIPIENT = accounts[3]; @@ -38,7 +38,8 @@ contract("Colony Payment", accounts => { await fundColonyWithTokens(colony, token, WAD.muln(20)); const tokenArgs = getTokenArgs(); - otherToken = await DSToken.new(tokenArgs[1]); + otherToken = await Token.new(...tokenArgs); + await otherToken.unlock(); }); describe("when adding payments", () => { diff --git a/test/colony-reward-payouts.js b/test/colony-reward-payouts.js index 45febb6246..3856e220d4 100644 --- a/test/colony-reward-payouts.js +++ b/test/colony-reward-payouts.js @@ -32,7 +32,7 @@ const IColony = artifacts.require("IColony"); const IMetaColony = artifacts.require("IMetaColony"); const IColonyNetwork = artifacts.require("IColonyNetwork"); const ITokenLocking = artifacts.require("ITokenLocking"); -const DSToken = artifacts.require("DSToken"); +const Token = artifacts.require("Token"); const DSRoles = artifacts.require("DSRoles"); const contractLoader = new TruffleLoader({ @@ -75,7 +75,8 @@ contract("Colony Reward Payouts", accounts => { await colony.setRewardInverse(100); const otherTokenArgs = getTokenArgs(); - otherToken = await DSToken.new(otherTokenArgs[0]); + otherToken = await Token.new(...otherTokenArgs); + await otherToken.unlock(); await fundColonyWithTokens(colony, otherToken, initialFunding); await colony.mintTokens(initialFunding.muln(100).divn(99)); // Tke in to account 1% being siphoned off for rewards @@ -144,7 +145,8 @@ contract("Colony Reward Payouts", accounts => { it("should not be able to create reward payout if passed reputation is not from the correct colony", async () => { const tokenArgs = getTokenArgs(); - const newToken = await DSToken.new(tokenArgs[1]); + const newToken = await Token.new(...tokenArgs); + await newToken.unlock(); const { logs } = await colonyNetwork.createColony(newToken.address); const { colonyAddress } = logs[0].args; const newColony = await IColony.at(colonyAddress); @@ -262,7 +264,8 @@ contract("Colony Reward Payouts", accounts => { it("should not be able to start a reward payout if no one holds colony tokens", async () => { const tokenArgs = getTokenArgs(); - const newToken = await DSToken.new(tokenArgs[1]); + const newToken = await Token.new(...tokenArgs); + await newToken.unlock(); const { logs } = await colonyNetwork.createColony(newToken.address); const { colonyAddress } = logs[0].args; const newColony = await IColony.at(colonyAddress); @@ -298,7 +301,8 @@ contract("Colony Reward Payouts", accounts => { it("should be able to collect rewards from multiple payouts of different token", async () => { const tokenArgs = getTokenArgs(); - const newToken = await DSToken.new(tokenArgs[1]); + const newToken = await Token.new(...tokenArgs); + await newToken.unlock(); await fundColonyWithTokens(colony, newToken, initialFunding); const tx1 = await colony.startNextRewardPayout(newToken.address, ...colonyWideReputationProof); @@ -313,7 +317,8 @@ contract("Colony Reward Payouts", accounts => { it("should not be able to claim payout if colony-wide reputation is 0", async () => { const tokenArgs = getTokenArgs(); - const newToken = await DSToken.new(tokenArgs[1]); + const newToken = await Token.new(...tokenArgs); + await newToken.unlock(); const { logs } = await colonyNetwork.createColony(newToken.address); const { colonyAddress } = logs[0].args; const newColony = await IColony.at(colonyAddress); @@ -456,7 +461,8 @@ contract("Colony Reward Payouts", accounts => { it("should not be able to claim funds if previous payout is not claimed", async () => { const tokenArgs = getTokenArgs(); - const newToken = await DSToken.new(tokenArgs[1]); + const newToken = await Token.new(...tokenArgs); + await newToken.unlock(); await fundColonyWithTokens(colony, newToken, initialFunding); await colony.startNextRewardPayout(otherToken.address, ...colonyWideReputationProof); @@ -559,7 +565,8 @@ contract("Colony Reward Payouts", accounts => { it("should be able to collect payout from two colonies at the same time", async () => { // Setting up a new token and two colonies const tokenArgs = getTokenArgs(); - const newToken = await DSToken.new(tokenArgs[1]); + const newToken = await Token.new(...tokenArgs); + await newToken.unlock(); let { logs } = await colonyNetwork.createColony(newToken.address); let { colonyAddress } = logs[0].args; @@ -676,7 +683,8 @@ contract("Colony Reward Payouts", accounts => { it("should not be able to claim reward payout from a colony that didn't create it", async () => { // Setting up a new token and two colonies const tokenArgs = getTokenArgs(); - const newToken = await DSToken.new(tokenArgs[1]); + const newToken = await Token.new(...tokenArgs); + await newToken.unlock(); let { logs } = await colonyNetwork.createColony(newToken.address); let { colonyAddress } = logs[0].args; @@ -815,14 +823,16 @@ contract("Colony Reward Payouts", accounts => { total reputation/tokens: ${data.totalReputation.toString()}`, async () => { // Setting up a new token and colony const tokenArgs = getTokenArgs(); - const newToken = await DSToken.new(tokenArgs[1]); + const newToken = await Token.new(...tokenArgs); + await newToken.unlock(); let { logs } = await colonyNetwork.createColony(newToken.address); const { colonyAddress } = logs[0].args; await newToken.setOwner(colonyAddress); const newColony = await IColony.at(colonyAddress); const payoutTokenArgs = getTokenArgs(); - const payoutToken = await DSToken.new(payoutTokenArgs[0]); + const payoutToken = await Token.new(...payoutTokenArgs); + await payoutToken.unlock(); await fundColonyWithTokens(newColony, payoutToken, data.totalAmountOfPayoutTokens); // Issuing colony's internal tokens so they can be given to users in `bootstrapColony` await newColony.mintTokens(data.totalReputation); diff --git a/test/colony-task.js b/test/colony-task.js index 5a5f7a8d4f..f36e51e7f3 100644 --- a/test/colony-task.js +++ b/test/colony-task.js @@ -62,7 +62,7 @@ chai.use(bnChai(web3.utils.BN)); const EtherRouter = artifacts.require("EtherRouter"); const IMetaColony = artifacts.require("IMetaColony"); const IColonyNetwork = artifacts.require("IColonyNetwork"); -const DSToken = artifacts.require("DSToken"); +const Token = artifacts.require("Token"); const TaskSkillEditing = artifacts.require("TaskSkillEditing"); contract("ColonyTask", accounts => { @@ -89,7 +89,8 @@ contract("ColonyTask", accounts => { await colony.setAdministrationRole(1, 0, COLONY_ADMIN, 1, true); const otherTokenArgs = getTokenArgs(); - otherToken = await DSToken.new(otherTokenArgs[1]); + otherToken = await Token.new(...otherTokenArgs); + await otherToken.unlock(); }); describe("when creating tasks", () => { diff --git a/test/colony.js b/test/colony.js index c75ba4896a..836cf59a65 100755 --- a/test/colony.js +++ b/test/colony.js @@ -20,7 +20,7 @@ import { makeTask, setupColonyNetwork, setupMetaColonyWithLockedCLNYToken, setup const { expect } = chai; chai.use(bnChai(web3.utils.BN)); -const DSToken = artifacts.require("DSToken"); +const Token = artifacts.require("Token"); const IReputationMiningCycle = artifacts.require("IReputationMiningCycle"); contract("Colony", accounts => { @@ -71,7 +71,8 @@ contract("Colony", accounts => { it("should emit correct Mint event when minting tokens", async () => { const tokenArgs = getTokenArgs(); - const otherToken = await DSToken.new(tokenArgs[1]); + const otherToken = await Token.new(...tokenArgs); + await otherToken.unlock(); await expectAllEvents(otherToken.methods["mint(uint256)"](100), ["Mint"]); }); diff --git a/test/reputation-update.js b/test/reputation-update.js index d39563c99e..36a7ab6865 100755 --- a/test/reputation-update.js +++ b/test/reputation-update.js @@ -48,7 +48,7 @@ const { expect } = chai; chai.use(bnChai(web3.utils.BN)); const IReputationMiningCycle = artifacts.require("IReputationMiningCycle"); -const DSToken = artifacts.require("DSToken"); +const Token = artifacts.require("Token"); const TaskSkillEditing = artifacts.require("TaskSkillEditing"); contract("Reputation Updates", accounts => { @@ -369,7 +369,8 @@ contract("Reputation Updates", accounts => { it("should not add entries to the reputation log for payments that are not in the colony home token", async () => { const RECIPIENT = accounts[3]; const tokenArgs = getTokenArgs(); - const otherToken = await DSToken.new(tokenArgs[1]); + const otherToken = await Token.new(...tokenArgs); + await otherToken.unlock(); await fundColonyWithTokens(metaColony, otherToken, WAD.muln(2)); await metaColony.addPayment(1, 0, RECIPIENT, otherToken.address, WAD, 1, 3); diff --git a/test/token-locking.js b/test/token-locking.js index 44347b9d41..55cd25ae90 100644 --- a/test/token-locking.js +++ b/test/token-locking.js @@ -17,7 +17,7 @@ chai.use(bnChai(web3.utils.BN)); const EtherRouter = artifacts.require("EtherRouter"); const IColonyNetwork = artifacts.require("IColonyNetwork"); const ITokenLocking = artifacts.require("ITokenLocking"); -const DSToken = artifacts.require("DSToken"); +const Token = artifacts.require("Token"); const contractLoader = new TruffleLoader({ contractDir: path.resolve(__dirname, "..", "build", "contracts") @@ -50,7 +50,8 @@ contract("Token Locking", addresses => { await colony.bootstrapColony([userAddress], [usersTokens]); const tokenArgs = getTokenArgs(); - otherToken = await DSToken.new(tokenArgs[1]); + otherToken = await Token.new(...tokenArgs); + await otherToken.unlock(); await giveUserCLNYTokensAndStake(colonyNetwork, addresses[4], DEFAULT_STAKE); const client = new ReputationMinerTestWrapper({ @@ -254,7 +255,8 @@ contract("Token Locking", addresses => { await colony.startNextRewardPayout(otherToken.address, ...colonyWideReputationProof); const tokenArgs = getTokenArgs(); - const newToken = await DSToken.new(tokenArgs[1]); + const newToken = await Token.new(...tokenArgs); + await newToken.unlock(); await colony.startNextRewardPayout(newToken.address, ...colonyWideReputationProof); const totalLockCount = await tokenLocking.getTotalLockCount(token.address); diff --git a/truffle.js b/truffle.js index 67039b7d1c..a4fc9a7078 100644 --- a/truffle.js +++ b/truffle.js @@ -34,7 +34,7 @@ module.exports = { } }, mocha: { - reporter: "mocha-circleci-reporter", + reporter: "eth-gas-reporter", reporterOptions: { currency: "USD", gasPrice: 5, From 0fa0a7119a94db512661533e78f7869c15214936 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 20 May 2019 14:20:23 +0300 Subject: [PATCH 4/4] Restore mocha reporter default option --- truffle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/truffle.js b/truffle.js index a4fc9a7078..67039b7d1c 100644 --- a/truffle.js +++ b/truffle.js @@ -34,7 +34,7 @@ module.exports = { } }, mocha: { - reporter: "eth-gas-reporter", + reporter: "mocha-circleci-reporter", reporterOptions: { currency: "USD", gasPrice: 5,