aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-12-04 09:02:58 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-12-19 05:36:05 +0800
commit8007ef6c0b08ce7d2394323f000df7baeb254ebf (patch)
tree5ab3a03db1347608c6ff5e8c3fece99418777892
parenta332c5e5c2ff11a7d4bd534f694d7859483a33f0 (diff)
downloaddexon-sol-tools-8007ef6c0b08ce7d2394323f000df7baeb254ebf.tar.gz
dexon-sol-tools-8007ef6c0b08ce7d2394323f000df7baeb254ebf.tar.zst
dexon-sol-tools-8007ef6c0b08ce7d2394323f000df7baeb254ebf.zip
cleaning I
-rw-r--r--packages/contracts/contracts/extensions/CompliantForwarder/CompliantForwarder.sol18
1 files changed, 17 insertions, 1 deletions
diff --git a/packages/contracts/contracts/extensions/CompliantForwarder/CompliantForwarder.sol b/packages/contracts/contracts/extensions/CompliantForwarder/CompliantForwarder.sol
index ee32b135e..0c596dfc2 100644
--- a/packages/contracts/contracts/extensions/CompliantForwarder/CompliantForwarder.sol
+++ b/packages/contracts/contracts/extensions/CompliantForwarder/CompliantForwarder.sol
@@ -117,6 +117,22 @@ contract CompliantForwarder is ExchangeSelectors{
}
}
+ function exchangeCalldataload(offset) -> value {
+ value := calldataload(toExchangeCalldataOffset(offset, 0))
+ }
+
+
+ function appendMakerAddressesFromOrderSet2(orderSetParamIndex) -> one {
+ let orderSetPtr := exchangeCalldataload(0)
+ let orderSetLength := exchangeCalldataload(orderSetPtr)
+
+ for {let orderPtrOffset := add(0x20, orderSetPtr)} lt(orderPtrOffset, add(0x20, add(orderSetPtr, mul(0x20, orderSetLength)))) {orderPtrOffset := add(0x20, orderPtrOffset)} {
+ let orderPtr := exchangeCalldataload(orderPtrOffset)
+ let makerAddress := exchangeCalldataload(add(orderSetPtr, add(0x20, orderPtr)))
+ addAddressToValidate(makerAddress)
+ }
+ }
+
/*
function appendMakerAddressFromOrderSet(paramIndex) {
let exchangeTxPtr := calldataload(0x44)
@@ -137,7 +153,7 @@ contract CompliantForwarder is ExchangeSelectors{
switch selector
case 0x297bb70b00000000000000000000000000000000000000000000000000000000 /* batchFillOrders */
{
- one := appendMakerAddressesFromOrderSet(0)
+ one := appendMakerAddressesFromOrderSet2(0)
}
case 0x3c28d86100000000000000000000000000000000000000000000000000000000 /* matchOrders */
{