Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
Added forwarder changes and erc20 support
Browse files Browse the repository at this point in the history
Reviewers: benchan, otto, jameson, ben

Reviewed By: ben

Differential Revision: https://phabricator.bitgo.com/D5763
  • Loading branch information
barathcj committed Jul 7, 2017
1 parent 941da37 commit 97efd0d
Show file tree
Hide file tree
Showing 26 changed files with 889 additions and 3,242 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This installs truffle and an Ethereum test RPC client.

## Wallet Solidity Contract

Find it at [contracts/Wallet.sol](contracts/Wallet.sol)
Find it at [contracts/WalletSimple.sol](contracts/WalletSimple.sol)

## Running tests

Expand Down
31 changes: 31 additions & 0 deletions build/contracts/ConvertLib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"contract_name": "ConvertLib",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "amount",
"type": "uint256"
},
{
"name": "conversionRate",
"type": "uint256"
}
],
"name": "convert",
"outputs": [
{
"name": "convertedAmount",
"type": "uint256"
}
],
"payable": false,
"type": "function"
}
],
"unlinked_binary": "0x60606040523415600b57fe5b5b60748061001a6000396000f300606060405263ffffffff60e060020a60003504166396e4ee3d81146020575bfe5b602c600435602435603e565b60408051918252519081900360200190f35b8181025b929150505600a165627a7a7230582079c4ffa5510a0682d9b87daccf83ceecaf12a15399041513f82a7fb592dd42060029",
"networks": {},
"schema_version": "0.0.5",
"updated_at": 1499270251831
}
31 changes: 31 additions & 0 deletions build/contracts/ERC20Interface.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"contract_name": "ERC20Interface",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"type": "function"
}
],
"unlinked_binary": "0x",
"networks": {},
"schema_version": "0.0.5",
"updated_at": 1499270251832
}
61 changes: 61 additions & 0 deletions build/contracts/Forwarder.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"contract_name": "Forwarder",
"abi": [
{
"constant": false,
"inputs": [],
"name": "flush",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "destinationAddress",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"type": "function"
},
{
"inputs": [],
"payable": false,
"type": "constructor"
},
{
"payable": true,
"type": "fallback"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "from",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
},
{
"indexed": false,
"name": "data",
"type": "bytes"
}
],
"name": "Deposited",
"type": "event"
}
],
"unlinked_binary": "0x6060604052341561000c57fe5b5b60008054600160a060020a03191633600160a060020a03161790555b5b6101a4806100396000396000f300606060405236156100305763ffffffff60e060020a6000350416636b9f96ea81146100f4578063ca32546914610106575b6100f25b60008054604051600160a060020a0390911691349136908083838082843782019150509250505060006040518083038185876187965a03f192505050151561007c5760006000fd5b7f6e89d517057028190560dd200cf6bf792842861353d1173761dfa362e1c133f033346000366040518085600160a060020a0316600160a060020a03168152602001848152602001806020018281038252848482818152602001925080828437604051920182900397509095505050505050a15b565b005b34156100fc57fe5b6100f2610132565b005b341561010e57fe5b610116610169565b60408051600160a060020a039092168252519081900360200190f35b60008054604051600160a060020a039182169230909216319181818185876187965a03f19250505015156100f05760006000fd5b5b565b600054600160a060020a0316815600a165627a7a7230582011c275659d69ba8333cde76ff846ea17f72e2eedaca023ff0b1da7eba3ce26670029",
"networks": {},
"schema_version": "0.0.5",
"updated_at": 1499270251832
}
94 changes: 94 additions & 0 deletions build/contracts/MetaCoin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"contract_name": "MetaCoin",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "addr",
"type": "address"
}
],
"name": "getBalanceInEth",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "receiver",
"type": "address"
},
{
"name": "amount",
"type": "uint256"
}
],
"name": "sendCoin",
"outputs": [
{
"name": "sufficient",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "addr",
"type": "address"
}
],
"name": "getBalance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"inputs": [],
"payable": false,
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_from",
"type": "address"
},
{
"indexed": true,
"name": "_to",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
],
"unlinked_binary": "0x6060604052341561000c57fe5b5b600160a060020a033216600090815260208190526040902061271090555b5b6102308061003b6000396000f300606060405263ffffffff60e060020a6000350416637bd703e8811461003757806390b98a1114610065578063f8b2cb4f14610098575bfe5b341561003f57fe5b610053600160a060020a03600435166100c6565b60408051918252519081900360200190f35b341561006d57fe5b610084600160a060020a036004351660243561014d565b604080519115158252519081900360200190f35b34156100a057fe5b610053600160a060020a03600435166101e5565b60408051918252519081900360200190f35b600073__ConvertLib____________________________6396e4ee3d6100eb846101e5565b60026000604051602001526040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b151561013057fe5b6102c65a03f4151561013e57fe5b5050604051519150505b919050565b600160a060020a03331660009081526020819052604081205482901015610176575060006101df565b600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b92915050565b600160a060020a0381166000908152602081905260409020545b9190505600a165627a7a72305820ed720caf65d2a1e84a4612e1ee6969091c8f27d6b3e8f8e6deb40f97b1f521040029",
"networks": {},
"schema_version": "0.0.5",
"updated_at": 1499270251832
}
66 changes: 66 additions & 0 deletions build/contracts/Migrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"contract_name": "Migrations",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "new_address",
"type": "address"
}
],
"name": "upgrade",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "last_completed_migration",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "completed",
"type": "uint256"
}
],
"name": "setCompleted",
"outputs": [],
"payable": false,
"type": "function"
},
{
"inputs": [],
"payable": false,
"type": "constructor"
}
],
"unlinked_binary": "0x6060604052341561000c57fe5b5b60008054600160a060020a03191633600160a060020a03161790555b5b6101a0806100396000396000f300606060405263ffffffff60e060020a6000350416630900f0108114610042578063445df0ac146100605780638da5cb5b14610082578063fdacd576146100ae575bfe5b341561004a57fe5b61005e600160a060020a03600435166100c3565b005b341561006857fe5b61007061013d565b60408051918252519081900360200190f35b341561008a57fe5b610092610143565b60408051600160a060020a039092168252519081900360200190f35b34156100b657fe5b61005e600435610152565b005b6000805433600160a060020a03908116911614156101375781905080600160a060020a031663fdacd5766001546040518263ffffffff1660e060020a02815260040180828152602001915050600060405180830381600087803b151561012557fe5b6102c65a03f1151561013357fe5b5050505b5b5b5050565b60015481565b600054600160a060020a031681565b60005433600160a060020a039081169116141561016f5760018190555b5b5b505600a165627a7a72305820ee4a9d3fed6d05759ad6774c182cd73618a002669ad3ab226b2e28762890f57b0029",
"networks": {},
"schema_version": "0.0.5",
"updated_at": 1499270251832
}
Loading

0 comments on commit 97efd0d

Please sign in to comment.