@hinkal/common 0.1.34 → 0.1.35
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./deploy-data/deploy-data-bnbMainnet.json.cjs"),l=require("./deploy-data/deploy-data-arbMainnet.json.cjs"),d=require("./deploy-data/deploy-data-ethMainnet.json.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./deploy-data/deploy-data-bnbMainnet.json.cjs"),l=require("./deploy-data/deploy-data-arbMainnet.json.cjs"),d=require("./deploy-data/deploy-data-ethMainnet.json.cjs"),h=require("./deploy-data/deploy-data-optimism.json.cjs"),u=require("./deploy-data/deploy-data-polygon.json.cjs"),m=require("./deploy-data/deploy-data-avalanche.json.cjs"),b=require("./deploy-data/deploy-data-base.json.cjs"),F=require("./deploy-data/deploy-data-localhost.json.cjs"),y=require("./deploy-data/deploy-data-axelar1.json.cjs"),g=require("./deploy-data/deploy-data-axelar2.json.cjs"),s=require("./vite.constants.cjs"),e={polygon:137,arbMainnet:42161,ethMainnet:1,avalanche:43114,bnbMainnet:56,optimism:10,base:8453,bnbTestnet:97,polygonMumbai:80001,mainnetSepolia:11155111,optimismSepolia:11155420,axelar1:2500,axelar2:2501,localhost:31337,hardhat:31337},n=e.ethMainnet,r=t=>!![e.axelar1,e.axelar2,e.localhost].includes(t),f=t=>t?r(t)?n:t:n,a={[e.ethMainnet]:{name:"Ethereum",chainId:e.ethMainnet,rpcUrl:"https://rpc.ankr.com/eth",fetchRpcUrl:"https://eth-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",supported:!0,contractData:d.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",accessTokenMintingFee:"0",priority:1,privateMempoolRpcUrl:"https://relay.flashbots.net"},[e.arbMainnet]:{name:"Arbitrum",chainId:e.arbMainnet,rpcUrl:"https://endpoints.omniatech.io/v1/arbitrum/one/public",fetchRpcUrl:"https://arb-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",supported:!0,contractData:l.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",accessTokenMintingFee:"0",priority:2},[e.optimism]:{name:"Optimism",chainId:e.optimism,rpcUrl:"https://optimism-mainnet.infura.io/v3/c26b99456bb6464bb498926ff5162903",fetchRpcUrl:"https://opt-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",supported:!0,contractData:h.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",accessTokenMintingFee:"0",priority:3},[e.polygon]:{name:"Polygon",chainId:e.polygon,rpcUrl:"https://polygon-rpc.com",fetchRpcUrl:"https://polygon-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",supported:!0,contractData:u.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",accessTokenMintingFee:"0",priority:4},[e.avalanche]:{name:"Avalanche",chainId:e.avalanche,rpcUrl:"https://api.avax.network/ext/bc/C/rpc",fetchRpcUrl:"https://avax-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",supported:!0,contractData:m.default,quoterV2Address:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",uniswapV3FactoryAddress:"0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD",accessTokenMintingFee:"0",priority:5},[e.bnbMainnet]:{name:"BNB Chain",chainId:e.bnbMainnet,rpcUrl:"https://bsc-dataseed.binance.org",maxPageSize:1e3,fetchRpcUrl:"https://rpc.ankr.com/bsc/e2873adb3a38b045946aab68a342686642e27f1c4740d820075d438ad512f7ac",supported:!0,contractData:p.default,quoterV2Address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",uniswapV3FactoryAddress:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",accessTokenMintingFee:"0",priority:6},[e.base]:{name:"Base",chainId:e.base,rpcUrl:"https://mainnet.base.org/",fetchRpcUrl:"https://base-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",supported:!0,contractData:b.default,quoterV2Address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",uniswapV3FactoryAddress:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",accessTokenMintingFee:"0",priority:7},...s.isDevelopment?{}:{}},A={name:"Localhost",chainId:e.localhost,rpcUrl:"http://localhost:8545",fetchRpcUrl:"http://localhost:8545",supported:!0,contractData:F.default,quoterV2Address:a[n].quoterV2Address,uniswapV3FactoryAddress:a[n].uniswapV3FactoryAddress,accessTokenMintingFee:a[n].accessTokenMintingFee,priority:7},k={name:"axelar1",chainId:e.axelar1,rpcUrl:"http://localhost:8600/0",fetchRpcUrl:"http://localhost:8600/0",supported:!0,contractData:y.default,quoterV2Address:a[n].quoterV2Address,uniswapV3FactoryAddress:a[n].uniswapV3FactoryAddress,accessTokenMintingFee:a[n].accessTokenMintingFee,priority:8},D={name:"axelar2",chainId:e.axelar2,rpcUrl:"http://localhost:8600/1",fetchRpcUrl:"http://localhost:8600/1",supported:!0,contractData:g.default,quoterV2Address:a[n].quoterV2Address,uniswapV3FactoryAddress:a[n].uniswapV3FactoryAddress,accessTokenMintingFee:a[n].accessTokenMintingFee,priority:9};s.isDevelopment&&(a[e.localhost]=A,a[e.axelar1]=k,a[e.axelar2]=D);const M=[e.ethMainnet,e.arbMainnet,e.avalanche,e.bnbMainnet,e.polygon,e.optimism,e.base];var o=(t=>(t.Mainnet="Mainnet",t.Testnet="Testnet",t.Local="Local",t))(o||{});const U={Mainnet:[e.polygon,e.arbMainnet,e.ethMainnet,e.bnbMainnet,e.optimism,e.avalanche,e.base],Testnet:[e.bnbTestnet,e.polygonMumbai],Local:[e.localhost,e.axelar1,e.axelar2]},c=t=>[e.optimism,e.base].includes(t),i=t=>!1,x=t=>c(t)||i();exports.EthereumNetworkType=o;exports.chainIds=e;exports.chainIdsByType=U;exports.crossChainAccessTokenNetworks=M;exports.getNonLocalhostChainId=f;exports.isLocalNetwork=r;exports.isOptimismBedrockLike=i;exports.isOptimismEcotoneLike=c;exports.isOptimismLike=x;exports.localhostNetwork=n;exports.networkRegistry=a;
|
|
@@ -4,10 +4,10 @@ import c from "./deploy-data/deploy-data-ethMainnet.json.mjs";
|
|
|
4
4
|
import i from "./deploy-data/deploy-data-optimism.json.mjs";
|
|
5
5
|
import p from "./deploy-data/deploy-data-polygon.json.mjs";
|
|
6
6
|
import l from "./deploy-data/deploy-data-avalanche.json.mjs";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
7
|
+
import d from "./deploy-data/deploy-data-base.json.mjs";
|
|
8
|
+
import m from "./deploy-data/deploy-data-localhost.json.mjs";
|
|
9
|
+
import h from "./deploy-data/deploy-data-axelar1.json.mjs";
|
|
10
|
+
import b from "./deploy-data/deploy-data-axelar2.json.mjs";
|
|
11
11
|
import { isDevelopment as r } from "./vite.constants.mjs";
|
|
12
12
|
const a = {
|
|
13
13
|
polygon: 137,
|
|
@@ -25,12 +25,12 @@ const a = {
|
|
|
25
25
|
axelar2: 2501,
|
|
26
26
|
localhost: 31337,
|
|
27
27
|
hardhat: 31337
|
|
28
|
-
}, n = a.ethMainnet,
|
|
28
|
+
}, n = a.ethMainnet, F = (t) => !![a.axelar1, a.axelar2, a.localhost].includes(t), q = (t) => t ? F(t) ? n : t : n, e = {
|
|
29
29
|
[a.ethMainnet]: {
|
|
30
30
|
name: "Ethereum",
|
|
31
31
|
chainId: a.ethMainnet,
|
|
32
32
|
rpcUrl: "https://rpc.ankr.com/eth",
|
|
33
|
-
fetchRpcUrl: "https://mainnet.
|
|
33
|
+
fetchRpcUrl: "https://eth-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",
|
|
34
34
|
supported: !0,
|
|
35
35
|
contractData: c,
|
|
36
36
|
quoterV2Address: "0x61fFE014bA17989E743c5F6cB21bF9697530B21e",
|
|
@@ -43,7 +43,7 @@ const a = {
|
|
|
43
43
|
name: "Arbitrum",
|
|
44
44
|
chainId: a.arbMainnet,
|
|
45
45
|
rpcUrl: "https://endpoints.omniatech.io/v1/arbitrum/one/public",
|
|
46
|
-
fetchRpcUrl: "https://
|
|
46
|
+
fetchRpcUrl: "https://arb-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",
|
|
47
47
|
supported: !0,
|
|
48
48
|
contractData: s,
|
|
49
49
|
quoterV2Address: "0x61fFE014bA17989E743c5F6cB21bF9697530B21e",
|
|
@@ -55,7 +55,7 @@ const a = {
|
|
|
55
55
|
name: "Optimism",
|
|
56
56
|
chainId: a.optimism,
|
|
57
57
|
rpcUrl: "https://optimism-mainnet.infura.io/v3/c26b99456bb6464bb498926ff5162903",
|
|
58
|
-
fetchRpcUrl: "https://
|
|
58
|
+
fetchRpcUrl: "https://opt-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",
|
|
59
59
|
supported: !0,
|
|
60
60
|
contractData: i,
|
|
61
61
|
quoterV2Address: "0x61fFE014bA17989E743c5F6cB21bF9697530B21e",
|
|
@@ -67,7 +67,7 @@ const a = {
|
|
|
67
67
|
name: "Polygon",
|
|
68
68
|
chainId: a.polygon,
|
|
69
69
|
rpcUrl: "https://polygon-rpc.com",
|
|
70
|
-
fetchRpcUrl: "https://polygon-mainnet.
|
|
70
|
+
fetchRpcUrl: "https://polygon-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",
|
|
71
71
|
supported: !0,
|
|
72
72
|
contractData: p,
|
|
73
73
|
quoterV2Address: "0x61fFE014bA17989E743c5F6cB21bF9697530B21e",
|
|
@@ -79,7 +79,7 @@ const a = {
|
|
|
79
79
|
name: "Avalanche",
|
|
80
80
|
chainId: a.avalanche,
|
|
81
81
|
rpcUrl: "https://api.avax.network/ext/bc/C/rpc",
|
|
82
|
-
fetchRpcUrl: "https://
|
|
82
|
+
fetchRpcUrl: "https://avax-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",
|
|
83
83
|
supported: !0,
|
|
84
84
|
contractData: l,
|
|
85
85
|
quoterV2Address: "0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",
|
|
@@ -105,9 +105,9 @@ const a = {
|
|
|
105
105
|
chainId: a.base,
|
|
106
106
|
rpcUrl: "https://mainnet.base.org/",
|
|
107
107
|
// maxPageSize: 1000,
|
|
108
|
-
fetchRpcUrl: "https://base-mainnet.
|
|
108
|
+
fetchRpcUrl: "https://base-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",
|
|
109
109
|
supported: !0,
|
|
110
|
-
contractData:
|
|
110
|
+
contractData: d,
|
|
111
111
|
quoterV2Address: "0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",
|
|
112
112
|
uniswapV3FactoryAddress: "0x33128a8fC17869897dcE68Ed026d694621f6FDfD",
|
|
113
113
|
accessTokenMintingFee: "0",
|
|
@@ -120,36 +120,36 @@ const a = {
|
|
|
120
120
|
rpcUrl: "http://localhost:8545",
|
|
121
121
|
fetchRpcUrl: "http://localhost:8545",
|
|
122
122
|
supported: !0,
|
|
123
|
-
contractData:
|
|
123
|
+
contractData: m,
|
|
124
124
|
quoterV2Address: e[n].quoterV2Address,
|
|
125
125
|
uniswapV3FactoryAddress: e[n].uniswapV3FactoryAddress,
|
|
126
126
|
accessTokenMintingFee: e[n].accessTokenMintingFee,
|
|
127
127
|
priority: 7
|
|
128
|
-
},
|
|
128
|
+
}, f = {
|
|
129
129
|
name: "axelar1",
|
|
130
130
|
chainId: a.axelar1,
|
|
131
131
|
rpcUrl: "http://localhost:8600/0",
|
|
132
132
|
fetchRpcUrl: "http://localhost:8600/0",
|
|
133
133
|
supported: !0,
|
|
134
|
-
contractData:
|
|
134
|
+
contractData: h,
|
|
135
135
|
quoterV2Address: e[n].quoterV2Address,
|
|
136
136
|
uniswapV3FactoryAddress: e[n].uniswapV3FactoryAddress,
|
|
137
137
|
accessTokenMintingFee: e[n].accessTokenMintingFee,
|
|
138
138
|
priority: 8
|
|
139
|
-
},
|
|
139
|
+
}, g = {
|
|
140
140
|
name: "axelar2",
|
|
141
141
|
chainId: a.axelar2,
|
|
142
142
|
rpcUrl: "http://localhost:8600/1",
|
|
143
143
|
fetchRpcUrl: "http://localhost:8600/1",
|
|
144
144
|
supported: !0,
|
|
145
|
-
contractData:
|
|
145
|
+
contractData: b,
|
|
146
146
|
quoterV2Address: e[n].quoterV2Address,
|
|
147
147
|
uniswapV3FactoryAddress: e[n].uniswapV3FactoryAddress,
|
|
148
148
|
accessTokenMintingFee: e[n].accessTokenMintingFee,
|
|
149
149
|
priority: 9
|
|
150
150
|
};
|
|
151
|
-
r && (e[a.localhost] = u, e[a.axelar1] =
|
|
152
|
-
const
|
|
151
|
+
r && (e[a.localhost] = u, e[a.axelar1] = f, e[a.axelar2] = g);
|
|
152
|
+
const z = [
|
|
153
153
|
a.ethMainnet,
|
|
154
154
|
a.arbMainnet,
|
|
155
155
|
a.avalanche,
|
|
@@ -158,8 +158,8 @@ const I = [
|
|
|
158
158
|
a.optimism,
|
|
159
159
|
a.base
|
|
160
160
|
];
|
|
161
|
-
var
|
|
162
|
-
const
|
|
161
|
+
var y = /* @__PURE__ */ ((t) => (t.Mainnet = "Mainnet", t.Testnet = "Testnet", t.Local = "Local", t))(y || {});
|
|
162
|
+
const C = {
|
|
163
163
|
Mainnet: [
|
|
164
164
|
a.polygon,
|
|
165
165
|
a.arbMainnet,
|
|
@@ -171,17 +171,17 @@ const R = {
|
|
|
171
171
|
],
|
|
172
172
|
Testnet: [a.bnbTestnet, a.polygonMumbai],
|
|
173
173
|
Local: [a.localhost, a.axelar1, a.axelar2]
|
|
174
|
-
},
|
|
174
|
+
}, A = (t) => [a.optimism, a.base].includes(t), D = (t) => !1, G = (t) => A(t) || D();
|
|
175
175
|
export {
|
|
176
|
-
|
|
176
|
+
y as EthereumNetworkType,
|
|
177
177
|
a as chainIds,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
178
|
+
C as chainIdsByType,
|
|
179
|
+
z as crossChainAccessTokenNetworks,
|
|
180
|
+
q as getNonLocalhostChainId,
|
|
181
|
+
F as isLocalNetwork,
|
|
182
182
|
D as isOptimismBedrockLike,
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
A as isOptimismEcotoneLike,
|
|
184
|
+
G as isOptimismLike,
|
|
185
185
|
n as localhostNetwork,
|
|
186
186
|
e as networkRegistry
|
|
187
187
|
};
|
package/package.json
CHANGED
package/types/relayer.types.d.ts
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
1
|
export interface RelayerTransaction {
|
|
2
|
+
to: string;
|
|
3
|
+
from: string;
|
|
4
|
+
contractAddress: string | null;
|
|
5
|
+
gasUsed: {
|
|
6
|
+
type: string;
|
|
7
|
+
hex: string;
|
|
8
|
+
};
|
|
9
|
+
logsBloom: string;
|
|
10
|
+
blockHash: string;
|
|
2
11
|
transactionHash: string;
|
|
12
|
+
blockNumber: number;
|
|
13
|
+
confirmations: number;
|
|
14
|
+
cumulativeGasUsed: {
|
|
15
|
+
type: string;
|
|
16
|
+
hex: string;
|
|
17
|
+
};
|
|
18
|
+
effectiveGasPrice: {
|
|
19
|
+
type: string;
|
|
20
|
+
hex: string;
|
|
21
|
+
};
|
|
22
|
+
status: number;
|
|
23
|
+
type: number;
|
|
24
|
+
byzantium: boolean;
|
|
3
25
|
}
|