diff options
author | Fabio Berger <me@fabioberger.com> | 2017-07-11 15:30:55 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-07-11 15:30:55 +0800 |
commit | 56bedf724fb25f858b5aaefbb61562c4896defc1 (patch) | |
tree | 51a414c2280693b6ec36ec7109c3fd90d3c42082 | |
parent | b98f3fc09485aaba56a2ce244dd2e27c59928cd8 (diff) | |
parent | 054843d599129e3dbb2eb36a402eff66064ed78f (diff) | |
download | dexon-sol-tools-56bedf724fb25f858b5aaefbb61562c4896defc1.tar.gz dexon-sol-tools-56bedf724fb25f858b5aaefbb61562c4896defc1.tar.zst dexon-sol-tools-56bedf724fb25f858b5aaefbb61562c4896defc1.zip |
Merge branch 'new-contracts'
* new-contracts: (29 commits)
Fix a typo
Fix a typo in comment
Rename shouldCheckTransfer to shouldThrowOnInsufficientBalanceOrAllowance
Simplify BigNumber hack
use yarn on CI
Upgrade to a new node version
Make CONTRACTS_COMMIT_HASH a string
Use never testrpc snapshot
Migrate the rest of the artifacts
Change arguments order at isRoundingError
Migrate events
Migrate constructor arguments
Migrate fillOrKillOrder
Migrate ZRX_TOKEN_AMOUNT
Migrate getUnavailableTakerTokenAmount
Migrate PROXY_CONTRACT
Migrate batchFillOrKillOrders
Migrate batchFillOrders
Migrate fillOrder
Migrate fillOrdersUpTo and remove min
...
-rw-r--r-- | circle.yml | 19 | ||||
-rw-r--r-- | src/artifacts/EtherToken.json | 10 | ||||
-rw-r--r-- | src/artifacts/Mintable.json | 4 | ||||
-rw-r--r-- | src/artifacts/Proxy.json | 6 | ||||
-rw-r--r-- | src/artifacts/Token.json | 4 | ||||
-rw-r--r-- | src/artifacts/TokenRegistry.json | 6 | ||||
-rw-r--r-- | src/artifacts/exchange/Exchange_v1.json | 332 | ||||
-rw-r--r-- | src/contract_wrappers/exchange_wrapper.ts | 200 | ||||
-rw-r--r-- | src/types.ts | 91 | ||||
-rw-r--r-- | src/utils/event_utils.ts | 7 | ||||
-rw-r--r-- | test/exchange_wrapper_test.ts | 8 |
11 files changed, 276 insertions, 411 deletions
diff --git a/circle.yml b/circle.yml index 028aadd58..fbfa67c6d 100644 --- a/circle.yml +++ b/circle.yml @@ -1,8 +1,15 @@ machine: node: - version: 6.1.0 + version: 6.5.0 environment: - CONTRACTS_COMMIT_HASH: cd04d7c + CONTRACTS_COMMIT_HASH: '414e997' + PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" + +dependencies: + override: + - yarn + cache_directories: + - ~/.cache/yarn test: override: @@ -10,7 +17,7 @@ test: - unzip ${CONTRACTS_COMMIT_HASH}.zip -d testrpc_snapshot - npm run testrpc -- --db testrpc_snapshot: background: true - - npm run test:coverage - - npm run report_test_coverage - - if [ $CIRCLE_BRANCH = "master" ]; then npm run test:umd; fi - - npm run lint + - yarn test:coverage + - yarn report_test_coverage + - if [ $CIRCLE_BRANCH = "master" ]; then yarn test:umd; fi + - yarn lint diff --git a/src/artifacts/EtherToken.json b/src/artifacts/EtherToken.json index 3ca4bd797..49f8541c4 100644 --- a/src/artifacts/EtherToken.json +++ b/src/artifacts/EtherToken.json @@ -185,6 +185,10 @@ "type": "function" }, { + "payable": true, + "type": "fallback" + }, + { "anonymous": false, "inputs": [ { @@ -229,7 +233,7 @@ "type": "event" } ], - "unlinked_binary": "0x6060604052341561000c57fe5b5b6107218061001c6000396000f300606060405236156100935763ffffffff60e060020a60003504166306fdde038114610095578063095ea7b31461012557806318160ddd1461015857806323b872dd1461017a5780632e1a7d4d146101b3578063313ce567146101c857806370a08231146101ee57806395d89b411461021c578063a9059cbb146102ac578063d0e30db0146102df578063dd62ed3e146102e9575bfe5b341561009d57fe5b6100a561031d565b6040805160208082528351818301528351919283929083019185019080838382156100eb575b8051825260208311156100eb57601f1990920191602091820191016100cb565b505050905090810190601f1680156101175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561012d57fe5b610144600160a060020a0360043516602435610345565b604080519115158252519081900360200190f35b341561016057fe5b6101686103b0565b60408051918252519081900360200190f35b341561018257fe5b610144600160a060020a03600435811690602435166044356103b6565b604080519115158252519081900360200190f35b34156101bb57fe5b6101c66004356104a1565b005b34156101d057fe5b6101d8610522565b6040805160ff9092168252519081900360200190f35b34156101f657fe5b610168600160a060020a0360043516610527565b60408051918252519081900360200190f35b341561022457fe5b6100a5610546565b6040805160208082528351818301528351919283929083019185019080838382156100eb575b8051825260208311156100eb57601f1990920191602091820191016100cb565b505050905090810190601f1680156101175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102b457fe5b610144600160a060020a0360043516602435610567565b604080519115158252519081900360200190f35b6101c6610607565b005b34156102f157fe5b610168600160a060020a0360043581169060243516610656565b60408051918252519081900360200190f35b60408051808201909152600b815260a960020a6a22ba3432b9102a37b5b2b702602082015281565b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b600160a060020a0383166000908152602081905260408120546103d99083610683565b600160a060020a0380861660009081526020818152604080832094909455600181528382203390931682529190915220546104149083610683565b600160a060020a03808616600090815260016020908152604080832033851684528252808320949094559186168152908190522054610453908361069c565b600160a060020a038085166000818152602081815260409182902094909455805186815290519193928816926000805160206106d683398151915292918290030190a35060015b9392505050565b600160a060020a0333166000908152602081905260409020546104c49082610683565b600160a060020a0333166000908152602081905260409020556002546104ea9082610683565b600255604051600160a060020a0333169082156108fc029083906000818181858888f19350505050151561051e5760006000fd5b5b50565b601281565b600160a060020a0381166000908152602081905260409020545b919050565b604080518082019091526004815260e360020a630ae8aa8902602082015281565b600160a060020a03331660009081526020819052604081205461058a9083610683565b600160a060020a0333811660009081526020819052604080822093909355908516815220546105b9908361069c565b600160a060020a03808516600081815260208181526040918290209490945580518681529051919333909316926000805160206106d683398151915292918290030190a35060015b92915050565b600160a060020a03331660009081526020819052604090205461062a903461069c565b600160a060020a033316600090815260208190526040902055600254610650903461069c565b6002555b565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b6000610691838311156106c4565b508082035b92915050565b60008282016106b98482108015906106b45750838210155b6106c4565b8091505b5092915050565b80151561051e5760006000fd5b5b505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820d39a3d758ea0042048564f60b0e39c59508468d4de91cd9b7b5f708b554f699c0029", + "unlinked_binary": "0x6060604052341561000c57fe5b5b61070b8061001c6000396000f300606060405236156100935763ffffffff60e060020a60003504166306fdde0381146100a4578063095ea7b31461013457806318160ddd1461016757806323b872dd146101895780632e1a7d4d146101c2578063313ce567146101d757806370a08231146101fd57806395d89b411461022b578063a9059cbb146102bb578063d0e30db0146102ee578063dd62ed3e146102f8575b6100a25b61009f61032c565b5b565b005b34156100ac57fe5b6100b461037b565b6040805160208082528351818301528351919283929083019185019080838382156100fa575b8051825260208311156100fa57601f1990920191602091820191016100da565b505050905090810190601f1680156101265780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561013c57fe5b610153600160a060020a03600435166024356103a3565b604080519115158252519081900360200190f35b341561016f57fe5b61017761040e565b60408051918252519081900360200190f35b341561019157fe5b610153600160a060020a0360043581169060243516604435610414565b604080519115158252519081900360200190f35b34156101ca57fe5b6100a26004356104ff565b005b34156101df57fe5b6101e761057c565b6040805160ff9092168252519081900360200190f35b341561020557fe5b610177600160a060020a0360043516610581565b60408051918252519081900360200190f35b341561023357fe5b6100b46105a0565b6040805160208082528351818301528351919283929083019185019080838382156100fa575b8051825260208311156100fa57601f1990920191602091820191016100da565b505050905090810190601f1680156101265780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102c357fe5b610153600160a060020a03600435166024356105c1565b604080519115158252519081900360200190f35b6100a261032c565b005b341561030057fe5b610177600160a060020a0360043581169060243516610661565b60408051918252519081900360200190f35b600160a060020a03331660009081526020819052604090205461034f903461068e565b600160a060020a033316600090815260208190526040902055600254610375903461068e565b6002555b565b60408051808201909152600b815260a960020a6a22ba3432b9102a37b5b2b702602082015281565b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b600160a060020a03831660009081526020819052604081205461043790836106a8565b600160a060020a03808616600090815260208181526040808320949094556001815283822033909316825291909152205461047290836106a8565b600160a060020a038086166000908152600160209081526040808320338516845282528083209490945591861681529081905220546104b1908361068e565b600160a060020a038085166000818152602081815260409182902094909455805186815290519193928816926000805160206106c083398151915292918290030190a35060015b9392505050565b600160a060020a03331660009081526020819052604090205461052290826106a8565b600160a060020a03331660009081526020819052604090205560025461054890826106a8565b600255604051600160a060020a0333169082156108fc029083906000818181858888f19350505050151561057857fe5b5b50565b601281565b600160a060020a0381166000908152602081905260409020545b919050565b604080518082019091526004815260e360020a630ae8aa8902602082015281565b600160a060020a0333166000908152602081905260408120546105e490836106a8565b600160a060020a033381166000908152602081905260408082209390935590851681522054610613908361068e565b600160a060020a03808516600081815260208181526040918290209490945580518681529051919333909316926000805160206106c083398151915292918290030190a35060015b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b60008282018381101561069d57fe5b8091505b5092915050565b6000828211156106b457fe5b508082035b929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a7230582067df00833f10f3cd5bb1c103cf4266bd3cf02036b011be8f22ebd16154b9fa820029", "networks": { "42": { "links": {}, @@ -330,10 +334,10 @@ "type": "event" } }, - "updated_at": 1498588231356, + "updated_at": 1499462280317, "address": "0x48bacb9266a570d521063ef5dd96e61686dbe788" } }, "schema_version": "0.0.5", - "updated_at": 1498588231356 + "updated_at": 1499462280317 }
\ No newline at end of file diff --git a/src/artifacts/Mintable.json b/src/artifacts/Mintable.json index fc4b93cae..9dd879108 100644 --- a/src/artifacts/Mintable.json +++ b/src/artifacts/Mintable.json @@ -182,8 +182,8 @@ "type": "event" } ], - "unlinked_binary": "0x6060604052341561000c57fe5b5b6104f78061001c6000396000f300606060405236156100675763ffffffff60e060020a600035041663095ea7b3811461006957806318160ddd1461009c57806323b872dd146100be57806370a08231146100f7578063a0712d6814610125578063a9059cbb1461013a578063dd62ed3e1461016d575bfe5b341561007157fe5b610088600160a060020a03600435166024356101a1565b604080519115158252519081900360200190f35b34156100a457fe5b6100ac61020c565b60408051918252519081900360200190f35b34156100c657fe5b610088600160a060020a0360043581169060243516604435610212565b604080519115158252519081900360200190f35b34156100ff57fe5b6100ac600160a060020a036004351661030d565b60408051918252519081900360200190f35b341561012d57fe5b61013860043561032c565b005b341561014257fe5b610088600160a060020a0360043516602435610394565b604080519115158252519081900360200190f35b341561017557fe5b6100ac600160a060020a0360043581169060243516610445565b60408051918252519081900360200190f35b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b600160a060020a0383166000908152602081905260408120548290108015906102625750600160a060020a0380851660009081526001602090815260408083203390941683529290522054829010155b80156102875750600160a060020a038316600090815260208190526040902054828101115b1561030157600160a060020a0380841660008181526020818152604080832080548801905588851680845281842080548990039055600183528184203390961684529482529182902080548790039055815186815291519293926000805160206104ac8339815191529281900390910190a3506001610305565b5060005b5b9392505050565b600160a060020a0381166000908152602081905260409020545b919050565b68056bc75e2d631000008111156103435760006000fd5b600160a060020a033316600090815260208190526040902054610367908290610472565b600160a060020a03331660009081526020819052604090205560025461038d9082610472565b6002555b50565b600160a060020a0333166000908152602081905260408120548290108015906103d65750600160a060020a038316600090815260208190526040902054828101115b1561043657600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191936000805160206104ac833981519152929081900390910190a3506001610206565b506000610206565b5b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b600082820161048f84821080159061048a5750838210155b61049a565b8091505b5092915050565b8015156103915760006000fd5b5b505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a7230582017b556a0dd152ca0b949c108d1e5479ccafa38c1a952572dde1d45dab72f113b0029", + "unlinked_binary": "0x6060604052341561000c57fe5b5b6104da8061001c6000396000f300606060405236156100675763ffffffff60e060020a600035041663095ea7b3811461006957806318160ddd1461009c57806323b872dd146100be57806370a08231146100f7578063a0712d6814610125578063a9059cbb1461013a578063dd62ed3e1461016d575bfe5b341561007157fe5b610088600160a060020a03600435166024356101a1565b604080519115158252519081900360200190f35b34156100a457fe5b6100ac61020c565b60408051918252519081900360200190f35b34156100c657fe5b610088600160a060020a0360043581169060243516604435610212565b604080519115158252519081900360200190f35b34156100ff57fe5b6100ac600160a060020a036004351661030e565b60408051918252519081900360200190f35b341561012d57fe5b61013860043561032d565b005b341561014257fe5b610088600160a060020a0360043516602435610395565b604080519115158252519081900360200190f35b341561017557fe5b6100ac600160a060020a0360043581169060243516610447565b60408051918252519081900360200190f35b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b600160a060020a0383166000908152602081905260408120548290108015906102625750600160a060020a0380851660009081526001602090815260408083203390941683529290522054829010155b80156102885750600160a060020a03831660009081526020819052604090205482810110155b1561030257600160a060020a03808416600081815260208181526040808320805488019055888516808452818420805489900390556001835281842033909616845294825291829020805487900390558151868152915192939260008051602061048f8339815191529281900390910190a3506001610306565b5060005b5b9392505050565b600160a060020a0381166000908152602081905260409020545b919050565b68056bc75e2d631000008111156103445760006000fd5b600160a060020a033316600090815260208190526040902054610368908290610474565b600160a060020a03331660009081526020819052604090205560025461038e9082610474565b6002555b50565b600160a060020a0333166000908152602081905260408120548290108015906103d85750600160a060020a03831660009081526020819052604090205482810110155b1561043857600160a060020a03338116600081815260208181526040808320805488900390559387168083529184902080548701905583518681529351919360008051602061048f833981519152929081900390910190a3506001610206565b506000610206565b5b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b60008282018381101561048357fe5b8091505b50929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820b42ca96e1b6db90faf9be8fb630f57ee3986233fec8ecfc11fd467b13499abc70029", "networks": {}, "schema_version": "0.0.5", - "updated_at": 1498588228068 + "updated_at": 1499462278466 }
\ No newline at end of file diff --git a/src/artifacts/Proxy.json b/src/artifacts/Proxy.json index c001cee5b..a050e91c6 100644 --- a/src/artifacts/Proxy.json +++ b/src/artifacts/Proxy.json @@ -177,7 +177,7 @@ "type": "event" } ], - "unlinked_binary": "0x60606040525b60008054600160a060020a03191633600160a060020a03161790555b5b610727806100316000396000f300606060405236156100725763ffffffff60e060020a60003504166315dacbea811461007457806342f1181e146100b3578063494503d4146100e357806370712939146101125780638da5cb5b14610142578063b91816111461016e578063d39de6e91461019e578063f2fde38b14610209575bfe5b341561007c57fe5b61009f600160a060020a0360043581169060243581169060443516606435610227565b604080519115158252519081900360200190f35b34156100bb57fe5b61009f600160a060020a03600435166102e0565b604080519115158252519081900360200190f35b34156100eb57fe5b6100f66004356103c9565b60408051600160a060020a039092168252519081900360200190f35b341561011a57fe5b61009f600160a060020a03600435166103fb565b604080519115158252519081900360200190f35b341561014a57fe5b6100f661059b565b60408051600160a060020a039092168252519081900360200190f35b341561017657fe5b61009f600160a060020a03600435166105aa565b604080519115158252519081900360200190f35b34156101a657fe5b6101ae6105bf565b60408051602080825283518183015283519192839290830191858101910280838382156101f6575b8051825260208311156101f657601f1990920191602091820191016101d6565b5050509050019250505060405180910390f35b341561021157fe5b610225600160a060020a0360043516610628565b005b600160a060020a03331660009081526001602052604081205460ff16151561024f5760006000fd5b6040805160006020918201819052825160e060020a6323b872dd028152600160a060020a0388811660048301528781166024830152604482018790529351938916936323b872dd9360648084019491938390030190829087803b15156102b157fe5b6102c65a03f115156102bf57fe5b505060405151151590506102d35760006000fd5b5060015b5b949350505050565b6000805433600160a060020a039081169116146102fd5760006000fd5b600160a060020a038216600090815260016020526040902054829060ff16156103265760006000fd5b600160a060020a0383166000908152600160208190526040909120805460ff191682179055600280549091810161035d8382610674565b916000526020600020900160005b81546101009190910a600160a060020a0381810219909216878316918202179092556040513390911692507f94bb87f4c15c4587ff559a7584006fa01ddf9299359be6b512b94527aa961aca90600090a3600191505b5b505b919050565b60028054829081106103d757fe5b906000526020600020900160005b915054906101000a9004600160a060020a031681565b60008054819033600160a060020a0390811691161461041a5760006000fd5b600160a060020a038316600090815260016020526040902054839060ff1615156104445760006000fd5b600160a060020a0384166000908152600160205260408120805460ff1916905591505b6002548210156105545783600160a060020a031660028381548110151561048a57fe5b906000526020600020900160005b9054906101000a9004600160a060020a0316600160a060020a03161415610548576002805460001981019081106104cb57fe5b906000526020600020900160005b9054906101000a9004600160a060020a03166002838154811015156104fa57fe5b906000526020600020900160005b6101000a815481600160a060020a030219169083600160a060020a0316021790555060016002818180549050039150816105429190610674565b50610554565b5b600190910190610467565b604051600160a060020a0333811691908616907ff5b347a1e40749dd050f5f07fbdbeb7e3efa9756903044dd29401fd1d4bb4a1c90600090a3600192505b5b505b50919050565b600054600160a060020a031681565b60016020526000908152604090205460ff1681565b6105c76106c8565b600280548060200260200160405190810160405280929190818152602001828054801561061d57602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116105ff575b505050505090505b90565b60005433600160a060020a039081169116146106445760006000fd5b600160a060020a0381161561066f5760008054600160a060020a031916600160a060020a0383161790555b5b5b50565b815481835581811511610698576000838152602090206106989181019083016106da565b5b505050565b815481835581811511610698576000838152602090206106989181019083016106da565b5b505050565b60408051602081019091526000815290565b61062591905b808211156106f457600081556001016106e0565b5090565b905600a165627a7a7230582021aadf834398ddc9f252eb0b3ab6ddea131aa7bca5d904d429a49ab48bcbe2910029", + "unlinked_binary": "0x60606040525b60008054600160a060020a03191633600160a060020a03161790555b5b610719806100316000396000f300606060405236156100725763ffffffff60e060020a60003504166315dacbea811461007457806342f1181e146100b3578063494503d4146100e357806370712939146101125780638da5cb5b14610142578063b91816111461016e578063d39de6e91461019e578063f2fde38b14610209575bfe5b341561007c57fe5b61009f600160a060020a0360043581169060243581169060443516606435610227565b604080519115158252519081900360200190f35b34156100bb57fe5b61009f600160a060020a03600435166102d2565b604080519115158252519081900360200190f35b34156100eb57fe5b6100f66004356103bb565b60408051600160a060020a039092168252519081900360200190f35b341561011a57fe5b61009f600160a060020a03600435166103ed565b604080519115158252519081900360200190f35b341561014a57fe5b6100f661058d565b60408051600160a060020a039092168252519081900360200190f35b341561017657fe5b61009f600160a060020a036004351661059c565b604080519115158252519081900360200190f35b34156101a657fe5b6101ae6105b1565b60408051602080825283518183015283519192839290830191858101910280838382156101f6575b8051825260208311156101f657601f1990920191602091820191016101d6565b5050509050019250505060405180910390f35b341561021157fe5b610225600160a060020a036004351661061a565b005b600160a060020a03331660009081526001602052604081205460ff16151561024f5760006000fd5b6040805160006020918201819052825160e060020a6323b872dd028152600160a060020a0388811660048301528781166024830152604482018790529351938916936323b872dd9360648084019491938390030190829087803b15156102b157fe5b6102c65a03f115156102bf57fe5b5050604051519150505b5b949350505050565b6000805433600160a060020a039081169116146102ef5760006000fd5b600160a060020a038216600090815260016020526040902054829060ff16156103185760006000fd5b600160a060020a0383166000908152600160208190526040909120805460ff191682179055600280549091810161034f8382610666565b916000526020600020900160005b81546101009190910a600160a060020a0381810219909216878316918202179092556040513390911692507f94bb87f4c15c4587ff559a7584006fa01ddf9299359be6b512b94527aa961aca90600090a3600191505b5b505b919050565b60028054829081106103c957fe5b906000526020600020900160005b915054906101000a9004600160a060020a031681565b60008054819033600160a060020a0390811691161461040c5760006000fd5b600160a060020a038316600090815260016020526040902054839060ff1615156104365760006000fd5b600160a060020a0384166000908152600160205260408120805460ff1916905591505b6002548210156105465783600160a060020a031660028381548110151561047c57fe5b906000526020600020900160005b9054906101000a9004600160a060020a0316600160a060020a0316141561053a576002805460001981019081106104bd57fe5b906000526020600020900160005b9054906101000a9004600160a060020a03166002838154811015156104ec57fe5b906000526020600020900160005b6101000a815481600160a060020a030219169083600160a060020a0316021790555060016002818180549050039150816105349190610666565b50610546565b5b600190910190610459565b604051600160a060020a0333811691908616907ff5b347a1e40749dd050f5f07fbdbeb7e3efa9756903044dd29401fd1d4bb4a1c90600090a3600192505b5b505b50919050565b600054600160a060020a031681565b60016020526000908152604090205460ff1681565b6105b96106ba565b600280548060200260200160405190810160405280929190818152602001828054801561060f57602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116105f1575b505050505090505b90565b60005433600160a060020a039081169116146106365760006000fd5b600160a060020a038116156106615760008054600160a060020a031916600160a060020a0383161790555b5b5b50565b81548183558181151161068a5760008381526020902061068a9181019083016106cc565b5b505050565b81548183558181151161068a5760008381526020902061068a9181019083016106cc565b5b505050565b60408051602081019091526000815290565b61061791905b808211156106e657600081556001016106d2565b5090565b905600a165627a7a723058203818c069c958ca0b51c3a7e444c33e0384d08b329fdda95d546bc2814f9d45580029", "networks": { "42": { "links": {}, @@ -258,10 +258,10 @@ "type": "event" } }, - "updated_at": 1498588231340, + "updated_at": 1499462280313, "address": "0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c" } }, "schema_version": "0.0.5", - "updated_at": 1498588231340 + "updated_at": 1499462280313 }
\ No newline at end of file diff --git a/src/artifacts/Token.json b/src/artifacts/Token.json index f44de34b8..cfb56586e 100644 --- a/src/artifacts/Token.json +++ b/src/artifacts/Token.json @@ -169,8 +169,8 @@ "type": "event" } ], - "unlinked_binary": "0x6060604052341561000c57fe5b5b6101e08061001c6000396000f3006060604052361561005c5763ffffffff60e060020a600035041663095ea7b3811461005e57806318160ddd1461009157806323b872dd146100b357806370a08231146100ec578063a9059cbb1461005e578063dd62ed3e1461014d575bfe5b341561006657fe5b61007d600160a060020a0360043516602435610181565b604080519115158252519081900360200190f35b341561009957fe5b6100a161018a565b60408051918252519081900360200190f35b34156100bb57fe5b61007d600160a060020a0360043581169060243516604435610190565b604080519115158252519081900360200190f35b34156100f457fe5b6100a1600160a060020a036004351661019a565b60408051918252519081900360200190f35b341561006657fe5b61007d600160a060020a0360043516602435610181565b604080519115158252519081900360200190f35b341561015557fe5b6100a1600160a060020a0360043581169060243516610181565b60408051918252519081900360200190f35b60005b92915050565b60005b90565b60005b9392505050565b60005b919050565b60005b92915050565b60005b929150505600a165627a7a723058203c197cc1ab179269cf5d1ae1606a41063b723c0e550a2805382c9c4600ddc75e0029", + "unlinked_binary": "0x6060604052341561000c57fe5b5b6101e08061001c6000396000f3006060604052361561005c5763ffffffff60e060020a600035041663095ea7b3811461005e57806318160ddd1461009157806323b872dd146100b357806370a08231146100ec578063a9059cbb1461005e578063dd62ed3e1461014d575bfe5b341561006657fe5b61007d600160a060020a0360043516602435610181565b604080519115158252519081900360200190f35b341561009957fe5b6100a161018a565b60408051918252519081900360200190f35b34156100bb57fe5b61007d600160a060020a0360043581169060243516604435610190565b604080519115158252519081900360200190f35b34156100f457fe5b6100a1600160a060020a036004351661019a565b60408051918252519081900360200190f35b341561006657fe5b61007d600160a060020a0360043516602435610181565b604080519115158252519081900360200190f35b341561015557fe5b6100a1600160a060020a0360043581169060243516610181565b60408051918252519081900360200190f35b60005b92915050565b60005b90565b60005b9392505050565b60005b919050565b60005b92915050565b60005b929150505600a165627a7a72305820fdbf6d7c43240d51b292524e87c255de3b211ebfa0c7d4b726d8dc0da2a05e180029", "networks": {}, "schema_version": "0.0.5", - "updated_at": 1498588228068 + "updated_at": 1499462278465 }
\ No newline at end of file diff --git a/src/artifacts/TokenRegistry.json b/src/artifacts/TokenRegistry.json index 6d8bbfd64..7eb24c3d9 100644 --- a/src/artifacts/TokenRegistry.json +++ b/src/artifacts/TokenRegistry.json @@ -592,7 +592,7 @@ "type": "event" } ], - "unlinked_binary": "0x60606040525b60008054600160a060020a03191633600160a060020a03161790555b5b612635806100316000396000f300606060405236156100d55763ffffffff60e060020a6000350416632fbfeba981146100d757806334ed557f146101495780633550b6d91461016a5780635fa7b584146101dc5780637abccac9146101fa5780638da5cb5b146103ab57806391914b30146103d75780639a84d0c414610439578063c370c86d14610525578063e486033914610587578063e5df8b841461074d578063e73fc0c31461077c578063eaabd05e14610967578063ee8c24b814610988578063efa74f1f146109f3578063f036417f14610bde578063f2fde38b14610c40575bfe5b34156100df57fe5b61012d600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843750949650610c5e95505050505050565b60408051600160a060020a039092168252519081900360200190f35b341561015157fe5b610168600160a060020a0360043516602435610cd1565b005b341561017257fe5b61012d600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843750949650610d8395505050505050565b60408051600160a060020a039092168252519081900360200190f35b34156101e457fe5b610168600160a060020a0360043516610df6565b005b341561020257fe5b610216600160a060020a03600435166112b3565b60408051600160a060020a038916815260ff8516608082015260a0810184905260c0810183905260e060208083018281528a5192840192909252895192939192918401916060850191610100860191908c01908083838215610293575b80518252602083111561029357601f199092019160209182019101610273565b505050905090810190601f1680156102bf5780820380516001836020036101000a031916815260200191505b5084810383528951815289516020918201918b019080838382156102fe575b8051825260208311156102fe57601f1990920191602091820191016102de565b505050905090810190601f16801561032a5780820380516001836020036101000a031916815260200191505b5084810382528851815288516020918201918a01908083838215610369575b80518252602083111561036957601f199092019160209182019101610349565b505050905090810190601f1680156103955780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b34156103b357fe5b61012d611529565b60408051600160a060020a039092168252519081900360200190f35b34156103df57fe5b60408051602060046024803582810135601f8101859004850286018501909652858552610168958335600160a060020a0316959394604494939290920191819084018382808284375094965061153895505050505050565b005b341561044157fe5b60408051602060046024803582810135601f8101859004850286018501909652858552610168958335600160a060020a0316959394604494939290920191819084018382808284375050604080516020601f89358b0180359182018390048302840183019094528083529799988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979998810197919650918201945092508291508401838280828437509496505060ff85351694602081013594506040013592506116df915050565b005b341561052d57fe5b60408051602060046024803582810135601f8101859004850286018501909652858552610168958335600160a060020a03169593946044949392909201918190840183828082843750949650611b3a95505050505050565b005b341561058f57fe5b6105a3600160a060020a0360043516611de0565b60408051600160a060020a038916815260ff8516608082015260a0810184905260c0810183905260e06020820181815289546002610100600183161581026000190190921604928401839052929390929084019160608501918501908b90801561064e5780601f106106235761010080835404028352916020019161064e565b820191906000526020600020905b81548152906001019060200180831161063157829003601f168201915b505084810383528954600260001961010060018416150201909116048082526020909101908a9080156106c25780601f10610697576101008083540402835291602001916106c2565b820191906000526020600020905b8154815290600101906020018083116106a557829003601f168201915b50508481038252885460026000196101006001841615020190911604808252602090910190899080156107365780601f1061070b57610100808354040283529160200191610736565b820191906000526020600020905b81548152906001019060200180831161071957829003601f168201915b50509a505050505050505050505060405180910390f35b341561075557fe5b61012d600435611e24565b60408051600160a060020a039092168252519081900360200190f35b341561078457fe5b610216600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843750949650611e5695505050505050565b60408051600160a060020a038916815260ff8516608082015260a0810184905260c0810183905260e060208083018281528a5192840192909252895192939192918401916060850191610100860191908c01908083838215610293575b80518252602083111561029357601f199092019160209182019101610273565b505050905090810190601f1680156102bf5780820380516001836020036101000a031916815260200191505b5084810383528951815289516020918201918b019080838382156102fe575b8051825260208311156102fe57601f1990920191602091820191016102de565b505050905090810190601f16801561032a5780820380516001836020036101000a031916815260200191505b5084810382528851815288516020918201918a01908083838215610369575b80518252602083111561036957601f199092019160209182019101610349565b505050905090810190601f1680156103955780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b341561096f57fe5b610168600160a060020a0360043516602435611f09565b005b341561099057fe5b610998611fbb565b60408051602080825283518183015283519192839290830191858101910280838382156109e0575b8051825260208311156109e057601f1990920191602091820191016109c0565b5050509050019250505060405180910390f35b34156109fb57fe5b610216600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375094965061202495505050505050565b60408051600160a060020a038916815260ff8516608082015260a0810184905260c0810183905260e060208083018281528a5192840192909252895192939192918401916060850191610100860191908c01908083838215610293575b80518252602083111561029357601f199092019160209182019101610273565b505050905090810190601f1680156102bf5780820380516001836020036101000a031916815260200191505b5084810383528951815289516020918201918b019080838382156102fe575b8051825260208311156102fe57601f1990920191602091820191016102de565b505050905090810190601f16801561032a5780820380516001836020036101000a031916815260200191505b5084810382528851815288516020918201918a01908083838215610369575b80518252602083111561036957601f199092019160209182019101610349565b505050905090810190601f1680156103955780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b3415610be657fe5b60408051602060046024803582810135601f8101859004850286018501909652858552610168958335600160a060020a031695939460449493929092019181908401838280828437509496506120d795505050505050565b005b3415610c4857fe5b610168600160a060020a036004351661237c565b005b60006003826040518082805190602001908083835b60208310610c925780518252601f199092019160209182019101610c73565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a0316925050505b919050565b6000805433600160a060020a03908116911614610cee5760006000fd5b600160a060020a0380841660009081526001602052604090205484911615610d7a57600160a060020a038416600081815260016020908152604091829020600581015483519485529184019190915282820186905290519093507fe46a8f26cfc48c12e40cf50c1063e5913b2a17da6aa396f9b008b2dfd6f273b59181900360600190a1600582018390555b5b5b505b505050565b60006002826040518082805190602001908083835b60208310610c925780518252601f199092019160209182019101610c73565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a0316925050505b919050565b60008054819033600160a060020a03908116911614610e155760006000fd5b600160a060020a0380841660009081526001602052604090205484911615610d7a57600092505b600454831015610f295783600160a060020a0316600484815481101515610e5f57fe5b906000526020600020900160005b9054906101000a9004600160a060020a0316600160a060020a03161415610f1d57600480546000198101908110610ea057fe5b906000526020600020900160005b9054906101000a9004600160a060020a0316600484815481101515610ecf57fe5b906000526020600020900160005b6101000a815481600160a060020a030219169083600160a060020a031602179055506001600481818054905003915081610f1791906123c8565b50610f29565b5b600190920191610e3c565b600160a060020a03808516600090815260016020818152604092839020805460048201546005830154600684015487519390981680845260ff9092166080840181905260a0840182905260c0840189905260e09584018681528588018054600299811615610100908102600019019091168a9004988701899052969c507fc9ec69d3b744b4ec70f035ed0a15ed7029e668bfb9f326e657878b2b38a90da29a949990988d019760038e0197939694959493918401916060850191908501908b9080156110365780601f1061100b57610100808354040283529160200191611036565b820191906000526020600020905b81548152906001019060200180831161101957829003601f168201915b505084810383528954600260001961010060018416150201909116048082526020909101908a9080156110aa5780601f1061107f576101008083540402835291602001916110aa565b820191906000526020600020905b81548152906001019060200180831161108d57829003601f168201915b505084810382528854600260001961010060018416150201909116048082526020909101908990801561111e5780601f106110f35761010080835404028352916020019161111e565b820191906000526020600020905b81548152906001019060200180831161110157829003601f168201915b50509a505050505050505050505060405180910390a160028260020160405180828054600181600116156101000203166002900480156111955780601f10611173576101008083540402835291820191611195565b820191906000526020600020905b815481529060010190602001808311611181575b5050915050908152602001604051809103902060006101000a815490600160a060020a030219169055600382600101604051808280546001816001161561010002031660029004801561121f5780601f106111fd57610100808354040283529182019161121f565b820191906000526020600020905b81548152906001019060200180831161120b575b5050928352505060408051602092819003830190208054600160a060020a0319908116909155600160a060020a03871660009081526001938490529182208054909116815591611271908301826123f2565b61127f6002830160006123f2565b61128d6003830160006123f2565b5060048101805460ff191690556000600582018190556006909101555b5b5b505b505050565b60006112bd61243a565b6112c561243a565b6112cd61243a565b6000600060006112db61244c565b600160a060020a03898116600090815260016020818152604092839020835160e0810185528154909516855280830180548551600261010096831615969096026000190190911694909404601f8101849004840285018401909552848452909385830193928301828280156113915780601f1061136657610100808354040283529160200191611391565b820191906000526020600020905b81548152906001019060200180831161137457829003601f168201915b5050509183525050600282810180546040805160206001841615610100026000190190931694909404601f810183900483028501830190915280845293810193908301828280156114235780601f106113f857610100808354040283529160200191611423565b820191906000526020600020905b81548152906001019060200180831161140657829003601f168201915b505050918352505060038201805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529382019392918301828280156114b75780601f1061148c576101008083540402835291602001916114b7565b820191906000526020600020905b81548152906001019060200180831161149a57829003601f168201915b5050509183525050600482015460ff1660208083019190915260058301546040808401919091526006909301546060928301528351908401519284015191840151608085015160a086015160c0870151939e50949c50929a509850909650909450925090505b50919395979092949650565b600054600160a060020a031681565b6000805433600160a060020a039081169116146115555760006000fd5b600160a060020a0380841660009081526001602052604090205484911615610d7a57600160a060020a03841660008181526001602081815260409283902083519485526060918501828152600382018054600295811615610100026000190116949094049286018390529096507f6b45310c970f5d74814e429bdacd69c748dcb086cd38b6ddb7c2029be609e1689489948993919291908301906080840190869080156116435780601f1061161857610100808354040283529160200191611643565b820191906000526020600020905b81548152906001019060200180831161162657829003601f168201915b505083810382528451815284516020918201918601908083838215611683575b80518252602083111561168357601f199092019160209182019101611663565b505050905090810190601f1680156116af5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a182516116d4906003840190602086019061249c565b505b5b5b505b505050565b60005433600160a060020a039081169116146116fb5760006000fd5b600160a060020a038088166000908152600160205260409020548891161515611b2d576040805160e081018252600160a060020a038a811680835260208084018c81528486018c9052606085018b905260ff8a16608086015260a0850189905260c08501889052600092835260018083529590922084518154600160a060020a0319169416939093178355905180519394929361179f93850192919091019061249c565b50604082015180516117bb91600284019160209091019061249c565b50606082015180516117d791600384019160209091019061249c565b5060808201516004828101805460ff191660ff9093169290921790915560a0830151600583015560c09092015160069091015580546001810161181a83826123c8565b916000526020600020900160005b8a909190916101000a815481600160a060020a030219169083600160a060020a0316021790555050876002876040518082805190602001908083835b602083106118835780518252601f199092019160209182019101611864565b51815160209384036101000a600019018019909216911617905292019485525060405193849003810184208054600160a060020a031916600160a060020a039690961695909517909455505088518a926003928b9290918291908401908083835b602083106119035780518252601f1990920191602091820191016118e4565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a815481600160a060020a030219169083600160a060020a031602179055507f469f18a43061267ac6162ca1cec0c14a425189c7a19f52d6dc04419f3c12bb24888888888888886040518088600160a060020a0316600160a060020a031681526020018060200180602001806020018760ff1660ff1681526020018660001916600019168152602001856000191660001916815260200184810384528a818151815260200191508051906020019080838360008314611a15575b805182526020831115611a1557601f1990920191602091820191016119f5565b505050905090810190601f168015611a415780820380516001836020036101000a031916815260200191505b5084810383528951815289516020918201918b01908083838215611a80575b805182526020831115611a8057601f199092019160209182019101611a60565b505050905090810190601f168015611aac5780820380516001836020036101000a031916815260200191505b5084810382528851815288516020918201918a01908083838215611aeb575b805182526020831115611aeb57601f199092019160209182019101611acb565b505050905090810190601f168015611b175780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390a15b5b5b505b50505050505050565b6000805433600160a060020a03908116911614611b575760006000fd5b600160a060020a0380841660009081526001602052604090205484911615610d7a57600160a060020a038416600081815260016020818152604092839020835194855260609185018281528184018054600295811615610100026000190116949094049286018390529096507f4a6dbfc867b179991dec22ff19960f0a94d8d9d891fc556f547764670340e8ae948994899391929190830190608084019086908015611c445780601f10611c1957610100808354040283529160200191611c44565b820191906000526020600020905b815481529060010190602001808311611c2757829003601f168201915b505083810382528451815284516020918201918601908083838215611c84575b805182526020831115611c8457601f199092019160209182019101611c64565b505050905090810190601f168015611cb05780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a16003826001016040518082805460018160011615610100020316600290048015611d215780601f10611cff576101008083540402835291820191611d21565b820191906000526020600020905b815481529060010190602001808311611d0d575b5050928352505060405190819003602090810182208054600160a060020a031916905584518692600392879282918401908083835b60208310611d755780518252601f199092019160209182019101611d56565b51815160209384036101000a60001901801990921691161790529201948552506040519384900381019093208054600160a060020a031916600160a060020a0395909516949094179093555084516116d49250600185019186019061249c565b505b5b5b505b505050565b60016020819052600091825260409091208054600482015460058301546006840154600160a060020a0390931694840193600281019360039091019260ff16919087565b6004805482908110611e3257fe5b906000526020600020900160005b915054906101000a9004600160a060020a031681565b6000611e6061243a565b611e6861243a565b611e7061243a565b60006000600060006003896040518082805190602001908083835b60208310611eaa5780518252601f199092019160209182019101611e8b565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a03169250611eee91508290506112b3565b97509750975097509750975097505b50919395979092949650565b6000805433600160a060020a03908116911614611f265760006000fd5b600160a060020a0380841660009081526001602052604090205484911615610d7a57600160a060020a038416600081815260016020908152604091829020600681015483519485529184019190915282820186905290519093507fa9fd216856477e73d11c1a9140fa3d425fce2e10a5475a996440b31c2e8f1ea49181900360600190a1600682018390555b5b5b505b505050565b611fc361243a565b600480548060200260200160405190810160405280929190818152602001828054801561201957602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611ffb575b505050505090505b90565b600061202e61243a565b61203661243a565b61203e61243a565b60006000600060006002896040518082805190602001908083835b60208310611eaa5780518252601f199092019160209182019101611e8b565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a03169250611eee91508290506112b3565b97509750975097509750975097505b50919395979092949650565b6000805433600160a060020a039081169116146120f45760006000fd5b600160a060020a0380841660009081526001602052604090205484911615610d7a57600160a060020a0384166000818152600160208181526040928390208351948552606091850182815260028083018054958616156101000260001901909516049286018390529096507f53d878a6530e56c9bc96548fa0a8cae4f1d1f49c86b0e934c086b992ebb6998f9489948993919291908301906080840190869080156121e05780601f106121b5576101008083540402835291602001916121e0565b820191906000526020600020905b8154815290600101906020018083116121c357829003601f168201915b505083810382528451815284516020918201918601908083838215612220575b80518252602083111561222057601f199092019160209182019101612200565b505050905090810190601f16801561224c5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a160028260020160405180828054600181600116156101000203166002900480156122bd5780601f1061229b5761010080835404028352918201916122bd565b820191906000526020600020905b8154815290600101906020018083116122a9575b5050928352505060405190819003602090810182208054600160a060020a031916905584518692600292879282918401908083835b602083106123115780518252601f1990920191602091820191016122f2565b51815160209384036101000a60001901801990921691161790529201948552506040519384900381019093208054600160a060020a031916600160a060020a0395909516949094179093555084516116d49250600285019186019061249c565b505b5b5b505b505050565b60005433600160a060020a039081169116146123985760006000fd5b600160a060020a038116156123c35760008054600160a060020a031916600160a060020a0383161790555b5b5b50565b815481835581811511610d7e57600083815260209020610d7e9181019083016125d6565b5b505050565b50805460018160011615610100020316600290046000825580601f1061241857506123c3565b601f0160209004906000526020600020908101906123c391906125d6565b5b50565b60408051602081019091526000815290565b6040805160e08101909152600081526020810161246761243a565b815260200161247461243a565b815260200161248161243a565b81526000602082018190526040820181905260609091015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106124dd57805160ff191683800117855561250a565b8280016001018555821561250a579182015b8281111561250a5782518255916020019190600101906124ef565b5b506125179291506125d6565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106124dd57805160ff191683800117855561250a565b8280016001018555821561250a579182015b8281111561250a5782518255916020019190600101906124ef565b5b506125179291506125d6565b5090565b815481835581811511610d7e57600083815260209020610d7e9181019083016125d6565b5b505050565b60408051602081019091526000815290565b61202191905b8082111561251757600081556001016125dc565b5090565b90565b604080516020810190915260008152905600a165627a7a72305820694ecc468cf651cee830ac5107745dac20b5be83e2585ca089db4ca333108d740029", + "unlinked_binary": "0x60606040525b60008054600160a060020a03191633600160a060020a03161790555b5b612635806100316000396000f300606060405236156100d55763ffffffff60e060020a6000350416632fbfeba981146100d757806334ed557f146101495780633550b6d91461016a5780635fa7b584146101dc5780637abccac9146101fa5780638da5cb5b146103ab57806391914b30146103d75780639a84d0c414610439578063c370c86d14610525578063e486033914610587578063e5df8b841461074d578063e73fc0c31461077c578063eaabd05e14610967578063ee8c24b814610988578063efa74f1f146109f3578063f036417f14610bde578063f2fde38b14610c40575bfe5b34156100df57fe5b61012d600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843750949650610c5e95505050505050565b60408051600160a060020a039092168252519081900360200190f35b341561015157fe5b610168600160a060020a0360043516602435610cd1565b005b341561017257fe5b61012d600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843750949650610d8395505050505050565b60408051600160a060020a039092168252519081900360200190f35b34156101e457fe5b610168600160a060020a0360043516610df6565b005b341561020257fe5b610216600160a060020a03600435166112b3565b60408051600160a060020a038916815260ff8516608082015260a0810184905260c0810183905260e060208083018281528a5192840192909252895192939192918401916060850191610100860191908c01908083838215610293575b80518252602083111561029357601f199092019160209182019101610273565b505050905090810190601f1680156102bf5780820380516001836020036101000a031916815260200191505b5084810383528951815289516020918201918b019080838382156102fe575b8051825260208311156102fe57601f1990920191602091820191016102de565b505050905090810190601f16801561032a5780820380516001836020036101000a031916815260200191505b5084810382528851815288516020918201918a01908083838215610369575b80518252602083111561036957601f199092019160209182019101610349565b505050905090810190601f1680156103955780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b34156103b357fe5b61012d611529565b60408051600160a060020a039092168252519081900360200190f35b34156103df57fe5b60408051602060046024803582810135601f8101859004850286018501909652858552610168958335600160a060020a0316959394604494939290920191819084018382808284375094965061153895505050505050565b005b341561044157fe5b60408051602060046024803582810135601f8101859004850286018501909652858552610168958335600160a060020a0316959394604494939290920191819084018382808284375050604080516020601f89358b0180359182018390048302840183019094528083529799988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979998810197919650918201945092508291508401838280828437509496505060ff85351694602081013594506040013592506116df915050565b005b341561052d57fe5b60408051602060046024803582810135601f8101859004850286018501909652858552610168958335600160a060020a03169593946044949392909201918190840183828082843750949650611b3a95505050505050565b005b341561058f57fe5b6105a3600160a060020a0360043516611de0565b60408051600160a060020a038916815260ff8516608082015260a0810184905260c0810183905260e06020820181815289546002610100600183161581026000190190921604928401839052929390929084019160608501918501908b90801561064e5780601f106106235761010080835404028352916020019161064e565b820191906000526020600020905b81548152906001019060200180831161063157829003601f168201915b505084810383528954600260001961010060018416150201909116048082526020909101908a9080156106c25780601f10610697576101008083540402835291602001916106c2565b820191906000526020600020905b8154815290600101906020018083116106a557829003601f168201915b50508481038252885460026000196101006001841615020190911604808252602090910190899080156107365780601f1061070b57610100808354040283529160200191610736565b820191906000526020600020905b81548152906001019060200180831161071957829003601f168201915b50509a505050505050505050505060405180910390f35b341561075557fe5b61012d600435611e24565b60408051600160a060020a039092168252519081900360200190f35b341561078457fe5b610216600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843750949650611e5695505050505050565b60408051600160a060020a038916815260ff8516608082015260a0810184905260c0810183905260e060208083018281528a5192840192909252895192939192918401916060850191610100860191908c01908083838215610293575b80518252602083111561029357601f199092019160209182019101610273565b505050905090810190601f1680156102bf5780820380516001836020036101000a031916815260200191505b5084810383528951815289516020918201918b019080838382156102fe575b8051825260208311156102fe57601f1990920191602091820191016102de565b505050905090810190601f16801561032a5780820380516001836020036101000a031916815260200191505b5084810382528851815288516020918201918a01908083838215610369575b80518252602083111561036957601f199092019160209182019101610349565b505050905090810190601f1680156103955780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b341561096f57fe5b610168600160a060020a0360043516602435611f09565b005b341561099057fe5b610998611fbb565b60408051602080825283518183015283519192839290830191858101910280838382156109e0575b8051825260208311156109e057601f1990920191602091820191016109c0565b5050509050019250505060405180910390f35b34156109fb57fe5b610216600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375094965061202495505050505050565b60408051600160a060020a038916815260ff8516608082015260a0810184905260c0810183905260e060208083018281528a5192840192909252895192939192918401916060850191610100860191908c01908083838215610293575b80518252602083111561029357601f199092019160209182019101610273565b505050905090810190601f1680156102bf5780820380516001836020036101000a031916815260200191505b5084810383528951815289516020918201918b019080838382156102fe575b8051825260208311156102fe57601f1990920191602091820191016102de565b505050905090810190601f16801561032a5780820380516001836020036101000a031916815260200191505b5084810382528851815288516020918201918a01908083838215610369575b80518252602083111561036957601f199092019160209182019101610349565b505050905090810190601f1680156103955780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b3415610be657fe5b60408051602060046024803582810135601f8101859004850286018501909652858552610168958335600160a060020a031695939460449493929092019181908401838280828437509496506120d795505050505050565b005b3415610c4857fe5b610168600160a060020a036004351661237c565b005b60006003826040518082805190602001908083835b60208310610c925780518252601f199092019160209182019101610c73565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a0316925050505b919050565b6000805433600160a060020a03908116911614610cee5760006000fd5b600160a060020a0380841660009081526001602052604090205484911615610d7a57600160a060020a038416600081815260016020908152604091829020600581015483519485529184019190915282820186905290519093507fe46a8f26cfc48c12e40cf50c1063e5913b2a17da6aa396f9b008b2dfd6f273b59181900360600190a1600582018390555b5b5b505b505050565b60006002826040518082805190602001908083835b60208310610c925780518252601f199092019160209182019101610c73565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a0316925050505b919050565b60008054819033600160a060020a03908116911614610e155760006000fd5b600160a060020a0380841660009081526001602052604090205484911615610d7a57600092505b600454831015610f295783600160a060020a0316600484815481101515610e5f57fe5b906000526020600020900160005b9054906101000a9004600160a060020a0316600160a060020a03161415610f1d57600480546000198101908110610ea057fe5b906000526020600020900160005b9054906101000a9004600160a060020a0316600484815481101515610ecf57fe5b906000526020600020900160005b6101000a815481600160a060020a030219169083600160a060020a031602179055506001600481818054905003915081610f1791906123c8565b50610f29565b5b600190920191610e3c565b600160a060020a03808516600090815260016020818152604092839020805460048201546005830154600684015487519390981680845260ff9092166080840181905260a0840182905260c0840189905260e09584018681528588018054600299811615610100908102600019019091168a9004988701899052969c507fc9ec69d3b744b4ec70f035ed0a15ed7029e668bfb9f326e657878b2b38a90da29a949990988d019760038e0197939694959493918401916060850191908501908b9080156110365780601f1061100b57610100808354040283529160200191611036565b820191906000526020600020905b81548152906001019060200180831161101957829003601f168201915b505084810383528954600260001961010060018416150201909116048082526020909101908a9080156110aa5780601f1061107f576101008083540402835291602001916110aa565b820191906000526020600020905b81548152906001019060200180831161108d57829003601f168201915b505084810382528854600260001961010060018416150201909116048082526020909101908990801561111e5780601f106110f35761010080835404028352916020019161111e565b820191906000526020600020905b81548152906001019060200180831161110157829003601f168201915b50509a505050505050505050505060405180910390a160028260020160405180828054600181600116156101000203166002900480156111955780601f10611173576101008083540402835291820191611195565b820191906000526020600020905b815481529060010190602001808311611181575b5050915050908152602001604051809103902060006101000a815490600160a060020a030219169055600382600101604051808280546001816001161561010002031660029004801561121f5780601f106111fd57610100808354040283529182019161121f565b820191906000526020600020905b81548152906001019060200180831161120b575b5050928352505060408051602092819003830190208054600160a060020a0319908116909155600160a060020a03871660009081526001938490529182208054909116815591611271908301826123f2565b61127f6002830160006123f2565b61128d6003830160006123f2565b5060048101805460ff191690556000600582018190556006909101555b5b5b505b505050565b60006112bd61243a565b6112c561243a565b6112cd61243a565b6000600060006112db61244c565b600160a060020a03898116600090815260016020818152604092839020835160e0810185528154909516855280830180548551600261010096831615969096026000190190911694909404601f8101849004840285018401909552848452909385830193928301828280156113915780601f1061136657610100808354040283529160200191611391565b820191906000526020600020905b81548152906001019060200180831161137457829003601f168201915b5050509183525050600282810180546040805160206001841615610100026000190190931694909404601f810183900483028501830190915280845293810193908301828280156114235780601f106113f857610100808354040283529160200191611423565b820191906000526020600020905b81548152906001019060200180831161140657829003601f168201915b505050918352505060038201805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529382019392918301828280156114b75780601f1061148c576101008083540402835291602001916114b7565b820191906000526020600020905b81548152906001019060200180831161149a57829003601f168201915b5050509183525050600482015460ff1660208083019190915260058301546040808401919091526006909301546060928301528351908401519284015191840151608085015160a086015160c0870151939e50949c50929a509850909650909450925090505b50919395979092949650565b600054600160a060020a031681565b6000805433600160a060020a039081169116146115555760006000fd5b600160a060020a0380841660009081526001602052604090205484911615610d7a57600160a060020a03841660008181526001602081815260409283902083519485526060918501828152600382018054600295811615610100026000190116949094049286018390529096507f6b45310c970f5d74814e429bdacd69c748dcb086cd38b6ddb7c2029be609e1689489948993919291908301906080840190869080156116435780601f1061161857610100808354040283529160200191611643565b820191906000526020600020905b81548152906001019060200180831161162657829003601f168201915b505083810382528451815284516020918201918601908083838215611683575b80518252602083111561168357601f199092019160209182019101611663565b505050905090810190601f1680156116af5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a182516116d4906003840190602086019061249c565b505b5b5b505b505050565b60005433600160a060020a039081169116146116fb5760006000fd5b600160a060020a038088166000908152600160205260409020548891161515611b2d576040805160e081018252600160a060020a038a811680835260208084018c81528486018c9052606085018b905260ff8a16608086015260a0850189905260c08501889052600092835260018083529590922084518154600160a060020a0319169416939093178355905180519394929361179f93850192919091019061249c565b50604082015180516117bb91600284019160209091019061249c565b50606082015180516117d791600384019160209091019061249c565b5060808201516004828101805460ff191660ff9093169290921790915560a0830151600583015560c09092015160069091015580546001810161181a83826123c8565b916000526020600020900160005b8a909190916101000a815481600160a060020a030219169083600160a060020a0316021790555050876002876040518082805190602001908083835b602083106118835780518252601f199092019160209182019101611864565b51815160209384036101000a600019018019909216911617905292019485525060405193849003810184208054600160a060020a031916600160a060020a039690961695909517909455505088518a926003928b9290918291908401908083835b602083106119035780518252601f1990920191602091820191016118e4565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a815481600160a060020a030219169083600160a060020a031602179055507f469f18a43061267ac6162ca1cec0c14a425189c7a19f52d6dc04419f3c12bb24888888888888886040518088600160a060020a0316600160a060020a031681526020018060200180602001806020018760ff1660ff1681526020018660001916600019168152602001856000191660001916815260200184810384528a818151815260200191508051906020019080838360008314611a15575b805182526020831115611a1557601f1990920191602091820191016119f5565b505050905090810190601f168015611a415780820380516001836020036101000a031916815260200191505b5084810383528951815289516020918201918b01908083838215611a80575b805182526020831115611a8057601f199092019160209182019101611a60565b505050905090810190601f168015611aac5780820380516001836020036101000a031916815260200191505b5084810382528851815288516020918201918a01908083838215611aeb575b805182526020831115611aeb57601f199092019160209182019101611acb565b505050905090810190601f168015611b175780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390a15b5b5b505b50505050505050565b6000805433600160a060020a03908116911614611b575760006000fd5b600160a060020a0380841660009081526001602052604090205484911615610d7a57600160a060020a038416600081815260016020818152604092839020835194855260609185018281528184018054600295811615610100026000190116949094049286018390529096507f4a6dbfc867b179991dec22ff19960f0a94d8d9d891fc556f547764670340e8ae948994899391929190830190608084019086908015611c445780601f10611c1957610100808354040283529160200191611c44565b820191906000526020600020905b815481529060010190602001808311611c2757829003601f168201915b505083810382528451815284516020918201918601908083838215611c84575b805182526020831115611c8457601f199092019160209182019101611c64565b505050905090810190601f168015611cb05780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a16003826001016040518082805460018160011615610100020316600290048015611d215780601f10611cff576101008083540402835291820191611d21565b820191906000526020600020905b815481529060010190602001808311611d0d575b5050928352505060405190819003602090810182208054600160a060020a031916905584518692600392879282918401908083835b60208310611d755780518252601f199092019160209182019101611d56565b51815160209384036101000a60001901801990921691161790529201948552506040519384900381019093208054600160a060020a031916600160a060020a0395909516949094179093555084516116d49250600185019186019061249c565b505b5b5b505b505050565b60016020819052600091825260409091208054600482015460058301546006840154600160a060020a0390931694840193600281019360039091019260ff16919087565b6004805482908110611e3257fe5b906000526020600020900160005b915054906101000a9004600160a060020a031681565b6000611e6061243a565b611e6861243a565b611e7061243a565b60006000600060006003896040518082805190602001908083835b60208310611eaa5780518252601f199092019160209182019101611e8b565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a03169250611eee91508290506112b3565b97509750975097509750975097505b50919395979092949650565b6000805433600160a060020a03908116911614611f265760006000fd5b600160a060020a0380841660009081526001602052604090205484911615610d7a57600160a060020a038416600081815260016020908152604091829020600681015483519485529184019190915282820186905290519093507fa9fd216856477e73d11c1a9140fa3d425fce2e10a5475a996440b31c2e8f1ea49181900360600190a1600682018390555b5b5b505b505050565b611fc361243a565b600480548060200260200160405190810160405280929190818152602001828054801561201957602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611ffb575b505050505090505b90565b600061202e61243a565b61203661243a565b61203e61243a565b60006000600060006002896040518082805190602001908083835b60208310611eaa5780518252601f199092019160209182019101611e8b565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a03169250611eee91508290506112b3565b97509750975097509750975097505b50919395979092949650565b6000805433600160a060020a039081169116146120f45760006000fd5b600160a060020a0380841660009081526001602052604090205484911615610d7a57600160a060020a0384166000818152600160208181526040928390208351948552606091850182815260028083018054958616156101000260001901909516049286018390529096507f53d878a6530e56c9bc96548fa0a8cae4f1d1f49c86b0e934c086b992ebb6998f9489948993919291908301906080840190869080156121e05780601f106121b5576101008083540402835291602001916121e0565b820191906000526020600020905b8154815290600101906020018083116121c357829003601f168201915b505083810382528451815284516020918201918601908083838215612220575b80518252602083111561222057601f199092019160209182019101612200565b505050905090810190601f16801561224c5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a160028260020160405180828054600181600116156101000203166002900480156122bd5780601f1061229b5761010080835404028352918201916122bd565b820191906000526020600020905b8154815290600101906020018083116122a9575b5050928352505060405190819003602090810182208054600160a060020a031916905584518692600292879282918401908083835b602083106123115780518252601f1990920191602091820191016122f2565b51815160209384036101000a60001901801990921691161790529201948552506040519384900381019093208054600160a060020a031916600160a060020a0395909516949094179093555084516116d49250600285019186019061249c565b505b5b5b505b505050565b60005433600160a060020a039081169116146123985760006000fd5b600160a060020a038116156123c35760008054600160a060020a031916600160a060020a0383161790555b5b5b50565b815481835581811511610d7e57600083815260209020610d7e9181019083016125d6565b5b505050565b50805460018160011615610100020316600290046000825580601f1061241857506123c3565b601f0160209004906000526020600020908101906123c391906125d6565b5b50565b60408051602081019091526000815290565b6040805160e08101909152600081526020810161246761243a565b815260200161247461243a565b815260200161248161243a565b81526000602082018190526040820181905260609091015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106124dd57805160ff191683800117855561250a565b8280016001018555821561250a579182015b8281111561250a5782518255916020019190600101906124ef565b5b506125179291506125d6565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106124dd57805160ff191683800117855561250a565b8280016001018555821561250a579182015b8281111561250a5782518255916020019190600101906124ef565b5b506125179291506125d6565b5090565b815481835581811511610d7e57600083815260209020610d7e9181019083016125d6565b5b505050565b60408051602081019091526000815290565b61202191905b8082111561251757600081556001016125dc565b5090565b90565b604080516020810190915260008152905600a165627a7a72305820bbbad662c2b9aa3f6280c2c40945a994a50d265b2802dffc2fcde186403c40200029", "networks": { "42": { "links": {}, @@ -993,10 +993,10 @@ "type": "event" } }, - "updated_at": 1498588231341, + "updated_at": 1499462280314, "address": "0x0b1ba0af832d7c05fd64161e0db78e85978e8082" } }, "schema_version": "0.0.5", - "updated_at": 1498588231341 + "updated_at": 1499462280314 }
\ No newline at end of file diff --git a/src/artifacts/exchange/Exchange_v1.json b/src/artifacts/exchange/Exchange_v1.json index 4b7321970..a9481d13f 100644 --- a/src/artifacts/exchange/Exchange_v1.json +++ b/src/artifacts/exchange/Exchange_v1.json @@ -13,14 +13,14 @@ "type": "uint256[6]" }, { - "name": "cancelValueT", + "name": "canceltakerTokenAmount", "type": "uint256" } ], - "name": "cancel", + "name": "cancelOrder", "outputs": [ { - "name": "cancelledValueT", + "name": "cancelledTakerTokenAmount", "type": "uint256" } ], @@ -93,11 +93,11 @@ "constant": true, "inputs": [ { - "name": "value", + "name": "numerator", "type": "uint256" }, { - "name": "fillValue", + "name": "denominator", "type": "uint256" }, { @@ -105,7 +105,7 @@ "type": "uint256" } ], - "name": "getPartialValue", + "name": "getPartialAmount", "outputs": [ { "name": "partialValue", @@ -127,11 +127,11 @@ "type": "uint256[6][]" }, { - "name": "cancelValuesT", + "name": "cancelTakerTokenAmounts", "type": "uint256[]" } ], - "name": "batchCancel", + "name": "batchCancelOrders", "outputs": [ { "name": "success", @@ -153,11 +153,11 @@ "type": "uint256[6][]" }, { - "name": "fillValueT", + "name": "fillTakerTokenAmount", "type": "uint256" }, { - "name": "shouldCheckTransfer", + "name": "shouldThrowOnInsufficientBalanceOrAllowance", "type": "bool" }, { @@ -173,32 +173,10 @@ "type": "bytes32[]" } ], - "name": "fillUpTo", - "outputs": [ - { - "name": "filledValueT", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "a", - "type": "uint256" - }, - { - "name": "b", - "type": "uint256" - } - ], - "name": "min", + "name": "fillOrdersUpTo", "outputs": [ { - "name": "min", + "name": "filledTakerTokenAmount", "type": "uint256" } ], @@ -251,11 +229,11 @@ "type": "uint256[6]" }, { - "name": "fillValueT", + "name": "fillTakerTokenAmount", "type": "uint256" }, { - "name": "shouldCheckTransfer", + "name": "shouldThrowOnInsufficientBalanceOrAllowance", "type": "bool" }, { @@ -271,10 +249,10 @@ "type": "bytes32" } ], - "name": "fill", + "name": "fillOrder", "outputs": [ { - "name": "filledValueT", + "name": "filledTakerTokenAmount", "type": "uint256" } ], @@ -293,11 +271,11 @@ "type": "uint256[6][]" }, { - "name": "fillValuesT", + "name": "fillTakerTokenAmounts", "type": "uint256[]" }, { - "name": "shouldCheckTransfer", + "name": "shouldThrowOnInsufficientBalanceOrAllowance", "type": "bool" }, { @@ -313,7 +291,7 @@ "type": "bytes32[]" } ], - "name": "batchFill", + "name": "batchFillOrders", "outputs": [ { "name": "success", @@ -335,7 +313,7 @@ "type": "uint256[6][]" }, { - "name": "fillValuesT", + "name": "fillTakerTokenAmounts", "type": "uint256[]" }, { @@ -351,7 +329,7 @@ "type": "bytes32[]" } ], - "name": "batchFillOrKill", + "name": "batchFillOrKillOrders", "outputs": [ { "name": "success", @@ -364,7 +342,7 @@ { "constant": true, "inputs": [], - "name": "PROXY", + "name": "PROXY_CONTRACT", "outputs": [ { "name": "", @@ -382,10 +360,10 @@ "type": "bytes32" } ], - "name": "getUnavailableValueT", + "name": "getUnavailableTakerTokenAmount", "outputs": [ { - "name": "unavailableValueT", + "name": "unavailableTakerTokenAmount", "type": "uint256" } ], @@ -417,7 +395,7 @@ { "constant": true, "inputs": [], - "name": "ZRX", + "name": "ZRX_TOKEN_CONTRACT", "outputs": [ { "name": "", @@ -439,7 +417,7 @@ "type": "uint256[6]" }, { - "name": "fillValueT", + "name": "fillTakerTokenAmount", "type": "uint256" }, { @@ -455,7 +433,7 @@ "type": "bytes32" } ], - "name": "fillOrKill", + "name": "fillOrKillOrder", "outputs": [ { "name": "success", @@ -468,11 +446,11 @@ { "inputs": [ { - "name": "_zrx", + "name": "_ZRX_TOKEN_CONTRACT", "type": "address" }, { - "name": "_proxy", + "name": "_PROXY_CONTRACT", "type": "address" } ], @@ -499,32 +477,32 @@ }, { "indexed": false, - "name": "tokenM", + "name": "makerToken", "type": "address" }, { "indexed": false, - "name": "tokenT", + "name": "takerToken", "type": "address" }, { "indexed": false, - "name": "filledValueM", + "name": "filledMakerTokenAmount", "type": "uint256" }, { "indexed": false, - "name": "filledValueT", + "name": "filledTakerTokenAmount", "type": "uint256" }, { "indexed": false, - "name": "feeMPaid", + "name": "paidMakerFee", "type": "uint256" }, { "indexed": false, - "name": "feeTPaid", + "name": "paidTakerFee", "type": "uint256" }, { @@ -556,22 +534,22 @@ }, { "indexed": false, - "name": "tokenM", + "name": "makerToken", "type": "address" }, { "indexed": false, - "name": "tokenT", + "name": "takerToken", "type": "address" }, { "indexed": false, - "name": "cancelledValueM", + "name": "cancelledMakerTokenAmount", "type": "uint256" }, { "indexed": false, - "name": "cancelledValueT", + "name": "cancelledTakerTokenAmount", "type": "uint256" }, { @@ -606,12 +584,12 @@ "type": "event" } ], - "unlinked_binary": "0x6060604052341561000c57fe5b604051604080611cf88339810160405280516020909101515b60008054600160a060020a03808516600160a060020a03199283161790925560018054928416929091169190911790555b50505b611c90806100686000396000f300606060405236156100d55763ffffffff60e060020a60003504166308eb4e9881146100d757806314df96ee1461014a578063288cdc91146101775780632ac126221461019c578063441b1b44146101c157806350ec2a6a146101ec57806359b25720146103395780637ae2b5c7146104fb5780638163681e14610523578063909f617e14610562578063914ff398146105ef578063a2e855a5146107ec578063a8c92d48146109e1578063aae6250714610a0d578063cfc4d0ec14610a32578063d40fa8bf14610aa3578063ddefdb9014610acf575bfe5b34156100df57fe5b6040805160a08181019092526101389160049160a4918390600590839083908082843750506040805160c08181019092529496958181019594509250600691508390839080828437509395505092359250610b57915050565b60408051918252519081900360200190f35b341561015257fe5b610163600435602435604435610e0c565b604080519115158252519081900360200190f35b341561017f57fe5b610138600435610e2b565b60408051918252519081900360200190f35b34156101a457fe5b610138600435610e3d565b60408051918252519081900360200190f35b34156101c957fe5b610138600435602435604435610e4f565b60408051918252519081900360200190f35b34156101f457fe5b61016360048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b82821015610266576040805160a0818101909252908084028701906005908390839080828437505050918352505060019091019060200161022a565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156102d9576040805160c0818101909252908084028701906006908390839080828437505050918352505060019091019060200161029d565b50505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750949650610e6e95505050505050565b604080519115158252519081900360200190f35b341561034157fe5b61013860048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156103b3576040805160a08181019092529080840287019060059083908390808284375050509183525050600190910190602001610377565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b82821015610426576040805160c081810190925290808402870190600690839083908082843750505091835250506001909101906020016103ea565b5050604080516020878301358901803582810280850184019095528084529799893599838101351515999198506060019650929450810192829185019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750949650610ee295505050505050565b60408051918252519081900360200190f35b341561050357fe5b610138600435602435611004565b60408051918252519081900360200190f35b341561052b57fe5b610163600160a060020a036004351660243560ff6044351660643560843561101e565b604080519115158252519081900360200190f35b341561056a57fe5b6040805160a08181019092526101389160049160a4918390600590839083908082843750506040805160c08181019092529496958181019594509250600691508390839080828437509395505083359360208101351515935060ff604082013516925060608101359150608001356110d6565b60408051918252519081900360200190f35b34156105f757fe5b61016360048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b82821015610669576040805160a0818101909252908084028701906005908390839080828437505050918352505060019091019060200161062d565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156106dc576040805160c081810190925290808402870190600690839083908082843750505091835250506001909101906020016106a0565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375050604080516020808901358a01803580830284810184018652818552999b8b3515159b909a950198509296508101945090925082919085019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a99890198929750908201955093508392508501908490808284375094965061154295505050505050565b604080519115158252519081900360200190f35b34156107f457fe5b61016360048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b82821015610866576040805160a0818101909252908084028701906005908390839080828437505050918352505060019091019060200161082a565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156108d9576040805160c0818101909252908084028701906006908390839080828437505050918352505060019091019060200161089d565b50505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a99890198929750908201955093508392508501908490808284375094965061160395505050505050565b604080519115158252519081900360200190f35b34156109e957fe5b6109f16116c9565b60408051600160a060020a039092168252519081900360200190f35b3415610a1557fe5b6101386004356116d8565b60408051918252519081900360200190f35b3415610a3a57fe5b6040805160a08181019092526101389160049160a4918390600590839083908082843750506040805160c0818101909252949695818101959450925060069150839083908082843750939550611704945050505050565b60408051918252519081900360200190f35b3415610aab57fe5b6109f16117f7565b60408051600160a060020a039092168252519081900360200190f35b3415610ad757fe5b6040805160a08181019092526101639160049160a4918390600590839083908082843750506040805160c08181019092529496958181019594509250600691508390839080828437509395505083359360ff602082013516935060408101359250606001359050611806565b604080519115158252519081900360200190f35b6000610b61611be8565b6040805161016081019091526000908087835b60209081029190910151600160a060020a03168252018760015b60209081029190910151600160a060020a03168252018760025b60209081029190910151600160a060020a03168252018760035b60209081029190910151600160a060020a03168252018760045b60209081029190910151600160a060020a03168252018660005b602090810291909101518252018660015b602090810291909101518252018660025b602090810291909101518252018660035b602090810291909101518252018660045b60200201518152602001610c4e8888611704565b600019168152509150610c7833600160a060020a03168360000151600160a060020a031614611830565b6101208201514210610cad57610140820151604051600490600080516020611c4583398151915290600090a360009250610e03565b610cc88260c00151610cc38461014001516116d8565b611841565b9050610cd48482611004565b9250821515610d0657610140820151604051600590600080516020611c4583398151915290600090a360009250610e03565b610140820151600090815260036020526040902054610d25908461185a565b610140830151600090815260036020526040908190209190915580830180516060850180518451606060020a600160a060020a03948516810282529184169091026014820152935193849003602801909320608086015186519351945160c088015160a0890151939692851695909416937f67d66f160bc93d925d05dae1794c90d2d6d6688b29b84ff069398a9b0458713193610dc491908b90610e4f565b61014089015160408051600160a060020a03958616815293909416602084015282840191909152606082018a9052608082015290519081900360a00190a45b50509392505050565b60006103e882108015610e2157508383830915155b90505b9392505050565b60026020526000908152604090205481565b60036020526000908152604090205481565b6000610e21610e5e8484611882565b856118b1565b90505b9392505050565b6000805b8451811015610ed557610ecb8582815181101515610e8c57fe5b906020019060200201518583815181101515610ea457fe5b906020019060200201518584815181101515610ebc57fe5b90602001906020020151610b57565b505b600101610e72565b600191505b509392505050565b6000805b8851811015610ff757610f4b896000815181101515610f0157fe5b6020908102909101015160035b6020020151600160a060020a03168a83815181101515610f2a57fe5b6020908102909101015160035b6020020151600160a060020a031614611830565b610fdf82610fda8b84815181101515610f6057fe5b906020019060200201518b85815181101515610f7857fe5b90602001906020020151610f8c8c88611841565b8b8b88815181101515610f9b57fe5b906020019060200201518b89815181101515610fb357fe5b906020019060200201518b8a815181101515610fcb57fe5b906020019060200201516110d6565b61185a565b915086821415610fee57610ff7565b5b600101610ee6565b5b50979650505050505050565b600081831015611015575081611018565b50805b92915050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c8101869052815190819003603c018120600082815260208381018552928401819052835191825260ff8716828401528184018690526060820185905292516001926080808401939192601f1981019281900390910190868661646e5a03f115156110ad57fe5b505060206040510351600160a060020a031686600160a060020a03161490505b95945050505050565b60006110e0611be8565b6000600060006000610160604051908101604052808e600060058110151561110457fe5b60209081029190910151600160a060020a03168252018e60015b60209081029190910151600160a060020a03168252018e60025b60209081029190910151600160a060020a03168252018e60035b60209081029190910151600160a060020a03168252018e60045b60209081029190910151600160a060020a03168252018d60005b602090810291909101518252018d60015b602090810291909101518252018d60025b602090810291909101518252018d60035b602090810291909101518252018d60045b602002015181526020016111de8f8f611704565b9052602081015190955061121b90600160a060020a03161580611216575033600160a060020a03168660200151600160a060020a0316145b611830565b610120850151421061124f57610140850151604051600090600080516020611c45833981519152908290a360009550611532565b61126a8560c00151610cc38761014001516116d8565b611841565b93506112768b85611004565b95508515156112a857610140850151604051600190600080516020611c4583398151915290600090a360009550611532565b6112bb8560c00151878760a00151610e0c565b156112e957610140850151604051600290600080516020611c4583398151915290600090a360009550611532565b8980156112fd57506112fb85876118f4565b155b1561132b57610140850151604051600390600080516020611c4583398151915290600090a360009550611532565b61134961121686600001518761014001518c8c8c61101e565b611830565b61135c8560c00151878760a00151610e4f565b61014086015160009081526002602052604090205490935061137e908761185a565b610140860151600090815260026020526040908190209190915585015185516113b191611216913387611a5d565b611830565b6113cd61121686606001513388600001518a611a5d565b611830565b6080850151600160a060020a0316156114785760008560e00151111561142b576114008560c00151878760e00151610e4f565b6000548651608088015192945061142b9261121692600160a060020a0316919086611a5d565b611830565b5b600085610100015111156114785761144e8560c0015187876101000151610e4f565b60005460808701519192506114789161121691600160a060020a031690339085611a5d565b611830565b5b5b60408086018051606080890180518551606060020a600160a060020a0395861681028252918516909102601482015285519081900360280181206080808d01518d51975194516101408f0151338916865295881660208601528716848a01529483018b905282018d905260a0820189905260c0820188905260e08201929092529451909491831693909216917f0d0b9391970d9a25552f37d436d2aae2925e2bfe1b2a923754bada030c498cb3918190036101000190a45b5050505050979650505050505050565b6000805b88518110156115f2576115e8898281518110151561156057fe5b90602001906020020151898381518110151561157857fe5b90602001906020020151898481518110151561159057fe5b906020019060200201518989868151811015156115a957fe5b9060200190602002015189878151811015156115c157fe5b906020019060200201518988815181101515610fcb57fe5b906020019060200201516110d6565b505b600101611546565b600191505b50979650505050505050565b6000805b87518110156116b9576116b0611216898381518110151561162457fe5b90602001906020020151898481518110151561163c57fe5b90602001906020020151898581518110151561165457fe5b90602001906020020151898681518110151561166c57fe5b90602001906020020151898781518110151561168457fe5b90602001906020020151898881518110151561169c57fe5b90602001906020020151611806565b611830565b5b600101611607565b600191505b509695505050505050565b600154600160a060020a031681565b60008181526002602090815260408083205460039092528220546116fc919061185a565b90505b919050565b60003083825b60200201518460015b60200201518560025b60200201518660035b60200201518760045b60200201518760005b60200201518860015b60200201518960025b60200201518a60035b60200201518b60045b60200201518c60055b602002015160408051606060020a600160a060020a039e8f16810282529c8e168d0260148201529a8d168c0260288c0152988c168b02603c8b0152968b168a0260508a01529490991690970260648701526078860191909152609885015260b884019490945260d883019490945260f8820192909252610118810192909252519081900361013801902090505b92915050565b600054600160a060020a031681565b60006118228561181c89898960008a8a8a6110d6565b14611830565b5060015b9695505050505050565b80151561183d5760006000fd5b5b50565b600061184f83831115611830565b508082035b92915050565b60008282016118778482108015906112165750838210155b611830565b8091505b5092915050565b6000828202611877841580611216575083858381151561189e57fe5b04145b611830565b8091505b5092915050565b600060006118c160008411611830565b82848115156118cc57fe5b04905061187783858115156118dd57fe5b06828502018514611830565b8091505b5092915050565b600060006000600060003393506119148760c00151878960a00151610e4f565b92508261192988604001518960000151611aec565b108061194557508261194388604001518960000151611b6c565b105b8061195c57508561195a886060015186611aec565b105b80611973575085611971886060015186611b6c565b105b156119815760009450611a53565b6080870151600160a060020a031615611a4d576119a78760c00151878960e00151610e4f565b91506119bd8760c0015187896101000151610e4f565b600054885191925083916119da91600160a060020a031690611aec565b10806119ff5750600054875183916119fd91600160a060020a0390911690611b6c565b105b80611a1f57506000548190611a1d90600160a060020a031686611aec565b105b80611a3f57506000548190611a3d90600160a060020a031686611b6c565b105b15611a4d5760009450611a53565b5b600194505b5050505092915050565b6001546040805160006020918201819052825160e160020a630aed65f5028152600160a060020a03898116600483015288811660248301528781166044830152606482018790529351919493909316926315dacbea92608480830193919282900301818787803b1515611acc57fe5b6102c65a03f11515611ada57fe5b5050604051519150505b949350505050565b600082600160a060020a03166370a08231836000604051602001526040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b1515611b4e57fe5b6102c65a03f11515611b5c57fe5b5050604051519150505b92915050565b6001546040805160006020918201819052825160e160020a636eb1769f028152600160a060020a03868116600483015294851660248201529251909386169263dd62ed3e92604480830193919282900301818787803b1515611b4e57fe5b6102c65a03f11515611b5c57fe5b5050604051519150505b92915050565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905261014081019190915290560036d86c59e00bd73dc19ba3adfe068e4b64ac7e92be35546adeddf1b956a87e90a165627a7a723058209d6310023b98fc6419d082309e5333a2b2cbe61eb7f333bcf05040a05358b4ef0029", + "unlinked_binary": "0x6060604052341561000c57fe5b604051604080611d6e8339810160405280516020909101515b60008054600160a060020a03808516600160a060020a03199283161790925560018054928416929091169190911790555b50505b611d06806100686000396000f300606060405236156100ca5763ffffffff60e060020a60003504166314df96ee81146100cc578063288cdc91146100f95780632ac126221461011e578063363349be14610143578063394c21e7146103055780633b30ba59146103785780634f063e6c146103a45780634f150787146103d0578063741bcc93146105c55780637e9abb501461064d5780638163681e1461067257806398024a8b146106b1578063b7b2c7d6146106dc578063baa0181d146108d9578063bc61394a14610a26578063cfc4d0ec14610ab3575bfe5b34156100d457fe5b6100e5600435602435604435610b24565b604080519115158252519081900360200190f35b341561010157fe5b61010c600435610b43565b60408051918252519081900360200190f35b341561012657fe5b61010c600435610b55565b60408051918252519081900360200190f35b341561014b57fe5b61010c60048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156101bd576040805160a08181019092529080840287019060059083908390808284375050509183525050600190910190602001610181565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b82821015610230576040805160c081810190925290808402870190600690839083908082843750505091835250506001909101906020016101f4565b5050604080516020878301358901803582810280850184019095528084529799893599838101351515999198506060019650929450810192829185019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750949650610b6795505050505050565b60408051918252519081900360200190f35b341561030d57fe5b6040805160a081810190925261010c9160049160a4918390600590839083908082843750506040805160c08181019092529496958181019594509250600691508390839080828437509395505092359250610c8b915050565b60408051918252519081900360200190f35b341561038057fe5b610388610f34565b60408051600160a060020a039092168252519081900360200190f35b34156103ac57fe5b610388610f43565b60408051600160a060020a039092168252519081900360200190f35b34156103d857fe5b6100e560048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b8282101561044a576040805160a0818101909252908084028701906005908390839080828437505050918352505060019091019060200161040e565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156104bd576040805160c08181019092529080840287019060069083908390808284375050509183525050600190910190602001610481565b50505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750949650610f5295505050505050565b604080519115158252519081900360200190f35b34156105cd57fe5b6040805160a08181019092526100e59160049160a4918390600590839083908082843750506040805160c08181019092529496958181019594509250600691508390839080828437509395505083359360ff602082013516935060408101359250606001359050611018565b604080519115158252519081900360200190f35b341561065557fe5b61010c600435611040565b60408051918252519081900360200190f35b341561067a57fe5b6100e5600160a060020a036004351660243560ff6044351660643560843561106c565b604080519115158252519081900360200190f35b34156106b957fe5b61010c600435602435604435611124565b60408051918252519081900360200190f35b34156106e457fe5b6100e560048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b82821015610756576040805160a0818101909252908084028701906005908390839080828437505050918352505060019091019060200161071a565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156107c9576040805160c0818101909252908084028701906006908390839080828437505050918352505060019091019060200161078d565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375050604080516020808901358a01803580830284810184018652818552999b8b3515159b909a950198509296508101945090925082919085019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a99890198929750908201955093508392508501908490808284375094965061114395505050505050565b604080519115158252519081900360200190f35b34156108e157fe5b6100e560048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b82821015610953576040805160a08181019092529080840287019060059083908390808284375050509183525050600190910190602001610917565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156109c6576040805160c0818101909252908084028701906006908390839080828437505050918352505060019091019060200161098a565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965061120495505050505050565b604080519115158252519081900360200190f35b3415610a2e57fe5b6040805160a081810190925261010c9160049160a4918390600590839083908082843750506040805160c08181019092529496958181019594509250600691508390839080828437509395505083359360208101351515935060ff60408201351692506060810135915060800135611278565b60408051918252519081900360200190f35b3415610abb57fe5b6040805160a081810190925261010c9160049160a4918390600590839083908082843750506040805160c08181019092529496958181019594509250600691508390839080828437509395506116ed945050505050565b60408051918252519081900360200190f35b60006103e882108015610b3957508284830915155b90505b9392505050565b60026020526000908152604090205481565b60036020526000908152604090205481565b6000805b8851811015610c7e57886000815181101515610b8357fe5b6020908102909101015160035b6020020151600160a060020a03168982815181101515610bac57fe5b6020908102909101015160035b6020020151600160a060020a031614610bd25760006000fd5b610c6682610c618b84815181101515610be757fe5b906020019060200201518b85815181101515610bff57fe5b90602001906020020151610c138c886117e0565b8b8b88815181101515610c2257fe5b906020019060200201518b89815181101515610c3a57fe5b906020019060200201518b8a815181101515610c5257fe5b90602001906020020151611278565b6117f7565b915086821415610c7557610c7e565b5b600101610b6b565b5b50979650505050505050565b6000610c95611c5e565b6040805161016081019091526000908087835b60209081029190910151600160a060020a03168252018760015b60209081029190910151600160a060020a03168252018760025b60209081029190910151600160a060020a03168252018760035b60209081029190910151600160a060020a03168252018760045b60209081029190910151600160a060020a03168252018660005b602090810291909101518252018660015b602090810291909101518252018660025b602090810291909101518252018660035b602090810291909101518252018660045b60200201518152602001610d8288886116ed565b9052805190925033600160a060020a03908116911614610da25760006000fd5b6101208201514210610dd657610140820151604051600090600080516020611cbb833981519152908290a360009250610f2b565b610df18260c00151610dec846101400151611040565b6117e0565b9050610dfd8482611811565b9250821515610e2f57610140820151604051600190600080516020611cbb83398151915290600090a360009250610f2b565b610140820151600090815260036020526040902054610e4e90846117f7565b610140830151600090815260036020526040908190209190915580830180516060850180518451606060020a600160a060020a03948516810282529184169091026014820152935193849003602801909320608086015186519351945160c088015160a0890151939692851695909416937f67d66f160bc93d925d05dae1794c90d2d6d6688b29b84ff069398a9b0458713193610eec918b91611124565b61014089015160408051600160a060020a03958616815293909416602084015282840191909152606082018a9052608082015290519081900360a00190a45b50509392505050565b600054600160a060020a031681565b600154600160a060020a031681565b6000805b875181101561100857610ff78882815181101515610f7057fe5b906020019060200201518883815181101515610f8857fe5b906020019060200201518884815181101515610fa057fe5b906020019060200201518885815181101515610fb857fe5b906020019060200201518886815181101515610fd057fe5b906020019060200201518887815181101515610fe857fe5b90602001906020020151611018565b1515610fff57fe5b5b600101610f56565b600191505b509695505050505050565b60008461102b8888886000898989611278565b1461103257fe5b5060015b9695505050505050565b600081815260026020908152604080832054600390925282205461106491906117f7565b90505b919050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c8101869052815190819003603c018120600082815260208381018552928401819052835191825260ff8716828401528184018690526060820185905292516001926080808401939192601f1981019281900390910190868661646e5a03f115156110fb57fe5b505060206040510351600160a060020a031686600160a060020a03161490505b95945050505050565b6000610b39611133858461182b565b8461185a565b90505b9392505050565b6000805b88518110156111f3576111e9898281518110151561116157fe5b90602001906020020151898381518110151561117957fe5b90602001906020020151898481518110151561119157fe5b906020019060200201518989868151811015156111aa57fe5b9060200190602002015189878151811015156111c257fe5b906020019060200201518988815181101515610c5257fe5b90602001906020020151611278565b505b600101611147565b600191505b50979650505050505050565b6000805b845181101561126b57611261858281518110151561122257fe5b90602001906020020151858381518110151561123a57fe5b90602001906020020151858481518110151561125257fe5b90602001906020020151610c8b565b505b600101611208565b600191505b509392505050565b6000611282611c5e565b6000600060006000610160604051908101604052808e60006005811015156112a657fe5b60209081029190910151600160a060020a03168252018e60015b60209081029190910151600160a060020a03168252018e60025b60209081029190910151600160a060020a03168252018e60035b60209081029190910151600160a060020a03168252018e60045b60209081029190910151600160a060020a03168252018d60005b602090810291909101518252018d60015b602090810291909101518252018d60025b602090810291909101518252018d60035b602090810291909101518252018d60045b602002015181526020016113808f8f6116ed565b90526020810151909550600160a060020a031615806113b4575033600160a060020a03168560200151600160a060020a0316145b15156113c05760006000fd5b6113d685600001518661014001518b8b8b61106c565b15156113e25760006000fd5b610120850151421061141657610140850151604051600090600080516020611cbb833981519152908290a3600095506116dd565b6114318560c00151610dec876101400151611040565b6117e0565b935061143d8b85611811565b955085151561146f57610140850151604051600190600080516020611cbb83398151915290600090a3600095506116dd565b611482868660c001518760a00151610b24565b156114b057610140850151604051600290600080516020611cbb83398151915290600090a3600095506116dd565b891580156114c557506114c38587611877565b155b156114f357610140850151604051600390600080516020611cbb83398151915290600090a3600095506116dd565b611506868660c001518760a00151611124565b61014086015160009081526002602052604090205490935061152890876117f7565b6101408601516000908152600260205260409081902091909155850151855161155391903386611ad3565b151561155b57fe5b61156f856060015133876000015189611ad3565b151561157757fe5b6080850151600160a060020a0316156116235760008560e0015111156115d5576115aa868660c001518760e00151611124565b600054865160808801519294506115cd92600160a060020a039092169185611ad3565b15156115d557fe5b5b60008561010001511115611623576115f8868660c00151876101000151611124565b600054608087015191925061161b91600160a060020a0390911690339084611ad3565b151561162357fe5b5b5b60408086018051606080890180518551606060020a600160a060020a0395861681028252918516909102601482015285519081900360280181206080808d01518d51975194516101408f0151338916865295881660208601528716848a01529483018b905282018d905260a0820189905260c0820188905260e08201929092529451909491831693909216917f0d0b9391970d9a25552f37d436d2aae2925e2bfe1b2a923754bada030c498cb3918190036101000190a45b5050505050979650505050505050565b60003083825b60200201518460015b60200201518560025b60200201518660035b60200201518760045b60200201518760005b60200201518860015b60200201518960025b60200201518a60035b60200201518b60045b60200201518c60055b602002015160408051606060020a600160a060020a039e8f16810282529c8e168d0260148201529a8d168c0260288c0152988c168b02603c8b0152968b168a0260508a01529490991690970260648701526078860191909152609885015260b884019490945260d883019490945260f8820192909252610118810192909252519081900361013801902090505b92915050565b6000828211156117ec57fe5b508082035b92915050565b60008282018381101561180657fe5b8091505b5092915050565b60008183106118205781611822565b825b90505b92915050565b6000828202831580611847575082848281151561184457fe5b04145b151561180657fe5b8091505b5092915050565b60006000828481151561186957fe5b0490508091505b5092915050565b60006000600060006000600060006000600033975061189f8a8c60c001518d60a00151611124565b60808c0151909750600160a060020a031615611a545760005460408c015160608d015160c08e015160e08f0151600160a060020a0394851693851684149a509390911690911496506118f3918c9190611124565b93506119098a8c60c001518d6101000151611124565b9250856119165783611920565b61192087856117f7565b5b91508461192e5782611938565b6119388a846117f7565b5b6000548c51919250839161195691600160a060020a031690611b62565b108061197b57506000548b51839161197991600160a060020a0390911690611be2565b105b8061199b5750600054819061199990600160a060020a03168a611b62565b105b806119bb575060005481906119b990600160a060020a03168a611be2565b105b156119c95760009850611ac5565b85158015611a015750866119e58c604001518d60000151611b62565b1080611a015750866119ff8c604001518d60000151611be2565b105b5b15611a105760009850611ac5565b84158015611a40575089611a288c606001518a611b62565b1080611a40575089611a3e8c606001518a611be2565b105b5b15611a4f5760009850611ac5565b611abf565b86611a678c604001518d60000151611b62565b1080611a83575086611a818c604001518d60000151611be2565b105b80611a9a575089611a988c606001518a611b62565b105b80611ab1575089611aaf8c606001518a611be2565b105b15611abf5760009850611ac5565b5b600198505b505050505050505092915050565b6001546040805160006020918201819052825160e160020a630aed65f5028152600160a060020a03898116600483015288811660248301528781166044830152606482018790529351919493909316926315dacbea92608480830193919282900301818787803b1515611b4257fe5b6102c65a03f11515611b5057fe5b5050604051519150505b949350505050565b600082600160a060020a03166370a08231836000604051602001526040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b1515611bc457fe5b6102c65a03f11515611bd257fe5b5050604051519150505b92915050565b6001546040805160006020918201819052825160e160020a636eb1769f028152600160a060020a03868116600483015294851660248201529251909386169263dd62ed3e92604480830193919282900301818787803b1515611bc457fe5b6102c65a03f11515611bd257fe5b5050604051519150505b92915050565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905261014081019190915290560036d86c59e00bd73dc19ba3adfe068e4b64ac7e92be35546adeddf1b956a87e90a165627a7a72305820ebcefc5e253855f67db0c7e9d7fd4b3b16004c01384ee01564d3091e35c3cc860029", "networks": { "42": { "links": {}, "events": { - "0xcf8bd4f6ec4f39997290cf18413805f1f190eebd60e32ffc174b56d07a355beb": { + "0x0d0b9391970d9a25552f37d436d2aae2925e2bfe1b2a923754bada030c498cb3": { "anonymous": false, "inputs": [ { @@ -631,47 +609,32 @@ }, { "indexed": false, - "name": "tokenM", - "type": "address" - }, - { - "indexed": false, - "name": "tokenT", + "name": "makerToken", "type": "address" }, { "indexed": false, - "name": "filledBy", + "name": "takerToken", "type": "address" }, { "indexed": false, - "name": "valueM", + "name": "filledMakerTokenAmount", "type": "uint256" }, { "indexed": false, - "name": "valueT", + "name": "filledTakerTokenAmount", "type": "uint256" }, { "indexed": false, - "name": "feeM", + "name": "paidMakerFee", "type": "uint256" }, { "indexed": false, - "name": "feeT", - "type": "uint256" - }, - { - "indexed": false, - "name": "expiration", - "type": "uint256" - }, - { - "indexed": false, - "name": "filledValueT", + "name": "paidTakerFee", "type": "uint256" }, { @@ -688,7 +651,7 @@ "name": "LogFill", "type": "event" }, - "0x4565177cd5184f550db0ab57b1d5bc808f8e8ba0adcb13fb257f1e7cf019a2b6": { + "0x67d66f160bc93d925d05dae1794c90d2d6d6688b29b84ff069398a9b04587131": { "anonymous": false, "inputs": [ { @@ -703,42 +666,22 @@ }, { "indexed": false, - "name": "tokenM", + "name": "makerToken", "type": "address" }, { "indexed": false, - "name": "tokenT", + "name": "takerToken", "type": "address" }, { "indexed": false, - "name": "valueM", - "type": "uint256" - }, - { - "indexed": false, - "name": "valueT", - "type": "uint256" - }, - { - "indexed": false, - "name": "feeM", + "name": "cancelledMakerTokenAmount", "type": "uint256" }, { "indexed": false, - "name": "feeT", - "type": "uint256" - }, - { - "indexed": false, - "name": "expiration", - "type": "uint256" - }, - { - "indexed": false, - "name": "cancelledValueT", + "name": "cancelledTakerTokenAmount", "type": "uint256" }, { @@ -771,119 +714,10 @@ ], "name": "LogError", "type": "event" - }, - "0x0d0b9391970d9a25552f37d436d2aae2925e2bfe1b2a923754bada030c498cb3": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "maker", - "type": "address" - }, - { - "indexed": false, - "name": "taker", - "type": "address" - }, - { - "indexed": true, - "name": "feeRecipient", - "type": "address" - }, - { - "indexed": false, - "name": "tokenM", - "type": "address" - }, - { - "indexed": false, - "name": "tokenT", - "type": "address" - }, - { - "indexed": false, - "name": "filledValueM", - "type": "uint256" - }, - { - "indexed": false, - "name": "filledValueT", - "type": "uint256" - }, - { - "indexed": false, - "name": "feeMPaid", - "type": "uint256" - }, - { - "indexed": false, - "name": "feeTPaid", - "type": "uint256" - }, - { - "indexed": true, - "name": "tokens", - "type": "bytes32" - }, - { - "indexed": false, - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "LogFill", - "type": "event" - }, - "0x67d66f160bc93d925d05dae1794c90d2d6d6688b29b84ff069398a9b04587131": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "maker", - "type": "address" - }, - { - "indexed": true, - "name": "feeRecipient", - "type": "address" - }, - { - "indexed": false, - "name": "tokenM", - "type": "address" - }, - { - "indexed": false, - "name": "tokenT", - "type": "address" - }, - { - "indexed": false, - "name": "cancelledValueM", - "type": "uint256" - }, - { - "indexed": false, - "name": "cancelledValueT", - "type": "uint256" - }, - { - "indexed": true, - "name": "tokens", - "type": "bytes32" - }, - { - "indexed": false, - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "LogCancel", - "type": "event" } }, - "updated_at": 1496294576952, - "address": "0xed97b186ee3bae12a3fe6a9fb55300b5630a1b4c" + "updated_at": 1499299724252, + "address": "0x63869171a246622ef8f9234879ce2c06cebd85f6" }, "50": { "links": {}, @@ -908,12 +742,12 @@ }, { "indexed": false, - "name": "tokenM", + "name": "makerToken", "type": "address" }, { "indexed": false, - "name": "tokenT", + "name": "takerToken", "type": "address" }, { @@ -923,32 +757,32 @@ }, { "indexed": false, - "name": "valueM", + "name": "makerTokenAmount", "type": "uint256" }, { "indexed": false, - "name": "valueT", + "name": "takerTokenAmount", "type": "uint256" }, { "indexed": false, - "name": "feeM", + "name": "makerFee", "type": "uint256" }, { "indexed": false, - "name": "feeT", + "name": "takerFee", "type": "uint256" }, { "indexed": false, - "name": "expiration", + "name": "expirationTimestampInSec", "type": "uint256" }, { "indexed": false, - "name": "filledValueT", + "name": "filledTakerTokenAmount", "type": "uint256" }, { @@ -980,42 +814,42 @@ }, { "indexed": false, - "name": "tokenM", + "name": "makerToken", "type": "address" }, { "indexed": false, - "name": "tokenT", + "name": "takerToken", "type": "address" }, { "indexed": false, - "name": "valueM", + "name": "makerTokenAmount", "type": "uint256" }, { "indexed": false, - "name": "valueT", + "name": "takerTokenAmount", "type": "uint256" }, { "indexed": false, - "name": "feeM", + "name": "makerFee", "type": "uint256" }, { "indexed": false, - "name": "feeT", + "name": "takerFee", "type": "uint256" }, { "indexed": false, - "name": "expiration", + "name": "expirationTimestampInSec", "type": "uint256" }, { "indexed": false, - "name": "cancelledValueT", + "name": "cancelledtakerTokenAmount", "type": "uint256" }, { @@ -1069,32 +903,32 @@ }, { "indexed": false, - "name": "tokenM", + "name": "makerToken", "type": "address" }, { "indexed": false, - "name": "tokenT", + "name": "takerToken", "type": "address" }, { "indexed": false, - "name": "filledValueM", + "name": "filledMakerTokenAmount", "type": "uint256" }, { "indexed": false, - "name": "filledValueT", + "name": "filledTakerTokenAmount", "type": "uint256" }, { "indexed": false, - "name": "feeMPaid", + "name": "paidMakerFee", "type": "uint256" }, { "indexed": false, - "name": "feeTPaid", + "name": "paidTakerFee", "type": "uint256" }, { @@ -1126,22 +960,22 @@ }, { "indexed": false, - "name": "tokenM", + "name": "makerToken", "type": "address" }, { "indexed": false, - "name": "tokenT", + "name": "takerToken", "type": "address" }, { "indexed": false, - "name": "cancelledValueM", + "name": "cancelledMakerTokenAmount", "type": "uint256" }, { "indexed": false, - "name": "cancelledValueT", + "name": "cancelledTakerTokenAmount", "type": "uint256" }, { @@ -1159,10 +993,10 @@ "type": "event" } }, - "updated_at": 1498588231353, + "updated_at": 1499462280316, "address": "0xb69e673309512a9d726f87304c6984054f87a93b" } }, "schema_version": "0.0.5", - "updated_at": 1498588231353 -}
\ No newline at end of file + "updated_at": 1499462280316 +} diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index fa4b5904b..c352c782b 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -105,10 +105,10 @@ export class ExchangeWrapper extends ContractWrapper { assert.doesConformToSchema('orderHash', orderHash, orderHashSchema); const exchangeContract = await this._getExchangeContractAsync(exchangeContractAddress); - let unavailableAmountInBaseUnits = await exchangeContract.getUnavailableValueT.call(orderHash); + let unavailableTakerTokenAmount = await exchangeContract.getUnavailableTakerTokenAmount.call(orderHash); // Wrap BigNumbers returned from web3 with our own (later) version of BigNumber - unavailableAmountInBaseUnits = new BigNumber(unavailableAmountInBaseUnits); - return unavailableAmountInBaseUnits; + unavailableTakerTokenAmount = new BigNumber(unavailableTakerTokenAmount); + return unavailableTakerTokenAmount; } /** * Retrieve the takerAmount of an order that has already been filled. @@ -150,32 +150,35 @@ export class ExchangeWrapper extends ContractWrapper { * we allow you to specify `shouldCheckTransfer`. If true, the smart contract will not throw if the parties * do not have sufficient balances/allowances, preserving gas costs. Setting it to false forgoes this check * and causes the smart contract to throw (using all the gas supplied) instead. - * @param signedOrder An object that conforms to the SignedOrder interface. - * @param takerTokenFillAmount The amount of the order (in taker tokens baseUnits) that you wish to fill. - * @param shouldCheckTransfer Whether or not you wish for the contract call to throw if upon - * execution the tokens cannot be transferred. - * @param takerAddress The user Ethereum address who would like to fill this order. - * Must be available via the supplied Web3.Provider passed to 0x.js. - * @return The amount of the order that was filled (in taker token baseUnits). + * @param signedOrder An object that conforms to the SignedOrder interface. + * @param fillTakerTokenAmount The amount of the order (in taker tokens baseUnits) that + * you wish to fill. + * @param shouldThrowOnInsufficientBalanceOrAllowance Whether or not you wish for the contract call to throw + * if upon execution the tokens cannot be transferred. + * @param takerAddress The user Ethereum address who would like to fill this order. + * Must be available via the supplied Web3.Provider + * passed to 0x.js. + * @return The amount of the order that was filled (in taker token baseUnits). */ @decorators.contractCallErrorHandler - public async fillOrderAsync(signedOrder: SignedOrder, takerTokenFillAmount: BigNumber.BigNumber, - shouldCheckTransfer: boolean, takerAddress: string): Promise<BigNumber.BigNumber> { + public async fillOrderAsync(signedOrder: SignedOrder, fillTakerTokenAmount: BigNumber.BigNumber, + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + takerAddress: string): Promise<BigNumber.BigNumber> { assert.doesConformToSchema('signedOrder', signedOrder, signedOrderSchema); - assert.isBigNumber('takerTokenFillAmount', takerTokenFillAmount); - assert.isBoolean('shouldCheckTransfer', shouldCheckTransfer); + assert.isBigNumber('fillTakerTokenAmount', fillTakerTokenAmount); + assert.isBoolean('shouldThrowOnInsufficientBalanceOrAllowance', shouldThrowOnInsufficientBalanceOrAllowance); await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); const exchangeInstance = await this._getExchangeContractAsync(signedOrder.exchangeContractAddress); - await this._validateFillOrderAndThrowIfInvalidAsync(signedOrder, takerTokenFillAmount, takerAddress); + await this._validateFillOrderAndThrowIfInvalidAsync(signedOrder, fillTakerTokenAmount, takerAddress); const [orderAddresses, orderValues] = ExchangeWrapper._getOrderAddressesAndValues(signedOrder); - const gas = await exchangeInstance.fill.estimateGas( + const gas = await exchangeInstance.fillOrder.estimateGas( orderAddresses, orderValues, - takerTokenFillAmount, - shouldCheckTransfer, + fillTakerTokenAmount, + shouldThrowOnInsufficientBalanceOrAllowance, signedOrder.ecSignature.v, signedOrder.ecSignature.r, signedOrder.ecSignature.s, @@ -183,11 +186,11 @@ export class ExchangeWrapper extends ContractWrapper { from: takerAddress, }, ); - const response: ContractResponse = await exchangeInstance.fill( + const response: ContractResponse = await exchangeInstance.fillOrder( orderAddresses, orderValues, - takerTokenFillAmount, - shouldCheckTransfer, + fillTakerTokenAmount, + shouldThrowOnInsufficientBalanceOrAllowance, signedOrder.ecSignature.v, signedOrder.ecSignature.r, signedOrder.ecSignature.s, @@ -198,27 +201,29 @@ export class ExchangeWrapper extends ContractWrapper { ); this._throwErrorLogsAsErrors(response.logs); const logFillArgs = response.logs[0].args as LogFillContractEventArgs; - const filledAmount = new BigNumber(logFillArgs.filledValueT); - return filledAmount; + const filledTakerTokenAmount = new BigNumber(logFillArgs.filledTakerTokenAmount); + return filledTakerTokenAmount; } /** * Sequentially and atomically fills signedOrders up to the specified takerTokenFillAmount. * If the fill amount is reached - it succeeds and does not fill the rest of the orders. * If fill amount is not reached - it fills as much of the fill amount as possible and succeeds. - * @param signedOrders The array of signedOrders that you would like to fill until - * takerTokenFillAmount is reached. - * @param takerTokenFillAmount The total amount of the takerTokens you would like to fill. - * @param shouldCheckTransfer Whether or not you wish for the contract call to throw if upon - * execution any of the tokens cannot be transferred. If set to false, - * the call will continue to fill subsequent signedOrders even when - * some cannot be filled. - * @param takerAddress The user Ethereum address who would like to fill these orders. - * Must be available via the supplied Web3.Provider passed to 0x.js. - * @return The amount of the orders that was filled (in taker token baseUnits). + * @param signedOrders The array of signedOrders that you would like to fill until + * takerTokenFillAmount is reached. + * @param fillTakerTokenAmount The total amount of the takerTokens you would like to fill. + * @param shouldThrowOnInsufficientBalanceOrAllowance Whether or not you wish for the contract call to throw if + * upon execution any of the tokens cannot be transferred. + * If set to false, the call will continue to fill subsequent + * signedOrders even when some cannot be filled. + * @param takerAddress The user Ethereum address who would like to fill these + * orders. Must be available via the supplied Web3.Provider + * passed to 0x.js. + * @return The amount of the orders that was filled (in taker token baseUnits). */ @decorators.contractCallErrorHandler - public async fillOrdersUpToAsync(signedOrders: SignedOrder[], takerTokenFillAmount: BigNumber.BigNumber, - shouldCheckTransfer: boolean, takerAddress: string): Promise<BigNumber.BigNumber> { + public async fillOrdersUpToAsync(signedOrders: SignedOrder[], fillTakerTokenAmount: BigNumber.BigNumber, + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + takerAddress: string): Promise<BigNumber.BigNumber> { assert.doesConformToSchema('signedOrders', signedOrders, signedOrdersSchema); const takerTokenAddresses = _.map(signedOrders, signedOrder => signedOrder.takerTokenAddress); assert.hasAtMostOneUniqueValue(takerTokenAddresses, @@ -226,12 +231,12 @@ export class ExchangeWrapper extends ContractWrapper { const exchangeContractAddresses = _.map(signedOrders, signedOrder => signedOrder.exchangeContractAddress); assert.hasAtMostOneUniqueValue(exchangeContractAddresses, ExchangeContractErrs.BATCH_ORDERS_MUST_HAVE_SAME_EXCHANGE_ADDRESS); - assert.isBigNumber('takerTokenFillAmount', takerTokenFillAmount); - assert.isBoolean('shouldCheckTransfer', shouldCheckTransfer); + assert.isBigNumber('fillTakerTokenAmount', fillTakerTokenAmount); + assert.isBoolean('shouldThrowOnInsufficientBalanceOrAllowance', shouldThrowOnInsufficientBalanceOrAllowance); await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); for (const signedOrder of signedOrders) { await this._validateFillOrderAndThrowIfInvalidAsync( - signedOrder, takerTokenFillAmount, takerAddress); + signedOrder, fillTakerTokenAmount, takerAddress); } if (_.isEmpty(signedOrders)) { return new BigNumber(0); // no-op @@ -251,11 +256,11 @@ export class ExchangeWrapper extends ContractWrapper { ); const exchangeInstance = await this._getExchangeContractAsync(exchangeContractAddresses[0]); - const gas = await exchangeInstance.fillUpTo.estimateGas( + const gas = await exchangeInstance.fillOrdersUpTo.estimateGas( orderAddressesArray, orderValuesArray, - takerTokenFillAmount, - shouldCheckTransfer, + fillTakerTokenAmount, + shouldThrowOnInsufficientBalanceOrAllowance, vArray, rArray, sArray, @@ -263,11 +268,11 @@ export class ExchangeWrapper extends ContractWrapper { from: takerAddress, }, ); - const response: ContractResponse = await exchangeInstance.fillUpTo( + const response: ContractResponse = await exchangeInstance.fillOrdersUpTo( orderAddressesArray, orderValuesArray, - takerTokenFillAmount, - shouldCheckTransfer, + fillTakerTokenAmount, + shouldThrowOnInsufficientBalanceOrAllowance, vArray, rArray, sArray, @@ -278,8 +283,9 @@ export class ExchangeWrapper extends ContractWrapper { ); this._throwErrorLogsAsErrors(response.logs); let filledTakerTokenAmount = new BigNumber(0); - const filledAmounts = _.each(response.logs, log => { - filledTakerTokenAmount = filledTakerTokenAmount.plus((log.args as LogFillContractEventArgs).filledValueT); + _.each(response.logs, log => { + filledTakerTokenAmount = filledTakerTokenAmount.plus( + (log.args as LogFillContractEventArgs).filledTakerTokenAmount); }); return filledTakerTokenAmount; } @@ -288,17 +294,21 @@ export class ExchangeWrapper extends ContractWrapper { * Executes multiple fills atomically in a single transaction. * If shouldCheckTransfer is set to true, it will continue filling subsequent orders even when earlier ones fail. * When shouldCheckTransfer is set to false, if any fill fails, the entire batch fails. - * @param orderFillRequests An array of objects that conform to the OrderFillRequest interface. - * @param shouldCheckTransfer Whether or not you wish for the contract call to throw if upon - * execution any of the tokens cannot be transferred. If set to false, - * the call will continue to fill subsequent signedOrders even when some - * cannot be filled. - * @param takerAddress The user Ethereum address who would like to fill these orders. - * Must be available via the supplied Web3.Provider passed to 0x.js. + * @param orderFillRequests An array of objects that conform to the + * OrderFillRequest interface. + * @param shouldThrowOnInsufficientBalanceOrAllowance Whether or not you wish for the contract call to throw + * if upon execution any of the tokens cannot be + * transferred. If set to false, the call will continue to + * fill subsequent signedOrders even when some + * cannot be filled. + * @param takerAddress The user Ethereum address who would like to fill + * these orders. Must be available via the supplied + * Web3.Provider passed to 0x.js. */ @decorators.contractCallErrorHandler public async batchFillOrdersAsync(orderFillRequests: OrderFillRequest[], - shouldCheckTransfer: boolean, takerAddress: string): Promise<void> { + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + takerAddress: string): Promise<void> { assert.doesConformToSchema('orderFillRequests', orderFillRequests, orderFillRequestsSchema); const exchangeContractAddresses = _.map( orderFillRequests, @@ -306,7 +316,7 @@ export class ExchangeWrapper extends ContractWrapper { ); assert.hasAtMostOneUniqueValue(exchangeContractAddresses, ExchangeContractErrs.BATCH_ORDERS_MUST_HAVE_SAME_EXCHANGE_ADDRESS); - assert.isBoolean('shouldCheckTransfer', shouldCheckTransfer); + assert.isBoolean('shouldThrowOnInsufficientBalanceOrAllowance', shouldThrowOnInsufficientBalanceOrAllowance); await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); for (const orderFillRequest of orderFillRequests) { await this._validateFillOrderAndThrowIfInvalidAsync( @@ -326,16 +336,16 @@ export class ExchangeWrapper extends ContractWrapper { ]; }); // We use _.unzip<any> because _.unzip doesn't type check if values have different types :'( - const [orderAddressesArray, orderValuesArray, takerTokenFillAmountArray, vArray, rArray, sArray] = _.unzip<any>( + const [orderAddressesArray, orderValuesArray, fillTakerTokenAmounts, vArray, rArray, sArray] = _.unzip<any>( orderAddressesValuesAmountsAndSignatureArray, ); const exchangeInstance = await this._getExchangeContractAsync(exchangeContractAddresses[0]); - const gas = await exchangeInstance.batchFill.estimateGas( + const gas = await exchangeInstance.batchFillOrders.estimateGas( orderAddressesArray, orderValuesArray, - takerTokenFillAmountArray, - shouldCheckTransfer, + fillTakerTokenAmounts, + shouldThrowOnInsufficientBalanceOrAllowance, vArray, rArray, sArray, @@ -343,11 +353,11 @@ export class ExchangeWrapper extends ContractWrapper { from: takerAddress, }, ); - const response: ContractResponse = await exchangeInstance.batchFill( + const response: ContractResponse = await exchangeInstance.batchFillOrders( orderAddressesArray, orderValuesArray, - takerTokenFillAmountArray, - shouldCheckTransfer, + fillTakerTokenAmounts, + shouldThrowOnInsufficientBalanceOrAllowance, vArray, rArray, sArray, @@ -363,29 +373,29 @@ export class ExchangeWrapper extends ContractWrapper { * the fill order is abandoned. * @param signedOrder An object that conforms to the SignedOrder interface. The * signedOrder you wish to fill. - * @param takerTokenFillAmount The total amount of the takerTokens you would like to fill. + * @param fillTakerTokenAmount The total amount of the takerTokens you would like to fill. * @param takerAddress The user Ethereum address who would like to fill this order. * Must be available via the supplied Web3.Provider passed to 0x.js. */ @decorators.contractCallErrorHandler - public async fillOrKillOrderAsync(signedOrder: SignedOrder, takerTokenFillAmount: BigNumber.BigNumber, + public async fillOrKillOrderAsync(signedOrder: SignedOrder, fillTakerTokenAmount: BigNumber.BigNumber, takerAddress: string): Promise<void> { assert.doesConformToSchema('signedOrder', signedOrder, signedOrderSchema); - assert.isBigNumber('takerTokenFillAmount', takerTokenFillAmount); + assert.isBigNumber('fillTakerTokenAmount', fillTakerTokenAmount); await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); const exchangeInstance = await this._getExchangeContractAsync(signedOrder.exchangeContractAddress); - await this._validateFillOrderAndThrowIfInvalidAsync(signedOrder, takerTokenFillAmount, takerAddress); + await this._validateFillOrderAndThrowIfInvalidAsync(signedOrder, fillTakerTokenAmount, takerAddress); await this._validateFillOrKillOrderAndThrowIfInvalidAsync(signedOrder, exchangeInstance.address, - takerTokenFillAmount); + fillTakerTokenAmount); const [orderAddresses, orderValues] = ExchangeWrapper._getOrderAddressesAndValues(signedOrder); - const gas = await exchangeInstance.fillOrKill.estimateGas( + const gas = await exchangeInstance.fillOrKillOrder.estimateGas( orderAddresses, orderValues, - takerTokenFillAmount, + fillTakerTokenAmount, signedOrder.ecSignature.v, signedOrder.ecSignature.r, signedOrder.ecSignature.s, @@ -393,10 +403,10 @@ export class ExchangeWrapper extends ContractWrapper { from: takerAddress, }, ); - const response: ContractResponse = await exchangeInstance.fillOrKill( + const response: ContractResponse = await exchangeInstance.fillOrKillOrder( orderAddresses, orderValues, - takerTokenFillAmount, + fillTakerTokenAmount, signedOrder.ecSignature.v, signedOrder.ecSignature.r, signedOrder.ecSignature.s, @@ -445,13 +455,13 @@ export class ExchangeWrapper extends ContractWrapper { }); // We use _.unzip<any> because _.unzip doesn't type check if values have different types :'( - const [orderAddresses, orderValues, fillTakerAmounts, vParams, rParams, sParams] = + const [orderAddresses, orderValues, fillTakerTokenAmounts, vParams, rParams, sParams] = _.unzip<any>(orderAddressesValuesAndTakerTokenFillAmounts); - const gas = await exchangeInstance.batchFillOrKill.estimateGas( + const gas = await exchangeInstance.batchFillOrKillOrders.estimateGas( orderAddresses, orderValues, - fillTakerAmounts, + fillTakerTokenAmounts, vParams, rParams, sParams, @@ -459,10 +469,10 @@ export class ExchangeWrapper extends ContractWrapper { from: takerAddress, }, ); - const response: ContractResponse = await exchangeInstance.batchFillOrKill( + const response: ContractResponse = await exchangeInstance.batchFillOrKillOrders( orderAddresses, orderValues, - fillTakerAmounts, + fillTakerTokenAmounts, vParams, rParams, sParams, @@ -477,32 +487,32 @@ export class ExchangeWrapper extends ContractWrapper { * Cancel a given fill amount of an order. Cancellations are cumulative. * @param order An object that conforms to the Order or SignedOrder interface. * The order you would like to cancel. - * @param takerTokenCancelAmount The amount (specified in taker tokens) that you would like to cancel. + * @param cancelTakerTokenAmount The amount (specified in taker tokens) that you would like to cancel. * @return The amount of the order that was cancelled (in taker token baseUnits). */ @decorators.contractCallErrorHandler public async cancelOrderAsync( - order: Order|SignedOrder, takerTokenCancelAmount: BigNumber.BigNumber): Promise<BigNumber.BigNumber> { + order: Order|SignedOrder, cancelTakerTokenAmount: BigNumber.BigNumber): Promise<BigNumber.BigNumber> { assert.doesConformToSchema('order', order, orderSchema); - assert.isBigNumber('takerTokenCancelAmount', takerTokenCancelAmount); + assert.isBigNumber('takerTokenCancelAmount', cancelTakerTokenAmount); await assert.isSenderAddressAsync('order.maker', order.maker, this._web3Wrapper); const exchangeInstance = await this._getExchangeContractAsync(order.exchangeContractAddress); - await this._validateCancelOrderAndThrowIfInvalidAsync(order, takerTokenCancelAmount); + await this._validateCancelOrderAndThrowIfInvalidAsync(order, cancelTakerTokenAmount); const [orderAddresses, orderValues] = ExchangeWrapper._getOrderAddressesAndValues(order); - const gas = await exchangeInstance.cancel.estimateGas( + const gas = await exchangeInstance.cancelOrder.estimateGas( orderAddresses, orderValues, - takerTokenCancelAmount, + cancelTakerTokenAmount, { from: order.maker, }, ); - const response: ContractResponse = await exchangeInstance.cancel( + const response: ContractResponse = await exchangeInstance.cancelOrder( orderAddresses, orderValues, - takerTokenCancelAmount, + cancelTakerTokenAmount, { from: order.maker, gas, @@ -510,8 +520,8 @@ export class ExchangeWrapper extends ContractWrapper { ); this._throwErrorLogsAsErrors(response.logs); const logFillArgs = response.logs[0].args as LogCancelContractEventArgs; - const cancelledAmount = new BigNumber(logFillArgs.cancelledValueT); - return cancelledAmount; + const cancelledTakerTokenAmount = new BigNumber(logFillArgs.cancelledTakerTokenAmount); + return cancelledTakerTokenAmount; } /** * Batch version of cancelOrderAsync. Atomically cancels multiple orders in a single transaction. @@ -549,20 +559,20 @@ export class ExchangeWrapper extends ContractWrapper { ]; }); // We use _.unzip<any> because _.unzip doesn't type check if values have different types :'( - const [orderAddresses, orderValues, takerTokenCancelAmounts] = + const [orderAddresses, orderValues, cancelTakerTokenAmounts] = _.unzip<any>(orderAddressesValuesAndTakerTokenCancelAmounts); - const gas = await exchangeInstance.batchCancel.estimateGas( + const gas = await exchangeInstance.batchCancelOrders.estimateGas( orderAddresses, orderValues, - takerTokenCancelAmounts, + cancelTakerTokenAmounts, { from: maker, }, ); - const response: ContractResponse = await exchangeInstance.batchCancel( + const response: ContractResponse = await exchangeInstance.batchCancelOrders( orderAddresses, orderValues, - takerTokenCancelAmounts, + cancelTakerTokenAmounts, { from: maker, gas, @@ -764,14 +774,14 @@ export class ExchangeWrapper extends ContractWrapper { throw new Error(errMessage); } } - private async _isRoundingErrorAsync(takerTokenAmount: BigNumber.BigNumber, - fillTakerAmount: BigNumber.BigNumber, + private async _isRoundingErrorAsync(numerator: BigNumber.BigNumber, + demoninator: BigNumber.BigNumber, makerTokenAmount: BigNumber.BigNumber, exchangeContractAddress: string): Promise<boolean> { await assert.isUserAddressAvailableAsync(this._web3Wrapper); const exchangeInstance = await this._getExchangeContractAsync(exchangeContractAddress); const isRoundingError = await exchangeInstance.isRoundingError.call( - takerTokenAmount, fillTakerAmount, makerTokenAmount, + demoninator, numerator, makerTokenAmount, ); return isRoundingError; } @@ -800,7 +810,7 @@ export class ExchangeWrapper extends ContractWrapper { } private async _getZRXTokenAddressAsync(exchangeContractAddress: string): Promise<string> { const exchangeInstance = await this._getExchangeContractAsync(exchangeContractAddress); - const ZRXtokenAddress = await exchangeInstance.ZRX.call(); + const ZRXtokenAddress = await exchangeInstance.ZRX_TOKEN_CONTRACT.call(); return ZRXtokenAddress; } } diff --git a/src/types.ts b/src/types.ts index 66881e170..851627a09 100644 --- a/src/types.ts +++ b/src/types.ts @@ -61,56 +61,69 @@ export interface ExchangeContract extends ContractInstance { LogFill: CreateContractEvent; LogCancel: CreateContractEvent; LogError: CreateContractEvent; - ZRX: { + ZRX_TOKEN_CONTRACT: { call: () => Promise<string>; }; - getUnavailableValueT: { + getUnavailableTakerTokenAmount: { call: (orderHash: string) => BigNumber.BigNumber; }; isRoundingError: { call: (takerTokenAmount: BigNumber.BigNumber, fillTakerAmount: BigNumber.BigNumber, makerTokenAmount: BigNumber.BigNumber, txOpts?: TxOpts) => Promise<boolean>; }; - fill: { - (orderAddresses: OrderAddresses, orderValues: OrderValues, fillAmount: BigNumber.BigNumber, - shouldCheckTransfer: boolean, v: number, r: string, s: string, txOpts?: TxOpts): ContractResponse; - estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, fillAmount: BigNumber.BigNumber, - shouldCheckTransfer: boolean, v: number, r: string, s: string, txOpts?: TxOpts) => number; + fillOrder: { + (orderAddresses: OrderAddresses, orderValues: OrderValues, fillTakerTokenAmount: BigNumber.BigNumber, + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + v: number, r: string, s: string, txOpts?: TxOpts): ContractResponse; + estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, + fillTakerTokenAmount: BigNumber.BigNumber, + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + v: number, r: string, s: string, txOpts?: TxOpts) => number; }; - batchFill: { - (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillAmounts: BigNumber.BigNumber[], - shouldCheckTransfer: boolean, v: number[], r: string[], s: string[], txOpts?: TxOpts): ContractResponse; - estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillAmounts: BigNumber.BigNumber[], - shouldCheckTransfer: boolean, v: number[], r: string[], s: string[], txOpts?: TxOpts) => number; + batchFillOrders: { + (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmounts: BigNumber.BigNumber[], + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + v: number[], r: string[], s: string[], txOpts?: TxOpts): ContractResponse; + estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], + fillTakerTokenAmounts: BigNumber.BigNumber[], + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + v: number[], r: string[], s: string[], txOpts?: TxOpts) => number; }; - fillUpTo: { - (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillAmount: BigNumber.BigNumber, - shouldCheckTransfer: boolean, v: number[], r: string[], s: string[], txOpts?: TxOpts): ContractResponse; - estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillAmount: BigNumber.BigNumber, - shouldCheckTransfer: boolean, v: number[], r: string[], s: string[], txOpts?: TxOpts) => number; + fillOrdersUpTo: { + (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmount: BigNumber.BigNumber, + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + v: number[], r: string[], s: string[], txOpts?: TxOpts): ContractResponse; + estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], + fillTakerTokenAmount: BigNumber.BigNumber, + shouldThrowOnInsufficientBalanceOrAllowance: boolean, + v: number[], r: string[], s: string[], txOpts?: TxOpts) => number; }; - cancel: { - (orderAddresses: OrderAddresses, orderValues: OrderValues, cancelAmount: BigNumber.BigNumber, + cancelOrder: { + (orderAddresses: OrderAddresses, orderValues: OrderValues, canceltakerTokenAmount: BigNumber.BigNumber, txOpts?: TxOpts): ContractResponse; - estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, cancelAmount: BigNumber.BigNumber, + estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, + canceltakerTokenAmount: BigNumber.BigNumber, txOpts?: TxOpts) => number; }; - batchCancel: { - (orderAddresses: OrderAddresses[], orderValues: OrderValues[], cancelAmount: BigNumber.BigNumber[], + batchCancelOrders: { + (orderAddresses: OrderAddresses[], orderValues: OrderValues[], cancelTakerTokenAmounts: BigNumber.BigNumber[], txOpts?: TxOpts): ContractResponse; - estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], cancelAmount: BigNumber.BigNumber[], + estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], + cancelTakerTokenAmounts: BigNumber.BigNumber[], txOpts?: TxOpts) => number; }; - fillOrKill: { - (orderAddresses: OrderAddresses, orderValues: OrderValues, fillAmount: BigNumber.BigNumber, + fillOrKillOrder: { + (orderAddresses: OrderAddresses, orderValues: OrderValues, fillTakerTokenAmount: BigNumber.BigNumber, v: number, r: string, s: string, txOpts?: TxOpts): ContractResponse; - estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, fillAmount: BigNumber.BigNumber, + estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, + fillTakerTokenAmount: BigNumber.BigNumber, v: number, r: string, s: string, txOpts?: TxOpts) => number; }; - batchFillOrKill: { - (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillValuesT: BigNumber.BigNumber[], + batchFillOrKillOrders: { + (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmounts: BigNumber.BigNumber[], v: number[], r: string[], s: string[], txOpts: TxOpts): ContractResponse; - estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillValuesT: BigNumber.BigNumber[], + estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], + fillTakerTokenAmounts: BigNumber.BigNumber[], v: number[], r: string[], s: string[], txOpts?: TxOpts) => number; }; filled: { @@ -221,22 +234,22 @@ export interface LogFillContractEventArgs { maker: string; taker: string; feeRecipient: string; - tokenM: string; - tokenT: string; - filledValueM: BigNumber.BigNumber; - filledValueT: BigNumber.BigNumber; - feeMPaid: BigNumber.BigNumber; - feeTPaid: BigNumber.BigNumber; + makerToken: string; + takerToken: string; + filledMakerTokenAmount: BigNumber.BigNumber; + filledTakerTokenAmount: BigNumber.BigNumber; + paidMakerFee: BigNumber.BigNumber; + paidTakerFee: BigNumber.BigNumber; tokens: string; orderHash: string; } export interface LogCancelContractEventArgs { maker: string; feeRecipient: string; - tokenM: string; - tokenT: string; - cancelledValueM: BigNumber.BigNumber; - cancelledValueT: BigNumber.BigNumber; + makerToken: string; + takerToken: string; + cancelledMakerTokenAmount: BigNumber.BigNumber; + cancelledTakerTokenAmount: BigNumber.BigNumber; tokens: string; orderHash: string; } diff --git a/src/utils/event_utils.ts b/src/utils/event_utils.ts index 07418cbc4..e8f30e1a8 100644 --- a/src/utils/event_utils.ts +++ b/src/utils/event_utils.ts @@ -1,5 +1,4 @@ import * as _ from 'lodash'; -import * as Web3 from 'web3'; import {EventCallback, ContractEventArg, ContractEvent, ContractEventObj, ContractEventEmitter} from '../types'; import * as BigNumber from 'bignumber.js'; import promisify = require('es6-promisify'); @@ -29,10 +28,8 @@ export const eventUtils = { const wrapIfBigNumber = (value: ContractEventArg): ContractEventArg => { // HACK: The old version of BigNumber used by Web3@0.19.0 does not support the `isBigNumber` // and checking for a BigNumber instance using `instanceof` does not work either. We therefore - // compare the constructor functions of the possible BigNumber instance and the BigNumber used by - // Web3. - const web3BigNumber = (Web3.prototype as any).BigNumber; - const isWeb3BigNumber = web3BigNumber.toString() === value.constructor.toString(); + // check if the value constructor is a bignumber constructor. + const isWeb3BigNumber = _.startsWith(value.constructor.toString(), 'function BigNumber('); return isWeb3BigNumber ? new BigNumber(value) : value; }; event.args = _.mapValues(event.args, wrapIfBigNumber); diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index 53032efd6..ed2e45abf 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -785,10 +785,10 @@ describe('ExchangeWrapper', () => { ); zeroExEvent.watch((err: Error, event: ContractEvent) => { const args = event.args as LogFillContractEventArgs; - expect(args.filledValueM.isBigNumber).to.be.true(); - expect(args.filledValueT.isBigNumber).to.be.true(); - expect(args.feeMPaid.isBigNumber).to.be.true(); - expect(args.feeTPaid.isBigNumber).to.be.true(); + expect(args.filledMakerTokenAmount.isBigNumber).to.be.true(); + expect(args.filledTakerTokenAmount.isBigNumber).to.be.true(); + expect(args.paidMakerFee.isBigNumber).to.be.true(); + expect(args.paidTakerFee.isBigNumber).to.be.true(); done(); }); await zeroEx.exchange.fillOrderAsync( |