From 897515c00207a11f7a45932d3c526a5eaf961635 Mon Sep 17 00:00:00 2001 From: Amir Bandeali Date: Mon, 5 Feb 2018 13:02:48 -0800 Subject: Add CLI option for networkId, add abi-gen to contracts package --- packages/abi-gen/CHANGELOG.md | 1 + packages/abi-gen/src/index.ts | 18 +- packages/contracts/artifacts/DummyToken.json | 313 --------- packages/contracts/artifacts/ERC20Token.json | 188 ----- packages/contracts/artifacts/ERC20Token_v1.json | 182 ----- packages/contracts/artifacts/Exchange.json | 603 ---------------- packages/contracts/artifacts/MaliciousToken.json | 188 ----- packages/contracts/artifacts/Mintable.json | 202 ------ packages/contracts/artifacts/MultiSigWallet.json | 523 -------------- .../artifacts/MultiSigWalletWithTimeLock.json | 600 ---------------- ...tWithTimeLockExceptRemoveAuthorizedAddress.json | 648 ------------------ packages/contracts/artifacts/Ownable.json | 49 -- packages/contracts/artifacts/Ownable_v1.json | 46 -- packages/contracts/artifacts/SafeMath.json | 14 - packages/contracts/artifacts/SafeMath_v1.json | 14 - packages/contracts/artifacts/Token.json | 174 ----- packages/contracts/artifacts/TokenRegistry.json | 540 --------------- .../contracts/artifacts/TokenTransferProxy.json | 180 ----- packages/contracts/artifacts/Token_v1.json | 182 ----- .../artifacts/UnlimitedAllowanceToken.json | 188 ----- .../artifacts/UnlimitedAllowanceToken_v1.json | 182 ----- packages/contracts/artifacts/WETH9.json | 292 -------- packages/contracts/artifacts/ZRXToken.json | 226 ------ .../contract_templates/contract.handlebars | 25 + .../contract_templates/partials/call.handlebars | 15 + .../contract_templates/partials/params.handlebars | 3 + .../partials/return_type.handlebars | 6 + .../contract_templates/partials/tx.handlebars | 51 ++ .../partials/typed_params.handlebars | 3 + packages/contracts/package.json | 1 + packages/contracts/src/artifacts/DummyToken.json | 313 +++++++++ packages/contracts/src/artifacts/ERC20Token.json | 188 +++++ .../contracts/src/artifacts/ERC20Token_v1.json | 182 +++++ packages/contracts/src/artifacts/Exchange.json | 603 ++++++++++++++++ .../contracts/src/artifacts/MaliciousToken.json | 188 +++++ packages/contracts/src/artifacts/Mintable.json | 202 ++++++ .../contracts/src/artifacts/MultiSigWallet.json | 523 ++++++++++++++ .../src/artifacts/MultiSigWalletWithTimeLock.json | 600 ++++++++++++++++ ...tWithTimeLockExceptRemoveAuthorizedAddress.json | 648 ++++++++++++++++++ packages/contracts/src/artifacts/Ownable.json | 49 ++ packages/contracts/src/artifacts/Ownable_v1.json | 46 ++ packages/contracts/src/artifacts/SafeMath.json | 14 + packages/contracts/src/artifacts/SafeMath_v1.json | 14 + packages/contracts/src/artifacts/Token.json | 174 +++++ .../contracts/src/artifacts/TokenRegistry.json | 540 +++++++++++++++ .../src/artifacts/TokenTransferProxy.json | 180 +++++ packages/contracts/src/artifacts/Token_v1.json | 182 +++++ .../src/artifacts/UnlimitedAllowanceToken.json | 188 +++++ .../src/artifacts/UnlimitedAllowanceToken_v1.json | 182 +++++ packages/contracts/src/artifacts/WETH9.json | 292 ++++++++ packages/contracts/src/artifacts/ZRXToken.json | 226 ++++++ .../src/contract_wrappers/generated/dummy_token.ts | 434 ++++++++++++ .../src/contract_wrappers/generated/exchange.ts | 728 ++++++++++++++++++++ .../src/contract_wrappers/generated/token.ts | 215 ++++++ .../contract_wrappers/generated/token_registry.ts | 548 +++++++++++++++ .../generated/token_transfer_proxy.ts | 283 ++++++++ .../multisig/MultiSigWallet/MultiSigWallet.sol | 366 ++++++++++ .../MultiSigWalletWithTimeLock.sol | 132 ++++ ...etWithTimeLockExceptRemoveAuthorizedAddress.sol | 82 +++ .../current/protocol/Exchange/Exchange.sol | 602 ++++++++++++++++ .../protocol/TokenRegistry/TokenRegistry.sol | 308 +++++++++ .../TokenTransferProxy/TokenTransferProxy.sol | 115 ++++ .../current/test/DummyToken/DummyToken.sol | 37 + .../current/test/MaliciousToken/MaliciousToken.sol | 31 + .../contracts/current/test/Mintable/Mintable.sol | 18 + .../current/tokens/ERC20Token/ERC20Token.sol | 58 ++ .../src/contracts/current/tokens/Token/Token.sol | 35 + .../UnlimitedAllowanceToken.sol | 46 ++ .../src/contracts/current/tokens/WETH9/WETH9.sol | 756 +++++++++++++++++++++ .../contracts/current/tokens/ZRXToken/ZRXToken.sol | 33 + .../contracts/current/utils/Ownable/Ownable.sol | 32 + .../contracts/current/utils/SafeMath/SafeMath.sol | 73 ++ .../previous/ERC20Token/ERC20Token_v1.sol | 44 ++ .../src/contracts/previous/Ownable/Ownable_v1.sol | 27 + .../contracts/previous/SafeMath/SafeMath_v1.sol | 73 ++ .../src/contracts/previous/Token/Token_v1.sol | 39 ++ .../UnlimitedAllowanceToken_v1.sol | 52 ++ .../multisig/MultiSigWallet/MultiSigWallet.sol | 366 ---------- .../MultiSigWalletWithTimeLock.sol | 132 ---- ...etWithTimeLockExceptRemoveAuthorizedAddress.sol | 82 --- .../src/current/protocol/Exchange/Exchange.sol | 602 ---------------- .../protocol/TokenRegistry/TokenRegistry.sol | 308 --------- .../TokenTransferProxy/TokenTransferProxy.sol | 115 ---- .../src/current/test/DummyToken/DummyToken.sol | 37 - .../current/test/MaliciousToken/MaliciousToken.sol | 31 - .../src/current/test/Mintable/Mintable.sol | 18 - .../src/current/tokens/ERC20Token/ERC20Token.sol | 58 -- .../contracts/src/current/tokens/Token/Token.sol | 35 - .../UnlimitedAllowanceToken.sol | 46 -- .../contracts/src/current/tokens/WETH9/WETH9.sol | 756 --------------------- .../src/current/tokens/ZRXToken/ZRXToken.sol | 33 - .../src/current/utils/Ownable/Ownable.sol | 32 - .../src/current/utils/SafeMath/SafeMath.sol | 73 -- .../src/previous/ERC20Token/ERC20Token_v1.sol | 44 -- .../contracts/src/previous/Ownable/Ownable_v1.sol | 27 - .../src/previous/SafeMath/SafeMath_v1.sol | 73 -- packages/contracts/src/previous/Token/Token_v1.sol | 39 -- .../UnlimitedAllowanceToken_v1.sol | 52 -- 98 files changed, 10821 insertions(+), 8496 deletions(-) delete mode 100644 packages/contracts/artifacts/DummyToken.json delete mode 100644 packages/contracts/artifacts/ERC20Token.json delete mode 100644 packages/contracts/artifacts/ERC20Token_v1.json delete mode 100644 packages/contracts/artifacts/Exchange.json delete mode 100644 packages/contracts/artifacts/MaliciousToken.json delete mode 100644 packages/contracts/artifacts/Mintable.json delete mode 100644 packages/contracts/artifacts/MultiSigWallet.json delete mode 100644 packages/contracts/artifacts/MultiSigWalletWithTimeLock.json delete mode 100644 packages/contracts/artifacts/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.json delete mode 100644 packages/contracts/artifacts/Ownable.json delete mode 100644 packages/contracts/artifacts/Ownable_v1.json delete mode 100644 packages/contracts/artifacts/SafeMath.json delete mode 100644 packages/contracts/artifacts/SafeMath_v1.json delete mode 100644 packages/contracts/artifacts/Token.json delete mode 100644 packages/contracts/artifacts/TokenRegistry.json delete mode 100644 packages/contracts/artifacts/TokenTransferProxy.json delete mode 100644 packages/contracts/artifacts/Token_v1.json delete mode 100644 packages/contracts/artifacts/UnlimitedAllowanceToken.json delete mode 100644 packages/contracts/artifacts/UnlimitedAllowanceToken_v1.json delete mode 100644 packages/contracts/artifacts/WETH9.json delete mode 100644 packages/contracts/artifacts/ZRXToken.json create mode 100644 packages/contracts/contract_templates/contract.handlebars create mode 100644 packages/contracts/contract_templates/partials/call.handlebars create mode 100644 packages/contracts/contract_templates/partials/params.handlebars create mode 100644 packages/contracts/contract_templates/partials/return_type.handlebars create mode 100644 packages/contracts/contract_templates/partials/tx.handlebars create mode 100644 packages/contracts/contract_templates/partials/typed_params.handlebars create mode 100644 packages/contracts/src/artifacts/DummyToken.json create mode 100644 packages/contracts/src/artifacts/ERC20Token.json create mode 100644 packages/contracts/src/artifacts/ERC20Token_v1.json create mode 100644 packages/contracts/src/artifacts/Exchange.json create mode 100644 packages/contracts/src/artifacts/MaliciousToken.json create mode 100644 packages/contracts/src/artifacts/Mintable.json create mode 100644 packages/contracts/src/artifacts/MultiSigWallet.json create mode 100644 packages/contracts/src/artifacts/MultiSigWalletWithTimeLock.json create mode 100644 packages/contracts/src/artifacts/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.json create mode 100644 packages/contracts/src/artifacts/Ownable.json create mode 100644 packages/contracts/src/artifacts/Ownable_v1.json create mode 100644 packages/contracts/src/artifacts/SafeMath.json create mode 100644 packages/contracts/src/artifacts/SafeMath_v1.json create mode 100644 packages/contracts/src/artifacts/Token.json create mode 100644 packages/contracts/src/artifacts/TokenRegistry.json create mode 100644 packages/contracts/src/artifacts/TokenTransferProxy.json create mode 100644 packages/contracts/src/artifacts/Token_v1.json create mode 100644 packages/contracts/src/artifacts/UnlimitedAllowanceToken.json create mode 100644 packages/contracts/src/artifacts/UnlimitedAllowanceToken_v1.json create mode 100644 packages/contracts/src/artifacts/WETH9.json create mode 100644 packages/contracts/src/artifacts/ZRXToken.json create mode 100644 packages/contracts/src/contract_wrappers/generated/dummy_token.ts create mode 100644 packages/contracts/src/contract_wrappers/generated/exchange.ts create mode 100644 packages/contracts/src/contract_wrappers/generated/token.ts create mode 100644 packages/contracts/src/contract_wrappers/generated/token_registry.ts create mode 100644 packages/contracts/src/contract_wrappers/generated/token_transfer_proxy.ts create mode 100644 packages/contracts/src/contracts/current/multisig/MultiSigWallet/MultiSigWallet.sol create mode 100644 packages/contracts/src/contracts/current/multisig/MultiSigWalletWithTimeLock/MultiSigWalletWithTimeLock.sol create mode 100644 packages/contracts/src/contracts/current/multisig/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol create mode 100644 packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol create mode 100644 packages/contracts/src/contracts/current/protocol/TokenRegistry/TokenRegistry.sol create mode 100644 packages/contracts/src/contracts/current/protocol/TokenTransferProxy/TokenTransferProxy.sol create mode 100644 packages/contracts/src/contracts/current/test/DummyToken/DummyToken.sol create mode 100644 packages/contracts/src/contracts/current/test/MaliciousToken/MaliciousToken.sol create mode 100644 packages/contracts/src/contracts/current/test/Mintable/Mintable.sol create mode 100644 packages/contracts/src/contracts/current/tokens/ERC20Token/ERC20Token.sol create mode 100644 packages/contracts/src/contracts/current/tokens/Token/Token.sol create mode 100644 packages/contracts/src/contracts/current/tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol create mode 100644 packages/contracts/src/contracts/current/tokens/WETH9/WETH9.sol create mode 100644 packages/contracts/src/contracts/current/tokens/ZRXToken/ZRXToken.sol create mode 100644 packages/contracts/src/contracts/current/utils/Ownable/Ownable.sol create mode 100644 packages/contracts/src/contracts/current/utils/SafeMath/SafeMath.sol create mode 100644 packages/contracts/src/contracts/previous/ERC20Token/ERC20Token_v1.sol create mode 100644 packages/contracts/src/contracts/previous/Ownable/Ownable_v1.sol create mode 100644 packages/contracts/src/contracts/previous/SafeMath/SafeMath_v1.sol create mode 100644 packages/contracts/src/contracts/previous/Token/Token_v1.sol create mode 100644 packages/contracts/src/contracts/previous/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol delete mode 100644 packages/contracts/src/current/multisig/MultiSigWallet/MultiSigWallet.sol delete mode 100644 packages/contracts/src/current/multisig/MultiSigWalletWithTimeLock/MultiSigWalletWithTimeLock.sol delete mode 100644 packages/contracts/src/current/multisig/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol delete mode 100644 packages/contracts/src/current/protocol/Exchange/Exchange.sol delete mode 100644 packages/contracts/src/current/protocol/TokenRegistry/TokenRegistry.sol delete mode 100644 packages/contracts/src/current/protocol/TokenTransferProxy/TokenTransferProxy.sol delete mode 100644 packages/contracts/src/current/test/DummyToken/DummyToken.sol delete mode 100644 packages/contracts/src/current/test/MaliciousToken/MaliciousToken.sol delete mode 100644 packages/contracts/src/current/test/Mintable/Mintable.sol delete mode 100644 packages/contracts/src/current/tokens/ERC20Token/ERC20Token.sol delete mode 100644 packages/contracts/src/current/tokens/Token/Token.sol delete mode 100644 packages/contracts/src/current/tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol delete mode 100644 packages/contracts/src/current/tokens/WETH9/WETH9.sol delete mode 100644 packages/contracts/src/current/tokens/ZRXToken/ZRXToken.sol delete mode 100644 packages/contracts/src/current/utils/Ownable/Ownable.sol delete mode 100644 packages/contracts/src/current/utils/SafeMath/SafeMath.sol delete mode 100644 packages/contracts/src/previous/ERC20Token/ERC20Token_v1.sol delete mode 100644 packages/contracts/src/previous/Ownable/Ownable_v1.sol delete mode 100644 packages/contracts/src/previous/SafeMath/SafeMath_v1.sol delete mode 100644 packages/contracts/src/previous/Token/Token_v1.sol delete mode 100644 packages/contracts/src/previous/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol diff --git a/packages/abi-gen/CHANGELOG.md b/packages/abi-gen/CHANGELOG.md index ffa8a7a35..570c76bdd 100644 --- a/packages/abi-gen/CHANGELOG.md +++ b/packages/abi-gen/CHANGELOG.md @@ -3,6 +3,7 @@ ## v0.2.0 - _???_ * Added CLI options for explicit specifying location of partials and main template (#346) +* Added CLI option to specify networkId, adding support for the JSON artifact format found in @0xproject/contracts ## v0.1.0 - _January 11, 2018_ diff --git a/packages/abi-gen/src/index.ts b/packages/abi-gen/src/index.ts index fe2b56524..85cc67daf 100644 --- a/packages/abi-gen/src/index.ts +++ b/packages/abi-gen/src/index.ts @@ -17,6 +17,7 @@ import { utils } from './utils'; const ABI_TYPE_CONSTRUCTOR = 'constructor'; const ABI_TYPE_METHOD = 'function'; const ABI_TYPE_EVENT = 'event'; +const DEFAULT_NETWORK_ID = 50; const args = yargs .option('abis', { @@ -42,6 +43,12 @@ const args = yargs demandOption: true, normalize: true, }) + .option('network-id', { + describe: 'ID of the network where contract ABIs are nested in artifacts', + type: 'number', + default: DEFAULT_NETWORK_ID, + + }) .example( "$0 --abis 'src/artifacts/**/*.json' --out 'src/contracts/generated/' --partials 'src/templates/partials/**/*.handlebars' --template 'src/templates/contract.handlebars'", 'Full usage example', @@ -87,9 +94,14 @@ for (const abiFileName of abiFileNames) { const namedContent = utils.getNamedContent(abiFileName); utils.log(`Processing: ${chalk.bold(namedContent.name)}...`); const parsedContent = JSON.parse(namedContent.content); - const ABI = _.isArray(parsedContent) - ? parsedContent // ABI file - : parsedContent.abi; // Truffle contracts file + let ABI; + if (_.isArray(parsedContent)) { + ABI = parsedContent; // ABI file + } else if (!_.isUndefined(parsedContent.abi)) { + ABI = parsedContent.abi; // Truffle artifact + } else if (!_.isUndefined(parsedContent.networks) && !_.isUndefined(parsedContent.networks[args.networkId])) { + ABI = parsedContent.networks[args.networkId]; // 0x contracts package artifact + } if (_.isUndefined(ABI)) { utils.log(`${chalk.red(`ABI not found in ${abiFileName}.`)}`); utils.log(`Please make sure your ABI file is either an array with ABI entries or an object with the abi key`); diff --git a/packages/contracts/artifacts/DummyToken.json b/packages/contracts/artifacts/DummyToken.json deleted file mode 100644 index 8be276389..000000000 --- a/packages/contracts/artifacts/DummyToken.json +++ /dev/null @@ -1,313 +0,0 @@ -{ - "contract_name": "DummyToken", - "networks": { - "50": { - "solc_version": "0.4.18", - "keccak256": "0x457cd1abe6333f2131eb9663c76a52857bc3e37606b3997b8c6683267b2049e3", - "optimizer_enabled": 0, - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_value", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_target", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "setBalance", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "name": "_name", - "type": "string" - }, - { - "name": "_symbol", - "type": "string" - }, - { - "name": "_decimals", - "type": "uint256" - }, - { - "name": "_totalSupply", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "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" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_spender", - "type": "address" - }, - { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } - ], - "unlinked_binary": - "0x606060405234156200001057600080fd5b60405162001200380380620012008339810160405280805182019190602001805182019190602001805190602001909190805190602001909190505033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360049080519060200190620000a59291906200011a565b508260059080519060200190620000be9291906200011a565b508160068190555080600281905550806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050505050620001c9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200015d57805160ff19168380011785556200018e565b828001600101855582156200018e579182015b828111156200018d57825182559160200191906001019062000170565b5b5090506200019d9190620001a1565b5090565b620001c691905b80821115620001c2576000816000905550600101620001a8565b5090565b90565b61102780620001d96000396000f3006060604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100ca578063095ea7b31461015857806318160ddd146101b257806323b872dd146101db578063313ce5671461025457806370a082311461027d5780638da5cb5b146102ca57806395d89b411461031f578063a0712d68146103ad578063a9059cbb146103d0578063dd62ed3e1461042a578063e30443bc14610496578063f2fde38b146104d8575b600080fd5b34156100d557600080fd5b6100dd610511565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561011d578082015181840152602081019050610102565b50505050905090810190601f16801561014a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561016357600080fd5b610198600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105af565b604051808215151515815260200191505060405180910390f35b34156101bd57600080fd5b6101c56106a1565b6040518082815260200191505060405180910390f35b34156101e657600080fd5b61023a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106a7565b604051808215151515815260200191505060405180910390f35b341561025f57600080fd5b6102676109c8565b6040518082815260200191505060405180910390f35b341561028857600080fd5b6102b4600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506109ce565b6040518082815260200191505060405180910390f35b34156102d557600080fd5b6102dd610a16565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561032a57600080fd5b610332610a3c565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610372578082015181840152602081019050610357565b50505050905090810190601f16801561039f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156103b857600080fd5b6103ce6004808035906020019091905050610ada565b005b34156103db57600080fd5b610410600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610b91565b604051808215151515815260200191505060405180910390f35b341561043557600080fd5b610480600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d71565b6040518082815260200191505060405180910390f35b34156104a157600080fd5b6104d6600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610df8565b005b34156104e357600080fd5b61050f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610eed565b005b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105a75780601f1061057c576101008083540402835291602001916105a7565b820191906000526020600020905b81548152906001019060200180831161058a57829003601f168201915b505050505081565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b600080600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156107775750828110155b801561080157506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b151561080c57600080fd5b826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156109575782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b60065481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ad25780601f10610aa757610100808354040283529160200191610ad2565b820191906000526020600020905b815481529060010190602001808311610ab557829003601f168201915b505050505081565b68056bc75e2d631000008111151515610af257600080fd5b610b3a816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fc4565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b8860025482610fc4565b60028190555050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410158015610c5f57506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b1515610c6a57600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e5657600080fd5b610e5f836109ce565b905080821015610e8957610e7e600254610e798385610fe2565b610fe2565b600281905550610ea5565b610e9e600254610e998484610fe2565b610fc4565b6002819055505b816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f4957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515610fc15780600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b6000808284019050838110151515610fd857fe5b8091505092915050565b6000828211151515610ff057fe5b8183039050929150505600a165627a7a723058209c3a37463b05ebd155665b4be7d56f40b7ff1ca3a86a33391b31f468e00b48480029", - "updated_at": 1517509617252 - } - } -} diff --git a/packages/contracts/artifacts/ERC20Token.json b/packages/contracts/artifacts/ERC20Token.json deleted file mode 100644 index fc0dd5259..000000000 --- a/packages/contracts/artifacts/ERC20Token.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "contract_name": "ERC20Token", - "networks": { - "50": { - "solc_version": "0.4.18", - "keccak256": "0x31be5b5f8d7ae32e5ac282b8740cc7aa87cdc383cabafa02292ea6f38302efcc", - "optimizer_enabled": 0, - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "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" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_spender", - "type": "address" - }, - { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } - ], - "unlinked_binary": - "0x6060604052341561000f57600080fd5b6109528061001e6000396000f300606060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007d57806318160ddd146100d757806323b872dd1461010057806370a0823114610179578063a9059cbb146101c6578063dd62ed3e14610220575b600080fd5b341561008857600080fd5b6100bd600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061028c565b604051808215151515815260200191505060405180910390f35b34156100e257600080fd5b6100ea61037e565b6040518082815260200191505060405180910390f35b341561010b57600080fd5b61015f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610384565b604051808215151515815260200191505060405180910390f35b341561018457600080fd5b6101b0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610677565b6040518082815260200191505060405180910390f35b34156101d157600080fd5b610206600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106bf565b604051808215151515815260200191505060405180910390f35b341561022b57600080fd5b610276600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061089f565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b6000816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410158015610450575081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156104da57506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15156104e557600080fd5b816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561078d57506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b151561079857600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050929150505600a165627a7a72305820d9af9b2b6ffe19f00d45d30a243f833e31053a2e48142e183c9f1e6b0ead7a9e0029", - "updated_at": 1517509619365 - } - } -} diff --git a/packages/contracts/artifacts/ERC20Token_v1.json b/packages/contracts/artifacts/ERC20Token_v1.json deleted file mode 100644 index 757962064..000000000 --- a/packages/contracts/artifacts/ERC20Token_v1.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "contract_name": "ERC20Token_v1", - "networks": { - "50": { - "solc_version": "0.4.11", - "keccak256": "0x3d710b436c430d6fe49f64b091555405360d76da6454b93faa8e213eea34a96d", - "optimizer_enabled": 0, - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "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" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_spender", - "type": "address" - }, - { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } - ], - "unlinked_binary": - "0x6060604052341561000c57fe5b5b61095b8061001c6000396000f30060606040523615610076576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007857806318160ddd146100cf57806323b872dd146100f557806370a082311461016b578063a9059cbb146101b5578063dd62ed3e1461020c575bfe5b341561008057fe5b6100b5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610275565b604051808215151515815260200191505060405180910390f35b34156100d757fe5b6100df610368565b6040518082815260200191505060405180910390f35b34156100fd57fe5b610151600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061036e565b604051808215151515815260200191505060405180910390f35b341561017357fe5b61019f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061066f565b6040518082815260200191505060405180910390f35b34156101bd57fe5b6101f2600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106b9565b604051808215151515815260200191505060405180910390f35b341561021457fe5b61025f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108a7565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a3600190505b92915050565b60025481565b600081600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561043b575081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156104c75750600060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b1561065e5781600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050610668565b60009050610668565b5b9392505050565b6000600060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b600081600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561078a5750600060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b156108975781600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190506108a1565b600090506108a1565b5b92915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b929150505600a165627a7a72305820441601e8451e1c2d31e6cde19fc920b8f95e79f9d42dd662aeefad13fd8bcfaa0029", - "updated_at": 1517509621756 - } - } -} diff --git a/packages/contracts/artifacts/Exchange.json b/packages/contracts/artifacts/Exchange.json deleted file mode 100644 index ea3891d94..000000000 --- a/packages/contracts/artifacts/Exchange.json +++ /dev/null @@ -1,603 +0,0 @@ -{ - "contract_name": "Exchange", - "networks": { - "50": { - "solc_version": "0.4.14", - "keccak256": "0x50d9d5de7ea3f16b7e655c3ed280d1d7ff50422b4fc42ae609422eab5028d2ca", - "optimizer_enabled": 0, - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "numerator", - "type": "uint256" - }, - { - "name": "denominator", - "type": "uint256" - }, - { - "name": "target", - "type": "uint256" - } - ], - "name": "isRoundingError", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "name": "filled", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "name": "cancelled", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5][]" - }, - { - "name": "orderValues", - "type": "uint256[6][]" - }, - { - "name": "fillTakerTokenAmount", - "type": "uint256" - }, - { - "name": "shouldThrowOnInsufficientBalanceOrAllowance", - "type": "bool" - }, - { - "name": "v", - "type": "uint8[]" - }, - { - "name": "r", - "type": "bytes32[]" - }, - { - "name": "s", - "type": "bytes32[]" - } - ], - "name": "fillOrdersUpTo", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5]" - }, - { - "name": "orderValues", - "type": "uint256[6]" - }, - { - "name": "cancelTakerTokenAmount", - "type": "uint256" - } - ], - "name": "cancelOrder", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "ZRX_TOKEN_CONTRACT", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5][]" - }, - { - "name": "orderValues", - "type": "uint256[6][]" - }, - { - "name": "fillTakerTokenAmounts", - "type": "uint256[]" - }, - { - "name": "v", - "type": "uint8[]" - }, - { - "name": "r", - "type": "bytes32[]" - }, - { - "name": "s", - "type": "bytes32[]" - } - ], - "name": "batchFillOrKillOrders", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5]" - }, - { - "name": "orderValues", - "type": "uint256[6]" - }, - { - "name": "fillTakerTokenAmount", - "type": "uint256" - }, - { - "name": "v", - "type": "uint8" - }, - { - "name": "r", - "type": "bytes32" - }, - { - "name": "s", - "type": "bytes32" - } - ], - "name": "fillOrKillOrder", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "getUnavailableTakerTokenAmount", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "signer", - "type": "address" - }, - { - "name": "hash", - "type": "bytes32" - }, - { - "name": "v", - "type": "uint8" - }, - { - "name": "r", - "type": "bytes32" - }, - { - "name": "s", - "type": "bytes32" - } - ], - "name": "isValidSignature", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "numerator", - "type": "uint256" - }, - { - "name": "denominator", - "type": "uint256" - }, - { - "name": "target", - "type": "uint256" - } - ], - "name": "getPartialAmount", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "TOKEN_TRANSFER_PROXY_CONTRACT", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5][]" - }, - { - "name": "orderValues", - "type": "uint256[6][]" - }, - { - "name": "fillTakerTokenAmounts", - "type": "uint256[]" - }, - { - "name": "shouldThrowOnInsufficientBalanceOrAllowance", - "type": "bool" - }, - { - "name": "v", - "type": "uint8[]" - }, - { - "name": "r", - "type": "bytes32[]" - }, - { - "name": "s", - "type": "bytes32[]" - } - ], - "name": "batchFillOrders", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5][]" - }, - { - "name": "orderValues", - "type": "uint256[6][]" - }, - { - "name": "cancelTakerTokenAmounts", - "type": "uint256[]" - } - ], - "name": "batchCancelOrders", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5]" - }, - { - "name": "orderValues", - "type": "uint256[6]" - }, - { - "name": "fillTakerTokenAmount", - "type": "uint256" - }, - { - "name": "shouldThrowOnInsufficientBalanceOrAllowance", - "type": "bool" - }, - { - "name": "v", - "type": "uint8" - }, - { - "name": "r", - "type": "bytes32" - }, - { - "name": "s", - "type": "bytes32" - } - ], - "name": "fillOrder", - "outputs": [ - { - "name": "filledTakerTokenAmount", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5]" - }, - { - "name": "orderValues", - "type": "uint256[6]" - } - ], - "name": "getOrderHash", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "EXTERNAL_QUERY_GAS_LIMIT", - "outputs": [ - { - "name": "", - "type": "uint16" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "VERSION", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "type": "function" - }, - { - "inputs": [ - { - "name": "_zrxToken", - "type": "address" - }, - { - "name": "_tokenTransferProxy", - "type": "address" - } - ], - "payable": false, - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "maker", - "type": "address" - }, - { - "indexed": false, - "name": "taker", - "type": "address" - }, - { - "indexed": true, - "name": "feeRecipient", - "type": "address" - }, - { - "indexed": false, - "name": "makerToken", - "type": "address" - }, - { - "indexed": false, - "name": "takerToken", - "type": "address" - }, - { - "indexed": false, - "name": "filledMakerTokenAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "filledTakerTokenAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "paidMakerFee", - "type": "uint256" - }, - { - "indexed": false, - "name": "paidTakerFee", - "type": "uint256" - }, - { - "indexed": true, - "name": "tokens", - "type": "bytes32" - }, - { - "indexed": false, - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "LogFill", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "maker", - "type": "address" - }, - { - "indexed": true, - "name": "feeRecipient", - "type": "address" - }, - { - "indexed": false, - "name": "makerToken", - "type": "address" - }, - { - "indexed": false, - "name": "takerToken", - "type": "address" - }, - { - "indexed": false, - "name": "cancelledMakerTokenAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "cancelledTakerTokenAmount", - "type": "uint256" - }, - { - "indexed": true, - "name": "tokens", - "type": "bytes32" - }, - { - "indexed": false, - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "LogCancel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "errorId", - "type": "uint8" - }, - { - "indexed": true, - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "LogError", - "type": "event" - } - ], - "unlinked_binary": - "0x6060604052341561000f57600080fd5b604051604080612c4d833981016040528080519060200190919080519060200190919050505b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50505b612b84806100c96000396000f300606060405236156100fa576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806314df96ee146100ff578063288cdc911461014c5780632ac1262214610187578063363349be146101c2578063394c21e7146103bc5780633b30ba591461044b5780634f150787146104a0578063741bcc93146106b25780637e9abb50146107535780638163681e1461078e57806398024a8b14610812578063add1cbc51461085b578063b7b2c7d6146108b0578063baa0181d14610acd578063bc61394a14610c1f578063cfc4d0ec14610cdf578063f06bbf7514610d6d578063ffa1ad7414610d9e575b600080fd5b341561010a57600080fd5b6101326004808035906020019091908035906020019091908035906020019091905050610e2d565b604051808215151515815260200191505060405180910390f35b341561015757600080fd5b610171600480803560001916906020019091905050610e7c565b6040518082815260200191505060405180910390f35b341561019257600080fd5b6101ac600480803560001916906020019091905050610e94565b6040518082815260200191505060405180910390f35b34156101cd57600080fd5b6103a660048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b8282101561024857848483905060a002016005806020026040519081016040528092919082600560200280828437820191505050505081526020019060010190610203565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156102c457848483905060c00201600680602002604051908101604052809291908260066020028082843782019150505050508152602001906001019061027f565b5050505050919080359060200190919080351515906020019091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050610eac565b6040518082815260200191505060405180910390f35b34156103c757600080fd5b6104356004808060a001906005806020026040519081016040528092919082600560200280828437820191505050505091908060c001906006806020026040519081016040528092919082600660200280828437820191505050505091908035906020019091905050611013565b6040518082815260200191505060405180910390f35b341561045657600080fd5b61045e6114fb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104ab57600080fd5b6106b060048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b8282101561052657848483905060a0020160058060200260405190810160405280929190826005602002808284378201915050505050815260200190600101906104e1565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156105a257848483905060c00201600680602002604051908101604052809291908260066020028082843782019150505050508152602001906001019061055d565b50505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050611520565b005b34156106bd57600080fd5b6107516004808060a001906005806020026040519081016040528092919082600560200280828437820191505050505091908060c00190600680602002604051908101604052809291908260066020028082843782019150505050509190803590602001909190803560ff1690602001909190803560001916906020019091908035600019169060200190919050506115df565b005b341561075e57600080fd5b610778600480803560001916906020019091905050611605565b6040518082815260200191505060405180910390f35b341561079957600080fd5b6107f8600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356000191690602001909190803560ff16906020019091908035600019169060200190919080356000191690602001909190505061164f565b604051808215151515815260200191505060405180910390f35b341561081d57600080fd5b6108456004808035906020019091908035906020019091908035906020019091905050611757565b6040518082815260200191505060405180910390f35b341561086657600080fd5b61086e611776565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156108bb57600080fd5b610acb60048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b8282101561093657848483905060a0020160058060200260405190810160405280929190826005602002808284378201915050505050815260200190600101906108f1565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156109b257848483905060c00201600680602002604051908101604052809291908260066020028082843782019150505050508152602001906001019061096d565b50505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035151590602001909190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190505061179c565b005b3415610ad857600080fd5b610c1d60048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b82821015610b5357848483905060a002016005806020026040519081016040528092919082600560200280828437820191505050505081526020019060010190610b0e565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b82821015610bcf57848483905060c002016006806020026040519081016040528092919082600660200280828437820191505050505081526020019060010190610b8a565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190505061185e565b005b3415610c2a57600080fd5b610cc96004808060a001906005806020026040519081016040528092919082600560200280828437820191505050505091908060c001906006806020026040519081016040528092919082600660200280828437820191505050505091908035906020019091908035151590602001909190803560ff1690602001909190803560001916906020019091908035600019169060200190919050506118d3565b6040518082815260200191505060405180910390f35b3415610cea57600080fd5b610d4f6004808060a001906005806020026040519081016040528092919082600560200280828437820191505050505091908060c001906006806020026040519081016040528092919082600660200280828437820191505050505091905050612073565b60405180826000191660001916815260200191505060405180910390f35b3415610d7857600080fd5b610d8061231f565b604051808261ffff1661ffff16815260200191505060405180910390f35b3415610da957600080fd5b610db1612325565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610df25780820151818401525b602081019050610dd6565b50505050905090810190601f168015610e1f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60008060008486850991506000821415610e4a5760009250610e73565b610e69610e5a83620f424061235e565b610e64888761235e565b612392565b90506103e8811192505b50509392505050565b60026020528060005260406000206000915090505481565b60036020528060005260406000206000915090505481565b6000806000809150600090505b895181101561100257896000815181101515610ed157fe5b906020019060200201516003600581101515610ee957fe5b602002015173ffffffffffffffffffffffffffffffffffffffff168a82815181101515610f1257fe5b906020019060200201516003600581101515610f2a57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff16141515610f5157600080fd5b610fe582610fe08c84815181101515610f6657fe5b906020019060200201518c85815181101515610f7e57fe5b90602001906020020151610f928d886123ae565b8c8c88815181101515610fa157fe5b906020019060200201518c89815181101515610fb957fe5b906020019060200201518c8a815181101515610fd157fe5b906020019060200201516118d3565b6123c8565b915087821415610ff457611002565b5b8080600101915050610eb9565b8192505b5050979650505050505050565b600061101d612a8c565b6000806101606040519081016040528088600060058110151561103c57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff16815260200188600160058110151561106b57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff16815260200188600260058110151561109a57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018860036005811015156110c957fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018860046005811015156110f857fe5b602002015173ffffffffffffffffffffffffffffffffffffffff16815260200187600060068110151561112757fe5b6020020151815260200187600160068110151561114057fe5b6020020151815260200187600260068110151561115957fe5b6020020151815260200187600360068110151561117257fe5b6020020151815260200187600460068110151561118b57fe5b6020020151815260200161119f8989612073565b6000191681525092503373ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff161415156111e657600080fd5b60008360a001511180156111fe575060008360c00151115b801561120a5750600085115b151561121557600080fd5b8261012001514210151561127257826101400151600019166000600381111561123a57fe5b60ff167f36d86c59e00bd73dc19ba3adfe068e4b64ac7e92be35546adeddf1b956a87e9060405160405180910390a3600093506114f1565b61128d8360c00151611288856101400151611605565b6123ae565b915061129985836123e7565b905060008114156112f35782610140015160001916600160038111156112bb57fe5b60ff167f36d86c59e00bd73dc19ba3adfe068e4b64ac7e92be35546adeddf1b956a87e9060405160405180910390a3600093506114f1565b61131d600360008561014001516000191660001916815260200190815260200160002054826123c8565b60036000856101400151600019166000191681526020019081526020016000208190555082604001518360600151604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902060001916836080015173ffffffffffffffffffffffffffffffffffffffff16846000015173ffffffffffffffffffffffffffffffffffffffff167f67d66f160bc93d925d05dae1794c90d2d6d6688b29b84ff069398a9b0458713186604001518760600151611455878a60c001518b60a00151611757565b878a6101400151604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182600019166000191681526020019550505050505060405180910390a48093505b5050509392505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008090505b86518110156115d5576115c7878281518110151561154057fe5b90602001906020020151878381518110151561155857fe5b90602001906020020151878481518110151561157057fe5b90602001906020020151878581518110151561158857fe5b9060200190602002015187868151811015156115a057fe5b9060200190602002015187878151811015156115b857fe5b906020019060200201516115df565b5b8080600101915050611526565b5b50505050505050565b836115f087878760008888886118d3565b1415156115fc57600080fd5b5b505050505050565b600061164760026000846000191660001916815260200190815260200160002054600360008560001916600019168152602001908152602001600020546123c8565b90505b919050565b600060018560405180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040518091039020858585604051600081526020016040526000604051602001526040518085600019166000191681526020018460ff1660ff16815260200183600019166000191681526020018260001916600019168152602001945050505050602060405160208103908084039060008661646e5a03f1151561171457600080fd5b50506020604051035173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161490505b95945050505050565b600061176c611766858461235e565b84612392565b90505b9392505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008090505b87518110156118535761184488828151811015156117bc57fe5b9060200190602002015188838151811015156117d457fe5b9060200190602002015188848151811015156117ec57fe5b9060200190602002015188888681518110151561180557fe5b90602001906020020151888781518110151561181d57fe5b90602001906020020151888881518110151561183557fe5b906020019060200201516118d3565b505b80806001019150506117a2565b5b5050505050505050565b60008090505b83518110156118cc576118bd848281518110151561187e57fe5b90602001906020020151848381518110151561189657fe5b9060200190602002015184848151811015156118ae57fe5b90602001906020020151611013565b505b8080600101915050611864565b5b50505050565b60006118dd612a8c565b600080600080610160604051908101604052808e60006005811015156118ff57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018e600160058110151561192e57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018e600260058110151561195d57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018e600360058110151561198c57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018e60046005811015156119bb57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018d60006006811015156119ea57fe5b602002015181526020018d6001600681101515611a0357fe5b602002015181526020018d6002600681101515611a1c57fe5b602002015181526020018d6003600681101515611a3557fe5b602002015181526020018d6004600681101515611a4e57fe5b60200201518152602001611a628f8f612073565b600019168152509450600073ffffffffffffffffffffffffffffffffffffffff16856020015173ffffffffffffffffffffffffffffffffffffffff161480611ad957503373ffffffffffffffffffffffffffffffffffffffff16856020015173ffffffffffffffffffffffffffffffffffffffff16145b1515611ae457600080fd5b60008560a00151118015611afc575060008560c00151115b8015611b08575060008b115b1515611b1357600080fd5b611b2985600001518661014001518b8b8b61164f565b1515611b3457600080fd5b84610120015142101515611b91578461014001516000191660006003811115611b5957fe5b60ff167f36d86c59e00bd73dc19ba3adfe068e4b64ac7e92be35546adeddf1b956a87e9060405160405180910390a360009550612063565b611bac8560c00151611ba7876101400151611605565b6123ae565b9350611bb88b856123e7565b95506000861415611c12578461014001516000191660016003811115611bda57fe5b60ff167f36d86c59e00bd73dc19ba3adfe068e4b64ac7e92be35546adeddf1b956a87e9060405160405180910390a360009550612063565b611c25868660c001518760a00151610e2d565b15611c79578461014001516000191660026003811115611c4157fe5b60ff167f36d86c59e00bd73dc19ba3adfe068e4b64ac7e92be35546adeddf1b956a87e9060405160405180910390a360009550612063565b89158015611c8e5750611c8c8587612401565b155b15611ce15784610140015160001916600380811115611ca957fe5b60ff167f36d86c59e00bd73dc19ba3adfe068e4b64ac7e92be35546adeddf1b956a87e9060405160405180910390a360009550612063565b611cf4868660c001518760a00151611757565b9250611d20600260008761014001516000191660001916815260200190815260200160002054876123c8565b600260008761014001516000191660001916815260200190815260200160002081905550611d58856040015186600001513386612751565b1515611d6357600080fd5b611d77856060015133876000015189612751565b1515611d8257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16856080015173ffffffffffffffffffffffffffffffffffffffff16141515611e815760008560e001511115611e1f57611ddc868660c001518760e00151611757565b9150611e136000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168660000151876080015185612751565b1515611e1e57600080fd5b5b60008561010001511115611e8057611e41868660c00151876101000151611757565b9050611e746000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633876080015184612751565b1515611e7f57600080fd5b5b5b84604001518560600151604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902060001916856080015173ffffffffffffffffffffffffffffffffffffffff16866000015173ffffffffffffffffffffffffffffffffffffffff167f0d0b9391970d9a25552f37d436d2aae2925e2bfe1b2a923754bada030c498cb33389604001518a60600151898d8a8a8f6101400151604051808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200186815260200185815260200184815260200183815260200182600019166000191681526020019850505050505050505060405180910390a48595505b5050505050979650505050505050565b60003083600060058110151561208557fe5b602002015184600160058110151561209957fe5b60200201518560026005811015156120ad57fe5b60200201518660036005811015156120c157fe5b60200201518760046005811015156120d557fe5b60200201518760006006811015156120e957fe5b60200201518860016006811015156120fd57fe5b602002015189600260068110151561211157fe5b60200201518a600360068110151561212557fe5b60200201518b600460068110151561213957fe5b60200201518c600560068110151561214d57fe5b6020020151604051808d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018781526020018681526020018581526020018481526020018381526020018281526020019c50505050505050505050505050604051809103902090505b92915050565b61138781565b6040805190810160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b6000808284029050600084148061237f575082848281151561237c57fe5b04145b151561238757fe5b8091505b5092915050565b60008082848115156123a057fe5b0490508091505b5092915050565b60008282111515156123bc57fe5b81830390505b92915050565b60008082840190508381101515156123dc57fe5b8091505b5092915050565b60008183106123f657816123f8565b825b90505b92915050565b60008060008060008060008060003397506124258a8c60c001518d60a00151611757565b9650600073ffffffffffffffffffffffffffffffffffffffff168b6080015173ffffffffffffffffffffffffffffffffffffffff161415156126d2576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168b6040015173ffffffffffffffffffffffffffffffffffffffff161495506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168b6060015173ffffffffffffffffffffffffffffffffffffffff161494506125208a8c60c001518d60e00151611757565b93506125368a8c60c001518d6101000151611757565b925085612543578361254e565b61254d87856123c8565b5b91508461255b5782612566565b6125658a846123c8565b5b9050816125986000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168d600001516128ae565b10806125d15750816125cf6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168d60000151612972565b105b806126055750806126036000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a6128ae565b105b806126395750806126376000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a612972565b105b156126475760009850612743565b851580156126805750866126638c604001518d600001516128ae565b108061267f57508661267d8c604001518d60000151612972565b105b5b1561268e5760009850612743565b841580156126bf5750896126a68c606001518a6128ae565b10806126be5750896126bc8c606001518a612972565b105b5b156126cd5760009850612743565b61273e565b866126e58c604001518d600001516128ae565b10806127015750866126ff8c604001518d60000151612972565b105b806127185750896127168c606001518a6128ae565b105b8061272f57508961272d8c606001518a612972565b105b1561273d5760009850612743565b5b600198505b505050505050505092915050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166315dacbea868686866000604051602001526040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001945050505050602060405180830381600087803b151561288857600080fd5b6102c65a03f1151561289957600080fd5b5050506040518051905090505b949350505050565b60008273ffffffffffffffffffffffffffffffffffffffff166370a0823161138761ffff16846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600088803b151561295157600080fd5b87f1151561295e57600080fd5b505050506040518051905090505b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e61138761ffff1684600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600088803b1515612a6b57600080fd5b87f11515612a7857600080fd5b505050506040518051905090505b92915050565b61016060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081526020016000815260200160008152602001600081526020016000801916815250905600a165627a7a723058200855a52575ade1fd6a84adab86cbbe615f88001d9f15f37dd43f7a0a279522940029", - "updated_at": 1517539073351 - } - } -} diff --git a/packages/contracts/artifacts/MaliciousToken.json b/packages/contracts/artifacts/MaliciousToken.json deleted file mode 100644 index 000cb890d..000000000 --- a/packages/contracts/artifacts/MaliciousToken.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "contract_name": "MaliciousToken", - "networks": { - "50": { - "solc_version": "0.4.18", - "keccak256": "0x91d9300198fcb37383f39ae62bafd5a92b6def37f673c23b8ec37caca5bf9c69", - "optimizer_enabled": 0, - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "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" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_spender", - "type": "address" - }, - { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } - ], - "unlinked_binary": - "0x60606040526001600360006101000a81548160ff021916908360ff160217905550341561002b57600080fd5b6109968061003a6000396000f300606060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007d57806318160ddd146100d757806323b872dd1461010057806370a0823114610179578063a9059cbb146101c6578063dd62ed3e14610220575b600080fd5b341561008857600080fd5b6100bd600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061028c565b604051808215151515815260200191505060405180910390f35b34156100e257600080fd5b6100ea61037e565b6040518082815260200191505060405180910390f35b341561010b57600080fd5b61015f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610384565b604051808215151515815260200191505060405180910390f35b341561018457600080fd5b6101b0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610677565b6040518082815260200191505060405180910390f35b34156101d157600080fd5b610206600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106c7565b604051808215151515815260200191505060405180910390f35b341561022b57600080fd5b610276600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108a7565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b6000816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410158015610450575081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156104da57506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15156104e557600080fd5b816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b6000610681610936565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561079557506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15156107a057600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60006108b1610936565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6003600081819054906101000a900460ff168092919060010191906101000a81548160ff021916908360ff160217905550505600a165627a7a723058206c519d7c969de1cb1e38dc98962c65b95b935b299072476ff618a37c783e977c0029", - "updated_at": 1517509617913 - } - } -} diff --git a/packages/contracts/artifacts/Mintable.json b/packages/contracts/artifacts/Mintable.json deleted file mode 100644 index 9877fce84..000000000 --- a/packages/contracts/artifacts/Mintable.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "contract_name": "Mintable", - "networks": { - "50": { - "solc_version": "0.4.18", - "keccak256": "0xdb7d11ecab2640e5455efeab7239b1d77e4512264e155c89ce56c863ade6e3ce", - "optimizer_enabled": 0, - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_value", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "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" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_spender", - "type": "address" - }, - { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } - ], - "unlinked_binary": - "0x6060604052341561000f57600080fd5b610a838061001e6000396000f300606060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461008857806318160ddd146100e257806323b872dd1461010b57806370a0823114610184578063a0712d68146101d1578063a9059cbb146101f4578063dd62ed3e1461024e575b600080fd5b341561009357600080fd5b6100c8600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506102ba565b604051808215151515815260200191505060405180910390f35b34156100ed57600080fd5b6100f56103ac565b6040518082815260200191505060405180910390f35b341561011657600080fd5b61016a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506103b2565b604051808215151515815260200191505060405180910390f35b341561018f57600080fd5b6101bb600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106d3565b6040518082815260200191505060405180910390f35b34156101dc57600080fd5b6101f2600480803590602001909190505061071b565b005b34156101ff57600080fd5b610234600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506107d2565b604051808215151515815260200191505060405180910390f35b341561025957600080fd5b6102a4600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506109b2565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b600080600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156104825750828110155b801561050c57506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b151561051757600080fd5b826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156106625782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b68056bc75e2d63100000811115151561073357600080fd5b61077b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a39565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506107c960025482610a39565b60028190555050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156108a057506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15156108ab57600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000808284019050838110151515610a4d57fe5b80915050929150505600a165627a7a72305820f5e0d3094dc6fdec1984e7c91dd401991ce8a0573e153144ba7250ff27d2db190029", - "updated_at": 1517509618941 - } - } -} diff --git a/packages/contracts/artifacts/MultiSigWallet.json b/packages/contracts/artifacts/MultiSigWallet.json deleted file mode 100644 index 47bca568e..000000000 --- a/packages/contracts/artifacts/MultiSigWallet.json +++ /dev/null @@ -1,523 +0,0 @@ -{ - "contract_name": "MultiSigWallet", - "networks": { - "50": { - "solc_version": "0.4.10", - "keccak256": "0xccb0952f9f74bdedc4c6aa09bdad61b3f2c0b66a3aeae0be209c74472b62e9c6", - "optimizer_enabled": 0, - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "owners", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "removeOwner", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "revokeConfirmation", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "isOwner", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "address" - } - ], - "name": "confirmations", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "pending", - "type": "bool" - }, - { - "name": "executed", - "type": "bool" - } - ], - "name": "getTransactionCount", - "outputs": [ - { - "name": "count", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "addOwner", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "isConfirmed", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "getConfirmationCount", - "outputs": [ - { - "name": "count", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "transactions", - "outputs": [ - { - "name": "destination", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - }, - { - "name": "data", - "type": "bytes" - }, - { - "name": "executed", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getOwners", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "from", - "type": "uint256" - }, - { - "name": "to", - "type": "uint256" - }, - { - "name": "pending", - "type": "bool" - }, - { - "name": "executed", - "type": "bool" - } - ], - "name": "getTransactionIds", - "outputs": [ - { - "name": "_transactionIds", - "type": "uint256[]" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "getConfirmations", - "outputs": [ - { - "name": "_confirmations", - "type": "address[]" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "transactionCount", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_required", - "type": "uint256" - } - ], - "name": "changeRequirement", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "confirmTransaction", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "destination", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - }, - { - "name": "data", - "type": "bytes" - } - ], - "name": "submitTransaction", - "outputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_OWNER_COUNT", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "required", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "newOwner", - "type": "address" - } - ], - "name": "replaceOwner", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "executeTransaction", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "inputs": [ - { - "name": "_owners", - "type": "address[]" - }, - { - "name": "_required", - "type": "uint256" - } - ], - "payable": false, - "type": "constructor" - }, - { - "payable": true, - "type": "fallback" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Confirmation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Revocation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Submission", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Execution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "ExecutionFailure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - } - ], - "name": "OwnerAddition", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - } - ], - "name": "OwnerRemoval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "required", - "type": "uint256" - } - ], - "name": "RequirementChange", - "type": "event" - } - ], - "unlinked_binary": - "0x606060405234156200000d57fe5b604051620022e9380380620022e9833981016040528080518201919060200180519060200190919050505b600082518260328211806200004c57508181115b80620000585750600081145b80620000645750600082145b15620000705760006000fd5b600092505b8451831015620001a9576002600086858151811015156200009257fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806200011e575060008584815181101515620000fc57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff16145b156200012a5760006000fd5b60016002600087868151811015156200013f57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b828060010193505062000075565b8460039080519060200190620001c1929190620001d6565b50836004819055505b5b5050505050620002ab565b82805482825590600052602060002090810192821562000252579160200282015b82811115620002515782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190620001f7565b5b50905062000261919062000265565b5090565b620002a891905b80821115620002a457600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055506001016200026c565b5090565b90565b61202e80620002bb6000396000f3006060604052361561011b576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063025e7c271461017c578063173825d9146101dc57806320ea8d86146102125780632f54bf6e146102325780633411c81c1461028057806354741525146102d75780637065cb4814610318578063784547a71461034e5780638b51d13f146103865780639ace38c2146103ba578063a0e67e2b146104b5578063a8abe69a1461052a578063b5dc40c3146105cc578063b77bf6001461064f578063ba51a6df14610675578063c01a8c8414610695578063c6427474146106b5578063d74f8edd1461074b578063dc8452cd14610771578063e20056e614610797578063ee22610b146107ec575b61017a5b6000341115610177573373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a25b5b565b005b341561018457fe5b61019a600480803590602001909190505061080c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101e457fe5b610210600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061084c565b005b341561021a57fe5b6102306004808035906020019091905050610af4565b005b341561023a57fe5b610266600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ca5565b604051808215151515815260200191505060405180910390f35b341561028857fe5b6102bd600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610cc5565b604051808215151515815260200191505060405180910390f35b34156102df57fe5b610302600480803515159060200190919080351515906020019091905050610cf4565b6040518082815260200191505060405180910390f35b341561032057fe5b61034c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d8b565b005b341561035657fe5b61036c6004808035906020019091905050610f8e565b604051808215151515815260200191505060405180910390f35b341561038e57fe5b6103a46004808035906020019091905050611078565b6040518082815260200191505060405180910390f35b34156103c257fe5b6103d86004808035906020019091905050611148565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001831515151581526020018281038252848181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156104a35780601f10610478576101008083540402835291602001916104a3565b820191906000526020600020905b81548152906001019060200180831161048657829003601f168201915b50509550505050505060405180910390f35b34156104bd57fe5b6104c56111a4565b6040518080602001828103825283818151815260200191508051906020019060200280838360008314610517575b805182526020831115610517576020820191506020810190506020830392506104f3565b5050509050019250505060405180910390f35b341561053257fe5b610567600480803590602001909190803590602001909190803515159060200190919080351515906020019091905050611239565b60405180806020018281038252838181518152602001915080519060200190602002808383600083146105b9575b8051825260208311156105b957602082019150602081019050602083039250610595565b5050509050019250505060405180910390f35b34156105d457fe5b6105ea600480803590602001909190505061139d565b604051808060200182810382528381815181526020019150805190602001906020028083836000831461063c575b80518252602083111561063c57602082019150602081019050602083039250610618565b5050509050019250505060405180910390f35b341561065757fe5b61065f6115cf565b6040518082815260200191505060405180910390f35b341561067d57fe5b61069360048080359060200190919050506115d5565b005b341561069d57fe5b6106b3600480803590602001909190505061168c565b005b34156106bd57fe5b610735600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611871565b6040518082815260200191505060405180910390f35b341561075357fe5b61075b611891565b6040518082815260200191505060405180910390f35b341561077957fe5b610781611896565b6040518082815260200191505060405180910390f35b341561079f57fe5b6107ea600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061189c565b005b34156107f457fe5b61080a6004808035906020019091905050611bc1565b005b60038181548110151561081b57fe5b906000526020600020900160005b915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108895760006000fd5b81600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156108e35760006000fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600091505b600160038054905003821015610a6f578273ffffffffffffffffffffffffffffffffffffffff1660038381548110151561097657fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610a615760036001600380549050038154811015156109d657fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600383815481101515610a1257fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610a6f565b5b8180600101925050610940565b6001600381818054905003915081610a879190611edd565b506003805490506004541115610aa657610aa56003805490506115d5565b5b8273ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405180905060405180910390a25b5b505b5050565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610b4e5760006000fd5b81336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610bba5760006000fd5b836000600082815260200190815260200160002060030160009054906101000a900460ff1615610bea5760006000fd5b60006001600087815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550843373ffffffffffffffffffffffffffffffffffffffff167ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e960405180905060405180910390a35b5b505b50505b5050565b60026020528060005260406000206000915054906101000a900460ff1681565b60016020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60006000600090505b600554811015610d8357838015610d3557506000600082815260200190815260200160002060030160009054906101000a900460ff16155b80610d695750828015610d6857506000600082815260200190815260200160002060030160009054906101000a900460ff165b5b15610d75576001820191505b5b8080600101915050610cfd565b5b5092915050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610dc65760006000fd5b80600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610e1f5760006000fd5b8160008173ffffffffffffffffffffffffffffffffffffffff161415610e455760006000fd5b6001600380549050016004546032821180610e5f57508181115b80610e6a5750600081145b80610e755750600082145b15610e805760006000fd5b6001600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060038054806001018281610eec9190611f09565b916000526020600020900160005b87909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508473ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405180905060405180910390a25b5b50505b505b505b50565b60006000600060009150600090505b60038054905081101561107057600160008581526020019081526020016000206000600383815481101515610fce57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561104f576001820191505b6004548214156110625760019250611071565b5b8080600101915050610f9d565b5b5050919050565b60006000600090505b600380549050811015611141576001600084815260200190815260200160002060006003838154811015156110b257fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611133576001820191505b5b8080600101915050611081565b5b50919050565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600101549080600201908060030160009054906101000a900460ff16905084565b6111ac611f35565b600380548060200260200160405190810160405280929190818152602001828054801561122e57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116111e4575b505050505090505b90565b611241611f49565b611249611f49565b6000600060055460405180591061125d5750595b908082528060200260200182016040525b50925060009150600090505b60055481101561131d578580156112b257506000600082815260200190815260200160002060030160009054906101000a900460ff16155b806112e657508480156112e557506000600082815260200190815260200160002060030160009054906101000a900460ff165b5b1561130f578083838151811015156112fa57fe5b90602001906020020181815250506001820191505b5b808060010191505061127a565b87870360405180591061132d5750595b908082528060200260200182016040525b5093508790505b8681101561139157828181518110151561135b57fe5b906020019060200201518489830381518110151561137557fe5b90602001906020020181815250505b8080600101915050611345565b5b505050949350505050565b6113a5611f35565b6113ad611f35565b600060006003805490506040518059106113c45750595b908082528060200260200182016040525b50925060009150600090505b6003805490508110156115275760016000868152602001908152602001600020600060038381548110151561141257fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156115195760038181548110151561149b57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683838151811015156114d657fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001820191505b5b80806001019150506113e1565b816040518059106115355750595b908082528060200260200182016040525b509350600090505b818110156115c657828181518110151561156457fe5b90602001906020020151848281518110151561157c57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b808060010191505061154e565b5b505050919050565b60055481565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116105760006000fd5b60038054905081603282118061162557508181115b806116305750600081145b8061163b5750600082145b156116465760006000fd5b826004819055507fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a836040518082815260200191505060405180910390a15b5b50505b50565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156116e65760006000fd5b8160006000600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156117425760006000fd5b82336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156117ad5760006000fd5b60016001600087815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550843373ffffffffffffffffffffffffffffffffffffffff167f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef60405180905060405180910390a361186685611bc1565b5b5b50505b505b5050565b600061187e848484611d86565b90506118898161168c565b5b9392505050565b603281565b60045481565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156118d95760006000fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156119335760006000fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561198c5760006000fd5b600092505b600380549050831015611a7a578473ffffffffffffffffffffffffffffffffffffffff166003848154811015156119c457fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611a6c5783600384815481101515611a1d57fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611a7a565b5b8280600101935050611991565b6000600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508473ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405180905060405180910390a28373ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405180905060405180910390a25b5b505b505b505050565b6000816000600082815260200190815260200160002060030160009054906101000a900460ff1615611bf35760006000fd5b611bfc83610f8e565b15611d7f5760006000848152602001908152602001600020915060018260030160006101000a81548160ff0219169083151502179055508160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168260010154836002016040518082805460018160011615610100020316600290048015611cdc5780601f10611cb157610100808354040283529160200191611cdc565b820191906000526020600020905b815481529060010190602001808311611cbf57829003601f168201915b505091505060006040518083038185876185025a03f19250505015611d3057827f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7560405180905060405180910390a2611d7e565b827f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923660405180905060405180910390a260008260030160006101000a81548160ff0219169083151502179055505b5b5b5b505050565b60008360008173ffffffffffffffffffffffffffffffffffffffff161415611dae5760006000fd5b60055491506080604051908101604052808673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001600015158152506000600084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101556040820151816002019080519060200190611e6e929190611f5d565b5060608201518160030160006101000a81548160ff0219169083151502179055509050506001600560008282540192505081905550817fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5160405180905060405180910390a25b5b509392505050565b815481835581811511611f0457818360005260206000209182019101611f039190611fdd565b5b505050565b815481835581811511611f3057818360005260206000209182019101611f2f9190611fdd565b5b505050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611f9e57805160ff1916838001178555611fcc565b82800160010185558215611fcc579182015b82811115611fcb578251825591602001919060010190611fb0565b5b509050611fd99190611fdd565b5090565b611fff91905b80821115611ffb576000816000905550600101611fe3565b5090565b905600a165627a7a723058200a8e23793500b02c6ba5fd192656d8e75bd9e4479e5c539e0b34d50459bf3e560029", - "updated_at": 1517539064795 - } - } -} diff --git a/packages/contracts/artifacts/MultiSigWalletWithTimeLock.json b/packages/contracts/artifacts/MultiSigWalletWithTimeLock.json deleted file mode 100644 index 2c97612ac..000000000 --- a/packages/contracts/artifacts/MultiSigWalletWithTimeLock.json +++ /dev/null @@ -1,600 +0,0 @@ -{ - "contract_name": "MultiSigWalletWithTimeLock", - "networks": { - "50": { - "solc_version": "0.4.10", - "keccak256": "0x73f2aeb4c300248f7c2c851b085e41525007202decc34831880688f1aee6e126", - "optimizer_enabled": 0, - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "owners", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "removeOwner", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "revokeConfirmation", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "isOwner", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "address" - } - ], - "name": "confirmations", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "secondsTimeLocked", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "pending", - "type": "bool" - }, - { - "name": "executed", - "type": "bool" - } - ], - "name": "getTransactionCount", - "outputs": [ - { - "name": "count", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "addOwner", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "isConfirmed", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_secondsTimeLocked", - "type": "uint256" - } - ], - "name": "changeTimeLock", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "getConfirmationCount", - "outputs": [ - { - "name": "count", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "transactions", - "outputs": [ - { - "name": "destination", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - }, - { - "name": "data", - "type": "bytes" - }, - { - "name": "executed", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getOwners", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "from", - "type": "uint256" - }, - { - "name": "to", - "type": "uint256" - }, - { - "name": "pending", - "type": "bool" - }, - { - "name": "executed", - "type": "bool" - } - ], - "name": "getTransactionIds", - "outputs": [ - { - "name": "_transactionIds", - "type": "uint256[]" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "getConfirmations", - "outputs": [ - { - "name": "_confirmations", - "type": "address[]" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "transactionCount", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_required", - "type": "uint256" - } - ], - "name": "changeRequirement", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "confirmTransaction", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "destination", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - }, - { - "name": "data", - "type": "bytes" - } - ], - "name": "submitTransaction", - "outputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "confirmationTimes", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_OWNER_COUNT", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "required", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "newOwner", - "type": "address" - } - ], - "name": "replaceOwner", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "executeTransaction", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "inputs": [ - { - "name": "_owners", - "type": "address[]" - }, - { - "name": "_required", - "type": "uint256" - }, - { - "name": "_secondsTimeLocked", - "type": "uint256" - } - ], - "payable": false, - "type": "constructor" - }, - { - "payable": true, - "type": "fallback" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - }, - { - "indexed": false, - "name": "confirmationTime", - "type": "uint256" - } - ], - "name": "ConfirmationTimeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "secondsTimeLocked", - "type": "uint256" - } - ], - "name": "TimeLockChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Confirmation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Revocation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Submission", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Execution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "ExecutionFailure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - } - ], - "name": "OwnerAddition", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - } - ], - "name": "OwnerRemoval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "required", - "type": "uint256" - } - ], - "name": "RequirementChange", - "type": "event" - } - ], - "unlinked_binary": - "0x606060405234156200000d57fe5b6040516200250138038062002501833981016040528080518201919060200180519060200190919080519060200190919050505b82825b600082518260328211806200005857508181115b80620000645750600081145b80620000705750600082145b156200007c5760006000fd5b600092505b8451831015620001b5576002600086858151811015156200009e57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806200012a5750600085848151811015156200010857fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff16145b15620001365760006000fd5b60016002600087868151811015156200014b57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b828060010193505062000081565b8460039080519060200190620001cd929190620001ed565b50836004819055505b5b5050505050806006819055505b505050620002c2565b82805482825590600052602060002090810192821562000269579160200282015b82811115620002685782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550916020019190600101906200020e565b5b5090506200027891906200027c565b5090565b620002bf91905b80821115620002bb57600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555060010162000283565b5090565b90565b61222f80620002d26000396000f3006060604052361561013c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063025e7c271461019d578063173825d9146101fd57806320ea8d86146102335780632f54bf6e146102535780633411c81c146102a157806337bd78a0146102f8578063547415251461031e5780637065cb481461035f578063784547a7146103955780637ad28c51146103cd5780638b51d13f146103ed5780639ace38c214610421578063a0e67e2b1461051c578063a8abe69a14610591578063b5dc40c314610633578063b77bf600146106b6578063ba51a6df146106dc578063c01a8c84146106fc578063c64274741461071c578063d38f2d82146107b2578063d74f8edd146107e6578063dc8452cd1461080c578063e20056e614610832578063ee22610b14610887575b61019b5b6000341115610198573373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a25b5b565b005b34156101a557fe5b6101bb60048080359060200190919050506108a7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561020557fe5b610231600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108e7565b005b341561023b57fe5b6102516004808035906020019091905050610b8f565b005b341561025b57fe5b610287600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d59565b604051808215151515815260200191505060405180910390f35b34156102a957fe5b6102de600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d79565b604051808215151515815260200191505060405180910390f35b341561030057fe5b610308610da8565b6040518082815260200191505060405180910390f35b341561032657fe5b610349600480803515159060200190919080351515906020019091905050610dae565b6040518082815260200191505060405180910390f35b341561036757fe5b610393600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e45565b005b341561039d57fe5b6103b36004808035906020019091905050611048565b604051808215151515815260200191505060405180910390f35b34156103d557fe5b6103eb6004808035906020019091905050611132565b005b34156103f557fe5b61040b60048080359060200190919050506111b0565b6040518082815260200191505060405180910390f35b341561042957fe5b61043f6004808035906020019091905050611280565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018315151515815260200182810382528481815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561050a5780601f106104df5761010080835404028352916020019161050a565b820191906000526020600020905b8154815290600101906020018083116104ed57829003601f168201915b50509550505050505060405180910390f35b341561052457fe5b61052c6112dc565b604051808060200182810382528381815181526020019150805190602001906020028083836000831461057e575b80518252602083111561057e5760208201915060208101905060208303925061055a565b5050509050019250505060405180910390f35b341561059957fe5b6105ce600480803590602001909190803590602001909190803515159060200190919080351515906020019091905050611371565b6040518080602001828103825283818151815260200191508051906020019060200280838360008314610620575b805182526020831115610620576020820191506020810190506020830392506105fc565b5050509050019250505060405180910390f35b341561063b57fe5b61065160048080359060200190919050506114d5565b60405180806020018281038252838181518152602001915080519060200190602002808383600083146106a3575b8051825260208311156106a35760208201915060208101905060208303925061067f565b5050509050019250505060405180910390f35b34156106be57fe5b6106c6611707565b6040518082815260200191505060405180910390f35b34156106e457fe5b6106fa600480803590602001909190505061170d565b005b341561070457fe5b61071a60048080359060200190919050506117c4565b005b341561072457fe5b61079c600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506119d2565b6040518082815260200191505060405180910390f35b34156107ba57fe5b6107d060048080359060200190919050506119f2565b6040518082815260200191505060405180910390f35b34156107ee57fe5b6107f6611a0a565b6040518082815260200191505060405180910390f35b341561081457fe5b61081c611a0f565b6040518082815260200191505060405180910390f35b341561083a57fe5b610885600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611a15565b005b341561088f57fe5b6108a56004808035906020019091905050611d3a565b005b6003818154811015156108b657fe5b906000526020600020900160005b915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109245760006000fd5b81600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561097e5760006000fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600091505b600160038054905003821015610b0a578273ffffffffffffffffffffffffffffffffffffffff16600383815481101515610a1157fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610afc576003600160038054905003815481101515610a7157fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600383815481101515610aad57fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610b0a565b5b81806001019250506109db565b6001600381818054905003915081610b2291906120de565b506003805490506004541115610b4157610b4060038054905061170d565b5b8273ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405180905060405180910390a25b5b505b5050565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610be95760006000fd5b81336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610c555760006000fd5b836000600082815260200190815260200160002060030160009054906101000a900460ff1615610c855760006000fd5b84610c8f81611048565b151515610c9c5760006000fd5b60006001600088815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550853373ffffffffffffffffffffffffffffffffffffffff167ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e960405180905060405180910390a35b5b505b505b50505b5050565b60026020528060005260406000206000915054906101000a900460ff1681565b60016020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60065481565b60006000600090505b600554811015610e3d57838015610def57506000600082815260200190815260200160002060030160009054906101000a900460ff16155b80610e235750828015610e2257506000600082815260200190815260200160002060030160009054906101000a900460ff165b5b15610e2f576001820191505b5b8080600101915050610db7565b5b5092915050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e805760006000fd5b80600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610ed95760006000fd5b8160008173ffffffffffffffffffffffffffffffffffffffff161415610eff5760006000fd5b6001600380549050016004546032821180610f1957508181115b80610f245750600081145b80610f2f5750600082145b15610f3a5760006000fd5b6001600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060038054806001018281610fa6919061210a565b916000526020600020900160005b87909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508473ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405180905060405180910390a25b5b50505b505b505b50565b60006000600060009150600090505b60038054905081101561112a5760016000858152602001908152602001600020600060038381548110151561108857fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611109576001820191505b60045482141561111c576001925061112b565b5b8080600101915050611057565b5b5050919050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561116d5760006000fd5b806006819055507fd1c9101a34feff75cccef14a28785a0279cb0b49c1f321f21f5f422e746b4377816040518082815260200191505060405180910390a15b5b50565b60006000600090505b600380549050811015611279576001600084815260200190815260200160002060006003838154811015156111ea57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561126b576001820191505b5b80806001019150506111b9565b5b50919050565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600101549080600201908060030160009054906101000a900460ff16905084565b6112e4612136565b600380548060200260200160405190810160405280929190818152602001828054801561136657602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161131c575b505050505090505b90565b61137961214a565b61138161214a565b600060006005546040518059106113955750595b908082528060200260200182016040525b50925060009150600090505b600554811015611455578580156113ea57506000600082815260200190815260200160002060030160009054906101000a900460ff16155b8061141e575084801561141d57506000600082815260200190815260200160002060030160009054906101000a900460ff165b5b156114475780838381518110151561143257fe5b90602001906020020181815250506001820191505b5b80806001019150506113b2565b8787036040518059106114655750595b908082528060200260200182016040525b5093508790505b868110156114c957828181518110151561149357fe5b90602001906020020151848983038151811015156114ad57fe5b90602001906020020181815250505b808060010191505061147d565b5b505050949350505050565b6114dd612136565b6114e5612136565b600060006003805490506040518059106114fc5750595b908082528060200260200182016040525b50925060009150600090505b60038054905081101561165f5760016000868152602001908152602001600020600060038381548110151561154a57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611651576003818154811015156115d357fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838381518110151561160e57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001820191505b5b8080600101915050611519565b8160405180591061166d5750595b908082528060200260200182016040525b509350600090505b818110156116fe57828181518110151561169c57fe5b9060200190602002015184828151811015156116b457fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b8080600101915050611686565b5b505050919050565b60055481565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156117485760006000fd5b60038054905081603282118061175d57508181115b806117685750600081145b806117735750600082145b1561177e5760006000fd5b826004819055507fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a836040518082815260200191505060405180910390a15b5b50505b50565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561181e5760006000fd5b8160006000600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561187a5760006000fd5b82336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156118e55760006000fd5b846118ef81611048565b1515156118fc5760006000fd5b60016001600088815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550853373ffffffffffffffffffffffffffffffffffffffff167f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef60405180905060405180910390a36119b586611048565b156119c5576119c48642611f32565b5b5b5b505b50505b505b5050565b60006119df848484611f87565b90506119ea816117c4565b5b9392505050565b60076020528060005260406000206000915090505481565b603281565b60045481565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a525760006000fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611aac5760006000fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611b055760006000fd5b600092505b600380549050831015611bf3578473ffffffffffffffffffffffffffffffffffffffff16600384815481101515611b3d57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611be55783600384815481101515611b9657fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611bf3565b5b8280600101935050611b0a565b6000600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508473ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405180905060405180910390a28373ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405180905060405180910390a25b5b505b505b505050565b6000816000600082815260200190815260200160002060030160009054906101000a900460ff1615611d6c5760006000fd5b82611d7681611048565b1515611d825760006000fd5b836006546007600083815260200190815260200160002054014210151515611daa5760006000fd5b60006000868152602001908152602001600020935060018460030160006101000a81548160ff0219169083151502179055508360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168460010154856002016040518082805460018160011615610100020316600290048015611e855780601f10611e5a57610100808354040283529160200191611e85565b820191906000526020600020905b815481529060010190602001808311611e6857829003601f168201915b505091505060006040518083038185876185025a03f19250505015611ed957847f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7560405180905060405180910390a2611f27565b847f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923660405180905060405180910390a260008460030160006101000a81548160ff0219169083151502179055505b5b5b505b505b505050565b806007600084815260200190815260200160002081905550817f0b237afe65f1514fd7ea3f923ea4fe792bdd07000a912b6cd1602a8e7f573c8d826040518082815260200191505060405180910390a25b5050565b60008360008173ffffffffffffffffffffffffffffffffffffffff161415611faf5760006000fd5b60055491506080604051908101604052808673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001600015158152506000600084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155604082015181600201908051906020019061206f92919061215e565b5060608201518160030160006101000a81548160ff0219169083151502179055509050506001600560008282540192505081905550817fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5160405180905060405180910390a25b5b509392505050565b8154818355818115116121055781836000526020600020918201910161210491906121de565b5b505050565b8154818355818115116121315781836000526020600020918201910161213091906121de565b5b505050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061219f57805160ff19168380011785556121cd565b828001600101855582156121cd579182015b828111156121cc5782518255916020019190600101906121b1565b5b5090506121da91906121de565b5090565b61220091905b808211156121fc5760008160009055506001016121e4565b5090565b905600a165627a7a7230582038efb3dddde115c814a22908eeab5e492de8fc546bd0b86b0d1c01cde609b9640029", - "updated_at": 1517539066554 - } - } -} diff --git a/packages/contracts/artifacts/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.json b/packages/contracts/artifacts/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.json deleted file mode 100644 index d65371cf2..000000000 --- a/packages/contracts/artifacts/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.json +++ /dev/null @@ -1,648 +0,0 @@ -{ - "contract_name": "MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress", - "networks": { - "50": { - "solc_version": "0.4.10", - "keccak256": "0xda08395db72af1130287a88849e0cf0c895eb7c98e41483df3a4d457ca832910", - "optimizer_enabled": 0, - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "owners", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "removeOwner", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "revokeConfirmation", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "isOwner", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "address" - } - ], - "name": "confirmations", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "secondsTimeLocked", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "pending", - "type": "bool" - }, - { - "name": "executed", - "type": "bool" - } - ], - "name": "getTransactionCount", - "outputs": [ - { - "name": "count", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "data", - "type": "bytes" - } - ], - "name": "isFunctionRemoveAuthorizedAddress", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "executeRemoveAuthorizedAddress", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "addOwner", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "isConfirmed", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_secondsTimeLocked", - "type": "uint256" - } - ], - "name": "changeTimeLock", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "getConfirmationCount", - "outputs": [ - { - "name": "count", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "transactions", - "outputs": [ - { - "name": "destination", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - }, - { - "name": "data", - "type": "bytes" - }, - { - "name": "executed", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getOwners", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "from", - "type": "uint256" - }, - { - "name": "to", - "type": "uint256" - }, - { - "name": "pending", - "type": "bool" - }, - { - "name": "executed", - "type": "bool" - } - ], - "name": "getTransactionIds", - "outputs": [ - { - "name": "_transactionIds", - "type": "uint256[]" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "TOKEN_TRANSFER_PROXY_CONTRACT", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "getConfirmations", - "outputs": [ - { - "name": "_confirmations", - "type": "address[]" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "transactionCount", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_required", - "type": "uint256" - } - ], - "name": "changeRequirement", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "confirmTransaction", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "destination", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - }, - { - "name": "data", - "type": "bytes" - } - ], - "name": "submitTransaction", - "outputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "confirmationTimes", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_OWNER_COUNT", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "required", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "newOwner", - "type": "address" - } - ], - "name": "replaceOwner", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "executeTransaction", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "inputs": [ - { - "name": "_owners", - "type": "address[]" - }, - { - "name": "_required", - "type": "uint256" - }, - { - "name": "_secondsTimeLocked", - "type": "uint256" - }, - { - "name": "_tokenTransferProxy", - "type": "address" - } - ], - "payable": false, - "type": "constructor" - }, - { - "payable": true, - "type": "fallback" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - }, - { - "indexed": false, - "name": "confirmationTime", - "type": "uint256" - } - ], - "name": "ConfirmationTimeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "secondsTimeLocked", - "type": "uint256" - } - ], - "name": "TimeLockChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Confirmation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Revocation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Submission", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Execution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "ExecutionFailure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - } - ], - "name": "OwnerAddition", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - } - ], - "name": "OwnerRemoval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "required", - "type": "uint256" - } - ], - "name": "RequirementChange", - "type": "event" - } - ], - "unlinked_binary": - "0x606060405234156200000d57fe5b60405162002adb38038062002adb833981016040528080518201919060200180519060200190919080519060200190919080519060200190919050505b8383835b82825b600082518260328211806200006557508181115b80620000715750600081145b806200007d5750600082145b15620000895760006000fd5b600092505b8451831015620001c257600260008685815181101515620000ab57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680620001375750600085848151811015156200011557fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff16145b15620001435760006000fd5b60016002600087868151811015156200015857fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b82806001019350506200008e565b8460039080519060200190620001da92919062000240565b50836004819055505b5b5050505050806006819055505b50505080600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5050505062000315565b828054828255906000526020600020908101928215620002bc579160200282015b82811115620002bb5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509160200191906001019062000261565b5b509050620002cb9190620002cf565b5090565b6200031291905b808211156200030e57600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101620002d6565b5090565b90565b6127b680620003256000396000f3006060604052361561015d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063025e7c27146101be578063173825d91461021e57806320ea8d86146102545780632f54bf6e146102745780633411c81c146102c257806337bd78a014610319578063547415251461033f578063553a48fd146103805780635711b311146103f25780637065cb4814610412578063784547a7146104485780637ad28c51146104805780638b51d13f146104a05780639ace38c2146104d4578063a0e67e2b146105cf578063a8abe69a14610644578063add1cbc5146106e6578063b5dc40c314610738578063b77bf600146107bb578063ba51a6df146107e1578063c01a8c8414610801578063c642747414610821578063d38f2d82146108b7578063d74f8edd146108eb578063dc8452cd14610911578063e20056e614610937578063ee22610b1461098c575b6101bc5b60003411156101b9573373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a25b5b565b005b34156101c657fe5b6101dc60048080359060200190919050506109ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561022657fe5b610252600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506109ec565b005b341561025c57fe5b6102726004808035906020019091905050610c94565b005b341561027c57fe5b6102a8600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e5e565b604051808215151515815260200191505060405180910390f35b34156102ca57fe5b6102ff600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e7e565b604051808215151515815260200191505060405180910390f35b341561032157fe5b610329610ead565b6040518082815260200191505060405180910390f35b341561034757fe5b61036a600480803515159060200190919080351515906020019091905050610eb3565b6040518082815260200191505060405180910390f35b341561038857fe5b6103d8600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610f4a565b604051808215151515815260200191505060405180910390f35b34156103fa57fe5b610410600480803590602001909190505061108b565b005b341561041a57fe5b610446600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506113a6565b005b341561045057fe5b61046660048080359060200190919050506115a9565b604051808215151515815260200191505060405180910390f35b341561048857fe5b61049e6004808035906020019091905050611693565b005b34156104a857fe5b6104be6004808035906020019091905050611711565b6040518082815260200191505060405180910390f35b34156104dc57fe5b6104f260048080359060200190919050506117e1565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001831515151581526020018281038252848181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156105bd5780601f10610592576101008083540402835291602001916105bd565b820191906000526020600020905b8154815290600101906020018083116105a057829003601f168201915b50509550505050505060405180910390f35b34156105d757fe5b6105df61183d565b6040518080602001828103825283818151815260200191508051906020019060200280838360008314610631575b8051825260208311156106315760208201915060208101905060208303925061060d565b5050509050019250505060405180910390f35b341561064c57fe5b6106816004808035906020019091908035906020019091908035151590602001909190803515159060200190919050506118d2565b60405180806020018281038252838181518152602001915080519060200190602002808383600083146106d3575b8051825260208311156106d3576020820191506020810190506020830392506106af565b5050509050019250505060405180910390f35b34156106ee57fe5b6106f6611a36565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561074057fe5b6107566004808035906020019091905050611a5c565b60405180806020018281038252838181518152602001915080519060200190602002808383600083146107a8575b8051825260208311156107a857602082019150602081019050602083039250610784565b5050509050019250505060405180910390f35b34156107c357fe5b6107cb611c8e565b6040518082815260200191505060405180910390f35b34156107e957fe5b6107ff6004808035906020019091905050611c94565b005b341561080957fe5b61081f6004808035906020019091905050611d4b565b005b341561082957fe5b6108a1600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611f59565b6040518082815260200191505060405180910390f35b34156108bf57fe5b6108d56004808035906020019091905050611f79565b6040518082815260200191505060405180910390f35b34156108f357fe5b6108fb611f91565b6040518082815260200191505060405180910390f35b341561091957fe5b610921611f96565b6040518082815260200191505060405180910390f35b341561093f57fe5b61098a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611f9c565b005b341561099457fe5b6109aa60048080359060200190919050506122c1565b005b6003818154811015156109bb57fe5b906000526020600020900160005b915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a295760006000fd5b81600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610a835760006000fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600091505b600160038054905003821015610c0f578273ffffffffffffffffffffffffffffffffffffffff16600383815481101515610b1657fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610c01576003600160038054905003815481101515610b7657fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600383815481101515610bb257fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610c0f565b5b8180600101925050610ae0565b6001600381818054905003915081610c279190612665565b506003805490506004541115610c4657610c45600380549050611c94565b5b8273ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405180905060405180910390a25b5b505b5050565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610cee5760006000fd5b81336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610d5a5760006000fd5b836000600082815260200190815260200160002060030160009054906101000a900460ff1615610d8a5760006000fd5b84610d94816115a9565b151515610da15760006000fd5b60006001600088815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550853373ffffffffffffffffffffffffffffffffffffffff167ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e960405180905060405180910390a35b5b505b505b50505b5050565b60026020528060005260406000206000915054906101000a900460ff1681565b60016020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60065481565b60006000600090505b600554811015610f4257838015610ef457506000600082815260200190815260200160002060030160009054906101000a900460ff16155b80610f285750828015610f2757506000600082815260200190815260200160002060030160009054906101000a900460ff165b5b15610f34576001820191505b5b8080600101915050610ebc565b5b5092915050565b60006000600060405180807f72656d6f7665417574686f72697a656441646472657373286164647265737329815250602001905060405180910390209150600090505b600481101561107f578181600481101515610fa457fe5b1a7f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168482815181101515610ff757fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415156110715760006000fd5b5b8080600101915050610f8d565b600192505b5050919050565b6000816000600082815260200190815260200160002060030160009054906101000a900460ff16156110bd5760006000fd5b826110c7816115a9565b15156110d35760006000fd5b836000600060008381526020019081526020016000209050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561116c5760006000fd5b611211816002018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156112075780601f106111dc57610100808354040283529160200191611207565b820191906000526020600020905b8154815290600101906020018083116111ea57829003601f168201915b5050505050610f4a565b151561121d5760006000fd5b60006000878152602001908152602001600020945060018560030160006101000a81548160ff0219169083151502179055508460000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1685600101548660020160405180828054600181600116156101000203166002900480156112f85780601f106112cd576101008083540402835291602001916112f8565b820191906000526020600020905b8154815290600101906020018083116112db57829003601f168201915b505091505060006040518083038185876185025a03f1925050501561134c57857f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7560405180905060405180910390a261139a565b857f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923660405180905060405180910390a260008560030160006101000a81548160ff0219169083151502179055505b5b5b50505b505b505050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156113e15760006000fd5b80600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561143a5760006000fd5b8160008173ffffffffffffffffffffffffffffffffffffffff1614156114605760006000fd5b600160038054905001600454603282118061147a57508181115b806114855750600081145b806114905750600082145b1561149b5760006000fd5b6001600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600380548060010182816115079190612691565b916000526020600020900160005b87909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508473ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405180905060405180910390a25b5b50505b505b505b50565b60006000600060009150600090505b60038054905081101561168b576001600085815260200190815260200160002060006003838154811015156115e957fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561166a576001820191505b60045482141561167d576001925061168c565b5b80806001019150506115b8565b5b5050919050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116ce5760006000fd5b806006819055507fd1c9101a34feff75cccef14a28785a0279cb0b49c1f321f21f5f422e746b4377816040518082815260200191505060405180910390a15b5b50565b60006000600090505b6003805490508110156117da5760016000848152602001908152602001600020600060038381548110151561174b57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156117cc576001820191505b5b808060010191505061171a565b5b50919050565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600101549080600201908060030160009054906101000a900460ff16905084565b6118456126bd565b60038054806020026020016040519081016040528092919081815260200182805480156118c757602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161187d575b505050505090505b90565b6118da6126d1565b6118e26126d1565b600060006005546040518059106118f65750595b908082528060200260200182016040525b50925060009150600090505b6005548110156119b65785801561194b57506000600082815260200190815260200160002060030160009054906101000a900460ff16155b8061197f575084801561197e57506000600082815260200190815260200160002060030160009054906101000a900460ff165b5b156119a85780838381518110151561199357fe5b90602001906020020181815250506001820191505b5b8080600101915050611913565b8787036040518059106119c65750595b908082528060200260200182016040525b5093508790505b86811015611a2a5782818151811015156119f457fe5b9060200190602002015184898303815181101515611a0e57fe5b90602001906020020181815250505b80806001019150506119de565b5b505050949350505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611a646126bd565b611a6c6126bd565b60006000600380549050604051805910611a835750595b908082528060200260200182016040525b50925060009150600090505b600380549050811015611be657600160008681526020019081526020016000206000600383815481101515611ad157fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611bd857600381815481101515611b5a57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168383815181101515611b9557fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001820191505b5b8080600101915050611aa0565b81604051805910611bf45750595b908082528060200260200182016040525b509350600090505b81811015611c85578281815181101515611c2357fe5b906020019060200201518482815181101515611c3b57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b8080600101915050611c0d565b5b505050919050565b60055481565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611ccf5760006000fd5b600380549050816032821180611ce457508181115b80611cef5750600081145b80611cfa5750600082145b15611d055760006000fd5b826004819055507fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a836040518082815260200191505060405180910390a15b5b50505b50565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611da55760006000fd5b8160006000600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611e015760006000fd5b82336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611e6c5760006000fd5b84611e76816115a9565b151515611e835760006000fd5b60016001600088815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550853373ffffffffffffffffffffffffffffffffffffffff167f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef60405180905060405180910390a3611f3c866115a9565b15611f4c57611f4b86426124b9565b5b5b5b505b50505b505b5050565b6000611f6684848461250e565b9050611f7181611d4b565b5b9392505050565b60076020528060005260406000206000915090505481565b603281565b60045481565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611fd95760006000fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156120335760006000fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561208c5760006000fd5b600092505b60038054905083101561217a578473ffffffffffffffffffffffffffffffffffffffff166003848154811015156120c457fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561216c578360038481548110151561211d57fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061217a565b5b8280600101935050612091565b6000600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508473ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405180905060405180910390a28373ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405180905060405180910390a25b5b505b505b505050565b6000816000600082815260200190815260200160002060030160009054906101000a900460ff16156122f35760006000fd5b826122fd816115a9565b15156123095760006000fd5b8360065460076000838152602001908152602001600020540142101515156123315760006000fd5b60006000868152602001908152602001600020935060018460030160006101000a81548160ff0219169083151502179055508360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16846001015485600201604051808280546001816001161561010002031660029004801561240c5780601f106123e15761010080835404028352916020019161240c565b820191906000526020600020905b8154815290600101906020018083116123ef57829003601f168201915b505091505060006040518083038185876185025a03f1925050501561246057847f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7560405180905060405180910390a26124ae565b847f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923660405180905060405180910390a260008460030160006101000a81548160ff0219169083151502179055505b5b5b505b505b505050565b806007600084815260200190815260200160002081905550817f0b237afe65f1514fd7ea3f923ea4fe792bdd07000a912b6cd1602a8e7f573c8d826040518082815260200191505060405180910390a25b5050565b60008360008173ffffffffffffffffffffffffffffffffffffffff1614156125365760006000fd5b60055491506080604051908101604052808673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001600015158152506000600084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020190805190602001906125f69291906126e5565b5060608201518160030160006101000a81548160ff0219169083151502179055509050506001600560008282540192505081905550817fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5160405180905060405180910390a25b5b509392505050565b81548183558181151161268c5781836000526020600020918201910161268b9190612765565b5b505050565b8154818355818115116126b8578183600052602060002091820191016126b79190612765565b5b505050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061272657805160ff1916838001178555612754565b82800160010185558215612754579182015b82811115612753578251825591602001919060010190612738565b5b5090506127619190612765565b5090565b61278791905b8082111561278357600081600090555060010161276b565b5090565b905600a165627a7a72305820e460b58d5bd3a5224257358a24e4e34b192e61ef5ebd051c779a5117c38a2a060029", - "updated_at": 1517539075978 - } - } -} diff --git a/packages/contracts/artifacts/Ownable.json b/packages/contracts/artifacts/Ownable.json deleted file mode 100644 index 5a2a84a6d..000000000 --- a/packages/contracts/artifacts/Ownable.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "contract_name": "Ownable", - "networks": { - "50": { - "solc_version": "0.4.18", - "keccak256": "0x04e5204925913f5ff6b8193f4ab38eef9d53fc9a553f1a737924fc69db492a99", - "optimizer_enabled": 0, - "abi": [ - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "unlinked_binary": - "0x6060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102058061005e6000396000f30060606040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638da5cb5b14610051578063f2fde38b146100a6575b600080fd5b341561005c57600080fd5b6100646100df565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100b157600080fd5b6100dd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610104565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561015f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156101d657806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b505600a165627a7a723058202c25abe7564c2f872e2f210a96faa6c7691055d67e9a3edd56dcef376c646e170029", - "updated_at": 1517509621376 - } - } -} diff --git a/packages/contracts/artifacts/Ownable_v1.json b/packages/contracts/artifacts/Ownable_v1.json deleted file mode 100644 index 250952533..000000000 --- a/packages/contracts/artifacts/Ownable_v1.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "contract_name": "Ownable_v1", - "networks": { - "50": { - "solc_version": "0.4.11", - "keccak256": "0x82a6595d8d4c3c9cd44ef0fd8f77528195c35c8173970d2b119374f5d74332f4", - "optimizer_enabled": 0, - "abi": [ - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "inputs": [], - "payable": false, - "type": "constructor" - } - ], - "unlinked_binary": - "0x6060604052341561000c57fe5b5b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b6101fa8061005f6000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638da5cb5b14610046578063f2fde38b14610098575bfe5b341561004e57fe5b6100566100ce565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100a057fe5b6100cc600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506100f4565b005b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156101515760006000fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156101c95780600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b5b505600a165627a7a723058201bce811586dc86b1fc25fa9779089c5bf0b5d2cf9e981a580ef44253300866520029", - "updated_at": 1517535966230 - } - } -} diff --git a/packages/contracts/artifacts/SafeMath.json b/packages/contracts/artifacts/SafeMath.json deleted file mode 100644 index cbe88bef6..000000000 --- a/packages/contracts/artifacts/SafeMath.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "contract_name": "SafeMath", - "networks": { - "50": { - "solc_version": "0.4.18", - "keccak256": "0xb1d52f567a893c86f452bd80fbb6907d992046a31b35830bc779116d23fd5549", - "optimizer_enabled": 0, - "abi": [], - "unlinked_binary": - "0x60606040523415600e57600080fd5b603580601b6000396000f3006060604052600080fd00a165627a7a723058206526256c7c1e7d1d1b2df1caefcbd76717428d6237de37aacbb5097658456b720029", - "updated_at": 1517509621492 - } - } -} diff --git a/packages/contracts/artifacts/SafeMath_v1.json b/packages/contracts/artifacts/SafeMath_v1.json deleted file mode 100644 index bad4834c0..000000000 --- a/packages/contracts/artifacts/SafeMath_v1.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "contract_name": "SafeMath_v1", - "networks": { - "50": { - "solc_version": "0.4.11", - "keccak256": "0xd2c1f0518a23e63d5892f66e7b8d228c7486495b139a0f3b049f6ba7803c892d", - "optimizer_enabled": 0, - "abi": [], - "unlinked_binary": - "0x60606040523415600b57fe5b5b60338060196000396000f30060606040525bfe00a165627a7a72305820acbb91f6e4b200e929056917b84223c3fedbdeca5c35f7bf9292edf2a8ee4aa00029", - "updated_at": 1517509621851 - } - } -} diff --git a/packages/contracts/artifacts/Token.json b/packages/contracts/artifacts/Token.json deleted file mode 100644 index 601facc28..000000000 --- a/packages/contracts/artifacts/Token.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "contract_name": "Token", - "networks": { - "50": { - "solc_version": "0.4.18", - "keccak256": "0xe43382be55ddb9c7a28567b4cc59e35072da198e6c49a90ff1396aa8399fd61e", - "optimizer_enabled": 0, - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "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" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_spender", - "type": "address" - }, - { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } - ], - "unlinked_binary": - "0x6060604052341561000f57600080fd5b6102ac8061001e6000396000f30060606040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007257806323b872dd146100cc57806370a0823114610145578063a9059cbb14610192578063dd62ed3e146101ec575b600080fd5b341561007d57600080fd5b6100b2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610258565b604051808215151515815260200191505060405180910390f35b34156100d757600080fd5b61012b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610260565b604051808215151515815260200191505060405180910390f35b341561015057600080fd5b61017c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610269565b6040518082815260200191505060405180910390f35b341561019d57600080fd5b6101d2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610270565b604051808215151515815260200191505060405180910390f35b34156101f757600080fd5b610242600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610278565b6040518082815260200191505060405180910390f35b600092915050565b60009392505050565b6000919050565b600092915050565b6000929150505600a165627a7a723058201ef98a5ecc619c89a935fee340b114a09fe44aa51aa765f4037dd3423f49d42d0029", - "updated_at": 1517509619496 - } - } -} diff --git a/packages/contracts/artifacts/TokenRegistry.json b/packages/contracts/artifacts/TokenRegistry.json deleted file mode 100644 index b4264430b..000000000 --- a/packages/contracts/artifacts/TokenRegistry.json +++ /dev/null @@ -1,540 +0,0 @@ -{ - "contract_name": "TokenRegistry", - "networks": { - "50": { - "solc_version": "0.4.11", - "keccak256": "0xfaf2e3107cfafb9925c2ce51653c3f636bffff9e6528cc61c6341a3e27ca3c6b", - "optimizer_enabled": 0, - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "_token", - "type": "address" - }, - { - "name": "_index", - "type": "uint256" - } - ], - "name": "removeToken", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_name", - "type": "string" - } - ], - "name": "getTokenAddressByName", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_symbol", - "type": "string" - } - ], - "name": "getTokenAddressBySymbol", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_token", - "type": "address" - }, - { - "name": "_swarmHash", - "type": "bytes" - } - ], - "name": "setTokenSwarmHash", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_token", - "type": "address" - } - ], - "name": "getTokenMetaData", - "outputs": [ - { - "name": "", - "type": "address" - }, - { - "name": "", - "type": "string" - }, - { - "name": "", - "type": "string" - }, - { - "name": "", - "type": "uint8" - }, - { - "name": "", - "type": "bytes" - }, - { - "name": "", - "type": "bytes" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_token", - "type": "address" - }, - { - "name": "_name", - "type": "string" - }, - { - "name": "_symbol", - "type": "string" - }, - { - "name": "_decimals", - "type": "uint8" - }, - { - "name": "_ipfsHash", - "type": "bytes" - }, - { - "name": "_swarmHash", - "type": "bytes" - } - ], - "name": "addToken", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_token", - "type": "address" - }, - { - "name": "_name", - "type": "string" - } - ], - "name": "setTokenName", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "tokens", - "outputs": [ - { - "name": "token", - "type": "address" - }, - { - "name": "name", - "type": "string" - }, - { - "name": "symbol", - "type": "string" - }, - { - "name": "decimals", - "type": "uint8" - }, - { - "name": "ipfsHash", - "type": "bytes" - }, - { - "name": "swarmHash", - "type": "bytes" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "tokenAddresses", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_name", - "type": "string" - } - ], - "name": "getTokenByName", - "outputs": [ - { - "name": "", - "type": "address" - }, - { - "name": "", - "type": "string" - }, - { - "name": "", - "type": "string" - }, - { - "name": "", - "type": "uint8" - }, - { - "name": "", - "type": "bytes" - }, - { - "name": "", - "type": "bytes" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTokenAddresses", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_token", - "type": "address" - }, - { - "name": "_ipfsHash", - "type": "bytes" - } - ], - "name": "setTokenIpfsHash", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_symbol", - "type": "string" - } - ], - "name": "getTokenBySymbol", - "outputs": [ - { - "name": "", - "type": "address" - }, - { - "name": "", - "type": "string" - }, - { - "name": "", - "type": "string" - }, - { - "name": "", - "type": "uint8" - }, - { - "name": "", - "type": "bytes" - }, - { - "name": "", - "type": "bytes" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_token", - "type": "address" - }, - { - "name": "_symbol", - "type": "string" - } - ], - "name": "setTokenSymbol", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "name", - "type": "string" - }, - { - "indexed": false, - "name": "symbol", - "type": "string" - }, - { - "indexed": false, - "name": "decimals", - "type": "uint8" - }, - { - "indexed": false, - "name": "ipfsHash", - "type": "bytes" - }, - { - "indexed": false, - "name": "swarmHash", - "type": "bytes" - } - ], - "name": "LogAddToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "name", - "type": "string" - }, - { - "indexed": false, - "name": "symbol", - "type": "string" - }, - { - "indexed": false, - "name": "decimals", - "type": "uint8" - }, - { - "indexed": false, - "name": "ipfsHash", - "type": "bytes" - }, - { - "indexed": false, - "name": "swarmHash", - "type": "bytes" - } - ], - "name": "LogRemoveToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "oldName", - "type": "string" - }, - { - "indexed": false, - "name": "newName", - "type": "string" - } - ], - "name": "LogTokenNameChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "oldSymbol", - "type": "string" - }, - { - "indexed": false, - "name": "newSymbol", - "type": "string" - } - ], - "name": "LogTokenSymbolChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "oldIpfsHash", - "type": "bytes" - }, - { - "indexed": false, - "name": "newIpfsHash", - "type": "bytes" - } - ], - "name": "LogTokenIpfsHashChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "oldSwarmHash", - "type": "bytes" - }, - { - "indexed": false, - "name": "newSwarmHash", - "type": "bytes" - } - ], - "name": "LogTokenSwarmHashChange", - "type": "event" - } - ], - "unlinked_binary": - "0x60606040525b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b613bf5806100576000396000f300606060405236156100e4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806313baf1e6146100e65780632fbfeba9146101255780633550b6d9146101bf57806356318820146102595780637abccac9146102d25780638da5cb5b1461053d578063a880319d1461058f578063c370c86d146106dd578063e486033914610756578063e5df8b84146109fd578063e73fc0c314610a5d578063ee8c24b814610cec578063eef05f6514610d61578063efa74f1f14610dda578063f036417f14611069578063f2fde38b146110e2575bfe5b34156100ee57fe5b610123600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611118565b005b341561012d57fe5b61017d600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611836565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101c757fe5b610217600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506118ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561026157fe5b6102d0600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061195e565b005b34156102da57fe5b610306600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611c0e565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018660ff1660ff168152602001806020018060200185810385528a81815181526020019150805190602001908083836000831461039f575b80518252602083111561039f5760208201915060208101905060208303925061037b565b505050905090810190601f1680156103cb5780820380516001836020036101000a031916815260200191505b50858103845289818151815260200191508051906020019080838360008314610413575b805182526020831115610413576020820191506020810190506020830392506103ef565b505050905090810190601f16801561043f5780820380516001836020036101000a031916815260200191505b50858103835287818151815260200191508051906020019080838360008314610487575b80518252602083111561048757602082019150602081019050602083039250610463565b505050905090810190601f1680156104b35780820380516001836020036101000a031916815260200191505b508581038252868181518152602001915080519060200190808383600083146104fb575b8051825260208311156104fb576020820191506020810190506020830392506104d7565b505050905090810190601f1680156105275780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b341561054557fe5b61054d611fc3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561059757fe5b6106db600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803560ff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611fe9565b005b34156106e557fe5b610754600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061281a565b005b341561075e57fe5b61078a600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612cd1565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018660ff1660ff168152602001806020018060200185810385528a81815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561085d5780601f106108325761010080835404028352916020019161085d565b820191906000526020600020905b81548152906001019060200180831161084057829003601f168201915b50508581038452898181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156108e05780601f106108b5576101008083540402835291602001916108e0565b820191906000526020600020905b8154815290600101906020018083116108c357829003601f168201915b50508581038352878181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156109635780601f1061093857610100808354040283529160200191610963565b820191906000526020600020905b81548152906001019060200180831161094657829003601f168201915b50508581038252868181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156109e65780601f106109bb576101008083540402835291602001916109e6565b820191906000526020600020905b8154815290600101906020018083116109c957829003601f168201915b50509a505050505050505050505060405180910390f35b3415610a0557fe5b610a1b6004808035906020019091905050612d36565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610a6557fe5b610ab5600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612d76565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018660ff1660ff168152602001806020018060200185810385528a818151815260200191508051906020019080838360008314610b4e575b805182526020831115610b4e57602082019150602081019050602083039250610b2a565b505050905090810190601f168015610b7a5780820380516001836020036101000a031916815260200191505b50858103845289818151815260200191508051906020019080838360008314610bc2575b805182526020831115610bc257602082019150602081019050602083039250610b9e565b505050905090810190601f168015610bee5780820380516001836020036101000a031916815260200191505b50858103835287818151815260200191508051906020019080838360008314610c36575b805182526020831115610c3657602082019150602081019050602083039250610c12565b505050905090810190601f168015610c625780820380516001836020036101000a031916815260200191505b50858103825286818151815260200191508051906020019080838360008314610caa575b805182526020831115610caa57602082019150602081019050602083039250610c86565b505050905090810190601f168015610cd65780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b3415610cf457fe5b610cfc612e48565b6040518080602001828103825283818151815260200191508051906020019060200280838360008314610d4e575b805182526020831115610d4e57602082019150602081019050602083039250610d2a565b5050509050019250505060405180910390f35b3415610d6957fe5b610dd8600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612edd565b005b3415610de257fe5b610e32600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061318d565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018660ff1660ff168152602001806020018060200185810385528a818151815260200191508051906020019080838360008314610ecb575b805182526020831115610ecb57602082019150602081019050602083039250610ea7565b505050905090810190601f168015610ef75780820380516001836020036101000a031916815260200191505b50858103845289818151815260200191508051906020019080838360008314610f3f575b805182526020831115610f3f57602082019150602081019050602083039250610f1b565b505050905090810190601f168015610f6b5780820380516001836020036101000a031916815260200191505b50858103835287818151815260200191508051906020019080838360008314610fb3575b805182526020831115610fb357602082019150602081019050602083039250610f8f565b505050905090810190601f168015610fdf5780820380516001836020036101000a031916815260200191505b50858103825286818151815260200191508051906020019080838360008314611027575b80518252602083111561102757602082019150602081019050602083039250611003565b505050905090810190601f1680156110535780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b341561107157fe5b6110e0600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061325f565b005b34156110ea57fe5b611116600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050613716565b005b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156111775760006000fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515156112175760006000fd5b8373ffffffffffffffffffffffffffffffffffffffff1660048481548110151561123d57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561128d5760006000fd5b60046001600480549050038154811015156112a457fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff166004848154811015156112e057fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160048181805490500391508161134291906137f0565b50600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091508160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f32c54f1e2ea75844ded7517e7dbcd3895da7cd0c28f9ab9f9cf6ecf5f83762c683600101846002018560030160009054906101000a900460ff1686600401876005016040518080602001806020018660ff1660ff168152602001806020018060200185810385528a8181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156114a35780601f10611478576101008083540402835291602001916114a3565b820191906000526020600020905b81548152906001019060200180831161148657829003601f168201915b50508581038452898181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156115265780601f106114fb57610100808354040283529160200191611526565b820191906000526020600020905b81548152906001019060200180831161150957829003601f168201915b50508581038352878181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156115a95780601f1061157e576101008083540402835291602001916115a9565b820191906000526020600020905b81548152906001019060200180831161158c57829003601f168201915b505085810382528681815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561162c5780601f106116015761010080835404028352916020019161162c565b820191906000526020600020905b81548152906001019060200180831161160f57829003601f168201915b5050995050505050505050505060405180910390a260028260020160405180828054600181600116156101000203166002900480156116a25780601f106116805761010080835404028352918201916116a2565b820191906000526020600020905b81548152906001019060200180831161168e575b5050915050908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560038260010160405180828054600181600116156101000203166002900480156117395780601f10611717576101008083540402835291820191611739565b820191906000526020600020905b815481529060010190602001808311611725575b5050915050908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160006117e7919061381c565b6002820160006117f7919061381c565b6003820160006101000a81549060ff021916905560048201600061181b9190613864565b60058201600061182b9190613864565b50505b5b505b505050565b60006003826040518082805190602001908083835b6020831061186e578051825260208201915060208101905060208303925061184b565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b919050565b60006002826040518082805190602001908083835b6020831061190257805182526020820191506020810190506020830392506118df565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156119bd5760006000fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515611a5d5760006000fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091508373ffffffffffffffffffffffffffffffffffffffff167fc3168fdc13112e44a031057dbf6c609b33353addb4d8037d24543e22cbfe2acd8360050185604051808060200180602001838103835285818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015611b685780601f10611b3d57610100808354040283529160200191611b68565b820191906000526020600020905b815481529060010190602001808311611b4b57829003601f168201915b5050838103825284818151815260200191508051906020019080838360008314611bb1575b805182526020831115611bb157602082019150602081019050602083039250611b8d565b505050905090810190601f168015611bdd5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a282826005019080519060200190611c049291906138ac565b505b5b505b505050565b6000611c1861392c565b611c2061392c565b6000611c2a613940565b611c32613940565b611c3a613954565b600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060c060405190810160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611d745780601f10611d4957610100808354040283529160200191611d74565b820191906000526020600020905b815481529060010190602001808311611d5757829003601f168201915b50505050508152602001600282018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611e165780601f10611deb57610100808354040283529160200191611e16565b820191906000526020600020905b815481529060010190602001808311611df957829003601f168201915b505050505081526020016003820160009054906101000a900460ff1660ff1660ff168152602001600482018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611ed55780601f10611eaa57610100808354040283529160200191611ed5565b820191906000526020600020905b815481529060010190602001808311611eb857829003601f168201915b50505050508152602001600582018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611f775780601f10611f4c57610100808354040283529160200191611f77565b820191906000526020600020905b815481529060010190602001808311611f5a57829003601f168201915b5050505050815250509050806000015181602001518260400151836060015184608001518560a001518494508393508191508090509650965096509650965096505b5091939550919395565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156120465760006000fd5b85600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156120e55760006000fd5b86600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156121235760006000fd5b85600073ffffffffffffffffffffffffffffffffffffffff166002826040518082805190602001908083835b60208310612172578051825260208201915060208101905060208303925061214f565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156121e95760006000fd5b87600073ffffffffffffffffffffffffffffffffffffffff166003826040518082805190602001908083835b602083106122385780518252602082019150602081019050602083039250612215565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156122af5760006000fd5b60c0604051908101604052808b73ffffffffffffffffffffffffffffffffffffffff1681526020018a81526020018981526020018860ff16815260200187815260200186815250600160008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010190805190602001906123989291906139bc565b5060408201518160020190805190602001906123b59291906139bc565b5060608201518160030160006101000a81548160ff021916908360ff16021790555060808201518160040190805190602001906123f3929190613a3c565b5060a0820151816005019080519060200190612410929190613a3c565b50905050600480548060010182816124289190613abc565b916000526020600020900160005b8c909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050896002896040518082805190602001908083835b602083106124af578051825260208201915060208101905060208303925061248c565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508960038a6040518082805190602001908083835b602083106125575780518252602082019150602081019050602083039250612534565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508973ffffffffffffffffffffffffffffffffffffffff167fd8d928b0b50ca11d9dc273236b46f3526515b03602f71f3a6af4f45bd9fa91448a8a8a8a8a6040518080602001806020018660ff1660ff168152602001806020018060200185810385528a81815181526020019150805190602001908083836000831461266c575b80518252602083111561266c57602082019150602081019050602083039250612648565b505050905090810190601f1680156126985780820380516001836020036101000a031916815260200191505b508581038452898181518152602001915080519060200190808383600083146126e0575b8051825260208311156126e0576020820191506020810190506020830392506126bc565b505050905090810190601f16801561270c5780820380516001836020036101000a031916815260200191505b50858103835287818151815260200191508051906020019080838360008314612754575b80518252602083111561275457602082019150602081019050602083039250612730565b505050905090810190601f1680156127805780820380516001836020036101000a031916815260200191505b508581038252868181518152602001915080519060200190808383600083146127c8575b8051825260208311156127c8576020820191506020810190506020830392506127a4565b505050905090810190601f1680156127f45780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390a25b5b505b505b505b505b505050505050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156128795760006000fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515156129195760006000fd5b82600073ffffffffffffffffffffffffffffffffffffffff166003826040518082805190602001908083835b602083106129685780518252602082019150602081019050602083039250612945565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156129df5760006000fd5b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002092508473ffffffffffffffffffffffffffffffffffffffff167f4a6dbfc867b179991dec22ff19960f0a94d8d9d891fc556f547764670340e8ae8460010186604051808060200180602001838103835285818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015612aea5780601f10612abf57610100808354040283529160200191612aea565b820191906000526020600020905b815481529060010190602001808311612acd57829003601f168201915b5050838103825284818151815260200191508051906020019080838360008314612b33575b805182526020831115612b3357602082019150602081019050602083039250612b0f565b505050905090810190601f168015612b5f5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a26003836001016040518082805460018160011615610100020316600290048015612bcf5780601f10612bad576101008083540402835291820191612bcf565b820191906000526020600020905b815481529060010190602001808311612bbb575b5050915050908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055846003856040518082805190602001908083835b60208310612c3c5780518252602082019150602081019050602083039250612c19565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083836001019080519060200190612cc5929190613ae8565b505b5b505b505b505050565b60016020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806001019080600201908060030160009054906101000a900460ff1690806004019080600501905086565b600481815481101515612d4557fe5b906000526020600020900160005b915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000612d8061392c565b612d8861392c565b6000612d92613940565b612d9a613940565b60006003886040518082805190602001908083835b60208310612dd25780518252602082019150602081019050602083039250612daf565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612e3181611c0e565b9650965096509650965096505b5091939550919395565b612e50613b68565b6004805480602002602001604051908101604052809291908181526020018280548015612ed257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612e88575b505050505090505b90565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612f3c5760006000fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515612fdc5760006000fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091508373ffffffffffffffffffffffffffffffffffffffff167f5b19f79ac4e8cfa820815502e11615f1a449e28155dc289ec5cac1a11f90869483600401856040518080602001806020018381038352858181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156130e75780601f106130bc576101008083540402835291602001916130e7565b820191906000526020600020905b8154815290600101906020018083116130ca57829003601f168201915b5050838103825284818151815260200191508051906020019080838360008314613130575b8051825260208311156131305760208201915060208101905060208303925061310c565b505050905090810190601f16801561315c5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a2828260040190805190602001906131839291906138ac565b505b5b505b505050565b600061319761392c565b61319f61392c565b60006131a9613940565b6131b1613940565b60006002886040518082805190602001908083835b602083106131e957805182526020820191506020810190506020830392506131c6565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061324881611c0e565b9650965096509650965096505b5091939550919395565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156132be5760006000fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561335e5760006000fd5b82600073ffffffffffffffffffffffffffffffffffffffff166002826040518082805190602001908083835b602083106133ad578051825260208201915060208101905060208303925061338a565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156134245760006000fd5b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002092508473ffffffffffffffffffffffffffffffffffffffff167f53d878a6530e56c9bc96548fa0a8cae4f1d1f49c86b0e934c086b992ebb6998f846002018660405180806020018060200183810383528581815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561352f5780601f106135045761010080835404028352916020019161352f565b820191906000526020600020905b81548152906001019060200180831161351257829003601f168201915b5050838103825284818151815260200191508051906020019080838360008314613578575b80518252602083111561357857602082019150602081019050602083039250613554565b505050905090810190601f1680156135a45780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a260028360020160405180828054600181600116156101000203166002900480156136145780601f106135f2576101008083540402835291820191613614565b820191906000526020600020905b815481529060010190602001808311613600575b5050915050908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055846002856040518082805190602001908083835b60208310613681578051825260208201915060208101905060208303925061365e565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508383600201908051906020019061370a929190613ae8565b505b5b505b505b505050565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156137735760006000fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156137eb5780600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b5b50565b815481835581811511613817578183600052602060002091820191016138169190613b7c565b5b505050565b50805460018160011615610100020316600290046000825580601f106138425750613861565b601f0160209004906000526020600020908101906138609190613b7c565b5b50565b50805460018160011615610100020316600290046000825580601f1061388a57506138a9565b601f0160209004906000526020600020908101906138a89190613b7c565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106138ed57805160ff191683800117855561391b565b8280016001018555821561391b579182015b8281111561391a5782518255916020019190600101906138ff565b5b5090506139289190613b7c565b5090565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b60c060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001613985613ba1565b8152602001613992613ba1565b8152602001600060ff1681526020016139a9613bb5565b81526020016139b6613bb5565b81525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106139fd57805160ff1916838001178555613a2b565b82800160010185558215613a2b579182015b82811115613a2a578251825591602001919060010190613a0f565b5b509050613a389190613b7c565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613a7d57805160ff1916838001178555613aab565b82800160010185558215613aab579182015b82811115613aaa578251825591602001919060010190613a8f565b5b509050613ab89190613b7c565b5090565b815481835581811511613ae357818360005260206000209182019101613ae29190613b7c565b5b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613b2957805160ff1916838001178555613b57565b82800160010185558215613b57579182015b82811115613b56578251825591602001919060010190613b3b565b5b509050613b649190613b7c565b5090565b602060405190810160405280600081525090565b613b9e91905b80821115613b9a576000816000905550600101613b82565b5090565b90565b602060405190810160405280600081525090565b6020604051908101604052806000815250905600a165627a7a723058205f678f4c4175704443c6f7559c12ec6da458722d31ecf0b25fd93fee8b930a820029", - "updated_at": 1517538622222 - } - } -} diff --git a/packages/contracts/artifacts/TokenTransferProxy.json b/packages/contracts/artifacts/TokenTransferProxy.json deleted file mode 100644 index 1815458f8..000000000 --- a/packages/contracts/artifacts/TokenTransferProxy.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "contract_name": "TokenTransferProxy", - "networks": { - "50": { - "solc_version": "0.4.11", - "keccak256": "0xf376b57d58b01cb4e9c70a03a1ab6b06bc61d7eb4714bc360dd063c08028453a", - "optimizer_enabled": 0, - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "token", - "type": "address" - }, - { - "name": "from", - "type": "address" - }, - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "target", - "type": "address" - } - ], - "name": "addAuthorizedAddress", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "authorities", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "target", - "type": "address" - } - ], - "name": "removeAuthorizedAddress", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "authorized", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getAuthorizedAddresses", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "target", - "type": "address" - }, - { - "indexed": true, - "name": "caller", - "type": "address" - } - ], - "name": "LogAuthorizedAddressAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "target", - "type": "address" - }, - { - "indexed": true, - "name": "caller", - "type": "address" - } - ], - "name": "LogAuthorizedAddressRemoved", - "type": "event" - } - ], - "unlinked_binary": - "0x60606040525b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b610bd6806100576000396000f3006060604052361561008c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806315dacbea1461008e57806342f1181e14610123578063494503d41461015957806370712939146101b95780638da5cb5b146101ef578063b918161114610241578063d39de6e91461028f578063f2fde38b14610304575bfe5b341561009657fe5b610109600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061033a565b604051808215151515815260200191505060405180910390f35b341561012b57fe5b610157600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610495565b005b341561016157fe5b610177600480803590602001909190505061066d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101c157fe5b6101ed600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106ad565b005b34156101f757fe5b6101ff610964565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561024957fe5b610275600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061098a565b604051808215151515815260200191505060405180910390f35b341561029757fe5b61029f6109aa565b60405180806020018281038252838181518152602001915080519060200190602002808383600083146102f1575b8051825260208311156102f1576020820191506020810190506020830392506102cd565b5050509050019250505060405180910390f35b341561030c57fe5b610338600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a3f565b005b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156103955760006000fd5b8473ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b151561047157fe5b6102c65a03f1151561047f57fe5b5050506040518051905090505b5b949350505050565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156104f25760006000fd5b80600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561054d5760006000fd5b6001600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600280548060010182816105b99190610b19565b916000526020600020900160005b84909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f94bb87f4c15c4587ff559a7584006fa01ddf9299359be6b512b94527aa961aca60405180905060405180910390a35b5b505b50565b60028181548110151561067c57fe5b906000526020600020900160005b915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561070c5760006000fd5b81600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156107665760006000fd5b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff0219169055600091505b6002805490508210156108ff578273ffffffffffffffffffffffffffffffffffffffff166002838154811015156107ed57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156108f157600260016002805490500381548110151561084d57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660028381548110151561088957fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016002818180549050039150816108eb9190610b45565b506108ff565b5b81806001019250506107ba565b3373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167ff5b347a1e40749dd050f5f07fbdbeb7e3efa9756903044dd29401fd1d4bb4a1c60405180905060405180910390a35b5b505b5050565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900460ff1681565b6109b2610b71565b6002805480602002602001604051908101604052809291908181526020018280548015610a3457602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116109ea575b505050505090505b90565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a9c5760006000fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515610b145780600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b5b50565b815481835581811511610b4057818360005260206000209182019101610b3f9190610b85565b5b505050565b815481835581811511610b6c57818360005260206000209182019101610b6b9190610b85565b5b505050565b602060405190810160405280600081525090565b610ba791905b80821115610ba3576000816000905550600101610b8b565b5090565b905600a165627a7a723058202a39ecce7fa8d2726ee124023aeec7f2d5ceb1ff5dbd623d87305279af329a530029", - "updated_at": 1517535966171 - } - } -} diff --git a/packages/contracts/artifacts/Token_v1.json b/packages/contracts/artifacts/Token_v1.json deleted file mode 100644 index a2f3f6a24..000000000 --- a/packages/contracts/artifacts/Token_v1.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "contract_name": "Token_v1", - "networks": { - "50": { - "solc_version": "0.4.11", - "keccak256": "0x35a82bc7bc0994caa97f8ea44660b9b5e796acfe72705b5ff7ed8f2a3c47ff37", - "optimizer_enabled": 0, - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "success", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "supply", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "success", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "balance", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "success", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "remaining", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "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" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_spender", - "type": "address" - }, - { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } - ], - "unlinked_binary": - "0x6060604052341561000c57fe5b5b6102d48061001c6000396000f30060606040523615610076576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007857806318160ddd146100cf57806323b872dd146100f557806370a082311461016b578063a9059cbb146101b5578063dd62ed3e1461020c575bfe5b341561008057fe5b6100b5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610275565b604051808215151515815260200191505060405180910390f35b34156100d757fe5b6100df61027e565b6040518082815260200191505060405180910390f35b34156100fd57fe5b610151600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610284565b604051808215151515815260200191505060405180910390f35b341561017357fe5b61019f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061028e565b6040518082815260200191505060405180910390f35b34156101bd57fe5b6101f2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610296565b604051808215151515815260200191505060405180910390f35b341561021457fe5b61025f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061029f565b6040518082815260200191505060405180910390f35b60005b92915050565b60005b90565b60005b9392505050565b60005b919050565b60005b92915050565b60005b929150505600a165627a7a72305820b8fd6d6a6fe5fb53fa4968f246aad074b179498a6d15208c4b2d8be473df69420029", - "updated_at": 1517509621946 - } - } -} diff --git a/packages/contracts/artifacts/UnlimitedAllowanceToken.json b/packages/contracts/artifacts/UnlimitedAllowanceToken.json deleted file mode 100644 index f6415840b..000000000 --- a/packages/contracts/artifacts/UnlimitedAllowanceToken.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "contract_name": "UnlimitedAllowanceToken", - "networks": { - "50": { - "solc_version": "0.4.18", - "keccak256": "0xfc55032f0942ce4081a9f8c3eacfa0bddf61e1fb76593c8d6514adcb97a96690", - "optimizer_enabled": 0, - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "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" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_spender", - "type": "address" - }, - { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } - ], - "unlinked_binary": - "0x6060604052341561000f57600080fd5b6109808061001e6000396000f300606060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007d57806318160ddd146100d757806323b872dd1461010057806370a0823114610179578063a9059cbb146101c6578063dd62ed3e14610220575b600080fd5b341561008857600080fd5b6100bd600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061028c565b604051808215151515815260200191505060405180910390f35b34156100e257600080fd5b6100ea61037e565b6040518082815260200191505060405180910390f35b341561010b57600080fd5b61015f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610384565b604051808215151515815260200191505060405180910390f35b341561018457600080fd5b6101b0600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106a5565b6040518082815260200191505060405180910390f35b34156101d157600080fd5b610206600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106ed565b604051808215151515815260200191505060405180910390f35b341561022b57600080fd5b610276600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108cd565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b600080600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156104545750828110155b80156104de57506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15156104e957600080fd5b826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156106345782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156107bb57506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15156107c657600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050929150505600a165627a7a72305820fcfe717221cfe35887f7cf953f3c89ebf20f5cc389a92a5b68e2fd22c236d0e30029", - "updated_at": 1517509620184 - } - } -} diff --git a/packages/contracts/artifacts/UnlimitedAllowanceToken_v1.json b/packages/contracts/artifacts/UnlimitedAllowanceToken_v1.json deleted file mode 100644 index 731a4e4ee..000000000 --- a/packages/contracts/artifacts/UnlimitedAllowanceToken_v1.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "contract_name": "UnlimitedAllowanceToken_v1", - "networks": { - "50": { - "solc_version": "0.4.11", - "keccak256": "0x3b548a72cde0786747f9bdf42901fcf51ec546ced40506335d28b0778e35d25a", - "optimizer_enabled": 0, - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "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" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_spender", - "type": "address" - }, - { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } - ], - "unlinked_binary": - "0x6060604052341561000c57fe5b5b61098a8061001c6000396000f30060606040523615610076576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007857806318160ddd146100cf57806323b872dd146100f557806370a082311461016b578063a9059cbb146101b5578063dd62ed3e1461020c575bfe5b341561008057fe5b6100b5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610275565b604051808215151515815260200191505060405180910390f35b34156100d757fe5b6100df610368565b6040518082815260200191505060405180910390f35b34156100fd57fe5b610151600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061036e565b604051808215151515815260200191505060405180910390f35b341561017357fe5b61019f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061069e565b6040518082815260200191505060405180910390f35b34156101bd57fe5b6101f2600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106e8565b604051808215151515815260200191505060405180910390f35b341561021457fe5b61025f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108d6565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a3600190505b92915050565b60025481565b60006000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082600060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156104405750828110155b80156104cc5750600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483600060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b1561068c5782600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555082600060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81101561061e5782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150610696565b60009150610696565b5b509392505050565b6000600060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b600081600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156107b95750600060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b156108c65781600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190506108d0565b600090506108d0565b5b92915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b929150505600a165627a7a723058204c2e4edd6947d81382e4a79ca7070d2068e887e849a5998d8cd99e1ae7e4107b0029", - "updated_at": 1517509622346 - } - } -} diff --git a/packages/contracts/artifacts/WETH9.json b/packages/contracts/artifacts/WETH9.json deleted file mode 100644 index ffe11ce40..000000000 --- a/packages/contracts/artifacts/WETH9.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "contract_name": "WETH9", - "networks": { - "50": { - "solc_version": "0.4.18", - "keccak256": "0xce985174db1a24d312c0d544abb926a9b107bd9abd6424288a8e54a16d3e006b", - "optimizer_enabled": 0, - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "guy", - "type": "address" - }, - { - "name": "wad", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "src", - "type": "address" - }, - { - "name": "dst", - "type": "address" - }, - { - "name": "wad", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "wad", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "dst", - "type": "address" - }, - { - "name": "wad", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "deposit", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - }, - { - "name": "", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "src", - "type": "address" - }, - { - "indexed": true, - "name": "guy", - "type": "address" - }, - { - "indexed": false, - "name": "wad", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "src", - "type": "address" - }, - { - "indexed": true, - "name": "dst", - "type": "address" - }, - { - "indexed": false, - "name": "wad", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "dst", - "type": "address" - }, - { - "indexed": false, - "name": "wad", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "src", - "type": "address" - }, - { - "indexed": false, - "name": "wad", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - } - ], - "unlinked_binary": - "0x60606040526040805190810160405280600d81526020017f57726170706564204574686572000000000000000000000000000000000000008152506000908051906020019061004f9291906100c8565b506040805190810160405280600481526020017f57455448000000000000000000000000000000000000000000000000000000008152506001908051906020019061009b9291906100c8565b506012600260006101000a81548160ff021916908360ff16021790555034156100c357600080fd5b61016d565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010957805160ff1916838001178555610137565b82800160010185558215610137579182015b8281111561013657825182559160200191906001019061011b565b5b5090506101449190610148565b5090565b61016a91905b8082111561016657600081600090555060010161014e565b5090565b90565b610c348061017c6000396000f3006060604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100b9578063095ea7b31461014757806318160ddd146101a157806323b872dd146101ca5780632e1a7d4d14610243578063313ce5671461026657806370a082311461029557806395d89b41146102e2578063a9059cbb14610370578063d0e30db0146103ca578063dd62ed3e146103d4575b6100b7610440565b005b34156100c457600080fd5b6100cc6104dd565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561010c5780820151818401526020810190506100f1565b50505050905090810190601f1680156101395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015257600080fd5b610187600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061057b565b604051808215151515815260200191505060405180910390f35b34156101ac57600080fd5b6101b461066d565b6040518082815260200191505060405180910390f35b34156101d557600080fd5b610229600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061068c565b604051808215151515815260200191505060405180910390f35b341561024e57600080fd5b61026460048080359060200190919050506109d9565b005b341561027157600080fd5b610279610b05565b604051808260ff1660ff16815260200191505060405180910390f35b34156102a057600080fd5b6102cc600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610b18565b6040518082815260200191505060405180910390f35b34156102ed57600080fd5b6102f5610b30565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033557808201518184015260208101905061031a565b50505050905090810190601f1680156103625780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561037b57600080fd5b6103b0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610bce565b604051808215151515815260200191505060405180910390f35b6103d2610440565b005b34156103df57600080fd5b61042a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610be3565b6040518082815260200191505060405180910390f35b34600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a2565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105735780601f1061054857610100808354040283529160200191610573565b820191906000526020600020905b81548152906001019060200180831161055657829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60003073ffffffffffffffffffffffffffffffffffffffff1631905090565b600081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156106dc57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156107b457507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b156108cf5781600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561084457600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610a2757600080fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515610ab457600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a250565b600260009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610bc65780601f10610b9b57610100808354040283529160200191610bc6565b820191906000526020600020905b815481529060010190602001808311610ba957829003601f168201915b505050505081565b6000610bdb33848461068c565b905092915050565b60046020528160005260406000206020528060005260406000206000915091505054815600a165627a7a723058205d39b84dc32db11788d365c5d4ad673648b645ce10963c48e4aad5da4909ab5e0029", - "updated_at": 1517509620680 - } - } -} diff --git a/packages/contracts/artifacts/ZRXToken.json b/packages/contracts/artifacts/ZRXToken.json deleted file mode 100644 index 285cc1dfd..000000000 --- a/packages/contracts/artifacts/ZRXToken.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "contract_name": "ZRXToken", - "networks": { - "50": { - "solc_version": "0.4.11", - "keccak256": "0x68278a8290a59fb66c378f7517c1029efe226d916e252deceb0a2799a6bc4e77", - "optimizer_enabled": 0, - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "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" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_spender", - "type": "address" - }, - { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } - ], - "unlinked_binary": - "0x60606040526b033b2e3c9fd0803ce8000000600355341561001c57fe5b5b600354600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b610b82806100746000396000f30060606040523615610097576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde0314610099578063095ea7b31461013257806318160ddd1461018957806323b872dd146101af578063313ce5671461022557806370a082311461025157806395d89b411461029b578063a9059cbb14610334578063dd62ed3e1461038b575bfe5b34156100a157fe5b6100a96103f4565b60405180806020018281038252838181518152602001915080519060200190808383600083146100f8575b8051825260208311156100f8576020820191506020810190506020830392506100d4565b505050905090810190601f1680156101245780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561013a57fe5b61016f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061042e565b604051808215151515815260200191505060405180910390f35b341561019157fe5b610199610521565b6040518082815260200191505060405180910390f35b34156101b757fe5b61020b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610527565b604051808215151515815260200191505060405180910390f35b341561022d57fe5b610235610857565b604051808260ff1660ff16815260200191505060405180910390f35b341561025957fe5b610285600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061085c565b6040518082815260200191505060405180910390f35b34156102a357fe5b6102ab6108a6565b60405180806020018281038252838181518152602001915080519060200190808383600083146102fa575b8051825260208311156102fa576020820191506020810190506020830392506102d6565b505050905090810190601f1680156103265780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561033c57fe5b610371600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506108e0565b604051808215151515815260200191505060405180910390f35b341561039357fe5b6103de600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ace565b6040518082815260200191505060405180910390f35b604060405190810160405280601181526020017f30782050726f746f636f6c20546f6b656e00000000000000000000000000000081525081565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a3600190505b92915050565b60035481565b60006000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082600060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156105f95750828110155b80156106855750600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483600060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b156108455782600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555082600060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156107d75782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a36001915061084f565b6000915061084f565b5b509392505050565b601281565b6000600060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b604060405190810160405280600381526020017f5a5258000000000000000000000000000000000000000000000000000000000081525081565b600081600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156109b15750600060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15610abe5781600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050610ac8565b60009050610ac8565b5b92915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b929150505600a165627a7a7230582055d3a76ea3e76a05371288f7870d0ec8251b0e3ce06877d2a8509c92c10c51420029", - "updated_at": 1517509621293 - } - } -} diff --git a/packages/contracts/contract_templates/contract.handlebars b/packages/contracts/contract_templates/contract.handlebars new file mode 100644 index 000000000..d3fe1b8cc --- /dev/null +++ b/packages/contracts/contract_templates/contract.handlebars @@ -0,0 +1,25 @@ +/** + * This file is auto-generated using abi-gen. Don't edit directly. + * Templates can be found at https://github.com/0xProject/0x.js/tree/development/packages/abi-gen-templates. + */ +// tslint:disable-next-line:no-unused-variable +import { TxData, TxDataPayable } from '@0xproject/types'; +import { BigNumber, classUtils, promisify } from '@0xproject/utils'; +import * as Web3 from 'web3'; + +import {BaseContract} from './base_contract'; + +export class {{contractName}}Contract extends BaseContract { +{{#each methods}} + {{#this.constant}} + {{> call contractName=../contractName}} + {{/this.constant}} + {{^this.constant}} + {{> tx contractName=../contractName}} + {{/this.constant}} +{{/each}} + constructor(web3ContractInstance: Web3.ContractInstance, defaults: Partial) { + super(web3ContractInstance, defaults); + classUtils.bindAll(this, ['_web3ContractInstance', '_defaults']); + } +} // tslint:disable:max-file-line-count diff --git a/packages/contracts/contract_templates/partials/call.handlebars b/packages/contracts/contract_templates/partials/call.handlebars new file mode 100644 index 000000000..0475136f0 --- /dev/null +++ b/packages/contracts/contract_templates/partials/call.handlebars @@ -0,0 +1,15 @@ +public {{this.name}} = { + async callAsync( + {{> typed_params inputs=inputs}} + defaultBlock?: Web3.BlockParam, + ): Promise<{{> return_type outputs=outputs}}> { + const self = this as {{contractName}}Contract; + const result = await promisify<{{> return_type outputs=outputs}}>( + self._web3ContractInstance.{{this.name}}.call, + self._web3ContractInstance, + )( + {{> params inputs=inputs}} + ); + return result; + }, +}; diff --git a/packages/contracts/contract_templates/partials/params.handlebars b/packages/contracts/contract_templates/partials/params.handlebars new file mode 100644 index 000000000..ac5d4ae85 --- /dev/null +++ b/packages/contracts/contract_templates/partials/params.handlebars @@ -0,0 +1,3 @@ +{{#each inputs}} +{{name}}, +{{/each}} diff --git a/packages/contracts/contract_templates/partials/return_type.handlebars b/packages/contracts/contract_templates/partials/return_type.handlebars new file mode 100644 index 000000000..383961a40 --- /dev/null +++ b/packages/contracts/contract_templates/partials/return_type.handlebars @@ -0,0 +1,6 @@ +{{#singleReturnValue}} +{{#returnType outputs.0.type}}{{/returnType}} +{{/singleReturnValue}} +{{^singleReturnValue}} +[{{#each outputs}}{{#returnType type}}{{/returnType}}{{#unless @last}}, {{/unless}}{{/each}}] +{{/singleReturnValue}} diff --git a/packages/contracts/contract_templates/partials/tx.handlebars b/packages/contracts/contract_templates/partials/tx.handlebars new file mode 100644 index 000000000..9df83266a --- /dev/null +++ b/packages/contracts/contract_templates/partials/tx.handlebars @@ -0,0 +1,51 @@ +public {{this.name}} = { + async sendTransactionAsync( + {{> typed_params inputs=inputs}} + {{#this.payable}} + txData: TxDataPayable = {}, + {{/this.payable}} + {{^this.payable}} + txData: TxData = {}, + {{/this.payable}} + ): Promise { + const self = this as {{contractName}}Contract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.{{this.name}}.estimateGasAsync.bind( + self, + {{> params inputs=inputs}} + ), + ); + const txHash = await promisify( + self._web3ContractInstance.{{this.name}}, self._web3ContractInstance, + )( + {{> params inputs=inputs}} + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + {{> typed_params inputs=inputs}} + txData: TxData = {}, + ): Promise { + const self = this as {{contractName}}Contract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.{{this.name}}.estimateGas, self._web3ContractInstance, + )( + {{> params inputs=inputs}} + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + {{> typed_params inputs=inputs}} + txData: TxData = {}, + ): string { + const self = this as {{contractName}}Contract; + const abiEncodedTransactionData = self._web3ContractInstance.{{this.name}}.getData(); + return abiEncodedTransactionData; + }, +}; diff --git a/packages/contracts/contract_templates/partials/typed_params.handlebars b/packages/contracts/contract_templates/partials/typed_params.handlebars new file mode 100644 index 000000000..3ea4b2e95 --- /dev/null +++ b/packages/contracts/contract_templates/partials/typed_params.handlebars @@ -0,0 +1,3 @@ +{{#each inputs}} + {{name}}: {{#parameterType type}}{{/parameterType}}, +{{/each}} diff --git a/packages/contracts/package.json b/packages/contracts/package.json index b4074193d..712b220ec 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -17,6 +17,7 @@ "compile:comment": "Yarn workspaces do not link binaries correctly so we need to reference them directly https://github.com/yarnpkg/yarn/issues/3846", "compile": "node ../deployer/lib/src/cli.js compile", "clean": "rm -rf ./lib", + "generate_contract_wrappers": "node ../abi-gen/lib/index.js --abis 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template contract_templates/contract.handlebars --partials 'contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated", "migrate": "node ../deployer/lib/src/cli.js migrate", "lint": "tslint --project . 'migrations/**/*.ts' 'test/**/*.ts' 'util/**/*.ts' 'deploy/**/*.ts'", "test:circleci": "yarn test" diff --git a/packages/contracts/src/artifacts/DummyToken.json b/packages/contracts/src/artifacts/DummyToken.json new file mode 100644 index 000000000..8be276389 --- /dev/null +++ b/packages/contracts/src/artifacts/DummyToken.json @@ -0,0 +1,313 @@ +{ + "contract_name": "DummyToken", + "networks": { + "50": { + "solc_version": "0.4.18", + "keccak256": "0x457cd1abe6333f2131eb9663c76a52857bc3e37606b3997b8c6683267b2049e3", + "optimizer_enabled": 0, + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_value", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_target", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "setBalance", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_name", + "type": "string" + }, + { + "name": "_symbol", + "type": "string" + }, + { + "name": "_decimals", + "type": "uint256" + }, + { + "name": "_totalSupply", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "unlinked_binary": + "0x606060405234156200001057600080fd5b60405162001200380380620012008339810160405280805182019190602001805182019190602001805190602001909190805190602001909190505033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360049080519060200190620000a59291906200011a565b508260059080519060200190620000be9291906200011a565b508160068190555080600281905550806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050505050620001c9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200015d57805160ff19168380011785556200018e565b828001600101855582156200018e579182015b828111156200018d57825182559160200191906001019062000170565b5b5090506200019d9190620001a1565b5090565b620001c691905b80821115620001c2576000816000905550600101620001a8565b5090565b90565b61102780620001d96000396000f3006060604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100ca578063095ea7b31461015857806318160ddd146101b257806323b872dd146101db578063313ce5671461025457806370a082311461027d5780638da5cb5b146102ca57806395d89b411461031f578063a0712d68146103ad578063a9059cbb146103d0578063dd62ed3e1461042a578063e30443bc14610496578063f2fde38b146104d8575b600080fd5b34156100d557600080fd5b6100dd610511565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561011d578082015181840152602081019050610102565b50505050905090810190601f16801561014a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561016357600080fd5b610198600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105af565b604051808215151515815260200191505060405180910390f35b34156101bd57600080fd5b6101c56106a1565b6040518082815260200191505060405180910390f35b34156101e657600080fd5b61023a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106a7565b604051808215151515815260200191505060405180910390f35b341561025f57600080fd5b6102676109c8565b6040518082815260200191505060405180910390f35b341561028857600080fd5b6102b4600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506109ce565b6040518082815260200191505060405180910390f35b34156102d557600080fd5b6102dd610a16565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561032a57600080fd5b610332610a3c565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610372578082015181840152602081019050610357565b50505050905090810190601f16801561039f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156103b857600080fd5b6103ce6004808035906020019091905050610ada565b005b34156103db57600080fd5b610410600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610b91565b604051808215151515815260200191505060405180910390f35b341561043557600080fd5b610480600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d71565b6040518082815260200191505060405180910390f35b34156104a157600080fd5b6104d6600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610df8565b005b34156104e357600080fd5b61050f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610eed565b005b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105a75780601f1061057c576101008083540402835291602001916105a7565b820191906000526020600020905b81548152906001019060200180831161058a57829003601f168201915b505050505081565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b600080600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156107775750828110155b801561080157506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b151561080c57600080fd5b826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156109575782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b60065481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ad25780601f10610aa757610100808354040283529160200191610ad2565b820191906000526020600020905b815481529060010190602001808311610ab557829003601f168201915b505050505081565b68056bc75e2d631000008111151515610af257600080fd5b610b3a816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fc4565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b8860025482610fc4565b60028190555050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410158015610c5f57506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b1515610c6a57600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e5657600080fd5b610e5f836109ce565b905080821015610e8957610e7e600254610e798385610fe2565b610fe2565b600281905550610ea5565b610e9e600254610e998484610fe2565b610fc4565b6002819055505b816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f4957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515610fc15780600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b6000808284019050838110151515610fd857fe5b8091505092915050565b6000828211151515610ff057fe5b8183039050929150505600a165627a7a723058209c3a37463b05ebd155665b4be7d56f40b7ff1ca3a86a33391b31f468e00b48480029", + "updated_at": 1517509617252 + } + } +} diff --git a/packages/contracts/src/artifacts/ERC20Token.json b/packages/contracts/src/artifacts/ERC20Token.json new file mode 100644 index 000000000..fc0dd5259 --- /dev/null +++ b/packages/contracts/src/artifacts/ERC20Token.json @@ -0,0 +1,188 @@ +{ + "contract_name": "ERC20Token", + "networks": { + "50": { + "solc_version": "0.4.18", + "keccak256": "0x31be5b5f8d7ae32e5ac282b8740cc7aa87cdc383cabafa02292ea6f38302efcc", + "optimizer_enabled": 0, + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "unlinked_binary": + "0x6060604052341561000f57600080fd5b6109528061001e6000396000f300606060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007d57806318160ddd146100d757806323b872dd1461010057806370a0823114610179578063a9059cbb146101c6578063dd62ed3e14610220575b600080fd5b341561008857600080fd5b6100bd600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061028c565b604051808215151515815260200191505060405180910390f35b34156100e257600080fd5b6100ea61037e565b6040518082815260200191505060405180910390f35b341561010b57600080fd5b61015f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610384565b604051808215151515815260200191505060405180910390f35b341561018457600080fd5b6101b0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610677565b6040518082815260200191505060405180910390f35b34156101d157600080fd5b610206600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106bf565b604051808215151515815260200191505060405180910390f35b341561022b57600080fd5b610276600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061089f565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b6000816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410158015610450575081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156104da57506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15156104e557600080fd5b816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561078d57506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b151561079857600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050929150505600a165627a7a72305820d9af9b2b6ffe19f00d45d30a243f833e31053a2e48142e183c9f1e6b0ead7a9e0029", + "updated_at": 1517509619365 + } + } +} diff --git a/packages/contracts/src/artifacts/ERC20Token_v1.json b/packages/contracts/src/artifacts/ERC20Token_v1.json new file mode 100644 index 000000000..757962064 --- /dev/null +++ b/packages/contracts/src/artifacts/ERC20Token_v1.json @@ -0,0 +1,182 @@ +{ + "contract_name": "ERC20Token_v1", + "networks": { + "50": { + "solc_version": "0.4.11", + "keccak256": "0x3d710b436c430d6fe49f64b091555405360d76da6454b93faa8e213eea34a96d", + "optimizer_enabled": 0, + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "unlinked_binary": + "0x6060604052341561000c57fe5b5b61095b8061001c6000396000f30060606040523615610076576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007857806318160ddd146100cf57806323b872dd146100f557806370a082311461016b578063a9059cbb146101b5578063dd62ed3e1461020c575bfe5b341561008057fe5b6100b5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610275565b604051808215151515815260200191505060405180910390f35b34156100d757fe5b6100df610368565b6040518082815260200191505060405180910390f35b34156100fd57fe5b610151600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061036e565b604051808215151515815260200191505060405180910390f35b341561017357fe5b61019f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061066f565b6040518082815260200191505060405180910390f35b34156101bd57fe5b6101f2600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106b9565b604051808215151515815260200191505060405180910390f35b341561021457fe5b61025f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108a7565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a3600190505b92915050565b60025481565b600081600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561043b575081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156104c75750600060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b1561065e5781600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050610668565b60009050610668565b5b9392505050565b6000600060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b600081600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561078a5750600060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b156108975781600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190506108a1565b600090506108a1565b5b92915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b929150505600a165627a7a72305820441601e8451e1c2d31e6cde19fc920b8f95e79f9d42dd662aeefad13fd8bcfaa0029", + "updated_at": 1517509621756 + } + } +} diff --git a/packages/contracts/src/artifacts/Exchange.json b/packages/contracts/src/artifacts/Exchange.json new file mode 100644 index 000000000..ea3891d94 --- /dev/null +++ b/packages/contracts/src/artifacts/Exchange.json @@ -0,0 +1,603 @@ +{ + "contract_name": "Exchange", + "networks": { + "50": { + "solc_version": "0.4.14", + "keccak256": "0x50d9d5de7ea3f16b7e655c3ed280d1d7ff50422b4fc42ae609422eab5028d2ca", + "optimizer_enabled": 0, + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "numerator", + "type": "uint256" + }, + { + "name": "denominator", + "type": "uint256" + }, + { + "name": "target", + "type": "uint256" + } + ], + "name": "isRoundingError", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "name": "filled", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "name": "cancelled", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5][]" + }, + { + "name": "orderValues", + "type": "uint256[6][]" + }, + { + "name": "fillTakerTokenAmount", + "type": "uint256" + }, + { + "name": "shouldThrowOnInsufficientBalanceOrAllowance", + "type": "bool" + }, + { + "name": "v", + "type": "uint8[]" + }, + { + "name": "r", + "type": "bytes32[]" + }, + { + "name": "s", + "type": "bytes32[]" + } + ], + "name": "fillOrdersUpTo", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5]" + }, + { + "name": "orderValues", + "type": "uint256[6]" + }, + { + "name": "cancelTakerTokenAmount", + "type": "uint256" + } + ], + "name": "cancelOrder", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "ZRX_TOKEN_CONTRACT", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5][]" + }, + { + "name": "orderValues", + "type": "uint256[6][]" + }, + { + "name": "fillTakerTokenAmounts", + "type": "uint256[]" + }, + { + "name": "v", + "type": "uint8[]" + }, + { + "name": "r", + "type": "bytes32[]" + }, + { + "name": "s", + "type": "bytes32[]" + } + ], + "name": "batchFillOrKillOrders", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5]" + }, + { + "name": "orderValues", + "type": "uint256[6]" + }, + { + "name": "fillTakerTokenAmount", + "type": "uint256" + }, + { + "name": "v", + "type": "uint8" + }, + { + "name": "r", + "type": "bytes32" + }, + { + "name": "s", + "type": "bytes32" + } + ], + "name": "fillOrKillOrder", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "getUnavailableTakerTokenAmount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "signer", + "type": "address" + }, + { + "name": "hash", + "type": "bytes32" + }, + { + "name": "v", + "type": "uint8" + }, + { + "name": "r", + "type": "bytes32" + }, + { + "name": "s", + "type": "bytes32" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "numerator", + "type": "uint256" + }, + { + "name": "denominator", + "type": "uint256" + }, + { + "name": "target", + "type": "uint256" + } + ], + "name": "getPartialAmount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "TOKEN_TRANSFER_PROXY_CONTRACT", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5][]" + }, + { + "name": "orderValues", + "type": "uint256[6][]" + }, + { + "name": "fillTakerTokenAmounts", + "type": "uint256[]" + }, + { + "name": "shouldThrowOnInsufficientBalanceOrAllowance", + "type": "bool" + }, + { + "name": "v", + "type": "uint8[]" + }, + { + "name": "r", + "type": "bytes32[]" + }, + { + "name": "s", + "type": "bytes32[]" + } + ], + "name": "batchFillOrders", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5][]" + }, + { + "name": "orderValues", + "type": "uint256[6][]" + }, + { + "name": "cancelTakerTokenAmounts", + "type": "uint256[]" + } + ], + "name": "batchCancelOrders", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5]" + }, + { + "name": "orderValues", + "type": "uint256[6]" + }, + { + "name": "fillTakerTokenAmount", + "type": "uint256" + }, + { + "name": "shouldThrowOnInsufficientBalanceOrAllowance", + "type": "bool" + }, + { + "name": "v", + "type": "uint8" + }, + { + "name": "r", + "type": "bytes32" + }, + { + "name": "s", + "type": "bytes32" + } + ], + "name": "fillOrder", + "outputs": [ + { + "name": "filledTakerTokenAmount", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5]" + }, + { + "name": "orderValues", + "type": "uint256[6]" + } + ], + "name": "getOrderHash", + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "EXTERNAL_QUERY_GAS_LIMIT", + "outputs": [ + { + "name": "", + "type": "uint16" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "type": "function" + }, + { + "inputs": [ + { + "name": "_zrxToken", + "type": "address" + }, + { + "name": "_tokenTransferProxy", + "type": "address" + } + ], + "payable": false, + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "maker", + "type": "address" + }, + { + "indexed": false, + "name": "taker", + "type": "address" + }, + { + "indexed": true, + "name": "feeRecipient", + "type": "address" + }, + { + "indexed": false, + "name": "makerToken", + "type": "address" + }, + { + "indexed": false, + "name": "takerToken", + "type": "address" + }, + { + "indexed": false, + "name": "filledMakerTokenAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "filledTakerTokenAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "paidMakerFee", + "type": "uint256" + }, + { + "indexed": false, + "name": "paidTakerFee", + "type": "uint256" + }, + { + "indexed": true, + "name": "tokens", + "type": "bytes32" + }, + { + "indexed": false, + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "LogFill", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "maker", + "type": "address" + }, + { + "indexed": true, + "name": "feeRecipient", + "type": "address" + }, + { + "indexed": false, + "name": "makerToken", + "type": "address" + }, + { + "indexed": false, + "name": "takerToken", + "type": "address" + }, + { + "indexed": false, + "name": "cancelledMakerTokenAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "cancelledTakerTokenAmount", + "type": "uint256" + }, + { + "indexed": true, + "name": "tokens", + "type": "bytes32" + }, + { + "indexed": false, + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "LogCancel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "errorId", + "type": "uint8" + }, + { + "indexed": true, + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "LogError", + "type": "event" + } + ], + "unlinked_binary": + "0x6060604052341561000f57600080fd5b604051604080612c4d833981016040528080519060200190919080519060200190919050505b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50505b612b84806100c96000396000f300606060405236156100fa576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806314df96ee146100ff578063288cdc911461014c5780632ac1262214610187578063363349be146101c2578063394c21e7146103bc5780633b30ba591461044b5780634f150787146104a0578063741bcc93146106b25780637e9abb50146107535780638163681e1461078e57806398024a8b14610812578063add1cbc51461085b578063b7b2c7d6146108b0578063baa0181d14610acd578063bc61394a14610c1f578063cfc4d0ec14610cdf578063f06bbf7514610d6d578063ffa1ad7414610d9e575b600080fd5b341561010a57600080fd5b6101326004808035906020019091908035906020019091908035906020019091905050610e2d565b604051808215151515815260200191505060405180910390f35b341561015757600080fd5b610171600480803560001916906020019091905050610e7c565b6040518082815260200191505060405180910390f35b341561019257600080fd5b6101ac600480803560001916906020019091905050610e94565b6040518082815260200191505060405180910390f35b34156101cd57600080fd5b6103a660048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b8282101561024857848483905060a002016005806020026040519081016040528092919082600560200280828437820191505050505081526020019060010190610203565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156102c457848483905060c00201600680602002604051908101604052809291908260066020028082843782019150505050508152602001906001019061027f565b5050505050919080359060200190919080351515906020019091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050610eac565b6040518082815260200191505060405180910390f35b34156103c757600080fd5b6104356004808060a001906005806020026040519081016040528092919082600560200280828437820191505050505091908060c001906006806020026040519081016040528092919082600660200280828437820191505050505091908035906020019091905050611013565b6040518082815260200191505060405180910390f35b341561045657600080fd5b61045e6114fb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104ab57600080fd5b6106b060048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b8282101561052657848483905060a0020160058060200260405190810160405280929190826005602002808284378201915050505050815260200190600101906104e1565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156105a257848483905060c00201600680602002604051908101604052809291908260066020028082843782019150505050508152602001906001019061055d565b50505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050611520565b005b34156106bd57600080fd5b6107516004808060a001906005806020026040519081016040528092919082600560200280828437820191505050505091908060c00190600680602002604051908101604052809291908260066020028082843782019150505050509190803590602001909190803560ff1690602001909190803560001916906020019091908035600019169060200190919050506115df565b005b341561075e57600080fd5b610778600480803560001916906020019091905050611605565b6040518082815260200191505060405180910390f35b341561079957600080fd5b6107f8600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356000191690602001909190803560ff16906020019091908035600019169060200190919080356000191690602001909190505061164f565b604051808215151515815260200191505060405180910390f35b341561081d57600080fd5b6108456004808035906020019091908035906020019091908035906020019091905050611757565b6040518082815260200191505060405180910390f35b341561086657600080fd5b61086e611776565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156108bb57600080fd5b610acb60048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b8282101561093657848483905060a0020160058060200260405190810160405280929190826005602002808284378201915050505050815260200190600101906108f1565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156109b257848483905060c00201600680602002604051908101604052809291908260066020028082843782019150505050508152602001906001019061096d565b50505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035151590602001909190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190505061179c565b005b3415610ad857600080fd5b610c1d60048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b82821015610b5357848483905060a002016005806020026040519081016040528092919082600560200280828437820191505050505081526020019060010190610b0e565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b82821015610bcf57848483905060c002016006806020026040519081016040528092919082600660200280828437820191505050505081526020019060010190610b8a565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190505061185e565b005b3415610c2a57600080fd5b610cc96004808060a001906005806020026040519081016040528092919082600560200280828437820191505050505091908060c001906006806020026040519081016040528092919082600660200280828437820191505050505091908035906020019091908035151590602001909190803560ff1690602001909190803560001916906020019091908035600019169060200190919050506118d3565b6040518082815260200191505060405180910390f35b3415610cea57600080fd5b610d4f6004808060a001906005806020026040519081016040528092919082600560200280828437820191505050505091908060c001906006806020026040519081016040528092919082600660200280828437820191505050505091905050612073565b60405180826000191660001916815260200191505060405180910390f35b3415610d7857600080fd5b610d8061231f565b604051808261ffff1661ffff16815260200191505060405180910390f35b3415610da957600080fd5b610db1612325565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610df25780820151818401525b602081019050610dd6565b50505050905090810190601f168015610e1f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60008060008486850991506000821415610e4a5760009250610e73565b610e69610e5a83620f424061235e565b610e64888761235e565b612392565b90506103e8811192505b50509392505050565b60026020528060005260406000206000915090505481565b60036020528060005260406000206000915090505481565b6000806000809150600090505b895181101561100257896000815181101515610ed157fe5b906020019060200201516003600581101515610ee957fe5b602002015173ffffffffffffffffffffffffffffffffffffffff168a82815181101515610f1257fe5b906020019060200201516003600581101515610f2a57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff16141515610f5157600080fd5b610fe582610fe08c84815181101515610f6657fe5b906020019060200201518c85815181101515610f7e57fe5b90602001906020020151610f928d886123ae565b8c8c88815181101515610fa157fe5b906020019060200201518c89815181101515610fb957fe5b906020019060200201518c8a815181101515610fd157fe5b906020019060200201516118d3565b6123c8565b915087821415610ff457611002565b5b8080600101915050610eb9565b8192505b5050979650505050505050565b600061101d612a8c565b6000806101606040519081016040528088600060058110151561103c57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff16815260200188600160058110151561106b57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff16815260200188600260058110151561109a57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018860036005811015156110c957fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018860046005811015156110f857fe5b602002015173ffffffffffffffffffffffffffffffffffffffff16815260200187600060068110151561112757fe5b6020020151815260200187600160068110151561114057fe5b6020020151815260200187600260068110151561115957fe5b6020020151815260200187600360068110151561117257fe5b6020020151815260200187600460068110151561118b57fe5b6020020151815260200161119f8989612073565b6000191681525092503373ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff161415156111e657600080fd5b60008360a001511180156111fe575060008360c00151115b801561120a5750600085115b151561121557600080fd5b8261012001514210151561127257826101400151600019166000600381111561123a57fe5b60ff167f36d86c59e00bd73dc19ba3adfe068e4b64ac7e92be35546adeddf1b956a87e9060405160405180910390a3600093506114f1565b61128d8360c00151611288856101400151611605565b6123ae565b915061129985836123e7565b905060008114156112f35782610140015160001916600160038111156112bb57fe5b60ff167f36d86c59e00bd73dc19ba3adfe068e4b64ac7e92be35546adeddf1b956a87e9060405160405180910390a3600093506114f1565b61131d600360008561014001516000191660001916815260200190815260200160002054826123c8565b60036000856101400151600019166000191681526020019081526020016000208190555082604001518360600151604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902060001916836080015173ffffffffffffffffffffffffffffffffffffffff16846000015173ffffffffffffffffffffffffffffffffffffffff167f67d66f160bc93d925d05dae1794c90d2d6d6688b29b84ff069398a9b0458713186604001518760600151611455878a60c001518b60a00151611757565b878a6101400151604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182600019166000191681526020019550505050505060405180910390a48093505b5050509392505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008090505b86518110156115d5576115c7878281518110151561154057fe5b90602001906020020151878381518110151561155857fe5b90602001906020020151878481518110151561157057fe5b90602001906020020151878581518110151561158857fe5b9060200190602002015187868151811015156115a057fe5b9060200190602002015187878151811015156115b857fe5b906020019060200201516115df565b5b8080600101915050611526565b5b50505050505050565b836115f087878760008888886118d3565b1415156115fc57600080fd5b5b505050505050565b600061164760026000846000191660001916815260200190815260200160002054600360008560001916600019168152602001908152602001600020546123c8565b90505b919050565b600060018560405180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040518091039020858585604051600081526020016040526000604051602001526040518085600019166000191681526020018460ff1660ff16815260200183600019166000191681526020018260001916600019168152602001945050505050602060405160208103908084039060008661646e5a03f1151561171457600080fd5b50506020604051035173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161490505b95945050505050565b600061176c611766858461235e565b84612392565b90505b9392505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008090505b87518110156118535761184488828151811015156117bc57fe5b9060200190602002015188838151811015156117d457fe5b9060200190602002015188848151811015156117ec57fe5b9060200190602002015188888681518110151561180557fe5b90602001906020020151888781518110151561181d57fe5b90602001906020020151888881518110151561183557fe5b906020019060200201516118d3565b505b80806001019150506117a2565b5b5050505050505050565b60008090505b83518110156118cc576118bd848281518110151561187e57fe5b90602001906020020151848381518110151561189657fe5b9060200190602002015184848151811015156118ae57fe5b90602001906020020151611013565b505b8080600101915050611864565b5b50505050565b60006118dd612a8c565b600080600080610160604051908101604052808e60006005811015156118ff57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018e600160058110151561192e57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018e600260058110151561195d57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018e600360058110151561198c57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018e60046005811015156119bb57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018d60006006811015156119ea57fe5b602002015181526020018d6001600681101515611a0357fe5b602002015181526020018d6002600681101515611a1c57fe5b602002015181526020018d6003600681101515611a3557fe5b602002015181526020018d6004600681101515611a4e57fe5b60200201518152602001611a628f8f612073565b600019168152509450600073ffffffffffffffffffffffffffffffffffffffff16856020015173ffffffffffffffffffffffffffffffffffffffff161480611ad957503373ffffffffffffffffffffffffffffffffffffffff16856020015173ffffffffffffffffffffffffffffffffffffffff16145b1515611ae457600080fd5b60008560a00151118015611afc575060008560c00151115b8015611b08575060008b115b1515611b1357600080fd5b611b2985600001518661014001518b8b8b61164f565b1515611b3457600080fd5b84610120015142101515611b91578461014001516000191660006003811115611b5957fe5b60ff167f36d86c59e00bd73dc19ba3adfe068e4b64ac7e92be35546adeddf1b956a87e9060405160405180910390a360009550612063565b611bac8560c00151611ba7876101400151611605565b6123ae565b9350611bb88b856123e7565b95506000861415611c12578461014001516000191660016003811115611bda57fe5b60ff167f36d86c59e00bd73dc19ba3adfe068e4b64ac7e92be35546adeddf1b956a87e9060405160405180910390a360009550612063565b611c25868660c001518760a00151610e2d565b15611c79578461014001516000191660026003811115611c4157fe5b60ff167f36d86c59e00bd73dc19ba3adfe068e4b64ac7e92be35546adeddf1b956a87e9060405160405180910390a360009550612063565b89158015611c8e5750611c8c8587612401565b155b15611ce15784610140015160001916600380811115611ca957fe5b60ff167f36d86c59e00bd73dc19ba3adfe068e4b64ac7e92be35546adeddf1b956a87e9060405160405180910390a360009550612063565b611cf4868660c001518760a00151611757565b9250611d20600260008761014001516000191660001916815260200190815260200160002054876123c8565b600260008761014001516000191660001916815260200190815260200160002081905550611d58856040015186600001513386612751565b1515611d6357600080fd5b611d77856060015133876000015189612751565b1515611d8257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16856080015173ffffffffffffffffffffffffffffffffffffffff16141515611e815760008560e001511115611e1f57611ddc868660c001518760e00151611757565b9150611e136000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168660000151876080015185612751565b1515611e1e57600080fd5b5b60008561010001511115611e8057611e41868660c00151876101000151611757565b9050611e746000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633876080015184612751565b1515611e7f57600080fd5b5b5b84604001518560600151604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051809103902060001916856080015173ffffffffffffffffffffffffffffffffffffffff16866000015173ffffffffffffffffffffffffffffffffffffffff167f0d0b9391970d9a25552f37d436d2aae2925e2bfe1b2a923754bada030c498cb33389604001518a60600151898d8a8a8f6101400151604051808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200186815260200185815260200184815260200183815260200182600019166000191681526020019850505050505050505060405180910390a48595505b5050505050979650505050505050565b60003083600060058110151561208557fe5b602002015184600160058110151561209957fe5b60200201518560026005811015156120ad57fe5b60200201518660036005811015156120c157fe5b60200201518760046005811015156120d557fe5b60200201518760006006811015156120e957fe5b60200201518860016006811015156120fd57fe5b602002015189600260068110151561211157fe5b60200201518a600360068110151561212557fe5b60200201518b600460068110151561213957fe5b60200201518c600560068110151561214d57fe5b6020020151604051808d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018781526020018681526020018581526020018481526020018381526020018281526020019c50505050505050505050505050604051809103902090505b92915050565b61138781565b6040805190810160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b6000808284029050600084148061237f575082848281151561237c57fe5b04145b151561238757fe5b8091505b5092915050565b60008082848115156123a057fe5b0490508091505b5092915050565b60008282111515156123bc57fe5b81830390505b92915050565b60008082840190508381101515156123dc57fe5b8091505b5092915050565b60008183106123f657816123f8565b825b90505b92915050565b60008060008060008060008060003397506124258a8c60c001518d60a00151611757565b9650600073ffffffffffffffffffffffffffffffffffffffff168b6080015173ffffffffffffffffffffffffffffffffffffffff161415156126d2576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168b6040015173ffffffffffffffffffffffffffffffffffffffff161495506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168b6060015173ffffffffffffffffffffffffffffffffffffffff161494506125208a8c60c001518d60e00151611757565b93506125368a8c60c001518d6101000151611757565b925085612543578361254e565b61254d87856123c8565b5b91508461255b5782612566565b6125658a846123c8565b5b9050816125986000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168d600001516128ae565b10806125d15750816125cf6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168d60000151612972565b105b806126055750806126036000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a6128ae565b105b806126395750806126376000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a612972565b105b156126475760009850612743565b851580156126805750866126638c604001518d600001516128ae565b108061267f57508661267d8c604001518d60000151612972565b105b5b1561268e5760009850612743565b841580156126bf5750896126a68c606001518a6128ae565b10806126be5750896126bc8c606001518a612972565b105b5b156126cd5760009850612743565b61273e565b866126e58c604001518d600001516128ae565b10806127015750866126ff8c604001518d60000151612972565b105b806127185750896127168c606001518a6128ae565b105b8061272f57508961272d8c606001518a612972565b105b1561273d5760009850612743565b5b600198505b505050505050505092915050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166315dacbea868686866000604051602001526040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001945050505050602060405180830381600087803b151561288857600080fd5b6102c65a03f1151561289957600080fd5b5050506040518051905090505b949350505050565b60008273ffffffffffffffffffffffffffffffffffffffff166370a0823161138761ffff16846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600088803b151561295157600080fd5b87f1151561295e57600080fd5b505050506040518051905090505b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e61138761ffff1684600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600088803b1515612a6b57600080fd5b87f11515612a7857600080fd5b505050506040518051905090505b92915050565b61016060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081526020016000815260200160008152602001600081526020016000801916815250905600a165627a7a723058200855a52575ade1fd6a84adab86cbbe615f88001d9f15f37dd43f7a0a279522940029", + "updated_at": 1517539073351 + } + } +} diff --git a/packages/contracts/src/artifacts/MaliciousToken.json b/packages/contracts/src/artifacts/MaliciousToken.json new file mode 100644 index 000000000..000cb890d --- /dev/null +++ b/packages/contracts/src/artifacts/MaliciousToken.json @@ -0,0 +1,188 @@ +{ + "contract_name": "MaliciousToken", + "networks": { + "50": { + "solc_version": "0.4.18", + "keccak256": "0x91d9300198fcb37383f39ae62bafd5a92b6def37f673c23b8ec37caca5bf9c69", + "optimizer_enabled": 0, + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "unlinked_binary": + "0x60606040526001600360006101000a81548160ff021916908360ff160217905550341561002b57600080fd5b6109968061003a6000396000f300606060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007d57806318160ddd146100d757806323b872dd1461010057806370a0823114610179578063a9059cbb146101c6578063dd62ed3e14610220575b600080fd5b341561008857600080fd5b6100bd600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061028c565b604051808215151515815260200191505060405180910390f35b34156100e257600080fd5b6100ea61037e565b6040518082815260200191505060405180910390f35b341561010b57600080fd5b61015f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610384565b604051808215151515815260200191505060405180910390f35b341561018457600080fd5b6101b0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610677565b6040518082815260200191505060405180910390f35b34156101d157600080fd5b610206600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106c7565b604051808215151515815260200191505060405180910390f35b341561022b57600080fd5b610276600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108a7565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b6000816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410158015610450575081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156104da57506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15156104e557600080fd5b816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b6000610681610936565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561079557506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15156107a057600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60006108b1610936565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6003600081819054906101000a900460ff168092919060010191906101000a81548160ff021916908360ff160217905550505600a165627a7a723058206c519d7c969de1cb1e38dc98962c65b95b935b299072476ff618a37c783e977c0029", + "updated_at": 1517509617913 + } + } +} diff --git a/packages/contracts/src/artifacts/Mintable.json b/packages/contracts/src/artifacts/Mintable.json new file mode 100644 index 000000000..9877fce84 --- /dev/null +++ b/packages/contracts/src/artifacts/Mintable.json @@ -0,0 +1,202 @@ +{ + "contract_name": "Mintable", + "networks": { + "50": { + "solc_version": "0.4.18", + "keccak256": "0xdb7d11ecab2640e5455efeab7239b1d77e4512264e155c89ce56c863ade6e3ce", + "optimizer_enabled": 0, + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_value", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "unlinked_binary": + "0x6060604052341561000f57600080fd5b610a838061001e6000396000f300606060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461008857806318160ddd146100e257806323b872dd1461010b57806370a0823114610184578063a0712d68146101d1578063a9059cbb146101f4578063dd62ed3e1461024e575b600080fd5b341561009357600080fd5b6100c8600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506102ba565b604051808215151515815260200191505060405180910390f35b34156100ed57600080fd5b6100f56103ac565b6040518082815260200191505060405180910390f35b341561011657600080fd5b61016a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506103b2565b604051808215151515815260200191505060405180910390f35b341561018f57600080fd5b6101bb600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106d3565b6040518082815260200191505060405180910390f35b34156101dc57600080fd5b6101f2600480803590602001909190505061071b565b005b34156101ff57600080fd5b610234600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506107d2565b604051808215151515815260200191505060405180910390f35b341561025957600080fd5b6102a4600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506109b2565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b600080600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156104825750828110155b801561050c57506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b151561051757600080fd5b826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156106625782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b68056bc75e2d63100000811115151561073357600080fd5b61077b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a39565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506107c960025482610a39565b60028190555050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156108a057506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15156108ab57600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000808284019050838110151515610a4d57fe5b80915050929150505600a165627a7a72305820f5e0d3094dc6fdec1984e7c91dd401991ce8a0573e153144ba7250ff27d2db190029", + "updated_at": 1517509618941 + } + } +} diff --git a/packages/contracts/src/artifacts/MultiSigWallet.json b/packages/contracts/src/artifacts/MultiSigWallet.json new file mode 100644 index 000000000..47bca568e --- /dev/null +++ b/packages/contracts/src/artifacts/MultiSigWallet.json @@ -0,0 +1,523 @@ +{ + "contract_name": "MultiSigWallet", + "networks": { + "50": { + "solc_version": "0.4.10", + "keccak256": "0xccb0952f9f74bdedc4c6aa09bdad61b3f2c0b66a3aeae0be209c74472b62e9c6", + "optimizer_enabled": 0, + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "owners", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "removeOwner", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "revokeConfirmation", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "isOwner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "address" + } + ], + "name": "confirmations", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "pending", + "type": "bool" + }, + { + "name": "executed", + "type": "bool" + } + ], + "name": "getTransactionCount", + "outputs": [ + { + "name": "count", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "addOwner", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "isConfirmed", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "getConfirmationCount", + "outputs": [ + { + "name": "count", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "transactions", + "outputs": [ + { + "name": "destination", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + }, + { + "name": "executed", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getOwners", + "outputs": [ + { + "name": "", + "type": "address[]" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "from", + "type": "uint256" + }, + { + "name": "to", + "type": "uint256" + }, + { + "name": "pending", + "type": "bool" + }, + { + "name": "executed", + "type": "bool" + } + ], + "name": "getTransactionIds", + "outputs": [ + { + "name": "_transactionIds", + "type": "uint256[]" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "getConfirmations", + "outputs": [ + { + "name": "_confirmations", + "type": "address[]" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "transactionCount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_required", + "type": "uint256" + } + ], + "name": "changeRequirement", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "confirmTransaction", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "destination", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "submitTransaction", + "outputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_OWNER_COUNT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "required", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "newOwner", + "type": "address" + } + ], + "name": "replaceOwner", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "executeTransaction", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "inputs": [ + { + "name": "_owners", + "type": "address[]" + }, + { + "name": "_required", + "type": "uint256" + } + ], + "payable": false, + "type": "constructor" + }, + { + "payable": true, + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + } + ], + "name": "Confirmation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + } + ], + "name": "Revocation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + } + ], + "name": "Submission", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + } + ], + "name": "Execution", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + } + ], + "name": "ExecutionFailure", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + } + ], + "name": "OwnerAddition", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + } + ], + "name": "OwnerRemoval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "required", + "type": "uint256" + } + ], + "name": "RequirementChange", + "type": "event" + } + ], + "unlinked_binary": + "0x606060405234156200000d57fe5b604051620022e9380380620022e9833981016040528080518201919060200180519060200190919050505b600082518260328211806200004c57508181115b80620000585750600081145b80620000645750600082145b15620000705760006000fd5b600092505b8451831015620001a9576002600086858151811015156200009257fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806200011e575060008584815181101515620000fc57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff16145b156200012a5760006000fd5b60016002600087868151811015156200013f57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b828060010193505062000075565b8460039080519060200190620001c1929190620001d6565b50836004819055505b5b5050505050620002ab565b82805482825590600052602060002090810192821562000252579160200282015b82811115620002515782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190620001f7565b5b50905062000261919062000265565b5090565b620002a891905b80821115620002a457600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055506001016200026c565b5090565b90565b61202e80620002bb6000396000f3006060604052361561011b576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063025e7c271461017c578063173825d9146101dc57806320ea8d86146102125780632f54bf6e146102325780633411c81c1461028057806354741525146102d75780637065cb4814610318578063784547a71461034e5780638b51d13f146103865780639ace38c2146103ba578063a0e67e2b146104b5578063a8abe69a1461052a578063b5dc40c3146105cc578063b77bf6001461064f578063ba51a6df14610675578063c01a8c8414610695578063c6427474146106b5578063d74f8edd1461074b578063dc8452cd14610771578063e20056e614610797578063ee22610b146107ec575b61017a5b6000341115610177573373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a25b5b565b005b341561018457fe5b61019a600480803590602001909190505061080c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101e457fe5b610210600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061084c565b005b341561021a57fe5b6102306004808035906020019091905050610af4565b005b341561023a57fe5b610266600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ca5565b604051808215151515815260200191505060405180910390f35b341561028857fe5b6102bd600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610cc5565b604051808215151515815260200191505060405180910390f35b34156102df57fe5b610302600480803515159060200190919080351515906020019091905050610cf4565b6040518082815260200191505060405180910390f35b341561032057fe5b61034c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d8b565b005b341561035657fe5b61036c6004808035906020019091905050610f8e565b604051808215151515815260200191505060405180910390f35b341561038e57fe5b6103a46004808035906020019091905050611078565b6040518082815260200191505060405180910390f35b34156103c257fe5b6103d86004808035906020019091905050611148565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001831515151581526020018281038252848181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156104a35780601f10610478576101008083540402835291602001916104a3565b820191906000526020600020905b81548152906001019060200180831161048657829003601f168201915b50509550505050505060405180910390f35b34156104bd57fe5b6104c56111a4565b6040518080602001828103825283818151815260200191508051906020019060200280838360008314610517575b805182526020831115610517576020820191506020810190506020830392506104f3565b5050509050019250505060405180910390f35b341561053257fe5b610567600480803590602001909190803590602001909190803515159060200190919080351515906020019091905050611239565b60405180806020018281038252838181518152602001915080519060200190602002808383600083146105b9575b8051825260208311156105b957602082019150602081019050602083039250610595565b5050509050019250505060405180910390f35b34156105d457fe5b6105ea600480803590602001909190505061139d565b604051808060200182810382528381815181526020019150805190602001906020028083836000831461063c575b80518252602083111561063c57602082019150602081019050602083039250610618565b5050509050019250505060405180910390f35b341561065757fe5b61065f6115cf565b6040518082815260200191505060405180910390f35b341561067d57fe5b61069360048080359060200190919050506115d5565b005b341561069d57fe5b6106b3600480803590602001909190505061168c565b005b34156106bd57fe5b610735600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611871565b6040518082815260200191505060405180910390f35b341561075357fe5b61075b611891565b6040518082815260200191505060405180910390f35b341561077957fe5b610781611896565b6040518082815260200191505060405180910390f35b341561079f57fe5b6107ea600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061189c565b005b34156107f457fe5b61080a6004808035906020019091905050611bc1565b005b60038181548110151561081b57fe5b906000526020600020900160005b915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108895760006000fd5b81600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156108e35760006000fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600091505b600160038054905003821015610a6f578273ffffffffffffffffffffffffffffffffffffffff1660038381548110151561097657fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610a615760036001600380549050038154811015156109d657fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600383815481101515610a1257fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610a6f565b5b8180600101925050610940565b6001600381818054905003915081610a879190611edd565b506003805490506004541115610aa657610aa56003805490506115d5565b5b8273ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405180905060405180910390a25b5b505b5050565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610b4e5760006000fd5b81336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610bba5760006000fd5b836000600082815260200190815260200160002060030160009054906101000a900460ff1615610bea5760006000fd5b60006001600087815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550843373ffffffffffffffffffffffffffffffffffffffff167ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e960405180905060405180910390a35b5b505b50505b5050565b60026020528060005260406000206000915054906101000a900460ff1681565b60016020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60006000600090505b600554811015610d8357838015610d3557506000600082815260200190815260200160002060030160009054906101000a900460ff16155b80610d695750828015610d6857506000600082815260200190815260200160002060030160009054906101000a900460ff165b5b15610d75576001820191505b5b8080600101915050610cfd565b5b5092915050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610dc65760006000fd5b80600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610e1f5760006000fd5b8160008173ffffffffffffffffffffffffffffffffffffffff161415610e455760006000fd5b6001600380549050016004546032821180610e5f57508181115b80610e6a5750600081145b80610e755750600082145b15610e805760006000fd5b6001600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060038054806001018281610eec9190611f09565b916000526020600020900160005b87909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508473ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405180905060405180910390a25b5b50505b505b505b50565b60006000600060009150600090505b60038054905081101561107057600160008581526020019081526020016000206000600383815481101515610fce57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561104f576001820191505b6004548214156110625760019250611071565b5b8080600101915050610f9d565b5b5050919050565b60006000600090505b600380549050811015611141576001600084815260200190815260200160002060006003838154811015156110b257fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611133576001820191505b5b8080600101915050611081565b5b50919050565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600101549080600201908060030160009054906101000a900460ff16905084565b6111ac611f35565b600380548060200260200160405190810160405280929190818152602001828054801561122e57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116111e4575b505050505090505b90565b611241611f49565b611249611f49565b6000600060055460405180591061125d5750595b908082528060200260200182016040525b50925060009150600090505b60055481101561131d578580156112b257506000600082815260200190815260200160002060030160009054906101000a900460ff16155b806112e657508480156112e557506000600082815260200190815260200160002060030160009054906101000a900460ff165b5b1561130f578083838151811015156112fa57fe5b90602001906020020181815250506001820191505b5b808060010191505061127a565b87870360405180591061132d5750595b908082528060200260200182016040525b5093508790505b8681101561139157828181518110151561135b57fe5b906020019060200201518489830381518110151561137557fe5b90602001906020020181815250505b8080600101915050611345565b5b505050949350505050565b6113a5611f35565b6113ad611f35565b600060006003805490506040518059106113c45750595b908082528060200260200182016040525b50925060009150600090505b6003805490508110156115275760016000868152602001908152602001600020600060038381548110151561141257fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156115195760038181548110151561149b57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683838151811015156114d657fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001820191505b5b80806001019150506113e1565b816040518059106115355750595b908082528060200260200182016040525b509350600090505b818110156115c657828181518110151561156457fe5b90602001906020020151848281518110151561157c57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b808060010191505061154e565b5b505050919050565b60055481565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116105760006000fd5b60038054905081603282118061162557508181115b806116305750600081145b8061163b5750600082145b156116465760006000fd5b826004819055507fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a836040518082815260200191505060405180910390a15b5b50505b50565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156116e65760006000fd5b8160006000600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156117425760006000fd5b82336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156117ad5760006000fd5b60016001600087815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550843373ffffffffffffffffffffffffffffffffffffffff167f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef60405180905060405180910390a361186685611bc1565b5b5b50505b505b5050565b600061187e848484611d86565b90506118898161168c565b5b9392505050565b603281565b60045481565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156118d95760006000fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156119335760006000fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561198c5760006000fd5b600092505b600380549050831015611a7a578473ffffffffffffffffffffffffffffffffffffffff166003848154811015156119c457fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611a6c5783600384815481101515611a1d57fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611a7a565b5b8280600101935050611991565b6000600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508473ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405180905060405180910390a28373ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405180905060405180910390a25b5b505b505b505050565b6000816000600082815260200190815260200160002060030160009054906101000a900460ff1615611bf35760006000fd5b611bfc83610f8e565b15611d7f5760006000848152602001908152602001600020915060018260030160006101000a81548160ff0219169083151502179055508160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168260010154836002016040518082805460018160011615610100020316600290048015611cdc5780601f10611cb157610100808354040283529160200191611cdc565b820191906000526020600020905b815481529060010190602001808311611cbf57829003601f168201915b505091505060006040518083038185876185025a03f19250505015611d3057827f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7560405180905060405180910390a2611d7e565b827f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923660405180905060405180910390a260008260030160006101000a81548160ff0219169083151502179055505b5b5b5b505050565b60008360008173ffffffffffffffffffffffffffffffffffffffff161415611dae5760006000fd5b60055491506080604051908101604052808673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001600015158152506000600084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101556040820151816002019080519060200190611e6e929190611f5d565b5060608201518160030160006101000a81548160ff0219169083151502179055509050506001600560008282540192505081905550817fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5160405180905060405180910390a25b5b509392505050565b815481835581811511611f0457818360005260206000209182019101611f039190611fdd565b5b505050565b815481835581811511611f3057818360005260206000209182019101611f2f9190611fdd565b5b505050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611f9e57805160ff1916838001178555611fcc565b82800160010185558215611fcc579182015b82811115611fcb578251825591602001919060010190611fb0565b5b509050611fd99190611fdd565b5090565b611fff91905b80821115611ffb576000816000905550600101611fe3565b5090565b905600a165627a7a723058200a8e23793500b02c6ba5fd192656d8e75bd9e4479e5c539e0b34d50459bf3e560029", + "updated_at": 1517539064795 + } + } +} diff --git a/packages/contracts/src/artifacts/MultiSigWalletWithTimeLock.json b/packages/contracts/src/artifacts/MultiSigWalletWithTimeLock.json new file mode 100644 index 000000000..2c97612ac --- /dev/null +++ b/packages/contracts/src/artifacts/MultiSigWalletWithTimeLock.json @@ -0,0 +1,600 @@ +{ + "contract_name": "MultiSigWalletWithTimeLock", + "networks": { + "50": { + "solc_version": "0.4.10", + "keccak256": "0x73f2aeb4c300248f7c2c851b085e41525007202decc34831880688f1aee6e126", + "optimizer_enabled": 0, + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "owners", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "removeOwner", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "revokeConfirmation", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "isOwner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "address" + } + ], + "name": "confirmations", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "secondsTimeLocked", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "pending", + "type": "bool" + }, + { + "name": "executed", + "type": "bool" + } + ], + "name": "getTransactionCount", + "outputs": [ + { + "name": "count", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "addOwner", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "isConfirmed", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_secondsTimeLocked", + "type": "uint256" + } + ], + "name": "changeTimeLock", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "getConfirmationCount", + "outputs": [ + { + "name": "count", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "transactions", + "outputs": [ + { + "name": "destination", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + }, + { + "name": "executed", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getOwners", + "outputs": [ + { + "name": "", + "type": "address[]" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "from", + "type": "uint256" + }, + { + "name": "to", + "type": "uint256" + }, + { + "name": "pending", + "type": "bool" + }, + { + "name": "executed", + "type": "bool" + } + ], + "name": "getTransactionIds", + "outputs": [ + { + "name": "_transactionIds", + "type": "uint256[]" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "getConfirmations", + "outputs": [ + { + "name": "_confirmations", + "type": "address[]" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "transactionCount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_required", + "type": "uint256" + } + ], + "name": "changeRequirement", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "confirmTransaction", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "destination", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "submitTransaction", + "outputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "confirmationTimes", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_OWNER_COUNT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "required", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "newOwner", + "type": "address" + } + ], + "name": "replaceOwner", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "executeTransaction", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "inputs": [ + { + "name": "_owners", + "type": "address[]" + }, + { + "name": "_required", + "type": "uint256" + }, + { + "name": "_secondsTimeLocked", + "type": "uint256" + } + ], + "payable": false, + "type": "constructor" + }, + { + "payable": true, + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + }, + { + "indexed": false, + "name": "confirmationTime", + "type": "uint256" + } + ], + "name": "ConfirmationTimeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "secondsTimeLocked", + "type": "uint256" + } + ], + "name": "TimeLockChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + } + ], + "name": "Confirmation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + } + ], + "name": "Revocation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + } + ], + "name": "Submission", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + } + ], + "name": "Execution", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + } + ], + "name": "ExecutionFailure", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + } + ], + "name": "OwnerAddition", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + } + ], + "name": "OwnerRemoval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "required", + "type": "uint256" + } + ], + "name": "RequirementChange", + "type": "event" + } + ], + "unlinked_binary": + "0x606060405234156200000d57fe5b6040516200250138038062002501833981016040528080518201919060200180519060200190919080519060200190919050505b82825b600082518260328211806200005857508181115b80620000645750600081145b80620000705750600082145b156200007c5760006000fd5b600092505b8451831015620001b5576002600086858151811015156200009e57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806200012a5750600085848151811015156200010857fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff16145b15620001365760006000fd5b60016002600087868151811015156200014b57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b828060010193505062000081565b8460039080519060200190620001cd929190620001ed565b50836004819055505b5b5050505050806006819055505b505050620002c2565b82805482825590600052602060002090810192821562000269579160200282015b82811115620002685782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550916020019190600101906200020e565b5b5090506200027891906200027c565b5090565b620002bf91905b80821115620002bb57600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555060010162000283565b5090565b90565b61222f80620002d26000396000f3006060604052361561013c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063025e7c271461019d578063173825d9146101fd57806320ea8d86146102335780632f54bf6e146102535780633411c81c146102a157806337bd78a0146102f8578063547415251461031e5780637065cb481461035f578063784547a7146103955780637ad28c51146103cd5780638b51d13f146103ed5780639ace38c214610421578063a0e67e2b1461051c578063a8abe69a14610591578063b5dc40c314610633578063b77bf600146106b6578063ba51a6df146106dc578063c01a8c84146106fc578063c64274741461071c578063d38f2d82146107b2578063d74f8edd146107e6578063dc8452cd1461080c578063e20056e614610832578063ee22610b14610887575b61019b5b6000341115610198573373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a25b5b565b005b34156101a557fe5b6101bb60048080359060200190919050506108a7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561020557fe5b610231600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108e7565b005b341561023b57fe5b6102516004808035906020019091905050610b8f565b005b341561025b57fe5b610287600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d59565b604051808215151515815260200191505060405180910390f35b34156102a957fe5b6102de600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d79565b604051808215151515815260200191505060405180910390f35b341561030057fe5b610308610da8565b6040518082815260200191505060405180910390f35b341561032657fe5b610349600480803515159060200190919080351515906020019091905050610dae565b6040518082815260200191505060405180910390f35b341561036757fe5b610393600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e45565b005b341561039d57fe5b6103b36004808035906020019091905050611048565b604051808215151515815260200191505060405180910390f35b34156103d557fe5b6103eb6004808035906020019091905050611132565b005b34156103f557fe5b61040b60048080359060200190919050506111b0565b6040518082815260200191505060405180910390f35b341561042957fe5b61043f6004808035906020019091905050611280565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018315151515815260200182810382528481815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561050a5780601f106104df5761010080835404028352916020019161050a565b820191906000526020600020905b8154815290600101906020018083116104ed57829003601f168201915b50509550505050505060405180910390f35b341561052457fe5b61052c6112dc565b604051808060200182810382528381815181526020019150805190602001906020028083836000831461057e575b80518252602083111561057e5760208201915060208101905060208303925061055a565b5050509050019250505060405180910390f35b341561059957fe5b6105ce600480803590602001909190803590602001909190803515159060200190919080351515906020019091905050611371565b6040518080602001828103825283818151815260200191508051906020019060200280838360008314610620575b805182526020831115610620576020820191506020810190506020830392506105fc565b5050509050019250505060405180910390f35b341561063b57fe5b61065160048080359060200190919050506114d5565b60405180806020018281038252838181518152602001915080519060200190602002808383600083146106a3575b8051825260208311156106a35760208201915060208101905060208303925061067f565b5050509050019250505060405180910390f35b34156106be57fe5b6106c6611707565b6040518082815260200191505060405180910390f35b34156106e457fe5b6106fa600480803590602001909190505061170d565b005b341561070457fe5b61071a60048080359060200190919050506117c4565b005b341561072457fe5b61079c600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506119d2565b6040518082815260200191505060405180910390f35b34156107ba57fe5b6107d060048080359060200190919050506119f2565b6040518082815260200191505060405180910390f35b34156107ee57fe5b6107f6611a0a565b6040518082815260200191505060405180910390f35b341561081457fe5b61081c611a0f565b6040518082815260200191505060405180910390f35b341561083a57fe5b610885600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611a15565b005b341561088f57fe5b6108a56004808035906020019091905050611d3a565b005b6003818154811015156108b657fe5b906000526020600020900160005b915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109245760006000fd5b81600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561097e5760006000fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600091505b600160038054905003821015610b0a578273ffffffffffffffffffffffffffffffffffffffff16600383815481101515610a1157fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610afc576003600160038054905003815481101515610a7157fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600383815481101515610aad57fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610b0a565b5b81806001019250506109db565b6001600381818054905003915081610b2291906120de565b506003805490506004541115610b4157610b4060038054905061170d565b5b8273ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405180905060405180910390a25b5b505b5050565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610be95760006000fd5b81336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610c555760006000fd5b836000600082815260200190815260200160002060030160009054906101000a900460ff1615610c855760006000fd5b84610c8f81611048565b151515610c9c5760006000fd5b60006001600088815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550853373ffffffffffffffffffffffffffffffffffffffff167ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e960405180905060405180910390a35b5b505b505b50505b5050565b60026020528060005260406000206000915054906101000a900460ff1681565b60016020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60065481565b60006000600090505b600554811015610e3d57838015610def57506000600082815260200190815260200160002060030160009054906101000a900460ff16155b80610e235750828015610e2257506000600082815260200190815260200160002060030160009054906101000a900460ff165b5b15610e2f576001820191505b5b8080600101915050610db7565b5b5092915050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e805760006000fd5b80600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610ed95760006000fd5b8160008173ffffffffffffffffffffffffffffffffffffffff161415610eff5760006000fd5b6001600380549050016004546032821180610f1957508181115b80610f245750600081145b80610f2f5750600082145b15610f3a5760006000fd5b6001600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060038054806001018281610fa6919061210a565b916000526020600020900160005b87909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508473ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405180905060405180910390a25b5b50505b505b505b50565b60006000600060009150600090505b60038054905081101561112a5760016000858152602001908152602001600020600060038381548110151561108857fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611109576001820191505b60045482141561111c576001925061112b565b5b8080600101915050611057565b5b5050919050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561116d5760006000fd5b806006819055507fd1c9101a34feff75cccef14a28785a0279cb0b49c1f321f21f5f422e746b4377816040518082815260200191505060405180910390a15b5b50565b60006000600090505b600380549050811015611279576001600084815260200190815260200160002060006003838154811015156111ea57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561126b576001820191505b5b80806001019150506111b9565b5b50919050565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600101549080600201908060030160009054906101000a900460ff16905084565b6112e4612136565b600380548060200260200160405190810160405280929190818152602001828054801561136657602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161131c575b505050505090505b90565b61137961214a565b61138161214a565b600060006005546040518059106113955750595b908082528060200260200182016040525b50925060009150600090505b600554811015611455578580156113ea57506000600082815260200190815260200160002060030160009054906101000a900460ff16155b8061141e575084801561141d57506000600082815260200190815260200160002060030160009054906101000a900460ff165b5b156114475780838381518110151561143257fe5b90602001906020020181815250506001820191505b5b80806001019150506113b2565b8787036040518059106114655750595b908082528060200260200182016040525b5093508790505b868110156114c957828181518110151561149357fe5b90602001906020020151848983038151811015156114ad57fe5b90602001906020020181815250505b808060010191505061147d565b5b505050949350505050565b6114dd612136565b6114e5612136565b600060006003805490506040518059106114fc5750595b908082528060200260200182016040525b50925060009150600090505b60038054905081101561165f5760016000868152602001908152602001600020600060038381548110151561154a57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611651576003818154811015156115d357fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838381518110151561160e57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001820191505b5b8080600101915050611519565b8160405180591061166d5750595b908082528060200260200182016040525b509350600090505b818110156116fe57828181518110151561169c57fe5b9060200190602002015184828151811015156116b457fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b8080600101915050611686565b5b505050919050565b60055481565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156117485760006000fd5b60038054905081603282118061175d57508181115b806117685750600081145b806117735750600082145b1561177e5760006000fd5b826004819055507fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a836040518082815260200191505060405180910390a15b5b50505b50565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561181e5760006000fd5b8160006000600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561187a5760006000fd5b82336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156118e55760006000fd5b846118ef81611048565b1515156118fc5760006000fd5b60016001600088815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550853373ffffffffffffffffffffffffffffffffffffffff167f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef60405180905060405180910390a36119b586611048565b156119c5576119c48642611f32565b5b5b5b505b50505b505b5050565b60006119df848484611f87565b90506119ea816117c4565b5b9392505050565b60076020528060005260406000206000915090505481565b603281565b60045481565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a525760006000fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611aac5760006000fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611b055760006000fd5b600092505b600380549050831015611bf3578473ffffffffffffffffffffffffffffffffffffffff16600384815481101515611b3d57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611be55783600384815481101515611b9657fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611bf3565b5b8280600101935050611b0a565b6000600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508473ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405180905060405180910390a28373ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405180905060405180910390a25b5b505b505b505050565b6000816000600082815260200190815260200160002060030160009054906101000a900460ff1615611d6c5760006000fd5b82611d7681611048565b1515611d825760006000fd5b836006546007600083815260200190815260200160002054014210151515611daa5760006000fd5b60006000868152602001908152602001600020935060018460030160006101000a81548160ff0219169083151502179055508360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168460010154856002016040518082805460018160011615610100020316600290048015611e855780601f10611e5a57610100808354040283529160200191611e85565b820191906000526020600020905b815481529060010190602001808311611e6857829003601f168201915b505091505060006040518083038185876185025a03f19250505015611ed957847f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7560405180905060405180910390a2611f27565b847f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923660405180905060405180910390a260008460030160006101000a81548160ff0219169083151502179055505b5b5b505b505b505050565b806007600084815260200190815260200160002081905550817f0b237afe65f1514fd7ea3f923ea4fe792bdd07000a912b6cd1602a8e7f573c8d826040518082815260200191505060405180910390a25b5050565b60008360008173ffffffffffffffffffffffffffffffffffffffff161415611faf5760006000fd5b60055491506080604051908101604052808673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001600015158152506000600084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155604082015181600201908051906020019061206f92919061215e565b5060608201518160030160006101000a81548160ff0219169083151502179055509050506001600560008282540192505081905550817fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5160405180905060405180910390a25b5b509392505050565b8154818355818115116121055781836000526020600020918201910161210491906121de565b5b505050565b8154818355818115116121315781836000526020600020918201910161213091906121de565b5b505050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061219f57805160ff19168380011785556121cd565b828001600101855582156121cd579182015b828111156121cc5782518255916020019190600101906121b1565b5b5090506121da91906121de565b5090565b61220091905b808211156121fc5760008160009055506001016121e4565b5090565b905600a165627a7a7230582038efb3dddde115c814a22908eeab5e492de8fc546bd0b86b0d1c01cde609b9640029", + "updated_at": 1517539066554 + } + } +} diff --git a/packages/contracts/src/artifacts/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.json b/packages/contracts/src/artifacts/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.json new file mode 100644 index 000000000..d65371cf2 --- /dev/null +++ b/packages/contracts/src/artifacts/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.json @@ -0,0 +1,648 @@ +{ + "contract_name": "MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress", + "networks": { + "50": { + "solc_version": "0.4.10", + "keccak256": "0xda08395db72af1130287a88849e0cf0c895eb7c98e41483df3a4d457ca832910", + "optimizer_enabled": 0, + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "owners", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "removeOwner", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "revokeConfirmation", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "isOwner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "address" + } + ], + "name": "confirmations", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "secondsTimeLocked", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "pending", + "type": "bool" + }, + { + "name": "executed", + "type": "bool" + } + ], + "name": "getTransactionCount", + "outputs": [ + { + "name": "count", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "data", + "type": "bytes" + } + ], + "name": "isFunctionRemoveAuthorizedAddress", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "executeRemoveAuthorizedAddress", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "addOwner", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "isConfirmed", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_secondsTimeLocked", + "type": "uint256" + } + ], + "name": "changeTimeLock", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "getConfirmationCount", + "outputs": [ + { + "name": "count", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "transactions", + "outputs": [ + { + "name": "destination", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + }, + { + "name": "executed", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getOwners", + "outputs": [ + { + "name": "", + "type": "address[]" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "from", + "type": "uint256" + }, + { + "name": "to", + "type": "uint256" + }, + { + "name": "pending", + "type": "bool" + }, + { + "name": "executed", + "type": "bool" + } + ], + "name": "getTransactionIds", + "outputs": [ + { + "name": "_transactionIds", + "type": "uint256[]" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "TOKEN_TRANSFER_PROXY_CONTRACT", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "getConfirmations", + "outputs": [ + { + "name": "_confirmations", + "type": "address[]" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "transactionCount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_required", + "type": "uint256" + } + ], + "name": "changeRequirement", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "confirmTransaction", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "destination", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "submitTransaction", + "outputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "confirmationTimes", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_OWNER_COUNT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "required", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "newOwner", + "type": "address" + } + ], + "name": "replaceOwner", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "transactionId", + "type": "uint256" + } + ], + "name": "executeTransaction", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "inputs": [ + { + "name": "_owners", + "type": "address[]" + }, + { + "name": "_required", + "type": "uint256" + }, + { + "name": "_secondsTimeLocked", + "type": "uint256" + }, + { + "name": "_tokenTransferProxy", + "type": "address" + } + ], + "payable": false, + "type": "constructor" + }, + { + "payable": true, + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + }, + { + "indexed": false, + "name": "confirmationTime", + "type": "uint256" + } + ], + "name": "ConfirmationTimeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "secondsTimeLocked", + "type": "uint256" + } + ], + "name": "TimeLockChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + } + ], + "name": "Confirmation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + } + ], + "name": "Revocation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + } + ], + "name": "Submission", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + } + ], + "name": "Execution", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "transactionId", + "type": "uint256" + } + ], + "name": "ExecutionFailure", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + } + ], + "name": "OwnerAddition", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + } + ], + "name": "OwnerRemoval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "required", + "type": "uint256" + } + ], + "name": "RequirementChange", + "type": "event" + } + ], + "unlinked_binary": + "0x606060405234156200000d57fe5b60405162002adb38038062002adb833981016040528080518201919060200180519060200190919080519060200190919080519060200190919050505b8383835b82825b600082518260328211806200006557508181115b80620000715750600081145b806200007d5750600082145b15620000895760006000fd5b600092505b8451831015620001c257600260008685815181101515620000ab57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680620001375750600085848151811015156200011557fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff16145b15620001435760006000fd5b60016002600087868151811015156200015857fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b82806001019350506200008e565b8460039080519060200190620001da92919062000240565b50836004819055505b5b5050505050806006819055505b50505080600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5050505062000315565b828054828255906000526020600020908101928215620002bc579160200282015b82811115620002bb5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509160200191906001019062000261565b5b509050620002cb9190620002cf565b5090565b6200031291905b808211156200030e57600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101620002d6565b5090565b90565b6127b680620003256000396000f3006060604052361561015d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063025e7c27146101be578063173825d91461021e57806320ea8d86146102545780632f54bf6e146102745780633411c81c146102c257806337bd78a014610319578063547415251461033f578063553a48fd146103805780635711b311146103f25780637065cb4814610412578063784547a7146104485780637ad28c51146104805780638b51d13f146104a05780639ace38c2146104d4578063a0e67e2b146105cf578063a8abe69a14610644578063add1cbc5146106e6578063b5dc40c314610738578063b77bf600146107bb578063ba51a6df146107e1578063c01a8c8414610801578063c642747414610821578063d38f2d82146108b7578063d74f8edd146108eb578063dc8452cd14610911578063e20056e614610937578063ee22610b1461098c575b6101bc5b60003411156101b9573373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a25b5b565b005b34156101c657fe5b6101dc60048080359060200190919050506109ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561022657fe5b610252600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506109ec565b005b341561025c57fe5b6102726004808035906020019091905050610c94565b005b341561027c57fe5b6102a8600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e5e565b604051808215151515815260200191505060405180910390f35b34156102ca57fe5b6102ff600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e7e565b604051808215151515815260200191505060405180910390f35b341561032157fe5b610329610ead565b6040518082815260200191505060405180910390f35b341561034757fe5b61036a600480803515159060200190919080351515906020019091905050610eb3565b6040518082815260200191505060405180910390f35b341561038857fe5b6103d8600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610f4a565b604051808215151515815260200191505060405180910390f35b34156103fa57fe5b610410600480803590602001909190505061108b565b005b341561041a57fe5b610446600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506113a6565b005b341561045057fe5b61046660048080359060200190919050506115a9565b604051808215151515815260200191505060405180910390f35b341561048857fe5b61049e6004808035906020019091905050611693565b005b34156104a857fe5b6104be6004808035906020019091905050611711565b6040518082815260200191505060405180910390f35b34156104dc57fe5b6104f260048080359060200190919050506117e1565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001831515151581526020018281038252848181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156105bd5780601f10610592576101008083540402835291602001916105bd565b820191906000526020600020905b8154815290600101906020018083116105a057829003601f168201915b50509550505050505060405180910390f35b34156105d757fe5b6105df61183d565b6040518080602001828103825283818151815260200191508051906020019060200280838360008314610631575b8051825260208311156106315760208201915060208101905060208303925061060d565b5050509050019250505060405180910390f35b341561064c57fe5b6106816004808035906020019091908035906020019091908035151590602001909190803515159060200190919050506118d2565b60405180806020018281038252838181518152602001915080519060200190602002808383600083146106d3575b8051825260208311156106d3576020820191506020810190506020830392506106af565b5050509050019250505060405180910390f35b34156106ee57fe5b6106f6611a36565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561074057fe5b6107566004808035906020019091905050611a5c565b60405180806020018281038252838181518152602001915080519060200190602002808383600083146107a8575b8051825260208311156107a857602082019150602081019050602083039250610784565b5050509050019250505060405180910390f35b34156107c357fe5b6107cb611c8e565b6040518082815260200191505060405180910390f35b34156107e957fe5b6107ff6004808035906020019091905050611c94565b005b341561080957fe5b61081f6004808035906020019091905050611d4b565b005b341561082957fe5b6108a1600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611f59565b6040518082815260200191505060405180910390f35b34156108bf57fe5b6108d56004808035906020019091905050611f79565b6040518082815260200191505060405180910390f35b34156108f357fe5b6108fb611f91565b6040518082815260200191505060405180910390f35b341561091957fe5b610921611f96565b6040518082815260200191505060405180910390f35b341561093f57fe5b61098a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611f9c565b005b341561099457fe5b6109aa60048080359060200190919050506122c1565b005b6003818154811015156109bb57fe5b906000526020600020900160005b915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a295760006000fd5b81600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610a835760006000fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600091505b600160038054905003821015610c0f578273ffffffffffffffffffffffffffffffffffffffff16600383815481101515610b1657fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610c01576003600160038054905003815481101515610b7657fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600383815481101515610bb257fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610c0f565b5b8180600101925050610ae0565b6001600381818054905003915081610c279190612665565b506003805490506004541115610c4657610c45600380549050611c94565b5b8273ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405180905060405180910390a25b5b505b5050565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610cee5760006000fd5b81336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610d5a5760006000fd5b836000600082815260200190815260200160002060030160009054906101000a900460ff1615610d8a5760006000fd5b84610d94816115a9565b151515610da15760006000fd5b60006001600088815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550853373ffffffffffffffffffffffffffffffffffffffff167ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e960405180905060405180910390a35b5b505b505b50505b5050565b60026020528060005260406000206000915054906101000a900460ff1681565b60016020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60065481565b60006000600090505b600554811015610f4257838015610ef457506000600082815260200190815260200160002060030160009054906101000a900460ff16155b80610f285750828015610f2757506000600082815260200190815260200160002060030160009054906101000a900460ff165b5b15610f34576001820191505b5b8080600101915050610ebc565b5b5092915050565b60006000600060405180807f72656d6f7665417574686f72697a656441646472657373286164647265737329815250602001905060405180910390209150600090505b600481101561107f578181600481101515610fa457fe5b1a7f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168482815181101515610ff757fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415156110715760006000fd5b5b8080600101915050610f8d565b600192505b5050919050565b6000816000600082815260200190815260200160002060030160009054906101000a900460ff16156110bd5760006000fd5b826110c7816115a9565b15156110d35760006000fd5b836000600060008381526020019081526020016000209050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561116c5760006000fd5b611211816002018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156112075780601f106111dc57610100808354040283529160200191611207565b820191906000526020600020905b8154815290600101906020018083116111ea57829003601f168201915b5050505050610f4a565b151561121d5760006000fd5b60006000878152602001908152602001600020945060018560030160006101000a81548160ff0219169083151502179055508460000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1685600101548660020160405180828054600181600116156101000203166002900480156112f85780601f106112cd576101008083540402835291602001916112f8565b820191906000526020600020905b8154815290600101906020018083116112db57829003601f168201915b505091505060006040518083038185876185025a03f1925050501561134c57857f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7560405180905060405180910390a261139a565b857f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923660405180905060405180910390a260008560030160006101000a81548160ff0219169083151502179055505b5b5b50505b505b505050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156113e15760006000fd5b80600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561143a5760006000fd5b8160008173ffffffffffffffffffffffffffffffffffffffff1614156114605760006000fd5b600160038054905001600454603282118061147a57508181115b806114855750600081145b806114905750600082145b1561149b5760006000fd5b6001600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600380548060010182816115079190612691565b916000526020600020900160005b87909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508473ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405180905060405180910390a25b5b50505b505b505b50565b60006000600060009150600090505b60038054905081101561168b576001600085815260200190815260200160002060006003838154811015156115e957fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561166a576001820191505b60045482141561167d576001925061168c565b5b80806001019150506115b8565b5b5050919050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116ce5760006000fd5b806006819055507fd1c9101a34feff75cccef14a28785a0279cb0b49c1f321f21f5f422e746b4377816040518082815260200191505060405180910390a15b5b50565b60006000600090505b6003805490508110156117da5760016000848152602001908152602001600020600060038381548110151561174b57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156117cc576001820191505b5b808060010191505061171a565b5b50919050565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600101549080600201908060030160009054906101000a900460ff16905084565b6118456126bd565b60038054806020026020016040519081016040528092919081815260200182805480156118c757602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161187d575b505050505090505b90565b6118da6126d1565b6118e26126d1565b600060006005546040518059106118f65750595b908082528060200260200182016040525b50925060009150600090505b6005548110156119b65785801561194b57506000600082815260200190815260200160002060030160009054906101000a900460ff16155b8061197f575084801561197e57506000600082815260200190815260200160002060030160009054906101000a900460ff165b5b156119a85780838381518110151561199357fe5b90602001906020020181815250506001820191505b5b8080600101915050611913565b8787036040518059106119c65750595b908082528060200260200182016040525b5093508790505b86811015611a2a5782818151811015156119f457fe5b9060200190602002015184898303815181101515611a0e57fe5b90602001906020020181815250505b80806001019150506119de565b5b505050949350505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611a646126bd565b611a6c6126bd565b60006000600380549050604051805910611a835750595b908082528060200260200182016040525b50925060009150600090505b600380549050811015611be657600160008681526020019081526020016000206000600383815481101515611ad157fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611bd857600381815481101515611b5a57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168383815181101515611b9557fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001820191505b5b8080600101915050611aa0565b81604051805910611bf45750595b908082528060200260200182016040525b509350600090505b81811015611c85578281815181101515611c2357fe5b906020019060200201518482815181101515611c3b57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b8080600101915050611c0d565b5b505050919050565b60055481565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611ccf5760006000fd5b600380549050816032821180611ce457508181115b80611cef5750600081145b80611cfa5750600082145b15611d055760006000fd5b826004819055507fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a836040518082815260200191505060405180910390a15b5b50505b50565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611da55760006000fd5b8160006000600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611e015760006000fd5b82336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611e6c5760006000fd5b84611e76816115a9565b151515611e835760006000fd5b60016001600088815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550853373ffffffffffffffffffffffffffffffffffffffff167f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef60405180905060405180910390a3611f3c866115a9565b15611f4c57611f4b86426124b9565b5b5b5b505b50505b505b5050565b6000611f6684848461250e565b9050611f7181611d4b565b5b9392505050565b60076020528060005260406000206000915090505481565b603281565b60045481565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611fd95760006000fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156120335760006000fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561208c5760006000fd5b600092505b60038054905083101561217a578473ffffffffffffffffffffffffffffffffffffffff166003848154811015156120c457fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561216c578360038481548110151561211d57fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061217a565b5b8280600101935050612091565b6000600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508473ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405180905060405180910390a28373ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405180905060405180910390a25b5b505b505b505050565b6000816000600082815260200190815260200160002060030160009054906101000a900460ff16156122f35760006000fd5b826122fd816115a9565b15156123095760006000fd5b8360065460076000838152602001908152602001600020540142101515156123315760006000fd5b60006000868152602001908152602001600020935060018460030160006101000a81548160ff0219169083151502179055508360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16846001015485600201604051808280546001816001161561010002031660029004801561240c5780601f106123e15761010080835404028352916020019161240c565b820191906000526020600020905b8154815290600101906020018083116123ef57829003601f168201915b505091505060006040518083038185876185025a03f1925050501561246057847f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7560405180905060405180910390a26124ae565b847f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923660405180905060405180910390a260008460030160006101000a81548160ff0219169083151502179055505b5b5b505b505b505050565b806007600084815260200190815260200160002081905550817f0b237afe65f1514fd7ea3f923ea4fe792bdd07000a912b6cd1602a8e7f573c8d826040518082815260200191505060405180910390a25b5050565b60008360008173ffffffffffffffffffffffffffffffffffffffff1614156125365760006000fd5b60055491506080604051908101604052808673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001600015158152506000600084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020190805190602001906125f69291906126e5565b5060608201518160030160006101000a81548160ff0219169083151502179055509050506001600560008282540192505081905550817fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5160405180905060405180910390a25b5b509392505050565b81548183558181151161268c5781836000526020600020918201910161268b9190612765565b5b505050565b8154818355818115116126b8578183600052602060002091820191016126b79190612765565b5b505050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061272657805160ff1916838001178555612754565b82800160010185558215612754579182015b82811115612753578251825591602001919060010190612738565b5b5090506127619190612765565b5090565b61278791905b8082111561278357600081600090555060010161276b565b5090565b905600a165627a7a72305820e460b58d5bd3a5224257358a24e4e34b192e61ef5ebd051c779a5117c38a2a060029", + "updated_at": 1517539075978 + } + } +} diff --git a/packages/contracts/src/artifacts/Ownable.json b/packages/contracts/src/artifacts/Ownable.json new file mode 100644 index 000000000..5a2a84a6d --- /dev/null +++ b/packages/contracts/src/artifacts/Ownable.json @@ -0,0 +1,49 @@ +{ + "contract_name": "Ownable", + "networks": { + "50": { + "solc_version": "0.4.18", + "keccak256": "0x04e5204925913f5ff6b8193f4ab38eef9d53fc9a553f1a737924fc69db492a99", + "optimizer_enabled": 0, + "abi": [ + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "unlinked_binary": + "0x6060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102058061005e6000396000f30060606040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638da5cb5b14610051578063f2fde38b146100a6575b600080fd5b341561005c57600080fd5b6100646100df565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100b157600080fd5b6100dd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610104565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561015f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156101d657806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b505600a165627a7a723058202c25abe7564c2f872e2f210a96faa6c7691055d67e9a3edd56dcef376c646e170029", + "updated_at": 1517509621376 + } + } +} diff --git a/packages/contracts/src/artifacts/Ownable_v1.json b/packages/contracts/src/artifacts/Ownable_v1.json new file mode 100644 index 000000000..250952533 --- /dev/null +++ b/packages/contracts/src/artifacts/Ownable_v1.json @@ -0,0 +1,46 @@ +{ + "contract_name": "Ownable_v1", + "networks": { + "50": { + "solc_version": "0.4.11", + "keccak256": "0x82a6595d8d4c3c9cd44ef0fd8f77528195c35c8173970d2b119374f5d74332f4", + "optimizer_enabled": 0, + "abi": [ + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "inputs": [], + "payable": false, + "type": "constructor" + } + ], + "unlinked_binary": + "0x6060604052341561000c57fe5b5b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b6101fa8061005f6000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638da5cb5b14610046578063f2fde38b14610098575bfe5b341561004e57fe5b6100566100ce565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100a057fe5b6100cc600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506100f4565b005b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156101515760006000fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156101c95780600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b5b505600a165627a7a723058201bce811586dc86b1fc25fa9779089c5bf0b5d2cf9e981a580ef44253300866520029", + "updated_at": 1517535966230 + } + } +} diff --git a/packages/contracts/src/artifacts/SafeMath.json b/packages/contracts/src/artifacts/SafeMath.json new file mode 100644 index 000000000..cbe88bef6 --- /dev/null +++ b/packages/contracts/src/artifacts/SafeMath.json @@ -0,0 +1,14 @@ +{ + "contract_name": "SafeMath", + "networks": { + "50": { + "solc_version": "0.4.18", + "keccak256": "0xb1d52f567a893c86f452bd80fbb6907d992046a31b35830bc779116d23fd5549", + "optimizer_enabled": 0, + "abi": [], + "unlinked_binary": + "0x60606040523415600e57600080fd5b603580601b6000396000f3006060604052600080fd00a165627a7a723058206526256c7c1e7d1d1b2df1caefcbd76717428d6237de37aacbb5097658456b720029", + "updated_at": 1517509621492 + } + } +} diff --git a/packages/contracts/src/artifacts/SafeMath_v1.json b/packages/contracts/src/artifacts/SafeMath_v1.json new file mode 100644 index 000000000..bad4834c0 --- /dev/null +++ b/packages/contracts/src/artifacts/SafeMath_v1.json @@ -0,0 +1,14 @@ +{ + "contract_name": "SafeMath_v1", + "networks": { + "50": { + "solc_version": "0.4.11", + "keccak256": "0xd2c1f0518a23e63d5892f66e7b8d228c7486495b139a0f3b049f6ba7803c892d", + "optimizer_enabled": 0, + "abi": [], + "unlinked_binary": + "0x60606040523415600b57fe5b5b60338060196000396000f30060606040525bfe00a165627a7a72305820acbb91f6e4b200e929056917b84223c3fedbdeca5c35f7bf9292edf2a8ee4aa00029", + "updated_at": 1517509621851 + } + } +} diff --git a/packages/contracts/src/artifacts/Token.json b/packages/contracts/src/artifacts/Token.json new file mode 100644 index 000000000..601facc28 --- /dev/null +++ b/packages/contracts/src/artifacts/Token.json @@ -0,0 +1,174 @@ +{ + "contract_name": "Token", + "networks": { + "50": { + "solc_version": "0.4.18", + "keccak256": "0xe43382be55ddb9c7a28567b4cc59e35072da198e6c49a90ff1396aa8399fd61e", + "optimizer_enabled": 0, + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "unlinked_binary": + "0x6060604052341561000f57600080fd5b6102ac8061001e6000396000f30060606040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007257806323b872dd146100cc57806370a0823114610145578063a9059cbb14610192578063dd62ed3e146101ec575b600080fd5b341561007d57600080fd5b6100b2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610258565b604051808215151515815260200191505060405180910390f35b34156100d757600080fd5b61012b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610260565b604051808215151515815260200191505060405180910390f35b341561015057600080fd5b61017c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610269565b6040518082815260200191505060405180910390f35b341561019d57600080fd5b6101d2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610270565b604051808215151515815260200191505060405180910390f35b34156101f757600080fd5b610242600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610278565b6040518082815260200191505060405180910390f35b600092915050565b60009392505050565b6000919050565b600092915050565b6000929150505600a165627a7a723058201ef98a5ecc619c89a935fee340b114a09fe44aa51aa765f4037dd3423f49d42d0029", + "updated_at": 1517509619496 + } + } +} diff --git a/packages/contracts/src/artifacts/TokenRegistry.json b/packages/contracts/src/artifacts/TokenRegistry.json new file mode 100644 index 000000000..b4264430b --- /dev/null +++ b/packages/contracts/src/artifacts/TokenRegistry.json @@ -0,0 +1,540 @@ +{ + "contract_name": "TokenRegistry", + "networks": { + "50": { + "solc_version": "0.4.11", + "keccak256": "0xfaf2e3107cfafb9925c2ce51653c3f636bffff9e6528cc61c6341a3e27ca3c6b", + "optimizer_enabled": 0, + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + }, + { + "name": "_index", + "type": "uint256" + } + ], + "name": "removeToken", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_name", + "type": "string" + } + ], + "name": "getTokenAddressByName", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_symbol", + "type": "string" + } + ], + "name": "getTokenAddressBySymbol", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + }, + { + "name": "_swarmHash", + "type": "bytes" + } + ], + "name": "setTokenSwarmHash", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_token", + "type": "address" + } + ], + "name": "getTokenMetaData", + "outputs": [ + { + "name": "", + "type": "address" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "uint8" + }, + { + "name": "", + "type": "bytes" + }, + { + "name": "", + "type": "bytes" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + }, + { + "name": "_name", + "type": "string" + }, + { + "name": "_symbol", + "type": "string" + }, + { + "name": "_decimals", + "type": "uint8" + }, + { + "name": "_ipfsHash", + "type": "bytes" + }, + { + "name": "_swarmHash", + "type": "bytes" + } + ], + "name": "addToken", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + }, + { + "name": "_name", + "type": "string" + } + ], + "name": "setTokenName", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "tokens", + "outputs": [ + { + "name": "token", + "type": "address" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "symbol", + "type": "string" + }, + { + "name": "decimals", + "type": "uint8" + }, + { + "name": "ipfsHash", + "type": "bytes" + }, + { + "name": "swarmHash", + "type": "bytes" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "tokenAddresses", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_name", + "type": "string" + } + ], + "name": "getTokenByName", + "outputs": [ + { + "name": "", + "type": "address" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "uint8" + }, + { + "name": "", + "type": "bytes" + }, + { + "name": "", + "type": "bytes" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getTokenAddresses", + "outputs": [ + { + "name": "", + "type": "address[]" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + }, + { + "name": "_ipfsHash", + "type": "bytes" + } + ], + "name": "setTokenIpfsHash", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_symbol", + "type": "string" + } + ], + "name": "getTokenBySymbol", + "outputs": [ + { + "name": "", + "type": "address" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "uint8" + }, + { + "name": "", + "type": "bytes" + }, + { + "name": "", + "type": "bytes" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + }, + { + "name": "_symbol", + "type": "string" + } + ], + "name": "setTokenSymbol", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "name", + "type": "string" + }, + { + "indexed": false, + "name": "symbol", + "type": "string" + }, + { + "indexed": false, + "name": "decimals", + "type": "uint8" + }, + { + "indexed": false, + "name": "ipfsHash", + "type": "bytes" + }, + { + "indexed": false, + "name": "swarmHash", + "type": "bytes" + } + ], + "name": "LogAddToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "name", + "type": "string" + }, + { + "indexed": false, + "name": "symbol", + "type": "string" + }, + { + "indexed": false, + "name": "decimals", + "type": "uint8" + }, + { + "indexed": false, + "name": "ipfsHash", + "type": "bytes" + }, + { + "indexed": false, + "name": "swarmHash", + "type": "bytes" + } + ], + "name": "LogRemoveToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "oldName", + "type": "string" + }, + { + "indexed": false, + "name": "newName", + "type": "string" + } + ], + "name": "LogTokenNameChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "oldSymbol", + "type": "string" + }, + { + "indexed": false, + "name": "newSymbol", + "type": "string" + } + ], + "name": "LogTokenSymbolChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "oldIpfsHash", + "type": "bytes" + }, + { + "indexed": false, + "name": "newIpfsHash", + "type": "bytes" + } + ], + "name": "LogTokenIpfsHashChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "oldSwarmHash", + "type": "bytes" + }, + { + "indexed": false, + "name": "newSwarmHash", + "type": "bytes" + } + ], + "name": "LogTokenSwarmHashChange", + "type": "event" + } + ], + "unlinked_binary": + "0x60606040525b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b613bf5806100576000396000f300606060405236156100e4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806313baf1e6146100e65780632fbfeba9146101255780633550b6d9146101bf57806356318820146102595780637abccac9146102d25780638da5cb5b1461053d578063a880319d1461058f578063c370c86d146106dd578063e486033914610756578063e5df8b84146109fd578063e73fc0c314610a5d578063ee8c24b814610cec578063eef05f6514610d61578063efa74f1f14610dda578063f036417f14611069578063f2fde38b146110e2575bfe5b34156100ee57fe5b610123600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611118565b005b341561012d57fe5b61017d600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611836565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101c757fe5b610217600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506118ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561026157fe5b6102d0600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061195e565b005b34156102da57fe5b610306600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611c0e565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018660ff1660ff168152602001806020018060200185810385528a81815181526020019150805190602001908083836000831461039f575b80518252602083111561039f5760208201915060208101905060208303925061037b565b505050905090810190601f1680156103cb5780820380516001836020036101000a031916815260200191505b50858103845289818151815260200191508051906020019080838360008314610413575b805182526020831115610413576020820191506020810190506020830392506103ef565b505050905090810190601f16801561043f5780820380516001836020036101000a031916815260200191505b50858103835287818151815260200191508051906020019080838360008314610487575b80518252602083111561048757602082019150602081019050602083039250610463565b505050905090810190601f1680156104b35780820380516001836020036101000a031916815260200191505b508581038252868181518152602001915080519060200190808383600083146104fb575b8051825260208311156104fb576020820191506020810190506020830392506104d7565b505050905090810190601f1680156105275780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b341561054557fe5b61054d611fc3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561059757fe5b6106db600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803560ff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611fe9565b005b34156106e557fe5b610754600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061281a565b005b341561075e57fe5b61078a600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612cd1565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018660ff1660ff168152602001806020018060200185810385528a81815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561085d5780601f106108325761010080835404028352916020019161085d565b820191906000526020600020905b81548152906001019060200180831161084057829003601f168201915b50508581038452898181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156108e05780601f106108b5576101008083540402835291602001916108e0565b820191906000526020600020905b8154815290600101906020018083116108c357829003601f168201915b50508581038352878181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156109635780601f1061093857610100808354040283529160200191610963565b820191906000526020600020905b81548152906001019060200180831161094657829003601f168201915b50508581038252868181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156109e65780601f106109bb576101008083540402835291602001916109e6565b820191906000526020600020905b8154815290600101906020018083116109c957829003601f168201915b50509a505050505050505050505060405180910390f35b3415610a0557fe5b610a1b6004808035906020019091905050612d36565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610a6557fe5b610ab5600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612d76565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018660ff1660ff168152602001806020018060200185810385528a818151815260200191508051906020019080838360008314610b4e575b805182526020831115610b4e57602082019150602081019050602083039250610b2a565b505050905090810190601f168015610b7a5780820380516001836020036101000a031916815260200191505b50858103845289818151815260200191508051906020019080838360008314610bc2575b805182526020831115610bc257602082019150602081019050602083039250610b9e565b505050905090810190601f168015610bee5780820380516001836020036101000a031916815260200191505b50858103835287818151815260200191508051906020019080838360008314610c36575b805182526020831115610c3657602082019150602081019050602083039250610c12565b505050905090810190601f168015610c625780820380516001836020036101000a031916815260200191505b50858103825286818151815260200191508051906020019080838360008314610caa575b805182526020831115610caa57602082019150602081019050602083039250610c86565b505050905090810190601f168015610cd65780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b3415610cf457fe5b610cfc612e48565b6040518080602001828103825283818151815260200191508051906020019060200280838360008314610d4e575b805182526020831115610d4e57602082019150602081019050602083039250610d2a565b5050509050019250505060405180910390f35b3415610d6957fe5b610dd8600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612edd565b005b3415610de257fe5b610e32600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061318d565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018660ff1660ff168152602001806020018060200185810385528a818151815260200191508051906020019080838360008314610ecb575b805182526020831115610ecb57602082019150602081019050602083039250610ea7565b505050905090810190601f168015610ef75780820380516001836020036101000a031916815260200191505b50858103845289818151815260200191508051906020019080838360008314610f3f575b805182526020831115610f3f57602082019150602081019050602083039250610f1b565b505050905090810190601f168015610f6b5780820380516001836020036101000a031916815260200191505b50858103835287818151815260200191508051906020019080838360008314610fb3575b805182526020831115610fb357602082019150602081019050602083039250610f8f565b505050905090810190601f168015610fdf5780820380516001836020036101000a031916815260200191505b50858103825286818151815260200191508051906020019080838360008314611027575b80518252602083111561102757602082019150602081019050602083039250611003565b505050905090810190601f1680156110535780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b341561107157fe5b6110e0600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061325f565b005b34156110ea57fe5b611116600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050613716565b005b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156111775760006000fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515156112175760006000fd5b8373ffffffffffffffffffffffffffffffffffffffff1660048481548110151561123d57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561128d5760006000fd5b60046001600480549050038154811015156112a457fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff166004848154811015156112e057fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160048181805490500391508161134291906137f0565b50600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091508160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f32c54f1e2ea75844ded7517e7dbcd3895da7cd0c28f9ab9f9cf6ecf5f83762c683600101846002018560030160009054906101000a900460ff1686600401876005016040518080602001806020018660ff1660ff168152602001806020018060200185810385528a8181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156114a35780601f10611478576101008083540402835291602001916114a3565b820191906000526020600020905b81548152906001019060200180831161148657829003601f168201915b50508581038452898181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156115265780601f106114fb57610100808354040283529160200191611526565b820191906000526020600020905b81548152906001019060200180831161150957829003601f168201915b50508581038352878181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156115a95780601f1061157e576101008083540402835291602001916115a9565b820191906000526020600020905b81548152906001019060200180831161158c57829003601f168201915b505085810382528681815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561162c5780601f106116015761010080835404028352916020019161162c565b820191906000526020600020905b81548152906001019060200180831161160f57829003601f168201915b5050995050505050505050505060405180910390a260028260020160405180828054600181600116156101000203166002900480156116a25780601f106116805761010080835404028352918201916116a2565b820191906000526020600020905b81548152906001019060200180831161168e575b5050915050908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560038260010160405180828054600181600116156101000203166002900480156117395780601f10611717576101008083540402835291820191611739565b820191906000526020600020905b815481529060010190602001808311611725575b5050915050908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160006117e7919061381c565b6002820160006117f7919061381c565b6003820160006101000a81549060ff021916905560048201600061181b9190613864565b60058201600061182b9190613864565b50505b5b505b505050565b60006003826040518082805190602001908083835b6020831061186e578051825260208201915060208101905060208303925061184b565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b919050565b60006002826040518082805190602001908083835b6020831061190257805182526020820191506020810190506020830392506118df565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156119bd5760006000fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515611a5d5760006000fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091508373ffffffffffffffffffffffffffffffffffffffff167fc3168fdc13112e44a031057dbf6c609b33353addb4d8037d24543e22cbfe2acd8360050185604051808060200180602001838103835285818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015611b685780601f10611b3d57610100808354040283529160200191611b68565b820191906000526020600020905b815481529060010190602001808311611b4b57829003601f168201915b5050838103825284818151815260200191508051906020019080838360008314611bb1575b805182526020831115611bb157602082019150602081019050602083039250611b8d565b505050905090810190601f168015611bdd5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a282826005019080519060200190611c049291906138ac565b505b5b505b505050565b6000611c1861392c565b611c2061392c565b6000611c2a613940565b611c32613940565b611c3a613954565b600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060c060405190810160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611d745780601f10611d4957610100808354040283529160200191611d74565b820191906000526020600020905b815481529060010190602001808311611d5757829003601f168201915b50505050508152602001600282018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611e165780601f10611deb57610100808354040283529160200191611e16565b820191906000526020600020905b815481529060010190602001808311611df957829003601f168201915b505050505081526020016003820160009054906101000a900460ff1660ff1660ff168152602001600482018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611ed55780601f10611eaa57610100808354040283529160200191611ed5565b820191906000526020600020905b815481529060010190602001808311611eb857829003601f168201915b50505050508152602001600582018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611f775780601f10611f4c57610100808354040283529160200191611f77565b820191906000526020600020905b815481529060010190602001808311611f5a57829003601f168201915b5050505050815250509050806000015181602001518260400151836060015184608001518560a001518494508393508191508090509650965096509650965096505b5091939550919395565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156120465760006000fd5b85600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156120e55760006000fd5b86600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156121235760006000fd5b85600073ffffffffffffffffffffffffffffffffffffffff166002826040518082805190602001908083835b60208310612172578051825260208201915060208101905060208303925061214f565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156121e95760006000fd5b87600073ffffffffffffffffffffffffffffffffffffffff166003826040518082805190602001908083835b602083106122385780518252602082019150602081019050602083039250612215565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156122af5760006000fd5b60c0604051908101604052808b73ffffffffffffffffffffffffffffffffffffffff1681526020018a81526020018981526020018860ff16815260200187815260200186815250600160008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010190805190602001906123989291906139bc565b5060408201518160020190805190602001906123b59291906139bc565b5060608201518160030160006101000a81548160ff021916908360ff16021790555060808201518160040190805190602001906123f3929190613a3c565b5060a0820151816005019080519060200190612410929190613a3c565b50905050600480548060010182816124289190613abc565b916000526020600020900160005b8c909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050896002896040518082805190602001908083835b602083106124af578051825260208201915060208101905060208303925061248c565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508960038a6040518082805190602001908083835b602083106125575780518252602082019150602081019050602083039250612534565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508973ffffffffffffffffffffffffffffffffffffffff167fd8d928b0b50ca11d9dc273236b46f3526515b03602f71f3a6af4f45bd9fa91448a8a8a8a8a6040518080602001806020018660ff1660ff168152602001806020018060200185810385528a81815181526020019150805190602001908083836000831461266c575b80518252602083111561266c57602082019150602081019050602083039250612648565b505050905090810190601f1680156126985780820380516001836020036101000a031916815260200191505b508581038452898181518152602001915080519060200190808383600083146126e0575b8051825260208311156126e0576020820191506020810190506020830392506126bc565b505050905090810190601f16801561270c5780820380516001836020036101000a031916815260200191505b50858103835287818151815260200191508051906020019080838360008314612754575b80518252602083111561275457602082019150602081019050602083039250612730565b505050905090810190601f1680156127805780820380516001836020036101000a031916815260200191505b508581038252868181518152602001915080519060200190808383600083146127c8575b8051825260208311156127c8576020820191506020810190506020830392506127a4565b505050905090810190601f1680156127f45780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390a25b5b505b505b505b505b505050505050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156128795760006000fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515156129195760006000fd5b82600073ffffffffffffffffffffffffffffffffffffffff166003826040518082805190602001908083835b602083106129685780518252602082019150602081019050602083039250612945565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156129df5760006000fd5b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002092508473ffffffffffffffffffffffffffffffffffffffff167f4a6dbfc867b179991dec22ff19960f0a94d8d9d891fc556f547764670340e8ae8460010186604051808060200180602001838103835285818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015612aea5780601f10612abf57610100808354040283529160200191612aea565b820191906000526020600020905b815481529060010190602001808311612acd57829003601f168201915b5050838103825284818151815260200191508051906020019080838360008314612b33575b805182526020831115612b3357602082019150602081019050602083039250612b0f565b505050905090810190601f168015612b5f5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a26003836001016040518082805460018160011615610100020316600290048015612bcf5780601f10612bad576101008083540402835291820191612bcf565b820191906000526020600020905b815481529060010190602001808311612bbb575b5050915050908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055846003856040518082805190602001908083835b60208310612c3c5780518252602082019150602081019050602083039250612c19565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083836001019080519060200190612cc5929190613ae8565b505b5b505b505b505050565b60016020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806001019080600201908060030160009054906101000a900460ff1690806004019080600501905086565b600481815481101515612d4557fe5b906000526020600020900160005b915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000612d8061392c565b612d8861392c565b6000612d92613940565b612d9a613940565b60006003886040518082805190602001908083835b60208310612dd25780518252602082019150602081019050602083039250612daf565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612e3181611c0e565b9650965096509650965096505b5091939550919395565b612e50613b68565b6004805480602002602001604051908101604052809291908181526020018280548015612ed257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612e88575b505050505090505b90565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612f3c5760006000fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515612fdc5760006000fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091508373ffffffffffffffffffffffffffffffffffffffff167f5b19f79ac4e8cfa820815502e11615f1a449e28155dc289ec5cac1a11f90869483600401856040518080602001806020018381038352858181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156130e75780601f106130bc576101008083540402835291602001916130e7565b820191906000526020600020905b8154815290600101906020018083116130ca57829003601f168201915b5050838103825284818151815260200191508051906020019080838360008314613130575b8051825260208311156131305760208201915060208101905060208303925061310c565b505050905090810190601f16801561315c5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a2828260040190805190602001906131839291906138ac565b505b5b505b505050565b600061319761392c565b61319f61392c565b60006131a9613940565b6131b1613940565b60006002886040518082805190602001908083835b602083106131e957805182526020820191506020810190506020830392506131c6565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061324881611c0e565b9650965096509650965096505b5091939550919395565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156132be5760006000fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561335e5760006000fd5b82600073ffffffffffffffffffffffffffffffffffffffff166002826040518082805190602001908083835b602083106133ad578051825260208201915060208101905060208303925061338a565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156134245760006000fd5b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002092508473ffffffffffffffffffffffffffffffffffffffff167f53d878a6530e56c9bc96548fa0a8cae4f1d1f49c86b0e934c086b992ebb6998f846002018660405180806020018060200183810383528581815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561352f5780601f106135045761010080835404028352916020019161352f565b820191906000526020600020905b81548152906001019060200180831161351257829003601f168201915b5050838103825284818151815260200191508051906020019080838360008314613578575b80518252602083111561357857602082019150602081019050602083039250613554565b505050905090810190601f1680156135a45780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a260028360020160405180828054600181600116156101000203166002900480156136145780601f106135f2576101008083540402835291820191613614565b820191906000526020600020905b815481529060010190602001808311613600575b5050915050908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055846002856040518082805190602001908083835b60208310613681578051825260208201915060208101905060208303925061365e565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508383600201908051906020019061370a929190613ae8565b505b5b505b505b505050565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156137735760006000fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156137eb5780600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b5b50565b815481835581811511613817578183600052602060002091820191016138169190613b7c565b5b505050565b50805460018160011615610100020316600290046000825580601f106138425750613861565b601f0160209004906000526020600020908101906138609190613b7c565b5b50565b50805460018160011615610100020316600290046000825580601f1061388a57506138a9565b601f0160209004906000526020600020908101906138a89190613b7c565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106138ed57805160ff191683800117855561391b565b8280016001018555821561391b579182015b8281111561391a5782518255916020019190600101906138ff565b5b5090506139289190613b7c565b5090565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b60c060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001613985613ba1565b8152602001613992613ba1565b8152602001600060ff1681526020016139a9613bb5565b81526020016139b6613bb5565b81525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106139fd57805160ff1916838001178555613a2b565b82800160010185558215613a2b579182015b82811115613a2a578251825591602001919060010190613a0f565b5b509050613a389190613b7c565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613a7d57805160ff1916838001178555613aab565b82800160010185558215613aab579182015b82811115613aaa578251825591602001919060010190613a8f565b5b509050613ab89190613b7c565b5090565b815481835581811511613ae357818360005260206000209182019101613ae29190613b7c565b5b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613b2957805160ff1916838001178555613b57565b82800160010185558215613b57579182015b82811115613b56578251825591602001919060010190613b3b565b5b509050613b649190613b7c565b5090565b602060405190810160405280600081525090565b613b9e91905b80821115613b9a576000816000905550600101613b82565b5090565b90565b602060405190810160405280600081525090565b6020604051908101604052806000815250905600a165627a7a723058205f678f4c4175704443c6f7559c12ec6da458722d31ecf0b25fd93fee8b930a820029", + "updated_at": 1517538622222 + } + } +} diff --git a/packages/contracts/src/artifacts/TokenTransferProxy.json b/packages/contracts/src/artifacts/TokenTransferProxy.json new file mode 100644 index 000000000..1815458f8 --- /dev/null +++ b/packages/contracts/src/artifacts/TokenTransferProxy.json @@ -0,0 +1,180 @@ +{ + "contract_name": "TokenTransferProxy", + "networks": { + "50": { + "solc_version": "0.4.11", + "keccak256": "0xf376b57d58b01cb4e9c70a03a1ab6b06bc61d7eb4714bc360dd063c08028453a", + "optimizer_enabled": 0, + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "token", + "type": "address" + }, + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "target", + "type": "address" + } + ], + "name": "addAuthorizedAddress", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "authorities", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "target", + "type": "address" + } + ], + "name": "removeAuthorizedAddress", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "authorized", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getAuthorizedAddresses", + "outputs": [ + { + "name": "", + "type": "address[]" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "target", + "type": "address" + }, + { + "indexed": true, + "name": "caller", + "type": "address" + } + ], + "name": "LogAuthorizedAddressAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "target", + "type": "address" + }, + { + "indexed": true, + "name": "caller", + "type": "address" + } + ], + "name": "LogAuthorizedAddressRemoved", + "type": "event" + } + ], + "unlinked_binary": + "0x60606040525b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b610bd6806100576000396000f3006060604052361561008c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806315dacbea1461008e57806342f1181e14610123578063494503d41461015957806370712939146101b95780638da5cb5b146101ef578063b918161114610241578063d39de6e91461028f578063f2fde38b14610304575bfe5b341561009657fe5b610109600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061033a565b604051808215151515815260200191505060405180910390f35b341561012b57fe5b610157600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610495565b005b341561016157fe5b610177600480803590602001909190505061066d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101c157fe5b6101ed600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106ad565b005b34156101f757fe5b6101ff610964565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561024957fe5b610275600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061098a565b604051808215151515815260200191505060405180910390f35b341561029757fe5b61029f6109aa565b60405180806020018281038252838181518152602001915080519060200190602002808383600083146102f1575b8051825260208311156102f1576020820191506020810190506020830392506102cd565b5050509050019250505060405180910390f35b341561030c57fe5b610338600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a3f565b005b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156103955760006000fd5b8473ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b151561047157fe5b6102c65a03f1151561047f57fe5b5050506040518051905090505b5b949350505050565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156104f25760006000fd5b80600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561054d5760006000fd5b6001600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600280548060010182816105b99190610b19565b916000526020600020900160005b84909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f94bb87f4c15c4587ff559a7584006fa01ddf9299359be6b512b94527aa961aca60405180905060405180910390a35b5b505b50565b60028181548110151561067c57fe5b906000526020600020900160005b915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561070c5760006000fd5b81600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156107665760006000fd5b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff0219169055600091505b6002805490508210156108ff578273ffffffffffffffffffffffffffffffffffffffff166002838154811015156107ed57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156108f157600260016002805490500381548110151561084d57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660028381548110151561088957fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016002818180549050039150816108eb9190610b45565b506108ff565b5b81806001019250506107ba565b3373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167ff5b347a1e40749dd050f5f07fbdbeb7e3efa9756903044dd29401fd1d4bb4a1c60405180905060405180910390a35b5b505b5050565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900460ff1681565b6109b2610b71565b6002805480602002602001604051908101604052809291908181526020018280548015610a3457602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116109ea575b505050505090505b90565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a9c5760006000fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515610b145780600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b5b50565b815481835581811511610b4057818360005260206000209182019101610b3f9190610b85565b5b505050565b815481835581811511610b6c57818360005260206000209182019101610b6b9190610b85565b5b505050565b602060405190810160405280600081525090565b610ba791905b80821115610ba3576000816000905550600101610b8b565b5090565b905600a165627a7a723058202a39ecce7fa8d2726ee124023aeec7f2d5ceb1ff5dbd623d87305279af329a530029", + "updated_at": 1517535966171 + } + } +} diff --git a/packages/contracts/src/artifacts/Token_v1.json b/packages/contracts/src/artifacts/Token_v1.json new file mode 100644 index 000000000..a2f3f6a24 --- /dev/null +++ b/packages/contracts/src/artifacts/Token_v1.json @@ -0,0 +1,182 @@ +{ + "contract_name": "Token_v1", + "networks": { + "50": { + "solc_version": "0.4.11", + "keccak256": "0x35a82bc7bc0994caa97f8ea44660b9b5e796acfe72705b5ff7ed8f2a3c47ff37", + "optimizer_enabled": 0, + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "supply", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "remaining", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "unlinked_binary": + "0x6060604052341561000c57fe5b5b6102d48061001c6000396000f30060606040523615610076576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007857806318160ddd146100cf57806323b872dd146100f557806370a082311461016b578063a9059cbb146101b5578063dd62ed3e1461020c575bfe5b341561008057fe5b6100b5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610275565b604051808215151515815260200191505060405180910390f35b34156100d757fe5b6100df61027e565b6040518082815260200191505060405180910390f35b34156100fd57fe5b610151600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610284565b604051808215151515815260200191505060405180910390f35b341561017357fe5b61019f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061028e565b6040518082815260200191505060405180910390f35b34156101bd57fe5b6101f2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610296565b604051808215151515815260200191505060405180910390f35b341561021457fe5b61025f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061029f565b6040518082815260200191505060405180910390f35b60005b92915050565b60005b90565b60005b9392505050565b60005b919050565b60005b92915050565b60005b929150505600a165627a7a72305820b8fd6d6a6fe5fb53fa4968f246aad074b179498a6d15208c4b2d8be473df69420029", + "updated_at": 1517509621946 + } + } +} diff --git a/packages/contracts/src/artifacts/UnlimitedAllowanceToken.json b/packages/contracts/src/artifacts/UnlimitedAllowanceToken.json new file mode 100644 index 000000000..f6415840b --- /dev/null +++ b/packages/contracts/src/artifacts/UnlimitedAllowanceToken.json @@ -0,0 +1,188 @@ +{ + "contract_name": "UnlimitedAllowanceToken", + "networks": { + "50": { + "solc_version": "0.4.18", + "keccak256": "0xfc55032f0942ce4081a9f8c3eacfa0bddf61e1fb76593c8d6514adcb97a96690", + "optimizer_enabled": 0, + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "unlinked_binary": + "0x6060604052341561000f57600080fd5b6109808061001e6000396000f300606060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007d57806318160ddd146100d757806323b872dd1461010057806370a0823114610179578063a9059cbb146101c6578063dd62ed3e14610220575b600080fd5b341561008857600080fd5b6100bd600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061028c565b604051808215151515815260200191505060405180910390f35b34156100e257600080fd5b6100ea61037e565b6040518082815260200191505060405180910390f35b341561010b57600080fd5b61015f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610384565b604051808215151515815260200191505060405180910390f35b341561018457600080fd5b6101b0600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106a5565b6040518082815260200191505060405180910390f35b34156101d157600080fd5b610206600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106ed565b604051808215151515815260200191505060405180910390f35b341561022b57600080fd5b610276600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108cd565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b600080600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156104545750828110155b80156104de57506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15156104e957600080fd5b826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156106345782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156107bb57506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15156107c657600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050929150505600a165627a7a72305820fcfe717221cfe35887f7cf953f3c89ebf20f5cc389a92a5b68e2fd22c236d0e30029", + "updated_at": 1517509620184 + } + } +} diff --git a/packages/contracts/src/artifacts/UnlimitedAllowanceToken_v1.json b/packages/contracts/src/artifacts/UnlimitedAllowanceToken_v1.json new file mode 100644 index 000000000..731a4e4ee --- /dev/null +++ b/packages/contracts/src/artifacts/UnlimitedAllowanceToken_v1.json @@ -0,0 +1,182 @@ +{ + "contract_name": "UnlimitedAllowanceToken_v1", + "networks": { + "50": { + "solc_version": "0.4.11", + "keccak256": "0x3b548a72cde0786747f9bdf42901fcf51ec546ced40506335d28b0778e35d25a", + "optimizer_enabled": 0, + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "unlinked_binary": + "0x6060604052341561000c57fe5b5b61098a8061001c6000396000f30060606040523615610076576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007857806318160ddd146100cf57806323b872dd146100f557806370a082311461016b578063a9059cbb146101b5578063dd62ed3e1461020c575bfe5b341561008057fe5b6100b5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610275565b604051808215151515815260200191505060405180910390f35b34156100d757fe5b6100df610368565b6040518082815260200191505060405180910390f35b34156100fd57fe5b610151600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061036e565b604051808215151515815260200191505060405180910390f35b341561017357fe5b61019f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061069e565b6040518082815260200191505060405180910390f35b34156101bd57fe5b6101f2600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106e8565b604051808215151515815260200191505060405180910390f35b341561021457fe5b61025f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108d6565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a3600190505b92915050565b60025481565b60006000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082600060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156104405750828110155b80156104cc5750600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483600060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b1561068c5782600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555082600060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81101561061e5782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150610696565b60009150610696565b5b509392505050565b6000600060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b600081600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156107b95750600060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b156108c65781600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190506108d0565b600090506108d0565b5b92915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b929150505600a165627a7a723058204c2e4edd6947d81382e4a79ca7070d2068e887e849a5998d8cd99e1ae7e4107b0029", + "updated_at": 1517509622346 + } + } +} diff --git a/packages/contracts/src/artifacts/WETH9.json b/packages/contracts/src/artifacts/WETH9.json new file mode 100644 index 000000000..ffe11ce40 --- /dev/null +++ b/packages/contracts/src/artifacts/WETH9.json @@ -0,0 +1,292 @@ +{ + "contract_name": "WETH9", + "networks": { + "50": { + "solc_version": "0.4.18", + "keccak256": "0xce985174db1a24d312c0d544abb926a9b107bd9abd6424288a8e54a16d3e006b", + "optimizer_enabled": 0, + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "guy", + "type": "address" + }, + { + "name": "wad", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "src", + "type": "address" + }, + { + "name": "dst", + "type": "address" + }, + { + "name": "wad", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "wad", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "dst", + "type": "address" + }, + { + "name": "wad", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "deposit", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + }, + { + "name": "", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "src", + "type": "address" + }, + { + "indexed": true, + "name": "guy", + "type": "address" + }, + { + "indexed": false, + "name": "wad", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "src", + "type": "address" + }, + { + "indexed": true, + "name": "dst", + "type": "address" + }, + { + "indexed": false, + "name": "wad", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "dst", + "type": "address" + }, + { + "indexed": false, + "name": "wad", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "src", + "type": "address" + }, + { + "indexed": false, + "name": "wad", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" + } + ], + "unlinked_binary": + "0x60606040526040805190810160405280600d81526020017f57726170706564204574686572000000000000000000000000000000000000008152506000908051906020019061004f9291906100c8565b506040805190810160405280600481526020017f57455448000000000000000000000000000000000000000000000000000000008152506001908051906020019061009b9291906100c8565b506012600260006101000a81548160ff021916908360ff16021790555034156100c357600080fd5b61016d565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010957805160ff1916838001178555610137565b82800160010185558215610137579182015b8281111561013657825182559160200191906001019061011b565b5b5090506101449190610148565b5090565b61016a91905b8082111561016657600081600090555060010161014e565b5090565b90565b610c348061017c6000396000f3006060604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100b9578063095ea7b31461014757806318160ddd146101a157806323b872dd146101ca5780632e1a7d4d14610243578063313ce5671461026657806370a082311461029557806395d89b41146102e2578063a9059cbb14610370578063d0e30db0146103ca578063dd62ed3e146103d4575b6100b7610440565b005b34156100c457600080fd5b6100cc6104dd565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561010c5780820151818401526020810190506100f1565b50505050905090810190601f1680156101395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015257600080fd5b610187600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061057b565b604051808215151515815260200191505060405180910390f35b34156101ac57600080fd5b6101b461066d565b6040518082815260200191505060405180910390f35b34156101d557600080fd5b610229600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061068c565b604051808215151515815260200191505060405180910390f35b341561024e57600080fd5b61026460048080359060200190919050506109d9565b005b341561027157600080fd5b610279610b05565b604051808260ff1660ff16815260200191505060405180910390f35b34156102a057600080fd5b6102cc600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610b18565b6040518082815260200191505060405180910390f35b34156102ed57600080fd5b6102f5610b30565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033557808201518184015260208101905061031a565b50505050905090810190601f1680156103625780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561037b57600080fd5b6103b0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610bce565b604051808215151515815260200191505060405180910390f35b6103d2610440565b005b34156103df57600080fd5b61042a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610be3565b6040518082815260200191505060405180910390f35b34600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a2565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105735780601f1061054857610100808354040283529160200191610573565b820191906000526020600020905b81548152906001019060200180831161055657829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60003073ffffffffffffffffffffffffffffffffffffffff1631905090565b600081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156106dc57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156107b457507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b156108cf5781600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561084457600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610a2757600080fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515610ab457600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a250565b600260009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610bc65780601f10610b9b57610100808354040283529160200191610bc6565b820191906000526020600020905b815481529060010190602001808311610ba957829003601f168201915b505050505081565b6000610bdb33848461068c565b905092915050565b60046020528160005260406000206020528060005260406000206000915091505054815600a165627a7a723058205d39b84dc32db11788d365c5d4ad673648b645ce10963c48e4aad5da4909ab5e0029", + "updated_at": 1517509620680 + } + } +} diff --git a/packages/contracts/src/artifacts/ZRXToken.json b/packages/contracts/src/artifacts/ZRXToken.json new file mode 100644 index 000000000..285cc1dfd --- /dev/null +++ b/packages/contracts/src/artifacts/ZRXToken.json @@ -0,0 +1,226 @@ +{ + "contract_name": "ZRXToken", + "networks": { + "50": { + "solc_version": "0.4.11", + "keccak256": "0x68278a8290a59fb66c378f7517c1029efe226d916e252deceb0a2799a6bc4e77", + "optimizer_enabled": 0, + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "unlinked_binary": + "0x60606040526b033b2e3c9fd0803ce8000000600355341561001c57fe5b5b600354600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b610b82806100746000396000f30060606040523615610097576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde0314610099578063095ea7b31461013257806318160ddd1461018957806323b872dd146101af578063313ce5671461022557806370a082311461025157806395d89b411461029b578063a9059cbb14610334578063dd62ed3e1461038b575bfe5b34156100a157fe5b6100a96103f4565b60405180806020018281038252838181518152602001915080519060200190808383600083146100f8575b8051825260208311156100f8576020820191506020810190506020830392506100d4565b505050905090810190601f1680156101245780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561013a57fe5b61016f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061042e565b604051808215151515815260200191505060405180910390f35b341561019157fe5b610199610521565b6040518082815260200191505060405180910390f35b34156101b757fe5b61020b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610527565b604051808215151515815260200191505060405180910390f35b341561022d57fe5b610235610857565b604051808260ff1660ff16815260200191505060405180910390f35b341561025957fe5b610285600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061085c565b6040518082815260200191505060405180910390f35b34156102a357fe5b6102ab6108a6565b60405180806020018281038252838181518152602001915080519060200190808383600083146102fa575b8051825260208311156102fa576020820191506020810190506020830392506102d6565b505050905090810190601f1680156103265780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561033c57fe5b610371600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506108e0565b604051808215151515815260200191505060405180910390f35b341561039357fe5b6103de600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ace565b6040518082815260200191505060405180910390f35b604060405190810160405280601181526020017f30782050726f746f636f6c20546f6b656e00000000000000000000000000000081525081565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a3600190505b92915050565b60035481565b60006000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082600060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156105f95750828110155b80156106855750600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483600060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b156108455782600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555082600060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156107d75782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a36001915061084f565b6000915061084f565b5b509392505050565b601281565b6000600060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b604060405190810160405280600381526020017f5a5258000000000000000000000000000000000000000000000000000000000081525081565b600081600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156109b15750600060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15610abe5781600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050610ac8565b60009050610ac8565b5b92915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b929150505600a165627a7a7230582055d3a76ea3e76a05371288f7870d0ec8251b0e3ce06877d2a8509c92c10c51420029", + "updated_at": 1517509621293 + } + } +} diff --git a/packages/contracts/src/contract_wrappers/generated/dummy_token.ts b/packages/contracts/src/contract_wrappers/generated/dummy_token.ts new file mode 100644 index 000000000..788cbfe3f --- /dev/null +++ b/packages/contracts/src/contract_wrappers/generated/dummy_token.ts @@ -0,0 +1,434 @@ +/** + * This file is auto-generated using abi-gen. Don't edit directly. + * Templates can be found at https://github.com/0xProject/0x.js/tree/development/packages/abi-gen-templates. + */ +// tslint:disable-next-line:no-unused-variable +import { TxData, TxDataPayable } from '@0xproject/types'; +import { BigNumber, classUtils, promisify } from '@0xproject/utils'; +import * as Web3 from 'web3'; + +import {BaseContract} from './base_contract'; + +export class DummyTokenContract extends BaseContract { + public name = { + async callAsync( + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as DummyTokenContract; + const result = await promisify( + self._web3ContractInstance.name.call, + self._web3ContractInstance, + )( + ); + return result; + }, + }; + public approve = { + async sendTransactionAsync( + _spender: string, + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as DummyTokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.approve.estimateGasAsync.bind( + self, + _spender, + _value, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.approve, self._web3ContractInstance, + )( + _spender, + _value, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + _spender: string, + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as DummyTokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.approve.estimateGas, self._web3ContractInstance, + )( + _spender, + _value, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + _spender: string, + _value: BigNumber, + txData: TxData = {}, + ): string { + const self = this as DummyTokenContract; + const abiEncodedTransactionData = self._web3ContractInstance.approve.getData(); + return abiEncodedTransactionData; + }, + }; + public totalSupply = { + async callAsync( + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as DummyTokenContract; + const result = await promisify( + self._web3ContractInstance.totalSupply.call, + self._web3ContractInstance, + )( + ); + return result; + }, + }; + public transferFrom = { + async sendTransactionAsync( + _from: string, + _to: string, + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as DummyTokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.transferFrom.estimateGasAsync.bind( + self, + _from, + _to, + _value, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.transferFrom, self._web3ContractInstance, + )( + _from, + _to, + _value, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + _from: string, + _to: string, + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as DummyTokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.transferFrom.estimateGas, self._web3ContractInstance, + )( + _from, + _to, + _value, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + _from: string, + _to: string, + _value: BigNumber, + txData: TxData = {}, + ): string { + const self = this as DummyTokenContract; + const abiEncodedTransactionData = self._web3ContractInstance.transferFrom.getData(); + return abiEncodedTransactionData; + }, + }; + public decimals = { + async callAsync( + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as DummyTokenContract; + const result = await promisify( + self._web3ContractInstance.decimals.call, + self._web3ContractInstance, + )( + ); + return result; + }, + }; + public balanceOf = { + async callAsync( + _owner: string, + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as DummyTokenContract; + const result = await promisify( + self._web3ContractInstance.balanceOf.call, + self._web3ContractInstance, + )( + _owner, + ); + return result; + }, + }; + public owner = { + async callAsync( + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as DummyTokenContract; + const result = await promisify( + self._web3ContractInstance.owner.call, + self._web3ContractInstance, + )( + ); + return result; + }, + }; + public symbol = { + async callAsync( + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as DummyTokenContract; + const result = await promisify( + self._web3ContractInstance.symbol.call, + self._web3ContractInstance, + )( + ); + return result; + }, + }; + public mint = { + async sendTransactionAsync( + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as DummyTokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.mint.estimateGasAsync.bind( + self, + _value, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.mint, self._web3ContractInstance, + )( + _value, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as DummyTokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.mint.estimateGas, self._web3ContractInstance, + )( + _value, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + _value: BigNumber, + txData: TxData = {}, + ): string { + const self = this as DummyTokenContract; + const abiEncodedTransactionData = self._web3ContractInstance.mint.getData(); + return abiEncodedTransactionData; + }, + }; + public transfer = { + async sendTransactionAsync( + _to: string, + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as DummyTokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.transfer.estimateGasAsync.bind( + self, + _to, + _value, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.transfer, self._web3ContractInstance, + )( + _to, + _value, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + _to: string, + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as DummyTokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.transfer.estimateGas, self._web3ContractInstance, + )( + _to, + _value, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + _to: string, + _value: BigNumber, + txData: TxData = {}, + ): string { + const self = this as DummyTokenContract; + const abiEncodedTransactionData = self._web3ContractInstance.transfer.getData(); + return abiEncodedTransactionData; + }, + }; + public allowance = { + async callAsync( + _owner: string, + _spender: string, + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as DummyTokenContract; + const result = await promisify( + self._web3ContractInstance.allowance.call, + self._web3ContractInstance, + )( + _owner, + _spender, + ); + return result; + }, + }; + public setBalance = { + async sendTransactionAsync( + _target: string, + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as DummyTokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.setBalance.estimateGasAsync.bind( + self, + _target, + _value, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.setBalance, self._web3ContractInstance, + )( + _target, + _value, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + _target: string, + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as DummyTokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.setBalance.estimateGas, self._web3ContractInstance, + )( + _target, + _value, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + _target: string, + _value: BigNumber, + txData: TxData = {}, + ): string { + const self = this as DummyTokenContract; + const abiEncodedTransactionData = self._web3ContractInstance.setBalance.getData(); + return abiEncodedTransactionData; + }, + }; + public transferOwnership = { + async sendTransactionAsync( + newOwner: string, + txData: TxData = {}, + ): Promise { + const self = this as DummyTokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.transferOwnership.estimateGasAsync.bind( + self, + newOwner, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.transferOwnership, self._web3ContractInstance, + )( + newOwner, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + newOwner: string, + txData: TxData = {}, + ): Promise { + const self = this as DummyTokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.transferOwnership.estimateGas, self._web3ContractInstance, + )( + newOwner, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + newOwner: string, + txData: TxData = {}, + ): string { + const self = this as DummyTokenContract; + const abiEncodedTransactionData = self._web3ContractInstance.transferOwnership.getData(); + return abiEncodedTransactionData; + }, + }; + constructor(web3ContractInstance: Web3.ContractInstance, defaults: Partial) { + super(web3ContractInstance, defaults); + classUtils.bindAll(this, ['_web3ContractInstance', '_defaults']); + } +} // tslint:disable:max-file-line-count diff --git a/packages/contracts/src/contract_wrappers/generated/exchange.ts b/packages/contracts/src/contract_wrappers/generated/exchange.ts new file mode 100644 index 000000000..c328ec725 --- /dev/null +++ b/packages/contracts/src/contract_wrappers/generated/exchange.ts @@ -0,0 +1,728 @@ +/** + * This file is auto-generated using abi-gen. Don't edit directly. + * Templates can be found at https://github.com/0xProject/0x.js/tree/development/packages/abi-gen-templates. + */ +// tslint:disable-next-line:no-unused-variable +import { TxData, TxDataPayable } from '@0xproject/types'; +import { BigNumber, classUtils, promisify } from '@0xproject/utils'; +import * as Web3 from 'web3'; + +import {BaseContract} from './base_contract'; + +export class ExchangeContract extends BaseContract { + public isRoundingError = { + async callAsync( + numerator: BigNumber, + denominator: BigNumber, + target: BigNumber, + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as ExchangeContract; + const result = await promisify( + self._web3ContractInstance.isRoundingError.call, + self._web3ContractInstance, + )( + numerator, + denominator, + target, + ); + return result; + }, + }; + public filled = { + async callAsync( + index: string, + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as ExchangeContract; + const result = await promisify( + self._web3ContractInstance.filled.call, + self._web3ContractInstance, + )( + index, + ); + return result; + }, + }; + public cancelled = { + async callAsync( + index: string, + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as ExchangeContract; + const result = await promisify( + self._web3ContractInstance.cancelled.call, + self._web3ContractInstance, + )( + index, + ); + return result; + }, + }; + public fillOrdersUpTo = { + async sendTransactionAsync( + orderAddresses: string[][], + orderValues: BigNumber[][], + fillTakerTokenAmount: BigNumber, + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + v: Array, + r: string[], + s: string[], + txData: TxData = {}, + ): Promise { + const self = this as ExchangeContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.fillOrdersUpTo.estimateGasAsync.bind( + self, + orderAddresses, + orderValues, + fillTakerTokenAmount, + shouldThrowOnInsufficientBalanceOrAllowance, + v, + r, + s, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.fillOrdersUpTo, self._web3ContractInstance, + )( + orderAddresses, + orderValues, + fillTakerTokenAmount, + shouldThrowOnInsufficientBalanceOrAllowance, + v, + r, + s, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + orderAddresses: string[][], + orderValues: BigNumber[][], + fillTakerTokenAmount: BigNumber, + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + v: Array, + r: string[], + s: string[], + txData: TxData = {}, + ): Promise { + const self = this as ExchangeContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.fillOrdersUpTo.estimateGas, self._web3ContractInstance, + )( + orderAddresses, + orderValues, + fillTakerTokenAmount, + shouldThrowOnInsufficientBalanceOrAllowance, + v, + r, + s, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + orderAddresses: string[][], + orderValues: BigNumber[][], + fillTakerTokenAmount: BigNumber, + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + v: Array, + r: string[], + s: string[], + txData: TxData = {}, + ): string { + const self = this as ExchangeContract; + const abiEncodedTransactionData = self._web3ContractInstance.fillOrdersUpTo.getData(); + return abiEncodedTransactionData; + }, + }; + public cancelOrder = { + async sendTransactionAsync( + orderAddresses: string[], + orderValues: BigNumber[], + cancelTakerTokenAmount: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as ExchangeContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.cancelOrder.estimateGasAsync.bind( + self, + orderAddresses, + orderValues, + cancelTakerTokenAmount, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.cancelOrder, self._web3ContractInstance, + )( + orderAddresses, + orderValues, + cancelTakerTokenAmount, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + orderAddresses: string[], + orderValues: BigNumber[], + cancelTakerTokenAmount: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as ExchangeContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.cancelOrder.estimateGas, self._web3ContractInstance, + )( + orderAddresses, + orderValues, + cancelTakerTokenAmount, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + orderAddresses: string[], + orderValues: BigNumber[], + cancelTakerTokenAmount: BigNumber, + txData: TxData = {}, + ): string { + const self = this as ExchangeContract; + const abiEncodedTransactionData = self._web3ContractInstance.cancelOrder.getData(); + return abiEncodedTransactionData; + }, + }; + public ZRX_TOKEN_CONTRACT = { + async callAsync( + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as ExchangeContract; + const result = await promisify( + self._web3ContractInstance.ZRX_TOKEN_CONTRACT.call, + self._web3ContractInstance, + )( + ); + return result; + }, + }; + public batchFillOrKillOrders = { + async sendTransactionAsync( + orderAddresses: string[][], + orderValues: BigNumber[][], + fillTakerTokenAmounts: BigNumber[], + v: Array, + r: string[], + s: string[], + txData: TxData = {}, + ): Promise { + const self = this as ExchangeContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.batchFillOrKillOrders.estimateGasAsync.bind( + self, + orderAddresses, + orderValues, + fillTakerTokenAmounts, + v, + r, + s, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.batchFillOrKillOrders, self._web3ContractInstance, + )( + orderAddresses, + orderValues, + fillTakerTokenAmounts, + v, + r, + s, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + orderAddresses: string[][], + orderValues: BigNumber[][], + fillTakerTokenAmounts: BigNumber[], + v: Array, + r: string[], + s: string[], + txData: TxData = {}, + ): Promise { + const self = this as ExchangeContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.batchFillOrKillOrders.estimateGas, self._web3ContractInstance, + )( + orderAddresses, + orderValues, + fillTakerTokenAmounts, + v, + r, + s, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + orderAddresses: string[][], + orderValues: BigNumber[][], + fillTakerTokenAmounts: BigNumber[], + v: Array, + r: string[], + s: string[], + txData: TxData = {}, + ): string { + const self = this as ExchangeContract; + const abiEncodedTransactionData = self._web3ContractInstance.batchFillOrKillOrders.getData(); + return abiEncodedTransactionData; + }, + }; + public fillOrKillOrder = { + async sendTransactionAsync( + orderAddresses: string[], + orderValues: BigNumber[], + fillTakerTokenAmount: BigNumber, + v: number|BigNumber, + r: string, + s: string, + txData: TxData = {}, + ): Promise { + const self = this as ExchangeContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.fillOrKillOrder.estimateGasAsync.bind( + self, + orderAddresses, + orderValues, + fillTakerTokenAmount, + v, + r, + s, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.fillOrKillOrder, self._web3ContractInstance, + )( + orderAddresses, + orderValues, + fillTakerTokenAmount, + v, + r, + s, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + orderAddresses: string[], + orderValues: BigNumber[], + fillTakerTokenAmount: BigNumber, + v: number|BigNumber, + r: string, + s: string, + txData: TxData = {}, + ): Promise { + const self = this as ExchangeContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.fillOrKillOrder.estimateGas, self._web3ContractInstance, + )( + orderAddresses, + orderValues, + fillTakerTokenAmount, + v, + r, + s, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + orderAddresses: string[], + orderValues: BigNumber[], + fillTakerTokenAmount: BigNumber, + v: number|BigNumber, + r: string, + s: string, + txData: TxData = {}, + ): string { + const self = this as ExchangeContract; + const abiEncodedTransactionData = self._web3ContractInstance.fillOrKillOrder.getData(); + return abiEncodedTransactionData; + }, + }; + public getUnavailableTakerTokenAmount = { + async callAsync( + orderHash: string, + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as ExchangeContract; + const result = await promisify( + self._web3ContractInstance.getUnavailableTakerTokenAmount.call, + self._web3ContractInstance, + )( + orderHash, + ); + return result; + }, + }; + public isValidSignature = { + async callAsync( + signer: string, + hash: string, + v: number|BigNumber, + r: string, + s: string, + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as ExchangeContract; + const result = await promisify( + self._web3ContractInstance.isValidSignature.call, + self._web3ContractInstance, + )( + signer, + hash, + v, + r, + s, + ); + return result; + }, + }; + public getPartialAmount = { + async callAsync( + numerator: BigNumber, + denominator: BigNumber, + target: BigNumber, + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as ExchangeContract; + const result = await promisify( + self._web3ContractInstance.getPartialAmount.call, + self._web3ContractInstance, + )( + numerator, + denominator, + target, + ); + return result; + }, + }; + public TOKEN_TRANSFER_PROXY_CONTRACT = { + async callAsync( + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as ExchangeContract; + const result = await promisify( + self._web3ContractInstance.TOKEN_TRANSFER_PROXY_CONTRACT.call, + self._web3ContractInstance, + )( + ); + return result; + }, + }; + public batchFillOrders = { + async sendTransactionAsync( + orderAddresses: string[][], + orderValues: BigNumber[][], + fillTakerTokenAmounts: BigNumber[], + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + v: Array, + r: string[], + s: string[], + txData: TxData = {}, + ): Promise { + const self = this as ExchangeContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.batchFillOrders.estimateGasAsync.bind( + self, + orderAddresses, + orderValues, + fillTakerTokenAmounts, + shouldThrowOnInsufficientBalanceOrAllowance, + v, + r, + s, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.batchFillOrders, self._web3ContractInstance, + )( + orderAddresses, + orderValues, + fillTakerTokenAmounts, + shouldThrowOnInsufficientBalanceOrAllowance, + v, + r, + s, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + orderAddresses: string[][], + orderValues: BigNumber[][], + fillTakerTokenAmounts: BigNumber[], + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + v: Array, + r: string[], + s: string[], + txData: TxData = {}, + ): Promise { + const self = this as ExchangeContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.batchFillOrders.estimateGas, self._web3ContractInstance, + )( + orderAddresses, + orderValues, + fillTakerTokenAmounts, + shouldThrowOnInsufficientBalanceOrAllowance, + v, + r, + s, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + orderAddresses: string[][], + orderValues: BigNumber[][], + fillTakerTokenAmounts: BigNumber[], + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + v: Array, + r: string[], + s: string[], + txData: TxData = {}, + ): string { + const self = this as ExchangeContract; + const abiEncodedTransactionData = self._web3ContractInstance.batchFillOrders.getData(); + return abiEncodedTransactionData; + }, + }; + public batchCancelOrders = { + async sendTransactionAsync( + orderAddresses: string[][], + orderValues: BigNumber[][], + cancelTakerTokenAmounts: BigNumber[], + txData: TxData = {}, + ): Promise { + const self = this as ExchangeContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.batchCancelOrders.estimateGasAsync.bind( + self, + orderAddresses, + orderValues, + cancelTakerTokenAmounts, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.batchCancelOrders, self._web3ContractInstance, + )( + orderAddresses, + orderValues, + cancelTakerTokenAmounts, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + orderAddresses: string[][], + orderValues: BigNumber[][], + cancelTakerTokenAmounts: BigNumber[], + txData: TxData = {}, + ): Promise { + const self = this as ExchangeContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.batchCancelOrders.estimateGas, self._web3ContractInstance, + )( + orderAddresses, + orderValues, + cancelTakerTokenAmounts, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + orderAddresses: string[][], + orderValues: BigNumber[][], + cancelTakerTokenAmounts: BigNumber[], + txData: TxData = {}, + ): string { + const self = this as ExchangeContract; + const abiEncodedTransactionData = self._web3ContractInstance.batchCancelOrders.getData(); + return abiEncodedTransactionData; + }, + }; + public fillOrder = { + async sendTransactionAsync( + orderAddresses: string[], + orderValues: BigNumber[], + fillTakerTokenAmount: BigNumber, + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + v: number|BigNumber, + r: string, + s: string, + txData: TxData = {}, + ): Promise { + const self = this as ExchangeContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.fillOrder.estimateGasAsync.bind( + self, + orderAddresses, + orderValues, + fillTakerTokenAmount, + shouldThrowOnInsufficientBalanceOrAllowance, + v, + r, + s, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.fillOrder, self._web3ContractInstance, + )( + orderAddresses, + orderValues, + fillTakerTokenAmount, + shouldThrowOnInsufficientBalanceOrAllowance, + v, + r, + s, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + orderAddresses: string[], + orderValues: BigNumber[], + fillTakerTokenAmount: BigNumber, + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + v: number|BigNumber, + r: string, + s: string, + txData: TxData = {}, + ): Promise { + const self = this as ExchangeContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.fillOrder.estimateGas, self._web3ContractInstance, + )( + orderAddresses, + orderValues, + fillTakerTokenAmount, + shouldThrowOnInsufficientBalanceOrAllowance, + v, + r, + s, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + orderAddresses: string[], + orderValues: BigNumber[], + fillTakerTokenAmount: BigNumber, + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + v: number|BigNumber, + r: string, + s: string, + txData: TxData = {}, + ): string { + const self = this as ExchangeContract; + const abiEncodedTransactionData = self._web3ContractInstance.fillOrder.getData(); + return abiEncodedTransactionData; + }, + }; + public getOrderHash = { + async callAsync( + orderAddresses: string[], + orderValues: BigNumber[], + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as ExchangeContract; + const result = await promisify( + self._web3ContractInstance.getOrderHash.call, + self._web3ContractInstance, + )( + orderAddresses, + orderValues, + ); + return result; + }, + }; + public EXTERNAL_QUERY_GAS_LIMIT = { + async callAsync( + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as ExchangeContract; + const result = await promisify( + self._web3ContractInstance.EXTERNAL_QUERY_GAS_LIMIT.call, + self._web3ContractInstance, + )( + ); + return result; + }, + }; + public VERSION = { + async callAsync( + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as ExchangeContract; + const result = await promisify( + self._web3ContractInstance.VERSION.call, + self._web3ContractInstance, + )( + ); + return result; + }, + }; + constructor(web3ContractInstance: Web3.ContractInstance, defaults: Partial) { + super(web3ContractInstance, defaults); + classUtils.bindAll(this, ['_web3ContractInstance', '_defaults']); + } +} // tslint:disable:max-file-line-count diff --git a/packages/contracts/src/contract_wrappers/generated/token.ts b/packages/contracts/src/contract_wrappers/generated/token.ts new file mode 100644 index 000000000..5ad96da1e --- /dev/null +++ b/packages/contracts/src/contract_wrappers/generated/token.ts @@ -0,0 +1,215 @@ +/** + * This file is auto-generated using abi-gen. Don't edit directly. + * Templates can be found at https://github.com/0xProject/0x.js/tree/development/packages/abi-gen-templates. + */ +// tslint:disable-next-line:no-unused-variable +import { TxData, TxDataPayable } from '@0xproject/types'; +import { BigNumber, classUtils, promisify } from '@0xproject/utils'; +import * as Web3 from 'web3'; + +import {BaseContract} from './base_contract'; + +export class TokenContract extends BaseContract { + public approve = { + async sendTransactionAsync( + _spender: string, + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as TokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.approve.estimateGasAsync.bind( + self, + _spender, + _value, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.approve, self._web3ContractInstance, + )( + _spender, + _value, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + _spender: string, + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as TokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.approve.estimateGas, self._web3ContractInstance, + )( + _spender, + _value, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + _spender: string, + _value: BigNumber, + txData: TxData = {}, + ): string { + const self = this as TokenContract; + const abiEncodedTransactionData = self._web3ContractInstance.approve.getData(); + return abiEncodedTransactionData; + }, + }; + public transferFrom = { + async sendTransactionAsync( + _from: string, + _to: string, + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as TokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.transferFrom.estimateGasAsync.bind( + self, + _from, + _to, + _value, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.transferFrom, self._web3ContractInstance, + )( + _from, + _to, + _value, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + _from: string, + _to: string, + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as TokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.transferFrom.estimateGas, self._web3ContractInstance, + )( + _from, + _to, + _value, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + _from: string, + _to: string, + _value: BigNumber, + txData: TxData = {}, + ): string { + const self = this as TokenContract; + const abiEncodedTransactionData = self._web3ContractInstance.transferFrom.getData(); + return abiEncodedTransactionData; + }, + }; + public balanceOf = { + async callAsync( + _owner: string, + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as TokenContract; + const result = await promisify( + self._web3ContractInstance.balanceOf.call, + self._web3ContractInstance, + )( + _owner, + ); + return result; + }, + }; + public transfer = { + async sendTransactionAsync( + _to: string, + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as TokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.transfer.estimateGasAsync.bind( + self, + _to, + _value, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.transfer, self._web3ContractInstance, + )( + _to, + _value, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + _to: string, + _value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as TokenContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.transfer.estimateGas, self._web3ContractInstance, + )( + _to, + _value, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + _to: string, + _value: BigNumber, + txData: TxData = {}, + ): string { + const self = this as TokenContract; + const abiEncodedTransactionData = self._web3ContractInstance.transfer.getData(); + return abiEncodedTransactionData; + }, + }; + public allowance = { + async callAsync( + _owner: string, + _spender: string, + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as TokenContract; + const result = await promisify( + self._web3ContractInstance.allowance.call, + self._web3ContractInstance, + )( + _owner, + _spender, + ); + return result; + }, + }; + constructor(web3ContractInstance: Web3.ContractInstance, defaults: Partial) { + super(web3ContractInstance, defaults); + classUtils.bindAll(this, ['_web3ContractInstance', '_defaults']); + } +} // tslint:disable:max-file-line-count diff --git a/packages/contracts/src/contract_wrappers/generated/token_registry.ts b/packages/contracts/src/contract_wrappers/generated/token_registry.ts new file mode 100644 index 000000000..635f9f214 --- /dev/null +++ b/packages/contracts/src/contract_wrappers/generated/token_registry.ts @@ -0,0 +1,548 @@ +/** + * This file is auto-generated using abi-gen. Don't edit directly. + * Templates can be found at https://github.com/0xProject/0x.js/tree/development/packages/abi-gen-templates. + */ +// tslint:disable-next-line:no-unused-variable +import { TxData, TxDataPayable } from '@0xproject/types'; +import { BigNumber, classUtils, promisify } from '@0xproject/utils'; +import * as Web3 from 'web3'; + +import {BaseContract} from './base_contract'; + +export class TokenRegistryContract extends BaseContract { + public removeToken = { + async sendTransactionAsync( + _token: string, + _index: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as TokenRegistryContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.removeToken.estimateGasAsync.bind( + self, + _token, + _index, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.removeToken, self._web3ContractInstance, + )( + _token, + _index, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + _token: string, + _index: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as TokenRegistryContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.removeToken.estimateGas, self._web3ContractInstance, + )( + _token, + _index, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + _token: string, + _index: BigNumber, + txData: TxData = {}, + ): string { + const self = this as TokenRegistryContract; + const abiEncodedTransactionData = self._web3ContractInstance.removeToken.getData(); + return abiEncodedTransactionData; + }, + }; + public getTokenAddressByName = { + async callAsync( + _name: string, + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as TokenRegistryContract; + const result = await promisify( + self._web3ContractInstance.getTokenAddressByName.call, + self._web3ContractInstance, + )( + _name, + ); + return result; + }, + }; + public getTokenAddressBySymbol = { + async callAsync( + _symbol: string, + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as TokenRegistryContract; + const result = await promisify( + self._web3ContractInstance.getTokenAddressBySymbol.call, + self._web3ContractInstance, + )( + _symbol, + ); + return result; + }, + }; + public setTokenSwarmHash = { + async sendTransactionAsync( + _token: string, + _swarmHash: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenRegistryContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.setTokenSwarmHash.estimateGasAsync.bind( + self, + _token, + _swarmHash, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.setTokenSwarmHash, self._web3ContractInstance, + )( + _token, + _swarmHash, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + _token: string, + _swarmHash: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenRegistryContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.setTokenSwarmHash.estimateGas, self._web3ContractInstance, + )( + _token, + _swarmHash, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + _token: string, + _swarmHash: string, + txData: TxData = {}, + ): string { + const self = this as TokenRegistryContract; + const abiEncodedTransactionData = self._web3ContractInstance.setTokenSwarmHash.getData(); + return abiEncodedTransactionData; + }, + }; + public getTokenMetaData = { + async callAsync( + _token: string, + defaultBlock?: Web3.BlockParam, + ): Promise<[string, string, string, BigNumber, string, string] + > { + const self = this as TokenRegistryContract; + const result = await promisify<[string, string, string, BigNumber, string, string] + >( + self._web3ContractInstance.getTokenMetaData.call, + self._web3ContractInstance, + )( + _token, + ); + return result; + }, + }; + public owner = { + async callAsync( + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as TokenRegistryContract; + const result = await promisify( + self._web3ContractInstance.owner.call, + self._web3ContractInstance, + )( + ); + return result; + }, + }; + public addToken = { + async sendTransactionAsync( + _token: string, + _name: string, + _symbol: string, + _decimals: number|BigNumber, + _ipfsHash: string, + _swarmHash: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenRegistryContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.addToken.estimateGasAsync.bind( + self, + _token, + _name, + _symbol, + _decimals, + _ipfsHash, + _swarmHash, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.addToken, self._web3ContractInstance, + )( + _token, + _name, + _symbol, + _decimals, + _ipfsHash, + _swarmHash, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + _token: string, + _name: string, + _symbol: string, + _decimals: number|BigNumber, + _ipfsHash: string, + _swarmHash: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenRegistryContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.addToken.estimateGas, self._web3ContractInstance, + )( + _token, + _name, + _symbol, + _decimals, + _ipfsHash, + _swarmHash, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + _token: string, + _name: string, + _symbol: string, + _decimals: number|BigNumber, + _ipfsHash: string, + _swarmHash: string, + txData: TxData = {}, + ): string { + const self = this as TokenRegistryContract; + const abiEncodedTransactionData = self._web3ContractInstance.addToken.getData(); + return abiEncodedTransactionData; + }, + }; + public setTokenName = { + async sendTransactionAsync( + _token: string, + _name: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenRegistryContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.setTokenName.estimateGasAsync.bind( + self, + _token, + _name, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.setTokenName, self._web3ContractInstance, + )( + _token, + _name, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + _token: string, + _name: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenRegistryContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.setTokenName.estimateGas, self._web3ContractInstance, + )( + _token, + _name, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + _token: string, + _name: string, + txData: TxData = {}, + ): string { + const self = this as TokenRegistryContract; + const abiEncodedTransactionData = self._web3ContractInstance.setTokenName.getData(); + return abiEncodedTransactionData; + }, + }; + public tokens = { + async callAsync( + index: string, + defaultBlock?: Web3.BlockParam, + ): Promise<[string, string, string, BigNumber, string, string] + > { + const self = this as TokenRegistryContract; + const result = await promisify<[string, string, string, BigNumber, string, string] + >( + self._web3ContractInstance.tokens.call, + self._web3ContractInstance, + )( + index, + ); + return result; + }, + }; + public tokenAddresses = { + async callAsync( + index: BigNumber, + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as TokenRegistryContract; + const result = await promisify( + self._web3ContractInstance.tokenAddresses.call, + self._web3ContractInstance, + )( + index, + ); + return result; + }, + }; + public getTokenByName = { + async callAsync( + _name: string, + defaultBlock?: Web3.BlockParam, + ): Promise<[string, string, string, BigNumber, string, string] + > { + const self = this as TokenRegistryContract; + const result = await promisify<[string, string, string, BigNumber, string, string] + >( + self._web3ContractInstance.getTokenByName.call, + self._web3ContractInstance, + )( + _name, + ); + return result; + }, + }; + public getTokenAddresses = { + async callAsync( + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as TokenRegistryContract; + const result = await promisify( + self._web3ContractInstance.getTokenAddresses.call, + self._web3ContractInstance, + )( + ); + return result; + }, + }; + public setTokenIpfsHash = { + async sendTransactionAsync( + _token: string, + _ipfsHash: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenRegistryContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.setTokenIpfsHash.estimateGasAsync.bind( + self, + _token, + _ipfsHash, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.setTokenIpfsHash, self._web3ContractInstance, + )( + _token, + _ipfsHash, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + _token: string, + _ipfsHash: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenRegistryContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.setTokenIpfsHash.estimateGas, self._web3ContractInstance, + )( + _token, + _ipfsHash, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + _token: string, + _ipfsHash: string, + txData: TxData = {}, + ): string { + const self = this as TokenRegistryContract; + const abiEncodedTransactionData = self._web3ContractInstance.setTokenIpfsHash.getData(); + return abiEncodedTransactionData; + }, + }; + public getTokenBySymbol = { + async callAsync( + _symbol: string, + defaultBlock?: Web3.BlockParam, + ): Promise<[string, string, string, BigNumber, string, string] + > { + const self = this as TokenRegistryContract; + const result = await promisify<[string, string, string, BigNumber, string, string] + >( + self._web3ContractInstance.getTokenBySymbol.call, + self._web3ContractInstance, + )( + _symbol, + ); + return result; + }, + }; + public setTokenSymbol = { + async sendTransactionAsync( + _token: string, + _symbol: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenRegistryContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.setTokenSymbol.estimateGasAsync.bind( + self, + _token, + _symbol, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.setTokenSymbol, self._web3ContractInstance, + )( + _token, + _symbol, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + _token: string, + _symbol: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenRegistryContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.setTokenSymbol.estimateGas, self._web3ContractInstance, + )( + _token, + _symbol, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + _token: string, + _symbol: string, + txData: TxData = {}, + ): string { + const self = this as TokenRegistryContract; + const abiEncodedTransactionData = self._web3ContractInstance.setTokenSymbol.getData(); + return abiEncodedTransactionData; + }, + }; + public transferOwnership = { + async sendTransactionAsync( + newOwner: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenRegistryContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.transferOwnership.estimateGasAsync.bind( + self, + newOwner, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.transferOwnership, self._web3ContractInstance, + )( + newOwner, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + newOwner: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenRegistryContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.transferOwnership.estimateGas, self._web3ContractInstance, + )( + newOwner, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + newOwner: string, + txData: TxData = {}, + ): string { + const self = this as TokenRegistryContract; + const abiEncodedTransactionData = self._web3ContractInstance.transferOwnership.getData(); + return abiEncodedTransactionData; + }, + }; + constructor(web3ContractInstance: Web3.ContractInstance, defaults: Partial) { + super(web3ContractInstance, defaults); + classUtils.bindAll(this, ['_web3ContractInstance', '_defaults']); + } +} // tslint:disable:max-file-line-count diff --git a/packages/contracts/src/contract_wrappers/generated/token_transfer_proxy.ts b/packages/contracts/src/contract_wrappers/generated/token_transfer_proxy.ts new file mode 100644 index 000000000..a5a40d47f --- /dev/null +++ b/packages/contracts/src/contract_wrappers/generated/token_transfer_proxy.ts @@ -0,0 +1,283 @@ +/** + * This file is auto-generated using abi-gen. Don't edit directly. + * Templates can be found at https://github.com/0xProject/0x.js/tree/development/packages/abi-gen-templates. + */ +// tslint:disable-next-line:no-unused-variable +import { TxData, TxDataPayable } from '@0xproject/types'; +import { BigNumber, classUtils, promisify } from '@0xproject/utils'; +import * as Web3 from 'web3'; + +import {BaseContract} from './base_contract'; + +export class TokenTransferProxyContract extends BaseContract { + public transferFrom = { + async sendTransactionAsync( + token: string, + from: string, + to: string, + value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as TokenTransferProxyContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.transferFrom.estimateGasAsync.bind( + self, + token, + from, + to, + value, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.transferFrom, self._web3ContractInstance, + )( + token, + from, + to, + value, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + token: string, + from: string, + to: string, + value: BigNumber, + txData: TxData = {}, + ): Promise { + const self = this as TokenTransferProxyContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.transferFrom.estimateGas, self._web3ContractInstance, + )( + token, + from, + to, + value, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + token: string, + from: string, + to: string, + value: BigNumber, + txData: TxData = {}, + ): string { + const self = this as TokenTransferProxyContract; + const abiEncodedTransactionData = self._web3ContractInstance.transferFrom.getData(); + return abiEncodedTransactionData; + }, + }; + public addAuthorizedAddress = { + async sendTransactionAsync( + target: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenTransferProxyContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.addAuthorizedAddress.estimateGasAsync.bind( + self, + target, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.addAuthorizedAddress, self._web3ContractInstance, + )( + target, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + target: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenTransferProxyContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.addAuthorizedAddress.estimateGas, self._web3ContractInstance, + )( + target, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + target: string, + txData: TxData = {}, + ): string { + const self = this as TokenTransferProxyContract; + const abiEncodedTransactionData = self._web3ContractInstance.addAuthorizedAddress.getData(); + return abiEncodedTransactionData; + }, + }; + public authorities = { + async callAsync( + index: BigNumber, + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as TokenTransferProxyContract; + const result = await promisify( + self._web3ContractInstance.authorities.call, + self._web3ContractInstance, + )( + index, + ); + return result; + }, + }; + public removeAuthorizedAddress = { + async sendTransactionAsync( + target: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenTransferProxyContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.removeAuthorizedAddress.estimateGasAsync.bind( + self, + target, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.removeAuthorizedAddress, self._web3ContractInstance, + )( + target, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + target: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenTransferProxyContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.removeAuthorizedAddress.estimateGas, self._web3ContractInstance, + )( + target, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + target: string, + txData: TxData = {}, + ): string { + const self = this as TokenTransferProxyContract; + const abiEncodedTransactionData = self._web3ContractInstance.removeAuthorizedAddress.getData(); + return abiEncodedTransactionData; + }, + }; + public owner = { + async callAsync( + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as TokenTransferProxyContract; + const result = await promisify( + self._web3ContractInstance.owner.call, + self._web3ContractInstance, + )( + ); + return result; + }, + }; + public authorized = { + async callAsync( + index: string, + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as TokenTransferProxyContract; + const result = await promisify( + self._web3ContractInstance.authorized.call, + self._web3ContractInstance, + )( + index, + ); + return result; + }, + }; + public getAuthorizedAddresses = { + async callAsync( + defaultBlock?: Web3.BlockParam, + ): Promise { + const self = this as TokenTransferProxyContract; + const result = await promisify( + self._web3ContractInstance.getAuthorizedAddresses.call, + self._web3ContractInstance, + )( + ); + return result; + }, + }; + public transferOwnership = { + async sendTransactionAsync( + newOwner: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenTransferProxyContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + self.transferOwnership.estimateGasAsync.bind( + self, + newOwner, + ), + ); + const txHash = await promisify( + self._web3ContractInstance.transferOwnership, self._web3ContractInstance, + )( + newOwner, + txDataWithDefaults, + ); + return txHash; + }, + async estimateGasAsync( + newOwner: string, + txData: TxData = {}, + ): Promise { + const self = this as TokenTransferProxyContract; + const txDataWithDefaults = await self._applyDefaultsToTxDataAsync( + txData, + ); + const gas = await promisify( + self._web3ContractInstance.transferOwnership.estimateGas, self._web3ContractInstance, + )( + newOwner, + txDataWithDefaults, + ); + return gas; + }, + getABIEncodedTransactionData( + newOwner: string, + txData: TxData = {}, + ): string { + const self = this as TokenTransferProxyContract; + const abiEncodedTransactionData = self._web3ContractInstance.transferOwnership.getData(); + return abiEncodedTransactionData; + }, + }; + constructor(web3ContractInstance: Web3.ContractInstance, defaults: Partial) { + super(web3ContractInstance, defaults); + classUtils.bindAll(this, ['_web3ContractInstance', '_defaults']); + } +} // tslint:disable:max-file-line-count diff --git a/packages/contracts/src/contracts/current/multisig/MultiSigWallet/MultiSigWallet.sol b/packages/contracts/src/contracts/current/multisig/MultiSigWallet/MultiSigWallet.sol new file mode 100644 index 000000000..997bb86c0 --- /dev/null +++ b/packages/contracts/src/contracts/current/multisig/MultiSigWallet/MultiSigWallet.sol @@ -0,0 +1,366 @@ +pragma solidity ^0.4.10; + +/// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. +/// @author Stefan George - +contract MultiSigWallet { + + uint constant public MAX_OWNER_COUNT = 50; + + event Confirmation(address indexed sender, uint indexed transactionId); + event Revocation(address indexed sender, uint indexed transactionId); + event Submission(uint indexed transactionId); + event Execution(uint indexed transactionId); + event ExecutionFailure(uint indexed transactionId); + event Deposit(address indexed sender, uint value); + event OwnerAddition(address indexed owner); + event OwnerRemoval(address indexed owner); + event RequirementChange(uint required); + + mapping (uint => Transaction) public transactions; + mapping (uint => mapping (address => bool)) public confirmations; + mapping (address => bool) public isOwner; + address[] public owners; + uint public required; + uint public transactionCount; + + struct Transaction { + address destination; + uint value; + bytes data; + bool executed; + } + + modifier onlyWallet() { + if (msg.sender != address(this)) + throw; + _; + } + + modifier ownerDoesNotExist(address owner) { + if (isOwner[owner]) + throw; + _; + } + + modifier ownerExists(address owner) { + if (!isOwner[owner]) + throw; + _; + } + + modifier transactionExists(uint transactionId) { + if (transactions[transactionId].destination == 0) + throw; + _; + } + + modifier confirmed(uint transactionId, address owner) { + if (!confirmations[transactionId][owner]) + throw; + _; + } + + modifier notConfirmed(uint transactionId, address owner) { + if (confirmations[transactionId][owner]) + throw; + _; + } + + modifier notExecuted(uint transactionId) { + if (transactions[transactionId].executed) + throw; + _; + } + + modifier notNull(address _address) { + if (_address == 0) + throw; + _; + } + + modifier validRequirement(uint ownerCount, uint _required) { + if ( ownerCount > MAX_OWNER_COUNT + || _required > ownerCount + || _required == 0 + || ownerCount == 0) + throw; + _; + } + + /// @dev Fallback function allows to deposit ether. + function() + payable + { + if (msg.value > 0) + Deposit(msg.sender, msg.value); + } + + /* + * Public functions + */ + /// @dev Contract constructor sets initial owners and required number of confirmations. + /// @param _owners List of initial owners. + /// @param _required Number of required confirmations. + function MultiSigWallet(address[] _owners, uint _required) + public + validRequirement(_owners.length, _required) + { + for (uint i=0; i<_owners.length; i++) { + if (isOwner[_owners[i]] || _owners[i] == 0) + throw; + isOwner[_owners[i]] = true; + } + owners = _owners; + required = _required; + } + + /// @dev Allows to add a new owner. Transaction has to be sent by wallet. + /// @param owner Address of new owner. + function addOwner(address owner) + public + onlyWallet + ownerDoesNotExist(owner) + notNull(owner) + validRequirement(owners.length + 1, required) + { + isOwner[owner] = true; + owners.push(owner); + OwnerAddition(owner); + } + + /// @dev Allows to remove an owner. Transaction has to be sent by wallet. + /// @param owner Address of owner. + function removeOwner(address owner) + public + onlyWallet + ownerExists(owner) + { + isOwner[owner] = false; + for (uint i=0; i owners.length) + changeRequirement(owners.length); + OwnerRemoval(owner); + } + + /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet. + /// @param owner Address of owner to be replaced. + /// @param owner Address of new owner. + function replaceOwner(address owner, address newOwner) + public + onlyWallet + ownerExists(owner) + ownerDoesNotExist(newOwner) + { + for (uint i=0; i +contract MultiSigWalletWithTimeLock is MultiSigWallet { + + event ConfirmationTimeSet(uint indexed transactionId, uint confirmationTime); + event TimeLockChange(uint secondsTimeLocked); + + uint public secondsTimeLocked; + + mapping (uint => uint) public confirmationTimes; + + modifier notFullyConfirmed(uint transactionId) { + require(!isConfirmed(transactionId)); + _; + } + + modifier fullyConfirmed(uint transactionId) { + require(isConfirmed(transactionId)); + _; + } + + modifier pastTimeLock(uint transactionId) { + require(block.timestamp >= confirmationTimes[transactionId] + secondsTimeLocked); + _; + } + + /* + * Public functions + */ + + /// @dev Contract constructor sets initial owners, required number of confirmations, and time lock. + /// @param _owners List of initial owners. + /// @param _required Number of required confirmations. + /// @param _secondsTimeLocked Duration needed after a transaction is confirmed and before it becomes executable, in seconds. + function MultiSigWalletWithTimeLock(address[] _owners, uint _required, uint _secondsTimeLocked) + public + MultiSigWallet(_owners, _required) + { + secondsTimeLocked = _secondsTimeLocked; + } + + /// @dev Changes the duration of the time lock for transactions. + /// @param _secondsTimeLocked Duration needed after a transaction is confirmed and before it becomes executable, in seconds. + function changeTimeLock(uint _secondsTimeLocked) + public + onlyWallet + { + secondsTimeLocked = _secondsTimeLocked; + TimeLockChange(_secondsTimeLocked); + } + + /// @dev Allows an owner to confirm a transaction. + /// @param transactionId Transaction ID. + function confirmTransaction(uint transactionId) + public + ownerExists(msg.sender) + transactionExists(transactionId) + notConfirmed(transactionId, msg.sender) + notFullyConfirmed(transactionId) + { + confirmations[transactionId][msg.sender] = true; + Confirmation(msg.sender, transactionId); + if (isConfirmed(transactionId)) { + setConfirmationTime(transactionId, block.timestamp); + } + } + + /// @dev Allows an owner to revoke a confirmation for a transaction. + /// @param transactionId Transaction ID. + function revokeConfirmation(uint transactionId) + public + ownerExists(msg.sender) + confirmed(transactionId, msg.sender) + notExecuted(transactionId) + notFullyConfirmed(transactionId) + { + confirmations[transactionId][msg.sender] = false; + Revocation(msg.sender, transactionId); + } + + /// @dev Allows anyone to execute a confirmed transaction. + /// @param transactionId Transaction ID. + function executeTransaction(uint transactionId) + public + notExecuted(transactionId) + fullyConfirmed(transactionId) + pastTimeLock(transactionId) + { + Transaction storage tx = transactions[transactionId]; + tx.executed = true; + if (tx.destination.call.value(tx.value)(tx.data)) + Execution(transactionId); + else { + ExecutionFailure(transactionId); + tx.executed = false; + } + } + + /* + * Internal functions + */ + + /// @dev Sets the time of when a submission first passed. + function setConfirmationTime(uint transactionId, uint confirmationTime) + internal + { + confirmationTimes[transactionId] = confirmationTime; + ConfirmationTimeSet(transactionId, confirmationTime); + } +} diff --git a/packages/contracts/src/contracts/current/multisig/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol b/packages/contracts/src/contracts/current/multisig/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol new file mode 100644 index 000000000..3c6a3d2ef --- /dev/null +++ b/packages/contracts/src/contracts/current/multisig/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol @@ -0,0 +1,82 @@ +/* + + Copyright 2017 ZeroEx Intl. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +pragma solidity ^0.4.10; + +import { MultiSigWalletWithTimeLock } from "../MultiSigWalletWithTimeLock/MultiSigWalletWithTimeLock.sol"; + +contract MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress is MultiSigWalletWithTimeLock { + + address public TOKEN_TRANSFER_PROXY_CONTRACT; + + modifier validRemoveAuthorizedAddressTx(uint transactionId) { + Transaction storage tx = transactions[transactionId]; + require(tx.destination == TOKEN_TRANSFER_PROXY_CONTRACT); + require(isFunctionRemoveAuthorizedAddress(tx.data)); + _; + } + + /// @dev Contract constructor sets initial owners, required number of confirmations, time lock, and tokenTransferProxy address. + /// @param _owners List of initial owners. + /// @param _required Number of required confirmations. + /// @param _secondsTimeLocked Duration needed after a transaction is confirmed and before it becomes executable, in seconds. + /// @param _tokenTransferProxy Address of TokenTransferProxy contract. + function MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress( + address[] _owners, + uint _required, + uint _secondsTimeLocked, + address _tokenTransferProxy) + public + MultiSigWalletWithTimeLock(_owners, _required, _secondsTimeLocked) + { + TOKEN_TRANSFER_PROXY_CONTRACT = _tokenTransferProxy; + } + + /// @dev Allows execution of removeAuthorizedAddress without time lock. + /// @param transactionId Transaction ID. + function executeRemoveAuthorizedAddress(uint transactionId) + public + notExecuted(transactionId) + fullyConfirmed(transactionId) + validRemoveAuthorizedAddressTx(transactionId) + { + Transaction storage tx = transactions[transactionId]; + tx.executed = true; + if (tx.destination.call.value(tx.value)(tx.data)) + Execution(transactionId); + else { + ExecutionFailure(transactionId); + tx.executed = false; + } + } + + /// @dev Compares first 4 bytes of byte array to removeAuthorizedAddress function signature. + /// @param data Transaction data. + /// @return Successful if data is a call to removeAuthorizedAddress. + function isFunctionRemoveAuthorizedAddress(bytes data) + public + constant + returns (bool) + { + bytes4 removeAuthorizedAddressSignature = bytes4(sha3("removeAuthorizedAddress(address)")); + for (uint i = 0; i < 4; i++) { + require(data[i] == removeAuthorizedAddressSignature[i]); + } + return true; + } +} diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol b/packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol new file mode 100644 index 000000000..8dacf797c --- /dev/null +++ b/packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol @@ -0,0 +1,602 @@ +/* + + Copyright 2017 ZeroEx Intl. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +pragma solidity ^0.4.14; + +import { TokenTransferProxy } from "../TokenTransferProxy/TokenTransferProxy.sol"; +import { Token_v1 as Token } from "../../../previous/Token/Token_v1.sol"; +import { SafeMath_v1 as SafeMath } from "../../../previous/SafeMath/SafeMath_v1.sol"; + +/// @title Exchange - Facilitates exchange of ERC20 tokens. +/// @author Amir Bandeali - , Will Warren - +contract Exchange is SafeMath { + + // Error Codes + enum Errors { + ORDER_EXPIRED, // Order has already expired + ORDER_FULLY_FILLED_OR_CANCELLED, // Order has already been fully filled or cancelled + ROUNDING_ERROR_TOO_LARGE, // Rounding error too large + INSUFFICIENT_BALANCE_OR_ALLOWANCE // Insufficient balance or allowance for token transfer + } + + string constant public VERSION = "1.0.0"; + uint16 constant public EXTERNAL_QUERY_GAS_LIMIT = 4999; // Changes to state require at least 5000 gas + + address public ZRX_TOKEN_CONTRACT; + address public TOKEN_TRANSFER_PROXY_CONTRACT; + + // Mappings of orderHash => amounts of takerTokenAmount filled or cancelled. + mapping (bytes32 => uint) public filled; + mapping (bytes32 => uint) public cancelled; + + event LogFill( + address indexed maker, + address taker, + address indexed feeRecipient, + address makerToken, + address takerToken, + uint filledMakerTokenAmount, + uint filledTakerTokenAmount, + uint paidMakerFee, + uint paidTakerFee, + bytes32 indexed tokens, // keccak256(makerToken, takerToken), allows subscribing to a token pair + bytes32 orderHash + ); + + event LogCancel( + address indexed maker, + address indexed feeRecipient, + address makerToken, + address takerToken, + uint cancelledMakerTokenAmount, + uint cancelledTakerTokenAmount, + bytes32 indexed tokens, + bytes32 orderHash + ); + + event LogError(uint8 indexed errorId, bytes32 indexed orderHash); + + struct Order { + address maker; + address taker; + address makerToken; + address takerToken; + address feeRecipient; + uint makerTokenAmount; + uint takerTokenAmount; + uint makerFee; + uint takerFee; + uint expirationTimestampInSec; + bytes32 orderHash; + } + + function Exchange(address _zrxToken, address _tokenTransferProxy) { + ZRX_TOKEN_CONTRACT = _zrxToken; + TOKEN_TRANSFER_PROXY_CONTRACT = _tokenTransferProxy; + } + + /* + * Core exchange functions + */ + + /// @dev Fills the input order. + /// @param orderAddresses Array of order's maker, taker, makerToken, takerToken, and feeRecipient. + /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, and salt. + /// @param fillTakerTokenAmount Desired amount of takerToken to fill. + /// @param shouldThrowOnInsufficientBalanceOrAllowance Test if transfer will fail before attempting. + /// @param v ECDSA signature parameter v. + /// @param r ECDSA signature parameters r. + /// @param s ECDSA signature parameters s. + /// @return Total amount of takerToken filled in trade. + function fillOrder( + address[5] orderAddresses, + uint[6] orderValues, + uint fillTakerTokenAmount, + bool shouldThrowOnInsufficientBalanceOrAllowance, + uint8 v, + bytes32 r, + bytes32 s) + public + returns (uint filledTakerTokenAmount) + { + Order memory order = Order({ + maker: orderAddresses[0], + taker: orderAddresses[1], + makerToken: orderAddresses[2], + takerToken: orderAddresses[3], + feeRecipient: orderAddresses[4], + makerTokenAmount: orderValues[0], + takerTokenAmount: orderValues[1], + makerFee: orderValues[2], + takerFee: orderValues[3], + expirationTimestampInSec: orderValues[4], + orderHash: getOrderHash(orderAddresses, orderValues) + }); + + require(order.taker == address(0) || order.taker == msg.sender); + require(order.makerTokenAmount > 0 && order.takerTokenAmount > 0 && fillTakerTokenAmount > 0); + require(isValidSignature( + order.maker, + order.orderHash, + v, + r, + s + )); + + if (block.timestamp >= order.expirationTimestampInSec) { + LogError(uint8(Errors.ORDER_EXPIRED), order.orderHash); + return 0; + } + + uint remainingTakerTokenAmount = safeSub(order.takerTokenAmount, getUnavailableTakerTokenAmount(order.orderHash)); + filledTakerTokenAmount = min256(fillTakerTokenAmount, remainingTakerTokenAmount); + if (filledTakerTokenAmount == 0) { + LogError(uint8(Errors.ORDER_FULLY_FILLED_OR_CANCELLED), order.orderHash); + return 0; + } + + if (isRoundingError(filledTakerTokenAmount, order.takerTokenAmount, order.makerTokenAmount)) { + LogError(uint8(Errors.ROUNDING_ERROR_TOO_LARGE), order.orderHash); + return 0; + } + + if (!shouldThrowOnInsufficientBalanceOrAllowance && !isTransferable(order, filledTakerTokenAmount)) { + LogError(uint8(Errors.INSUFFICIENT_BALANCE_OR_ALLOWANCE), order.orderHash); + return 0; + } + + uint filledMakerTokenAmount = getPartialAmount(filledTakerTokenAmount, order.takerTokenAmount, order.makerTokenAmount); + uint paidMakerFee; + uint paidTakerFee; + filled[order.orderHash] = safeAdd(filled[order.orderHash], filledTakerTokenAmount); + require(transferViaTokenTransferProxy( + order.makerToken, + order.maker, + msg.sender, + filledMakerTokenAmount + )); + require(transferViaTokenTransferProxy( + order.takerToken, + msg.sender, + order.maker, + filledTakerTokenAmount + )); + if (order.feeRecipient != address(0)) { + if (order.makerFee > 0) { + paidMakerFee = getPartialAmount(filledTakerTokenAmount, order.takerTokenAmount, order.makerFee); + require(transferViaTokenTransferProxy( + ZRX_TOKEN_CONTRACT, + order.maker, + order.feeRecipient, + paidMakerFee + )); + } + if (order.takerFee > 0) { + paidTakerFee = getPartialAmount(filledTakerTokenAmount, order.takerTokenAmount, order.takerFee); + require(transferViaTokenTransferProxy( + ZRX_TOKEN_CONTRACT, + msg.sender, + order.feeRecipient, + paidTakerFee + )); + } + } + + LogFill( + order.maker, + msg.sender, + order.feeRecipient, + order.makerToken, + order.takerToken, + filledMakerTokenAmount, + filledTakerTokenAmount, + paidMakerFee, + paidTakerFee, + keccak256(order.makerToken, order.takerToken), + order.orderHash + ); + return filledTakerTokenAmount; + } + + /// @dev Cancels the input order. + /// @param orderAddresses Array of order's maker, taker, makerToken, takerToken, and feeRecipient. + /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, and salt. + /// @param cancelTakerTokenAmount Desired amount of takerToken to cancel in order. + /// @return Amount of takerToken cancelled. + function cancelOrder( + address[5] orderAddresses, + uint[6] orderValues, + uint cancelTakerTokenAmount) + public + returns (uint) + { + Order memory order = Order({ + maker: orderAddresses[0], + taker: orderAddresses[1], + makerToken: orderAddresses[2], + takerToken: orderAddresses[3], + feeRecipient: orderAddresses[4], + makerTokenAmount: orderValues[0], + takerTokenAmount: orderValues[1], + makerFee: orderValues[2], + takerFee: orderValues[3], + expirationTimestampInSec: orderValues[4], + orderHash: getOrderHash(orderAddresses, orderValues) + }); + + require(order.maker == msg.sender); + require(order.makerTokenAmount > 0 && order.takerTokenAmount > 0 && cancelTakerTokenAmount > 0); + + if (block.timestamp >= order.expirationTimestampInSec) { + LogError(uint8(Errors.ORDER_EXPIRED), order.orderHash); + return 0; + } + + uint remainingTakerTokenAmount = safeSub(order.takerTokenAmount, getUnavailableTakerTokenAmount(order.orderHash)); + uint cancelledTakerTokenAmount = min256(cancelTakerTokenAmount, remainingTakerTokenAmount); + if (cancelledTakerTokenAmount == 0) { + LogError(uint8(Errors.ORDER_FULLY_FILLED_OR_CANCELLED), order.orderHash); + return 0; + } + + cancelled[order.orderHash] = safeAdd(cancelled[order.orderHash], cancelledTakerTokenAmount); + + LogCancel( + order.maker, + order.feeRecipient, + order.makerToken, + order.takerToken, + getPartialAmount(cancelledTakerTokenAmount, order.takerTokenAmount, order.makerTokenAmount), + cancelledTakerTokenAmount, + keccak256(order.makerToken, order.takerToken), + order.orderHash + ); + return cancelledTakerTokenAmount; + } + + /* + * Wrapper functions + */ + + /// @dev Fills an order with specified parameters and ECDSA signature, throws if specified amount not filled entirely. + /// @param orderAddresses Array of order's maker, taker, makerToken, takerToken, and feeRecipient. + /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, and salt. + /// @param fillTakerTokenAmount Desired amount of takerToken to fill. + /// @param v ECDSA signature parameter v. + /// @param r ECDSA signature parameters r. + /// @param s ECDSA signature parameters s. + function fillOrKillOrder( + address[5] orderAddresses, + uint[6] orderValues, + uint fillTakerTokenAmount, + uint8 v, + bytes32 r, + bytes32 s) + public + { + require(fillOrder( + orderAddresses, + orderValues, + fillTakerTokenAmount, + false, + v, + r, + s + ) == fillTakerTokenAmount); + } + + /// @dev Synchronously executes multiple fill orders in a single transaction. + /// @param orderAddresses Array of address arrays containing individual order addresses. + /// @param orderValues Array of uint arrays containing individual order values. + /// @param fillTakerTokenAmounts Array of desired amounts of takerToken to fill in orders. + /// @param shouldThrowOnInsufficientBalanceOrAllowance Test if transfers will fail before attempting. + /// @param v Array ECDSA signature v parameters. + /// @param r Array of ECDSA signature r parameters. + /// @param s Array of ECDSA signature s parameters. + function batchFillOrders( + address[5][] orderAddresses, + uint[6][] orderValues, + uint[] fillTakerTokenAmounts, + bool shouldThrowOnInsufficientBalanceOrAllowance, + uint8[] v, + bytes32[] r, + bytes32[] s) + public + { + for (uint i = 0; i < orderAddresses.length; i++) { + fillOrder( + orderAddresses[i], + orderValues[i], + fillTakerTokenAmounts[i], + shouldThrowOnInsufficientBalanceOrAllowance, + v[i], + r[i], + s[i] + ); + } + } + + /// @dev Synchronously executes multiple fillOrKill orders in a single transaction. + /// @param orderAddresses Array of address arrays containing individual order addresses. + /// @param orderValues Array of uint arrays containing individual order values. + /// @param fillTakerTokenAmounts Array of desired amounts of takerToken to fill in orders. + /// @param v Array ECDSA signature v parameters. + /// @param r Array of ECDSA signature r parameters. + /// @param s Array of ECDSA signature s parameters. + function batchFillOrKillOrders( + address[5][] orderAddresses, + uint[6][] orderValues, + uint[] fillTakerTokenAmounts, + uint8[] v, + bytes32[] r, + bytes32[] s) + public + { + for (uint i = 0; i < orderAddresses.length; i++) { + fillOrKillOrder( + orderAddresses[i], + orderValues[i], + fillTakerTokenAmounts[i], + v[i], + r[i], + s[i] + ); + } + } + + /// @dev Synchronously executes multiple fill orders in a single transaction until total fillTakerTokenAmount filled. + /// @param orderAddresses Array of address arrays containing individual order addresses. + /// @param orderValues Array of uint arrays containing individual order values. + /// @param fillTakerTokenAmount Desired total amount of takerToken to fill in orders. + /// @param shouldThrowOnInsufficientBalanceOrAllowance Test if transfers will fail before attempting. + /// @param v Array ECDSA signature v parameters. + /// @param r Array of ECDSA signature r parameters. + /// @param s Array of ECDSA signature s parameters. + /// @return Total amount of fillTakerTokenAmount filled in orders. + function fillOrdersUpTo( + address[5][] orderAddresses, + uint[6][] orderValues, + uint fillTakerTokenAmount, + bool shouldThrowOnInsufficientBalanceOrAllowance, + uint8[] v, + bytes32[] r, + bytes32[] s) + public + returns (uint) + { + uint filledTakerTokenAmount = 0; + for (uint i = 0; i < orderAddresses.length; i++) { + require(orderAddresses[i][3] == orderAddresses[0][3]); // takerToken must be the same for each order + filledTakerTokenAmount = safeAdd(filledTakerTokenAmount, fillOrder( + orderAddresses[i], + orderValues[i], + safeSub(fillTakerTokenAmount, filledTakerTokenAmount), + shouldThrowOnInsufficientBalanceOrAllowance, + v[i], + r[i], + s[i] + )); + if (filledTakerTokenAmount == fillTakerTokenAmount) break; + } + return filledTakerTokenAmount; + } + + /// @dev Synchronously cancels multiple orders in a single transaction. + /// @param orderAddresses Array of address arrays containing individual order addresses. + /// @param orderValues Array of uint arrays containing individual order values. + /// @param cancelTakerTokenAmounts Array of desired amounts of takerToken to cancel in orders. + function batchCancelOrders( + address[5][] orderAddresses, + uint[6][] orderValues, + uint[] cancelTakerTokenAmounts) + public + { + for (uint i = 0; i < orderAddresses.length; i++) { + cancelOrder( + orderAddresses[i], + orderValues[i], + cancelTakerTokenAmounts[i] + ); + } + } + + /* + * Constant public functions + */ + + /// @dev Calculates Keccak-256 hash of order with specified parameters. + /// @param orderAddresses Array of order's maker, taker, makerToken, takerToken, and feeRecipient. + /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, and salt. + /// @return Keccak-256 hash of order. + function getOrderHash(address[5] orderAddresses, uint[6] orderValues) + public + constant + returns (bytes32) + { + return keccak256( + address(this), + orderAddresses[0], // maker + orderAddresses[1], // taker + orderAddresses[2], // makerToken + orderAddresses[3], // takerToken + orderAddresses[4], // feeRecipient + orderValues[0], // makerTokenAmount + orderValues[1], // takerTokenAmount + orderValues[2], // makerFee + orderValues[3], // takerFee + orderValues[4], // expirationTimestampInSec + orderValues[5] // salt + ); + } + + /// @dev Verifies that an order signature is valid. + /// @param signer address of signer. + /// @param hash Signed Keccak-256 hash. + /// @param v ECDSA signature parameter v. + /// @param r ECDSA signature parameters r. + /// @param s ECDSA signature parameters s. + /// @return Validity of order signature. + function isValidSignature( + address signer, + bytes32 hash, + uint8 v, + bytes32 r, + bytes32 s) + public + constant + returns (bool) + { + return signer == ecrecover( + keccak256("\x19Ethereum Signed Message:\n32", hash), + v, + r, + s + ); + } + + /// @dev Checks if rounding error > 0.1%. + /// @param numerator Numerator. + /// @param denominator Denominator. + /// @param target Value to multiply with numerator/denominator. + /// @return Rounding error is present. + function isRoundingError(uint numerator, uint denominator, uint target) + public + constant + returns (bool) + { + uint remainder = mulmod(target, numerator, denominator); + if (remainder == 0) return false; // No rounding error. + + uint errPercentageTimes1000000 = safeDiv( + safeMul(remainder, 1000000), + safeMul(numerator, target) + ); + return errPercentageTimes1000000 > 1000; + } + + /// @dev Calculates partial value given a numerator and denominator. + /// @param numerator Numerator. + /// @param denominator Denominator. + /// @param target Value to calculate partial of. + /// @return Partial value of target. + function getPartialAmount(uint numerator, uint denominator, uint target) + public + constant + returns (uint) + { + return safeDiv(safeMul(numerator, target), denominator); + } + + /// @dev Calculates the sum of values already filled and cancelled for a given order. + /// @param orderHash The Keccak-256 hash of the given order. + /// @return Sum of values already filled and cancelled. + function getUnavailableTakerTokenAmount(bytes32 orderHash) + public + constant + returns (uint) + { + return safeAdd(filled[orderHash], cancelled[orderHash]); + } + + + /* + * Internal functions + */ + + /// @dev Transfers a token using TokenTransferProxy transferFrom function. + /// @param token Address of token to transferFrom. + /// @param from Address transfering token. + /// @param to Address receiving token. + /// @param value Amount of token to transfer. + /// @return Success of token transfer. + function transferViaTokenTransferProxy( + address token, + address from, + address to, + uint value) + internal + returns (bool) + { + return TokenTransferProxy(TOKEN_TRANSFER_PROXY_CONTRACT).transferFrom(token, from, to, value); + } + + /// @dev Checks if any order transfers will fail. + /// @param order Order struct of params that will be checked. + /// @param fillTakerTokenAmount Desired amount of takerToken to fill. + /// @return Predicted result of transfers. + function isTransferable(Order order, uint fillTakerTokenAmount) + internal + constant // The called token contracts may attempt to change state, but will not be able to due to gas limits on getBalance and getAllowance. + returns (bool) + { + address taker = msg.sender; + uint fillMakerTokenAmount = getPartialAmount(fillTakerTokenAmount, order.takerTokenAmount, order.makerTokenAmount); + + if (order.feeRecipient != address(0)) { + bool isMakerTokenZRX = order.makerToken == ZRX_TOKEN_CONTRACT; + bool isTakerTokenZRX = order.takerToken == ZRX_TOKEN_CONTRACT; + uint paidMakerFee = getPartialAmount(fillTakerTokenAmount, order.takerTokenAmount, order.makerFee); + uint paidTakerFee = getPartialAmount(fillTakerTokenAmount, order.takerTokenAmount, order.takerFee); + uint requiredMakerZRX = isMakerTokenZRX ? safeAdd(fillMakerTokenAmount, paidMakerFee) : paidMakerFee; + uint requiredTakerZRX = isTakerTokenZRX ? safeAdd(fillTakerTokenAmount, paidTakerFee) : paidTakerFee; + + if ( getBalance(ZRX_TOKEN_CONTRACT, order.maker) < requiredMakerZRX + || getAllowance(ZRX_TOKEN_CONTRACT, order.maker) < requiredMakerZRX + || getBalance(ZRX_TOKEN_CONTRACT, taker) < requiredTakerZRX + || getAllowance(ZRX_TOKEN_CONTRACT, taker) < requiredTakerZRX + ) return false; + + if (!isMakerTokenZRX && ( getBalance(order.makerToken, order.maker) < fillMakerTokenAmount // Don't double check makerToken if ZRX + || getAllowance(order.makerToken, order.maker) < fillMakerTokenAmount) + ) return false; + if (!isTakerTokenZRX && ( getBalance(order.takerToken, taker) < fillTakerTokenAmount // Don't double check takerToken if ZRX + || getAllowance(order.takerToken, taker) < fillTakerTokenAmount) + ) return false; + } else if ( getBalance(order.makerToken, order.maker) < fillMakerTokenAmount + || getAllowance(order.makerToken, order.maker) < fillMakerTokenAmount + || getBalance(order.takerToken, taker) < fillTakerTokenAmount + || getAllowance(order.takerToken, taker) < fillTakerTokenAmount + ) return false; + + return true; + } + + /// @dev Get token balance of an address. + /// @param token Address of token. + /// @param owner Address of owner. + /// @return Token balance of owner. + function getBalance(address token, address owner) + internal + constant // The called token contract may attempt to change state, but will not be able to due to an added gas limit. + returns (uint) + { + return Token(token).balanceOf.gas(EXTERNAL_QUERY_GAS_LIMIT)(owner); // Limit gas to prevent reentrancy + } + + /// @dev Get allowance of token given to TokenTransferProxy by an address. + /// @param token Address of token. + /// @param owner Address of owner. + /// @return Allowance of token given to TokenTransferProxy by owner. + function getAllowance(address token, address owner) + internal + constant // The called token contract may attempt to change state, but will not be able to due to an added gas limit. + returns (uint) + { + return Token(token).allowance.gas(EXTERNAL_QUERY_GAS_LIMIT)(owner, TOKEN_TRANSFER_PROXY_CONTRACT); // Limit gas to prevent reentrancy + } +} diff --git a/packages/contracts/src/contracts/current/protocol/TokenRegistry/TokenRegistry.sol b/packages/contracts/src/contracts/current/protocol/TokenRegistry/TokenRegistry.sol new file mode 100644 index 000000000..3bd2fbfaf --- /dev/null +++ b/packages/contracts/src/contracts/current/protocol/TokenRegistry/TokenRegistry.sol @@ -0,0 +1,308 @@ +/* + + Copyright 2017 ZeroEx Intl. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +pragma solidity ^0.4.11; + +import { Ownable_v1 as Ownable } from "../../../previous/Ownable/Ownable_v1.sol"; + +/// @title Token Registry - Stores metadata associated with ERC20 tokens. See ERC22 https://github.com/ethereum/EIPs/issues/22 +/// @author Amir Bandeali - , Will Warren - +contract TokenRegistry is Ownable { + + event LogAddToken( + address indexed token, + string name, + string symbol, + uint8 decimals, + bytes ipfsHash, + bytes swarmHash + ); + + event LogRemoveToken( + address indexed token, + string name, + string symbol, + uint8 decimals, + bytes ipfsHash, + bytes swarmHash + ); + + event LogTokenNameChange(address indexed token, string oldName, string newName); + event LogTokenSymbolChange(address indexed token, string oldSymbol, string newSymbol); + event LogTokenIpfsHashChange(address indexed token, bytes oldIpfsHash, bytes newIpfsHash); + event LogTokenSwarmHashChange(address indexed token, bytes oldSwarmHash, bytes newSwarmHash); + + mapping (address => TokenMetadata) public tokens; + mapping (string => address) tokenBySymbol; + mapping (string => address) tokenByName; + + address[] public tokenAddresses; + + struct TokenMetadata { + address token; + string name; + string symbol; + uint8 decimals; + bytes ipfsHash; + bytes swarmHash; + } + + modifier tokenExists(address _token) { + require(tokens[_token].token != address(0)); + _; + } + + modifier tokenDoesNotExist(address _token) { + require(tokens[_token].token == address(0)); + _; + } + + modifier nameDoesNotExist(string _name) { + require(tokenByName[_name] == address(0)); + _; + } + + modifier symbolDoesNotExist(string _symbol) { + require(tokenBySymbol[_symbol] == address(0)); + _; + } + + modifier addressNotNull(address _address) { + require(_address != address(0)); + _; + } + + + /// @dev Allows owner to add a new token to the registry. + /// @param _token Address of new token. + /// @param _name Name of new token. + /// @param _symbol Symbol for new token. + /// @param _decimals Number of decimals, divisibility of new token. + /// @param _ipfsHash IPFS hash of token icon. + /// @param _swarmHash Swarm hash of token icon. + function addToken( + address _token, + string _name, + string _symbol, + uint8 _decimals, + bytes _ipfsHash, + bytes _swarmHash) + public + onlyOwner + tokenDoesNotExist(_token) + addressNotNull(_token) + symbolDoesNotExist(_symbol) + nameDoesNotExist(_name) + { + tokens[_token] = TokenMetadata({ + token: _token, + name: _name, + symbol: _symbol, + decimals: _decimals, + ipfsHash: _ipfsHash, + swarmHash: _swarmHash + }); + tokenAddresses.push(_token); + tokenBySymbol[_symbol] = _token; + tokenByName[_name] = _token; + LogAddToken( + _token, + _name, + _symbol, + _decimals, + _ipfsHash, + _swarmHash + ); + } + + /// @dev Allows owner to remove an existing token from the registry. + /// @param _token Address of existing token. + function removeToken(address _token, uint _index) + public + onlyOwner + tokenExists(_token) + { + require(tokenAddresses[_index] == _token); + + tokenAddresses[_index] = tokenAddresses[tokenAddresses.length - 1]; + tokenAddresses.length -= 1; + + TokenMetadata storage token = tokens[_token]; + LogRemoveToken( + token.token, + token.name, + token.symbol, + token.decimals, + token.ipfsHash, + token.swarmHash + ); + delete tokenBySymbol[token.symbol]; + delete tokenByName[token.name]; + delete tokens[_token]; + } + + /// @dev Allows owner to modify an existing token's name. + /// @param _token Address of existing token. + /// @param _name New name. + function setTokenName(address _token, string _name) + public + onlyOwner + tokenExists(_token) + nameDoesNotExist(_name) + { + TokenMetadata storage token = tokens[_token]; + LogTokenNameChange(_token, token.name, _name); + delete tokenByName[token.name]; + tokenByName[_name] = _token; + token.name = _name; + } + + /// @dev Allows owner to modify an existing token's symbol. + /// @param _token Address of existing token. + /// @param _symbol New symbol. + function setTokenSymbol(address _token, string _symbol) + public + onlyOwner + tokenExists(_token) + symbolDoesNotExist(_symbol) + { + TokenMetadata storage token = tokens[_token]; + LogTokenSymbolChange(_token, token.symbol, _symbol); + delete tokenBySymbol[token.symbol]; + tokenBySymbol[_symbol] = _token; + token.symbol = _symbol; + } + + /// @dev Allows owner to modify an existing token's IPFS hash. + /// @param _token Address of existing token. + /// @param _ipfsHash New IPFS hash. + function setTokenIpfsHash(address _token, bytes _ipfsHash) + public + onlyOwner + tokenExists(_token) + { + TokenMetadata storage token = tokens[_token]; + LogTokenIpfsHashChange(_token, token.ipfsHash, _ipfsHash); + token.ipfsHash = _ipfsHash; + } + + /// @dev Allows owner to modify an existing token's Swarm hash. + /// @param _token Address of existing token. + /// @param _swarmHash New Swarm hash. + function setTokenSwarmHash(address _token, bytes _swarmHash) + public + onlyOwner + tokenExists(_token) + { + TokenMetadata storage token = tokens[_token]; + LogTokenSwarmHashChange(_token, token.swarmHash, _swarmHash); + token.swarmHash = _swarmHash; + } + + /* + * Web3 call functions + */ + + /// @dev Provides a registered token's address when given the token symbol. + /// @param _symbol Symbol of registered token. + /// @return Token's address. + function getTokenAddressBySymbol(string _symbol) constant returns (address) { + return tokenBySymbol[_symbol]; + } + + /// @dev Provides a registered token's address when given the token name. + /// @param _name Name of registered token. + /// @return Token's address. + function getTokenAddressByName(string _name) constant returns (address) { + return tokenByName[_name]; + } + + /// @dev Provides a registered token's metadata, looked up by address. + /// @param _token Address of registered token. + /// @return Token metadata. + function getTokenMetaData(address _token) + public + constant + returns ( + address, //tokenAddress + string, //name + string, //symbol + uint8, //decimals + bytes, //ipfsHash + bytes //swarmHash + ) + { + TokenMetadata memory token = tokens[_token]; + return ( + token.token, + token.name, + token.symbol, + token.decimals, + token.ipfsHash, + token.swarmHash + ); + } + + /// @dev Provides a registered token's metadata, looked up by name. + /// @param _name Name of registered token. + /// @return Token metadata. + function getTokenByName(string _name) + public + constant + returns ( + address, //tokenAddress + string, //name + string, //symbol + uint8, //decimals + bytes, //ipfsHash + bytes //swarmHash + ) + { + address _token = tokenByName[_name]; + return getTokenMetaData(_token); + } + + /// @dev Provides a registered token's metadata, looked up by symbol. + /// @param _symbol Symbol of registered token. + /// @return Token metadata. + function getTokenBySymbol(string _symbol) + public + constant + returns ( + address, //tokenAddress + string, //name + string, //symbol + uint8, //decimals + bytes, //ipfsHash + bytes //swarmHash + ) + { + address _token = tokenBySymbol[_symbol]; + return getTokenMetaData(_token); + } + + /// @dev Returns an array containing all token addresses. + /// @return Array of token addresses. + function getTokenAddresses() + public + constant + returns (address[]) + { + return tokenAddresses; + } +} diff --git a/packages/contracts/src/contracts/current/protocol/TokenTransferProxy/TokenTransferProxy.sol b/packages/contracts/src/contracts/current/protocol/TokenTransferProxy/TokenTransferProxy.sol new file mode 100644 index 000000000..1ce949fa6 --- /dev/null +++ b/packages/contracts/src/contracts/current/protocol/TokenTransferProxy/TokenTransferProxy.sol @@ -0,0 +1,115 @@ +/* + + Copyright 2017 ZeroEx Intl. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +pragma solidity ^0.4.11; + +import { Token_v1 as Token } from "../../../previous/Token/Token_v1.sol"; +import { Ownable_v1 as Ownable } from "../../../previous/Ownable/Ownable_v1.sol"; + +/// @title TokenTransferProxy - Transfers tokens on behalf of contracts that have been approved via decentralized governance. +/// @author Amir Bandeali - , Will Warren - +contract TokenTransferProxy is Ownable { + + /// @dev Only authorized addresses can invoke functions with this modifier. + modifier onlyAuthorized { + require(authorized[msg.sender]); + _; + } + + modifier targetAuthorized(address target) { + require(authorized[target]); + _; + } + + modifier targetNotAuthorized(address target) { + require(!authorized[target]); + _; + } + + mapping (address => bool) public authorized; + address[] public authorities; + + event LogAuthorizedAddressAdded(address indexed target, address indexed caller); + event LogAuthorizedAddressRemoved(address indexed target, address indexed caller); + + /* + * Public functions + */ + + /// @dev Authorizes an address. + /// @param target Address to authorize. + function addAuthorizedAddress(address target) + public + onlyOwner + targetNotAuthorized(target) + { + authorized[target] = true; + authorities.push(target); + LogAuthorizedAddressAdded(target, msg.sender); + } + + /// @dev Removes authorizion of an address. + /// @param target Address to remove authorization from. + function removeAuthorizedAddress(address target) + public + onlyOwner + targetAuthorized(target) + { + delete authorized[target]; + for (uint i = 0; i < authorities.length; i++) { + if (authorities[i] == target) { + authorities[i] = authorities[authorities.length - 1]; + authorities.length -= 1; + break; + } + } + LogAuthorizedAddressRemoved(target, msg.sender); + } + + /// @dev Calls into ERC20 Token contract, invoking transferFrom. + /// @param token Address of token to transfer. + /// @param from Address to transfer token from. + /// @param to Address to transfer token to. + /// @param value Amount of token to transfer. + /// @return Success of transfer. + function transferFrom( + address token, + address from, + address to, + uint value) + public + onlyAuthorized + returns (bool) + { + return Token(token).transferFrom(from, to, value); + } + + /* + * Public constant functions + */ + + /// @dev Gets all authorized addresses. + /// @return Array of authorized addresses. + function getAuthorizedAddresses() + public + constant + returns (address[]) + { + return authorities; + } +} diff --git a/packages/contracts/src/contracts/current/test/DummyToken/DummyToken.sol b/packages/contracts/src/contracts/current/test/DummyToken/DummyToken.sol new file mode 100644 index 000000000..ab04f4d16 --- /dev/null +++ b/packages/contracts/src/contracts/current/test/DummyToken/DummyToken.sol @@ -0,0 +1,37 @@ +pragma solidity ^0.4.18; + +import { Mintable } from "../Mintable/Mintable.sol"; +import { Ownable } from "../../utils/Ownable/Ownable.sol"; + +contract DummyToken is Mintable, Ownable { + string public name; + string public symbol; + uint public decimals; + + function DummyToken( + string _name, + string _symbol, + uint _decimals, + uint _totalSupply) + public + { + name = _name; + symbol = _symbol; + decimals = _decimals; + totalSupply = _totalSupply; + balances[msg.sender] = _totalSupply; + } + + function setBalance(address _target, uint _value) + public + onlyOwner + { + uint currBalance = balanceOf(_target); + if (_value < currBalance) { + totalSupply = safeSub(totalSupply, safeSub(currBalance, _value)); + } else { + totalSupply = safeAdd(totalSupply, safeSub(_value, currBalance)); + } + balances[_target] = _value; + } +} diff --git a/packages/contracts/src/contracts/current/test/MaliciousToken/MaliciousToken.sol b/packages/contracts/src/contracts/current/test/MaliciousToken/MaliciousToken.sol new file mode 100644 index 000000000..9e502616c --- /dev/null +++ b/packages/contracts/src/contracts/current/test/MaliciousToken/MaliciousToken.sol @@ -0,0 +1,31 @@ +pragma solidity ^0.4.18; + +import { ERC20Token } from "../../tokens/ERC20Token/ERC20Token.sol"; + +contract MaliciousToken is ERC20Token { + uint8 stateToUpdate = 1; // Not null so that change only requires 5000 gas + + function updateState() + internal + { + stateToUpdate++; + } + + function balanceOf(address _owner) + public + constant + returns (uint) + { + updateState(); + return balances[_owner]; + } + + function allowance(address _owner, address _spender) + public + constant + returns (uint) + { + updateState(); + return allowed[_owner][_spender]; + } +} diff --git a/packages/contracts/src/contracts/current/test/Mintable/Mintable.sol b/packages/contracts/src/contracts/current/test/Mintable/Mintable.sol new file mode 100644 index 000000000..cf7ee35a5 --- /dev/null +++ b/packages/contracts/src/contracts/current/test/Mintable/Mintable.sol @@ -0,0 +1,18 @@ +pragma solidity ^0.4.18; + +import { UnlimitedAllowanceToken } from "../../tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol"; +import { SafeMath } from "../../utils/SafeMath/SafeMath.sol"; + +/* + * Mintable + * Base contract that creates a mintable UnlimitedAllowanceToken + */ +contract Mintable is UnlimitedAllowanceToken, SafeMath { + function mint(uint _value) + public + { + require(_value <= 100000000000000000000); + balances[msg.sender] = safeAdd(_value, balances[msg.sender]); + totalSupply = safeAdd(totalSupply, _value); + } +} diff --git a/packages/contracts/src/contracts/current/tokens/ERC20Token/ERC20Token.sol b/packages/contracts/src/contracts/current/tokens/ERC20Token/ERC20Token.sol new file mode 100644 index 000000000..0e5b87aa4 --- /dev/null +++ b/packages/contracts/src/contracts/current/tokens/ERC20Token/ERC20Token.sol @@ -0,0 +1,58 @@ +pragma solidity ^0.4.18; + +import { Token } from "../Token/Token.sol"; + +contract ERC20Token is Token { + + function transfer(address _to, uint _value) + public + returns (bool) + { + require(balances[msg.sender] >= _value && balances[_to] + _value >= balances[_to]); + balances[msg.sender] -= _value; + balances[_to] += _value; + Transfer(msg.sender, _to, _value); + return true; + } + + function transferFrom(address _from, address _to, uint _value) + public + returns (bool) + { + require(balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value >= balances[_to]); + balances[_to] += _value; + balances[_from] -= _value; + allowed[_from][msg.sender] -= _value; + Transfer(_from, _to, _value); + return true; + } + + function approve(address _spender, uint _value) + public + returns (bool) + { + allowed[msg.sender][_spender] = _value; + Approval(msg.sender, _spender, _value); + return true; + } + + function balanceOf(address _owner) + public + view + returns (uint) + { + return balances[_owner]; + } + + function allowance(address _owner, address _spender) + public + view + returns (uint) + { + return allowed[_owner][_spender]; + } + + mapping (address => uint) balances; + mapping (address => mapping (address => uint)) allowed; + uint public totalSupply; +} diff --git a/packages/contracts/src/contracts/current/tokens/Token/Token.sol b/packages/contracts/src/contracts/current/tokens/Token/Token.sol new file mode 100644 index 000000000..bf4e71dcd --- /dev/null +++ b/packages/contracts/src/contracts/current/tokens/Token/Token.sol @@ -0,0 +1,35 @@ +pragma solidity ^0.4.18; + +contract Token { + + /// @notice send `_value` token to `_to` from `msg.sender` + /// @param _to The address of the recipient + /// @param _value The amount of token to be transferred + /// @return Whether the transfer was successful or not + function transfer(address _to, uint _value) public returns (bool) {} + + /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` + /// @param _from The address of the sender + /// @param _to The address of the recipient + /// @param _value The amount of token to be transferred + /// @return Whether the transfer was successful or not + function transferFrom(address _from, address _to, uint _value) public returns (bool) {} + + /// @notice `msg.sender` approves `_addr` to spend `_value` tokens + /// @param _spender The address of the account able to transfer the tokens + /// @param _value The amount of wei to be approved for transfer + /// @return Whether the approval was successful or not + function approve(address _spender, uint _value) public returns (bool) {} + + /// @param _owner The address from which the balance will be retrieved + /// @return The balance + function balanceOf(address _owner) public view returns (uint) {} + + /// @param _owner The address of the account owning tokens + /// @param _spender The address of the account able to transfer the tokens + /// @return Amount of remaining tokens allowed to spent + function allowance(address _owner, address _spender) public view returns (uint) {} + + event Transfer(address indexed _from, address indexed _to, uint _value); + event Approval(address indexed _owner, address indexed _spender, uint _value); +} diff --git a/packages/contracts/src/contracts/current/tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol b/packages/contracts/src/contracts/current/tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol new file mode 100644 index 000000000..699f535d2 --- /dev/null +++ b/packages/contracts/src/contracts/current/tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol @@ -0,0 +1,46 @@ +/* + + Copyright 2017 ZeroEx Intl. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +pragma solidity ^0.4.18; + +import { ERC20Token } from "../ERC20Token/ERC20Token.sol"; + +contract UnlimitedAllowanceToken is ERC20Token { + + uint constant MAX_UINT = 2**256 - 1; + + /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance. See https://github.com/ethereum/EIPs/issues/717 + /// @param _from Address to transfer from. + /// @param _to Address to transfer to. + /// @param _value Amount to transfer. + /// @return Success of transfer. + function transferFrom(address _from, address _to, uint _value) + public + returns (bool) + { + uint allowance = allowed[_from][msg.sender]; + require(balances[_from] >= _value && allowance >= _value && balances[_to] + _value >= balances[_to]); + balances[_to] += _value; + balances[_from] -= _value; + if (allowance < MAX_UINT) { + allowed[_from][msg.sender] -= _value; + } + Transfer(_from, _to, _value); + return true; + } +} diff --git a/packages/contracts/src/contracts/current/tokens/WETH9/WETH9.sol b/packages/contracts/src/contracts/current/tokens/WETH9/WETH9.sol new file mode 100644 index 000000000..733ca414b --- /dev/null +++ b/packages/contracts/src/contracts/current/tokens/WETH9/WETH9.sol @@ -0,0 +1,756 @@ +// Copyright (C) 2015, 2016, 2017 Dapphub + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +pragma solidity ^0.4.18; + +contract WETH9 { + string public name = "Wrapped Ether"; + string public symbol = "WETH"; + uint8 public decimals = 18; + + event Approval(address indexed src, address indexed guy, uint wad); + event Transfer(address indexed src, address indexed dst, uint wad); + event Deposit(address indexed dst, uint wad); + event Withdrawal(address indexed src, uint wad); + + mapping (address => uint) public balanceOf; + mapping (address => mapping (address => uint)) public allowance; + + function() public payable { + deposit(); + } + function deposit() public payable { + balanceOf[msg.sender] += msg.value; + Deposit(msg.sender, msg.value); + } + function withdraw(uint wad) public { + require(balanceOf[msg.sender] >= wad); + balanceOf[msg.sender] -= wad; + msg.sender.transfer(wad); + Withdrawal(msg.sender, wad); + } + + function totalSupply() public view returns (uint) { + return this.balance; + } + + function approve(address guy, uint wad) public returns (bool) { + allowance[msg.sender][guy] = wad; + Approval(msg.sender, guy, wad); + return true; + } + + function transfer(address dst, uint wad) public returns (bool) { + return transferFrom(msg.sender, dst, wad); + } + + function transferFrom(address src, address dst, uint wad) + public + returns (bool) + { + require(balanceOf[src] >= wad); + + if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) { + require(allowance[src][msg.sender] >= wad); + allowance[src][msg.sender] -= wad; + } + + balanceOf[src] -= wad; + balanceOf[dst] += wad; + + Transfer(src, dst, wad); + + return true; + } +} + + +/* + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + +*/ diff --git a/packages/contracts/src/contracts/current/tokens/ZRXToken/ZRXToken.sol b/packages/contracts/src/contracts/current/tokens/ZRXToken/ZRXToken.sol new file mode 100644 index 000000000..7f5e1f849 --- /dev/null +++ b/packages/contracts/src/contracts/current/tokens/ZRXToken/ZRXToken.sol @@ -0,0 +1,33 @@ +/* + + Copyright 2017 ZeroEx Intl. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +pragma solidity ^0.4.11; + +import { UnlimitedAllowanceToken_v1 as UnlimitedAllowanceToken } from "../../../previous/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol"; + +contract ZRXToken is UnlimitedAllowanceToken { + + uint8 constant public decimals = 18; + uint public totalSupply = 10**27; // 1 billion tokens, 18 decimal places + string constant public name = "0x Protocol Token"; + string constant public symbol = "ZRX"; + + function ZRXToken() { + balances[msg.sender] = totalSupply; + } +} diff --git a/packages/contracts/src/contracts/current/utils/Ownable/Ownable.sol b/packages/contracts/src/contracts/current/utils/Ownable/Ownable.sol new file mode 100644 index 000000000..9b3d6b9cf --- /dev/null +++ b/packages/contracts/src/contracts/current/utils/Ownable/Ownable.sol @@ -0,0 +1,32 @@ +pragma solidity ^0.4.18; + +/* + * Ownable + * + * Base contract with an owner. + * Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner. + */ + +contract Ownable { + address public owner; + + function Ownable() + public + { + owner = msg.sender; + } + + modifier onlyOwner() { + require(msg.sender == owner); + _; + } + + function transferOwnership(address newOwner) + public + onlyOwner + { + if (newOwner != address(0)) { + owner = newOwner; + } + } +} diff --git a/packages/contracts/src/contracts/current/utils/SafeMath/SafeMath.sol b/packages/contracts/src/contracts/current/utils/SafeMath/SafeMath.sol new file mode 100644 index 000000000..955a9e379 --- /dev/null +++ b/packages/contracts/src/contracts/current/utils/SafeMath/SafeMath.sol @@ -0,0 +1,73 @@ +pragma solidity ^0.4.18; + +contract SafeMath { + function safeMul(uint a, uint b) + internal + pure + returns (uint256) + { + uint c = a * b; + assert(a == 0 || c / a == b); + return c; + } + + function safeDiv(uint a, uint b) + internal + pure + returns (uint256) + { + uint c = a / b; + return c; + } + + function safeSub(uint a, uint b) + internal + pure + returns (uint256) + { + assert(b <= a); + return a - b; + } + + function safeAdd(uint a, uint b) + internal + pure + returns (uint256) + { + uint c = a + b; + assert(c >= a); + return c; + } + + function max64(uint64 a, uint64 b) + internal + pure + returns (uint256) + { + return a >= b ? a : b; + } + + function min64(uint64 a, uint64 b) + internal + pure + returns (uint256) + { + return a < b ? a : b; + } + + function max256(uint256 a, uint256 b) + internal + pure + returns (uint256) + { + return a >= b ? a : b; + } + + function min256(uint256 a, uint256 b) + internal + pure + returns (uint256) + { + return a < b ? a : b; + } +} diff --git a/packages/contracts/src/contracts/previous/ERC20Token/ERC20Token_v1.sol b/packages/contracts/src/contracts/previous/ERC20Token/ERC20Token_v1.sol new file mode 100644 index 000000000..e05ee2d5e --- /dev/null +++ b/packages/contracts/src/contracts/previous/ERC20Token/ERC20Token_v1.sol @@ -0,0 +1,44 @@ +pragma solidity ^0.4.11; + +import { Token_v1 as Token } from "../Token/Token_v1.sol"; + +contract ERC20Token_v1 is Token { + + function transfer(address _to, uint _value) returns (bool) { + //Default assumes totalSupply can't be over max (2^256 - 1). + if (balances[msg.sender] >= _value && balances[_to] + _value >= balances[_to]) { + balances[msg.sender] -= _value; + balances[_to] += _value; + Transfer(msg.sender, _to, _value); + return true; + } else { return false; } + } + + function transferFrom(address _from, address _to, uint _value) returns (bool) { + if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value >= balances[_to]) { + balances[_to] += _value; + balances[_from] -= _value; + allowed[_from][msg.sender] -= _value; + Transfer(_from, _to, _value); + return true; + } else { return false; } + } + + function balanceOf(address _owner) constant returns (uint) { + return balances[_owner]; + } + + function approve(address _spender, uint _value) returns (bool) { + allowed[msg.sender][_spender] = _value; + Approval(msg.sender, _spender, _value); + return true; + } + + function allowance(address _owner, address _spender) constant returns (uint) { + return allowed[_owner][_spender]; + } + + mapping (address => uint) balances; + mapping (address => mapping (address => uint)) allowed; + uint public totalSupply; +} diff --git a/packages/contracts/src/contracts/previous/Ownable/Ownable_v1.sol b/packages/contracts/src/contracts/previous/Ownable/Ownable_v1.sol new file mode 100644 index 000000000..c87438fa4 --- /dev/null +++ b/packages/contracts/src/contracts/previous/Ownable/Ownable_v1.sol @@ -0,0 +1,27 @@ +pragma solidity ^0.4.11; + +/* + * Ownable + * + * Base contract with an owner. + * Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner. + */ + +contract Ownable_v1 { + address public owner; + + function Ownable_v1() { + owner = msg.sender; + } + + modifier onlyOwner() { + require(msg.sender == owner); + _; + } + + function transferOwnership(address newOwner) onlyOwner { + if (newOwner != address(0)) { + owner = newOwner; + } + } +} diff --git a/packages/contracts/src/contracts/previous/SafeMath/SafeMath_v1.sol b/packages/contracts/src/contracts/previous/SafeMath/SafeMath_v1.sol new file mode 100644 index 000000000..341d611ec --- /dev/null +++ b/packages/contracts/src/contracts/previous/SafeMath/SafeMath_v1.sol @@ -0,0 +1,73 @@ +pragma solidity ^0.4.11; + +contract SafeMath_v1 { + function safeMul(uint a, uint b) + internal + constant + returns (uint256) + { + uint c = a * b; + assert(a == 0 || c / a == b); + return c; + } + + function safeDiv(uint a, uint b) + internal + constant + returns (uint256) + { + uint c = a / b; + return c; + } + + function safeSub(uint a, uint b) + internal + constant + returns (uint256) + { + assert(b <= a); + return a - b; + } + + function safeAdd(uint a, uint b) + internal + constant + returns (uint256) + { + uint c = a + b; + assert(c >= a); + return c; + } + + function max64(uint64 a, uint64 b) + internal + constant + returns (uint64) + { + return a >= b ? a : b; + } + + function min64(uint64 a, uint64 b) + internal + constant + returns (uint64) + { + return a < b ? a : b; + } + + function max256(uint256 a, uint256 b) + internal + constant + returns (uint256) + { + return a >= b ? a : b; + } + + function min256(uint256 a, uint256 b) + internal + constant + returns (uint256) + { + return a < b ? a : b; + } +} diff --git a/packages/contracts/src/contracts/previous/Token/Token_v1.sol b/packages/contracts/src/contracts/previous/Token/Token_v1.sol new file mode 100644 index 000000000..de619fb7e --- /dev/null +++ b/packages/contracts/src/contracts/previous/Token/Token_v1.sol @@ -0,0 +1,39 @@ +pragma solidity ^0.4.11; + +contract Token_v1 { + + /// @return total amount of tokens + function totalSupply() constant returns (uint supply) {} + + /// @param _owner The address from which the balance will be retrieved + /// @return The balance + function balanceOf(address _owner) constant returns (uint balance) {} + + /// @notice send `_value` token to `_to` from `msg.sender` + /// @param _to The address of the recipient + /// @param _value The amount of token to be transferred + /// @return Whether the transfer was successful or not + function transfer(address _to, uint _value) returns (bool success) {} + + /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` + /// @param _from The address of the sender + /// @param _to The address of the recipient + /// @param _value The amount of token to be transferred + /// @return Whether the transfer was successful or not + function transferFrom(address _from, address _to, uint _value) returns (bool success) {} + + /// @notice `msg.sender` approves `_addr` to spend `_value` tokens + /// @param _spender The address of the account able to transfer the tokens + /// @param _value The amount of wei to be approved for transfer + /// @return Whether the approval was successful or not + function approve(address _spender, uint _value) returns (bool success) {} + + /// @param _owner The address of the account owning tokens + /// @param _spender The address of the account able to transfer the tokens + /// @return Amount of remaining tokens allowed to spent + function allowance(address _owner, address _spender) constant returns (uint remaining) {} + + event Transfer(address indexed _from, address indexed _to, uint _value); + event Approval(address indexed _owner, address indexed _spender, uint _value); +} + diff --git a/packages/contracts/src/contracts/previous/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol b/packages/contracts/src/contracts/previous/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol new file mode 100644 index 000000000..6376f3f2c --- /dev/null +++ b/packages/contracts/src/contracts/previous/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol @@ -0,0 +1,52 @@ +/* + + Copyright 2017 ZeroEx Intl. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +pragma solidity ^0.4.11; + +import { ERC20Token_v1 as ERC20Token } from "../ERC20Token/ERC20Token_v1.sol"; + +contract UnlimitedAllowanceToken_v1 is ERC20Token { + + uint constant MAX_UINT = 2**256 - 1; + + /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance. + /// @param _from Address to transfer from. + /// @param _to Address to transfer to. + /// @param _value Amount to transfer. + /// @return Success of transfer. + function transferFrom(address _from, address _to, uint _value) + public + returns (bool) + { + uint allowance = allowed[_from][msg.sender]; + if (balances[_from] >= _value + && allowance >= _value + && balances[_to] + _value >= balances[_to] + ) { + balances[_to] += _value; + balances[_from] -= _value; + if (allowance < MAX_UINT) { + allowed[_from][msg.sender] -= _value; + } + Transfer(_from, _to, _value); + return true; + } else { + return false; + } + } +} diff --git a/packages/contracts/src/current/multisig/MultiSigWallet/MultiSigWallet.sol b/packages/contracts/src/current/multisig/MultiSigWallet/MultiSigWallet.sol deleted file mode 100644 index 997bb86c0..000000000 --- a/packages/contracts/src/current/multisig/MultiSigWallet/MultiSigWallet.sol +++ /dev/null @@ -1,366 +0,0 @@ -pragma solidity ^0.4.10; - -/// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. -/// @author Stefan George - -contract MultiSigWallet { - - uint constant public MAX_OWNER_COUNT = 50; - - event Confirmation(address indexed sender, uint indexed transactionId); - event Revocation(address indexed sender, uint indexed transactionId); - event Submission(uint indexed transactionId); - event Execution(uint indexed transactionId); - event ExecutionFailure(uint indexed transactionId); - event Deposit(address indexed sender, uint value); - event OwnerAddition(address indexed owner); - event OwnerRemoval(address indexed owner); - event RequirementChange(uint required); - - mapping (uint => Transaction) public transactions; - mapping (uint => mapping (address => bool)) public confirmations; - mapping (address => bool) public isOwner; - address[] public owners; - uint public required; - uint public transactionCount; - - struct Transaction { - address destination; - uint value; - bytes data; - bool executed; - } - - modifier onlyWallet() { - if (msg.sender != address(this)) - throw; - _; - } - - modifier ownerDoesNotExist(address owner) { - if (isOwner[owner]) - throw; - _; - } - - modifier ownerExists(address owner) { - if (!isOwner[owner]) - throw; - _; - } - - modifier transactionExists(uint transactionId) { - if (transactions[transactionId].destination == 0) - throw; - _; - } - - modifier confirmed(uint transactionId, address owner) { - if (!confirmations[transactionId][owner]) - throw; - _; - } - - modifier notConfirmed(uint transactionId, address owner) { - if (confirmations[transactionId][owner]) - throw; - _; - } - - modifier notExecuted(uint transactionId) { - if (transactions[transactionId].executed) - throw; - _; - } - - modifier notNull(address _address) { - if (_address == 0) - throw; - _; - } - - modifier validRequirement(uint ownerCount, uint _required) { - if ( ownerCount > MAX_OWNER_COUNT - || _required > ownerCount - || _required == 0 - || ownerCount == 0) - throw; - _; - } - - /// @dev Fallback function allows to deposit ether. - function() - payable - { - if (msg.value > 0) - Deposit(msg.sender, msg.value); - } - - /* - * Public functions - */ - /// @dev Contract constructor sets initial owners and required number of confirmations. - /// @param _owners List of initial owners. - /// @param _required Number of required confirmations. - function MultiSigWallet(address[] _owners, uint _required) - public - validRequirement(_owners.length, _required) - { - for (uint i=0; i<_owners.length; i++) { - if (isOwner[_owners[i]] || _owners[i] == 0) - throw; - isOwner[_owners[i]] = true; - } - owners = _owners; - required = _required; - } - - /// @dev Allows to add a new owner. Transaction has to be sent by wallet. - /// @param owner Address of new owner. - function addOwner(address owner) - public - onlyWallet - ownerDoesNotExist(owner) - notNull(owner) - validRequirement(owners.length + 1, required) - { - isOwner[owner] = true; - owners.push(owner); - OwnerAddition(owner); - } - - /// @dev Allows to remove an owner. Transaction has to be sent by wallet. - /// @param owner Address of owner. - function removeOwner(address owner) - public - onlyWallet - ownerExists(owner) - { - isOwner[owner] = false; - for (uint i=0; i owners.length) - changeRequirement(owners.length); - OwnerRemoval(owner); - } - - /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet. - /// @param owner Address of owner to be replaced. - /// @param owner Address of new owner. - function replaceOwner(address owner, address newOwner) - public - onlyWallet - ownerExists(owner) - ownerDoesNotExist(newOwner) - { - for (uint i=0; i -contract MultiSigWalletWithTimeLock is MultiSigWallet { - - event ConfirmationTimeSet(uint indexed transactionId, uint confirmationTime); - event TimeLockChange(uint secondsTimeLocked); - - uint public secondsTimeLocked; - - mapping (uint => uint) public confirmationTimes; - - modifier notFullyConfirmed(uint transactionId) { - require(!isConfirmed(transactionId)); - _; - } - - modifier fullyConfirmed(uint transactionId) { - require(isConfirmed(transactionId)); - _; - } - - modifier pastTimeLock(uint transactionId) { - require(block.timestamp >= confirmationTimes[transactionId] + secondsTimeLocked); - _; - } - - /* - * Public functions - */ - - /// @dev Contract constructor sets initial owners, required number of confirmations, and time lock. - /// @param _owners List of initial owners. - /// @param _required Number of required confirmations. - /// @param _secondsTimeLocked Duration needed after a transaction is confirmed and before it becomes executable, in seconds. - function MultiSigWalletWithTimeLock(address[] _owners, uint _required, uint _secondsTimeLocked) - public - MultiSigWallet(_owners, _required) - { - secondsTimeLocked = _secondsTimeLocked; - } - - /// @dev Changes the duration of the time lock for transactions. - /// @param _secondsTimeLocked Duration needed after a transaction is confirmed and before it becomes executable, in seconds. - function changeTimeLock(uint _secondsTimeLocked) - public - onlyWallet - { - secondsTimeLocked = _secondsTimeLocked; - TimeLockChange(_secondsTimeLocked); - } - - /// @dev Allows an owner to confirm a transaction. - /// @param transactionId Transaction ID. - function confirmTransaction(uint transactionId) - public - ownerExists(msg.sender) - transactionExists(transactionId) - notConfirmed(transactionId, msg.sender) - notFullyConfirmed(transactionId) - { - confirmations[transactionId][msg.sender] = true; - Confirmation(msg.sender, transactionId); - if (isConfirmed(transactionId)) { - setConfirmationTime(transactionId, block.timestamp); - } - } - - /// @dev Allows an owner to revoke a confirmation for a transaction. - /// @param transactionId Transaction ID. - function revokeConfirmation(uint transactionId) - public - ownerExists(msg.sender) - confirmed(transactionId, msg.sender) - notExecuted(transactionId) - notFullyConfirmed(transactionId) - { - confirmations[transactionId][msg.sender] = false; - Revocation(msg.sender, transactionId); - } - - /// @dev Allows anyone to execute a confirmed transaction. - /// @param transactionId Transaction ID. - function executeTransaction(uint transactionId) - public - notExecuted(transactionId) - fullyConfirmed(transactionId) - pastTimeLock(transactionId) - { - Transaction storage tx = transactions[transactionId]; - tx.executed = true; - if (tx.destination.call.value(tx.value)(tx.data)) - Execution(transactionId); - else { - ExecutionFailure(transactionId); - tx.executed = false; - } - } - - /* - * Internal functions - */ - - /// @dev Sets the time of when a submission first passed. - function setConfirmationTime(uint transactionId, uint confirmationTime) - internal - { - confirmationTimes[transactionId] = confirmationTime; - ConfirmationTimeSet(transactionId, confirmationTime); - } -} diff --git a/packages/contracts/src/current/multisig/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol b/packages/contracts/src/current/multisig/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol deleted file mode 100644 index 3c6a3d2ef..000000000 --- a/packages/contracts/src/current/multisig/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol +++ /dev/null @@ -1,82 +0,0 @@ -/* - - Copyright 2017 ZeroEx Intl. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*/ - -pragma solidity ^0.4.10; - -import { MultiSigWalletWithTimeLock } from "../MultiSigWalletWithTimeLock/MultiSigWalletWithTimeLock.sol"; - -contract MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress is MultiSigWalletWithTimeLock { - - address public TOKEN_TRANSFER_PROXY_CONTRACT; - - modifier validRemoveAuthorizedAddressTx(uint transactionId) { - Transaction storage tx = transactions[transactionId]; - require(tx.destination == TOKEN_TRANSFER_PROXY_CONTRACT); - require(isFunctionRemoveAuthorizedAddress(tx.data)); - _; - } - - /// @dev Contract constructor sets initial owners, required number of confirmations, time lock, and tokenTransferProxy address. - /// @param _owners List of initial owners. - /// @param _required Number of required confirmations. - /// @param _secondsTimeLocked Duration needed after a transaction is confirmed and before it becomes executable, in seconds. - /// @param _tokenTransferProxy Address of TokenTransferProxy contract. - function MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress( - address[] _owners, - uint _required, - uint _secondsTimeLocked, - address _tokenTransferProxy) - public - MultiSigWalletWithTimeLock(_owners, _required, _secondsTimeLocked) - { - TOKEN_TRANSFER_PROXY_CONTRACT = _tokenTransferProxy; - } - - /// @dev Allows execution of removeAuthorizedAddress without time lock. - /// @param transactionId Transaction ID. - function executeRemoveAuthorizedAddress(uint transactionId) - public - notExecuted(transactionId) - fullyConfirmed(transactionId) - validRemoveAuthorizedAddressTx(transactionId) - { - Transaction storage tx = transactions[transactionId]; - tx.executed = true; - if (tx.destination.call.value(tx.value)(tx.data)) - Execution(transactionId); - else { - ExecutionFailure(transactionId); - tx.executed = false; - } - } - - /// @dev Compares first 4 bytes of byte array to removeAuthorizedAddress function signature. - /// @param data Transaction data. - /// @return Successful if data is a call to removeAuthorizedAddress. - function isFunctionRemoveAuthorizedAddress(bytes data) - public - constant - returns (bool) - { - bytes4 removeAuthorizedAddressSignature = bytes4(sha3("removeAuthorizedAddress(address)")); - for (uint i = 0; i < 4; i++) { - require(data[i] == removeAuthorizedAddressSignature[i]); - } - return true; - } -} diff --git a/packages/contracts/src/current/protocol/Exchange/Exchange.sol b/packages/contracts/src/current/protocol/Exchange/Exchange.sol deleted file mode 100644 index 8dacf797c..000000000 --- a/packages/contracts/src/current/protocol/Exchange/Exchange.sol +++ /dev/null @@ -1,602 +0,0 @@ -/* - - Copyright 2017 ZeroEx Intl. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*/ - -pragma solidity ^0.4.14; - -import { TokenTransferProxy } from "../TokenTransferProxy/TokenTransferProxy.sol"; -import { Token_v1 as Token } from "../../../previous/Token/Token_v1.sol"; -import { SafeMath_v1 as SafeMath } from "../../../previous/SafeMath/SafeMath_v1.sol"; - -/// @title Exchange - Facilitates exchange of ERC20 tokens. -/// @author Amir Bandeali - , Will Warren - -contract Exchange is SafeMath { - - // Error Codes - enum Errors { - ORDER_EXPIRED, // Order has already expired - ORDER_FULLY_FILLED_OR_CANCELLED, // Order has already been fully filled or cancelled - ROUNDING_ERROR_TOO_LARGE, // Rounding error too large - INSUFFICIENT_BALANCE_OR_ALLOWANCE // Insufficient balance or allowance for token transfer - } - - string constant public VERSION = "1.0.0"; - uint16 constant public EXTERNAL_QUERY_GAS_LIMIT = 4999; // Changes to state require at least 5000 gas - - address public ZRX_TOKEN_CONTRACT; - address public TOKEN_TRANSFER_PROXY_CONTRACT; - - // Mappings of orderHash => amounts of takerTokenAmount filled or cancelled. - mapping (bytes32 => uint) public filled; - mapping (bytes32 => uint) public cancelled; - - event LogFill( - address indexed maker, - address taker, - address indexed feeRecipient, - address makerToken, - address takerToken, - uint filledMakerTokenAmount, - uint filledTakerTokenAmount, - uint paidMakerFee, - uint paidTakerFee, - bytes32 indexed tokens, // keccak256(makerToken, takerToken), allows subscribing to a token pair - bytes32 orderHash - ); - - event LogCancel( - address indexed maker, - address indexed feeRecipient, - address makerToken, - address takerToken, - uint cancelledMakerTokenAmount, - uint cancelledTakerTokenAmount, - bytes32 indexed tokens, - bytes32 orderHash - ); - - event LogError(uint8 indexed errorId, bytes32 indexed orderHash); - - struct Order { - address maker; - address taker; - address makerToken; - address takerToken; - address feeRecipient; - uint makerTokenAmount; - uint takerTokenAmount; - uint makerFee; - uint takerFee; - uint expirationTimestampInSec; - bytes32 orderHash; - } - - function Exchange(address _zrxToken, address _tokenTransferProxy) { - ZRX_TOKEN_CONTRACT = _zrxToken; - TOKEN_TRANSFER_PROXY_CONTRACT = _tokenTransferProxy; - } - - /* - * Core exchange functions - */ - - /// @dev Fills the input order. - /// @param orderAddresses Array of order's maker, taker, makerToken, takerToken, and feeRecipient. - /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, and salt. - /// @param fillTakerTokenAmount Desired amount of takerToken to fill. - /// @param shouldThrowOnInsufficientBalanceOrAllowance Test if transfer will fail before attempting. - /// @param v ECDSA signature parameter v. - /// @param r ECDSA signature parameters r. - /// @param s ECDSA signature parameters s. - /// @return Total amount of takerToken filled in trade. - function fillOrder( - address[5] orderAddresses, - uint[6] orderValues, - uint fillTakerTokenAmount, - bool shouldThrowOnInsufficientBalanceOrAllowance, - uint8 v, - bytes32 r, - bytes32 s) - public - returns (uint filledTakerTokenAmount) - { - Order memory order = Order({ - maker: orderAddresses[0], - taker: orderAddresses[1], - makerToken: orderAddresses[2], - takerToken: orderAddresses[3], - feeRecipient: orderAddresses[4], - makerTokenAmount: orderValues[0], - takerTokenAmount: orderValues[1], - makerFee: orderValues[2], - takerFee: orderValues[3], - expirationTimestampInSec: orderValues[4], - orderHash: getOrderHash(orderAddresses, orderValues) - }); - - require(order.taker == address(0) || order.taker == msg.sender); - require(order.makerTokenAmount > 0 && order.takerTokenAmount > 0 && fillTakerTokenAmount > 0); - require(isValidSignature( - order.maker, - order.orderHash, - v, - r, - s - )); - - if (block.timestamp >= order.expirationTimestampInSec) { - LogError(uint8(Errors.ORDER_EXPIRED), order.orderHash); - return 0; - } - - uint remainingTakerTokenAmount = safeSub(order.takerTokenAmount, getUnavailableTakerTokenAmount(order.orderHash)); - filledTakerTokenAmount = min256(fillTakerTokenAmount, remainingTakerTokenAmount); - if (filledTakerTokenAmount == 0) { - LogError(uint8(Errors.ORDER_FULLY_FILLED_OR_CANCELLED), order.orderHash); - return 0; - } - - if (isRoundingError(filledTakerTokenAmount, order.takerTokenAmount, order.makerTokenAmount)) { - LogError(uint8(Errors.ROUNDING_ERROR_TOO_LARGE), order.orderHash); - return 0; - } - - if (!shouldThrowOnInsufficientBalanceOrAllowance && !isTransferable(order, filledTakerTokenAmount)) { - LogError(uint8(Errors.INSUFFICIENT_BALANCE_OR_ALLOWANCE), order.orderHash); - return 0; - } - - uint filledMakerTokenAmount = getPartialAmount(filledTakerTokenAmount, order.takerTokenAmount, order.makerTokenAmount); - uint paidMakerFee; - uint paidTakerFee; - filled[order.orderHash] = safeAdd(filled[order.orderHash], filledTakerTokenAmount); - require(transferViaTokenTransferProxy( - order.makerToken, - order.maker, - msg.sender, - filledMakerTokenAmount - )); - require(transferViaTokenTransferProxy( - order.takerToken, - msg.sender, - order.maker, - filledTakerTokenAmount - )); - if (order.feeRecipient != address(0)) { - if (order.makerFee > 0) { - paidMakerFee = getPartialAmount(filledTakerTokenAmount, order.takerTokenAmount, order.makerFee); - require(transferViaTokenTransferProxy( - ZRX_TOKEN_CONTRACT, - order.maker, - order.feeRecipient, - paidMakerFee - )); - } - if (order.takerFee > 0) { - paidTakerFee = getPartialAmount(filledTakerTokenAmount, order.takerTokenAmount, order.takerFee); - require(transferViaTokenTransferProxy( - ZRX_TOKEN_CONTRACT, - msg.sender, - order.feeRecipient, - paidTakerFee - )); - } - } - - LogFill( - order.maker, - msg.sender, - order.feeRecipient, - order.makerToken, - order.takerToken, - filledMakerTokenAmount, - filledTakerTokenAmount, - paidMakerFee, - paidTakerFee, - keccak256(order.makerToken, order.takerToken), - order.orderHash - ); - return filledTakerTokenAmount; - } - - /// @dev Cancels the input order. - /// @param orderAddresses Array of order's maker, taker, makerToken, takerToken, and feeRecipient. - /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, and salt. - /// @param cancelTakerTokenAmount Desired amount of takerToken to cancel in order. - /// @return Amount of takerToken cancelled. - function cancelOrder( - address[5] orderAddresses, - uint[6] orderValues, - uint cancelTakerTokenAmount) - public - returns (uint) - { - Order memory order = Order({ - maker: orderAddresses[0], - taker: orderAddresses[1], - makerToken: orderAddresses[2], - takerToken: orderAddresses[3], - feeRecipient: orderAddresses[4], - makerTokenAmount: orderValues[0], - takerTokenAmount: orderValues[1], - makerFee: orderValues[2], - takerFee: orderValues[3], - expirationTimestampInSec: orderValues[4], - orderHash: getOrderHash(orderAddresses, orderValues) - }); - - require(order.maker == msg.sender); - require(order.makerTokenAmount > 0 && order.takerTokenAmount > 0 && cancelTakerTokenAmount > 0); - - if (block.timestamp >= order.expirationTimestampInSec) { - LogError(uint8(Errors.ORDER_EXPIRED), order.orderHash); - return 0; - } - - uint remainingTakerTokenAmount = safeSub(order.takerTokenAmount, getUnavailableTakerTokenAmount(order.orderHash)); - uint cancelledTakerTokenAmount = min256(cancelTakerTokenAmount, remainingTakerTokenAmount); - if (cancelledTakerTokenAmount == 0) { - LogError(uint8(Errors.ORDER_FULLY_FILLED_OR_CANCELLED), order.orderHash); - return 0; - } - - cancelled[order.orderHash] = safeAdd(cancelled[order.orderHash], cancelledTakerTokenAmount); - - LogCancel( - order.maker, - order.feeRecipient, - order.makerToken, - order.takerToken, - getPartialAmount(cancelledTakerTokenAmount, order.takerTokenAmount, order.makerTokenAmount), - cancelledTakerTokenAmount, - keccak256(order.makerToken, order.takerToken), - order.orderHash - ); - return cancelledTakerTokenAmount; - } - - /* - * Wrapper functions - */ - - /// @dev Fills an order with specified parameters and ECDSA signature, throws if specified amount not filled entirely. - /// @param orderAddresses Array of order's maker, taker, makerToken, takerToken, and feeRecipient. - /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, and salt. - /// @param fillTakerTokenAmount Desired amount of takerToken to fill. - /// @param v ECDSA signature parameter v. - /// @param r ECDSA signature parameters r. - /// @param s ECDSA signature parameters s. - function fillOrKillOrder( - address[5] orderAddresses, - uint[6] orderValues, - uint fillTakerTokenAmount, - uint8 v, - bytes32 r, - bytes32 s) - public - { - require(fillOrder( - orderAddresses, - orderValues, - fillTakerTokenAmount, - false, - v, - r, - s - ) == fillTakerTokenAmount); - } - - /// @dev Synchronously executes multiple fill orders in a single transaction. - /// @param orderAddresses Array of address arrays containing individual order addresses. - /// @param orderValues Array of uint arrays containing individual order values. - /// @param fillTakerTokenAmounts Array of desired amounts of takerToken to fill in orders. - /// @param shouldThrowOnInsufficientBalanceOrAllowance Test if transfers will fail before attempting. - /// @param v Array ECDSA signature v parameters. - /// @param r Array of ECDSA signature r parameters. - /// @param s Array of ECDSA signature s parameters. - function batchFillOrders( - address[5][] orderAddresses, - uint[6][] orderValues, - uint[] fillTakerTokenAmounts, - bool shouldThrowOnInsufficientBalanceOrAllowance, - uint8[] v, - bytes32[] r, - bytes32[] s) - public - { - for (uint i = 0; i < orderAddresses.length; i++) { - fillOrder( - orderAddresses[i], - orderValues[i], - fillTakerTokenAmounts[i], - shouldThrowOnInsufficientBalanceOrAllowance, - v[i], - r[i], - s[i] - ); - } - } - - /// @dev Synchronously executes multiple fillOrKill orders in a single transaction. - /// @param orderAddresses Array of address arrays containing individual order addresses. - /// @param orderValues Array of uint arrays containing individual order values. - /// @param fillTakerTokenAmounts Array of desired amounts of takerToken to fill in orders. - /// @param v Array ECDSA signature v parameters. - /// @param r Array of ECDSA signature r parameters. - /// @param s Array of ECDSA signature s parameters. - function batchFillOrKillOrders( - address[5][] orderAddresses, - uint[6][] orderValues, - uint[] fillTakerTokenAmounts, - uint8[] v, - bytes32[] r, - bytes32[] s) - public - { - for (uint i = 0; i < orderAddresses.length; i++) { - fillOrKillOrder( - orderAddresses[i], - orderValues[i], - fillTakerTokenAmounts[i], - v[i], - r[i], - s[i] - ); - } - } - - /// @dev Synchronously executes multiple fill orders in a single transaction until total fillTakerTokenAmount filled. - /// @param orderAddresses Array of address arrays containing individual order addresses. - /// @param orderValues Array of uint arrays containing individual order values. - /// @param fillTakerTokenAmount Desired total amount of takerToken to fill in orders. - /// @param shouldThrowOnInsufficientBalanceOrAllowance Test if transfers will fail before attempting. - /// @param v Array ECDSA signature v parameters. - /// @param r Array of ECDSA signature r parameters. - /// @param s Array of ECDSA signature s parameters. - /// @return Total amount of fillTakerTokenAmount filled in orders. - function fillOrdersUpTo( - address[5][] orderAddresses, - uint[6][] orderValues, - uint fillTakerTokenAmount, - bool shouldThrowOnInsufficientBalanceOrAllowance, - uint8[] v, - bytes32[] r, - bytes32[] s) - public - returns (uint) - { - uint filledTakerTokenAmount = 0; - for (uint i = 0; i < orderAddresses.length; i++) { - require(orderAddresses[i][3] == orderAddresses[0][3]); // takerToken must be the same for each order - filledTakerTokenAmount = safeAdd(filledTakerTokenAmount, fillOrder( - orderAddresses[i], - orderValues[i], - safeSub(fillTakerTokenAmount, filledTakerTokenAmount), - shouldThrowOnInsufficientBalanceOrAllowance, - v[i], - r[i], - s[i] - )); - if (filledTakerTokenAmount == fillTakerTokenAmount) break; - } - return filledTakerTokenAmount; - } - - /// @dev Synchronously cancels multiple orders in a single transaction. - /// @param orderAddresses Array of address arrays containing individual order addresses. - /// @param orderValues Array of uint arrays containing individual order values. - /// @param cancelTakerTokenAmounts Array of desired amounts of takerToken to cancel in orders. - function batchCancelOrders( - address[5][] orderAddresses, - uint[6][] orderValues, - uint[] cancelTakerTokenAmounts) - public - { - for (uint i = 0; i < orderAddresses.length; i++) { - cancelOrder( - orderAddresses[i], - orderValues[i], - cancelTakerTokenAmounts[i] - ); - } - } - - /* - * Constant public functions - */ - - /// @dev Calculates Keccak-256 hash of order with specified parameters. - /// @param orderAddresses Array of order's maker, taker, makerToken, takerToken, and feeRecipient. - /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, and salt. - /// @return Keccak-256 hash of order. - function getOrderHash(address[5] orderAddresses, uint[6] orderValues) - public - constant - returns (bytes32) - { - return keccak256( - address(this), - orderAddresses[0], // maker - orderAddresses[1], // taker - orderAddresses[2], // makerToken - orderAddresses[3], // takerToken - orderAddresses[4], // feeRecipient - orderValues[0], // makerTokenAmount - orderValues[1], // takerTokenAmount - orderValues[2], // makerFee - orderValues[3], // takerFee - orderValues[4], // expirationTimestampInSec - orderValues[5] // salt - ); - } - - /// @dev Verifies that an order signature is valid. - /// @param signer address of signer. - /// @param hash Signed Keccak-256 hash. - /// @param v ECDSA signature parameter v. - /// @param r ECDSA signature parameters r. - /// @param s ECDSA signature parameters s. - /// @return Validity of order signature. - function isValidSignature( - address signer, - bytes32 hash, - uint8 v, - bytes32 r, - bytes32 s) - public - constant - returns (bool) - { - return signer == ecrecover( - keccak256("\x19Ethereum Signed Message:\n32", hash), - v, - r, - s - ); - } - - /// @dev Checks if rounding error > 0.1%. - /// @param numerator Numerator. - /// @param denominator Denominator. - /// @param target Value to multiply with numerator/denominator. - /// @return Rounding error is present. - function isRoundingError(uint numerator, uint denominator, uint target) - public - constant - returns (bool) - { - uint remainder = mulmod(target, numerator, denominator); - if (remainder == 0) return false; // No rounding error. - - uint errPercentageTimes1000000 = safeDiv( - safeMul(remainder, 1000000), - safeMul(numerator, target) - ); - return errPercentageTimes1000000 > 1000; - } - - /// @dev Calculates partial value given a numerator and denominator. - /// @param numerator Numerator. - /// @param denominator Denominator. - /// @param target Value to calculate partial of. - /// @return Partial value of target. - function getPartialAmount(uint numerator, uint denominator, uint target) - public - constant - returns (uint) - { - return safeDiv(safeMul(numerator, target), denominator); - } - - /// @dev Calculates the sum of values already filled and cancelled for a given order. - /// @param orderHash The Keccak-256 hash of the given order. - /// @return Sum of values already filled and cancelled. - function getUnavailableTakerTokenAmount(bytes32 orderHash) - public - constant - returns (uint) - { - return safeAdd(filled[orderHash], cancelled[orderHash]); - } - - - /* - * Internal functions - */ - - /// @dev Transfers a token using TokenTransferProxy transferFrom function. - /// @param token Address of token to transferFrom. - /// @param from Address transfering token. - /// @param to Address receiving token. - /// @param value Amount of token to transfer. - /// @return Success of token transfer. - function transferViaTokenTransferProxy( - address token, - address from, - address to, - uint value) - internal - returns (bool) - { - return TokenTransferProxy(TOKEN_TRANSFER_PROXY_CONTRACT).transferFrom(token, from, to, value); - } - - /// @dev Checks if any order transfers will fail. - /// @param order Order struct of params that will be checked. - /// @param fillTakerTokenAmount Desired amount of takerToken to fill. - /// @return Predicted result of transfers. - function isTransferable(Order order, uint fillTakerTokenAmount) - internal - constant // The called token contracts may attempt to change state, but will not be able to due to gas limits on getBalance and getAllowance. - returns (bool) - { - address taker = msg.sender; - uint fillMakerTokenAmount = getPartialAmount(fillTakerTokenAmount, order.takerTokenAmount, order.makerTokenAmount); - - if (order.feeRecipient != address(0)) { - bool isMakerTokenZRX = order.makerToken == ZRX_TOKEN_CONTRACT; - bool isTakerTokenZRX = order.takerToken == ZRX_TOKEN_CONTRACT; - uint paidMakerFee = getPartialAmount(fillTakerTokenAmount, order.takerTokenAmount, order.makerFee); - uint paidTakerFee = getPartialAmount(fillTakerTokenAmount, order.takerTokenAmount, order.takerFee); - uint requiredMakerZRX = isMakerTokenZRX ? safeAdd(fillMakerTokenAmount, paidMakerFee) : paidMakerFee; - uint requiredTakerZRX = isTakerTokenZRX ? safeAdd(fillTakerTokenAmount, paidTakerFee) : paidTakerFee; - - if ( getBalance(ZRX_TOKEN_CONTRACT, order.maker) < requiredMakerZRX - || getAllowance(ZRX_TOKEN_CONTRACT, order.maker) < requiredMakerZRX - || getBalance(ZRX_TOKEN_CONTRACT, taker) < requiredTakerZRX - || getAllowance(ZRX_TOKEN_CONTRACT, taker) < requiredTakerZRX - ) return false; - - if (!isMakerTokenZRX && ( getBalance(order.makerToken, order.maker) < fillMakerTokenAmount // Don't double check makerToken if ZRX - || getAllowance(order.makerToken, order.maker) < fillMakerTokenAmount) - ) return false; - if (!isTakerTokenZRX && ( getBalance(order.takerToken, taker) < fillTakerTokenAmount // Don't double check takerToken if ZRX - || getAllowance(order.takerToken, taker) < fillTakerTokenAmount) - ) return false; - } else if ( getBalance(order.makerToken, order.maker) < fillMakerTokenAmount - || getAllowance(order.makerToken, order.maker) < fillMakerTokenAmount - || getBalance(order.takerToken, taker) < fillTakerTokenAmount - || getAllowance(order.takerToken, taker) < fillTakerTokenAmount - ) return false; - - return true; - } - - /// @dev Get token balance of an address. - /// @param token Address of token. - /// @param owner Address of owner. - /// @return Token balance of owner. - function getBalance(address token, address owner) - internal - constant // The called token contract may attempt to change state, but will not be able to due to an added gas limit. - returns (uint) - { - return Token(token).balanceOf.gas(EXTERNAL_QUERY_GAS_LIMIT)(owner); // Limit gas to prevent reentrancy - } - - /// @dev Get allowance of token given to TokenTransferProxy by an address. - /// @param token Address of token. - /// @param owner Address of owner. - /// @return Allowance of token given to TokenTransferProxy by owner. - function getAllowance(address token, address owner) - internal - constant // The called token contract may attempt to change state, but will not be able to due to an added gas limit. - returns (uint) - { - return Token(token).allowance.gas(EXTERNAL_QUERY_GAS_LIMIT)(owner, TOKEN_TRANSFER_PROXY_CONTRACT); // Limit gas to prevent reentrancy - } -} diff --git a/packages/contracts/src/current/protocol/TokenRegistry/TokenRegistry.sol b/packages/contracts/src/current/protocol/TokenRegistry/TokenRegistry.sol deleted file mode 100644 index 3bd2fbfaf..000000000 --- a/packages/contracts/src/current/protocol/TokenRegistry/TokenRegistry.sol +++ /dev/null @@ -1,308 +0,0 @@ -/* - - Copyright 2017 ZeroEx Intl. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*/ - -pragma solidity ^0.4.11; - -import { Ownable_v1 as Ownable } from "../../../previous/Ownable/Ownable_v1.sol"; - -/// @title Token Registry - Stores metadata associated with ERC20 tokens. See ERC22 https://github.com/ethereum/EIPs/issues/22 -/// @author Amir Bandeali - , Will Warren - -contract TokenRegistry is Ownable { - - event LogAddToken( - address indexed token, - string name, - string symbol, - uint8 decimals, - bytes ipfsHash, - bytes swarmHash - ); - - event LogRemoveToken( - address indexed token, - string name, - string symbol, - uint8 decimals, - bytes ipfsHash, - bytes swarmHash - ); - - event LogTokenNameChange(address indexed token, string oldName, string newName); - event LogTokenSymbolChange(address indexed token, string oldSymbol, string newSymbol); - event LogTokenIpfsHashChange(address indexed token, bytes oldIpfsHash, bytes newIpfsHash); - event LogTokenSwarmHashChange(address indexed token, bytes oldSwarmHash, bytes newSwarmHash); - - mapping (address => TokenMetadata) public tokens; - mapping (string => address) tokenBySymbol; - mapping (string => address) tokenByName; - - address[] public tokenAddresses; - - struct TokenMetadata { - address token; - string name; - string symbol; - uint8 decimals; - bytes ipfsHash; - bytes swarmHash; - } - - modifier tokenExists(address _token) { - require(tokens[_token].token != address(0)); - _; - } - - modifier tokenDoesNotExist(address _token) { - require(tokens[_token].token == address(0)); - _; - } - - modifier nameDoesNotExist(string _name) { - require(tokenByName[_name] == address(0)); - _; - } - - modifier symbolDoesNotExist(string _symbol) { - require(tokenBySymbol[_symbol] == address(0)); - _; - } - - modifier addressNotNull(address _address) { - require(_address != address(0)); - _; - } - - - /// @dev Allows owner to add a new token to the registry. - /// @param _token Address of new token. - /// @param _name Name of new token. - /// @param _symbol Symbol for new token. - /// @param _decimals Number of decimals, divisibility of new token. - /// @param _ipfsHash IPFS hash of token icon. - /// @param _swarmHash Swarm hash of token icon. - function addToken( - address _token, - string _name, - string _symbol, - uint8 _decimals, - bytes _ipfsHash, - bytes _swarmHash) - public - onlyOwner - tokenDoesNotExist(_token) - addressNotNull(_token) - symbolDoesNotExist(_symbol) - nameDoesNotExist(_name) - { - tokens[_token] = TokenMetadata({ - token: _token, - name: _name, - symbol: _symbol, - decimals: _decimals, - ipfsHash: _ipfsHash, - swarmHash: _swarmHash - }); - tokenAddresses.push(_token); - tokenBySymbol[_symbol] = _token; - tokenByName[_name] = _token; - LogAddToken( - _token, - _name, - _symbol, - _decimals, - _ipfsHash, - _swarmHash - ); - } - - /// @dev Allows owner to remove an existing token from the registry. - /// @param _token Address of existing token. - function removeToken(address _token, uint _index) - public - onlyOwner - tokenExists(_token) - { - require(tokenAddresses[_index] == _token); - - tokenAddresses[_index] = tokenAddresses[tokenAddresses.length - 1]; - tokenAddresses.length -= 1; - - TokenMetadata storage token = tokens[_token]; - LogRemoveToken( - token.token, - token.name, - token.symbol, - token.decimals, - token.ipfsHash, - token.swarmHash - ); - delete tokenBySymbol[token.symbol]; - delete tokenByName[token.name]; - delete tokens[_token]; - } - - /// @dev Allows owner to modify an existing token's name. - /// @param _token Address of existing token. - /// @param _name New name. - function setTokenName(address _token, string _name) - public - onlyOwner - tokenExists(_token) - nameDoesNotExist(_name) - { - TokenMetadata storage token = tokens[_token]; - LogTokenNameChange(_token, token.name, _name); - delete tokenByName[token.name]; - tokenByName[_name] = _token; - token.name = _name; - } - - /// @dev Allows owner to modify an existing token's symbol. - /// @param _token Address of existing token. - /// @param _symbol New symbol. - function setTokenSymbol(address _token, string _symbol) - public - onlyOwner - tokenExists(_token) - symbolDoesNotExist(_symbol) - { - TokenMetadata storage token = tokens[_token]; - LogTokenSymbolChange(_token, token.symbol, _symbol); - delete tokenBySymbol[token.symbol]; - tokenBySymbol[_symbol] = _token; - token.symbol = _symbol; - } - - /// @dev Allows owner to modify an existing token's IPFS hash. - /// @param _token Address of existing token. - /// @param _ipfsHash New IPFS hash. - function setTokenIpfsHash(address _token, bytes _ipfsHash) - public - onlyOwner - tokenExists(_token) - { - TokenMetadata storage token = tokens[_token]; - LogTokenIpfsHashChange(_token, token.ipfsHash, _ipfsHash); - token.ipfsHash = _ipfsHash; - } - - /// @dev Allows owner to modify an existing token's Swarm hash. - /// @param _token Address of existing token. - /// @param _swarmHash New Swarm hash. - function setTokenSwarmHash(address _token, bytes _swarmHash) - public - onlyOwner - tokenExists(_token) - { - TokenMetadata storage token = tokens[_token]; - LogTokenSwarmHashChange(_token, token.swarmHash, _swarmHash); - token.swarmHash = _swarmHash; - } - - /* - * Web3 call functions - */ - - /// @dev Provides a registered token's address when given the token symbol. - /// @param _symbol Symbol of registered token. - /// @return Token's address. - function getTokenAddressBySymbol(string _symbol) constant returns (address) { - return tokenBySymbol[_symbol]; - } - - /// @dev Provides a registered token's address when given the token name. - /// @param _name Name of registered token. - /// @return Token's address. - function getTokenAddressByName(string _name) constant returns (address) { - return tokenByName[_name]; - } - - /// @dev Provides a registered token's metadata, looked up by address. - /// @param _token Address of registered token. - /// @return Token metadata. - function getTokenMetaData(address _token) - public - constant - returns ( - address, //tokenAddress - string, //name - string, //symbol - uint8, //decimals - bytes, //ipfsHash - bytes //swarmHash - ) - { - TokenMetadata memory token = tokens[_token]; - return ( - token.token, - token.name, - token.symbol, - token.decimals, - token.ipfsHash, - token.swarmHash - ); - } - - /// @dev Provides a registered token's metadata, looked up by name. - /// @param _name Name of registered token. - /// @return Token metadata. - function getTokenByName(string _name) - public - constant - returns ( - address, //tokenAddress - string, //name - string, //symbol - uint8, //decimals - bytes, //ipfsHash - bytes //swarmHash - ) - { - address _token = tokenByName[_name]; - return getTokenMetaData(_token); - } - - /// @dev Provides a registered token's metadata, looked up by symbol. - /// @param _symbol Symbol of registered token. - /// @return Token metadata. - function getTokenBySymbol(string _symbol) - public - constant - returns ( - address, //tokenAddress - string, //name - string, //symbol - uint8, //decimals - bytes, //ipfsHash - bytes //swarmHash - ) - { - address _token = tokenBySymbol[_symbol]; - return getTokenMetaData(_token); - } - - /// @dev Returns an array containing all token addresses. - /// @return Array of token addresses. - function getTokenAddresses() - public - constant - returns (address[]) - { - return tokenAddresses; - } -} diff --git a/packages/contracts/src/current/protocol/TokenTransferProxy/TokenTransferProxy.sol b/packages/contracts/src/current/protocol/TokenTransferProxy/TokenTransferProxy.sol deleted file mode 100644 index 1ce949fa6..000000000 --- a/packages/contracts/src/current/protocol/TokenTransferProxy/TokenTransferProxy.sol +++ /dev/null @@ -1,115 +0,0 @@ -/* - - Copyright 2017 ZeroEx Intl. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*/ - -pragma solidity ^0.4.11; - -import { Token_v1 as Token } from "../../../previous/Token/Token_v1.sol"; -import { Ownable_v1 as Ownable } from "../../../previous/Ownable/Ownable_v1.sol"; - -/// @title TokenTransferProxy - Transfers tokens on behalf of contracts that have been approved via decentralized governance. -/// @author Amir Bandeali - , Will Warren - -contract TokenTransferProxy is Ownable { - - /// @dev Only authorized addresses can invoke functions with this modifier. - modifier onlyAuthorized { - require(authorized[msg.sender]); - _; - } - - modifier targetAuthorized(address target) { - require(authorized[target]); - _; - } - - modifier targetNotAuthorized(address target) { - require(!authorized[target]); - _; - } - - mapping (address => bool) public authorized; - address[] public authorities; - - event LogAuthorizedAddressAdded(address indexed target, address indexed caller); - event LogAuthorizedAddressRemoved(address indexed target, address indexed caller); - - /* - * Public functions - */ - - /// @dev Authorizes an address. - /// @param target Address to authorize. - function addAuthorizedAddress(address target) - public - onlyOwner - targetNotAuthorized(target) - { - authorized[target] = true; - authorities.push(target); - LogAuthorizedAddressAdded(target, msg.sender); - } - - /// @dev Removes authorizion of an address. - /// @param target Address to remove authorization from. - function removeAuthorizedAddress(address target) - public - onlyOwner - targetAuthorized(target) - { - delete authorized[target]; - for (uint i = 0; i < authorities.length; i++) { - if (authorities[i] == target) { - authorities[i] = authorities[authorities.length - 1]; - authorities.length -= 1; - break; - } - } - LogAuthorizedAddressRemoved(target, msg.sender); - } - - /// @dev Calls into ERC20 Token contract, invoking transferFrom. - /// @param token Address of token to transfer. - /// @param from Address to transfer token from. - /// @param to Address to transfer token to. - /// @param value Amount of token to transfer. - /// @return Success of transfer. - function transferFrom( - address token, - address from, - address to, - uint value) - public - onlyAuthorized - returns (bool) - { - return Token(token).transferFrom(from, to, value); - } - - /* - * Public constant functions - */ - - /// @dev Gets all authorized addresses. - /// @return Array of authorized addresses. - function getAuthorizedAddresses() - public - constant - returns (address[]) - { - return authorities; - } -} diff --git a/packages/contracts/src/current/test/DummyToken/DummyToken.sol b/packages/contracts/src/current/test/DummyToken/DummyToken.sol deleted file mode 100644 index ab04f4d16..000000000 --- a/packages/contracts/src/current/test/DummyToken/DummyToken.sol +++ /dev/null @@ -1,37 +0,0 @@ -pragma solidity ^0.4.18; - -import { Mintable } from "../Mintable/Mintable.sol"; -import { Ownable } from "../../utils/Ownable/Ownable.sol"; - -contract DummyToken is Mintable, Ownable { - string public name; - string public symbol; - uint public decimals; - - function DummyToken( - string _name, - string _symbol, - uint _decimals, - uint _totalSupply) - public - { - name = _name; - symbol = _symbol; - decimals = _decimals; - totalSupply = _totalSupply; - balances[msg.sender] = _totalSupply; - } - - function setBalance(address _target, uint _value) - public - onlyOwner - { - uint currBalance = balanceOf(_target); - if (_value < currBalance) { - totalSupply = safeSub(totalSupply, safeSub(currBalance, _value)); - } else { - totalSupply = safeAdd(totalSupply, safeSub(_value, currBalance)); - } - balances[_target] = _value; - } -} diff --git a/packages/contracts/src/current/test/MaliciousToken/MaliciousToken.sol b/packages/contracts/src/current/test/MaliciousToken/MaliciousToken.sol deleted file mode 100644 index 9e502616c..000000000 --- a/packages/contracts/src/current/test/MaliciousToken/MaliciousToken.sol +++ /dev/null @@ -1,31 +0,0 @@ -pragma solidity ^0.4.18; - -import { ERC20Token } from "../../tokens/ERC20Token/ERC20Token.sol"; - -contract MaliciousToken is ERC20Token { - uint8 stateToUpdate = 1; // Not null so that change only requires 5000 gas - - function updateState() - internal - { - stateToUpdate++; - } - - function balanceOf(address _owner) - public - constant - returns (uint) - { - updateState(); - return balances[_owner]; - } - - function allowance(address _owner, address _spender) - public - constant - returns (uint) - { - updateState(); - return allowed[_owner][_spender]; - } -} diff --git a/packages/contracts/src/current/test/Mintable/Mintable.sol b/packages/contracts/src/current/test/Mintable/Mintable.sol deleted file mode 100644 index cf7ee35a5..000000000 --- a/packages/contracts/src/current/test/Mintable/Mintable.sol +++ /dev/null @@ -1,18 +0,0 @@ -pragma solidity ^0.4.18; - -import { UnlimitedAllowanceToken } from "../../tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol"; -import { SafeMath } from "../../utils/SafeMath/SafeMath.sol"; - -/* - * Mintable - * Base contract that creates a mintable UnlimitedAllowanceToken - */ -contract Mintable is UnlimitedAllowanceToken, SafeMath { - function mint(uint _value) - public - { - require(_value <= 100000000000000000000); - balances[msg.sender] = safeAdd(_value, balances[msg.sender]); - totalSupply = safeAdd(totalSupply, _value); - } -} diff --git a/packages/contracts/src/current/tokens/ERC20Token/ERC20Token.sol b/packages/contracts/src/current/tokens/ERC20Token/ERC20Token.sol deleted file mode 100644 index 0e5b87aa4..000000000 --- a/packages/contracts/src/current/tokens/ERC20Token/ERC20Token.sol +++ /dev/null @@ -1,58 +0,0 @@ -pragma solidity ^0.4.18; - -import { Token } from "../Token/Token.sol"; - -contract ERC20Token is Token { - - function transfer(address _to, uint _value) - public - returns (bool) - { - require(balances[msg.sender] >= _value && balances[_to] + _value >= balances[_to]); - balances[msg.sender] -= _value; - balances[_to] += _value; - Transfer(msg.sender, _to, _value); - return true; - } - - function transferFrom(address _from, address _to, uint _value) - public - returns (bool) - { - require(balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value >= balances[_to]); - balances[_to] += _value; - balances[_from] -= _value; - allowed[_from][msg.sender] -= _value; - Transfer(_from, _to, _value); - return true; - } - - function approve(address _spender, uint _value) - public - returns (bool) - { - allowed[msg.sender][_spender] = _value; - Approval(msg.sender, _spender, _value); - return true; - } - - function balanceOf(address _owner) - public - view - returns (uint) - { - return balances[_owner]; - } - - function allowance(address _owner, address _spender) - public - view - returns (uint) - { - return allowed[_owner][_spender]; - } - - mapping (address => uint) balances; - mapping (address => mapping (address => uint)) allowed; - uint public totalSupply; -} diff --git a/packages/contracts/src/current/tokens/Token/Token.sol b/packages/contracts/src/current/tokens/Token/Token.sol deleted file mode 100644 index bf4e71dcd..000000000 --- a/packages/contracts/src/current/tokens/Token/Token.sol +++ /dev/null @@ -1,35 +0,0 @@ -pragma solidity ^0.4.18; - -contract Token { - - /// @notice send `_value` token to `_to` from `msg.sender` - /// @param _to The address of the recipient - /// @param _value The amount of token to be transferred - /// @return Whether the transfer was successful or not - function transfer(address _to, uint _value) public returns (bool) {} - - /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` - /// @param _from The address of the sender - /// @param _to The address of the recipient - /// @param _value The amount of token to be transferred - /// @return Whether the transfer was successful or not - function transferFrom(address _from, address _to, uint _value) public returns (bool) {} - - /// @notice `msg.sender` approves `_addr` to spend `_value` tokens - /// @param _spender The address of the account able to transfer the tokens - /// @param _value The amount of wei to be approved for transfer - /// @return Whether the approval was successful or not - function approve(address _spender, uint _value) public returns (bool) {} - - /// @param _owner The address from which the balance will be retrieved - /// @return The balance - function balanceOf(address _owner) public view returns (uint) {} - - /// @param _owner The address of the account owning tokens - /// @param _spender The address of the account able to transfer the tokens - /// @return Amount of remaining tokens allowed to spent - function allowance(address _owner, address _spender) public view returns (uint) {} - - event Transfer(address indexed _from, address indexed _to, uint _value); - event Approval(address indexed _owner, address indexed _spender, uint _value); -} diff --git a/packages/contracts/src/current/tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol b/packages/contracts/src/current/tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol deleted file mode 100644 index 699f535d2..000000000 --- a/packages/contracts/src/current/tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol +++ /dev/null @@ -1,46 +0,0 @@ -/* - - Copyright 2017 ZeroEx Intl. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*/ - -pragma solidity ^0.4.18; - -import { ERC20Token } from "../ERC20Token/ERC20Token.sol"; - -contract UnlimitedAllowanceToken is ERC20Token { - - uint constant MAX_UINT = 2**256 - 1; - - /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance. See https://github.com/ethereum/EIPs/issues/717 - /// @param _from Address to transfer from. - /// @param _to Address to transfer to. - /// @param _value Amount to transfer. - /// @return Success of transfer. - function transferFrom(address _from, address _to, uint _value) - public - returns (bool) - { - uint allowance = allowed[_from][msg.sender]; - require(balances[_from] >= _value && allowance >= _value && balances[_to] + _value >= balances[_to]); - balances[_to] += _value; - balances[_from] -= _value; - if (allowance < MAX_UINT) { - allowed[_from][msg.sender] -= _value; - } - Transfer(_from, _to, _value); - return true; - } -} diff --git a/packages/contracts/src/current/tokens/WETH9/WETH9.sol b/packages/contracts/src/current/tokens/WETH9/WETH9.sol deleted file mode 100644 index 733ca414b..000000000 --- a/packages/contracts/src/current/tokens/WETH9/WETH9.sol +++ /dev/null @@ -1,756 +0,0 @@ -// Copyright (C) 2015, 2016, 2017 Dapphub - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -pragma solidity ^0.4.18; - -contract WETH9 { - string public name = "Wrapped Ether"; - string public symbol = "WETH"; - uint8 public decimals = 18; - - event Approval(address indexed src, address indexed guy, uint wad); - event Transfer(address indexed src, address indexed dst, uint wad); - event Deposit(address indexed dst, uint wad); - event Withdrawal(address indexed src, uint wad); - - mapping (address => uint) public balanceOf; - mapping (address => mapping (address => uint)) public allowance; - - function() public payable { - deposit(); - } - function deposit() public payable { - balanceOf[msg.sender] += msg.value; - Deposit(msg.sender, msg.value); - } - function withdraw(uint wad) public { - require(balanceOf[msg.sender] >= wad); - balanceOf[msg.sender] -= wad; - msg.sender.transfer(wad); - Withdrawal(msg.sender, wad); - } - - function totalSupply() public view returns (uint) { - return this.balance; - } - - function approve(address guy, uint wad) public returns (bool) { - allowance[msg.sender][guy] = wad; - Approval(msg.sender, guy, wad); - return true; - } - - function transfer(address dst, uint wad) public returns (bool) { - return transferFrom(msg.sender, dst, wad); - } - - function transferFrom(address src, address dst, uint wad) - public - returns (bool) - { - require(balanceOf[src] >= wad); - - if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) { - require(allowance[src][msg.sender] >= wad); - allowance[src][msg.sender] -= wad; - } - - balanceOf[src] -= wad; - balanceOf[dst] += wad; - - Transfer(src, dst, wad); - - return true; - } -} - - -/* - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. - -*/ diff --git a/packages/contracts/src/current/tokens/ZRXToken/ZRXToken.sol b/packages/contracts/src/current/tokens/ZRXToken/ZRXToken.sol deleted file mode 100644 index 7f5e1f849..000000000 --- a/packages/contracts/src/current/tokens/ZRXToken/ZRXToken.sol +++ /dev/null @@ -1,33 +0,0 @@ -/* - - Copyright 2017 ZeroEx Intl. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*/ - -pragma solidity ^0.4.11; - -import { UnlimitedAllowanceToken_v1 as UnlimitedAllowanceToken } from "../../../previous/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol"; - -contract ZRXToken is UnlimitedAllowanceToken { - - uint8 constant public decimals = 18; - uint public totalSupply = 10**27; // 1 billion tokens, 18 decimal places - string constant public name = "0x Protocol Token"; - string constant public symbol = "ZRX"; - - function ZRXToken() { - balances[msg.sender] = totalSupply; - } -} diff --git a/packages/contracts/src/current/utils/Ownable/Ownable.sol b/packages/contracts/src/current/utils/Ownable/Ownable.sol deleted file mode 100644 index 9b3d6b9cf..000000000 --- a/packages/contracts/src/current/utils/Ownable/Ownable.sol +++ /dev/null @@ -1,32 +0,0 @@ -pragma solidity ^0.4.18; - -/* - * Ownable - * - * Base contract with an owner. - * Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner. - */ - -contract Ownable { - address public owner; - - function Ownable() - public - { - owner = msg.sender; - } - - modifier onlyOwner() { - require(msg.sender == owner); - _; - } - - function transferOwnership(address newOwner) - public - onlyOwner - { - if (newOwner != address(0)) { - owner = newOwner; - } - } -} diff --git a/packages/contracts/src/current/utils/SafeMath/SafeMath.sol b/packages/contracts/src/current/utils/SafeMath/SafeMath.sol deleted file mode 100644 index 955a9e379..000000000 --- a/packages/contracts/src/current/utils/SafeMath/SafeMath.sol +++ /dev/null @@ -1,73 +0,0 @@ -pragma solidity ^0.4.18; - -contract SafeMath { - function safeMul(uint a, uint b) - internal - pure - returns (uint256) - { - uint c = a * b; - assert(a == 0 || c / a == b); - return c; - } - - function safeDiv(uint a, uint b) - internal - pure - returns (uint256) - { - uint c = a / b; - return c; - } - - function safeSub(uint a, uint b) - internal - pure - returns (uint256) - { - assert(b <= a); - return a - b; - } - - function safeAdd(uint a, uint b) - internal - pure - returns (uint256) - { - uint c = a + b; - assert(c >= a); - return c; - } - - function max64(uint64 a, uint64 b) - internal - pure - returns (uint256) - { - return a >= b ? a : b; - } - - function min64(uint64 a, uint64 b) - internal - pure - returns (uint256) - { - return a < b ? a : b; - } - - function max256(uint256 a, uint256 b) - internal - pure - returns (uint256) - { - return a >= b ? a : b; - } - - function min256(uint256 a, uint256 b) - internal - pure - returns (uint256) - { - return a < b ? a : b; - } -} diff --git a/packages/contracts/src/previous/ERC20Token/ERC20Token_v1.sol b/packages/contracts/src/previous/ERC20Token/ERC20Token_v1.sol deleted file mode 100644 index e05ee2d5e..000000000 --- a/packages/contracts/src/previous/ERC20Token/ERC20Token_v1.sol +++ /dev/null @@ -1,44 +0,0 @@ -pragma solidity ^0.4.11; - -import { Token_v1 as Token } from "../Token/Token_v1.sol"; - -contract ERC20Token_v1 is Token { - - function transfer(address _to, uint _value) returns (bool) { - //Default assumes totalSupply can't be over max (2^256 - 1). - if (balances[msg.sender] >= _value && balances[_to] + _value >= balances[_to]) { - balances[msg.sender] -= _value; - balances[_to] += _value; - Transfer(msg.sender, _to, _value); - return true; - } else { return false; } - } - - function transferFrom(address _from, address _to, uint _value) returns (bool) { - if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value >= balances[_to]) { - balances[_to] += _value; - balances[_from] -= _value; - allowed[_from][msg.sender] -= _value; - Transfer(_from, _to, _value); - return true; - } else { return false; } - } - - function balanceOf(address _owner) constant returns (uint) { - return balances[_owner]; - } - - function approve(address _spender, uint _value) returns (bool) { - allowed[msg.sender][_spender] = _value; - Approval(msg.sender, _spender, _value); - return true; - } - - function allowance(address _owner, address _spender) constant returns (uint) { - return allowed[_owner][_spender]; - } - - mapping (address => uint) balances; - mapping (address => mapping (address => uint)) allowed; - uint public totalSupply; -} diff --git a/packages/contracts/src/previous/Ownable/Ownable_v1.sol b/packages/contracts/src/previous/Ownable/Ownable_v1.sol deleted file mode 100644 index c87438fa4..000000000 --- a/packages/contracts/src/previous/Ownable/Ownable_v1.sol +++ /dev/null @@ -1,27 +0,0 @@ -pragma solidity ^0.4.11; - -/* - * Ownable - * - * Base contract with an owner. - * Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner. - */ - -contract Ownable_v1 { - address public owner; - - function Ownable_v1() { - owner = msg.sender; - } - - modifier onlyOwner() { - require(msg.sender == owner); - _; - } - - function transferOwnership(address newOwner) onlyOwner { - if (newOwner != address(0)) { - owner = newOwner; - } - } -} diff --git a/packages/contracts/src/previous/SafeMath/SafeMath_v1.sol b/packages/contracts/src/previous/SafeMath/SafeMath_v1.sol deleted file mode 100644 index 341d611ec..000000000 --- a/packages/contracts/src/previous/SafeMath/SafeMath_v1.sol +++ /dev/null @@ -1,73 +0,0 @@ -pragma solidity ^0.4.11; - -contract SafeMath_v1 { - function safeMul(uint a, uint b) - internal - constant - returns (uint256) - { - uint c = a * b; - assert(a == 0 || c / a == b); - return c; - } - - function safeDiv(uint a, uint b) - internal - constant - returns (uint256) - { - uint c = a / b; - return c; - } - - function safeSub(uint a, uint b) - internal - constant - returns (uint256) - { - assert(b <= a); - return a - b; - } - - function safeAdd(uint a, uint b) - internal - constant - returns (uint256) - { - uint c = a + b; - assert(c >= a); - return c; - } - - function max64(uint64 a, uint64 b) - internal - constant - returns (uint64) - { - return a >= b ? a : b; - } - - function min64(uint64 a, uint64 b) - internal - constant - returns (uint64) - { - return a < b ? a : b; - } - - function max256(uint256 a, uint256 b) - internal - constant - returns (uint256) - { - return a >= b ? a : b; - } - - function min256(uint256 a, uint256 b) - internal - constant - returns (uint256) - { - return a < b ? a : b; - } -} diff --git a/packages/contracts/src/previous/Token/Token_v1.sol b/packages/contracts/src/previous/Token/Token_v1.sol deleted file mode 100644 index de619fb7e..000000000 --- a/packages/contracts/src/previous/Token/Token_v1.sol +++ /dev/null @@ -1,39 +0,0 @@ -pragma solidity ^0.4.11; - -contract Token_v1 { - - /// @return total amount of tokens - function totalSupply() constant returns (uint supply) {} - - /// @param _owner The address from which the balance will be retrieved - /// @return The balance - function balanceOf(address _owner) constant returns (uint balance) {} - - /// @notice send `_value` token to `_to` from `msg.sender` - /// @param _to The address of the recipient - /// @param _value The amount of token to be transferred - /// @return Whether the transfer was successful or not - function transfer(address _to, uint _value) returns (bool success) {} - - /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` - /// @param _from The address of the sender - /// @param _to The address of the recipient - /// @param _value The amount of token to be transferred - /// @return Whether the transfer was successful or not - function transferFrom(address _from, address _to, uint _value) returns (bool success) {} - - /// @notice `msg.sender` approves `_addr` to spend `_value` tokens - /// @param _spender The address of the account able to transfer the tokens - /// @param _value The amount of wei to be approved for transfer - /// @return Whether the approval was successful or not - function approve(address _spender, uint _value) returns (bool success) {} - - /// @param _owner The address of the account owning tokens - /// @param _spender The address of the account able to transfer the tokens - /// @return Amount of remaining tokens allowed to spent - function allowance(address _owner, address _spender) constant returns (uint remaining) {} - - event Transfer(address indexed _from, address indexed _to, uint _value); - event Approval(address indexed _owner, address indexed _spender, uint _value); -} - diff --git a/packages/contracts/src/previous/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol b/packages/contracts/src/previous/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol deleted file mode 100644 index 6376f3f2c..000000000 --- a/packages/contracts/src/previous/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol +++ /dev/null @@ -1,52 +0,0 @@ -/* - - Copyright 2017 ZeroEx Intl. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*/ - -pragma solidity ^0.4.11; - -import { ERC20Token_v1 as ERC20Token } from "../ERC20Token/ERC20Token_v1.sol"; - -contract UnlimitedAllowanceToken_v1 is ERC20Token { - - uint constant MAX_UINT = 2**256 - 1; - - /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance. - /// @param _from Address to transfer from. - /// @param _to Address to transfer to. - /// @param _value Amount to transfer. - /// @return Success of transfer. - function transferFrom(address _from, address _to, uint _value) - public - returns (bool) - { - uint allowance = allowed[_from][msg.sender]; - if (balances[_from] >= _value - && allowance >= _value - && balances[_to] + _value >= balances[_to] - ) { - balances[_to] += _value; - balances[_from] -= _value; - if (allowance < MAX_UINT) { - allowed[_from][msg.sender] -= _value; - } - Transfer(_from, _to, _value); - return true; - } else { - return false; - } - } -} -- cgit v1.2.3