diff options
Diffstat (limited to 'packages/contracts/test/multisig')
-rw-r--r-- | packages/contracts/test/multisig/asset_proxy_owner.ts | 44 | ||||
-rw-r--r-- | packages/contracts/test/multisig/multi_sig_with_time_lock.ts | 10 |
2 files changed, 28 insertions, 26 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); diff --git a/packages/contracts/test/multisig/multi_sig_with_time_lock.ts b/packages/contracts/test/multisig/multi_sig_with_time_lock.ts index a7b99d867..a8e9243a9 100644 --- a/packages/contracts/test/multisig/multi_sig_with_time_lock.ts +++ b/packages/contracts/test/multisig/multi_sig_with_time_lock.ts @@ -5,7 +5,7 @@ import { LogWithDecodedArgs } from 'ethereum-types'; import { MultiSigWalletWithTimeLockContract, - SubmissionContractEventArgs, + MultiSigWalletWithTimeLockSubmissionEventArgs, } from '../../generated_contract_wrappers/multi_sig_wallet_with_time_lock'; import { artifacts } from '../utils/artifacts'; import { expectTransactionFailedWithoutReasonAsync } from '../utils/assertions'; @@ -76,7 +76,7 @@ describe('MultiSigWalletWithTimeLock', () => { const destination = multiSig.address; const changeTimeLockData = multiSig.changeTimeLock.getABIEncodedTransactionData(SECONDS_TIME_LOCKED); const res = await multiSigWrapper.submitTransactionAsync(destination, changeTimeLockData, owners[0]); - const log = res.logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; + const log = res.logs[0] as LogWithDecodedArgs<MultiSigWalletWithTimeLockSubmissionEventArgs>; const txId = log.args.transactionId; return expectTransactionFailedWithoutReasonAsync( multiSig.executeTransaction.sendTransactionAsync(txId, { from: owners[0] }), @@ -87,7 +87,7 @@ describe('MultiSigWalletWithTimeLock', () => { const destination = multiSig.address; const changeTimeLockData = multiSig.changeTimeLock.getABIEncodedTransactionData(SECONDS_TIME_LOCKED); const subRes = await multiSigWrapper.submitTransactionAsync(destination, changeTimeLockData, owners[0]); - const subLog = subRes.logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; + const subLog = subRes.logs[0] as LogWithDecodedArgs<MultiSigWalletWithTimeLockSubmissionEventArgs>; const txId = subLog.args.transactionId; const confirmRes = await multiSigWrapper.confirmTransactionAsync(txId, owners[1]); @@ -105,7 +105,7 @@ describe('MultiSigWalletWithTimeLock', () => { const destination = multiSig.address; const changeTimeLockData = multiSig.changeTimeLock.getABIEncodedTransactionData(SECONDS_TIME_LOCKED); const subRes = await multiSigWrapper.submitTransactionAsync(destination, changeTimeLockData, owners[0]); - const subLog = subRes.logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; + const subLog = subRes.logs[0] as LogWithDecodedArgs<MultiSigWalletWithTimeLockSubmissionEventArgs>; const txId = subLog.args.transactionId; await multiSigWrapper.confirmTransactionAsync(txId, owners[1]); @@ -141,7 +141,7 @@ describe('MultiSigWalletWithTimeLock', () => { changeTimeLockData, owners[0], ); - const log = res.logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; + const log = res.logs[0] as LogWithDecodedArgs<MultiSigWalletWithTimeLockSubmissionEventArgs>; txId = log.args.transactionId; await multiSigWrapper.confirmTransactionAsync(txId, owners[1]); }); |