diff --git a/dist/esm/index.evm.js b/dist/esm/index.evm.js index b9313f1..43b259f 100644 --- a/dist/esm/index.evm.js +++ b/dist/esm/index.evm.js @@ -1,5 +1,5 @@ import { ethers } from 'ethers'; -import { Blockchain } from '@depay/web3-blockchains'; +import Blockchains from '@depay/web3-blockchains'; const getContractArguments = ({ contract, method, params })=>{ let fragment = contract.interface.fragments.find((fragment) => { @@ -43,7 +43,7 @@ class StaticJsonRpcBatchProvider extends ethers.providers.JsonRpcProvider { } detectNetwork() { - return Promise.resolve(Blockchain.findByName(this._network).id) + return Promise.resolve(Blockchains.findByName(this._network).id) } requestChunk(chunk, endpoint) { diff --git a/dist/esm/index.js b/dist/esm/index.js index 3ff1c7b..a6b0263 100644 --- a/dist/esm/index.js +++ b/dist/esm/index.js @@ -1,5 +1,5 @@ import { Connection, Buffer, PublicKey, TransactionInstruction, Transaction, ACCOUNT_LAYOUT } from '@depay/solana-web3.js'; -import { Blockchain } from '@depay/web3-blockchains'; +import Blockchains from '@depay/web3-blockchains'; import { ethers } from 'ethers'; const BATCH_INTERVAL = 10; @@ -15,7 +15,7 @@ class StaticJsonRpcBatchProvider extends ethers.providers.JsonRpcProvider { } detectNetwork() { - return Promise.resolve(Blockchain.findByName(this._network).id) + return Promise.resolve(Blockchains.findByName(this._network).id) } requestChunk(chunk, endpoint) { diff --git a/dist/umd/index.evm.js b/dist/umd/index.evm.js index d366aee..f1679b4 100644 --- a/dist/umd/index.evm.js +++ b/dist/umd/index.evm.js @@ -2,7 +2,11 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('ethers'), require('@depay/web3-blockchains')) : typeof define === 'function' && define.amd ? define(['exports', 'ethers', '@depay/web3-blockchains'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Web3Client = {}, global.ethers, global.Web3Blockchains)); -})(this, (function (exports, ethers, web3Blockchains) { 'use strict'; +})(this, (function (exports, ethers, Blockchains) { 'use strict'; + + function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + + var Blockchains__default = /*#__PURE__*/_interopDefaultLegacy(Blockchains); const getContractArguments = ({ contract, method, params })=>{ let fragment = contract.interface.fragments.find((fragment) => { @@ -46,7 +50,7 @@ } detectNetwork() { - return Promise.resolve(web3Blockchains.Blockchain.findByName(this._network).id) + return Promise.resolve(Blockchains__default["default"].findByName(this._network).id) } requestChunk(chunk, endpoint) { diff --git a/dist/umd/index.js b/dist/umd/index.js index cd8e74b..2dc143d 100644 --- a/dist/umd/index.js +++ b/dist/umd/index.js @@ -2,7 +2,11 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@depay/solana-web3.js'), require('@depay/web3-blockchains'), require('ethers')) : typeof define === 'function' && define.amd ? define(['exports', '@depay/solana-web3.js', '@depay/web3-blockchains', 'ethers'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Web3Client = {}, global.SolanaWeb3js, global.Web3Blockchains, global.ethers)); -})(this, (function (exports, solanaWeb3_js, web3Blockchains, ethers) { 'use strict'; +})(this, (function (exports, solanaWeb3_js, Blockchains, ethers) { 'use strict'; + + function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + + var Blockchains__default = /*#__PURE__*/_interopDefaultLegacy(Blockchains); const BATCH_INTERVAL = 10; const CHUNK_SIZE = 99; @@ -17,7 +21,7 @@ } detectNetwork() { - return Promise.resolve(web3Blockchains.Blockchain.findByName(this._network).id) + return Promise.resolve(Blockchains__default["default"].findByName(this._network).id) } requestChunk(chunk, endpoint) { diff --git a/package.evm.json b/package.evm.json index f9141cd..7f18113 100644 --- a/package.evm.json +++ b/package.evm.json @@ -1,7 +1,7 @@ { "name": "@depay/web3-client-evm", "moduleName": "Web3Client", - "version": "10.6.5", + "version": "10.7.0", "description": "A web3 client to fetch blockchain data just like you are used to with HTTP clients.", "main": "dist/umd/index.evm.js", "module": "dist/esm/index.evm.js", @@ -23,7 +23,7 @@ "homepage": "https://depay.com", "private": false, "peerDependencies": { - "@depay/web3-blockchains": "^6.5.1", + "@depay/web3-blockchains": "^7.0.0", "ethers": "^5.7.1" }, "engines": { diff --git a/package.json b/package.json index ea5ac3d..f2712bb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@depay/web3-client", "moduleName": "Web3Client", - "version": "10.6.5", + "version": "10.7.0", "description": "A web3 client to fetch blockchain data just like you are used to with HTTP clients.", "main": "dist/umd/index.js", "module": "dist/esm/index.js", @@ -34,7 +34,7 @@ "private": false, "peerDependencies": { "@depay/solana-web3.js": "^1.20.15", - "@depay/web3-blockchains": "^6.5.1", + "@depay/web3-blockchains": "^7.0.0", "ethers": "^5.7.1" }, "engines": { @@ -44,10 +44,8 @@ "@babel/core": "^7.12.9", "@babel/preset-env": "^7.12.7", "@depay/solana-web3.js": "^1.20.15", - "@depay/web3-blockchains": "^6.5.1", - "@depay/web3-constants": "^6.4.0", - "@depay/web3-mock": "^13.25.5", - "@depay/web3-mock-solana": "^13.25.5", + "@depay/web3-blockchains": "^7.0.0", + "@depay/web3-mock": "^13.26.0", "@rollup/plugin-commonjs": "^22.0.1", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^13.3.0", diff --git a/package.solana.json b/package.solana.json index 073b73b..8ee9ebb 100644 --- a/package.solana.json +++ b/package.solana.json @@ -1,7 +1,7 @@ { "name": "@depay/web3-client-solana", "moduleName": "Web3Client", - "version": "10.6.5", + "version": "10.7.0", "description": "A web3 client to fetch blockchain data just like you are used to with HTTP clients.", "main": "dist/umd/index.solana.js", "module": "dist/esm/index.solana.js", @@ -23,7 +23,7 @@ "homepage": "https://depay.com", "private": false, "peerDependencies": { - "@depay/web3-blockchains": "^6.5.1", + "@depay/web3-blockchains": "^7.0.0", "@depay/solana-web3.js": "^1.20.15", "ethers": "^5.7.1" }, diff --git a/src/clients/ethers/provider.js b/src/clients/ethers/provider.js index bf4cb66..145cc67 100644 --- a/src/clients/ethers/provider.js +++ b/src/clients/ethers/provider.js @@ -1,4 +1,4 @@ -import { Blockchain } from '@depay/web3-blockchains' +import Blockchains from '@depay/web3-blockchains' import { ethers } from 'ethers' const BATCH_INTERVAL = 10 @@ -14,7 +14,7 @@ class StaticJsonRpcBatchProvider extends ethers.providers.JsonRpcProvider { } detectNetwork() { - return Promise.resolve(Blockchain.findByName(this._network).id) + return Promise.resolve(Blockchains.findByName(this._network).id) } requestChunk(chunk, endpoint) { diff --git a/yarn.lock b/yarn.lock index 8f644ec..04aaeaa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -901,34 +901,18 @@ resolved "https://registry.yarnpkg.com/@depay/solana-web3.js/-/solana-web3.js-1.20.15.tgz#6e18476209e04cf29dd30761102e58a0a5b98b4d" integrity sha512-diPDtBTQDmWDeHo32xWKIO7syd8Vk/wDez8PCU9S4q8RArU8vwBM/fpAlxn+LTBR3O1ci3BTgD/YwDtwAuD7Ig== -"@depay/web3-blockchains@^6.5.1": - version "6.5.1" - resolved "https://registry.yarnpkg.com/@depay/web3-blockchains/-/web3-blockchains-6.5.1.tgz#93a584f9ffaa6192a9fa833dd8484be4bd137c27" - integrity sha512-1Z3Jb5F/OMVGS4fW9OQm3gS6jmpaIvU3vNxanqiGLOkUJXYjK2JOASx3dtoYTP8mJxjRNW1VUtNVYOy9umkQUg== - -"@depay/web3-constants@^6.4.0": - version "6.4.0" - resolved "https://registry.yarnpkg.com/@depay/web3-constants/-/web3-constants-6.4.0.tgz#58aae0c953ed5ebad3731ae8b791ba1f9e18585b" - integrity sha512-asBMISqtjLZwyJlhppNZ/q46Fga2PzxRtjYNgcSkpSN6Qf0YJ3wpDt3nVPQel5ggRbleCNQOsrBI5Jzsu7xGYg== - -"@depay/web3-mock-solana@^13.25.5": - version "13.25.5" - resolved "https://registry.yarnpkg.com/@depay/web3-mock-solana/-/web3-mock-solana-13.25.5.tgz#87797293c04fda455e38bf1411942986ee6bb12f" - integrity sha512-l3eLDpXEU2D3RS6DcuDPwX3R7xZA6CjchJ+hOA4Sec6Uwo9lyYGd9rQ6MH+o111x7wCPxODjx09Mzi6eb7kEeA== - dependencies: - "@depay/solana-web3.js" "^1.20.15" - "@depay/web3-blockchains" "^6.5.1" - "@depay/web3-constants" "^6.4.0" - ethers "^5.7.1" +"@depay/web3-blockchains@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@depay/web3-blockchains/-/web3-blockchains-7.0.0.tgz#d319befc16aa7019428e76b6bc7df607cd2955ac" + integrity sha512-79L2Fz0umZ2ToBltA2XtbOqXVi33ocUsOXdHBFpEUC6XXBedP7d4aRcwS/NFFe6y7PBxV3jqbAAvzCamL+wq6g== -"@depay/web3-mock@^13.25.5": - version "13.25.5" - resolved "https://registry.yarnpkg.com/@depay/web3-mock/-/web3-mock-13.25.5.tgz#8e16ca2754317345a622b34fd59a17b41f78397c" - integrity sha512-DJhoOtMv8i0WuI1H+0o3CvafDsZYQXMv2CRmwOXdEksxXD6uU6VpZAXhYQAN9bS/H5U9LFTtLDgqkqE0m6dG6A== +"@depay/web3-mock@^13.26.0": + version "13.26.0" + resolved "https://registry.yarnpkg.com/@depay/web3-mock/-/web3-mock-13.26.0.tgz#d7ad4faf1f8b0f650e2bacb4ffeae1022ecf71de" + integrity sha512-LMticjDtjhifYRC9wCW0VNEt1OS5Asexu7BKY8EyF/C7FWO74YV+TxzILVpPAWLNnKLV9m2KxIs0W30U0QMwFw== dependencies: "@depay/solana-web3.js" "^1.20.15" - "@depay/web3-blockchains" "^6.5.1" - "@depay/web3-constants" "^6.4.0" + "@depay/web3-blockchains" "^7.0.0" ethers "^5.7.1" "@eslint/eslintrc@^0.4.3":