diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-04-17 09:29:47 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-21 04:56:18 +0800 |
commit | f4589b5bd4517cecc017bde91b0de9efbe75888b (patch) | |
tree | 59a93b8a509814723c6f4544bc7b38b22351aae4 /packages/contracts | |
parent | 3b7068e8d0cb5c77af41f175571ea968d104187e (diff) | |
download | dexon-sol-tools-f4589b5bd4517cecc017bde91b0de9efbe75888b.tar dexon-sol-tools-f4589b5bd4517cecc017bde91b0de9efbe75888b.tar.gz dexon-sol-tools-f4589b5bd4517cecc017bde91b0de9efbe75888b.tar.bz2 dexon-sol-tools-f4589b5bd4517cecc017bde91b0de9efbe75888b.tar.lz dexon-sol-tools-f4589b5bd4517cecc017bde91b0de9efbe75888b.tar.xz dexon-sol-tools-f4589b5bd4517cecc017bde91b0de9efbe75888b.tar.zst dexon-sol-tools-f4589b5bd4517cecc017bde91b0de9efbe75888b.zip |
Ran prettier
Diffstat (limited to 'packages/contracts')
-rw-r--r-- | packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts | 12 | ||||
-rw-r--r-- | packages/contracts/test/asset_proxy_dispatcher/proxies.ts | 37 | ||||
-rw-r--r-- | packages/contracts/test/exchange/core.ts | 12 | ||||
-rw-r--r-- | packages/contracts/test/exchange/wrapper.ts | 12 |
4 files changed, 15 insertions, 58 deletions
diff --git a/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts b/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts index 8445483d8..eb23a988f 100644 --- a/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts +++ b/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts @@ -57,21 +57,13 @@ describe('AssetProxyDispatcher', () => { }); // Deploy ERC20 Proxy const erc20ProxyInstance = await deployer.deployAsync(ContractName.ERC20Proxy); - erc20Proxy = new ERC20ProxyContract( - erc20ProxyInstance.abi, - erc20ProxyInstance.address, - provider, - ); + erc20Proxy = new ERC20ProxyContract(erc20ProxyInstance.abi, erc20ProxyInstance.address, provider); await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, { from: owner, }); // Deploy ERC721 Proxy const erc721ProxyInstance = await deployer.deployAsync(ContractName.ERC721Proxy); - erc721Proxy = new ERC721ProxyContract( - erc721ProxyInstance.abi, - erc721ProxyInstance.address, - provider, - ); + erc721Proxy = new ERC721ProxyContract(erc721ProxyInstance.abi, erc721ProxyInstance.address, provider); await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, { from: owner, }); diff --git a/packages/contracts/test/asset_proxy_dispatcher/proxies.ts b/packages/contracts/test/asset_proxy_dispatcher/proxies.ts index b405cc37d..d1129761e 100644 --- a/packages/contracts/test/asset_proxy_dispatcher/proxies.ts +++ b/packages/contracts/test/asset_proxy_dispatcher/proxies.ts @@ -48,21 +48,13 @@ describe('Asset Transfer Proxies', () => { takerAddress = accounts[4]; // Deploy ERC20 Proxy const erc20ProxyInstance = await deployer.deployAsync(ContractName.ERC20Proxy); - erc20Proxy = new ERC20ProxyContract( - erc20ProxyInstance.abi, - erc20ProxyInstance.address, - provider, - ); + erc20Proxy = new ERC20ProxyContract(erc20ProxyInstance.abi, erc20ProxyInstance.address, provider); await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcherAddress, { from: owner, }); // Deploy ERC721 Proxy const erc721ProxyInstance = await deployer.deployAsync(ContractName.ERC721Proxy); - erc721Proxy = new ERC721ProxyContract( - erc721ProxyInstance.abi, - erc721ProxyInstance.address, - provider, - ); + erc721Proxy = new ERC721ProxyContract(erc721ProxyInstance.abi, erc721ProxyInstance.address, provider); await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcherAddress, { from: owner, }); @@ -112,10 +104,7 @@ describe('Asset Transfer Proxies', () => { }); it('should successfully encode/decode metadata padded with zeros', async () => { - const metadata = await erc20Proxy.encodeMetadata.callAsync( - AssetProxyId.ERC20, - testAddressPaddedWithZeros, - ); + const metadata = await erc20Proxy.encodeMetadata.callAsync(AssetProxyId.ERC20, testAddressPaddedWithZeros); const address = await erc20Proxy.decodeMetadata.callAsync(metadata); expect(address).to.be.equal(testAddressPaddedWithZeros); }); @@ -195,13 +184,9 @@ describe('Asset Transfer Proxies', () => { // Perform a transfer from makerAddress to takerAddress const amount = new BigNumber(10); return expect( - erc20Proxy.transferFrom.sendTransactionAsync( - encodedProxyMetadata, - makerAddress, - takerAddress, - amount, - { from: notAuthorized }, - ), + erc20Proxy.transferFrom.sendTransactionAsync(encodedProxyMetadata, makerAddress, takerAddress, amount, { + from: notAuthorized, + }), ).to.be.rejectedWith(constants.REVERT); }); }); @@ -314,13 +299,9 @@ describe('Asset Transfer Proxies', () => { // Perform a transfer; expect this to fail. const amount = new BigNumber(1); return expect( - erc20Proxy.transferFrom.sendTransactionAsync( - encodedProxyMetadata, - makerAddress, - takerAddress, - amount, - { from: notAuthorized }, - ), + erc20Proxy.transferFrom.sendTransactionAsync(encodedProxyMetadata, makerAddress, takerAddress, amount, { + from: notAuthorized, + }), ).to.be.rejectedWith(constants.REVERT); }); diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts index 63fdf81c2..6971ac170 100644 --- a/packages/contracts/test/exchange/core.ts +++ b/packages/contracts/test/exchange/core.ts @@ -103,11 +103,7 @@ describe('Exchange', () => { ); // Deploy ERC20 Proxy const erc20ProxyInstance = await deployer.deployAsync(ContractName.ERC20Proxy); - erc20Proxy = new ERC20ProxyContract( - erc20ProxyInstance.abi, - erc20ProxyInstance.address, - provider, - ); + erc20Proxy = new ERC20ProxyContract(erc20ProxyInstance.abi, erc20ProxyInstance.address, provider); await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, { from: owner, }); @@ -119,11 +115,7 @@ describe('Exchange', () => { ); // Deploy ERC721 Proxy const erc721ProxyInstance = await deployer.deployAsync(ContractName.ERC721Proxy); - erc721Proxy = new ERC721ProxyContract( - erc721ProxyInstance.abi, - erc721ProxyInstance.address, - provider, - ); + erc721Proxy = new ERC721ProxyContract(erc721ProxyInstance.abi, erc721ProxyInstance.address, provider); await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, { from: owner, }); diff --git a/packages/contracts/test/exchange/wrapper.ts b/packages/contracts/test/exchange/wrapper.ts index 3ea4d9b92..fe754c679 100644 --- a/packages/contracts/test/exchange/wrapper.ts +++ b/packages/contracts/test/exchange/wrapper.ts @@ -84,11 +84,7 @@ describe('Exchange', () => { ); // Deploy ERC20 Proxy const erc20ProxyInstance = await deployer.deployAsync(ContractName.ERC20Proxy); - erc20Proxy = new ERC20ProxyContract( - erc20ProxyInstance.abi, - erc20ProxyInstance.address, - provider, - ); + erc20Proxy = new ERC20ProxyContract(erc20ProxyInstance.abi, erc20ProxyInstance.address, provider); await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, { from: owner, }); @@ -100,11 +96,7 @@ describe('Exchange', () => { ); // Deploy ERC721 Proxy const erc721ProxyInstance = await deployer.deployAsync(ContractName.ERC721Proxy); - erc721Proxy = new ERC721ProxyContract( - erc721ProxyInstance.abi, - erc721ProxyInstance.address, - provider, - ); + erc721Proxy = new ERC721ProxyContract(erc721ProxyInstance.abi, erc721ProxyInstance.address, provider); await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, { from: owner, }); |