aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/current
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-02-05 22:33:09 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-03-02 04:21:09 +0800
commit425039e4d3e45b27e1bac7338fa70e59eb438df2 (patch)
tree095e2e75afe0c933056b5c146b618984e8fedc73 /packages/contracts/src/current
parent6c5333180d6207f273219de3fb0c269a81e2ae48 (diff)
downloaddexon-sol-tools-425039e4d3e45b27e1bac7338fa70e59eb438df2.tar
dexon-sol-tools-425039e4d3e45b27e1bac7338fa70e59eb438df2.tar.gz
dexon-sol-tools-425039e4d3e45b27e1bac7338fa70e59eb438df2.tar.bz2
dexon-sol-tools-425039e4d3e45b27e1bac7338fa70e59eb438df2.tar.lz
dexon-sol-tools-425039e4d3e45b27e1bac7338fa70e59eb438df2.tar.xz
dexon-sol-tools-425039e4d3e45b27e1bac7338fa70e59eb438df2.tar.zst
dexon-sol-tools-425039e4d3e45b27e1bac7338fa70e59eb438df2.zip
Don't pass tokenGet and tokenGive because we can get them from 0x order
Diffstat (limited to 'packages/contracts/src/current')
-rw-r--r--packages/contracts/src/current/tutorials/Arbitrage/Arbitrage.sol20
1 files changed, 9 insertions, 11 deletions
diff --git a/packages/contracts/src/current/tutorials/Arbitrage/Arbitrage.sol b/packages/contracts/src/current/tutorials/Arbitrage/Arbitrage.sol
index f355cfefc..8a744fd8e 100644
--- a/packages/contracts/src/current/tutorials/Arbitrage/Arbitrage.sol
+++ b/packages/contracts/src/current/tutorials/Arbitrage/Arbitrage.sol
@@ -31,9 +31,7 @@ contract Arbitrage is Ownable {
*
* addresses
* 0..4 orderAddresses
- * 5 tokenGet
- * 6 tokenGive
- * 7 user
+ * 5 user
*
* values
* 0..5 orderValues
@@ -48,7 +46,7 @@ contract Arbitrage is Ownable {
* exchange then etherDelta
*/
function makeAtomicTrade(
- address[8] addresses, uint[12] values,
+ address[6] addresses, uint[12] values,
uint8[2] v, bytes32[2] r, bytes32[2] s
) external onlyOwner {
makeExchangeTrade(addresses, values, v, r, s);
@@ -56,29 +54,29 @@ contract Arbitrage is Ownable {
}
function makeEtherDeltaTrade(
- address[8] addresses, uint[12] values,
+ address[6] addresses, uint[12] values,
uint8[2] v, bytes32[2] r, bytes32[2] s
) internal {
uint amount = values[11];
- etherDelta.depositToken(addresses[5], values[7]);
+ etherDelta.depositToken(addresses[2], values[7]);
etherDelta.trade(
- addresses[5],
+ addresses[2],
values[7],
- addresses[6],
+ addresses[3],
values[8],
values[9],
values[10],
- addresses[7],
+ addresses[5],
v[1],
r[1],
s[1],
amount
);
- etherDelta.withdrawToken(addresses[6], values[8]);
+ etherDelta.withdrawToken(addresses[3], values[8]);
}
function makeExchangeTrade(
- address[8] addresses, uint[12] values,
+ address[6] addresses, uint[12] values,
uint8[2] v, bytes32[2] r, bytes32[2] s
) internal {
address[5] memory orderAddresses = [