Skip to content

Instantly share code, notes, and snippets.

@renexdev
Last active January 12, 2018 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renexdev/a6325c0d1ec90a7bbd81898e05dbaf50 to your computer and use it in GitHub Desktop.
Save renexdev/a6325c0d1ec90a7bbd81898e05dbaf50 to your computer and use it in GitHub Desktop.
Issue 60 work in progress
The following text, describe the details of the upgrading process... (in three steps)
//Following https://github.com/aragon/aragon-core/pull/169/commits/802561bb58b1a14f46bc187474f290f16d0d7778
#1 Updating packtages...
@apps/finance
file: package-lock.json
//1.1- truffle version and solc dep in (3.4.11->4.0.4)
"truffle": {
"version": "3.4.11",
//1.2 solc version in (0.4.15 -> 0.4.18)
"solc": {
"version": "0.4.18",
"resolved": "https://registry.npmjs.org/solc/-/solc-0.4.18.tgz",
"integrity": "sha512-Kq+O3PNF9Pfq7fB+lDYAuoqRdghLmZyfngsg0h1Hj38NKAeVHeGPOGeZasn5KqdPeCzbMFvaGyTySxzGv6aXCg==",
//1.3 Not upgraded -> "solc" dep in "(still 0.4.15)
"web3-provider-engine": {
file: package.json
//1.4- truffle version
"truffle": "^4.0.4",
@apps/group
file: package-lock.json
//1.5 idem 1.1
//1.6 idem 1.2
//1.7 idem 1.3
file: package.json
//1.8 idem 1.4
@apps/token-manager
file: package-lock.json
//1.9 idem 1.1
//1.10 idem 1.2
//1.11 idem 1.3
file: package.json
//1.12 idem 1.4
@apps/vault
file: package-lock.json
//1.13 idem 1.1
//1.14 idem 1.2
//1.15 idem 1.3
file: package.json
//1.16 idem 1.4
@apps/voting
file: package-lock.json
//1.17 idem 1.1
//1.18 idem 1.2
//1.19 idem 1.3
file: package.json
//1.20 idem 1.4
@future-apps/fundraising
file: package-lock.json
//1.21 idem 1.1
//1.22 idem 1.2
//1.23 idem 1.3
file: package.json
//1.24 idem 1.4
#2 - Update pragma solidity versions
@apps/finance
files: [
Finance.sol
/test/TestFinance.sol:
/test/mocks/ExecutionTarget.sol:
/test/mocks/FinanceMock.sol:
]
//2.1 set new solidity version to pagma
@apps/group
files:[
Group.sol
/test/mocks/ExecutionTarget.sol:
]
//2.2 idem 2.1
@apps/token-manager
files:[
TokenManager.sol
/test/TestTokenManager.sol:
/test/mocks/ExecutionTarget.sol:
]
//2.3 idem 2.1
@apps/vault
file: [
Vault.sol
/test/TestVault.sol
]
//2.4 idem 2.1
@apps/voting
files: [
Voting.sol
/test/TestVoting.sol:
/test/mocks/ExecutionTarget.sol:
]
//2.5 idem 2.1
@future-apps/fundraising
files:[
Fundraising.sol
/test/TestFundraising.sol:
/test/mocks/FundraisingMock.sol:
]
//2.6 idem 2.1
--------------------------------------------------------------------------------------------------------------
//Time to check deps new version config (runTestBeforeRefactor.dat)
> npm run bootstrap
ok
> npm run test
I'got the following pragma incompatibilities in aragon-core module, solved manually
@apps/group
lerna ERR! Compiling @aragon/core/contracts/apps/App.sol...
lerna ERR! Compiling @aragon/core/contracts/apps/AppStorage.sol...
lerna ERR! Compiling @aragon/core/contracts/common/EVMCallScript.sol...
lerna ERR! Compiling @aragon/core/contracts/common/IForwarder.sol...
lerna ERR! Compiling @aragon/core/contracts/common/Initializable.sol...
lerna ERR! Compiling @aragon/core/contracts/kernel/IKernel.sol...
@apps/vault
lerna ERR! Compiling @aragon/core/contracts/apps/App.sol...
lerna ERR! Compiling @aragon/core/contracts/apps/AppStorage.sol...
lerna ERR! Compiling @aragon/core/contracts/common/TokenController.sol...
lerna ERR! Compiling @aragon/core/contracts/kernel/IKernel.sol...
@apps/Voting
lerna ERR! Compiling @aragon/core/contracts/apps/App.sol...
lerna ERR! Compiling @aragon/core/contracts/apps/AppStorage.sol...
lerna ERR! Compiling @aragon/core/contracts/common/EVMCallScript.sol...
lerna ERR! Compiling @aragon/core/contracts/common/IForwarder.sol...
lerna ERR! Compiling @aragon/core/contracts/common/Initializable.sol...
lerna ERR! Compiling @aragon/core/contracts/common/TokenController.sol...
lerna ERR! Compiling @aragon/core/contracts/kernel/IKernel.sol...
@apps/token-manager
lerna ERR! Compiling @aragon/core/contracts/apps/App.sol...
lerna ERR! Compiling @aragon/core/contracts/apps/AppStorage.sol...
lerna ERR! Compiling @aragon/core/contracts/common/EVMCallScript.sol...
lerna ERR! Compiling @aragon/core/contracts/common/IForwarder.sol...
lerna ERR! Compiling @aragon/core/contracts/common/Initializable.sol...
lerna ERR! Compiling @aragon/core/contracts/common/TokenController.sol...
lerna ERR! Compiling @aragon/core/contracts/kernel/IKernel.sol...
lerna ERR! Compiling @aragon/core/contracts/misc/Migrations.sol...
@finance
lerna ERR! Compiling @aragon/core/contracts/apps/App.sol...
lerna ERR! Compiling @aragon/core/contracts/apps/AppStorage.sol...
lerna ERR! Compiling @aragon/core/contracts/common/EtherToken.sol...
lerna ERR! Compiling @aragon/core/contracts/common/Initializable.sol...
lerna ERR! Compiling @aragon/core/contracts/common/TokenController.sol...
lerna ERR! Compiling @aragon/core/contracts/common/erc677/ERC677Receiver.sol...
lerna ERR! Compiling @aragon/core/contracts/common/erc677/ERC677Token.sol...
lerna ERR! Compiling @aragon/core/contracts/kernel/IKernel.sol...
--------------------------------------------------------------------------------------------------------------
#3 - Transition constant -> view or pure
Definitions:
def1-View Functions:
Functions can be declared view in which case they promise not to modify the state.
Getter methods are marked view.
The following statements are considered modifying the state:
Writing to state variables.
Emitting events.
Creating other contracts.
Using selfdestruct.
Sending Ether via calls.
Calling any function not marked view or pure.
Using low-level calls.
Using inline assembly that contains certain opcodes.
def2- Pure Functions
Functions can be declared pure in which case they promise not to read from or modify the state.
The following are considered reading from the state:
Reading from state variables.
Accessing this.balance or <address>.balance.
Accessing any of the members of block, tx, msg (with the exception of msg.sig and msg.data).
Calling any function not marked pure.
Using inline assembly that contains certain opcodes.
References: https://solidity.readthedocs.io/en/develop/contracts.html
@apps/token-manager
file: TokenManager.sol
//def1
function canForward(address _sender, bytes _evmCallScript) public view returns (bool) {
function allHolders() public view returns (address[]) { return holders; }
//def1 - a view function that calls another view fn (->transferrableBalance)
function onTransfer(address _from, address _to, uint _amount) public view returns (bool) {
//def1
function tokenGrantsCount(address _holder) public view returns (uint256) {
//def1 - a view function that calls another view fn (->transferrableBalance)
function spendableBalanceOf(address _holder) public view returns (uint256) {
//def1
function transferrableBalance(address _holder, uint256 _time) public view returns (uint256) {
//def1 (I thought as def1 but lenrna complains koz SafeMath)
function calculateNonVestedTokens(
uint256 tokens,
uint256 time,
uint256 start,
uint256 cliff,
uint256 vesting) private pure returns (uint256)
//> lerna Output
/*
lerna ERR! ,$LOCALWORKSPACE/aragon-apps/apps/token-manager/contracts/TokenManager.sol:276:17: TypeError: Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
lerna ERR! SafeMath.sub(
lerna ERR! ^
lerna ERR! Spanning multiple lines.
lerna ERR! ,$LOCALWORKSPACE/aragon-apps/apps/token-manager/contracts/TokenManager.sol:274:13: TypeError: Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
lerna ERR! SafeMath.mul(
lerna ERR! ^
lerna ERR! Spanning multiple lines.
lerna ERR! ,$LOCALWORKSPACE/aragon-apps/apps/token-manager/contracts/TokenManager.sol:281:13: TypeError: Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
lerna ERR! SafeMath.sub(
lerna ERR! ^
lerna ERR! Spanning multiple lines.
lerna ERR! ,$LOCALWORKSPACE/aragon-apps/apps/token-manager/contracts/TokenManager.sol:273:32: TypeError: Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
lerna ERR! uint256 vestedTokens = SafeMath.div(
lerna ERR! ^
lerna ERR! Spanning multiple lines.
*/
//def1 (I thought as def1 but lenrna complains koz TokenController)
function onApprove(address _owner, address _spender, uint _amount) public view returns (bool) {
//> lerna Output
/*
,$LOCALWORKSPACE/aragon-apps/apps/token-manager/contracts/TokenManager.sol:335:5: TypeError: Overriding function changes state mutability from "view" to "pure".
function onApprove(address _owner, address _spender, uint _amount) public pure returns (bool) {
^
Spanning multiple lines.
@aragon/core/contracts/common/TokenController.sol:24:5: Overriden function is here:
function onApprove(address _owner, address _spender, uint _amount) public constant returns(bool);
^-----------------------------------------------------------------------------------------------^
*/
@apps/vault
file: Vault.sol
// No modifications made
@apps/voting
file: Voting.sol
//def1 - a view function that calls another view fn (->canPerform)
function canForward(address _sender, bytes _evmCallScript) public view returns (bool) {
//def1
function canVote(uint256 _voteId, address _voter) public view returns (bool) {
function canExecute(uint256 _voteId) public view returns (bool) {
function getVote(uint256 _voteId) public view returns (bool open, bool executed, address creator, uint64 startDate, uint256 snapshotBlock, uint256 minAcceptQuorum, uint256 yea, uint256 nay, uint256 totalVoters, bytes script, uint256 scriptActionsCount) {
function getVoteMetadata(uint256 _voteId) public view returns (string metadata) {
function getVoteScriptAction(uint256 _voteId, uint256 _scriptAction) public view returns (address, bytes) {
@future-apps/fundraising
file: Fundraising.sol
//def1
function getSale(uint256 _saleId) public view returns (bool closed, address investor, address raisedToken, uint256 maxRaised, uint256 maxSold, uint256 minBuy, bool isInversePrice, uint64 saleStartTime, uint256 periodsCount, uint256 currentPeriod, uint256 raisedAmount, uint256 soldAmount) {
function getPeriod(uint256 _saleId, uint256 _salePeriod) public view returns (uint64 periodStarts, uint64 periodEnds, uint256 initialPrice, uint256 finalPrice) {
//def1 - a view function that calls another internal fn (->transitionSalePeriodIfNeeded)
//Q!: can modify state through transitionSalePeriodIfNeeded????
function getCurrentPrice(uint256 _saleId) public view returns (uint256 price, bool isInversePrice, uint256 pricePrecision) {
//def1
function calculatePrice(uint256 _saleId) internal view returns (uint256 price, bool isInversePrice, uint256 pricePrecision) {
//def2 - operations
function parseBuyData(bytes data) internal pure returns (bytes4 sig, uint256 saleId) {
//See sample given in View Functions at docs
function getTimestamp() internal view returns (uint256) {
@apps/finance
file: Finance.sol
//def1
function getPayment(uint256 _paymentId) public view returns (ERC20 token, address receiver, uint256 amount, uint64 initialPaymentTime, uint64 interval, uint64 maxRepeats, string reference, bool disabled, uint256 repeats, address createdBy) {
function getTransaction(uint256 _transactionId) public view returns (uint256 periodId, uint256 amount, uint256 paymentId, ERC20 token, address entity, bool isIncoming, uint64 date, string reference) {
function getPeriod(uint256 _periodId) public view returns (bool isCurrent, uint64 startTime, uint64 endTime, uint256 firstTransactionId, uint256 lastTransactionId) {
function getPeriodTokenStatement(uint256 _periodId, address _token) public view returns (uint256 expenses, uint256 income) {
function nextPaymentTime(uint256 _paymentId) public view returns (uint64) {
function _getRemainingBudget(address _token) internal view returns (uint256) {
//See sample given in View Functions at docs
function getTimestamp() internal view returns (uint256) { return now; }
//def1
function getPeriodDuration() public view returns (uint64 periodDuration) {
function getBudget(address _token) transitionsPeriod public view returns (uint256 budget, bool hasBudget, uint256 remainingBudget) {
function currentPeriodId() public view returns (uint256) {
--------------------------------------------------------------------------------------------------------------
//Time to check deps new version config (runTestAfterRefactor.dat)
> npm run bootstrap
ok
> npm run test
//Detected Warnings
@apps/finance
,$LOCALWORKSPACE/aragon-apps/apps/finance/contracts/Finance.sol:417:40: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
function getBudget(address _token) transitionsPeriod public view returns (uint256 budget, bool hasBudget, uint256 remainingBudget) {
^---------------^
,$LOCALWORKSPACE/aragon-apps/apps/finance/contracts/Finance.sol:541:5: Warning: Function state mutability can be restricted to view
function _canMakePayment(ERC20 _token, uint256 _amount) internal returns (bool) {
^
@apps/group
//no warnings
@apps/token-manager
//no warnings
@apps/vault
//no warnings
@apps/voting
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:133:42: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
function canForward(address _sender, bytes _evmCallScript) public view returns (bool) {
^------------------^
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:140:16: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
return _isVoteOpen(vote) && token.balanceOfAt(_voter, vote.snapshotBlock) > 0;
^---------------^
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:150:13: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
if (_isValuePct(vote.yea, vote.totalVoters, supportRequiredPct))
^---------------------------------------------------------^
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:155:27: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
bool voteEnded = !_isVoteOpen(vote);
^---------------^
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:156:27: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
bool hasSupport = _isValuePct(vote.yea, totalVotes, supportRequiredPct);
^---------------------------------------------------^
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:157:29: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
bool hasMinQuorum = _isValuePct(vote.yea, vote.totalVoters, vote.minAcceptQuorumPct);
^--------------------------------------------------------------^
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:165:16: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
open = _isVoteOpen(vote);
^---------------^
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:257:5: Warning: Function state mutability can be restricted to view
function _isVoteOpen(Vote storage vote) internal returns (bool) {
^
Spanning multiple lines.
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:264:5: Warning: Function state mutability can be restricted to pure
function _isValuePct(uint256 _value, uint256 _total, uint256 _pct) internal returns (bool) {
^
@future-apps/fundraising
//No test
> @ test /home/mecom/workspace/ethBox/aragon/colaboration-bounties/aragon-apps-compilation
> lerna run --scope=@aragon/apps-* test
> @aragon/apps-vault@1.0.0 test $LOCALWORKSPACE/aragon-apps/apps/vault
> truffle test
Compiling ./contracts/Vault.sol...
Compiling ./test/TestVault.sol...
Compiling @aragon/core/contracts/apps/App.sol...
Compiling @aragon/core/contracts/apps/AppStorage.sol...
Compiling @aragon/core/contracts/common/MiniMeToken.sol...
Compiling @aragon/core/contracts/common/TokenController.sol...
Compiling @aragon/core/contracts/kernel/IKernel.sol...
Compiling @aragon/core/contracts/misc/Migrations.sol...
Compiling @aragon/core/contracts/zeppelin/token/ERC20.sol...
Compiling @aragon/core/contracts/zeppelin/token/ERC20Basic.sol...
Compilation warnings encountered:
@aragon/core/contracts/apps/App.sol:11:5: Warning: No visibility specified. Defaulting to "public".
function canPerform(address _sender, bytes32 _role) constant returns (bool) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/TokenController.sol:8:5: Warning: No visibility specified. Defaulting to "public".
function proxyPayment(address _owner) payable returns(bool);
^----------------------------------------------------------^
,@aragon/core/contracts/common/TokenController.sol:16:5: Warning: No visibility specified. Defaulting to "public".
function onTransfer(address _from, address _to, uint _amount) returns(bool);
^--------------------------------------------------------------------------^
,@aragon/core/contracts/common/TokenController.sol:24:5: Warning: No visibility specified. Defaulting to "public".
function onApprove(address _owner, address _spender, uint _amount)
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:155:5: Warning: No visibility specified. Defaulting to "public".
function transfer(address _to, uint256 _amount) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:166:5: Warning: No visibility specified. Defaulting to "public".
function transferFrom(address _from, address _to, uint256 _amount) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:222:5: Warning: No visibility specified. Defaulting to "public".
function balanceOf(address _owner) constant returns (uint256 balance) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:232:5: Warning: No visibility specified. Defaulting to "public".
function approve(address _spender, uint256 _amount) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:257:5: Warning: No visibility specified. Defaulting to "public".
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:268:5: Warning: No visibility specified. Defaulting to "public".
function approveAndCall(address _spender, uint256 _amount, bytes _extraData) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:283:5: Warning: No visibility specified. Defaulting to "public".
function totalSupply() constant returns (uint) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:296:5: Warning: No visibility specified. Defaulting to "public".
function balanceOfAt(address _owner, uint _blockNumber) constant returns (uint) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:320:5: Warning: No visibility specified. Defaulting to "public".
function totalSupplyAt(uint _blockNumber) constant returns(uint) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:354:5: Warning: No visibility specified. Defaulting to "public".
function createCloneToken(
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:388:5: Warning: No visibility specified. Defaulting to "public".
function generateTokens(address _owner, uint _amount) onlyController returns (bool) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:404:5: Warning: No visibility specified. Defaulting to "public".
function destroyTokens(address _owner, uint _amount) onlyController returns (bool) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:556:5: Warning: No visibility specified. Defaulting to "public".
function createCloneToken(
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:305:56: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
return parentToken.balanceOfAt(_owner, min(_blockNumber, parentSnapShotBlock));
^------------------------------------^
,@aragon/core/contracts/common/MiniMeToken.sol:329:50: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
return parentToken.totalSupplyAt(min(_blockNumber, parentSnapShotBlock));
^------------------------------------^
,@aragon/core/contracts/common/MiniMeToken.sol:489:5: Warning: Function state mutability can be restricted to pure
function min(uint a, uint b) internal returns (uint) {
^
Spanning multiple lines.

 Contract: Vault app
 βœ“ can request allowance (924ms)
 βœ“ can handle overriding an allowance (664ms)
 βœ“ can handle requesting allowance with 0 amount (461ms)
 βœ“ throws when wrong arguments count is passed to request allowances (626ms)
 βœ“ can transfer tokens (759ms)
 βœ“ throws when transfering more then owned (226ms)
 βœ“ can handle token failures (324ms)
  7 passing (6s)
> @aragon/apps-voting@1.0.0 test $LOCALWORKSPACE/aragon-apps/apps/voting
> truffle test
Compiling ./contracts/Voting.sol...
Compiling ./test/TestVoting.sol...
Compiling ./test/mocks/ExecutionTarget.sol...
Compiling @aragon/core/contracts/apps/App.sol...
Compiling @aragon/core/contracts/apps/AppStorage.sol...
Compiling @aragon/core/contracts/common/EVMCallScript.sol...
Compiling @aragon/core/contracts/common/IForwarder.sol...
Compiling @aragon/core/contracts/common/Initializable.sol...
Compiling @aragon/core/contracts/common/MiniMeToken.sol...
Compiling @aragon/core/contracts/common/TokenController.sol...
Compiling @aragon/core/contracts/kernel/IKernel.sol...
Compiling @aragon/core/contracts/misc/Migrations.sol...
Compiling @aragon/core/contracts/zeppelin/math/SafeMath.sol...
Compilation warnings encountered:
@aragon/core/contracts/apps/App.sol:11:5: Warning: No visibility specified. Defaulting to "public".
function canPerform(address _sender, bytes32 _role) constant returns (bool) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/TokenController.sol:8:5: Warning: No visibility specified. Defaulting to "public".
function proxyPayment(address _owner) payable returns(bool);
^----------------------------------------------------------^
,@aragon/core/contracts/common/TokenController.sol:16:5: Warning: No visibility specified. Defaulting to "public".
function onTransfer(address _from, address _to, uint _amount) returns(bool);
^--------------------------------------------------------------------------^
,@aragon/core/contracts/common/TokenController.sol:24:5: Warning: No visibility specified. Defaulting to "public".
function onApprove(address _owner, address _spender, uint _amount)
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:155:5: Warning: No visibility specified. Defaulting to "public".
function transfer(address _to, uint256 _amount) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:166:5: Warning: No visibility specified. Defaulting to "public".
function transferFrom(address _from, address _to, uint256 _amount) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:222:5: Warning: No visibility specified. Defaulting to "public".
function balanceOf(address _owner) constant returns (uint256 balance) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:232:5: Warning: No visibility specified. Defaulting to "public".
function approve(address _spender, uint256 _amount) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:257:5: Warning: No visibility specified. Defaulting to "public".
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:268:5: Warning: No visibility specified. Defaulting to "public".
function approveAndCall(address _spender, uint256 _amount, bytes _extraData) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:283:5: Warning: No visibility specified. Defaulting to "public".
function totalSupply() constant returns (uint) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:296:5: Warning: No visibility specified. Defaulting to "public".
function balanceOfAt(address _owner, uint _blockNumber) constant returns (uint) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:320:5: Warning: No visibility specified. Defaulting to "public".
function totalSupplyAt(uint _blockNumber) constant returns(uint) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:354:5: Warning: No visibility specified. Defaulting to "public".
function createCloneToken(
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:388:5: Warning: No visibility specified. Defaulting to "public".
function generateTokens(address _owner, uint _amount) onlyController returns (bool) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:404:5: Warning: No visibility specified. Defaulting to "public".
function destroyTokens(address _owner, uint _amount) onlyController returns (bool) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:556:5: Warning: No visibility specified. Defaulting to "public".
function createCloneToken(
^
Spanning multiple lines.
,@aragon/core/contracts/common/IForwarder.sol:4:5: Warning: No visibility specified. Defaulting to "public".
function isForwarder() constant returns (bool) { return true; }
^-------------------------------------------------------------^
,@aragon/core/contracts/common/IForwarder.sol:6:5: Warning: No visibility specified. Defaulting to "public".
function canForward(address _sender, bytes _evmCallScript) constant returns (bool);
^---------------------------------------------------------------------------------^
,$LOCALWORKSPACE/aragon-apps/apps/voting/test/mocks/ExecutionTarget.sol:6:5: Warning: No visibility specified. Defaulting to "public".
function execute() {
^
Spanning multiple lines.
,$LOCALWORKSPACE/aragon-apps/apps/voting/test/mocks/ExecutionTarget.sol:11:5: Warning: No visibility specified. Defaulting to "public".
function setCounter(uint x) {
^
Spanning multiple lines.
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:133:42: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
function canForward(address _sender, bytes _evmCallScript) public view returns (bool) {
^------------------^
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:140:16: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
return _isVoteOpen(vote) && token.balanceOfAt(_voter, vote.snapshotBlock) > 0;
^---------------^
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:150:13: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
if (_isValuePct(vote.yea, vote.totalVoters, supportRequiredPct))
^---------------------------------------------------------^
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:155:27: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
bool voteEnded = !_isVoteOpen(vote);
^---------------^
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:156:27: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
bool hasSupport = _isValuePct(vote.yea, totalVotes, supportRequiredPct);
^---------------------------------------------------^
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:157:29: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
bool hasMinQuorum = _isValuePct(vote.yea, vote.totalVoters, vote.minAcceptQuorumPct);
^--------------------------------------------------------------^
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:165:16: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
open = _isVoteOpen(vote);
^---------------^
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:257:5: Warning: Function state mutability can be restricted to view
function _isVoteOpen(Vote storage vote) internal returns (bool) {
^
Spanning multiple lines.
,$LOCALWORKSPACE/aragon-apps/apps/voting/contracts/Voting.sol:264:5: Warning: Function state mutability can be restricted to pure
function _isValuePct(uint256 _value, uint256 _total, uint256 _pct) internal returns (bool) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/EVMCallScript.sol:23:5: Warning: Function state mutability can be restricted to pure
function uint256At(bytes data, uint256 location) internal returns (uint256 result) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/EVMCallScript.sol:47:5: Warning: Function state mutability can be restricted to pure
function locationOf(bytes data, uint256 location) internal returns (uint256 result) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/EVMCallScript.sol:58:48: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
location += (0x14 + 0x04 + uint256(uint32At(script, location + 0x14)));
^-------------------------------^
,@aragon/core/contracts/common/EVMCallScript.sol:67:42: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
uint256 length = uint256(uint32At(script, location + 0x14));
^-------------------------------^
,@aragon/core/contracts/common/EVMCallScript.sol:68:32: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
address addr = addressAt(script, location);
^-------------------------^
,@aragon/core/contracts/common/EVMCallScript.sol:72:37: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
memcpy(calldataPtr, locationOf(script, location + 0x14 + 0x04), length);
^----------------------------------------^
,@aragon/core/contracts/common/EVMCallScript.sol:72:17: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
memcpy(calldataPtr, locationOf(script, location + 0x14 + 0x04), length);
^---------------------------------------------------------------------^
,@aragon/core/contracts/common/EVMCallScript.sol:76:48: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
location += (0x14 + 0x04 + uint256(uint32At(script, location + 0x14)));
^-------------------------------^
,@aragon/core/contracts/common/EVMCallScript.sol:82:5: Warning: Function state mutability can be restricted to pure
function memcpy(uint dest, uint src, uint len) private {
^
Spanning multiple lines.
,@aragon/core/contracts/common/IForwarder.sol:4:5: Warning: Function state mutability can be restricted to pure
function isForwarder() constant returns (bool) { return true; }
^-------------------------------------------------------------^
,@aragon/core/contracts/common/MiniMeToken.sol:305:56: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
return parentToken.balanceOfAt(_owner, min(_blockNumber, parentSnapShotBlock));
^------------------------------------^
,@aragon/core/contracts/common/MiniMeToken.sol:329:50: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
return parentToken.totalSupplyAt(min(_blockNumber, parentSnapShotBlock));
^------------------------------------^
,@aragon/core/contracts/common/MiniMeToken.sol:489:5: Warning: Function state mutability can be restricted to pure
function min(uint a, uint b) internal returns (uint) {
^
Spanning multiple lines.
,@aragon/core/contracts/zeppelin/math/SafeMath.sol:9:3: Warning: Function state mutability can be restricted to pure
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
^
Spanning multiple lines.
,@aragon/core/contracts/zeppelin/math/SafeMath.sol:15:3: Warning: Function state mutability can be restricted to pure
function div(uint256 a, uint256 b) internal constant returns (uint256) {
^
Spanning multiple lines.
,@aragon/core/contracts/zeppelin/math/SafeMath.sol:22:3: Warning: Function state mutability can be restricted to pure
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
^
Spanning multiple lines.
,@aragon/core/contracts/zeppelin/math/SafeMath.sol:27:3: Warning: Function state mutability can be restricted to pure
function add(uint256 a, uint256 b) internal constant returns (uint256) {
^
Spanning multiple lines.

 Contract: Voting App
 normal token supply
 βœ“ fails on reinitialization (278ms)
 βœ“ deciding voting is automatically executed (507ms)
 βœ“ execution scripts can execute multiple actions (494ms)
 βœ“ execution script can be empty (556ms)
 βœ“ execution throws if any action on script throws (308ms)
 βœ“ forwarding creates vote (324ms)
 βœ“ can change minimum acceptance quorum (238ms)
 creating vote
 βœ“ has correct state (258ms)
 βœ“ has correct script actions (75ms)
 βœ“ changing min quorum doesnt affect vote min quorum (796ms)
 βœ“ holder can vote (512ms)
 βœ“ holder can modify vote (1612ms)
 βœ“ token transfers dont affect voting (804ms)
 βœ“ throws when non-holder votes (143ms)
 βœ“ throws when voting after voting closes (129ms)
 βœ“ can execute if vote is approved with support and quorum (942ms)
 βœ“ cannot execute vote if not enough quorum met (515ms)
 βœ“ vote can be executed automatically if decided (298ms)
 βœ“ vote can be not executed automatically if decided (671ms)
 βœ“ cannot re-execute vote (479ms)
 βœ“ cannot vote on executed vote (458ms)
 token supply = 1
 βœ“ new vote cannot be executed before voting (681ms)
 βœ“ creating vote as holder executes vote (565ms)
 token supply = 3
 βœ“ new vote cannot be executed before holder2 voting (1121ms)
 βœ“ creating vote as holder2 executes vote (502ms)
  25 passing (50s)
> @aragon/apps-token-manager@1.0.0 test $LOCALWORKSPACE/aragon-apps/apps/token-manager
> truffle test
Compiling ./contracts/TokenManager.sol...
Compiling ./test/TestTokenManager.sol...
Compiling ./test/mocks/ExecutionTarget.sol...
Compiling @aragon/core/contracts/apps/App.sol...
Compiling @aragon/core/contracts/apps/AppStorage.sol...
Compiling @aragon/core/contracts/common/EVMCallScript.sol...
Compiling @aragon/core/contracts/common/IForwarder.sol...
Compiling @aragon/core/contracts/common/Initializable.sol...
Compiling @aragon/core/contracts/common/MiniMeToken.sol...
Compiling @aragon/core/contracts/common/TokenController.sol...
Compiling @aragon/core/contracts/kernel/IKernel.sol...
Compiling @aragon/core/contracts/misc/Migrations.sol...
Compiling @aragon/core/contracts/zeppelin/math/SafeMath.sol...
Compiling @aragon/core/contracts/zeppelin/token/ERC20.sol...
Compiling @aragon/core/contracts/zeppelin/token/ERC20Basic.sol...
Compilation warnings encountered:
@aragon/core/contracts/apps/App.sol:11:5: Warning: No visibility specified. Defaulting to "public".
function canPerform(address _sender, bytes32 _role) constant returns (bool) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/TokenController.sol:8:5: Warning: No visibility specified. Defaulting to "public".
function proxyPayment(address _owner) payable returns(bool);
^----------------------------------------------------------^
,@aragon/core/contracts/common/MiniMeToken.sol:155:5: Warning: No visibility specified. Defaulting to "public".
function transfer(address _to, uint256 _amount) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:166:5: Warning: No visibility specified. Defaulting to "public".
function transferFrom(address _from, address _to, uint256 _amount) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:222:5: Warning: No visibility specified. Defaulting to "public".
function balanceOf(address _owner) constant returns (uint256 balance) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:232:5: Warning: No visibility specified. Defaulting to "public".
function approve(address _spender, uint256 _amount) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:257:5: Warning: No visibility specified. Defaulting to "public".
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:268:5: Warning: No visibility specified. Defaulting to "public".
function approveAndCall(address _spender, uint256 _amount, bytes _extraData) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:283:5: Warning: No visibility specified. Defaulting to "public".
function totalSupply() constant returns (uint) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:296:5: Warning: No visibility specified. Defaulting to "public".
function balanceOfAt(address _owner, uint _blockNumber) constant returns (uint) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:320:5: Warning: No visibility specified. Defaulting to "public".
function totalSupplyAt(uint _blockNumber) constant returns(uint) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:354:5: Warning: No visibility specified. Defaulting to "public".
function createCloneToken(
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:388:5: Warning: No visibility specified. Defaulting to "public".
function generateTokens(address _owner, uint _amount) onlyController returns (bool) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:404:5: Warning: No visibility specified. Defaulting to "public".
function destroyTokens(address _owner, uint _amount) onlyController returns (bool) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:556:5: Warning: No visibility specified. Defaulting to "public".
function createCloneToken(
^
Spanning multiple lines.
,@aragon/core/contracts/common/IForwarder.sol:4:5: Warning: No visibility specified. Defaulting to "public".
function isForwarder() constant returns (bool) { return true; }
^-------------------------------------------------------------^
,@aragon/core/contracts/common/IForwarder.sol:6:5: Warning: No visibility specified. Defaulting to "public".
function canForward(address _sender, bytes _evmCallScript) constant returns (bool);
^---------------------------------------------------------------------------------^
,$LOCALWORKSPACE/aragon-apps/apps/token-manager/test/mocks/ExecutionTarget.sol:6:5: Warning: No visibility specified. Defaulting to "public".
function execute() {
^
Spanning multiple lines.
,$LOCALWORKSPACE/aragon-apps/apps/token-manager/test/mocks/ExecutionTarget.sol:11:5: Warning: No visibility specified. Defaulting to "public".
function setCounter(uint x) {
^
Spanning multiple lines.
,$LOCALWORKSPACE/aragon-apps/apps/token-manager/contracts/TokenManager.sol:208:33: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
bool toCanReceive = isBalanceIncreaseAllowed(_to, _amount);
^------------------------------------^
,$LOCALWORKSPACE/aragon-apps/apps/token-manager/contracts/TokenManager.sol:214:9: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
_logHolderIfNeeded(_to);
^---------------------^
,$LOCALWORKSPACE/aragon-apps/apps/token-manager/contracts/TokenManager.sol:219:5: Warning: Function state mutability can be restricted to view
function isBalanceIncreaseAllowed(address _receiver, uint _inc) internal returns (bool) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/EVMCallScript.sol:23:5: Warning: Function state mutability can be restricted to pure
function uint256At(bytes data, uint256 location) internal returns (uint256 result) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/EVMCallScript.sol:47:5: Warning: Function state mutability can be restricted to pure
function locationOf(bytes data, uint256 location) internal returns (uint256 result) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/EVMCallScript.sol:58:48: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
location += (0x14 + 0x04 + uint256(uint32At(script, location + 0x14)));
^-------------------------------^
,@aragon/core/contracts/common/EVMCallScript.sol:67:42: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
uint256 length = uint256(uint32At(script, location + 0x14));
^-------------------------------^
,@aragon/core/contracts/common/EVMCallScript.sol:68:32: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
address addr = addressAt(script, location);
^-------------------------^
,@aragon/core/contracts/common/EVMCallScript.sol:72:37: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
memcpy(calldataPtr, locationOf(script, location + 0x14 + 0x04), length);
^----------------------------------------^
,@aragon/core/contracts/common/EVMCallScript.sol:72:17: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
memcpy(calldataPtr, locationOf(script, location + 0x14 + 0x04), length);
^---------------------------------------------------------------------^
,@aragon/core/contracts/common/EVMCallScript.sol:76:48: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
location += (0x14 + 0x04 + uint256(uint32At(script, location + 0x14)));
^-------------------------------^
,@aragon/core/contracts/common/EVMCallScript.sol:82:5: Warning: Function state mutability can be restricted to pure
function memcpy(uint dest, uint src, uint len) private {
^
Spanning multiple lines.
,@aragon/core/contracts/common/IForwarder.sol:4:5: Warning: Function state mutability can be restricted to pure
function isForwarder() constant returns (bool) { return true; }
^-------------------------------------------------------------^
,@aragon/core/contracts/common/MiniMeToken.sol:305:56: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
return parentToken.balanceOfAt(_owner, min(_blockNumber, parentSnapShotBlock));
^------------------------------------^
,@aragon/core/contracts/common/MiniMeToken.sol:329:50: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
return parentToken.totalSupplyAt(min(_blockNumber, parentSnapShotBlock));
^------------------------------------^
,@aragon/core/contracts/common/MiniMeToken.sol:489:5: Warning: Function state mutability can be restricted to pure
function min(uint a, uint b) internal returns (uint) {
^
Spanning multiple lines.
,@aragon/core/contracts/zeppelin/math/SafeMath.sol:9:3: Warning: Function state mutability can be restricted to pure
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
^
Spanning multiple lines.
,@aragon/core/contracts/zeppelin/math/SafeMath.sol:15:3: Warning: Function state mutability can be restricted to pure
function div(uint256 a, uint256 b) internal constant returns (uint256) {
^
Spanning multiple lines.
,@aragon/core/contracts/zeppelin/math/SafeMath.sol:22:3: Warning: Function state mutability can be restricted to pure
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
^
Spanning multiple lines.
,@aragon/core/contracts/zeppelin/math/SafeMath.sol:27:3: Warning: Function state mutability can be restricted to pure
function add(uint256 a, uint256 b) internal constant returns (uint256) {
^
Spanning multiple lines.

 Contract: Token Manager
 βœ“ fails when initializing without setting controller (443ms)
 βœ“ fails when sending ether to token (74ms)
 non-transferable token
 βœ“ holders cannot transfer non-transferable tokens (503ms)
 βœ“ can transfer to token manager (568ms)
 βœ“ token manager can transfer (565ms)
 βœ“ forwards actions to holder (751ms)
 holder logging
 βœ“ logs token manager on issue (365ms)
 βœ“ logs on mints and transfers (1403ms)
 maximum tokens per address limit
 βœ“ can mint up to than limit (434ms)
 βœ“ fails to mint more than limit (122ms)
 βœ“ can issue unlimited tokens for manager (368ms)
 βœ“ can assign up to limit (668ms)
 βœ“ cannot assign more than limit (340ms)
 for normal native tokens
 βœ“ fails on reinitialization (70ms)
 βœ“ can mint tokens (387ms)
 βœ“ can issue tokens (293ms)
 βœ“ can assign issued tokens (632ms)
 βœ“ cannot assign more tokens than owned (522ms)
 βœ“ forwards actions only to token holders (931ms)
 βœ“ fails when assigning invalid vesting schedule (76ms)
 assigning vested tokens
 βœ“ can start transfering on cliff (592ms)
 βœ“ can transfer all tokens after vesting (464ms)
 βœ“ can transfer half mid vesting (516ms)
 βœ“ cannot transfer non-vested tokens (283ms)
 βœ“ can approve non-vested tokens but transferFrom fails (485ms)
 βœ“ cannot transfer all tokens right before vesting (772ms)
 βœ“ can be revoked and not vested tokens are transfered to token manager (973ms)
 βœ“ cannot revoke non-revokable vestings (850ms)
 βœ“ cannot have more than 50 vestings (15252ms)
  29 passing (57s)
> @aragon/apps-finance@1.0.0 test $LOCALWORKSPACE/aragon-apps/apps/finance
> truffle test
Compiling ./contracts/Finance.sol...
Compiling ./test/TestFinance.sol...
Compiling ./test/mocks/ExecutionTarget.sol...
Compiling ./test/mocks/FinanceMock.sol...
Compiling @aragon/apps-vault/contracts/Vault.sol...
Compiling @aragon/core/contracts/apps/App.sol...
Compiling @aragon/core/contracts/apps/AppStorage.sol...
Compiling @aragon/core/contracts/common/EtherToken.sol...
Compiling @aragon/core/contracts/common/Initializable.sol...
Compiling @aragon/core/contracts/common/MiniMeToken.sol...
Compiling @aragon/core/contracts/common/TokenController.sol...
Compiling @aragon/core/contracts/common/erc677/ERC677Receiver.sol...
Compiling @aragon/core/contracts/common/erc677/ERC677Token.sol...
Compiling @aragon/core/contracts/kernel/IKernel.sol...
Compiling @aragon/core/contracts/misc/Migrations.sol...
Compiling @aragon/core/contracts/zeppelin/math/SafeMath.sol...
Compiling @aragon/core/contracts/zeppelin/token/BasicToken.sol...
Compiling @aragon/core/contracts/zeppelin/token/ERC20.sol...
Compiling @aragon/core/contracts/zeppelin/token/ERC20Basic.sol...
Compiling @aragon/core/contracts/zeppelin/token/StandardToken.sol...
Compilation warnings encountered:
@aragon/core/contracts/apps/App.sol:11:5: Warning: No visibility specified. Defaulting to "public".
function canPerform(address _sender, bytes32 _role) constant returns (bool) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/erc677/ERC677Token.sol:7:5: Warning: No visibility specified. Defaulting to "public".
function transferAndCall(address receiver, uint amount, bytes data) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/TokenController.sol:8:5: Warning: No visibility specified. Defaulting to "public".
function proxyPayment(address _owner) payable returns(bool);
^----------------------------------------------------------^
,@aragon/core/contracts/common/TokenController.sol:16:5: Warning: No visibility specified. Defaulting to "public".
function onTransfer(address _from, address _to, uint _amount) returns(bool);
^--------------------------------------------------------------------------^
,@aragon/core/contracts/common/TokenController.sol:24:5: Warning: No visibility specified. Defaulting to "public".
function onApprove(address _owner, address _spender, uint _amount)
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:155:5: Warning: No visibility specified. Defaulting to "public".
function transfer(address _to, uint256 _amount) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:166:5: Warning: No visibility specified. Defaulting to "public".
function transferFrom(address _from, address _to, uint256 _amount) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:222:5: Warning: No visibility specified. Defaulting to "public".
function balanceOf(address _owner) constant returns (uint256 balance) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:232:5: Warning: No visibility specified. Defaulting to "public".
function approve(address _spender, uint256 _amount) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:257:5: Warning: No visibility specified. Defaulting to "public".
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:268:5: Warning: No visibility specified. Defaulting to "public".
function approveAndCall(address _spender, uint256 _amount, bytes _extraData) returns (bool success) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:283:5: Warning: No visibility specified. Defaulting to "public".
function totalSupply() constant returns (uint) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:296:5: Warning: No visibility specified. Defaulting to "public".
function balanceOfAt(address _owner, uint _blockNumber) constant returns (uint) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:320:5: Warning: No visibility specified. Defaulting to "public".
function totalSupplyAt(uint _blockNumber) constant returns(uint) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:354:5: Warning: No visibility specified. Defaulting to "public".
function createCloneToken(
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:388:5: Warning: No visibility specified. Defaulting to "public".
function generateTokens(address _owner, uint _amount) onlyController returns (bool) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:404:5: Warning: No visibility specified. Defaulting to "public".
function destroyTokens(address _owner, uint _amount) onlyController returns (bool) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:556:5: Warning: No visibility specified. Defaulting to "public".
function createCloneToken(
^
Spanning multiple lines.
,$LOCALWORKSPACE/aragon-apps/apps/finance/test/mocks/ExecutionTarget.sol:6:5: Warning: No visibility specified. Defaulting to "public".
function execute() {
^
Spanning multiple lines.
,$LOCALWORKSPACE/aragon-apps/apps/finance/test/mocks/ExecutionTarget.sol:11:5: Warning: No visibility specified. Defaulting to "public".
function setCounter(uint x) {
^
Spanning multiple lines.
,$LOCALWORKSPACE/aragon-apps/apps/finance/test/mocks/FinanceMock.sol:9:5: Warning: No visibility specified. Defaulting to "public".
function mock_setTimestamp(uint i) { _mockTime = i; }
^---------------------------------------------------^
,$LOCALWORKSPACE/aragon-apps/apps/finance/contracts/Finance.sol:417:40: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
function getBudget(address _token) transitionsPeriod public view returns (uint256 budget, bool hasBudget, uint256 remainingBudget) {
^---------------^
,$LOCALWORKSPACE/aragon-apps/apps/finance/contracts/Finance.sol:541:5: Warning: Function state mutability can be restricted to view
function _canMakePayment(ERC20 _token, uint256 _amount) internal returns (bool) {
^
Spanning multiple lines.
,@aragon/core/contracts/common/MiniMeToken.sol:305:56: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
return parentToken.balanceOfAt(_owner, min(_blockNumber, parentSnapShotBlock));
^------------------------------------^
,@aragon/core/contracts/common/MiniMeToken.sol:329:50: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
return parentToken.totalSupplyAt(min(_blockNumber, parentSnapShotBlock));
^------------------------------------^
,@aragon/core/contracts/common/MiniMeToken.sol:489:5: Warning: Function state mutability can be restricted to pure
function min(uint a, uint b) internal returns (uint) {
^
Spanning multiple lines.
,@aragon/core/contracts/zeppelin/math/SafeMath.sol:9:3: Warning: Function state mutability can be restricted to pure
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
^
Spanning multiple lines.
,@aragon/core/contracts/zeppelin/math/SafeMath.sol:15:3: Warning: Function state mutability can be restricted to pure
function div(uint256 a, uint256 b) internal constant returns (uint256) {
^
Spanning multiple lines.
,@aragon/core/contracts/zeppelin/math/SafeMath.sol:22:3: Warning: Function state mutability can be restricted to pure
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
^
Spanning multiple lines.
,@aragon/core/contracts/zeppelin/math/SafeMath.sol:27:3: Warning: Function state mutability can be restricted to pure
function add(uint256 a, uint256 b) internal constant returns (uint256) {
^
Spanning multiple lines.

 Contract: Finance App
 βœ“ initialized first accounting period and settings (75ms)
 βœ“ fails on reinitialization (232ms)
 βœ“ adds new token to budget (76ms)
 βœ“ records ERC20 deposits (377ms)
 βœ“ records ERC20 approveAndCall deposits (346ms)
 βœ“ records ERC677 deposits (225ms)
 βœ“ can wrapAndCall with EtherToken (216ms)
 βœ“ sends locked tokens to Vault (465ms)
 βœ“ try to send locked tokens to Vault, but balance is 0 (56ms)
 βœ“ before setting budget allows unlimited spending (316ms)
 βœ“ can change period duration (241ms)
 setting budget
 βœ“ records payment (429ms)
 βœ“ can create single payment (271ms)
 βœ“ can decrease budget after spending (320ms)
 βœ“ removing budget allows unlimited spending (278ms)
 βœ“ can create recurring payment (1077ms)
 βœ“ can create recurring ether payment (936ms)
 βœ“ doesnt record payment for one time past transaction (272ms)
 βœ“ emits payment failure event when out of budget (150ms)
 βœ“ emits payment failure event when out of balance (1166ms)
 multitransaction period
 βœ“ has correct token statements (84ms)
 βœ“ finishes accounting period correctly (159ms)
 many accounting period transitions
 βœ“ fails when too many period transitions are needed (304ms)
 βœ“ can transition periods externally to remove deadlock (734ms)
 βœ“ non-activity accounting periods have no transactions (259ms)
 creating payment
 βœ“ only repeats payment until max repeats (1040ms)
 βœ“ receiver can always execute a payment (394ms)
 βœ“ fails when non-receiver attempts to execute a payment (118ms)
 βœ“ fails executing a payment before time (65ms)
 βœ“ fails executing a payment by receiver before time (57ms)
 βœ“ fails executing disabled payment (202ms)
  31 passing (51s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment