diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-23 00:45:45 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-23 00:45:45 +0800 |
commit | 4409f11b24324e23ee2f53436c0226028820e96d (patch) | |
tree | decd3546252542e2c865c460675b9a2e0a9c27bb /packages/contracts/test/asset_proxy | |
parent | 7a216901bec6f7f3640d41fb90dcc49ed673cc6f (diff) | |
download | dexon-sol-tools-4409f11b24324e23ee2f53436c0226028820e96d.tar dexon-sol-tools-4409f11b24324e23ee2f53436c0226028820e96d.tar.gz dexon-sol-tools-4409f11b24324e23ee2f53436c0226028820e96d.tar.bz2 dexon-sol-tools-4409f11b24324e23ee2f53436c0226028820e96d.tar.lz dexon-sol-tools-4409f11b24324e23ee2f53436c0226028820e96d.tar.xz dexon-sol-tools-4409f11b24324e23ee2f53436c0226028820e96d.tar.zst dexon-sol-tools-4409f11b24324e23ee2f53436c0226028820e96d.zip |
Rename ContractLibErrors to RevertReasons
Diffstat (limited to 'packages/contracts/test/asset_proxy')
-rw-r--r-- | packages/contracts/test/asset_proxy/authorizable.ts | 10 | ||||
-rw-r--r-- | packages/contracts/test/asset_proxy/proxies.ts | 18 |
2 files changed, 14 insertions, 14 deletions
diff --git a/packages/contracts/test/asset_proxy/authorizable.ts b/packages/contracts/test/asset_proxy/authorizable.ts index 1ebb094a1..267444ee6 100644 --- a/packages/contracts/test/asset_proxy/authorizable.ts +++ b/packages/contracts/test/asset_proxy/authorizable.ts @@ -8,7 +8,7 @@ import { } from '../../src/utils/assertions'; import { chaiSetup } from '../../src/utils/chai_setup'; import { constants } from '../../src/utils/constants'; -import { ContractLibErrors } from '../../src/utils/types'; +import { RevertReasons } from '../../src/utils/types'; import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper'; chaiSetup.configure(); @@ -47,7 +47,7 @@ describe('Authorizable', () => { it('should throw if not called by owner', async () => { return expectRevertReasonOrAlwaysFailingTransactionAsync( authorizable.addAuthorizedAddress.sendTransactionAsync(notOwner, { from: notOwner }), - ContractLibErrors.OnlyContractOwner, + RevertReasons.OnlyContractOwner, ); }); it('should allow owner to add an authorized address', async () => { @@ -65,7 +65,7 @@ describe('Authorizable', () => { ); return expectRevertReasonOrAlwaysFailingTransactionAsync( authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }), - ContractLibErrors.TargetAlreadyAuthorized, + RevertReasons.TargetAlreadyAuthorized, ); }); }); @@ -80,7 +80,7 @@ describe('Authorizable', () => { authorizable.removeAuthorizedAddress.sendTransactionAsync(address, { from: notOwner, }), - ContractLibErrors.OnlyContractOwner, + RevertReasons.OnlyContractOwner, ); }); @@ -104,7 +104,7 @@ describe('Authorizable', () => { authorizable.removeAuthorizedAddress.sendTransactionAsync(address, { from: owner, }), - ContractLibErrors.TargetNotAuthorized, + RevertReasons.TargetNotAuthorized, ); }); }); diff --git a/packages/contracts/test/asset_proxy/proxies.ts b/packages/contracts/test/asset_proxy/proxies.ts index 2c1f52973..0429a3137 100644 --- a/packages/contracts/test/asset_proxy/proxies.ts +++ b/packages/contracts/test/asset_proxy/proxies.ts @@ -24,7 +24,7 @@ import { constants } from '../../src/utils/constants'; import { ERC20Wrapper } from '../../src/utils/erc20_wrapper'; import { ERC721Wrapper } from '../../src/utils/erc721_wrapper'; import { LogDecoder } from '../../src/utils/log_decoder'; -import { ContractLibErrors } from '../../src/utils/types'; +import { RevertReasons } from '../../src/utils/types'; import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper'; chaiSetup.configure(); @@ -172,7 +172,7 @@ describe('Asset Transfer Proxies', () => { transferAmount, { from: exchangeAddress }, ), - ContractLibErrors.TransferFailed, + RevertReasons.TransferFailed, ); }); @@ -192,7 +192,7 @@ describe('Asset Transfer Proxies', () => { from: notAuthorized, }, ), - ContractLibErrors.SenderNotAuthorized, + RevertReasons.SenderNotAuthorized, ); }); }); @@ -246,7 +246,7 @@ describe('Asset Transfer Proxies', () => { erc20Proxy.batchTransferFrom.sendTransactionAsync(assetData, fromAddresses, toAddresses, amounts, { from: notAuthorized, }), - ContractLibErrors.SenderNotAuthorized, + RevertReasons.SenderNotAuthorized, ); }); }); @@ -392,7 +392,7 @@ describe('Asset Transfer Proxies', () => { amount, { from: exchangeAddress }, ), - ContractLibErrors.InvalidAmount, + RevertReasons.InvalidAmount, ); }); @@ -413,7 +413,7 @@ describe('Asset Transfer Proxies', () => { amount, { from: exchangeAddress }, ), - ContractLibErrors.InvalidAmount, + RevertReasons.InvalidAmount, ); }); @@ -440,7 +440,7 @@ describe('Asset Transfer Proxies', () => { from: exchangeAddress, }, ), - ContractLibErrors.TransferFailed, + RevertReasons.TransferFailed, ); }); @@ -458,7 +458,7 @@ describe('Asset Transfer Proxies', () => { amount, { from: notAuthorized }, ), - ContractLibErrors.SenderNotAuthorized, + RevertReasons.SenderNotAuthorized, ); }); }); @@ -513,7 +513,7 @@ describe('Asset Transfer Proxies', () => { erc721Proxy.batchTransferFrom.sendTransactionAsync(assetData, fromAddresses, toAddresses, amounts, { from: notAuthorized, }), - ContractLibErrors.SenderNotAuthorized, + RevertReasons.SenderNotAuthorized, ); }); }); |