mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
Move MAX_UINT_256 constant to Constants file
This commit is contained in:
parent
970c2011ef
commit
38895fcf62
@ -16,7 +16,8 @@ import {
|
|||||||
getMaxAddLiquidity,
|
getMaxAddLiquidity,
|
||||||
getMaxRemoveLiquidity,
|
getMaxRemoveLiquidity,
|
||||||
getMaxSwapExactIn,
|
getMaxSwapExactIn,
|
||||||
getMaxSwapExactOut
|
getMaxSwapExactOut,
|
||||||
|
MAX_UINT_256
|
||||||
} from '../../utils'
|
} from '../../utils'
|
||||||
import {
|
import {
|
||||||
CurrentFees,
|
CurrentFees,
|
||||||
@ -27,9 +28,6 @@ import {
|
|||||||
} from '../../@types'
|
} from '../../@types'
|
||||||
import { Config, ConfigHelper } from '../../config'
|
import { Config, ConfigHelper } from '../../config'
|
||||||
|
|
||||||
const MaxUint256 =
|
|
||||||
'115792089237316195423570985008687907853269984665640564039457584007913129639934'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides an interface to Ocean friendly fork from Balancer BPool
|
* Provides an interface to Ocean friendly fork from Balancer BPool
|
||||||
*/
|
*/
|
||||||
@ -803,7 +801,7 @@ export class Pool {
|
|||||||
await this.getBaseToken(poolAddress),
|
await this.getBaseToken(poolAddress),
|
||||||
amountsInOutMaxFee.maxPrice
|
amountsInOutMaxFee.maxPrice
|
||||||
)
|
)
|
||||||
: MaxUint256
|
: MAX_UINT_256
|
||||||
|
|
||||||
return estimateGas(
|
return estimateGas(
|
||||||
address,
|
address,
|
||||||
@ -868,7 +866,7 @@ export class Pool {
|
|||||||
await this.getBaseToken(poolAddress),
|
await this.getBaseToken(poolAddress),
|
||||||
amountsInOutMaxFee.maxPrice
|
amountsInOutMaxFee.maxPrice
|
||||||
)
|
)
|
||||||
: MaxUint256
|
: MAX_UINT_256
|
||||||
|
|
||||||
const estGas = await estimateGas(
|
const estGas = await estimateGas(
|
||||||
address,
|
address,
|
||||||
@ -954,7 +952,7 @@ export class Pool {
|
|||||||
await this.getBaseToken(poolAddress),
|
await this.getBaseToken(poolAddress),
|
||||||
amountsInOutMaxFee.maxPrice
|
amountsInOutMaxFee.maxPrice
|
||||||
)
|
)
|
||||||
: MaxUint256
|
: MAX_UINT_256
|
||||||
|
|
||||||
return estimateGas(
|
return estimateGas(
|
||||||
address,
|
address,
|
||||||
@ -1015,7 +1013,7 @@ export class Pool {
|
|||||||
await this.getBaseToken(poolAddress),
|
await this.getBaseToken(poolAddress),
|
||||||
amountsInOutMaxFee.maxPrice
|
amountsInOutMaxFee.maxPrice
|
||||||
)
|
)
|
||||||
: MaxUint256
|
: MAX_UINT_256
|
||||||
|
|
||||||
const estGas = await estimateGas(
|
const estGas = await estimateGas(
|
||||||
account,
|
account,
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'
|
export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'
|
||||||
export const GASLIMIT_DEFAULT = 1000000
|
export const GASLIMIT_DEFAULT = 1000000
|
||||||
|
export const MAX_UINT_256 =
|
||||||
|
'115792089237316195423570985008687907853269984665640564039457584007913129639934'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user