Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Vault: ETH native support and arbitrary connectors for managing different token standards #129

Merged
merged 39 commits into from Mar 20, 2018
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
67071c6
Start work on new vault
izqui Mar 13, 2018
17650ce
Scaffold connectors
izqui Mar 14, 2018
eac5bf4
Add ETHConnector
izqui Mar 14, 2018
d9d0314
ERC20, ERC777, ERC721 connectors
izqui Mar 14, 2018
ba342f9
Add ETH connector fallback function for easy eth deposits
izqui Mar 14, 2018
734d61b
Start implementing automated interface detection
izqui Mar 14, 2018
e09a5a1
Implement token standard detection
izqui Mar 14, 2018
d433367
Publish 1.1.3
izqui Mar 14, 2018
b074337
Merge
izqui Mar 14, 2018
7c56659
Merge branch 'master' into good-vault
izqui Mar 14, 2018
acc1157
Improve style
izqui Mar 14, 2018
d01b101
Get new vault to almost compile
izqui Mar 14, 2018
d5cc2f7
It compiles, note for the future, avoid passing around structs
izqui Mar 14, 2018
270a636
Protect transfer and register standard behind roles
izqui Mar 15, 2018
d43d49a
Scaffold tests
izqui Mar 15, 2018
22844bd
Fix eth fallback
izqui Mar 15, 2018
ea70fd8
Test
izqui Mar 15, 2018
0bca179
finance: Adapt to new Vault
bingen Mar 15, 2018
5b83a0c
Make tests pass
izqui Mar 16, 2018
41d164d
Merge branch 'good-vault-finance-2' of github.com:aragon/aragon-apps …
izqui Mar 16, 2018
7b45dba
vault: deploy connectors on constructor to simplify templates
izqui Mar 16, 2018
e2b17de
Adapt templates to new vault and remove all ethertoken references
izqui Mar 16, 2018
191d312
finance: Adapt to new Vault (#135)
bingen Mar 16, 2018
dd666f6
Merge master
izqui Mar 16, 2018
aba830f
Merge branch 'master' of github.com:aragon/aragon-apps into new-vault…
izqui Mar 16, 2018
835ae33
Merge branch 'good-vault' of github.com:aragon/aragon-apps into good-…
izqui Mar 16, 2018
abf72d7
Update to aOs v3.1.1
izqui Mar 16, 2018
13fc00d
Fix devtemplate
izqui Mar 16, 2018
6117167
Fix lint errors
bingen Mar 16, 2018
b787a5d
vault: fix coverage and tests
bingen Mar 17, 2018
4cf0a69
finance: fix tests
bingen Mar 17, 2018
db70f08
tmp
bingen Mar 16, 2018
ef13ad5
Remove abis file
izqui Mar 17, 2018
e450209
vault: Fix lint warnings
bingen Mar 17, 2018
869ad3a
vault: Remove redundant variables
bingen Mar 17, 2018
c503098
vault: Remove constructor, refactor initialize
bingen Mar 17, 2018
dfb3ad7
templates: Remove EtherToken from tests
bingen Mar 16, 2018
d8dac5a
[wip] vault: Try to increase coverage
bingen Mar 18, 2018
42c954d
Merge branch 'beta_test_remove_ethertoken' of github.com:aragon/arago…
izqui Mar 18, 2018
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+34 −15
Diff settings

Always

Just for now

vault: fix coverage and tests

Coverage complains about files with only interfaces.
IConnector had been renamed to IVaultConnecto.
Now creating a new Vault instance creates connectors and initializes.
  • Loading branch information...
bingen committed Mar 17, 2018
commit b787a5d4aec7dfb048ef552265f6ed407e8ec73f
@@ -10,3 +10,9 @@ interface IVaultConnector {
event Transfer(address indexed token, address indexed receiver, uint256 amount);
event Deposit(address indexed token, address indexed sender, uint256 amount);
}

contract IVaultFake {
function IVaultFake() public {
// work around coverage weird error
}
}
@@ -1,8 +1,7 @@
pragma solidity 0.4.18;

import "../VaultBase.sol";
import "./standards/ERC20.sol";

import "@aragon/os/contracts/lib/zeppelin/token/ERC20.sol";

contract ERC20Connector is VaultBase, IVaultConnector {
function deposit(address token, address who, uint256 value, bytes how) payable external returns (bool) {

This file was deleted.

Oops, something went wrong.
@@ -111,3 +111,9 @@ interface ERC721TokenReceiver {
/// unless throwing
function onERC721Received(address _from, uint256 _tokenId, bytes data) external returns(bytes4);
}

contract ERC721Fake {
function ERC721Fake() public {
// work around coverage weird error
}
}
@@ -32,3 +32,9 @@ interface ERC777TokensSender {
interface ERC777TokensRecipient {
function tokensReceived(address operator, address from, address to, uint amount, bytes userData, bytes operatorData) public;
}

contract ERC777Fake {
function ERC777Fake() public {
// work around coverage weird error
}
}
@@ -10,3 +10,9 @@ interface ERC165 {
/// `interfaceID` is not 0xffffffff, `false` otherwise
function supportsInterface(bytes4 interfaceID) external view returns (bool);
}

contract ERC165Fake {
function ERC165Fake() public {
// work around coverage weird error
}
}
@@ -7,3 +7,9 @@ interface ERC780 {
function getClaim(address issuer, address subject, bytes32 key) public constant returns (bytes32);
function removeClaim(address issuer, address subject, bytes32 key) public;
}

contract ERC780Fake {
function ERC780Fake() public {
// work around coverage weird error
}
}
Copy path View file
@@ -1,10 +1,7 @@
pragma solidity 0.4.18;

import "../contracts/Vault.sol";
import "../contracts/IConnector.sol";

import "../contracts/connectors/ETHConnector.sol";
import "../contracts/connectors/ERC20Connector.sol";
import "../contracts/IVaultConnector.sol";

import "@aragon/os/contracts/lib/minime/MiniMeToken.sol";

@@ -13,10 +10,7 @@ import "truffle/Assert.sol";
contract TestVault {
MiniMeToken token;

address ethConnector = new ETHConnector();
address erc20Connector = new ERC20Connector();

IConnector vault;
IVaultConnector vault;

uint constant public initialBalance = 200 wei;
address constant ETH = address(0);
@@ -28,8 +22,7 @@ contract TestVault {
}

function beforeEach() {
vault = IConnector(new Vault());
Vault(vault).initialize(erc20Connector, ethConnector);
vault = IVaultConnector(new Vault());
}

function testETHDeposit() {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.