diff --git a/CHANGELOG.md b/CHANGELOG.md index 595058c0..d4d4d10b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,25 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [v1.0.0-next.43](https://github.com/oceanprotocol/ocean.js/compare/v1.0.0-next.42...v1.0.0-next.43) + +- bump contracts to alpha.33 [`#1472`](https://github.com/oceanprotocol/ocean.js/pull/1472) +- Bump @types/node from 17.0.32 to 17.0.34 [`#1471`](https://github.com/oceanprotocol/ocean.js/pull/1471) +- Add transfer() function to TokenUtils [`#1387`](https://github.com/oceanprotocol/ocean.js/pull/1387) +- Issue-#1391: Add generic estimateGas() function [`#1394`](https://github.com/oceanprotocol/ocean.js/pull/1394) +- Bump @types/node from 17.0.31 to 17.0.32 [`#1465`](https://github.com/oceanprotocol/ocean.js/pull/1465) +- use estimateGas() function in NFT [`4cee7bb`](https://github.com/oceanprotocol/ocean.js/commit/4cee7bb08cd11e38ecddbc0c14f6eebf88755c9b) +- use estimateGas() function in Datatoken [`f9aa47c`](https://github.com/oceanprotocol/ocean.js/commit/f9aa47c4d21f34aa31addd3a37054800f0e8fb6d) +- use estimateGas() function in NFTFactory [`00fc5d2`](https://github.com/oceanprotocol/ocean.js/commit/00fc5d21e9e819e0ef47254dd5e4721b52c9d2fa) + #### [v1.0.0-next.42](https://github.com/oceanprotocol/ocean.js/compare/v1.0.0-next.41...v1.0.0-next.42) +> 9 May 2022 + - bump contracts to alpha.32 [`#1464`](https://github.com/oceanprotocol/ocean.js/pull/1464) - simple compute flow [`#1458`](https://github.com/oceanprotocol/ocean.js/pull/1458) - add optional decimals parameter at joinswapExternAmountIn() and exitswapPoolAmountIn() [`#1461`](https://github.com/oceanprotocol/ocean.js/pull/1461) +- Release 1.0.0-next.42 [`56f992e`](https://github.com/oceanprotocol/ocean.js/commit/56f992e760712a88f4c9a236d75d784d6dd1c4b1) #### [v1.0.0-next.41](https://github.com/oceanprotocol/ocean.js/compare/v1.0.0-next.40...v1.0.0-next.41) diff --git a/package-lock.json b/package-lock.json index 06f6d044..32efbef6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@oceanprotocol/lib", - "version": "1.0.0-next.42", + "version": "1.0.0-next.43", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@oceanprotocol/lib", - "version": "1.0.0-next.42", + "version": "1.0.0-next.43", "license": "Apache-2.0", "dependencies": { - "@oceanprotocol/contracts": "^1.0.0-alpha.32", + "@oceanprotocol/contracts": "^1.0.0-alpha.33", "bignumber.js": "^9.0.2", "cross-fetch": "^3.1.5", "crypto-js": "^4.1.1", @@ -24,7 +24,7 @@ "@types/chai-spies": "^1.0.3", "@types/crypto-js": "^4.1.1", "@types/mocha": "^9.1.1", - "@types/node": "^17.0.32", + "@types/node": "^17.0.34", "@types/node-fetch": "^3.0.3", "@typescript-eslint/eslint-plugin": "^4.33.0", "@typescript-eslint/parser": "^4.33.0", @@ -2471,9 +2471,9 @@ } }, "node_modules/@oceanprotocol/contracts": { - "version": "1.0.0-alpha.32", - "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.0.0-alpha.32.tgz", - "integrity": "sha512-gCHw4ZVnNjSozzCVT/cQiDqLNP0Xvy4fe+g5PKy8rwMR/h2rRW65Txi6wkb4HfZiUPKCdHbzpUFOwYfJFbW0Jw==" + "version": "1.0.0-alpha.33", + "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.0.0-alpha.33.tgz", + "integrity": "sha512-jx8fg9src7fjeqMXB2ZYLdp0BoJA0G5vau6pa48YOjasDuPekJtPdT0oRy0PVkyJ2HtkYjAwKVyiFfAbZcug6A==" }, "node_modules/@octokit/auth-token": { "version": "2.5.0", @@ -3021,9 +3021,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.32.tgz", - "integrity": "sha512-eAIcfAvhf/BkHcf4pkLJ7ECpBAhh9kcxRBpip9cTiO+hf+aJrsxYxBeS6OXvOd9WqNAJmavXVpZvY1rBjNsXmw==" + "version": "17.0.34", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.34.tgz", + "integrity": "sha512-XImEz7XwTvDBtzlTnm8YvMqGW/ErMWBsKZ+hMTvnDIjGCKxwK5Xpc+c/oQjOauwq8M4OS11hEkpjX8rrI/eEgA==" }, "node_modules/@types/node-fetch": { "version": "3.0.3", @@ -19610,9 +19610,9 @@ } }, "@oceanprotocol/contracts": { - "version": "1.0.0-alpha.32", - "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.0.0-alpha.32.tgz", - "integrity": "sha512-gCHw4ZVnNjSozzCVT/cQiDqLNP0Xvy4fe+g5PKy8rwMR/h2rRW65Txi6wkb4HfZiUPKCdHbzpUFOwYfJFbW0Jw==" + "version": "1.0.0-alpha.33", + "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.0.0-alpha.33.tgz", + "integrity": "sha512-jx8fg9src7fjeqMXB2ZYLdp0BoJA0G5vau6pa48YOjasDuPekJtPdT0oRy0PVkyJ2HtkYjAwKVyiFfAbZcug6A==" }, "@octokit/auth-token": { "version": "2.5.0", @@ -20079,9 +20079,9 @@ "dev": true }, "@types/node": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.32.tgz", - "integrity": "sha512-eAIcfAvhf/BkHcf4pkLJ7ECpBAhh9kcxRBpip9cTiO+hf+aJrsxYxBeS6OXvOd9WqNAJmavXVpZvY1rBjNsXmw==" + "version": "17.0.34", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.34.tgz", + "integrity": "sha512-XImEz7XwTvDBtzlTnm8YvMqGW/ErMWBsKZ+hMTvnDIjGCKxwK5Xpc+c/oQjOauwq8M4OS11hEkpjX8rrI/eEgA==" }, "@types/node-fetch": { "version": "3.0.3", diff --git a/package.json b/package.json index 176ed845..b3b7b7e5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@oceanprotocol/lib", "source": "./src/index.ts", - "version": "1.0.0-next.42", + "version": "1.0.0-next.43", "description": "JavaScript client library for Ocean Protocol", "main": "./dist/lib.js", "umd:main": "dist/lib.umd.js", @@ -58,7 +58,7 @@ "web3": "^1.7.3" }, "dependencies": { - "@oceanprotocol/contracts": "^1.0.0-alpha.32", + "@oceanprotocol/contracts": "^1.0.0-alpha.33", "bignumber.js": "^9.0.2", "cross-fetch": "^3.1.5", "crypto-js": "^4.1.1", @@ -73,7 +73,7 @@ "@types/chai-spies": "^1.0.3", "@types/crypto-js": "^4.1.1", "@types/mocha": "^9.1.1", - "@types/node": "^17.0.32", + "@types/node": "^17.0.34", "@types/node-fetch": "^3.0.3", "@typescript-eslint/eslint-plugin": "^4.33.0", "@typescript-eslint/parser": "^4.33.0", diff --git a/src/pools/balancer/Pool.ts b/src/pools/balancer/Pool.ts index e5a22a97..95096265 100644 --- a/src/pools/balancer/Pool.ts +++ b/src/pools/balancer/Pool.ts @@ -329,25 +329,6 @@ export class Pool { return result } - /** - * Get OPC Collector of this pool - * @param {String} poolAddress - * @return {String} - */ - async getOPCCollector(poolAddress: string): Promise { - const pool = setContractDefaults( - new this.web3.eth.Contract(this.poolAbi, poolAddress), - this.config - ) - let result = null - try { - result = await pool.methods._opcCollector().call() - } catch (e) { - LoggerInstance.error(`ERROR: Failed to get OPF Collector address: ${e.message}`) - } - return result - } - /** * Get if a token is bounded to a pool * Returns true if token is bound diff --git a/src/pools/fixedRate/FixedRateExchange.ts b/src/pools/fixedRate/FixedRateExchange.ts index c73f03fb..75c381cf 100644 --- a/src/pools/fixedRate/FixedRateExchange.ts +++ b/src/pools/fixedRate/FixedRateExchange.ts @@ -1020,20 +1020,6 @@ export class FixedRateExchange { return trxReceipt } - /** - * Get OPF Collector of fixed rate contract - * @return {String} - */ - async getOPCCollector(): Promise { - let result = null - try { - result = await this.contract.methods.opcCollector().call() - } catch (e) { - LoggerInstance.error(`ERROR: Failed to get OPC Collector address: ${e.message}`) - } - return result - } - /** * Get Router address set in fixed rate contract * @return {String} diff --git a/test/unit/pools/balancer/Pool.test.ts b/test/unit/pools/balancer/Pool.test.ts index 68ce2b4e..1b2452c2 100644 --- a/test/unit/pools/balancer/Pool.test.ts +++ b/test/unit/pools/balancer/Pool.test.ts @@ -468,13 +468,6 @@ describe('Pool unit test', () => { assert((await pool.getMarketFeeCollector(poolAddress)) === factoryOwner) }) - it('#getOPCCollector- should get market fees for each token', async () => { - assert( - (await pool.getOPCCollector(poolAddress)) === - contracts.opfCommunityFeeCollectorAddress - ) - }) - it('#collectCommunityFee- should get community fees for each token', async () => { const spotPriceBefore = await pool.getSpotPrice( poolAddress, @@ -953,13 +946,6 @@ describe('Pool unit test', () => { assert((await pool.getMarketFeeCollector(poolAddress)) === factoryOwner) }) - it('#getOPCCollector- should get market fees for each token', async () => { - assert( - (await pool.getOPCCollector(poolAddress)) === - contracts.opfCommunityFeeCollectorAddress - ) - }) - it('#getCurrentMarketFees- should get curent market fees for each token', async () => { const currentMarketFees: CurrentFees = await pool.getCurrentMarketFees(poolAddress) assert(currentMarketFees !== null) diff --git a/test/unit/pools/fixedRate/FixedRateExchange.test.ts b/test/unit/pools/fixedRate/FixedRateExchange.test.ts index 28e43472..58744acd 100644 --- a/test/unit/pools/fixedRate/FixedRateExchange.test.ts +++ b/test/unit/pools/fixedRate/FixedRateExchange.test.ts @@ -132,11 +132,6 @@ describe('Fixed Rate unit test', () => { it('#getOwner - should get exchange owner given an id', async () => { expect(await fixedRate.getExchangeOwner(exchangeId)).to.equal(exchangeOwner) }) - it('#getOPFCollector - should get OPF collector', async () => { - expect(await fixedRate.getOPCCollector()).to.equal( - contracts.opfCommunityFeeCollectorAddress - ) - }) it('#getRouter - should get Router address', async () => { expect(await fixedRate.getRouter()).to.equal(contracts.routerAddress) }) @@ -453,11 +448,6 @@ describe('Fixed Rate unit test', () => { it('#getOwner - should get exchange owner given an id', async () => { expect(await fixedRate.getExchangeOwner(exchangeId)).to.equal(exchangeOwner) }) - it('#getOPFCollector - should get OPF collector', async () => { - expect(await fixedRate.getOPCCollector()).to.equal( - contracts.opfCommunityFeeCollectorAddress - ) - }) it('#getRouter - should get Router address', async () => { expect(await fixedRate.getRouter()).to.equal(contracts.routerAddress) })