contribution contracts tests

This commit is contained in:
2019-08-02 17:11:30 +01:00
parent fd844a00fd
commit 9db1ffddcb
4 changed files with 251 additions and 5 deletions

View File

@@ -152,6 +152,8 @@ contract Contribution is AragonApp {
function add(uint32 amount, uint32 contributorId, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize) public isInitialized auth(ADD_CONTRIBUTION_ROLE) {
//require(canPerform(msg.sender, ADD_CONTRIBUTION_ROLE, new uint32[](0)), 'nope');
require(amount > 0, "INVALID_AMOUNT");
uint32 contributionId = contributionsCount + 1;
ContributionData storage c = contributions[contributionId];
c.exists = true;

View File

@@ -0,0 +1,18 @@
pragma solidity ^0.4.24;
import "@aragon/os/contracts/acl/ACL.sol";
import "@aragon/os/contracts/kernel/Kernel.sol";
import "@aragon/os/contracts/factory/DAOFactory.sol";
import "../../../contributor/contracts/Contributor.sol";
import "../../../token/contracts/Token.sol";
// You might think this file is a bit odd, but let me explain.
// We only use for now those imported contracts in our tests, which
// means Truffle will not compile them for us, because they are from
// an external dependency.
// solium-disable-next-line no-empty-blocks
contract Spoof {
// ...
}