From 8db64c22d8ea89e83b3836c4726833981f62b674 Mon Sep 17 00:00:00 2001 From: Mark Paul Date: Sat, 9 Nov 2024 09:28:23 +1100 Subject: [PATCH] fix: increase all mvx timeouts to 20s and upgrade mvx network provider to last stable --- package-lock.json | 47 +++++++++++++++++++++++++---------------- package.json | 4 ++-- src/bond.ts | 4 ++-- src/contract.ts | 2 +- src/liveliness-stake.ts | 2 +- src/marketplace.ts | 4 ++-- src/minter.ts | 2 +- src/nft-minter.ts | 4 ++-- src/sft-minter.ts | 4 ++-- 9 files changed, 42 insertions(+), 31 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9c1bdc3..6ff8e94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "@itheum/sdk-mx-data-nft", - "version": "3.6.1", + "version": "3.7.0-alpha.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@itheum/sdk-mx-data-nft", - "version": "3.6.1", + "version": "3.7.0-alpha.7", "license": "GPL-3.0-only", "dependencies": { "@multiversx/sdk-core": "13.2.2", - "@multiversx/sdk-network-providers": "2.4.3", + "@multiversx/sdk-network-providers": "^2.8.0", "bignumber.js": "9.1.2", "nft.storage": "7.2.0" }, @@ -1960,15 +1960,17 @@ } }, "node_modules/@multiversx/sdk-network-providers": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@multiversx/sdk-network-providers/-/sdk-network-providers-2.4.3.tgz", - "integrity": "sha512-tJmJuxU+BjtC2q29PuzQOM4Qr6aiXujKwQXgIAPHTiuNbMc3Yi6Q4B0DC1PfI3iG+M4DONwfXknvM1uwqnY2zA==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@multiversx/sdk-network-providers/-/sdk-network-providers-2.8.0.tgz", + "integrity": "sha512-p28NVS+uKpfPH4O0yR2LJtCNBHi1o95a3L51pCco1F4UN5seYEXYqOgP0GBxPd0WtajMXR1r5dnCrX9CFHDGcA==", "dependencies": { - "axios": "1.6.8", "bech32": "1.1.4", "bignumber.js": "9.0.1", "buffer": "6.0.3", "json-bigint": "1.0.0" + }, + "peerDependencies": { + "axios": "^1.7.4" } }, "node_modules/@multiversx/sdk-network-providers/node_modules/bignumber.js": { @@ -3275,7 +3277,8 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "peer": true }, "node_modules/available-typed-arrays": { "version": "1.0.5", @@ -3289,9 +3292,10 @@ } }, "node_modules/axios": { - "version": "1.6.8", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", - "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "peer": true, "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -3857,6 +3861,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "peer": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -4264,6 +4269,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "peer": true, "engines": { "node": ">=0.4.0" } @@ -4855,15 +4861,16 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], + "peer": true, "engines": { "node": ">=4.0" }, @@ -4882,9 +4889,10 @@ } }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "peer": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -7452,6 +7460,7 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "peer": true, "engines": { "node": ">= 0.6" } @@ -7460,6 +7469,7 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "peer": true, "dependencies": { "mime-db": "1.52.0" }, @@ -10874,7 +10884,8 @@ "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "peer": true }, "node_modules/punycode.js": { "version": "2.3.1", diff --git a/package.json b/package.json index 522de3d..f2a5737 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@itheum/sdk-mx-data-nft", - "version": "3.7.0-alpha.7", + "version": "3.8.0-alpha.1", "description": "SDK for Itheum's Data NFT Technology on MultiversX Blockchain", "main": "out/index.js", "types": "out/index.d.js", @@ -18,7 +18,7 @@ "license": "GPL-3.0-only", "dependencies": { "@multiversx/sdk-core": "13.2.2", - "@multiversx/sdk-network-providers": "2.4.3", + "@multiversx/sdk-network-providers": "2.8.0", "bignumber.js": "9.1.2", "nft.storage": "7.2.0" }, diff --git a/src/bond.ts b/src/bond.ts index 4ff49ef..f1e65a0 100644 --- a/src/bond.ts +++ b/src/bond.ts @@ -44,9 +44,9 @@ export class BondContract extends Contract { /** * Creates a new instance of the DataNftMarket which can be used to interact with the marketplace smart contract * @param env 'devnet' | 'mainnet' | 'testnet' - * @param timeout Timeout for the network provider (DEFAULT = 10000ms) + * @param timeout Timeout for the network provider (DEFAULT = 20000ms) */ - constructor(env: string, timeout: number = 10000) { + constructor(env: string, timeout: number = 20000) { super( env, new Address(bondContractAddress[env as EnvironmentsEnum]), diff --git a/src/contract.ts b/src/contract.ts index a6c77f4..e7e6702 100644 --- a/src/contract.ts +++ b/src/contract.ts @@ -18,7 +18,7 @@ export abstract class Contract { env: string, contractAddress: IAddress, abiFile: any, - timeout: number = 10000 + timeout: number = 20000 ) { if (!(env in EnvironmentsEnum)) { throw new ErrNetworkConfig( diff --git a/src/liveliness-stake.ts b/src/liveliness-stake.ts index 395c464..56fb9e7 100644 --- a/src/liveliness-stake.ts +++ b/src/liveliness-stake.ts @@ -33,7 +33,7 @@ import BigNumber from 'bignumber.js'; import { Token } from 'nft.storage'; export class LivelinessStake extends Contract { - constructor(env: string, timeout: number = 10000) { + constructor(env: string, timeout: number = 20000) { super( env, new Address(livelinessStakeContractAddress[env as EnvironmentsEnum]), diff --git a/src/marketplace.ts b/src/marketplace.ts index bf6b90e..9b108f3 100644 --- a/src/marketplace.ts +++ b/src/marketplace.ts @@ -39,9 +39,9 @@ export class DataNftMarket { /** * Creates a new instance of the DataNftMarket which can be used to interact with the marketplace smart contract * @param env 'devnet' | 'mainnet' | 'testnet' - * @param timeout Timeout for the network provider (DEFAULT = 10000ms) + * @param timeout Timeout for the network provider (DEFAULT = 20000ms) */ - constructor(env: string, timeout: number = 10000) { + constructor(env: string, timeout: number = 20000) { if (!(env in EnvironmentsEnum)) { throw new ErrNetworkConfig( `Invalid environment: ${env}, Expected: 'devnet' | 'mainnet' | 'testnet'` diff --git a/src/minter.ts b/src/minter.ts index f3757bf..e167d6a 100644 --- a/src/minter.ts +++ b/src/minter.ts @@ -32,7 +32,7 @@ export abstract class Minter extends Contract { env: string, contractAddress: IAddress, abiFile: any, - timeout: number = 10000 + timeout: number = 20000 ) { super(env, contractAddress, abiFile, timeout); this.imageServiceUrl = imageService[env as EnvironmentsEnum]; diff --git a/src/nft-minter.ts b/src/nft-minter.ts index 14f2db8..926c95e 100644 --- a/src/nft-minter.ts +++ b/src/nft-minter.ts @@ -29,9 +29,9 @@ export class NftMinter extends Minter { * Creates a new instance of the `NftMinter` class, which is used to interact with the factory generated smart contract. * @param env 'devnet' | 'mainnet' | 'testnet' * @param contractAddress The address of the factory generated smart contract - * @param timeout Timeout for the network provider (DEFAULT = 10000ms) + * @param timeout Timeout for the network provider (DEFAULT = 20000ms) */ - constructor(env: string, contractAddress: IAddress, timeout: number = 10000) { + constructor(env: string, contractAddress: IAddress, timeout: number = 20000) { super(env, contractAddress, dataNftLeaseAbi, timeout); } diff --git a/src/sft-minter.ts b/src/sft-minter.ts index 3d5d908..1eb2d35 100644 --- a/src/sft-minter.ts +++ b/src/sft-minter.ts @@ -37,9 +37,9 @@ export class SftMinter extends Minter { /** * Creates a new instance of the `SftMinter` class, which can be used to interact with the Data NFT-FT minter smart contract * @param env 'devnet' | 'mainnet' | 'testnet' - * @param timeout Timeout for the network provider (DEFAULT = 10000ms) + * @param timeout Timeout for the network provider (DEFAULT = 20000ms) */ - constructor(env: string, timeout: number = 10000) { + constructor(env: string, timeout: number = 20000) { super( env, new Address(minterContractAddress[env as EnvironmentsEnum]),