Skip to content

Commit

Permalink
v10.7.0: upgrade web3-blockchains and remove web3-constants internally
Browse files Browse the repository at this point in the history
  • Loading branch information
10xSebastian committed Mar 22, 2023
1 parent 6819c92 commit c4fe850
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 45 deletions.
4 changes: 2 additions & 2 deletions dist/esm/index.evm.js
Original file line number Diff line number Diff line change
@@ -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) => {
Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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) {
Expand Down
8 changes: 6 additions & 2 deletions dist/umd/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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) {
Expand Down
8 changes: 6 additions & 2 deletions dist/umd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions package.evm.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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": {
Expand Down
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions package.solana.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
},
Expand Down
4 changes: 2 additions & 2 deletions src/clients/ethers/provider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Blockchain } from '@depay/web3-blockchains'
import Blockchains from '@depay/web3-blockchains'
import { ethers } from 'ethers'

const BATCH_INTERVAL = 10
Expand All @@ -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) {
Expand Down
34 changes: 9 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit c4fe850

Please sign in to comment.