diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-10-05 19:41:42 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-10-05 19:41:42 +0800 |
commit | 80cbdf469e9b2611b5abe09fb61142b4640f23a1 (patch) | |
tree | 49de172f442554a66d6cd9cdee9d17ee3609caf7 /src/contract_wrappers/token_wrapper.ts | |
parent | acdc65c895bfaeaefc82b8a374f145c6c054e4a8 (diff) | |
download | dexon-sol-tools-80cbdf469e9b2611b5abe09fb61142b4640f23a1.tar dexon-sol-tools-80cbdf469e9b2611b5abe09fb61142b4640f23a1.tar.gz dexon-sol-tools-80cbdf469e9b2611b5abe09fb61142b4640f23a1.tar.bz2 dexon-sol-tools-80cbdf469e9b2611b5abe09fb61142b4640f23a1.tar.lz dexon-sol-tools-80cbdf469e9b2611b5abe09fb61142b4640f23a1.tar.xz dexon-sol-tools-80cbdf469e9b2611b5abe09fb61142b4640f23a1.tar.zst dexon-sol-tools-80cbdf469e9b2611b5abe09fb61142b4640f23a1.zip |
Add assertions
Diffstat (limited to 'src/contract_wrappers/token_wrapper.ts')
-rw-r--r-- | src/contract_wrappers/token_wrapper.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts index 91af223e4..161f6fca9 100644 --- a/src/contract_wrappers/token_wrapper.ts +++ b/src/contract_wrappers/token_wrapper.ts @@ -291,6 +291,9 @@ export class TokenWrapper extends ContractWrapper { */ public async getLogsAsync(tokenAddress: string, eventName: TokenEvents, subscriptionOpts: SubscriptionOpts, indexFilterValues: IndexedFilterValues): Promise<LogWithDecodedArgs[]> { + assert.doesBelongToStringEnum('eventName', eventName, TokenEvents); + assert.doesConformToSchema('subscriptionOpts', subscriptionOpts, schemas.subscriptionOptsSchema); + assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema); const logs = await this._getLogsAsync( tokenAddress, eventName, subscriptionOpts, indexFilterValues, artifacts.TokenArtifact.abi, ); |