diff --git a/contracts/SecurityTokenRegistry.sol b/contracts/SecurityTokenRegistry.sol index 9f81cc7aa..e4655ea04 100644 --- a/contracts/SecurityTokenRegistry.sol +++ b/contracts/SecurityTokenRegistry.sol @@ -333,7 +333,7 @@ contract SecurityTokenRegistry is EternalStorage, Proxy { // Attempt to charge the reg fee if it is > 0 USD (uint256 usdFee, uint256 polyFee) = _takeFee(TICKERREGFEE); string memory ticker = Util.upper(_ticker); - require(_tickerAvailable(ticker), "Ticker reserved"); + require(tickerAvailable(ticker), "Ticker reserved"); // Check whether ticker was previously registered (and expired) address previousOwner = _tickerOwner(ticker); if (previousOwner != address(0)) { @@ -462,11 +462,11 @@ contract SecurityTokenRegistry is EternalStorage, Proxy { } /** - * @notice Internal - Checks if the entered ticker is registered and has not expired + * @notice Checks if the entered ticker is registered and has not expired * @param _ticker is the token ticker * @return bool */ - function _tickerAvailable(string memory _ticker) internal view returns(bool) { + function tickerAvailable(string memory _ticker) public view returns(bool) { if (_tickerOwner(_ticker) != address(0)) { /*solium-disable-next-line security/no-block-members*/ if ((now > getUintValue(Encoder.getKey("registeredTickers_expiryDate", _ticker))) && !_tickerStatus(_ticker)) { diff --git a/contracts/interfaces/ISecurityTokenRegistry.sol b/contracts/interfaces/ISecurityTokenRegistry.sol index 9b8d391fa..fb3dcf7dd 100644 --- a/contracts/interfaces/ISecurityTokenRegistry.sol +++ b/contracts/interfaces/ISecurityTokenRegistry.sol @@ -232,4 +232,11 @@ interface ISecurityTokenRegistry { */ function owner() external view returns(address ownerAddress); + /** + * @notice Checks if the entered ticker is registered and has not expired + * @param _ticker is the token ticker + * @return bool + */ + function tickerAvailable(string calldata _ticker) external view returns(bool); + } diff --git a/contracts/modules/Checkpoint/Voting/PLCR/PLCRVotingCheckpoint.sol b/contracts/modules/Checkpoint/Voting/PLCR/PLCRVotingCheckpoint.sol index 7af068726..f8b4b9483 100644 --- a/contracts/modules/Checkpoint/Voting/PLCR/PLCRVotingCheckpoint.sol +++ b/contracts/modules/Checkpoint/Voting/PLCR/PLCRVotingCheckpoint.sol @@ -27,7 +27,7 @@ contract PLCRVotingCheckpoint is PLCRVotingCheckpointStorage, VotingCheckpoint { uint256 _proposedQuorum ); event BallotStatusChanged(uint256 indexed _ballotId, bool _newStatus); - event ChangedBallotExemptedVotersList(uint256 indexed _ballotId, address indexed _voter, bool _change); + event ChangedBallotExemptedVotersList(uint256 indexed _ballotId, address indexed _voter, bool _exempt); constructor(address _securityToken, address _polyAddress) public @@ -172,31 +172,31 @@ contract PLCRVotingCheckpoint is PLCRVotingCheckpointStorage, VotingCheckpoint { * Change the given ballot exempted list * @param _ballotId Given ballot Id * @param _voter Address of the voter - * @param _change Whether it is exempted or not + * @param _exempt Whether it is exempted or not */ - function changeBallotExemptedVotersList(uint256 _ballotId, address _voter, bool _change) external withPerm(ADMIN) { - _changeBallotExemptedVotersList(_ballotId, _voter, _change); + function changeBallotExemptedVotersList(uint256 _ballotId, address _voter, bool _exempt) external withPerm(ADMIN) { + _changeBallotExemptedVotersList(_ballotId, _voter, _exempt); } /** * Change the given ballot exempted list (Multi) * @param _ballotId Given ballot Id * @param _voters Address of the voter - * @param _changes Whether it is exempted or not + * @param _exempts Whether it is exempted or not */ - function changeBallotExemptedVotersListMulti(uint256 _ballotId, address[] calldata _voters, bool[] calldata _changes) external withPerm(ADMIN) { - require(_voters.length == _changes.length, "Array length mismatch"); + function changeBallotExemptedVotersListMulti(uint256 _ballotId, address[] calldata _voters, bool[] calldata _exempts) external withPerm(ADMIN) { + require(_voters.length == _exempts.length, "Array length mismatch"); for (uint256 i = 0; i < _voters.length; i++) { - _changeBallotExemptedVotersList(_ballotId, _voters[i], _changes[i]); + _changeBallotExemptedVotersList(_ballotId, _voters[i], _exempts[i]); } } - function _changeBallotExemptedVotersList(uint256 _ballotId, address _voter, bool _change) internal { + function _changeBallotExemptedVotersList(uint256 _ballotId, address _voter, bool _exempt) internal { require(_voter != address(0), "Invalid address"); _validBallotId(_ballotId); - require(ballots[_ballotId].exemptedVoters[_voter] != _change, "No change"); - ballots[_ballotId].exemptedVoters[_voter] = _change; - emit ChangedBallotExemptedVotersList(_ballotId, _voter, _change); + require(ballots[_ballotId].exemptedVoters[_voter] != _exempt, "No change"); + ballots[_ballotId].exemptedVoters[_voter] = _exempt; + emit ChangedBallotExemptedVotersList(_ballotId, _voter, _exempt); } /** diff --git a/contracts/modules/Checkpoint/Voting/Transparent/WeightedVoteCheckpoint.sol b/contracts/modules/Checkpoint/Voting/Transparent/WeightedVoteCheckpoint.sol index bc186a5e0..a40558e3c 100644 --- a/contracts/modules/Checkpoint/Voting/Transparent/WeightedVoteCheckpoint.sol +++ b/contracts/modules/Checkpoint/Voting/Transparent/WeightedVoteCheckpoint.sol @@ -23,7 +23,7 @@ contract WeightedVoteCheckpoint is WeightedVoteCheckpointStorage, VotingCheckpoi ); event VoteCast(address indexed _voter, uint256 _weight, uint256 indexed _ballotId, uint256 indexed _proposalId); event BallotStatusChanged(uint256 indexed _ballotId, bool _isActive); - event ChangedBallotExemptedVotersList(uint256 indexed _ballotId, address indexed _voter, bool _change); + event ChangedBallotExemptedVotersList(uint256 indexed _ballotId, address indexed _voter, bool _exempt); /** * @notice Constructor @@ -124,31 +124,31 @@ contract WeightedVoteCheckpoint is WeightedVoteCheckpointStorage, VotingCheckpoi * Change the given ballot exempted list * @param _ballotId Given ballot Id * @param _voter Address of the voter - * @param _change Whether it is exempted or not + * @param _exempt Whether it is exempted or not */ - function changeBallotExemptedVotersList(uint256 _ballotId, address _voter, bool _change) external withPerm(ADMIN) { - _changeBallotExemptedVotersList(_ballotId, _voter, _change); + function changeBallotExemptedVotersList(uint256 _ballotId, address _voter, bool _exempt) external withPerm(ADMIN) { + _changeBallotExemptedVotersList(_ballotId, _voter, _exempt); } /** * Change the given ballot exempted list (Multi) * @param _ballotId Given ballot Id * @param _voters Address of the voter - * @param _changes Whether it is exempted or not + * @param _exempts Whether it is exempted or not */ - function changeBallotExemptedVotersListMulti(uint256 _ballotId, address[] calldata _voters, bool[] calldata _changes) external withPerm(ADMIN) { - require(_voters.length == _changes.length, "Array length mismatch"); + function changeBallotExemptedVotersListMulti(uint256 _ballotId, address[] calldata _voters, bool[] calldata _exempts) external withPerm(ADMIN) { + require(_voters.length == _exempts.length, "Array length mismatch"); for (uint256 i = 0; i < _voters.length; i++) { - _changeBallotExemptedVotersList(_ballotId, _voters[i], _changes[i]); + _changeBallotExemptedVotersList(_ballotId, _voters[i], _exempts[i]); } } - function _changeBallotExemptedVotersList(uint256 _ballotId, address _voter, bool _change) internal { + function _changeBallotExemptedVotersList(uint256 _ballotId, address _voter, bool _exempt) internal { require(_voter != address(0), "Invalid address"); _validBallotId(_ballotId); - require(ballots[_ballotId].exemptedVoters[_voter] != _change, "No change"); - ballots[_ballotId].exemptedVoters[_voter] = _change; - emit ChangedBallotExemptedVotersList(_ballotId, _voter, _change); + require(ballots[_ballotId].exemptedVoters[_voter] != _exempt, "No change"); + ballots[_ballotId].exemptedVoters[_voter] = _exempt; + emit ChangedBallotExemptedVotersList(_ballotId, _voter, _exempt); } /** diff --git a/contracts/modules/Checkpoint/Voting/VotingCheckpoint.sol b/contracts/modules/Checkpoint/Voting/VotingCheckpoint.sol index c938bb47c..47013b4fe 100644 --- a/contracts/modules/Checkpoint/Voting/VotingCheckpoint.sol +++ b/contracts/modules/Checkpoint/Voting/VotingCheckpoint.sol @@ -7,33 +7,33 @@ import "../../../storage/modules/Checkpoint/Voting/VotingCheckpointStorage.sol"; contract VotingCheckpoint is VotingCheckpointStorage, ICheckpoint, IVoting, Module { - event ChangedDefaultExemptedVotersList(address indexed _voter, bool _change); + event ChangedDefaultExemptedVotersList(address indexed _voter, bool _exempt); /** * Change the global exempted voters list * @param _voter Address of the voter - * @param _change Whether it is exempted or not + * @param _exempt Whether it is exempted or not */ - function changeDefaultExemptedVotersList(address _voter, bool _change) external withPerm(ADMIN) { - _changeDefaultExemptedVotersList(_voter, _change); + function changeDefaultExemptedVotersList(address _voter, bool _exempt) external withPerm(ADMIN) { + _changeDefaultExemptedVotersList(_voter, _exempt); } /** * Change the global exempted voters list * @param _voters Address of the voter - * @param _changes Whether it is exempted or not + * @param _exempts Whether it is exempted or not */ - function changeDefaultExemptedVotersListMulti(address[] calldata _voters, bool[] calldata _changes) external withPerm(ADMIN) { - require(_voters.length == _changes.length, "Array length mismatch"); + function changeDefaultExemptedVotersListMulti(address[] calldata _voters, bool[] calldata _exempts) external withPerm(ADMIN) { + require(_voters.length == _exempts.length, "Array length mismatch"); for (uint256 i = 0; i < _voters.length; i++) { - _changeDefaultExemptedVotersList(_voters[i], _changes[i]); + _changeDefaultExemptedVotersList(_voters[i], _exempts[i]); } } - function _changeDefaultExemptedVotersList(address _voter, bool _change) internal { + function _changeDefaultExemptedVotersList(address _voter, bool _exempt) internal { require(_voter != address(0), "Invalid address"); - require((defaultExemptIndex[_voter] == 0) == _change); - if (_change) { + require((defaultExemptIndex[_voter] == 0) == _exempt); + if (_exempt) { defaultExemptedVoters.push(_voter); defaultExemptIndex[_voter] = defaultExemptedVoters.length; } else { @@ -44,7 +44,7 @@ contract VotingCheckpoint is VotingCheckpointStorage, ICheckpoint, IVoting, Modu delete defaultExemptIndex[_voter]; defaultExemptedVoters.length --; } - emit ChangedDefaultExemptedVotersList(_voter, _change); + emit ChangedDefaultExemptedVotersList(_voter, _exempt); } /** diff --git a/contracts/modules/STO/Capped/CappedSTO.sol b/contracts/modules/STO/Capped/CappedSTO.sol index 6ab303b6f..5d954e0de 100644 --- a/contracts/modules/STO/Capped/CappedSTO.sol +++ b/contracts/modules/STO/Capped/CappedSTO.sol @@ -80,8 +80,7 @@ contract CappedSTO is CappedSTOStorage, STO, ReentrancyGuard { * @notice Function to set allowBeneficialInvestments (allow beneficiary to be different to funder) * @param _allowBeneficialInvestments Boolean to allow or disallow beneficial investments */ - function changeAllowBeneficialInvestments(bool _allowBeneficialInvestments) public { - _onlySecurityTokenOwner(); + function changeAllowBeneficialInvestments(bool _allowBeneficialInvestments) public withPerm(OPERATOR) { require(_allowBeneficialInvestments != allowBeneficialInvestments, "Does not change value"); allowBeneficialInvestments = _allowBeneficialInvestments; emit SetAllowBeneficialInvestments(allowBeneficialInvestments); @@ -134,7 +133,8 @@ contract CappedSTO is CappedSTOStorage, STO, ReentrancyGuard { * @notice Return the permissions flag that are associated with STO */ function getPermissions() public view returns(bytes32[] memory) { - bytes32[] memory allPermissions = new bytes32[](0); + bytes32[] memory allPermissions = new bytes32[](1); + allPermissions[0] = OPERATOR; return allPermissions; } diff --git a/contracts/modules/STO/USDTiered/USDTieredSTO.sol b/contracts/modules/STO/USDTiered/USDTieredSTO.sol index cd89d05b2..23bd4c5d7 100644 --- a/contracts/modules/STO/USDTiered/USDTieredSTO.sol +++ b/contracts/modules/STO/USDTiered/USDTieredSTO.sol @@ -22,7 +22,6 @@ contract USDTieredSTO is USDTieredSTOStorage, STO { event SetAllowBeneficialInvestments(bool _allowed); event SetNonAccreditedLimit(address _investor, uint256 _limit); - event SetAccredited(address _investor, bool _accredited); event TokenPurchase( address indexed _purchaser, address indexed _beneficiary, @@ -126,8 +125,7 @@ contract USDTieredSTO is USDTieredSTOStorage, STO { * @dev Modifies fund raise types * @param _fundRaiseTypes Array of fund raise types to allow */ - function modifyFunding(FundRaiseType[] calldata _fundRaiseTypes) external { - _onlySecurityTokenOwner(); + function modifyFunding(FundRaiseType[] calldata _fundRaiseTypes) external withPerm(OPERATOR) { _isSTOStarted(); _setFundRaiseType(_fundRaiseTypes); } @@ -137,8 +135,7 @@ contract USDTieredSTO is USDTieredSTOStorage, STO { * @param _nonAccreditedLimitUSD max non accredited invets limit * @param _minimumInvestmentUSD overall minimum investment limit */ - function modifyLimits(uint256 _nonAccreditedLimitUSD, uint256 _minimumInvestmentUSD) external { - _onlySecurityTokenOwner(); + function modifyLimits(uint256 _nonAccreditedLimitUSD, uint256 _minimumInvestmentUSD) external withPerm(OPERATOR) { _isSTOStarted(); _modifyLimits(_nonAccreditedLimitUSD, _minimumInvestmentUSD); } @@ -157,8 +154,8 @@ contract USDTieredSTO is USDTieredSTOStorage, STO { uint256[] calldata _tokensPerTierDiscountPoly ) external + withPerm(OPERATOR) { - _onlySecurityTokenOwner(); _isSTOStarted(); _modifyTiers(_ratePerTier, _ratePerTierDiscountPoly, _tokensPerTierTotal, _tokensPerTierDiscountPoly); } @@ -168,8 +165,7 @@ contract USDTieredSTO is USDTieredSTOStorage, STO { * @param _startTime start time of sto * @param _endTime end time of sto */ - function modifyTimes(uint256 _startTime, uint256 _endTime) external { - _onlySecurityTokenOwner(); + function modifyTimes(uint256 _startTime, uint256 _endTime) external withPerm(OPERATOR) { _isSTOStarted(); _modifyTimes(_startTime, _endTime); } @@ -275,8 +271,7 @@ contract USDTieredSTO is USDTieredSTOStorage, STO { * @notice Finalizes the STO and mint remaining tokens to treasury address * @notice Treasury wallet address must be whitelisted to successfully finalize */ - function finalize() external { - _onlySecurityTokenOwner(); + function finalize() external withPerm(ADMIN) { require(!isFinalized, "STO is finalized"); isFinalized = true; uint256 tempReturned; @@ -306,8 +301,7 @@ contract USDTieredSTO is USDTieredSTOStorage, STO { * @param _investors Array of investor addresses to modify * @param _nonAccreditedLimit Array of uints specifying non-accredited limits */ - function changeNonAccreditedLimit(address[] calldata _investors, uint256[] calldata _nonAccreditedLimit) external { - _onlySecurityTokenOwner(); + function changeNonAccreditedLimit(address[] calldata _investors, uint256[] calldata _nonAccreditedLimit) external withPerm(OPERATOR) { //nonAccreditedLimitUSDOverride require(_investors.length == _nonAccreditedLimit.length, "Length mismatch"); for (uint256 i = 0; i < _investors.length; i++) { @@ -337,8 +331,7 @@ contract USDTieredSTO is USDTieredSTOStorage, STO { * @notice Function to set allowBeneficialInvestments (allow beneficiary to be different to funder) * @param _allowBeneficialInvestments Boolean to allow or disallow beneficial investments */ - function changeAllowBeneficialInvestments(bool _allowBeneficialInvestments) external { - _onlySecurityTokenOwner(); + function changeAllowBeneficialInvestments(bool _allowBeneficialInvestments) external withPerm(OPERATOR) { require(_allowBeneficialInvestments != allowBeneficialInvestments); allowBeneficialInvestments = _allowBeneficialInvestments; emit SetAllowBeneficialInvestments(allowBeneficialInvestments); @@ -727,6 +720,9 @@ contract USDTieredSTO is USDTieredSTOStorage, STO { * @notice Return the permissions flag that are associated with STO */ function getPermissions() public view returns(bytes32[] memory allPermissions) { + bytes32[] memory allPermissions = new bytes32[](2); + allPermissions[0] = OPERATOR; + allPermissions[1] = ADMIN; return allPermissions; } diff --git a/contracts/modules/STO/USDTiered/USDTieredSTOStorage.sol b/contracts/modules/STO/USDTiered/USDTieredSTOStorage.sol index 6fbdea52d..7281861fa 100644 --- a/contracts/modules/STO/USDTiered/USDTieredSTOStorage.sol +++ b/contracts/modules/STO/USDTiered/USDTieredSTOStorage.sol @@ -6,7 +6,7 @@ pragma solidity 0.5.8; contract USDTieredSTOStorage { bytes32 internal constant INVESTORSKEY = 0xdf3a8dd24acdd05addfc6aeffef7574d2de3f844535ec91e8e0f3e45dba96731; //keccak256(abi.encodePacked("INVESTORS")) - + ///////////// // Storage // ///////////// diff --git a/contracts/modules/TransferManager/VRTM/VolumeRestrictionTM.sol b/contracts/modules/TransferManager/VRTM/VolumeRestrictionTM.sol index b1dbe36d8..b66b1ae38 100644 --- a/contracts/modules/TransferManager/VRTM/VolumeRestrictionTM.sol +++ b/contracts/modules/TransferManager/VRTM/VolumeRestrictionTM.sol @@ -10,7 +10,7 @@ contract VolumeRestrictionTM is VolumeRestrictionTMStorage, TransferManager { using SafeMath for uint256; // Emit when the token holder is added/removed from the exemption list - event ChangedExemptWalletList(address indexed _wallet, bool _change); + event ChangedExemptWalletList(address indexed _wallet, bool _exempted); // Emit when the new individual restriction is added corresponds to new token holders event AddIndividualRestriction( address indexed _holder, @@ -186,12 +186,12 @@ contract VolumeRestrictionTM is VolumeRestrictionTMStorage, TransferManager { /** * @notice Add/Remove wallet address from the exempt list * @param _wallet Ethereum wallet/contract address that need to be exempted - * @param _change Boolean value used to add (i.e true) or remove (i.e false) from the list + * @param _exempted Boolean value used to add (i.e true) or remove (i.e false) from the list */ - function changeExemptWalletList(address _wallet, bool _change) public withPerm(ADMIN) { + function changeExemptWalletList(address _wallet, bool _exempted) public withPerm(ADMIN) { require(_wallet != address(0)); - require((exemptions.exemptIndex[_wallet] == 0) == _change); - if (_change) { + require((exemptions.exemptIndex[_wallet] == 0) == _exempted); + if (_exempted) { exemptions.exemptAddresses.push(_wallet); exemptions.exemptIndex[_wallet] = exemptions.exemptAddresses.length; } else { @@ -200,7 +200,7 @@ contract VolumeRestrictionTM is VolumeRestrictionTMStorage, TransferManager { delete exemptions.exemptIndex[_wallet]; exemptions.exemptAddresses.length--; } - emit ChangedExemptWalletList(_wallet, _change); + emit ChangedExemptWalletList(_wallet, _exempted); } /** diff --git a/contracts/tokens/SecurityToken.sol b/contracts/tokens/SecurityToken.sol index c46302268..9bcfb8441 100644 --- a/contracts/tokens/SecurityToken.sol +++ b/contracts/tokens/SecurityToken.sol @@ -43,7 +43,8 @@ contract SecurityToken is ERC20, ReentrancyGuard, SecurityTokenStorage, IERC1594 bytes32 _label, bool _archived ); - + // Emit when Module get upgraded from the securityToken + event ModuleUpgraded(uint8[] _types, address _module); // Emit when the token details get updated event UpdateTokenDetails(string _oldDetails, string _newDetails); // Emit when the token name get updated diff --git a/test/b_capped_sto.js b/test/b_capped_sto.js index e90e3d1a1..bad99d981 100644 --- a/test/b_capped_sto.js +++ b/test/b_capped_sto.js @@ -994,7 +994,7 @@ contract("CappedSTO", async (accounts) => { it("Should get the listed permissions", async () => { let tx = await I_CappedSTO_Array_POLY[0].getPermissions.call(); - assert.equal(tx.length, 0); + assert.equal(tx.length, 1); }); it("Should get the metrics of the STO", async () => { diff --git a/test/p_usd_tiered_sto.js b/test/p_usd_tiered_sto.js index c4ca7cc50..ac27f4ba2 100644 --- a/test/p_usd_tiered_sto.js +++ b/test/p_usd_tiered_sto.js @@ -392,7 +392,7 @@ contract("USDTieredSTO", async (accounts) => { _tokensPerTierTotal[stoId].length, "Incorrect number of tiers" ); - assert.equal((await I_USDTieredSTO_Array[stoId].getPermissions()).length, new BN(0), "Incorrect number of permissions"); + assert.equal((await I_USDTieredSTO_Array[stoId].getPermissions()).length, new BN(2), "Incorrect number of permissions"); }); it("Should attach the paid STO factory -- failed because of no tokens", async () => { @@ -581,7 +581,7 @@ contract("USDTieredSTO", async (accounts) => { _tokensPerTierTotal[stoId].length, "Incorrect number of tiers" ); - assert.equal((await I_USDTieredSTO_Array[stoId].getPermissions()).length, new BN(0), "Incorrect number of permissions"); + assert.equal((await I_USDTieredSTO_Array[stoId].getPermissions()).length, new BN(2), "Incorrect number of permissions"); }); it("Should successfully attach the third STO module to the security token", async () => { diff --git a/test/q_usd_tiered_sto_sim.js b/test/q_usd_tiered_sto_sim.js index 7364f813d..e51bf4ac6 100644 --- a/test/q_usd_tiered_sto_sim.js +++ b/test/q_usd_tiered_sto_sim.js @@ -362,7 +362,7 @@ contract("USDTieredSTO Sim", async (accounts) => { _tokensPerTierTotal[stoId].length, "Incorrect number of tiers" ); - assert.equal((await I_USDTieredSTO_Array[stoId].getPermissions()).length, new BN(0), "Incorrect number of permissions"); + assert.equal((await I_USDTieredSTO_Array[stoId].getPermissions()).length, new BN(2), "Incorrect number of permissions"); }); it("Should successfully prepare the STO", async () => { diff --git a/test/zc_plcr_voting_checkpoint.js b/test/zc_plcr_voting_checkpoint.js index f1fd4a040..09c04a138 100644 --- a/test/zc_plcr_voting_checkpoint.js +++ b/test/zc_plcr_voting_checkpoint.js @@ -363,7 +363,7 @@ contract("PLCRVotingCheckpoint", async (accounts) => { let tx = await I_PLCRVotingCheckpoint.changeBallotExemptedVotersList(new BN(0), account_investor1, true, {from: token_owner}); assert.equal((tx.logs[0].args._ballotId).toString(), 0); assert.equal(tx.logs[0].args._voter, account_investor1); - assert.equal(tx.logs[0].args._change, true); + assert.equal(tx.logs[0].args._exempt, true); }); it("\t\t Should fail to add voter in ballot exemption list -- doing the same change again", async() => { @@ -426,7 +426,7 @@ contract("PLCRVotingCheckpoint", async (accounts) => { it("\t\t Should add the voter in to the default exemption list", async() => { let tx = await I_PLCRVotingCheckpoint.changeDefaultExemptedVotersList(account_investor3, true, {from: token_owner}); assert.equal(tx.logs[0].args._voter, account_investor3); - assert.equal(tx.logs[0].args._change, true); + assert.equal(tx.logs[0].args._exempt, true); }); it("\t\t Should fail to add voter in default exemption list -- doing the same change again", async() => { diff --git a/test/zd_weighted_vote_checkpoint.js b/test/zd_weighted_vote_checkpoint.js index a0d67bdf2..5cdf4c423 100644 --- a/test/zd_weighted_vote_checkpoint.js +++ b/test/zd_weighted_vote_checkpoint.js @@ -308,7 +308,7 @@ contract("WeightedVoteCheckpoint", async (accounts) => { let tx = await I_WeightedVoteCheckpoint.changeBallotExemptedVotersList(new BN(0), account_investor2, true, {from: token_owner}); assert.equal((tx.logs[0].args._ballotId).toString(), 0); assert.equal(tx.logs[0].args._voter, account_investor2); - assert.equal(tx.logs[0].args._change, true); + assert.equal(tx.logs[0].args._exempt, true); }); it("\t\t Should fail to add voter in ballot exemption list -- doing the same change again", async() => { @@ -355,7 +355,7 @@ contract("WeightedVoteCheckpoint", async (accounts) => { it("\t\t Should add the voter in to the default exemption list", async() => { let tx = await I_WeightedVoteCheckpoint.changeDefaultExemptedVotersList(account_investor1, true, {from: token_owner}); assert.equal(tx.logs[0].args._voter, account_investor1); - assert.equal(tx.logs[0].args._change, true); + assert.equal(tx.logs[0].args._exempt, true); }); it("\t\t Should fail to add voter in default exemption list -- doing the same change again", async() => {