aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/libs
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-12-19 14:37:36 +0800
committerGreg Hysen <greg.hysen@gmail.com>2019-01-15 02:49:44 +0800
commitf8684d6a776724d0172c30126a7277885ed4e966 (patch)
tree8f9c318fa5f60f3abddd7b1c573e184021d8ba6c /contracts/libs
parente4551c8f6037302124cae4cda51b8f7624ade687 (diff)
downloaddexon-sol-tools-f8684d6a776724d0172c30126a7277885ed4e966.tar
dexon-sol-tools-f8684d6a776724d0172c30126a7277885ed4e966.tar.gz
dexon-sol-tools-f8684d6a776724d0172c30126a7277885ed4e966.tar.bz2
dexon-sol-tools-f8684d6a776724d0172c30126a7277885ed4e966.tar.lz
dexon-sol-tools-f8684d6a776724d0172c30126a7277885ed4e966.tar.xz
dexon-sol-tools-f8684d6a776724d0172c30126a7277885ed4e966.tar.zst
dexon-sol-tools-f8684d6a776724d0172c30126a7277885ed4e966.zip
All contract tests working with new abi encoder
Diffstat (limited to 'contracts/libs')
-rw-r--r--contracts/libs/contracts/test/TestLibs/TestLibs.sol26
1 files changed, 26 insertions, 0 deletions
diff --git a/contracts/libs/contracts/test/TestLibs/TestLibs.sol b/contracts/libs/contracts/test/TestLibs/TestLibs.sol
index bd5f9f9da..7a090adfb 100644
--- a/contracts/libs/contracts/test/TestLibs/TestLibs.sol
+++ b/contracts/libs/contracts/test/TestLibs/TestLibs.sol
@@ -48,6 +48,32 @@ contract TestLibs is
return fillOrderCalldata;
}
+ function publicAbiDecodeFillOrder(
+ bytes memory fillOrderCalldata
+ )
+ public
+ pure
+ returns (
+ Order memory order,
+ uint256 takerAssetFillAmount,
+ bytes memory signature
+ )
+ {
+ (
+ order,
+ takerAssetFillAmount,
+ signature
+ ) = abi.decode(
+ fillOrderCalldata,
+ "((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"
+ );
+ return (
+ order,
+ takerAssetFillAmount,
+ signature
+ );
+ }
+
function publicGetPartialAmountFloor(
uint256 numerator,
uint256 denominator,