aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers/src/contract_wrappers
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-08-22 18:41:42 +0800
committerFabio Berger <me@fabioberger.com>2018-08-22 18:41:42 +0800
commit0248add542ac801bcb021fa7b13c182baec5612e (patch)
tree1d04404632ee381621b384f1e82ade97c06c9b92 /packages/contract-wrappers/src/contract_wrappers
parentc12f0d04bb2f0d5ad73943d02a592a110423a423 (diff)
parent80e52464a6fdf9576776214f77e46d441b959b06 (diff)
downloaddexon-sol-tools-0248add542ac801bcb021fa7b13c182baec5612e.tar
dexon-sol-tools-0248add542ac801bcb021fa7b13c182baec5612e.tar.gz
dexon-sol-tools-0248add542ac801bcb021fa7b13c182baec5612e.tar.bz2
dexon-sol-tools-0248add542ac801bcb021fa7b13c182baec5612e.tar.lz
dexon-sol-tools-0248add542ac801bcb021fa7b13c182baec5612e.tar.xz
dexon-sol-tools-0248add542ac801bcb021fa7b13c182baec5612e.tar.zst
dexon-sol-tools-0248add542ac801bcb021fa7b13c182baec5612e.zip
Merge development branch
Diffstat (limited to 'packages/contract-wrappers/src/contract_wrappers')
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
index 0eaae358e..7b1663daa 100644
--- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
@@ -21,6 +21,7 @@ import {
} from '../types';
import { assert } from '../utils/assert';
import { decorators } from '../utils/decorators';
+import { TransactionEncoder } from '../utils/transaction_encoder';
import { ContractWrapper } from './contract_wrapper';
import { ExchangeContract, ExchangeEventArgs, ExchangeEvents } from './generated/exchange';
@@ -1109,6 +1110,16 @@ export class ExchangeWrapper extends ContractWrapper {
const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxTokenAddress);
return zrxAssetData;
}
+ /**
+ * 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 TransactionEncoder(exchangeInstance);
+ return encoder;
+ }
// tslint:disable:no-unused-variable
private _invalidateContractInstances(): void {
this.unsubscribeAll();