diff options
author | Fabio Berger <me@fabioberger.com> | 2018-08-04 03:27:01 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-08-04 03:27:01 +0800 |
commit | 343cd05363166a7a93fca361d5547b39f3e83d99 (patch) | |
tree | ae1eafee9070a4f712faa19e10f3ac5894f9d954 /packages/order-utils/src/exchange_transfer_simulator.ts | |
parent | d9f09b5e1e7ecc8dc56ac7184cfc0152b3c2ff32 (diff) | |
download | dexon-sol-tools-343cd05363166a7a93fca361d5547b39f3e83d99.tar dexon-sol-tools-343cd05363166a7a93fca361d5547b39f3e83d99.tar.gz dexon-sol-tools-343cd05363166a7a93fca361d5547b39f3e83d99.tar.bz2 dexon-sol-tools-343cd05363166a7a93fca361d5547b39f3e83d99.tar.lz dexon-sol-tools-343cd05363166a7a93fca361d5547b39f3e83d99.tar.xz dexon-sol-tools-343cd05363166a7a93fca361d5547b39f3e83d99.tar.zst dexon-sol-tools-343cd05363166a7a93fca361d5547b39f3e83d99.zip |
Add missing comments
Diffstat (limited to 'packages/order-utils/src/exchange_transfer_simulator.ts')
-rw-r--r-- | packages/order-utils/src/exchange_transfer_simulator.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/order-utils/src/exchange_transfer_simulator.ts b/packages/order-utils/src/exchange_transfer_simulator.ts index c3a4f9c2a..81c849c64 100644 --- a/packages/order-utils/src/exchange_transfer_simulator.ts +++ b/packages/order-utils/src/exchange_transfer_simulator.ts @@ -33,6 +33,10 @@ const ERR_MSG_MAPPING = { }, }; +/** + * An exchange transfer simulator which simulates asset transfers exactly how the + * 0x exchange contract would do them. + */ export class ExchangeTransferSimulator { private readonly _store: AbstractBalanceAndProxyAllowanceLazyStore; private static _throwValidationError( @@ -43,6 +47,11 @@ export class ExchangeTransferSimulator { const errMsg = ERR_MSG_MAPPING[failureReason][tradeSide][transferType]; throw new Error(errMsg); } + /** + * Instantiate a ExchangeTransferSimulator + * @param store A class that implements AbstractBalanceAndProxyAllowanceLazyStore + * @return an instance of ExchangeTransferSimulator + */ constructor(store: AbstractBalanceAndProxyAllowanceLazyStore) { this._store = store; } |