Skip to content

Commit

Permalink
Support truffle V5 (web3 1.0) (#9)
Browse files Browse the repository at this point in the history
bump v to alpha 0.0.06
  • Loading branch information
orenyodfat authored Sep 20, 2018
1 parent 2403c1c commit 732af4d
Show file tree
Hide file tree
Showing 14 changed files with 176 additions and 280 deletions.
3 changes: 3 additions & 0 deletions .soliumrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"arg-overflow": [
"warning",
5
],
"error-reason": [
"off"
]
}
}
4 changes: 2 additions & 2 deletions contracts/Reputation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ contract Reputation is Ownable {
/// @param _owner The address that will lose the reputation
/// @param _amount The quantity of reputation to burn
/// @return True if the reputation are burned correctly
function burn(address _owner, uint _amount) onlyOwner public returns (bool) {
function burn(address _owner, uint _amount) public onlyOwner returns (bool) {
uint curTotalSupply = totalSupply();
uint amountBurned = _amount;
if (curTotalSupply < amountBurned) {
Expand All @@ -138,7 +138,7 @@ contract Reputation is Ownable {
/// @param checkpoints The history of values being queried
/// @param _block The block number to retrieve the value at
/// @return The number of reputation being queried
function getValueAt(Checkpoint[] storage checkpoints, uint _block) view internal returns (uint) {
function getValueAt(Checkpoint[] storage checkpoints, uint _block) internal view returns (uint) {
if (checkpoints.length == 0) {
return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ interface GenesisProtocolCallbacksInterface {
function getTotalReputationSupply(bytes32 _proposalId) external view returns(uint256);
function mintReputation(uint _amount,address _beneficiary,bytes32 _proposalId) external returns(bool);
function burnReputation(uint _amount,address _owner,bytes32 _proposalId) external returns(bool);
function reputationOf(address _owner,bytes32 _proposalId) view external returns(uint);
function reputationOf(address _owner,bytes32 _proposalId) external view returns(uint);
function stakingTokenTransfer(StandardToken _stakingToken,address _beneficiary,uint _amount,bytes32 _proposalId) external returns(bool);
}
2 changes: 1 addition & 1 deletion contracts/test/AbsoluteVoteExecuteMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ contract AbsoluteVoteExecuteMock is Debug,GenesisProtocolCallbacksInterface,Gene
return reputation.burn(_beneficiary,_amount);
}

function reputationOf(address _owner,bytes32 _proposalId) view external returns(uint) {
function reputationOf(address _owner,bytes32 _proposalId) external view returns(uint) {
return reputation.balanceOfAt(_owner,proposalsBlockNumbers[_proposalId]);
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/test/GenesisProtocolCallbacksMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ contract GenesisProtocolCallbacksMock is Debug,GenesisProtocolCallbacksInterface
return reputation.burn(_beneficiary,_amount);
}

function reputationOf(address _owner,bytes32 _proposalId) view external returns(uint) {
function reputationOf(address _owner,bytes32 _proposalId) external view returns(uint) {
return reputation.balanceOfAt(_owner,proposalsBlockNumbers[_proposalId]);
}

Expand Down
141 changes: 14 additions & 127 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@daostack/infra",
"version": "0.0.0-alpha.05",
"version": "0.0.0-alpha.06",
"description": "Base layer DAO's components",
"files": [
"contracts/",
Expand Down Expand Up @@ -47,17 +47,15 @@
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-react": "^7.6.1",
"eslint-plugin-standard": "^3.0.1",
"ganache-cli": "^6.1.0",
"pm2": "^2.9.3",
"promisify": "^0.0.3",
"pug": "^2.0.0-rc.4",
"rimraf": "^2.6.2",
"run-with-ganache": "^0.1.1",
"solc": "^0.4.24",
"solc-cli": "^0.3.0",
"solium": "^1.1.7",
"truffle": "^4.1.11",
"truffle-contract": "^3.0.5",
"solium": "^1.1.8",
"truffle": "beta",
"uint32": "^0.2.1",
"web3-utils": "^1.0.0-beta.34"
},
Expand Down Expand Up @@ -86,5 +84,8 @@
"dependencies": {
"ethereumjs-abi": "^0.6.5",
"openzeppelin-solidity": "1.12.0"
},
"peerDependencies": {
"ganache-cli": "^6.1.8"
}
}
Loading

0 comments on commit 732af4d

Please sign in to comment.