diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-06 17:10:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-06 17:10:55 +0800 |
commit | b21f6e4d8652eb402fc1c8bbf8a13a024d945c74 (patch) | |
tree | 106a622d3b121c61fa011cd7e4134c12dd788b3a /packages/contracts/test/multisig/asset_proxy_owner.ts | |
parent | bc52303402e6ee1b3ab9d948d909d1d10ebf26e4 (diff) | |
parent | 0c8264801ac15952861724ecd6a2620dc3055e5e (diff) | |
download | dexon-0x-contracts-b21f6e4d8652eb402fc1c8bbf8a13a024d945c74.tar.gz dexon-0x-contracts-b21f6e4d8652eb402fc1c8bbf8a13a024d945c74.tar.zst dexon-0x-contracts-b21f6e4d8652eb402fc1c8bbf8a13a024d945c74.zip |
Merge pull request #822 from 0xProject/v2-contract-wrappers-WIP
V2 contract wrappers
Diffstat (limited to 'packages/contracts/test/multisig/asset_proxy_owner.ts')
-rw-r--r-- | packages/contracts/test/multisig/asset_proxy_owner.ts | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/packages/contracts/test/multisig/asset_proxy_owner.ts b/packages/contracts/test/multisig/asset_proxy_owner.ts index 16231dfcb..10fed6815 100644 --- a/packages/contracts/test/multisig/asset_proxy_owner.ts +++ b/packages/contracts/test/multisig/asset_proxy_owner.ts @@ -4,11 +4,11 @@ import * as chai from 'chai'; import { LogWithDecodedArgs } from 'ethereum-types'; import { + AssetProxyOwnerAssetProxyRegistrationEventArgs, AssetProxyOwnerContract, - AssetProxyRegistrationContractEventArgs, - ExecutionContractEventArgs, - ExecutionFailureContractEventArgs, - SubmissionContractEventArgs, + AssetProxyOwnerExecutionEventArgs, + AssetProxyOwnerExecutionFailureEventArgs, + AssetProxyOwnerSubmissionEventArgs, } from '../../generated_contract_wrappers/asset_proxy_owner'; import { MixinAuthorizableContract } from '../../generated_contract_wrappers/mixin_authorizable'; import { TestAssetProxyOwnerContract } from '../../generated_contract_wrappers/test_asset_proxy_owner'; @@ -171,14 +171,16 @@ describe('AssetProxyOwner', () => { owners[0], ); - const log = submitTxRes.logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; + const log = submitTxRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>; const txId = log.args.transactionId; await multiSigWrapper.confirmTransactionAsync(txId, owners[1]); await increaseTimeAndMineBlockAsync(SECONDS_TIME_LOCKED.toNumber()); const executeTxRes = await multiSigWrapper.executeTransactionAsync(txId, owners[0]); - const registerLog = executeTxRes.logs[0] as LogWithDecodedArgs<AssetProxyRegistrationContractEventArgs>; + const registerLog = executeTxRes.logs[0] as LogWithDecodedArgs< + AssetProxyOwnerAssetProxyRegistrationEventArgs + >; expect(registerLog.args.assetProxyContract).to.equal(addressToRegister); expect(registerLog.args.isRegistered).to.equal(isRegistered); @@ -200,14 +202,14 @@ describe('AssetProxyOwner', () => { registerAssetProxyData, owners[0], ); - const log = submitTxRes.logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; + const log = submitTxRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>; const txId = log.args.transactionId; await multiSigWrapper.confirmTransactionAsync(txId, owners[1]); await increaseTimeAndMineBlockAsync(SECONDS_TIME_LOCKED.toNumber()); const executeTxRes = await multiSigWrapper.executeTransactionAsync(txId, owners[0]); - const failureLog = executeTxRes.logs[0] as LogWithDecodedArgs<ExecutionFailureContractEventArgs>; + const failureLog = executeTxRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerExecutionFailureEventArgs>; expect(failureLog.args.transactionId).to.be.bignumber.equal(txId); const isAssetProxyRegistered = await testAssetProxyOwner.isAssetProxyRegistered.callAsync( @@ -234,7 +236,7 @@ describe('AssetProxyOwner', () => { owners[0], ); const registerAssetProxySubmitLog = registerAssetProxySubmitRes.logs[0] as LogWithDecodedArgs< - SubmissionContractEventArgs + AssetProxyOwnerSubmissionEventArgs >; const registerAssetProxyTxId = registerAssetProxySubmitLog.args.transactionId; await multiSigWrapper.confirmTransactionAsync(registerAssetProxyTxId, owners[1]); @@ -251,10 +253,10 @@ describe('AssetProxyOwner', () => { owners[0], ); const erc20AddAuthorizedAddressSubmitLog = erc20AddAuthorizedAddressSubmitRes.logs[0] as LogWithDecodedArgs< - SubmissionContractEventArgs + AssetProxyOwnerSubmissionEventArgs >; const erc721AddAuthorizedAddressSubmitLog = erc721AddAuthorizedAddressSubmitRes - .logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; + .logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>; const erc20AddAuthorizedAddressTxId = erc20AddAuthorizedAddressSubmitLog.args.transactionId; const erc721AddAuthorizedAddressTxId = erc721AddAuthorizedAddressSubmitLog.args.transactionId; @@ -276,7 +278,7 @@ describe('AssetProxyOwner', () => { notRemoveAuthorizedAddressData, owners[0], ); - const log = submitTxRes.logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; + const log = submitTxRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>; const txId = log.args.transactionId; return expectContractCallFailedWithoutReasonAsync( testAssetProxyOwner.testValidRemoveAuthorizedAddressAtIndexTx.callAsync(txId), @@ -293,7 +295,7 @@ describe('AssetProxyOwner', () => { removeAuthorizedAddressAtIndexData, owners[0], ); - const log = submitTxRes.logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; + const log = submitTxRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>; const txId = log.args.transactionId; const isValidRemoveAuthorizedAddressAtIndexTx = await testAssetProxyOwner.testValidRemoveAuthorizedAddressAtIndexTx.callAsync( txId, @@ -311,7 +313,7 @@ describe('AssetProxyOwner', () => { removeAuthorizedAddressAtIndexData, owners[0], ); - const log = submitTxRes.logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; + const log = submitTxRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>; const txId = log.args.transactionId; return expectContractCallFailedWithoutReasonAsync( testAssetProxyOwner.testValidRemoveAuthorizedAddressAtIndexTx.callAsync(txId), @@ -330,7 +332,7 @@ describe('AssetProxyOwner', () => { removeAuthorizedAddressAtIndexData, owners[0], ); - const log = res.logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; + const log = res.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>; const txId = log.args.transactionId; return expectTransactionFailedWithoutReasonAsync( @@ -350,7 +352,7 @@ describe('AssetProxyOwner', () => { removeAuthorizedAddressAtIndexData, owners[0], ); - const log = res.logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; + const log = res.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>; const txId = log.args.transactionId; await multiSigWrapper.confirmTransactionAsync(txId, owners[1]); @@ -372,7 +374,7 @@ describe('AssetProxyOwner', () => { addAuthorizedAddressData, owners[0], ); - const log = res.logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; + const log = res.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>; const txId = log.args.transactionId; await multiSigWrapper.confirmTransactionAsync(txId, owners[1]); @@ -394,13 +396,13 @@ describe('AssetProxyOwner', () => { removeAuthorizedAddressAtIndexData, owners[0], ); - const submitLog = submitRes.logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; + const submitLog = submitRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>; const txId = submitLog.args.transactionId; await multiSigWrapper.confirmTransactionAsync(txId, owners[1]); const execRes = await multiSigWrapper.executeRemoveAuthorizedAddressAtIndexAsync(txId, owners[0]); - const execLog = execRes.logs[0] as LogWithDecodedArgs<ExecutionContractEventArgs>; + const execLog = execRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerExecutionEventArgs>; expect(execLog.args.transactionId).to.be.bignumber.equal(txId); const tx = await testAssetProxyOwner.transactions.callAsync(txId); @@ -421,13 +423,13 @@ describe('AssetProxyOwner', () => { removeAuthorizedAddressAtIndexData, owners[0], ); - const submitLog = submitRes.logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; + const submitLog = submitRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>; const txId = submitLog.args.transactionId; await multiSigWrapper.confirmTransactionAsync(txId, owners[1]); const execRes = await multiSigWrapper.executeRemoveAuthorizedAddressAtIndexAsync(txId, owners[0]); - const execLog = execRes.logs[0] as LogWithDecodedArgs<ExecutionContractEventArgs>; + const execLog = execRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerExecutionEventArgs>; expect(execLog.args.transactionId).to.be.bignumber.equal(txId); const tx = await testAssetProxyOwner.transactions.callAsync(txId); |