@gearbox-protocol/sdk 8.29.0 → 8.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,7 +52,25 @@ const ADDRESS_PROVIDER_BLOCK = {
52
52
  Lisk: 18934260n
53
53
  // arbitrary not deployed yet
54
54
  };
55
- const BLOCK_DURATION_LOCAL = {};
55
+ const BLOCK_DURATION_LOCAL = {
56
+ Mainnet: 12050,
57
+ Arbitrum: 260,
58
+ Optimism: 2e3,
59
+ Base: 2010,
60
+ Sonic: 910,
61
+ // New networks
62
+ MegaETH: 10,
63
+ // <10ms/block, on testnet
64
+ Monad: 1e3,
65
+ // on testnet
66
+ Berachain: 1900,
67
+ Avalanche: 1700,
68
+ BNB: 3e3,
69
+ WorldChain: 2e3,
70
+ Etherlink: 1e3,
71
+ Hemi: 12e3,
72
+ Lisk: 2e3
73
+ };
56
74
  const BLOCK_DURATION = Object.values(import_chain.chains).reduce(
57
75
  (acc, chain) => {
58
76
  const blockTime = chain.blockTime || BLOCK_DURATION_LOCAL[chain.network] || 0;
@@ -66,7 +84,9 @@ const BLOCK_DURATION = Object.values(import_chain.chains).reduce(
66
84
  const RAMP_TIME = 30 * 24 * 60 * 60 * 1.2;
67
85
  const RAMP_DURATION_BY_NETWORK = import_mappers.TypedObjectUtils.entries(BLOCK_DURATION).reduce(
68
86
  (acc, [n, duration]) => {
69
- acc[n] = BigInt(Math.floor(RAMP_TIME / duration));
87
+ if (duration !== 0) {
88
+ acc[n] = BigInt(Math.floor(RAMP_TIME / duration));
89
+ }
70
90
  return acc;
71
91
  },
72
92
  {}
@@ -27,7 +27,25 @@ const ADDRESS_PROVIDER_BLOCK = {
27
27
  Lisk: 18934260n
28
28
  // arbitrary not deployed yet
29
29
  };
30
- const BLOCK_DURATION_LOCAL = {};
30
+ const BLOCK_DURATION_LOCAL = {
31
+ Mainnet: 12050,
32
+ Arbitrum: 260,
33
+ Optimism: 2e3,
34
+ Base: 2010,
35
+ Sonic: 910,
36
+ // New networks
37
+ MegaETH: 10,
38
+ // <10ms/block, on testnet
39
+ Monad: 1e3,
40
+ // on testnet
41
+ Berachain: 1900,
42
+ Avalanche: 1700,
43
+ BNB: 3e3,
44
+ WorldChain: 2e3,
45
+ Etherlink: 1e3,
46
+ Hemi: 12e3,
47
+ Lisk: 2e3
48
+ };
31
49
  const BLOCK_DURATION = Object.values(CHAINS).reduce(
32
50
  (acc, chain) => {
33
51
  const blockTime = chain.blockTime || BLOCK_DURATION_LOCAL[chain.network] || 0;
@@ -41,7 +59,9 @@ const BLOCK_DURATION = Object.values(CHAINS).reduce(
41
59
  const RAMP_TIME = 30 * 24 * 60 * 60 * 1.2;
42
60
  const RAMP_DURATION_BY_NETWORK = TypedObjectUtils.entries(BLOCK_DURATION).reduce(
43
61
  (acc, [n, duration]) => {
44
- acc[n] = BigInt(Math.floor(RAMP_TIME / duration));
62
+ if (duration !== 0) {
63
+ acc[n] = BigInt(Math.floor(RAMP_TIME / duration));
64
+ }
45
65
  return acc;
46
66
  },
47
67
  {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "8.29.0",
3
+ "version": "8.29.1",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",