Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions contracts/schemes/Auction4Reputation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ contract Auction4Reputation is Ownable {
reputationRewardLeft = reputationRewardLeft.sub(reputation);
require(
ControllerInterface(avatar.owner())
.mintReputation(reputation, _beneficiary, address(avatar)), "mint reputation should success");
.mintReputation(reputation, _beneficiary, address(avatar)), "mint reputation should succeed");
emit Redeem(_auctionId, _beneficiary, reputation);
}

Expand All @@ -119,7 +119,7 @@ contract Auction4Reputation is Ownable {
require(now <= auctionsEndTime, "bidding should be within the allowed bidding period");
// solhint-disable-next-line not-rely-on-time
require(now >= auctionsStartTime, "bidding is enable only after bidding auctionsStartTime");
require(token.transferFrom(msg.sender, address(this), _amount), "transferFrom should success");
require(token.transferFrom(msg.sender, address(this), _amount), "transferFrom should succeed");
// solhint-disable-next-line not-rely-on-time
auctionId = (now - auctionsStartTime) / auctionPeriod;
Auction storage auction = auctions[auctionId];
Expand All @@ -146,7 +146,7 @@ contract Auction4Reputation is Ownable {
// solhint-disable-next-line not-rely-on-time
require(now > auctionsEndTime, "now > auctionsEndTime");
uint256 tokenBalance = token.balanceOf(address(this));
require(token.transfer(wallet, tokenBalance), "transfer should success");
require(token.transfer(wallet, tokenBalance), "transfer should succeed");
}

}
2 changes: 1 addition & 1 deletion contracts/schemes/ExternalLocking4Reputation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ contract ExternalLocking4Reputation is Locking4Reputation, Ownable {
(bool result, bytes memory returnValue) =
// solhint-disable-next-line avoid-call-value,avoid-low-level-calls
externalLockingContract.call(abi.encodeWithSignature(getBalanceFuncSignature, beneficiary));
require(result, "call to external contract should success");
require(result, "call to external contract should succeed");
uint256 lockedAmount;
// solhint-disable-next-line no-inline-assembly
assembly {
Expand Down
2 changes: 1 addition & 1 deletion contracts/schemes/Locking4Reputation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ contract Locking4Reputation {
require(
ControllerInterface(
avatar.owner())
.mintReputation(reputation, _beneficiary, address(avatar)), "mint reputation should success");
.mintReputation(reputation, _beneficiary, address(avatar)), "mint reputation should succeed");

emit Redeem(_beneficiary, reputation);
}
Expand Down
4 changes: 2 additions & 2 deletions contracts/schemes/LockingToken4Reputation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ contract LockingToken4Reputation is Locking4Reputation, Ownable {
*/
function release(address _beneficiary, bytes32 _lockingId) public returns(bool) {
uint256 amount = super._release(_beneficiary, _lockingId);
require(lockedTokens[_lockingId].transfer(_beneficiary, amount), "transfer should success");
require(lockedTokens[_lockingId].transfer(_beneficiary, amount), "transfer should succeed");

return true;
}
Expand All @@ -83,7 +83,7 @@ contract LockingToken4Reputation is Locking4Reputation, Ownable {
require(numerator > 0, "numerator should be > 0");
require(denominator > 0, "denominator should be > 0");

require(_token.transferFrom(msg.sender, address(this), _amount), "transferFrom should success");
require(_token.transferFrom(msg.sender, address(this), _amount), "transferFrom should succeed");

lockingId = super._lock(_amount, _period, msg.sender, numerator, denominator);

Expand Down
4 changes: 2 additions & 2 deletions contracts/universalSchemes/ContributionReward.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ contract ContributionReward is UniversalScheme, VotingMachineCallbacks, Proposal
address indexed _avatar,
bytes32 indexed _proposalId,
address indexed _intVoteInterface,
bytes32 _contributionDescription,
string _contributionDescription,
int256 _reputationChange,
uint[5] _rewards,
ERC20 _externalToken,
Expand Down Expand Up @@ -150,7 +150,7 @@ contract ContributionReward is UniversalScheme, VotingMachineCallbacks, Proposal
*/
function proposeContributionReward(
Avatar _avatar,
bytes32 _contributionDescriptionHash,
string memory _contributionDescriptionHash,
int256 _reputationChange,
uint[5] memory _rewards,
ERC20 _externalToken,
Expand Down
4 changes: 2 additions & 2 deletions contracts/universalSchemes/GenericScheme.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract GenericScheme is UniversalScheme, VotingMachineCallbacks, ProposalExecu
address indexed _avatar,
bytes32 indexed _proposalId,
bytes _callData,
bytes32 _descriptionHash
string _descriptionHash
);

event ProposalExecuted(
Expand Down Expand Up @@ -145,7 +145,7 @@ contract GenericScheme is UniversalScheme, VotingMachineCallbacks, ProposalExecu
* @param _descriptionHash proposal description hash
* @return an id which represents the proposal
*/
function proposeCall(Avatar _avatar, bytes memory _callData, bytes32 _descriptionHash)
function proposeCall(Avatar _avatar, bytes memory _callData, string memory _descriptionHash)
public
returns(bytes32)
{
Expand Down
8 changes: 4 additions & 4 deletions contracts/universalSchemes/GlobalConstraintRegistrar.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ contract GlobalConstraintRegistrar is UniversalScheme, VotingMachineCallbacks, P
address _gc,
bytes32 _params,
bytes32 _voteToRemoveParams,
bytes32 _descriptionHash
string _descriptionHash
);

event RemoveGlobalConstraintsProposal(
address indexed _avatar,
bytes32 indexed _proposalId,
address indexed _intVoteInterface,
address _gc,
bytes32 _descriptionHash
string _descriptionHash
);

event ProposalExecuted(address indexed _avatar, bytes32 indexed _proposalId, int256 _param);
Expand Down Expand Up @@ -135,7 +135,7 @@ contract GlobalConstraintRegistrar is UniversalScheme, VotingMachineCallbacks, P
address _gc,
bytes32 _params,
bytes32 _voteToRemoveParams,
bytes32 _descriptionHash)
string memory _descriptionHash)
public
returns(bytes32)
{
Expand Down Expand Up @@ -176,7 +176,7 @@ contract GlobalConstraintRegistrar is UniversalScheme, VotingMachineCallbacks, P
* @param _descriptionHash proposal's description hash
* @return bytes32 -the proposal id
*/
function proposeToRemoveGC(Avatar _avatar, address _gc, bytes32 _descriptionHash) public returns(bytes32) {
function proposeToRemoveGC(Avatar _avatar, address _gc, string memory _descriptionHash) public returns(bytes32) {
Controller controller = Controller(_avatar.owner());
require(controller.isGlobalConstraintRegistered(_gc, address(_avatar)));
Parameters memory params = parameters[getParametersFromController(_avatar)];
Expand Down
8 changes: 4 additions & 4 deletions contracts/universalSchemes/SchemeRegistrar.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ contract SchemeRegistrar is UniversalScheme, VotingMachineCallbacks, ProposalExe
address _scheme,
bytes32 _parametersHash,
bytes4 _permissions,
bytes32 _descriptionHash
string _descriptionHash
);

event RemoveSchemeProposal(address indexed _avatar,
bytes32 indexed _proposalId,
address indexed _intVoteInterface,
address _scheme,
bytes32 _descriptionHash
string _descriptionHash
);

event ProposalExecuted(address indexed _avatar, bytes32 indexed _proposalId, int256 _param);
Expand Down Expand Up @@ -126,7 +126,7 @@ contract SchemeRegistrar is UniversalScheme, VotingMachineCallbacks, ProposalExe
address _scheme,
bytes32 _parametersHash,
bytes4 _permissions,
bytes32 _descriptionHash
string memory _descriptionHash
)
public
returns(bytes32)
Expand Down Expand Up @@ -172,7 +172,7 @@ contract SchemeRegistrar is UniversalScheme, VotingMachineCallbacks, ProposalExe
* @param _descriptionHash proposal description hash
* NB: not only registers the proposal, but also votes for it
*/
function proposeToRemoveScheme(Avatar _avatar, address _scheme, bytes32 _descriptionHash)
function proposeToRemoveScheme(Avatar _avatar, address _scheme, string memory _descriptionHash)
public
returns(bytes32)
{
Expand Down
8 changes: 4 additions & 4 deletions contracts/universalSchemes/UpgradeScheme.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ contract UpgradeScheme is UniversalScheme, VotingMachineCallbacks, ProposalExecu
bytes32 indexed _proposalId,
address indexed _intVoteInterface,
address _newController,
bytes32 _descriptionHash
string _descriptionHash
);

event ChangeUpgradeSchemeProposal(
Expand All @@ -27,7 +27,7 @@ contract UpgradeScheme is UniversalScheme, VotingMachineCallbacks, ProposalExecu
address indexed _intVoteInterface,
address _newUpgradeScheme,
bytes32 _params,
bytes32 _descriptionHash
string _descriptionHash
);

event ProposalExecuted(address indexed _avatar, bytes32 indexed _proposalId, int256 _param);
Expand Down Expand Up @@ -119,7 +119,7 @@ contract UpgradeScheme is UniversalScheme, VotingMachineCallbacks, ProposalExecu
* @param _descriptionHash proposal description hash
* @return an id which represents the proposal
*/
function proposeUpgrade(Avatar _avatar, address _newController, bytes32 _descriptionHash)
function proposeUpgrade(Avatar _avatar, address _newController, string memory _descriptionHash)
public
returns(bytes32)
{
Expand Down Expand Up @@ -158,7 +158,7 @@ contract UpgradeScheme is UniversalScheme, VotingMachineCallbacks, ProposalExecu
Avatar _avatar,
address _scheme,
bytes32 _params,
bytes32 _descriptionHash
string memory _descriptionHash
)
public
returns(bytes32)
Expand Down
4 changes: 2 additions & 2 deletions contracts/universalSchemes/VestingScheme.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract VestingScheme is UniversalScheme, VotingMachineCallbacks, ProposalExecu

event ProposalExecuted(address indexed _avatar, bytes32 indexed _proposalId, int256 _param);
event ProposalDeleted(address indexed _avatar, bytes32 indexed _proposalId);
event AgreementProposal(address indexed _avatar, bytes32 indexed _proposalId, bytes32 _descriptionHash);
event AgreementProposal(address indexed _avatar, bytes32 indexed _proposalId, string _descriptionHash);
event NewVestedAgreement(uint256 indexed _agreementId);
event ProposedVestedAgreement(uint256 indexed _agreementId, bytes32 indexed _proposalId);
event SignToCancelAgreement(uint256 indexed _agreementId, address indexed _signer);
Expand Down Expand Up @@ -123,7 +123,7 @@ contract VestingScheme is UniversalScheme, VotingMachineCallbacks, ProposalExecu
uint256 _signaturesReqToCancel,
address[] calldata _signersArray,
Avatar _avatar,
bytes32 _descriptionHash
string calldata _descriptionHash
)
external
returns(bytes32)
Expand Down
4 changes: 2 additions & 2 deletions contracts/universalSchemes/VoteInOrganizationScheme.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ contract VoteInOrganizationScheme is UniversalScheme, VotingMachineCallbacks, Pr
IntVoteInterface _originalIntVote,
bytes32 _originalProposalId,
uint256 _vote,
bytes32 _descriptionHash
string _descriptionHash
);

event ProposalExecuted(address indexed _avatar, bytes32 indexed _proposalId, int256 _param, bytes _callReturnValue);
Expand Down Expand Up @@ -123,7 +123,7 @@ contract VoteInOrganizationScheme is UniversalScheme, VotingMachineCallbacks, Pr
IntVoteInterface _originalIntVote,
bytes32 _originalProposalId,
uint256 _vote,
bytes32 _descriptionHash)
string memory _descriptionHash)
public
returns(bytes32)
{
Expand Down
4 changes: 2 additions & 2 deletions test/contributionreward.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ contract('ContributionReward', accounts => {
var testSetup = await setup(accounts,0);
var periodLength = 1;
var tx = await testSetup.contributionReward.proposeContributionReward(testSetup.org.avatar.address,
web3.utils.asciiToHex("description"),
"description-hash",
10,
[1,2,3,periodLength,5],
testSetup.standardTokenMock.address,
Expand All @@ -120,7 +120,7 @@ contract('ContributionReward', accounts => {
assert.equal(tx.logs[0].event, "NewContributionProposal");
assert.equal(await helpers.getValueFromLogs(tx, '_avatar',0), testSetup.org.avatar.address, "Wrong log: _avatar");
assert.equal(await helpers.getValueFromLogs(tx, '_intVoteInterface',0), testSetup.contributionRewardParams.votingMachine.absoluteVote.address, "Wrong log: _intVoteInterface");
assert.equal(await helpers.getValueFromLogs(tx, '_contributionDescription',10), web3.utils.padRight(web3.utils.asciiToHex("description"),64), "Wrong log: _contributionDescription");
assert.equal(await helpers.getValueFromLogs(tx, '_contributionDescription',15), "description-hash", "Wrong log: _contributionDescription");
assert.equal(await helpers.getValueFromLogs(tx, '_reputationChange',0), 10, "Wrong log: _reputationChange");
var arr = await helpers.getValueFromLogs(tx, '_rewards',0);
assert.equal(arr[0].words[0], 1, "Wrong log: _rewards");
Expand Down
2 changes: 1 addition & 1 deletion test/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ contract('Controller', accounts => {
helpers.assertVMException(ex);
}
}else{
//unregister should success
//unregister should succeed
tx = await controller.unregisterScheme(unregisteredScheme,avatar.address,{ from: registeredScheme });
assert.equal(tx.logs.length, 1);
assert.equal(tx.logs[0].event, "UnregisterScheme");
Expand Down
2 changes: 1 addition & 1 deletion test/ucontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ contract('UController',accounts => {
helpers.assertVMException(ex);
}
}else{
//unregister should success
//unregister should succeed
tx = await controller.unregisterScheme(unregisteredScheme,avatar.address,{ from: registeredScheme });
assert.equal(tx.logs.length, 1);
assert.equal(tx.logs[0].event, "UnregisterScheme");
Expand Down