diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-04-27 00:29:05 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-27 02:11:54 +0800 |
commit | 599d34f1c08c3b41817c8cfe3f4e1b847cda072b (patch) | |
tree | 6c3299c43de6c5036f6e0d20ab6c15ff14988333 /packages/contracts/src/utils/exchange_wrapper.ts | |
parent | 31411dd11be29d5dcca646737e6ca08840e2d510 (diff) | |
download | dexon-sol-tools-599d34f1c08c3b41817c8cfe3f4e1b847cda072b.tar.gz dexon-sol-tools-599d34f1c08c3b41817c8cfe3f4e1b847cda072b.tar.zst dexon-sol-tools-599d34f1c08c3b41817c8cfe3f4e1b847cda072b.zip |
Make all lib functions internal, add contracts for testing
Diffstat (limited to 'packages/contracts/src/utils/exchange_wrapper.ts')
-rw-r--r-- | packages/contracts/src/utils/exchange_wrapper.ts | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/packages/contracts/src/utils/exchange_wrapper.ts b/packages/contracts/src/utils/exchange_wrapper.ts index 000905854..27fdd698f 100644 --- a/packages/contracts/src/utils/exchange_wrapper.ts +++ b/packages/contracts/src/utils/exchange_wrapper.ts @@ -221,37 +221,6 @@ export class ExchangeWrapper { const tx = await this._getTxWithDecodedExchangeLogsAsync(txHash); return tx; } - public async getOrderHashAsync(signedOrder: SignedOrder): Promise<string> { - const order = orderUtils.getOrderStruct(signedOrder); - const orderHash = await this._exchange.getOrderHash.callAsync(order); - return orderHash; - } - public async isValidSignatureAsync(signedOrder: SignedOrder): Promise<boolean> { - const isValidSignature = await this._exchange.isValidSignature.callAsync( - orderUtils.getOrderHashHex(signedOrder), - signedOrder.makerAddress, - signedOrder.signature, - ); - return isValidSignature; - } - public async isRoundingErrorAsync( - numerator: BigNumber, - denominator: BigNumber, - target: BigNumber, - ): Promise<boolean> { - const isRoundingError = await this._exchange.isRoundingError.callAsync(numerator, denominator, target); - return isRoundingError; - } - public async getPartialAmountAsync( - numerator: BigNumber, - denominator: BigNumber, - target: BigNumber, - ): Promise<BigNumber> { - const partialAmount = new BigNumber( - await this._exchange.getPartialAmount.callAsync(numerator, denominator, target), - ); - return partialAmount; - } public async getTakerAssetFilledAmountAsync(orderHashHex: string): Promise<BigNumber> { const filledAmount = new BigNumber(await this._exchange.filled.callAsync(orderHashHex)); return filledAmount; |