diff --git a/src/balancer/OceanPool.ts b/src/balancer/OceanPool.ts index c6921194..e69bcfc4 100644 --- a/src/balancer/OceanPool.ts +++ b/src/balancer/OceanPool.ts @@ -20,7 +20,7 @@ export class OceanPool extends Pool { } /** - * create DataToken pool + * Create DataToken pool @param {String} account * @param {String} token Data Token address * @param {String} amount Data Token amount @@ -33,7 +33,7 @@ export class OceanPool extends Pool { amount: string, weight: string, fee: string, - finalize: boolean = true + finalize = true ): Promise { if (this.oceanAddress == null) { console.error('oceanAddress is not defined') @@ -107,7 +107,7 @@ export class OceanPool extends Pool { } /** - * Buy Data Token from a pool + * Buy Data Token from a pool * @param {String} account * @param {String} poolAddress * @param {String} amount Data Token amount diff --git a/src/balancer/Pool.ts b/src/balancer/Pool.ts index 2a7abff9..35c5cbf0 100644 --- a/src/balancer/Pool.ts +++ b/src/balancer/Pool.ts @@ -232,7 +232,7 @@ export class Pool extends PoolFactory { * Get tokens composing this pool * @param {String} account * @param {String} poolAddress - * @return {Array} + * @return {String[]} */ async getCurrentTokens(account: string, poolAddress: string): Promise { const pool = new this.web3.eth.Contract(this.PoolABI, poolAddress, { @@ -251,9 +251,9 @@ export class Pool extends PoolFactory { * Get the final tokens composing this pool * @param {String} account * @param {String} poolAddress - * @return {Array} + * @return {String[]} */ - async getFinalTokens(account: string, poolAddress: string): Promise { + async getFinalTokens(account: string, poolAddress: string): Promise { const pool = new this.web3.eth.Contract(this.PoolABI, poolAddress, { from: account }) @@ -272,7 +272,7 @@ export class Pool extends PoolFactory { * @param {String} poolAddress * @return {String} */ - async getController(account: string, poolAddress: string): Promise { + async getController(account: string, poolAddress: string): Promise { const pool = new this.web3.eth.Contract(this.PoolABI, poolAddress, { from: account }) @@ -296,7 +296,7 @@ export class Pool extends PoolFactory { account: string, poolAddress: string, controllerAddress: string - ): Promise { + ): Promise { const pool = new this.web3.eth.Contract(this.PoolABI, poolAddress, { from: account }) @@ -318,7 +318,7 @@ export class Pool extends PoolFactory { * @param {String} token Address of the token * @return {Boolean} */ - async isBound(account: string, poolAddress: string, token: string): Promise { + async isBound(account: string, poolAddress: string, token: string): Promise { const pool = new this.web3.eth.Contract(this.PoolABI, poolAddress, { from: account }) @@ -336,7 +336,7 @@ export class Pool extends PoolFactory { * @param {String} account * @param {String} poolAddress * @param {String} token Address of the token - * @return {Boolean} + * @return {String} */ async getReserve(account: string, poolAddress: string, token: string): Promise { const pool = new this.web3.eth.Contract(this.PoolABI, poolAddress, { @@ -358,7 +358,7 @@ export class Pool extends PoolFactory { * @param {String} poolAddress * @return {Boolean} */ - async isFinalized(account: string, poolAddress: string): Promise { + async isFinalized(account: string, poolAddress: string): Promise { const pool = new this.web3.eth.Contract(this.PoolABI, poolAddress, { from: account }) @@ -396,7 +396,7 @@ export class Pool extends PoolFactory { * @param {String} account * @param {String} poolAddress * @param {String} token - * @return {Number} + * @return {String} */ async getNormalizedWeight( account: string, @@ -421,7 +421,7 @@ export class Pool extends PoolFactory { * @param {String} account * @param {String} poolAddress * @param {String} token - * @return {Number} + * @return {String} */ async getDenormalizedWeight( account: string, @@ -549,14 +549,14 @@ export class Pool extends PoolFactory { * @param {String} account * @param {String} poolAddress * @param {String} poolAmountOut will be converted to wei - * @param {String} maxAmountsIn array holding maxAmount per each token, will be converted to wei + * @param {String[]} maxAmountsIn array holding maxAmount per each token, will be converted to wei * @return {any} */ async joinPool( account: string, poolAddress: string, poolAmountOut: string, - maxAmountsIn: any + maxAmountsIn: string[] ): Promise { const pool = new this.web3.eth.Contract(this.PoolABI, poolAddress, { from: account @@ -586,7 +586,7 @@ export class Pool extends PoolFactory { * @param {String} account * @param {String} poolAddress * @param {String} poolAmountIn will be converted to wei - * @param {String} maxAmountsIn array holding maxAmount per each token, will be converted to wei + * @param {String[]} minAmountsOut array holding minAmount per each token, will be converted to wei * @return {any} */ async exitPool( @@ -783,14 +783,14 @@ export class Pool extends PoolFactory { * @param {String} poolAddress * @param {String} tokenIn * @param {String} tokenOut - * @return {any} + * @return {String} */ async getSpotPriceSansFee( account: string, poolAddress: string, tokenIn: string, tokenOut: string - ): Promise { + ): Promise { const pool = new this.web3.eth.Contract(this.PoolABI, poolAddress, { from: account }) diff --git a/src/balancer/PoolFactory.ts b/src/balancer/PoolFactory.ts index 97d07a9d..809bf247 100644 --- a/src/balancer/PoolFactory.ts +++ b/src/balancer/PoolFactory.ts @@ -2,7 +2,7 @@ import Web3 from 'web3' import * as jsonFactoryABI from '@oceanprotocol/contracts/artifacts/SFactory.json' export class PoolFactory { - public GASLIMIT_DEFAULT: number = 5000000 + public GASLIMIT_DEFAULT = 5000000 public web3: any = null public FactoryABI: any public factoryAddress: any