Skip to content

Commit 732af4d

Browse files
authored
Support truffle V5 (web3 1.0) (#9)
bump v to alpha 0.0.06
1 parent 2403c1c commit 732af4d

14 files changed

+176
-280
lines changed

.soliumrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
"arg-overflow": [
1616
"warning",
1717
5
18+
],
19+
"error-reason": [
20+
"off"
1821
]
1922
}
2023
}

contracts/Reputation.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ contract Reputation is Ownable {
113113
/// @param _owner The address that will lose the reputation
114114
/// @param _amount The quantity of reputation to burn
115115
/// @return True if the reputation are burned correctly
116-
function burn(address _owner, uint _amount) onlyOwner public returns (bool) {
116+
function burn(address _owner, uint _amount) public onlyOwner returns (bool) {
117117
uint curTotalSupply = totalSupply();
118118
uint amountBurned = _amount;
119119
if (curTotalSupply < amountBurned) {
@@ -138,7 +138,7 @@ contract Reputation is Ownable {
138138
/// @param checkpoints The history of values being queried
139139
/// @param _block The block number to retrieve the value at
140140
/// @return The number of reputation being queried
141-
function getValueAt(Checkpoint[] storage checkpoints, uint _block) view internal returns (uint) {
141+
function getValueAt(Checkpoint[] storage checkpoints, uint _block) internal view returns (uint) {
142142
if (checkpoints.length == 0) {
143143
return 0;
144144
}

contracts/VotingMachines/GenesisProtocolCallbacksInterface.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ interface GenesisProtocolCallbacksInterface {
66
function getTotalReputationSupply(bytes32 _proposalId) external view returns(uint256);
77
function mintReputation(uint _amount,address _beneficiary,bytes32 _proposalId) external returns(bool);
88
function burnReputation(uint _amount,address _owner,bytes32 _proposalId) external returns(bool);
9-
function reputationOf(address _owner,bytes32 _proposalId) view external returns(uint);
9+
function reputationOf(address _owner,bytes32 _proposalId) external view returns(uint);
1010
function stakingTokenTransfer(StandardToken _stakingToken,address _beneficiary,uint _amount,bytes32 _proposalId) external returns(bool);
1111
}

contracts/test/AbsoluteVoteExecuteMock.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ contract AbsoluteVoteExecuteMock is Debug,GenesisProtocolCallbacksInterface,Gene
4747
return reputation.burn(_beneficiary,_amount);
4848
}
4949

50-
function reputationOf(address _owner,bytes32 _proposalId) view external returns(uint) {
50+
function reputationOf(address _owner,bytes32 _proposalId) external view returns(uint) {
5151
return reputation.balanceOfAt(_owner,proposalsBlockNumbers[_proposalId]);
5252
}
5353

contracts/test/GenesisProtocolCallbacksMock.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ contract GenesisProtocolCallbacksMock is Debug,GenesisProtocolCallbacksInterface
4949
return reputation.burn(_beneficiary,_amount);
5050
}
5151

52-
function reputationOf(address _owner,bytes32 _proposalId) view external returns(uint) {
52+
function reputationOf(address _owner,bytes32 _proposalId) external view returns(uint) {
5353
return reputation.balanceOfAt(_owner,proposalsBlockNumbers[_proposalId]);
5454
}
5555

package-lock.json

Lines changed: 14 additions & 127 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@daostack/infra",
3-
"version": "0.0.0-alpha.05",
3+
"version": "0.0.0-alpha.06",
44
"description": "Base layer DAO's components",
55
"files": [
66
"contracts/",
@@ -47,17 +47,15 @@
4747
"eslint-plugin-promise": "^3.6.0",
4848
"eslint-plugin-react": "^7.6.1",
4949
"eslint-plugin-standard": "^3.0.1",
50-
"ganache-cli": "^6.1.0",
5150
"pm2": "^2.9.3",
5251
"promisify": "^0.0.3",
5352
"pug": "^2.0.0-rc.4",
5453
"rimraf": "^2.6.2",
5554
"run-with-ganache": "^0.1.1",
5655
"solc": "^0.4.24",
5756
"solc-cli": "^0.3.0",
58-
"solium": "^1.1.7",
59-
"truffle": "^4.1.11",
60-
"truffle-contract": "^3.0.5",
57+
"solium": "^1.1.8",
58+
"truffle": "beta",
6159
"uint32": "^0.2.1",
6260
"web3-utils": "^1.0.0-beta.34"
6361
},
@@ -86,5 +84,8 @@
8684
"dependencies": {
8785
"ethereumjs-abi": "^0.6.5",
8886
"openzeppelin-solidity": "1.12.0"
87+
},
88+
"peerDependencies": {
89+
"ganache-cli": "^6.1.8"
8990
}
9091
}

0 commit comments

Comments
 (0)