aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-08-17 11:03:07 +0800
committerJacob Evans <jacob@dekz.net>2018-08-18 07:32:29 +0800
commit1c68057999ad9cb8be5018bffeeb6c1e45e645ad (patch)
treed6eae448d703f75c8c2527d5b988bb408d48d8f9 /packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
parent36668f94090fa5c35f636f6b7ba597fcb89c068d (diff)
downloaddexon-0x-contracts-1c68057999ad9cb8be5018bffeeb6c1e45e645ad.tar.gz
dexon-0x-contracts-1c68057999ad9cb8be5018bffeeb6c1e45e645ad.tar.zst
dexon-0x-contracts-1c68057999ad9cb8be5018bffeeb6c1e45e645ad.zip
Rename to Transaction Encoder.
Add tests for all encoding methods.
Diffstat (limited to 'packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts')
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts11
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
index 12d6a8fd3..5a4b40547 100644
--- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
@@ -21,7 +21,7 @@ import {
} from '../types';
import { assert } from '../utils/assert';
import { decorators } from '../utils/decorators';
-import { ExecuteTransactionEncoder } from '../utils/execute_transaction_encoder';
+import { TransactionEncoder } from '../utils/transaction_encoder';
import { ContractWrapper } from './contract_wrapper';
import { ExchangeContract, ExchangeEventArgs, ExchangeEvents } from './generated/exchange';
@@ -1098,9 +1098,14 @@ export class ExchangeWrapper extends ContractWrapper {
const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxTokenAddress);
return zrxAssetData;
}
- public async executeTransactionEncoderAsync(): Promise<ExecuteTransactionEncoder> {
+ /**
+ * Returns a Transaction Encoder. Transaction messages exist for the purpose of calling methods on the Exchange contract
+ * in the context of another address.
+ * @return TransactionEncoder
+ */
+ public async transactionEncoderAsync(): Promise<TransactionEncoder> {
const exchangeInstance = await this._getExchangeContractAsync();
- const encoder = new ExecuteTransactionEncoder(exchangeInstance);
+ const encoder = new TransactionEncoder(exchangeInstance);
return encoder;
}
// tslint:disable:no-unused-variable