From ea5c09d08d51649c525e256b7b39d0b6956f9f73 Mon Sep 17 00:00:00 2001 From: benk10 Date: Tue, 14 Apr 2020 22:50:21 +0300 Subject: [PATCH] Use Arc v13 direct GP params setting (#7) * Use Arc v13 direct GP params setting * Bump version * Fix params hash * Bump version --- abis/FundingRequest.json | 14 +++- abis/JoinAndQuit.json | 14 +++- abis/SchemeFactory.json | 14 +++- docker-compose.yml | 2 +- index.js | 70 +++++++++++----- package-lock.json | 91 ++++++++++----------- package.json | 4 +- schemesVoteParams/FundingRequestParams.json | 2 +- schemesVoteParams/JoinAndQuitParams.json | 2 +- schemesVoteParams/SchemeFactoryParams.json | 2 +- test/commonfactory.test.js | 17 ++-- 11 files changed, 142 insertions(+), 90 deletions(-) diff --git a/abis/FundingRequest.json b/abis/FundingRequest.json index 2ec8d9d..e669eb8 100644 --- a/abis/FundingRequest.json +++ b/abis/FundingRequest.json @@ -269,9 +269,19 @@ "name": "_votingMachine", "type": "address" }, + { + "internalType": "uint256[11]", + "name": "_votingParams", + "type": "uint256[11]" + }, + { + "internalType": "address", + "name": "_voteOnBehalf", + "type": "address" + }, { "internalType": "bytes32", - "name": "_voteParams", + "name": "_voteParamsHash", "type": "bytes32" }, { @@ -495,7 +505,7 @@ { "constant": true, "inputs": [], - "name": "voteParams", + "name": "voteParamsHash", "outputs": [ { "internalType": "bytes32", diff --git a/abis/JoinAndQuit.json b/abis/JoinAndQuit.json index 27bdc28..aa05bf6 100644 --- a/abis/JoinAndQuit.json +++ b/abis/JoinAndQuit.json @@ -363,9 +363,19 @@ "name": "_votingMachine", "type": "address" }, + { + "internalType": "uint256[11]", + "name": "_votingParams", + "type": "uint256[11]" + }, + { + "internalType": "address", + "name": "_voteOnBehalf", + "type": "address" + }, { "internalType": "bytes32", - "name": "_voteParams", + "name": "_voteParamsHash", "type": "bytes32" }, { @@ -665,7 +675,7 @@ { "constant": true, "inputs": [], - "name": "voteParams", + "name": "voteParamsHash", "outputs": [ { "internalType": "bytes32", diff --git a/abis/SchemeFactory.json b/abis/SchemeFactory.json index 5bf83cb..1986b13 100644 --- a/abis/SchemeFactory.json +++ b/abis/SchemeFactory.json @@ -251,9 +251,19 @@ "name": "_votingMachine", "type": "address" }, + { + "internalType": "uint256[11]", + "name": "_votingParams", + "type": "uint256[11]" + }, + { + "internalType": "address", + "name": "_voteOnBehalf", + "type": "address" + }, { "internalType": "bytes32", - "name": "_voteParams", + "name": "_voteParamsHash", "type": "bytes32" }, { @@ -477,7 +487,7 @@ { "constant": true, "inputs": [], - "name": "voteParams", + "name": "voteParamsHash", "outputs": [ { "internalType": "bytes32", diff --git a/docker-compose.yml b/docker-compose.yml index 138f130..e0a6fa5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ version: '3' services: ganache: - image: 'daostack/migration-experimental:0.1.1-rc.12-v1' + image: 'daostack/migration-experimental:0.1.1-rc.13-v0' ports: - '8545:8545' diff --git a/index.js b/index.js index 70f02f2..fcf6732 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ const ethers = require('ethers'); // Is the voteParams same for all/some schemes of a common? // TODO: Edit constants/ Make them function params -const arcVersion = "0.1.1-rc.12"; +const arcVersion = "0.1.1-rc.13"; function getForgeOrgData({ DAOFactoryInstance, @@ -38,9 +38,6 @@ function getSetSchemesData({ DAOFactoryInstance, avatar, votingMachine, - joinAndQuitVoteParams, - fundingRequestVoteParams, - schemeFactoryVoteParams, fundingToken, minFeeToJoin, memberReputation, @@ -56,25 +53,28 @@ function getSetSchemesData({ let fundingRequest = new ethers.utils.Interface(fundingRequestABI); let schemeFactory = new ethers.utils.Interface(schemeFactoryABI); - let joinAndQuitParamsHash = joinAndQuitVoteParams; - if (joinAndQuitVoteParams === "") { - joinAndQuitParamsHash = require('./schemesVoteParams/JoinAndQuitParams.json').paramsHash; - } - - let fundingRequestParamsHash = fundingRequestVoteParams; - if (fundingRequestVoteParams === "") { - fundingRequestParamsHash = require('./schemesVoteParams/FundingRequestParams.json').paramsHash; - } - - let schemeFactoryParamsHash = schemeFactoryVoteParams; - if (schemeFactoryVoteParams === "") { - schemeFactoryParamsHash = require('./schemesVoteParams/SchemeFactoryParams.json').paramsHash; - } + let joinAndQuitParams = require('./schemesVoteParams/JoinAndQuitParams.json'); + let fundingRequestParams = require('./schemesVoteParams/FundingRequestParams.json'); + let schemeFactoryParams = require('./schemesVoteParams/SchemeFactoryParams.json'); const joinAndQuitArgs = Object.values({ avatar, votingMachine, - joinAndQuitParamsHash, + votingParams: [ + joinAndQuitParams.queuedVoteRequiredPercentage, + joinAndQuitParams.queuedVotePeriodLimit, + joinAndQuitParams.boostedVotePeriodLimit, + joinAndQuitParams.preBoostedVotePeriodLimit, + joinAndQuitParams.thresholdConst, + joinAndQuitParams.quietEndingPeriod, + joinAndQuitParams.proposingRepReward, + joinAndQuitParams.votersReputationLossRatio, + joinAndQuitParams.minimumDaoBounty, + joinAndQuitParams.daoBountyConst, + joinAndQuitParams.activationTime + ], + voteOnBehalf: joinAndQuitParams.voteOnBehalf, + joinAndQuitParamsHash: "0x0000000000000000000000000000000000000000000000000000000000000000", fundingToken, minFeeToJoin, memberReputation, @@ -85,14 +85,42 @@ function getSetSchemesData({ const fundingRequestArgs = Object.values({ avatar, votingMachine, - fundingRequestParamsHash, + votingParams: [ + fundingRequestParams.queuedVoteRequiredPercentage, + fundingRequestParams.queuedVotePeriodLimit, + fundingRequestParams.boostedVotePeriodLimit, + fundingRequestParams.preBoostedVotePeriodLimit, + fundingRequestParams.thresholdConst, + fundingRequestParams.quietEndingPeriod, + fundingRequestParams.proposingRepReward, + fundingRequestParams.votersReputationLossRatio, + fundingRequestParams.minimumDaoBounty, + fundingRequestParams.daoBountyConst, + fundingRequestParams.activationTime + ], + voteOnBehalf: fundingRequestParams.voteOnBehalf, + fundingRequestParamsHash: "0x0000000000000000000000000000000000000000000000000000000000000000", fundingToken, }); const schemeFactoryArgs = Object.values({ avatar, votingMachine, - schemeFactoryParamsHash, + votingParams: [ + schemeFactoryParams.queuedVoteRequiredPercentage, + schemeFactoryParams.queuedVotePeriodLimit, + schemeFactoryParams.boostedVotePeriodLimit, + schemeFactoryParams.preBoostedVotePeriodLimit, + schemeFactoryParams.thresholdConst, + schemeFactoryParams.quietEndingPeriod, + schemeFactoryParams.proposingRepReward, + schemeFactoryParams.votersReputationLossRatio, + schemeFactoryParams.minimumDaoBounty, + schemeFactoryParams.daoBountyConst, + schemeFactoryParams.activationTime + ], + voteOnBehalf: schemeFactoryParams.voteOnBehalf, + schemeFactoryParamsHash: "0x0000000000000000000000000000000000000000000000000000000000000000", DAOFactoryInstance, }); diff --git a/package-lock.json b/package-lock.json index cdfe55c..3d7dd78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@daostack/common-factory", - "version": "1.0.0", + "version": "1.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -292,9 +292,9 @@ } }, "@daostack/arc-experimental": { - "version": "0.1.1-rc.12", - "resolved": "https://registry.npmjs.org/@daostack/arc-experimental/-/arc-experimental-0.1.1-rc.12.tgz", - "integrity": "sha512-KB6aPgwxDRb0i4gaAXHcbVMESTcZarBegbfDHP32iowyT7RIwWhCUN/89THj01IzD/fAiNeO5kq4dGy0yKK/Vg==", + "version": "0.1.1-rc.13", + "resolved": "https://registry.npmjs.org/@daostack/arc-experimental/-/arc-experimental-0.1.1-rc.13.tgz", + "integrity": "sha512-ELjrDNsBRXnl5mCD950TxTgIMBpQYnuBA6CX90+AEuZY/J/FMRDiA1Ub3vNhU5mSPEU60iBsms01Y7MeSklCxA==", "dev": true, "requires": { "@daostack/infra-experimental": "0.0.1-rc.16", @@ -364,9 +364,9 @@ } }, "@types/node": { - "version": "10.17.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.18.tgz", - "integrity": "sha512-DQ2hl/Jl3g33KuAUOcMrcAOtsbzb+y/ufakzAdeK9z/H/xsvkpbETZZbPNMIiQuk24f5ZRMCcZIViAwyFIiKmg==", + "version": "10.17.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.19.tgz", + "integrity": "sha512-46/xThm3zvvc9t9/7M3AaLEqtOpqlYYYcCZbpYVAQHG20+oMZBkae/VMrn4BTi6AJ8cpack0mEXhGiKmDNbLrQ==", "dev": true }, "eth-lib": { @@ -966,9 +966,9 @@ } }, "@types/node": { - "version": "10.17.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.18.tgz", - "integrity": "sha512-DQ2hl/Jl3g33KuAUOcMrcAOtsbzb+y/ufakzAdeK9z/H/xsvkpbETZZbPNMIiQuk24f5ZRMCcZIViAwyFIiKmg==", + "version": "10.17.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.19.tgz", + "integrity": "sha512-46/xThm3zvvc9t9/7M3AaLEqtOpqlYYYcCZbpYVAQHG20+oMZBkae/VMrn4BTi6AJ8cpack0mEXhGiKmDNbLrQ==", "dev": true }, "eth-lib": { @@ -1509,12 +1509,12 @@ } }, "@daostack/migration-experimental": { - "version": "0.1.1-rc.12-v1", - "resolved": "https://registry.npmjs.org/@daostack/migration-experimental/-/migration-experimental-0.1.1-rc.12-v1.tgz", - "integrity": "sha512-2Tbag46surr5cnONpnjrE0vjbHIRPy06p+zqFGwFll5FNJZr/yi6j0edd6oKOa3Fl0SSkfommfJZjjr0pJtXNQ==", + "version": "0.1.1-rc.13-v0", + "resolved": "https://registry.npmjs.org/@daostack/migration-experimental/-/migration-experimental-0.1.1-rc.13-v0.tgz", + "integrity": "sha512-Den78KShabqMvojY616J5FeXDhhrIO7ZRyda1bMTpg03lfb3vXVeRsCFeEQmYGvlvbTfR3g8Wfr0/3rvIg3EHg==", "dev": true, "requires": { - "@daostack/arc-experimental": "0.1.1-rc.12", + "@daostack/arc-experimental": "0.1.1-rc.13", "@daostack/arc-hive": "0.0.1-rc.5", "ethereumjs-wallet": "^0.6.3", "fstream": "^1.0.12", @@ -2131,9 +2131,9 @@ }, "dependencies": { "@types/node": { - "version": "12.12.34", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.34.tgz", - "integrity": "sha512-BneGN0J9ke24lBRn44hVHNeDlrXRYF+VRp0HbSUNnEZahXGAysHZIqnf/hER6aabdBgzM4YOV4jrR8gj4Zfi0g==", + "version": "12.12.35", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.35.tgz", + "integrity": "sha512-ASYsaKecA7TUsDrqIGPNk3JeEox0z/0XR/WsJJ8BIX/9+SkMSImQXKWfU/yBrSyc7ZSE/NPqLu36Nur0miCFfQ==", "dev": true }, "eth-lib": { @@ -2182,9 +2182,9 @@ }, "dependencies": { "@types/node": { - "version": "10.17.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.18.tgz", - "integrity": "sha512-DQ2hl/Jl3g33KuAUOcMrcAOtsbzb+y/ufakzAdeK9z/H/xsvkpbETZZbPNMIiQuk24f5ZRMCcZIViAwyFIiKmg==", + "version": "10.17.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.19.tgz", + "integrity": "sha512-46/xThm3zvvc9t9/7M3AaLEqtOpqlYYYcCZbpYVAQHG20+oMZBkae/VMrn4BTi6AJ8cpack0mEXhGiKmDNbLrQ==", "dev": true } } @@ -2294,9 +2294,9 @@ }, "dependencies": { "@types/node": { - "version": "10.17.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.18.tgz", - "integrity": "sha512-DQ2hl/Jl3g33KuAUOcMrcAOtsbzb+y/ufakzAdeK9z/H/xsvkpbETZZbPNMIiQuk24f5ZRMCcZIViAwyFIiKmg==", + "version": "10.17.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.19.tgz", + "integrity": "sha512-46/xThm3zvvc9t9/7M3AaLEqtOpqlYYYcCZbpYVAQHG20+oMZBkae/VMrn4BTi6AJ8cpack0mEXhGiKmDNbLrQ==", "dev": true }, "elliptic": { @@ -2546,6 +2546,12 @@ "type-detect": "4.0.8" } }, + "@solidity-parser/parser": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.5.2.tgz", + "integrity": "sha512-uRyvnvVYmgNmTBpWDbBsH/0kPESQhQpEc4KsvMRLVzFJ1o1s0uIv0Y6Y9IB5vI1Dwz2CbS4X/y4Wyw/75cTFnQ==", + "dev": true + }, "@szmarczak/http-timer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", @@ -12610,12 +12616,6 @@ "truffle-hdwallet-provider": "0.0.3" } }, - "solidity-parser-antlr": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/solidity-parser-antlr/-/solidity-parser-antlr-0.4.11.tgz", - "integrity": "sha512-4jtxasNGmyC0midtjH/lTFPZYvTTUMy6agYcF+HoMnzW8+cqo3piFrINb4ZCzpPW+7tTVFCGa5ubP34zOzeuMg==", - "dev": true - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -12893,9 +12893,9 @@ } }, "string.prototype.trimend": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.0.tgz", - "integrity": "sha512-EEJnGqa/xNfIg05SxiPSqRS7S9qwDhYts1TSLR1BQfYUfPe1stofgGKvwERK9+9yf+PpfBMlpBaCHucXGPQfUA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", "dev": true, "requires": { "define-properties": "^1.1.3", @@ -12925,9 +12925,9 @@ } }, "string.prototype.trimstart": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.0.tgz", - "integrity": "sha512-iCP8g01NFYiiBOnwG1Xc3WZLyoo+RuBymwIlWncShXDDJYWN6DbnM3odslBJdgCdRlq94B5s63NWAZlcn2CS4w==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", "dev": true, "requires": { "define-properties": "^1.1.3", @@ -13472,26 +13472,23 @@ } }, "truffle-flattener": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/truffle-flattener/-/truffle-flattener-1.4.2.tgz", - "integrity": "sha512-7qUIzaW8a4vI4nui14wsytht2oaqvqnZ1Iet2wRq2T0bCJ0wb6HByMKQhZKpU46R+n5BMTY4K5n+0ITyeNlmuQ==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/truffle-flattener/-/truffle-flattener-1.4.3.tgz", + "integrity": "sha512-r29fkSkV8i9oMW35KbpKR0bP4iPnzIJqlW2S+CL3BjLsxq6YnlMn9+e0BpiJIJPmeXJgeYHQvCGceucpM0Dovg==", "dev": true, "requires": { "@resolver-engine/imports-fs": "^0.2.2", + "@solidity-parser/parser": "^0.5.2", "find-up": "^2.1.0", - "mkdirp": "^0.5.1", - "solidity-parser-antlr": "^0.4.11", + "mkdirp": "^1.0.4", "tsort": "0.0.1" }, "dependencies": { "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true } } }, diff --git a/package.json b/package.json index 4f8582f..0fa08f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@daostack/common-factory", - "version": "1.0.0", + "version": "1.1.0", "description": "", "main": "index.js", "scripts": { @@ -26,7 +26,7 @@ "devDependencies": { "eslint": "^6.8.0", "jest": "^25.2.4", - "@daostack/migration-experimental": "0.1.1-rc.12-v1", + "@daostack/migration-experimental": "0.1.1-rc.13-v0", "web3": "^1.2.6" } } diff --git a/schemesVoteParams/FundingRequestParams.json b/schemesVoteParams/FundingRequestParams.json index 2d32536..426024d 100644 --- a/schemesVoteParams/FundingRequestParams.json +++ b/schemesVoteParams/FundingRequestParams.json @@ -11,5 +11,5 @@ "voteOnBehalf": "0x0000000000000000000000000000000000000000", "votersReputationLossRatio": 1, "activationTime": 0, - "paramsHash": "0x256710e50cd02207aed660bafa287f430bb60db3667c7857b52b2c6d6d84dd82" + "paramsHash": "0x1eee6e80136c410fb664c4743c060cebcdbc741a787eac661b8ab9d228e9eeed" } \ No newline at end of file diff --git a/schemesVoteParams/JoinAndQuitParams.json b/schemesVoteParams/JoinAndQuitParams.json index 2d32536..426024d 100644 --- a/schemesVoteParams/JoinAndQuitParams.json +++ b/schemesVoteParams/JoinAndQuitParams.json @@ -11,5 +11,5 @@ "voteOnBehalf": "0x0000000000000000000000000000000000000000", "votersReputationLossRatio": 1, "activationTime": 0, - "paramsHash": "0x256710e50cd02207aed660bafa287f430bb60db3667c7857b52b2c6d6d84dd82" + "paramsHash": "0x1eee6e80136c410fb664c4743c060cebcdbc741a787eac661b8ab9d228e9eeed" } \ No newline at end of file diff --git a/schemesVoteParams/SchemeFactoryParams.json b/schemesVoteParams/SchemeFactoryParams.json index 2d32536..426024d 100644 --- a/schemesVoteParams/SchemeFactoryParams.json +++ b/schemesVoteParams/SchemeFactoryParams.json @@ -11,5 +11,5 @@ "voteOnBehalf": "0x0000000000000000000000000000000000000000", "votersReputationLossRatio": 1, "activationTime": 0, - "paramsHash": "0x256710e50cd02207aed660bafa287f430bb60db3667c7857b52b2c6d6d84dd82" + "paramsHash": "0x1eee6e80136c410fb664c4743c060cebcdbc741a787eac661b8ab9d228e9eeed" } \ No newline at end of file diff --git a/test/commonfactory.test.js b/test/commonfactory.test.js index d49080d..f2bd92e 100644 --- a/test/commonfactory.test.js +++ b/test/commonfactory.test.js @@ -32,7 +32,7 @@ test('deploy common', async () => { // Test Common Setup const DAOstackMigration = require('@daostack/migration-experimental'); - const DAOFactoryInstance = DAOstackMigration.migration('private').package['0.1.1-rc.12'].DAOFactoryInstance; + const DAOFactoryInstance = DAOstackMigration.migration('private').package['0.1.1-rc.13'].DAOFactoryInstance; const daoFactory = new web3.eth.Contract( require('../abis/DAOFactory.json'), @@ -56,13 +56,13 @@ test('deploy common', async () => { let reputationAddress = newOrg._reputation; const avatar = new web3.eth.Contract( - require('@daostack/migration-experimental/contracts/0.1.1-rc.12/Avatar.json').abi, + require('@daostack/migration-experimental/contracts/0.1.1-rc.13/Avatar.json').abi, avatarAddress, opts ); const reputation = new web3.eth.Contract( - require('@daostack/migration-experimental/contracts/0.1.1-rc.12/Reputation.json').abi, + require('@daostack/migration-experimental/contracts/0.1.1-rc.13/Reputation.json').abi, reputationAddress, opts ); @@ -71,16 +71,13 @@ test('deploy common', async () => { expect(await reputation.methods.balanceOf(web3.eth.accounts.wallet[0].address).call()).toBe('100'); expect(await reputation.methods.totalSupply().call()).toBe('100'); - const votingMachine = DAOstackMigration.migration('private').package['0.1.1-rc.12'].GenesisProtocol; + const votingMachine = DAOstackMigration.migration('private').package['0.1.1-rc.13'].GenesisProtocol; const deadline = (await web3.eth.getBlock("latest")).timestamp + 3000; const setSchemes = await daoFactory.methods.setSchemes( ...getSetSchemesData({ DAOFactoryInstance, avatar: avatarAddress, votingMachine, - joinAndQuitVoteParams: "0x1000000000000000000000000000000000000000000000000000000000000000", - fundingRequestVoteParams: "0x1100000000000000000000000000000000000000000000000000000000000000", - schemeFactoryVoteParams: "", fundingToken: "0x0000000000000000000000000000000000000000", minFeeToJoin: 100, memberReputation: 100, @@ -112,7 +109,7 @@ test('deploy common', async () => { expect(await joinAndQuit.methods.avatar().call()).toBe(avatarAddress); expect(await joinAndQuit.methods.votingMachine().call()).toBe(votingMachine); - expect(await joinAndQuit.methods.voteParams().call()).toBe("0x1000000000000000000000000000000000000000000000000000000000000000"); + expect(await joinAndQuit.methods.voteParamsHash().call()).toBe("0x1eee6e80136c410fb664c4743c060cebcdbc741a787eac661b8ab9d228e9eeed"); expect(await joinAndQuit.methods.fundingToken().call()).toBe("0x0000000000000000000000000000000000000000"); expect(await joinAndQuit.methods.minFeeToJoin().call()).toBe("100"); expect(await joinAndQuit.methods.memberReputation().call()).toBe("100"); @@ -121,12 +118,12 @@ test('deploy common', async () => { expect(await fundingRequest.methods.avatar().call()).toBe(avatarAddress); expect(await fundingRequest.methods.votingMachine().call()).toBe(votingMachine); - expect(await fundingRequest.methods.voteParams().call()).toBe("0x1100000000000000000000000000000000000000000000000000000000000000"); + expect(await fundingRequest.methods.voteParamsHash().call()).toBe("0x1eee6e80136c410fb664c4743c060cebcdbc741a787eac661b8ab9d228e9eeed"); expect(await fundingRequest.methods.fundingToken().call()).toBe("0x0000000000000000000000000000000000000000"); expect(await schemeFactory.methods.avatar().call()).toBe(avatarAddress); expect(await schemeFactory.methods.votingMachine().call()).toBe(votingMachine); - expect(await schemeFactory.methods.voteParams().call()).toBe("0x256710e50cd02207aed660bafa287f430bb60db3667c7857b52b2c6d6d84dd82"); + expect(await schemeFactory.methods.voteParamsHash().call()).toBe("0x1eee6e80136c410fb664c4743c060cebcdbc741a787eac661b8ab9d228e9eeed"); expect(await schemeFactory.methods.daoFactory().call()).toBe(DAOFactoryInstance); }, 500000);