diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-11-30 10:24:19 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-12-19 05:36:05 +0800 |
commit | 4e341582ae74d7ab1c52c4e888d72c0c1c78e890 (patch) | |
tree | 058c63bc5dda350994f6ad936c7d47fb1bd5c2ba /packages/contracts/test/extensions/compliant_forwarder.ts | |
parent | 37a1271af256af2c0a64b947b3c212a749b540b0 (diff) | |
download | dexon-sol-tools-4e341582ae74d7ab1c52c4e888d72c0c1c78e890.tar dexon-sol-tools-4e341582ae74d7ab1c52c4e888d72c0c1c78e890.tar.gz dexon-sol-tools-4e341582ae74d7ab1c52c4e888d72c0c1c78e890.tar.bz2 dexon-sol-tools-4e341582ae74d7ab1c52c4e888d72c0c1c78e890.tar.lz dexon-sol-tools-4e341582ae74d7ab1c52c4e888d72c0c1c78e890.tar.xz dexon-sol-tools-4e341582ae74d7ab1c52c4e888d72c0c1c78e890.tar.zst dexon-sol-tools-4e341582ae74d7ab1c52c4e888d72c0c1c78e890.zip |
Extract makerAddress in assembly
Diffstat (limited to 'packages/contracts/test/extensions/compliant_forwarder.ts')
-rw-r--r-- | packages/contracts/test/extensions/compliant_forwarder.ts | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/packages/contracts/test/extensions/compliant_forwarder.ts b/packages/contracts/test/extensions/compliant_forwarder.ts index c962d82ac..b916f54c9 100644 --- a/packages/contracts/test/extensions/compliant_forwarder.ts +++ b/packages/contracts/test/extensions/compliant_forwarder.ts @@ -26,6 +26,9 @@ import { TransactionFactory } from '../utils/transaction_factory'; import { ContractName, ERC20BalancesByOwner, SignedTransaction } from '../utils/types'; import { provider, txDefaults, web3Wrapper } from '../utils/web3_wrapper'; +import { MethodAbi } from 'ethereum-types'; +import { AbiEncoder } from '@0x/utils'; + chaiSetup.configure(); const expect = chai.expect; const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); @@ -192,7 +195,18 @@ describe.only(ContractName.CompliantForwarder, () => { beforeEach(async () => { erc20Balances = await erc20Wrapper.getBalancesAsync(); }); - it('should transfer the correct amounts when maker and taker are compliant', async () => { + it.only('should transfer the correct amounts when maker and taker are compliant', async () => { + + + const method = new AbiEncoder.Method(compliantForwarderInstance.abi[0] as MethodAbi); + const args = [ + compliantSignedFillOrderTx.salt, + compliantSignedFillOrderTx.signerAddress, + compliantSignedFillOrderTx.data, + compliantSignedFillOrderTx.signature + ]; + console.log(method.encode(args, {annotate: true})); + await compliantForwarderInstance.executeTransaction.sendTransactionAsync( compliantSignedFillOrderTx.salt, compliantSignedFillOrderTx.signerAddress, |