@vechain/vechain-kit 1.5.9 → 1.5.11
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.
- package/dist/{chunk-5YN7CZ5H.cjs → chunk-DBQR2OKX.cjs} +8 -4
- package/dist/chunk-DBQR2OKX.cjs.map +1 -0
- package/dist/{chunk-USAHFGIQ.js → chunk-RSEKQ6PP.js} +8 -4
- package/dist/chunk-RSEKQ6PP.js.map +1 -0
- package/dist/index.cjs +384 -214
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -1
- package/dist/index.d.ts +66 -1
- package/dist/index.js +186 -21
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/utils/index.cjs +31 -31
- package/dist/utils/index.js +1 -1
- package/package.json +4 -2
- package/dist/chunk-5YN7CZ5H.cjs.map +0 -1
- package/dist/chunk-USAHFGIQ.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk5GZ7N47F_cjs = require('./chunk-5GZ7N47F.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkDBQR2OKX_cjs = require('./chunk-DBQR2OKX.cjs');
|
|
5
5
|
var chunkA4NZ5AVL_cjs = require('./chunk-A4NZ5AVL.cjs');
|
|
6
6
|
require('./chunk-Q7SFCCGT.cjs');
|
|
7
7
|
var React10 = require('react');
|
|
@@ -92,7 +92,7 @@ var PRICE_FEED_IDS = {
|
|
|
92
92
|
};
|
|
93
93
|
var getTokenUsdPrice = async (thor, token, network) => {
|
|
94
94
|
const functionFragment2 = OracleInterface.getFunction("getLatestValue").format("json");
|
|
95
|
-
const res = await thor.account(
|
|
95
|
+
const res = await thor.account(chunkDBQR2OKX_cjs.getConfig(network).oracleContractAddress).method(JSON.parse(functionFragment2)).call(PRICE_FEED_IDS[token]);
|
|
96
96
|
if (res.reverted) throw new Error("Reverted");
|
|
97
97
|
return new bignumber_js.BigNumber(res.decoded[0]).div(1e12).toNumber();
|
|
98
98
|
};
|
|
@@ -111,11 +111,11 @@ var useGetTokenUsdPrice = (token) => {
|
|
|
111
111
|
var B3TRInterface = chunk5GZ7N47F_cjs.IB3TR__factory.createInterface();
|
|
112
112
|
var getB3trBalance = async (thor, network, address) => {
|
|
113
113
|
const functionFragment2 = B3TRInterface.getFunction("balanceOf").format("json");
|
|
114
|
-
const res = await thor.account(
|
|
114
|
+
const res = await thor.account(chunkDBQR2OKX_cjs.getConfig(network).b3trContractAddress).method(JSON.parse(functionFragment2)).call(address);
|
|
115
115
|
if (res.reverted) throw new Error("Reverted");
|
|
116
116
|
const original = res.decoded[0];
|
|
117
117
|
const scaled = viem.formatEther(original);
|
|
118
|
-
const formatted = scaled === "0" ? "0" :
|
|
118
|
+
const formatted = scaled === "0" ? "0" : chunkDBQR2OKX_cjs.humanNumber(scaled);
|
|
119
119
|
return {
|
|
120
120
|
original,
|
|
121
121
|
scaled,
|
|
@@ -138,11 +138,11 @@ var useGetB3trBalance = (address) => {
|
|
|
138
138
|
var VOT3Interface = chunk5GZ7N47F_cjs.IVOT3__factory.createInterface();
|
|
139
139
|
var getVot3Balance = async (thor, network, address) => {
|
|
140
140
|
const functionFragment2 = VOT3Interface.getFunction("balanceOf").format("json");
|
|
141
|
-
const res = await thor.account(
|
|
141
|
+
const res = await thor.account(chunkDBQR2OKX_cjs.getConfig(network).vot3ContractAddress).method(JSON.parse(functionFragment2)).call(address);
|
|
142
142
|
if (res.reverted) throw new Error("Reverted");
|
|
143
143
|
const original = res.decoded[0];
|
|
144
144
|
const scaled = viem.formatEther(original);
|
|
145
|
-
const formatted = scaled === "0" ? "0" :
|
|
145
|
+
const formatted = scaled === "0" ? "0" : chunkDBQR2OKX_cjs.humanNumber(scaled);
|
|
146
146
|
return {
|
|
147
147
|
original,
|
|
148
148
|
scaled,
|
|
@@ -168,7 +168,7 @@ var contractInterface = chunk5GZ7N47F_cjs.GalaxyMember__factory.createInterface(
|
|
|
168
168
|
var method = "getIdAttachedToNode";
|
|
169
169
|
var useGetTokenIdAttachedToNode = (nodeId, enabled = true) => {
|
|
170
170
|
const { network } = useVeChainKitConfig();
|
|
171
|
-
const contractAddress =
|
|
171
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(network.type).galaxyMemberContractAddress;
|
|
172
172
|
return useCall({
|
|
173
173
|
contractInterface,
|
|
174
174
|
contractAddress,
|
|
@@ -184,7 +184,7 @@ var method2 = "getUserNodes";
|
|
|
184
184
|
var getUserNodesQueryKey = (user) => getCallKey({ method: method2, keyArgs: [user] });
|
|
185
185
|
var useGetUserNodes = (user) => {
|
|
186
186
|
const { network } = useVeChainKitConfig();
|
|
187
|
-
const contractAddress =
|
|
187
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
188
188
|
network.type
|
|
189
189
|
).nodeManagementContractAddress;
|
|
190
190
|
return useCall({
|
|
@@ -215,7 +215,7 @@ var method3 = "checkCooldown";
|
|
|
215
215
|
var getNodeCheckCooldownQueryKey = (nodeId) => getCallKey({ method: method3, keyArgs: [nodeId] });
|
|
216
216
|
var useXNodeCheckCooldown = (nodeId) => {
|
|
217
217
|
const { network } = useVeChainKitConfig();
|
|
218
|
-
const contractAddress =
|
|
218
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
219
219
|
network.type
|
|
220
220
|
).nodeManagementContractAddress;
|
|
221
221
|
return useCall({
|
|
@@ -236,11 +236,11 @@ var useXNode = (address) => {
|
|
|
236
236
|
const xNode = firstNode ? {
|
|
237
237
|
id: firstNode.nodeId,
|
|
238
238
|
level: Number(firstNode.nodeLevel),
|
|
239
|
-
image:
|
|
240
|
-
name:
|
|
239
|
+
image: chunkDBQR2OKX_cjs.NodeStrengthLevelToImage[Number(firstNode.nodeLevel)],
|
|
240
|
+
name: chunkDBQR2OKX_cjs.allNodeStrengthLevelToName[Number(firstNode.nodeLevel)]
|
|
241
241
|
} : void 0;
|
|
242
242
|
const xNodeName = xNode?.name ?? t("Not available");
|
|
243
|
-
const xNodeImage = xNode?.image ??
|
|
243
|
+
const xNodeImage = xNode?.image ?? chunkDBQR2OKX_cjs.notFoundImage;
|
|
244
244
|
const xNodeLevel = xNode?.level ?? 0;
|
|
245
245
|
const nodeType = Number(xNodeLevel) >= 4 ? "XNODE" : "ECONOMIC NODE";
|
|
246
246
|
const {
|
|
@@ -281,7 +281,7 @@ var getNodeIdsAbi = new thorDevkit.abi.Function(JSON.parse(getNodeIdsFragment));
|
|
|
281
281
|
var getNodeLevelsAbi = new thorDevkit.abi.Function(JSON.parse(getNodeLevelsFragment));
|
|
282
282
|
var getUserXNodes = async (thor, networkType, user) => {
|
|
283
283
|
if (!user) throw new Error("User address is required");
|
|
284
|
-
const contractAddress =
|
|
284
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(networkType).nodeManagementContractAddress;
|
|
285
285
|
const clauses = [
|
|
286
286
|
{
|
|
287
287
|
to: contractAddress,
|
|
@@ -307,8 +307,8 @@ var getUserXNodes = async (thor, networkType, user) => {
|
|
|
307
307
|
return {
|
|
308
308
|
id,
|
|
309
309
|
level: Number(levels[index]),
|
|
310
|
-
image:
|
|
311
|
-
name:
|
|
310
|
+
image: chunkDBQR2OKX_cjs.NodeStrengthLevelToImage[Number(levels[index])],
|
|
311
|
+
name: chunkDBQR2OKX_cjs.allNodeStrengthLevelToName[Number(levels[index])]
|
|
312
312
|
};
|
|
313
313
|
});
|
|
314
314
|
};
|
|
@@ -335,7 +335,7 @@ var getIsNodeHolderQueryKey = (address) => [
|
|
|
335
335
|
];
|
|
336
336
|
var getIsNodeHolder = async (thor, networkType, address) => {
|
|
337
337
|
if (!address) return Promise.reject(new Error("Address not provided"));
|
|
338
|
-
const contractAddress =
|
|
338
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(networkType).nodeManagementContractAddress;
|
|
339
339
|
const functionAbi2 = contractInterface4.getFunction(method4);
|
|
340
340
|
const res = await thor.account(contractAddress).method(functionAbi2).call(address);
|
|
341
341
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
@@ -351,7 +351,7 @@ var useIsNodeHolder = (address) => {
|
|
|
351
351
|
});
|
|
352
352
|
};
|
|
353
353
|
var getAppAdmin = async (thor, appId, networkType) => {
|
|
354
|
-
const X2EARNAPPS_CONTRACT =
|
|
354
|
+
const X2EARNAPPS_CONTRACT = chunkDBQR2OKX_cjs.getConfig(networkType).x2EarnAppsContractAddress;
|
|
355
355
|
const functionFragment2 = chunk5GZ7N47F_cjs.X2EarnApps__factory.createInterface().getFunction("appAdmin").format("json");
|
|
356
356
|
const res = await thor.account(X2EARNAPPS_CONTRACT).method(JSON.parse(functionFragment2)).call(appId);
|
|
357
357
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
@@ -379,7 +379,7 @@ var method5 = "appExists";
|
|
|
379
379
|
var getAppExistsQueryKey = (appId) => getCallKey({ method: method5, keyArgs: [appId] });
|
|
380
380
|
var useAppExists = (appId) => {
|
|
381
381
|
const { network } = useVeChainKitConfig();
|
|
382
|
-
const contractAddress =
|
|
382
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(network.type).x2EarnAppsContractAddress;
|
|
383
383
|
return useCall({
|
|
384
384
|
contractInterface: contractInterface5,
|
|
385
385
|
contractAddress,
|
|
@@ -389,7 +389,7 @@ var useAppExists = (appId) => {
|
|
|
389
389
|
});
|
|
390
390
|
};
|
|
391
391
|
var getAppsEligibleInNextRound = async (thor, networkType) => {
|
|
392
|
-
const X2EARNAPPS_CONTRACT =
|
|
392
|
+
const X2EARNAPPS_CONTRACT = chunkDBQR2OKX_cjs.getConfig(networkType).x2EarnAppsContractAddress;
|
|
393
393
|
const functionFragment2 = chunk5GZ7N47F_cjs.X2EarnApps__factory.createInterface().getFunction("allEligibleApps").format("json");
|
|
394
394
|
const res = await thor.account(X2EARNAPPS_CONTRACT).method(JSON.parse(functionFragment2)).call();
|
|
395
395
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
@@ -410,7 +410,7 @@ var useAppsEligibleInNextRound = () => {
|
|
|
410
410
|
};
|
|
411
411
|
var getRoundXApps = async (thor, networkType, roundId) => {
|
|
412
412
|
if (!roundId) return [];
|
|
413
|
-
const xAllocationVotingContract =
|
|
413
|
+
const xAllocationVotingContract = chunkDBQR2OKX_cjs.getConfig(networkType).xAllocationVotingContractAddress;
|
|
414
414
|
const functionFragment2 = chunk5GZ7N47F_cjs.XAllocationVoting__factory.createInterface().getFunction("getAppsOfRound").format("json");
|
|
415
415
|
const res = await thor.account(xAllocationVotingContract).method(JSON.parse(functionFragment2)).call(roundId);
|
|
416
416
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
@@ -441,7 +441,7 @@ var useRoundXApps = (roundId) => {
|
|
|
441
441
|
var currentBlockQueryKey = () => ["VECHAIN_KIT", "CURRENT_BLOCK"];
|
|
442
442
|
var useCurrentBlock = () => {
|
|
443
443
|
const { network } = useVeChainKitConfig();
|
|
444
|
-
const nodeUrl = network.nodeUrl ??
|
|
444
|
+
const nodeUrl = network.nodeUrl ?? chunkDBQR2OKX_cjs.getConfig(network.type).nodeUrl;
|
|
445
445
|
return reactQuery.useQuery({
|
|
446
446
|
queryKey: currentBlockQueryKey(),
|
|
447
447
|
queryFn: async () => {
|
|
@@ -569,7 +569,7 @@ var useTxReceipt = (txId, blockTimeout) => {
|
|
|
569
569
|
// src/hooks/api/vebetterdao/xApps/hooks/useUserVotesInRound.ts
|
|
570
570
|
var XAllocationVotingInterface = chunk5GZ7N47F_cjs.XAllocationVoting__factory.createInterface();
|
|
571
571
|
var getUserVotesInRound = async (thor, network, roundId, address) => {
|
|
572
|
-
const xAllocationVotingContract =
|
|
572
|
+
const xAllocationVotingContract = chunkDBQR2OKX_cjs.getConfig(network).xAllocationVotingContractAddress;
|
|
573
573
|
const eventFragment = XAllocationVotingInterface.getEvent("AllocationVoteCast").format(
|
|
574
574
|
"json"
|
|
575
575
|
);
|
|
@@ -593,7 +593,7 @@ var getUserVotesInRound = async (thor, network, roundId, address) => {
|
|
|
593
593
|
const events = await getAllEvents({
|
|
594
594
|
thor,
|
|
595
595
|
filterCriteria,
|
|
596
|
-
nodeUrl:
|
|
596
|
+
nodeUrl: chunkDBQR2OKX_cjs.getConfig(network).nodeUrl
|
|
597
597
|
});
|
|
598
598
|
const decodedAllocatedVoteEvents = [];
|
|
599
599
|
events.forEach((event) => {
|
|
@@ -664,7 +664,7 @@ var unendorsedAppsAbi = new thorDevkit.abi.Function(JSON.parse(unendorsedAppsFra
|
|
|
664
664
|
var allAppsFragment = chunk5GZ7N47F_cjs.X2EarnApps__factory.createInterface().getFunction("apps").format("json");
|
|
665
665
|
var allAppsAbi = new thorDevkit.abi.Function(JSON.parse(allAppsFragment));
|
|
666
666
|
var getXApps = async (thor, networkType) => {
|
|
667
|
-
const x2EarnAppsContract =
|
|
667
|
+
const x2EarnAppsContract = chunkDBQR2OKX_cjs.getConfig(networkType).x2EarnAppsContractAddress;
|
|
668
668
|
const clauses = [
|
|
669
669
|
{
|
|
670
670
|
to: x2EarnAppsContract,
|
|
@@ -747,7 +747,7 @@ var useXApp = (appId) => {
|
|
|
747
747
|
|
|
748
748
|
// src/hooks/api/vebetterdao/xApps/getXAppsMetadataBaseUri.ts
|
|
749
749
|
var getXAppsMetadataBaseUri = async (thor, networkType) => {
|
|
750
|
-
const X2EARNAPPS_CONTRACT =
|
|
750
|
+
const X2EARNAPPS_CONTRACT = chunkDBQR2OKX_cjs.getConfig(networkType).x2EarnAppsContractAddress;
|
|
751
751
|
const functionFragment2 = chunk5GZ7N47F_cjs.X2EarnApps__factory.createInterface().getFunction("baseURI").format("json");
|
|
752
752
|
const res = await thor.account(X2EARNAPPS_CONTRACT).method(JSON.parse(functionFragment2)).call();
|
|
753
753
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
@@ -775,7 +775,7 @@ var useXAppsMetadataBaseUri = () => {
|
|
|
775
775
|
|
|
776
776
|
// src/hooks/api/vebetterdao/xApps/getXAppMetadata.ts
|
|
777
777
|
var getXAppMetadata = async (uri, networkType) => {
|
|
778
|
-
const url =
|
|
778
|
+
const url = chunkDBQR2OKX_cjs.convertUriToUrl(uri, networkType);
|
|
779
779
|
if (!url) return void 0;
|
|
780
780
|
const response = await fetch(url);
|
|
781
781
|
if (!response.ok) {
|
|
@@ -807,7 +807,7 @@ var useXAppMetadata = (xAppId) => {
|
|
|
807
807
|
var allocationVotingInterface = chunk5GZ7N47F_cjs.XAllocationVotingGovernor__factory.createInterface();
|
|
808
808
|
var method6 = "getAppVotes";
|
|
809
809
|
var getXAppVotes = async (thor, networkType, roundId, xAppId) => {
|
|
810
|
-
const ALLOCATION_VOTING_CONTRACT =
|
|
810
|
+
const ALLOCATION_VOTING_CONTRACT = chunkDBQR2OKX_cjs.getConfig(networkType).xAllocationVotingContractAddress;
|
|
811
811
|
const functionFragment2 = allocationVotingInterface.getFunction(method6).format("json");
|
|
812
812
|
const res = await thor.account(ALLOCATION_VOTING_CONTRACT).method(JSON.parse(functionFragment2)).call(roundId, xAppId);
|
|
813
813
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
@@ -818,7 +818,7 @@ var useXAppVotes = (roundId, appId) => {
|
|
|
818
818
|
const { network } = useVeChainKitConfig();
|
|
819
819
|
return useCall({
|
|
820
820
|
contractInterface: allocationVotingInterface,
|
|
821
|
-
contractAddress:
|
|
821
|
+
contractAddress: chunkDBQR2OKX_cjs.getConfig(network.type).xAllocationVotingContractAddress,
|
|
822
822
|
method: method6,
|
|
823
823
|
args: [roundId, appId],
|
|
824
824
|
enabled: !!roundId && !!appId && !!network.type
|
|
@@ -829,7 +829,7 @@ var useXAppVotes = (roundId, appId) => {
|
|
|
829
829
|
// src/hooks/api/vebetterdao/xApps/hooks/useXAppVotesQf.ts
|
|
830
830
|
var allocationVotingInterface2 = chunk5GZ7N47F_cjs.XAllocationVotingGovernor__factory.createInterface();
|
|
831
831
|
var getXAppVotesQf = async (thor, networkType, roundId, xAppId) => {
|
|
832
|
-
const ALLOCATION_VOTING_CONTRACT =
|
|
832
|
+
const ALLOCATION_VOTING_CONTRACT = chunkDBQR2OKX_cjs.getConfig(networkType).xAllocationVotingContractAddress;
|
|
833
833
|
const functionFragment2 = allocationVotingInterface2.getFunction("getAppVotesQF").format("json");
|
|
834
834
|
const res = await thor.account(ALLOCATION_VOTING_CONTRACT).method(JSON.parse(functionFragment2)).call(roundId, xAppId);
|
|
835
835
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
@@ -843,7 +843,7 @@ var useXAppVotesQf = (roundId, appId) => {
|
|
|
843
843
|
const { network } = useVeChainKitConfig();
|
|
844
844
|
return useCall({
|
|
845
845
|
contractInterface: allocationVotingInterface2,
|
|
846
|
-
contractAddress:
|
|
846
|
+
contractAddress: chunkDBQR2OKX_cjs.getConfig(network.type).xAllocationVotingContractAddress,
|
|
847
847
|
method: "getAppVotesQF",
|
|
848
848
|
args: [roundId, appId],
|
|
849
849
|
enabled: !!roundId && !!appId && !!network.type
|
|
@@ -917,7 +917,7 @@ var method7 = "getAppShares";
|
|
|
917
917
|
var functionFragment = allocationPoolInterface.getFunction(method7).format("json");
|
|
918
918
|
var functionAbi = new thorDevkit.abi.Function(JSON.parse(functionFragment));
|
|
919
919
|
var getAppsShareClauses = (networkType, apps, roundId) => {
|
|
920
|
-
const allocationPoolContract =
|
|
920
|
+
const allocationPoolContract = chunkDBQR2OKX_cjs.getConfig(networkType).xAllocationPoolContractAddress;
|
|
921
921
|
const clauses = apps.map((app) => ({
|
|
922
922
|
to: allocationPoolContract,
|
|
923
923
|
value: 0,
|
|
@@ -974,7 +974,7 @@ var useMostVotedAppsInRound = (roundId) => {
|
|
|
974
974
|
};
|
|
975
975
|
var getParticipatedInGovernance = async (networkType, thor, address) => {
|
|
976
976
|
if (!address) return Promise.reject(new Error("Address not provided"));
|
|
977
|
-
const galaxyMemberContract =
|
|
977
|
+
const galaxyMemberContract = chunkDBQR2OKX_cjs.getConfig(networkType).galaxyMemberContractAddress;
|
|
978
978
|
const functionFragment2 = chunk5GZ7N47F_cjs.GalaxyMember__factory.createInterface().getFunction("participatedInGovernance").format("json");
|
|
979
979
|
const res = await thor.account(galaxyMemberContract).method(JSON.parse(functionFragment2)).call(address);
|
|
980
980
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
@@ -997,7 +997,7 @@ var useParticipatedInGovernance = (address) => {
|
|
|
997
997
|
};
|
|
998
998
|
var getBalanceOf = async (thor, network, address) => {
|
|
999
999
|
if (!address) return Promise.reject(new Error("Address not provided"));
|
|
1000
|
-
const contractAddress =
|
|
1000
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(network).galaxyMemberContractAddress;
|
|
1001
1001
|
const functionFragment2 = chunk5GZ7N47F_cjs.GalaxyMember__factory.createInterface().getFunction("balanceOf").format("json");
|
|
1002
1002
|
const res = await thor.account(contractAddress).method(JSON.parse(functionFragment2)).call(address);
|
|
1003
1003
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
@@ -1029,7 +1029,7 @@ var useIsGMclaimable = (address) => {
|
|
|
1029
1029
|
};
|
|
1030
1030
|
var getTokenIdByAccount = async (thor, networkType, address, index) => {
|
|
1031
1031
|
if (!address) return Promise.reject(new Error("Address not provided"));
|
|
1032
|
-
const contractAddress =
|
|
1032
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(networkType).galaxyMemberContractAddress;
|
|
1033
1033
|
const functionFragment2 = chunk5GZ7N47F_cjs.GalaxyMember__factory.createInterface().getFunction("tokenOfOwnerByIndex").format("json");
|
|
1034
1034
|
const res = await thor.account(contractAddress).method(JSON.parse(functionFragment2)).call(address, index);
|
|
1035
1035
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
@@ -1056,7 +1056,7 @@ var contractInterface6 = chunk5GZ7N47F_cjs.GalaxyMember__factory.createInterface
|
|
|
1056
1056
|
var method8 = "getSelectedTokenId";
|
|
1057
1057
|
var useSelectedTokenId = (address, enabled = true) => {
|
|
1058
1058
|
const { network } = useVeChainKitConfig();
|
|
1059
|
-
const contractAddress =
|
|
1059
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(network.type).galaxyMemberContractAddress;
|
|
1060
1060
|
return useCall({
|
|
1061
1061
|
contractInterface: contractInterface6,
|
|
1062
1062
|
contractAddress,
|
|
@@ -1067,7 +1067,7 @@ var useSelectedTokenId = (address, enabled = true) => {
|
|
|
1067
1067
|
};
|
|
1068
1068
|
var getIpfsMetadata = async (networkType, uri, parseJson = false) => {
|
|
1069
1069
|
if (!uri) throw new Error("No URI provided");
|
|
1070
|
-
const newUri =
|
|
1070
|
+
const newUri = chunkDBQR2OKX_cjs.convertUriToUrl(uri, networkType);
|
|
1071
1071
|
if (!newUri) throw new Error("Invalid URI");
|
|
1072
1072
|
const response = await fetch(newUri, {
|
|
1073
1073
|
headers: {
|
|
@@ -1091,7 +1091,7 @@ var useIpfsMetadata = (ipfsUri, parseJson = false) => {
|
|
|
1091
1091
|
var MAX_IMAGE_SIZE = 1024 * 1024 * 10;
|
|
1092
1092
|
var getIpfsImage = async (networkType, uri) => {
|
|
1093
1093
|
if (!uri) throw new Error("IPFS URI is required");
|
|
1094
|
-
const response = await fetch(
|
|
1094
|
+
const response = await fetch(chunkDBQR2OKX_cjs.convertUriToUrl(uri, networkType) ?? "", {
|
|
1095
1095
|
headers: {
|
|
1096
1096
|
"X-Project-Id": "vechain-kit"
|
|
1097
1097
|
}
|
|
@@ -1123,7 +1123,7 @@ var getIpfsImage = async (networkType, uri) => {
|
|
|
1123
1123
|
resolve({
|
|
1124
1124
|
image: reader.result,
|
|
1125
1125
|
mime: blob.type,
|
|
1126
|
-
mediaType:
|
|
1126
|
+
mediaType: chunkDBQR2OKX_cjs.resolveMediaTypeFromMimeType(blob.type)
|
|
1127
1127
|
});
|
|
1128
1128
|
};
|
|
1129
1129
|
reader.onerror = () => {
|
|
@@ -1279,7 +1279,7 @@ var method9 = "levelOf";
|
|
|
1279
1279
|
var getLevelOfTokenQueryKey = (tokenId) => getCallKey({ method: method9, keyArgs: [tokenId] });
|
|
1280
1280
|
var useLevelOfToken = (tokenId, enabled = true) => {
|
|
1281
1281
|
const { network } = useVeChainKitConfig();
|
|
1282
|
-
const contractAddress =
|
|
1282
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(network.type).galaxyMemberContractAddress;
|
|
1283
1283
|
return useCall({
|
|
1284
1284
|
contractInterface: contractInterface7,
|
|
1285
1285
|
contractAddress,
|
|
@@ -1296,7 +1296,7 @@ var getLevelMultiplierQueryKey = (level) => getCallKey({ method: method10, keyAr
|
|
|
1296
1296
|
var percentageToMultiplier = (percentage) => 1 + percentage / 100;
|
|
1297
1297
|
var useLevelMultiplier = (level, enabled = true) => {
|
|
1298
1298
|
const { network } = useVeChainKitConfig();
|
|
1299
|
-
const contractAddress =
|
|
1299
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(network.type).voterRewardsContractAddress;
|
|
1300
1300
|
return useCall({
|
|
1301
1301
|
contractInterface: contractInterface8,
|
|
1302
1302
|
contractAddress,
|
|
@@ -1312,7 +1312,7 @@ var contractInterface9 = chunk5GZ7N47F_cjs.GalaxyMember__factory.createInterface
|
|
|
1312
1312
|
var method11 = "getNodeIdAttached";
|
|
1313
1313
|
var useGetNodeIdAttached = (tokenId) => {
|
|
1314
1314
|
const { network } = useVeChainKitConfig();
|
|
1315
|
-
const contractAddress =
|
|
1315
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(network.type).galaxyMemberContractAddress;
|
|
1316
1316
|
return useCall({
|
|
1317
1317
|
contractInterface: contractInterface9,
|
|
1318
1318
|
contractAddress,
|
|
@@ -1327,7 +1327,7 @@ var contractInterface10 = chunk5GZ7N47F_cjs.GalaxyMember__factory.createInterfac
|
|
|
1327
1327
|
var method12 = "MAX_LEVEL";
|
|
1328
1328
|
var useGMMaxLevel = (enabled = true) => {
|
|
1329
1329
|
const { network } = useVeChainKitConfig();
|
|
1330
|
-
const contractAddress =
|
|
1330
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(network.type).galaxyMemberContractAddress;
|
|
1331
1331
|
return useCall({
|
|
1332
1332
|
contractInterface: contractInterface10,
|
|
1333
1333
|
contractAddress,
|
|
@@ -1411,8 +1411,8 @@ var useSelectedGmNft = (userAddress) => {
|
|
|
1411
1411
|
const { xNodeId } = useXNode(userAddress);
|
|
1412
1412
|
const isXNodeAttachedToGM = attachedNodeId === xNodeId;
|
|
1413
1413
|
const isMaxGmLevelReached = !!maxGmLevel && !!gmLevel && Number(gmLevel) === Number(maxGmLevel);
|
|
1414
|
-
const gmImage = gmNftImage?.image || imageData?.image ||
|
|
1415
|
-
const nftName = nftMetadata?.name ||
|
|
1414
|
+
const gmImage = gmNftImage?.image || imageData?.image || chunkDBQR2OKX_cjs.gmNfts[Number(gmLevel) - 1]?.image || chunkDBQR2OKX_cjs.notFoundImage;
|
|
1415
|
+
const nftName = nftMetadata?.name || chunkDBQR2OKX_cjs.gmNfts[Number(gmLevel) - 1]?.name;
|
|
1416
1416
|
const gmName = `${nftName} #${tokenID}`;
|
|
1417
1417
|
return {
|
|
1418
1418
|
gmId: selectedTokenId,
|
|
@@ -1440,7 +1440,7 @@ var method13 = "getB3TRtoUpgrade";
|
|
|
1440
1440
|
var getB3trToUpgradeQueryKey = (tokenId) => getCallKey({ method: method13, keyArgs: [tokenId] });
|
|
1441
1441
|
var useB3trToUpgrade = (tokenId, enabled = true) => {
|
|
1442
1442
|
const { network } = useVeChainKitConfig();
|
|
1443
|
-
const contractAddress =
|
|
1443
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(network.type).galaxyMemberContractAddress;
|
|
1444
1444
|
return useCall({
|
|
1445
1445
|
contractInterface: contractInterface11,
|
|
1446
1446
|
contractAddress,
|
|
@@ -1455,7 +1455,7 @@ var method14 = "getTokensInfoByOwner";
|
|
|
1455
1455
|
var getTokensInfoByOwnerQueryKey = (owner) => getCallKey({ method: method14, keyArgs: [owner] });
|
|
1456
1456
|
var useGetTokensInfoByOwner = (owner, size = 10) => {
|
|
1457
1457
|
const { network } = useVeChainKitConfig();
|
|
1458
|
-
const contractAddress =
|
|
1458
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(network.type).galaxyMemberContractAddress;
|
|
1459
1459
|
const { thor } = dappKitReact.useConnex();
|
|
1460
1460
|
const fetchTokens = async ({ pageParam = 0 }) => {
|
|
1461
1461
|
const functionFragment2 = contractInterface12.getFunction(method14)?.format("json");
|
|
@@ -1487,7 +1487,7 @@ var method15 = "getB3TRdonated";
|
|
|
1487
1487
|
var getB3trDonatedQueryKey = (tokenId) => getCallKey({ method: method15, keyArgs: [tokenId] });
|
|
1488
1488
|
var useB3trDonated = (tokenId, enabled = true) => {
|
|
1489
1489
|
const { network } = useVeChainKitConfig();
|
|
1490
|
-
const contractAddress =
|
|
1490
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(network.type).galaxyMemberContractAddress;
|
|
1491
1491
|
return useCall({
|
|
1492
1492
|
contractInterface: contractInterface13,
|
|
1493
1493
|
contractAddress,
|
|
@@ -1504,7 +1504,7 @@ var method16 = "baseURI";
|
|
|
1504
1504
|
var getGMBaseUriQueryKey = () => getCallKey({ method: "getGMBaseUri", keyArgs: [] });
|
|
1505
1505
|
var useGMBaseUri = () => {
|
|
1506
1506
|
const { network } = useVeChainKitConfig();
|
|
1507
|
-
const contractAddress =
|
|
1507
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(network.type).galaxyMemberContractAddress;
|
|
1508
1508
|
return useCall({
|
|
1509
1509
|
contractInterface: contractInterface14,
|
|
1510
1510
|
contractAddress,
|
|
@@ -1536,7 +1536,7 @@ var getGMLevel = (startingLevel, b3trDonated) => {
|
|
|
1536
1536
|
if (!Number.isInteger(startingLevel) || startingLevel <= 0) {
|
|
1537
1537
|
throw new Error("Starting level must be a positive integer");
|
|
1538
1538
|
}
|
|
1539
|
-
const gmLevelMap = new Map(
|
|
1539
|
+
const gmLevelMap = new Map(chunkDBQR2OKX_cjs.gmNfts.map((gm) => [Number(gm.level), gm]));
|
|
1540
1540
|
const startingGM = gmLevelMap.get(startingLevel);
|
|
1541
1541
|
if (!startingGM) return null;
|
|
1542
1542
|
let finalLevel = startingLevel;
|
|
@@ -1557,7 +1557,7 @@ var xAllocationVotingInterface = chunk5GZ7N47F_cjs.XAllocationVoting__factory.cr
|
|
|
1557
1557
|
var getCurrentAllocationsRoundId = async (thor, networkType) => {
|
|
1558
1558
|
const currentRoundAbi = xAllocationVotingInterface.getFunction("currentRoundId");
|
|
1559
1559
|
if (!currentRoundAbi) throw new Error("currentRoundId function not found");
|
|
1560
|
-
const res = await thor.account(
|
|
1560
|
+
const res = await thor.account(chunkDBQR2OKX_cjs.getConfig(networkType).xAllocationVotingContractAddress).method(currentRoundAbi).call();
|
|
1561
1561
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
1562
1562
|
return res.decoded[0];
|
|
1563
1563
|
};
|
|
@@ -1575,7 +1575,7 @@ var useCurrentAllocationsRoundId = () => {
|
|
|
1575
1575
|
});
|
|
1576
1576
|
};
|
|
1577
1577
|
var getAllocationAmount = async (thor, networkType, roundId) => {
|
|
1578
|
-
const emissionsContract =
|
|
1578
|
+
const emissionsContract = chunkDBQR2OKX_cjs.getConfig(networkType).emissionsContractAddress;
|
|
1579
1579
|
const emissionsInterface = chunk5GZ7N47F_cjs.Emissions__factory.createInterface();
|
|
1580
1580
|
const functionFragmentTreasuryAmount = emissionsInterface.getFunction("getTreasuryAmount").format("json");
|
|
1581
1581
|
const functionFragmentVoteX2EarnAmount = emissionsInterface.getFunction("getVote2EarnAmount").format("json");
|
|
@@ -1613,7 +1613,7 @@ var useAllocationAmount = (roundId) => {
|
|
|
1613
1613
|
});
|
|
1614
1614
|
};
|
|
1615
1615
|
var getHasVotedInRound = async (thor, networkType, roundId, address) => {
|
|
1616
|
-
const xAllocationVotingContract =
|
|
1616
|
+
const xAllocationVotingContract = chunkDBQR2OKX_cjs.getConfig(networkType).xAllocationVotingContractAddress;
|
|
1617
1617
|
const functionFragment2 = chunk5GZ7N47F_cjs.XAllocationVoting__factory.createInterface().getFunction("hasVoted").format("json");
|
|
1618
1618
|
const res = await thor.account(xAllocationVotingContract).method(JSON.parse(functionFragment2)).call(roundId, address);
|
|
1619
1619
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
@@ -1637,7 +1637,7 @@ var RoundState = {
|
|
|
1637
1637
|
};
|
|
1638
1638
|
var getAllocationsRoundState = async (thor, networkType, roundId) => {
|
|
1639
1639
|
if (!roundId) return Promise.reject(new Error("roundId is required"));
|
|
1640
|
-
const xAllocationVotingContract =
|
|
1640
|
+
const xAllocationVotingContract = chunkDBQR2OKX_cjs.getConfig(networkType).xAllocationVotingContractAddress;
|
|
1641
1641
|
const functionFragment2 = xAllocationVotingInterface2.getFunction("state").format("json");
|
|
1642
1642
|
const res = await thor.account(xAllocationVotingContract).method(JSON.parse(functionFragment2)).call(roundId);
|
|
1643
1643
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
@@ -1658,7 +1658,7 @@ var useAllocationsRoundState = (roundId) => {
|
|
|
1658
1658
|
});
|
|
1659
1659
|
};
|
|
1660
1660
|
var getAllocationsRoundsEvents = async (thor, networkType) => {
|
|
1661
|
-
const xAllocationVotingContract =
|
|
1661
|
+
const xAllocationVotingContract = chunkDBQR2OKX_cjs.getConfig(networkType).xAllocationVotingContractAddress;
|
|
1662
1662
|
const allocationCreatedAbi = chunk5GZ7N47F_cjs.XAllocationVoting__factory.createInterface().getEvent("RoundCreated");
|
|
1663
1663
|
if (!allocationCreatedAbi) throw new Error("RoundCreated event not found");
|
|
1664
1664
|
const allocationCreatedEvent = new thorDevkit.abi.Event(
|
|
@@ -1673,7 +1673,7 @@ var getAllocationsRoundsEvents = async (thor, networkType) => {
|
|
|
1673
1673
|
const events = await getAllEvents({
|
|
1674
1674
|
thor,
|
|
1675
1675
|
filterCriteria,
|
|
1676
|
-
nodeUrl:
|
|
1676
|
+
nodeUrl: chunkDBQR2OKX_cjs.getConfig(networkType).nodeUrl
|
|
1677
1677
|
});
|
|
1678
1678
|
const decodedCreatedAllocationEvents = [];
|
|
1679
1679
|
events.forEach((event) => {
|
|
@@ -1743,7 +1743,7 @@ var useAllocationsRound = (roundId) => {
|
|
|
1743
1743
|
const isLoading = currentAllocationId.isLoading || allocationRoundsEvents.isLoading || currentAllocationState.isLoading;
|
|
1744
1744
|
const isError = currentAllocationId.isError || allocationRoundsEvents.isError || currentAllocationState.isError;
|
|
1745
1745
|
const error = currentAllocationId.error || allocationRoundsEvents.error || currentAllocationState.error;
|
|
1746
|
-
const blockTime =
|
|
1746
|
+
const blockTime = chunkDBQR2OKX_cjs.getConfig(network.type).network.blockTime;
|
|
1747
1747
|
const estimatedEndTime = React10.useMemo(() => {
|
|
1748
1748
|
if (!currentAllocationRound) return null;
|
|
1749
1749
|
const endBlock = Number(currentAllocationRound.voteEnd);
|
|
@@ -1822,7 +1822,7 @@ var EnsureQueryClient = ({ children }) => {
|
|
|
1822
1822
|
var roundEarningsFragment = chunk5GZ7N47F_cjs.XAllocationPool__factory.createInterface().getFunction("roundEarnings").format("json");
|
|
1823
1823
|
var roundEarningsAbi = new thorDevkit.abi.Function(JSON.parse(roundEarningsFragment));
|
|
1824
1824
|
var getXAppRoundEarnings = async (thor, roundId, xAppId, networkType) => {
|
|
1825
|
-
const xAllocationPoolContract =
|
|
1825
|
+
const xAllocationPoolContract = chunkDBQR2OKX_cjs.getConfig(networkType).xAllocationPoolContractAddress;
|
|
1826
1826
|
const functionFragment2 = chunk5GZ7N47F_cjs.XAllocationPool__factory.createInterface().getFunction("roundEarnings").format("json");
|
|
1827
1827
|
const res = await thor.account(xAllocationPoolContract).method(JSON.parse(functionFragment2)).call(roundId, xAppId);
|
|
1828
1828
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
@@ -1870,7 +1870,7 @@ var useMultipleXAppRoundEarnings = (roundId, xAppIds) => {
|
|
|
1870
1870
|
queryFn: () => getRoundXApps(thor, network.type, roundId),
|
|
1871
1871
|
queryKey: getRoundXAppsQueryKey(roundId)
|
|
1872
1872
|
});
|
|
1873
|
-
const xAllocationPoolContract =
|
|
1873
|
+
const xAllocationPoolContract = chunkDBQR2OKX_cjs.getConfig(
|
|
1874
1874
|
network.type
|
|
1875
1875
|
).xAllocationPoolContractAddress;
|
|
1876
1876
|
const xAppsInRound = data.filter((app) => xAppIds.includes(app.id));
|
|
@@ -1906,7 +1906,7 @@ var roundEarningsFragment2 = chunk5GZ7N47F_cjs.XAllocationPool__factory.createIn
|
|
|
1906
1906
|
var roundEarningsAbi2 = new thorDevkit.abi.Function(JSON.parse(roundEarningsFragment2));
|
|
1907
1907
|
var getXAppTotalEarningsClauses = (roundIds, app, networkType) => {
|
|
1908
1908
|
const clauses = roundIds.map((roundId) => ({
|
|
1909
|
-
to:
|
|
1909
|
+
to: chunkDBQR2OKX_cjs.getConfig(networkType).xAllocationPoolContractAddress,
|
|
1910
1910
|
value: 0,
|
|
1911
1911
|
data: roundEarningsAbi2.encode(roundId, app)
|
|
1912
1912
|
}));
|
|
@@ -1977,7 +1977,7 @@ var getAppBalance = async (thor, xAppId, x2EarnRewardsPoolContract) => {
|
|
|
1977
1977
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
1978
1978
|
const original = res.decoded[0];
|
|
1979
1979
|
const scaled = viem.formatEther(original);
|
|
1980
|
-
const formatted = scaled === "0" ? "0" :
|
|
1980
|
+
const formatted = scaled === "0" ? "0" : chunkDBQR2OKX_cjs.humanNumber(scaled);
|
|
1981
1981
|
return {
|
|
1982
1982
|
original,
|
|
1983
1983
|
scaled,
|
|
@@ -1993,7 +1993,7 @@ var getAppBalanceQueryKey = (xAppId) => [
|
|
|
1993
1993
|
var useAppBalance = (xAppId) => {
|
|
1994
1994
|
const { thor } = dappKitReact.useConnex();
|
|
1995
1995
|
const { network } = useVeChainKitConfig();
|
|
1996
|
-
const x2EarnRewardsPoolContract =
|
|
1996
|
+
const x2EarnRewardsPoolContract = chunkDBQR2OKX_cjs.getConfig(
|
|
1997
1997
|
network.type
|
|
1998
1998
|
).x2EarnRewardsPoolContractAddress;
|
|
1999
1999
|
return reactQuery.useQuery({
|
|
@@ -2010,7 +2010,7 @@ var getIsPersonQueryKey = (user) => {
|
|
|
2010
2010
|
};
|
|
2011
2011
|
var useIsPerson = (user) => {
|
|
2012
2012
|
const { network } = useVeChainKitConfig();
|
|
2013
|
-
const veBetterPassportContractAddress =
|
|
2013
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2014
2014
|
network.type
|
|
2015
2015
|
).veBetterPassportContractAddress;
|
|
2016
2016
|
return useCall({
|
|
@@ -2032,7 +2032,7 @@ var getUserRoundScoreQueryKey = (user, round) => {
|
|
|
2032
2032
|
};
|
|
2033
2033
|
var useUserRoundScore = (address, round) => {
|
|
2034
2034
|
const { network } = useVeChainKitConfig();
|
|
2035
|
-
const veBetterPassportContractAddress =
|
|
2035
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2036
2036
|
network.type
|
|
2037
2037
|
).veBetterPassportContractAddress;
|
|
2038
2038
|
return useCall({
|
|
@@ -2052,7 +2052,7 @@ var getThresholdParticipationScoreQueryKey = () => {
|
|
|
2052
2052
|
};
|
|
2053
2053
|
var useThresholdParticipationScore = () => {
|
|
2054
2054
|
const { network } = useVeChainKitConfig();
|
|
2055
|
-
const veBetterPassportContractAddress =
|
|
2055
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2056
2056
|
network.type
|
|
2057
2057
|
).veBetterPassportContractAddress;
|
|
2058
2058
|
return useCall({
|
|
@@ -2072,7 +2072,7 @@ var getPassportToggleQueryKey = (checkName) => {
|
|
|
2072
2072
|
};
|
|
2073
2073
|
var useIsPassportCheckEnabled = (checkName) => {
|
|
2074
2074
|
const { network } = useVeChainKitConfig();
|
|
2075
|
-
const veBetterPassportContractAddress =
|
|
2075
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2076
2076
|
network.type
|
|
2077
2077
|
).veBetterPassportContractAddress;
|
|
2078
2078
|
return useCall({
|
|
@@ -2092,7 +2092,7 @@ var getParticipationScoreThresholdQueryKey = () => {
|
|
|
2092
2092
|
};
|
|
2093
2093
|
var useParticipationScoreThreshold = () => {
|
|
2094
2094
|
const { network } = useVeChainKitConfig();
|
|
2095
|
-
const veBetterPassportContractAddress =
|
|
2095
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2096
2096
|
network.type
|
|
2097
2097
|
).veBetterPassportContractAddress;
|
|
2098
2098
|
return useCall({
|
|
@@ -2113,7 +2113,7 @@ var getAppSecurityLevelQueryKey = (appId) => {
|
|
|
2113
2113
|
};
|
|
2114
2114
|
var useAppSecurityLevel = (appId) => {
|
|
2115
2115
|
const { network } = useVeChainKitConfig();
|
|
2116
|
-
const contractAddress =
|
|
2116
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2117
2117
|
network.type
|
|
2118
2118
|
).veBetterPassportContractAddress;
|
|
2119
2119
|
return useCall({
|
|
@@ -2157,7 +2157,7 @@ var getIsBlacklistedQueryKey = (address) => {
|
|
|
2157
2157
|
};
|
|
2158
2158
|
var useIsBlacklisted = (address) => {
|
|
2159
2159
|
const { network } = useVeChainKitConfig();
|
|
2160
|
-
const veBetterPassportContractAddress =
|
|
2160
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2161
2161
|
network.type
|
|
2162
2162
|
).veBetterPassportContractAddress;
|
|
2163
2163
|
return useCall({
|
|
@@ -2177,7 +2177,7 @@ var getIsWhitelistedQueryKey = (address) => {
|
|
|
2177
2177
|
};
|
|
2178
2178
|
var useIsWhitelisted = (address) => {
|
|
2179
2179
|
const { network } = useVeChainKitConfig();
|
|
2180
|
-
const veBetterPassportContractAddress =
|
|
2180
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2181
2181
|
network.type
|
|
2182
2182
|
).veBetterPassportContractAddress;
|
|
2183
2183
|
return useCall({
|
|
@@ -2214,7 +2214,7 @@ var getUserBotSignalsQueryKey = (address) => {
|
|
|
2214
2214
|
};
|
|
2215
2215
|
var useUserBotSignals = (address) => {
|
|
2216
2216
|
const { network } = useVeChainKitConfig();
|
|
2217
|
-
const veBetterPassportContractAddress =
|
|
2217
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2218
2218
|
network.type
|
|
2219
2219
|
).veBetterPassportContractAddress;
|
|
2220
2220
|
return useCall({
|
|
@@ -2236,7 +2236,7 @@ var getGetCumulativeScoreWithDecayQueryKey = (user, round) => {
|
|
|
2236
2236
|
};
|
|
2237
2237
|
var useGetCumulativeScoreWithDecay = (user, round) => {
|
|
2238
2238
|
const { network } = useVeChainKitConfig();
|
|
2239
|
-
const veBetterPassportContractAddress =
|
|
2239
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2240
2240
|
network.type
|
|
2241
2241
|
).veBetterPassportContractAddress;
|
|
2242
2242
|
return useCall({
|
|
@@ -2263,7 +2263,7 @@ var getSecurityMultiplierQueryKey = (securityLevel) => {
|
|
|
2263
2263
|
};
|
|
2264
2264
|
var useSecurityMultiplier = (securityLevel) => {
|
|
2265
2265
|
const { network } = useVeChainKitConfig();
|
|
2266
|
-
const veBetterPassportContractAddress =
|
|
2266
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2267
2267
|
network.type
|
|
2268
2268
|
).veBetterPassportContractAddress;
|
|
2269
2269
|
return useCall({
|
|
@@ -2280,7 +2280,7 @@ var getDelegateeQueryKey = (delegator) => {
|
|
|
2280
2280
|
};
|
|
2281
2281
|
var useGetDelegatee = (delegator) => {
|
|
2282
2282
|
const { network } = useVeChainKitConfig();
|
|
2283
|
-
const veBetterPassportContractAddress =
|
|
2283
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2284
2284
|
network.type
|
|
2285
2285
|
).veBetterPassportContractAddress;
|
|
2286
2286
|
return useCall({
|
|
@@ -2302,7 +2302,7 @@ var getDelegatorQueryKey = (delegator) => {
|
|
|
2302
2302
|
};
|
|
2303
2303
|
var useGetDelegator = (delegator) => {
|
|
2304
2304
|
const { network } = useVeChainKitConfig();
|
|
2305
|
-
const veBetterPassportContractAddress =
|
|
2305
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2306
2306
|
network.type
|
|
2307
2307
|
).veBetterPassportContractAddress;
|
|
2308
2308
|
return useCall({
|
|
@@ -2312,7 +2312,7 @@ var useGetDelegator = (delegator) => {
|
|
|
2312
2312
|
args: [delegator],
|
|
2313
2313
|
mapResponse: (response) => {
|
|
2314
2314
|
const delegator2 = response.decoded[0];
|
|
2315
|
-
if (
|
|
2315
|
+
if (chunkDBQR2OKX_cjs.compareAddresses(delegator2, viem.zeroAddress)) return null;
|
|
2316
2316
|
return delegator2;
|
|
2317
2317
|
},
|
|
2318
2318
|
enabled: !!delegator
|
|
@@ -2327,7 +2327,7 @@ var getPendingDelegationsQueryKeyDelegateePOV = (delegatee) => {
|
|
|
2327
2327
|
};
|
|
2328
2328
|
var useGetPendingDelegationsDelegateePOV = (delegatee) => {
|
|
2329
2329
|
const { network } = useVeChainKitConfig();
|
|
2330
|
-
const veBetterPassportContractAddress =
|
|
2330
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2331
2331
|
network.type
|
|
2332
2332
|
).veBetterPassportContractAddress;
|
|
2333
2333
|
return useCall({
|
|
@@ -2349,7 +2349,7 @@ var getPendingDelegationsQueryKeyDelegatorPOV = (delegator) => {
|
|
|
2349
2349
|
};
|
|
2350
2350
|
var useGetPendingDelegationsDelegatorPOV = (delegator) => {
|
|
2351
2351
|
const { network } = useVeChainKitConfig();
|
|
2352
|
-
const veBetterPassportContractAddress =
|
|
2352
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2353
2353
|
network.type
|
|
2354
2354
|
).veBetterPassportContractAddress;
|
|
2355
2355
|
return useCall({
|
|
@@ -2371,7 +2371,7 @@ var getPendingLinkingsQueryKey = (user) => {
|
|
|
2371
2371
|
};
|
|
2372
2372
|
var useGetPendingLinkings = (user) => {
|
|
2373
2373
|
const { network } = useVeChainKitConfig();
|
|
2374
|
-
const veBetterPassportContractAddress =
|
|
2374
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2375
2375
|
network.type
|
|
2376
2376
|
).veBetterPassportContractAddress;
|
|
2377
2377
|
return useCall({
|
|
@@ -2398,7 +2398,7 @@ var getEntitiesLinkedToPassportQueryKey = (passport) => {
|
|
|
2398
2398
|
};
|
|
2399
2399
|
var useGetEntitiesLinkedToPassport = (passport) => {
|
|
2400
2400
|
const { network } = useVeChainKitConfig();
|
|
2401
|
-
const veBetterPassportContractAddress =
|
|
2401
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2402
2402
|
network.type
|
|
2403
2403
|
).veBetterPassportContractAddress;
|
|
2404
2404
|
return useCall({
|
|
@@ -2421,7 +2421,7 @@ var getPassportForEntityQueryKey = (entity) => {
|
|
|
2421
2421
|
};
|
|
2422
2422
|
var useGetPassportForEntity = (entity) => {
|
|
2423
2423
|
const { network } = useVeChainKitConfig();
|
|
2424
|
-
const veBetterPassportContractAddress =
|
|
2424
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2425
2425
|
network.type
|
|
2426
2426
|
).veBetterPassportContractAddress;
|
|
2427
2427
|
return useCall({
|
|
@@ -2445,7 +2445,7 @@ var getIsEntityQueryKey = (address) => {
|
|
|
2445
2445
|
};
|
|
2446
2446
|
var useIsEntity = (address) => {
|
|
2447
2447
|
const { network } = useVeChainKitConfig();
|
|
2448
|
-
const veBetterPassportContractAddress =
|
|
2448
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2449
2449
|
network.type
|
|
2450
2450
|
).veBetterPassportContractAddress;
|
|
2451
2451
|
return useCall({
|
|
@@ -2498,7 +2498,7 @@ var getIsPassportQueryKey = (address) => {
|
|
|
2498
2498
|
};
|
|
2499
2499
|
var useIsPassport = (address) => {
|
|
2500
2500
|
const { network } = useVeChainKitConfig();
|
|
2501
|
-
const veBetterPassportContractAddress =
|
|
2501
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2502
2502
|
network.type
|
|
2503
2503
|
).veBetterPassportContractAddress;
|
|
2504
2504
|
return useCall({
|
|
@@ -2534,7 +2534,7 @@ var getThresholdParticipationScoreAtTimepointQueryKey = (blockNumber) => {
|
|
|
2534
2534
|
};
|
|
2535
2535
|
var useThresholdParticipationScoreAtTimepoint = (blockNumber) => {
|
|
2536
2536
|
const { network } = useVeChainKitConfig();
|
|
2537
|
-
const veBetterPassportContractAddress =
|
|
2537
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2538
2538
|
network.type
|
|
2539
2539
|
).veBetterPassportContractAddress;
|
|
2540
2540
|
return useCall({
|
|
@@ -2556,7 +2556,7 @@ var getIsPersonAtTimepointQueryKey = (user, blockNumber) => {
|
|
|
2556
2556
|
};
|
|
2557
2557
|
var useIsPersonAtTimepoint = (user, blockNumber) => {
|
|
2558
2558
|
const { network } = useVeChainKitConfig();
|
|
2559
|
-
const veBetterPassportContractAddress =
|
|
2559
|
+
const veBetterPassportContractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2560
2560
|
network.type
|
|
2561
2561
|
).veBetterPassportContractAddress;
|
|
2562
2562
|
return useCall({
|
|
@@ -2569,7 +2569,7 @@ var useIsPersonAtTimepoint = (user, blockNumber) => {
|
|
|
2569
2569
|
};
|
|
2570
2570
|
var getRoundReward = async (thor, networkType, address, roundId) => {
|
|
2571
2571
|
const functionFragment2 = chunk5GZ7N47F_cjs.VoterRewards__factory.createInterface().getFunction("getReward").format("json");
|
|
2572
|
-
const contractAddress =
|
|
2572
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(networkType).voterRewardsContractAddress;
|
|
2573
2573
|
const res = await thor.account(contractAddress).method(JSON.parse(functionFragment2)).call(roundId, address);
|
|
2574
2574
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
2575
2575
|
const reward = viem.formatEther(res.decoded[0]);
|
|
@@ -2601,7 +2601,7 @@ var useVotingRewards = (currentRoundId, voter) => {
|
|
|
2601
2601
|
const { thor } = dappKitReact.useConnex();
|
|
2602
2602
|
const queryClient = reactQuery.useQueryClient();
|
|
2603
2603
|
const { network } = useVeChainKitConfig();
|
|
2604
|
-
const contractAddress =
|
|
2604
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(network.type).voterRewardsContractAddress;
|
|
2605
2605
|
const rounds = React10.useMemo(() => {
|
|
2606
2606
|
return Array.from(
|
|
2607
2607
|
{ length: parseInt(currentRoundId ?? "0") - 1 },
|
|
@@ -2656,7 +2656,7 @@ var useVotingRewards = (currentRoundId, voter) => {
|
|
|
2656
2656
|
var voterRewardsInterface2 = chunk5GZ7N47F_cjs.VoterRewards__factory.createInterface();
|
|
2657
2657
|
var buildClaimRoundReward = (roundId, address, networkType) => {
|
|
2658
2658
|
const clause = {
|
|
2659
|
-
to:
|
|
2659
|
+
to: chunkDBQR2OKX_cjs.getConfig(networkType).voterRewardsContractAddress,
|
|
2660
2660
|
value: 0,
|
|
2661
2661
|
data: voterRewardsInterface2.encodeFunctionData("claimReward", [
|
|
2662
2662
|
roundId,
|
|
@@ -2691,7 +2691,7 @@ var method33 = "getNodeManager";
|
|
|
2691
2691
|
var getNodeManagerQueryKey = (nodeId) => getCallKey({ method: method33, keyArgs: [nodeId] });
|
|
2692
2692
|
var useGetNodeManager = (nodeId) => {
|
|
2693
2693
|
const { network } = useVeChainKitConfig();
|
|
2694
|
-
const contractAddress =
|
|
2694
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
2695
2695
|
network.type
|
|
2696
2696
|
).nodeManagementContractAddress;
|
|
2697
2697
|
return useCall({
|
|
@@ -2705,11 +2705,11 @@ var useGetNodeManager = (nodeId) => {
|
|
|
2705
2705
|
var ERC20Interface = chunk5GZ7N47F_cjs.IERC20__factory.createInterface();
|
|
2706
2706
|
var getVeDelegateBalance = async (thor, network, address) => {
|
|
2707
2707
|
const functionFragment2 = ERC20Interface.getFunction("balanceOf").format("json");
|
|
2708
|
-
const res = await thor.account(
|
|
2708
|
+
const res = await thor.account(chunkDBQR2OKX_cjs.getConfig(network).veDelegateTokenContractAddress).method(JSON.parse(functionFragment2)).call(address);
|
|
2709
2709
|
if (res.reverted) throw new Error("Reverted");
|
|
2710
2710
|
const original = res.decoded[0];
|
|
2711
2711
|
const scaled = ethers.formatEther(original);
|
|
2712
|
-
const formatted = scaled === "0" ? "0" :
|
|
2712
|
+
const formatted = scaled === "0" ? "0" : chunkDBQR2OKX_cjs.humanNumber(scaled);
|
|
2713
2713
|
return {
|
|
2714
2714
|
original,
|
|
2715
2715
|
scaled,
|
|
@@ -2755,7 +2755,7 @@ var useFetchAppInfo = (appIds) => {
|
|
|
2755
2755
|
return Object.fromEntries(
|
|
2756
2756
|
results.map((result, index) => {
|
|
2757
2757
|
const id = normalizedIds[index];
|
|
2758
|
-
const defaultApp =
|
|
2758
|
+
const defaultApp = chunkDBQR2OKX_cjs.DEFAULT_PRIVY_ECOSYSTEM_APPS.find(
|
|
2759
2759
|
(app) => app.id === id
|
|
2760
2760
|
);
|
|
2761
2761
|
return [
|
|
@@ -2819,7 +2819,7 @@ var fetchVechainDomain = async (thor, networkType, addressOrDomain) => {
|
|
|
2819
2819
|
const isValidAddress2 = ethers.isAddress(addressOrDomain);
|
|
2820
2820
|
if (isValidAddress2) {
|
|
2821
2821
|
try {
|
|
2822
|
-
const res = await thor.account(
|
|
2822
|
+
const res = await thor.account(chunkDBQR2OKX_cjs.getConfig(networkType).vnsResolverAddress).method(getNamesABI).call([addressOrDomain]);
|
|
2823
2823
|
const domainName = res.decoded.names?.[0];
|
|
2824
2824
|
return {
|
|
2825
2825
|
address: addressOrDomain,
|
|
@@ -2836,7 +2836,7 @@ var fetchVechainDomain = async (thor, networkType, addressOrDomain) => {
|
|
|
2836
2836
|
}
|
|
2837
2837
|
}
|
|
2838
2838
|
try {
|
|
2839
|
-
const res = await thor.account(
|
|
2839
|
+
const res = await thor.account(chunkDBQR2OKX_cjs.getConfig(networkType).vnsResolverAddress).method(getAddressesABI).call([addressOrDomain]);
|
|
2840
2840
|
const domainAddress = res.decoded.addresses?.[0];
|
|
2841
2841
|
if (domainAddress === "0x0000000000000000000000000000000000000000") {
|
|
2842
2842
|
return {
|
|
@@ -2882,7 +2882,7 @@ var getEnsRecordExists = async (thor, network, name) => {
|
|
|
2882
2882
|
const labelHash = viem.keccak256(viem.toBytes(name));
|
|
2883
2883
|
const subnode = viem.keccak256(viem.concat([hashedNode, labelHash]));
|
|
2884
2884
|
const functionFragment2 = MockENSInterface.getFunction("recordExists").format("json");
|
|
2885
|
-
const res = await thor.account(
|
|
2885
|
+
const res = await thor.account(chunkDBQR2OKX_cjs.getConfig(network).vetDomainsContractAddress).method(JSON.parse(functionFragment2)).call(subnode);
|
|
2886
2886
|
if (res.reverted) throw new Error("Reverted");
|
|
2887
2887
|
return res.decoded[0];
|
|
2888
2888
|
};
|
|
@@ -2915,10 +2915,10 @@ var useClaimVeWorldSubdomain = ({
|
|
|
2915
2915
|
if (!subdomain) throw new Error("Invalid subdomain");
|
|
2916
2916
|
const clausesArray = [];
|
|
2917
2917
|
clausesArray.push({
|
|
2918
|
-
to:
|
|
2918
|
+
to: chunkDBQR2OKX_cjs.getConfig(network.type).vetDomainsReverseRegistrarAddress,
|
|
2919
2919
|
value: "0x0",
|
|
2920
2920
|
data: ReverseRegistrarInterface.encodeFunctionData("setName", [""]),
|
|
2921
|
-
comment: `Unsetting your current VeChain nickname of the account ${
|
|
2921
|
+
comment: `Unsetting your current VeChain nickname of the account ${chunkDBQR2OKX_cjs.humanAddress(
|
|
2922
2922
|
account?.address ?? "",
|
|
2923
2923
|
4,
|
|
2924
2924
|
4
|
|
@@ -2927,23 +2927,23 @@ var useClaimVeWorldSubdomain = ({
|
|
|
2927
2927
|
});
|
|
2928
2928
|
if (!alreadyOwned) {
|
|
2929
2929
|
clausesArray.push({
|
|
2930
|
-
to:
|
|
2930
|
+
to: chunkDBQR2OKX_cjs.getConfig(network.type).veWorldSubdomainClaimerContractAddress,
|
|
2931
2931
|
value: "0x0",
|
|
2932
2932
|
data: SubdomainClaimerInterface.encodeFunctionData("claim", [
|
|
2933
2933
|
subdomain,
|
|
2934
|
-
|
|
2934
|
+
chunkDBQR2OKX_cjs.getConfig(network.type).vetDomainsPublicResolverAddress
|
|
2935
2935
|
]),
|
|
2936
2936
|
comment: `Claim VeChain subdomain: ${subdomain}.${domain}`,
|
|
2937
2937
|
abi: SubdomainClaimerInterface.getFunction("claim")
|
|
2938
2938
|
});
|
|
2939
2939
|
}
|
|
2940
2940
|
clausesArray.push({
|
|
2941
|
-
to:
|
|
2941
|
+
to: chunkDBQR2OKX_cjs.getConfig(network.type).vetDomainsReverseRegistrarAddress,
|
|
2942
2942
|
value: "0x0",
|
|
2943
2943
|
data: ReverseRegistrarInterface.encodeFunctionData("setName", [
|
|
2944
2944
|
subdomain + "." + domain
|
|
2945
2945
|
]),
|
|
2946
|
-
comment: `Set ${subdomain}.${domain} as the VeChain nickname of the account ${
|
|
2946
|
+
comment: `Set ${subdomain}.${domain} as the VeChain nickname of the account ${chunkDBQR2OKX_cjs.humanAddress(
|
|
2947
2947
|
account?.address ?? "",
|
|
2948
2948
|
4,
|
|
2949
2949
|
4
|
|
@@ -3026,7 +3026,7 @@ var method34 = "isDomainProtected";
|
|
|
3026
3026
|
var getIsDomainProtectedQueryKey = (domain) => getCallKey({ method: method34, keyArgs: [domain] });
|
|
3027
3027
|
var useIsDomainProtected = (domain, enabled = true) => {
|
|
3028
3028
|
const { network } = useVeChainKitConfig();
|
|
3029
|
-
const contractAddress =
|
|
3029
|
+
const contractAddress = chunkDBQR2OKX_cjs.getConfig(
|
|
3030
3030
|
network.type
|
|
3031
3031
|
).veWorldSubdomainClaimerContractAddress;
|
|
3032
3032
|
return useCall({
|
|
@@ -3046,7 +3046,7 @@ var DomainsResponseSchema = zod.z.object({
|
|
|
3046
3046
|
});
|
|
3047
3047
|
var getDomainsOfAddress = async (networkType, address, parentDomain = "vet") => {
|
|
3048
3048
|
if (!address) throw new Error("Address is required");
|
|
3049
|
-
const graphQlIndexerUrl =
|
|
3049
|
+
const graphQlIndexerUrl = chunkDBQR2OKX_cjs.getConfig(networkType).graphQlIndexerUrl;
|
|
3050
3050
|
const query = `query Registrations {
|
|
3051
3051
|
domains(
|
|
3052
3052
|
where: {owner: "${address.toLowerCase()}", parent_: {name: "${parentDomain}"}}
|
|
@@ -3101,7 +3101,7 @@ var getAvatar = async (networkType, nodeUrl, name) => {
|
|
|
3101
3101
|
body: JSON.stringify({
|
|
3102
3102
|
clauses: [
|
|
3103
3103
|
{
|
|
3104
|
-
to:
|
|
3104
|
+
to: chunkDBQR2OKX_cjs.getConfig(networkType).vetDomainsContractAddress,
|
|
3105
3105
|
data: nameInterface.encodeFunctionData("resolver", [
|
|
3106
3106
|
node
|
|
3107
3107
|
])
|
|
@@ -3162,7 +3162,7 @@ var getAvatarQueryKey = (name) => [
|
|
|
3162
3162
|
async function parseAvatarRecord(record, networkType, nodeUrl) {
|
|
3163
3163
|
try {
|
|
3164
3164
|
if (record.startsWith("http") || record.startsWith("ipfs://") || record.startsWith("ar://")) {
|
|
3165
|
-
return
|
|
3165
|
+
return chunkDBQR2OKX_cjs.convertUriToUrl(record, networkType) || null;
|
|
3166
3166
|
}
|
|
3167
3167
|
const match = record.match(
|
|
3168
3168
|
/eip155:(\d+)\/(?:erc721|erc1155):([^/]+)\/(\d+)/
|
|
@@ -3203,7 +3203,7 @@ async function parseAvatarRecord(record, networkType, nodeUrl) {
|
|
|
3203
3203
|
console.error("Failed to decode avatar data:", e);
|
|
3204
3204
|
tokenUri = ethers.toUtf8String(data);
|
|
3205
3205
|
}
|
|
3206
|
-
tokenUri =
|
|
3206
|
+
tokenUri = chunkDBQR2OKX_cjs.convertUriToUrl(tokenUri, networkType) || tokenUri;
|
|
3207
3207
|
if (isErc1155) {
|
|
3208
3208
|
tokenUri = tokenUri.replace(
|
|
3209
3209
|
"{id}",
|
|
@@ -3221,7 +3221,7 @@ async function parseAvatarRecord(record, networkType, nodeUrl) {
|
|
|
3221
3221
|
console.error("No image URL in metadata");
|
|
3222
3222
|
return null;
|
|
3223
3223
|
}
|
|
3224
|
-
return
|
|
3224
|
+
return chunkDBQR2OKX_cjs.convertUriToUrl(imageUrl, networkType) || imageUrl;
|
|
3225
3225
|
}
|
|
3226
3226
|
return null;
|
|
3227
3227
|
} catch (error) {
|
|
@@ -3231,7 +3231,7 @@ async function parseAvatarRecord(record, networkType, nodeUrl) {
|
|
|
3231
3231
|
}
|
|
3232
3232
|
var useGetAvatar = (name) => {
|
|
3233
3233
|
const { network } = useVeChainKitConfig();
|
|
3234
|
-
const nodeUrl = network.nodeUrl ??
|
|
3234
|
+
const nodeUrl = network.nodeUrl ?? chunkDBQR2OKX_cjs.getConfig(network.type).nodeUrl;
|
|
3235
3235
|
const avatarQuery = reactQuery.useQuery({
|
|
3236
3236
|
queryKey: getAvatarQueryKey(name ?? ""),
|
|
3237
3237
|
queryFn: async () => {
|
|
@@ -3263,7 +3263,7 @@ var getTextRecords = async (nodeUrl, network, domain) => {
|
|
|
3263
3263
|
body: JSON.stringify({
|
|
3264
3264
|
clauses: [
|
|
3265
3265
|
{
|
|
3266
|
-
to:
|
|
3266
|
+
to: chunkDBQR2OKX_cjs.getConfig(network).vetDomainsContractAddress,
|
|
3267
3267
|
data: nameInterface2.encodeFunctionData("resolver", [
|
|
3268
3268
|
node
|
|
3269
3269
|
])
|
|
@@ -3322,7 +3322,7 @@ var getTextRecords = async (nodeUrl, network, domain) => {
|
|
|
3322
3322
|
var getTextRecordsQueryKey = (domain, network) => ["VECHAIN_KIT_TEXT_RECORDS", domain, network];
|
|
3323
3323
|
var useGetTextRecords = (domain) => {
|
|
3324
3324
|
const { network } = useVeChainKitConfig();
|
|
3325
|
-
const nodeUrl = network.nodeUrl ??
|
|
3325
|
+
const nodeUrl = network.nodeUrl ?? chunkDBQR2OKX_cjs.getConfig(network.type).nodeUrl;
|
|
3326
3326
|
return reactQuery.useQuery({
|
|
3327
3327
|
queryKey: getTextRecordsQueryKey(domain, network.type),
|
|
3328
3328
|
queryFn: () => getTextRecords(nodeUrl, network.type, domain),
|
|
@@ -3617,7 +3617,7 @@ var getResolverAddress = async (nodeUrl, network, domain) => {
|
|
|
3617
3617
|
body: JSON.stringify({
|
|
3618
3618
|
clauses: [
|
|
3619
3619
|
{
|
|
3620
|
-
to:
|
|
3620
|
+
to: chunkDBQR2OKX_cjs.getConfig(network).vetDomainsContractAddress,
|
|
3621
3621
|
data: nameInterface4.encodeFunctionData("resolver", [node])
|
|
3622
3622
|
}
|
|
3623
3623
|
]
|
|
@@ -3638,7 +3638,7 @@ var getResolverAddressQueryKey = (domain) => [
|
|
|
3638
3638
|
];
|
|
3639
3639
|
var useGetResolverAddress = (domain) => {
|
|
3640
3640
|
const { network } = useVeChainKitConfig();
|
|
3641
|
-
const nodeUrl = network.nodeUrl ??
|
|
3641
|
+
const nodeUrl = network.nodeUrl ?? chunkDBQR2OKX_cjs.getConfig(network.type).nodeUrl;
|
|
3642
3642
|
return reactQuery.useQuery({
|
|
3643
3643
|
queryKey: getResolverAddressQueryKey(domain),
|
|
3644
3644
|
queryFn: () => getResolverAddress(nodeUrl, network.type, domain),
|
|
@@ -3658,12 +3658,12 @@ var useGetAvatarOfAddress = (address) => {
|
|
|
3658
3658
|
return reactQuery.useQuery({
|
|
3659
3659
|
queryKey: getAvatarOfAddressQueryKey(address),
|
|
3660
3660
|
queryFn: async () => {
|
|
3661
|
-
if (!address) return
|
|
3661
|
+
if (!address) return chunkDBQR2OKX_cjs.getPicassoImage(address ?? "");
|
|
3662
3662
|
const domains = await domainsQuery.refetch();
|
|
3663
|
-
if (!domains.data?.domain) return
|
|
3663
|
+
if (!domains.data?.domain) return chunkDBQR2OKX_cjs.getPicassoImage(address);
|
|
3664
3664
|
if (domains.data.domain && avatarQuery.data)
|
|
3665
3665
|
return avatarQuery.data;
|
|
3666
|
-
return
|
|
3666
|
+
return chunkDBQR2OKX_cjs.getPicassoImage(address);
|
|
3667
3667
|
},
|
|
3668
3668
|
enabled: !!address && domainsQuery.isSuccess && (primaryDomain ? avatarQuery.isSuccess : true),
|
|
3669
3669
|
// Use the same caching strategy as the avatar query
|
|
@@ -3673,6 +3673,7 @@ var useGetAvatarOfAddress = (address) => {
|
|
|
3673
3673
|
};
|
|
3674
3674
|
var useBalances = ({ address = "" }) => {
|
|
3675
3675
|
const { network } = useVeChainKitConfig();
|
|
3676
|
+
const config = chunkDBQR2OKX_cjs.getConfig(network.type);
|
|
3676
3677
|
const { data: vetData, isLoading: vetLoading } = useAccountBalance(address);
|
|
3677
3678
|
const { data: vetUsdPrice, isLoading: vetUsdPriceLoading } = useGetTokenUsdPrice("VET");
|
|
3678
3679
|
const { data: vthoUsdPrice, isLoading: vthoUsdPriceLoading } = useGetTokenUsdPrice("VTHO");
|
|
@@ -3680,19 +3681,21 @@ var useBalances = ({ address = "" }) => {
|
|
|
3680
3681
|
const { data: b3trUsdPrice, isLoading: b3trUsdPriceLoading } = useGetTokenUsdPrice("B3TR");
|
|
3681
3682
|
const { data: vot3Balance, isLoading: vot3Loading } = useGetVot3Balance(address);
|
|
3682
3683
|
const { data: veDelegateBalance, isLoading: veDelegateLoading } = useGetVeDelegateBalance(address);
|
|
3684
|
+
const { data: gloDollarBalance, isLoading: gloDollarLoading } = useGetErc20Balance(config.gloDollarContractAddress, address);
|
|
3683
3685
|
const customTokenBalancesQueries = useGetCustomTokenBalances(address);
|
|
3684
3686
|
const customTokenBalances = customTokenBalancesQueries.map((query) => query.data).filter(Boolean);
|
|
3685
3687
|
const customTokensLoading = customTokenBalancesQueries.some(
|
|
3686
3688
|
(query) => query.isLoading
|
|
3687
3689
|
);
|
|
3688
3690
|
return React10.useMemo(() => {
|
|
3689
|
-
const isLoading = vetLoading || b3trLoading || vot3Loading || vetUsdPriceLoading || b3trUsdPriceLoading || veDelegateLoading || vthoUsdPriceLoading || customTokensLoading;
|
|
3691
|
+
const isLoading = vetLoading || b3trLoading || vot3Loading || vetUsdPriceLoading || b3trUsdPriceLoading || veDelegateLoading || vthoUsdPriceLoading || customTokensLoading || gloDollarLoading;
|
|
3690
3692
|
const contractAddresses = {
|
|
3691
3693
|
vet: "0x",
|
|
3692
|
-
vtho:
|
|
3693
|
-
b3tr:
|
|
3694
|
-
vot3:
|
|
3695
|
-
veDelegate:
|
|
3694
|
+
vtho: config.vthoContractAddress,
|
|
3695
|
+
b3tr: config.b3trContractAddress,
|
|
3696
|
+
vot3: config.vot3ContractAddress,
|
|
3697
|
+
veDelegate: config.veDelegate,
|
|
3698
|
+
USDGLO: config.gloDollarContractAddress
|
|
3696
3699
|
};
|
|
3697
3700
|
const balances = [
|
|
3698
3701
|
{
|
|
@@ -3726,6 +3729,12 @@ var useBalances = ({ address = "" }) => {
|
|
|
3726
3729
|
symbol: "veDelegate",
|
|
3727
3730
|
priceAddress: contractAddresses.b3tr
|
|
3728
3731
|
// using b3tr price for veDelegate
|
|
3732
|
+
},
|
|
3733
|
+
{
|
|
3734
|
+
address: contractAddresses.USDGLO,
|
|
3735
|
+
value: gloDollarBalance?.scaled ?? "0",
|
|
3736
|
+
symbol: "USDGLO",
|
|
3737
|
+
priceAddress: contractAddresses.USDGLO
|
|
3729
3738
|
}
|
|
3730
3739
|
];
|
|
3731
3740
|
customTokenBalances.forEach((token) => {
|
|
@@ -3741,7 +3750,9 @@ var useBalances = ({ address = "" }) => {
|
|
|
3741
3750
|
const prices = [
|
|
3742
3751
|
{ address: contractAddresses.vet, price: vetUsdPrice || 0 },
|
|
3743
3752
|
{ address: contractAddresses.vtho, price: vthoUsdPrice || 0 },
|
|
3744
|
-
{ address: contractAddresses.b3tr, price: b3trUsdPrice || 0 }
|
|
3753
|
+
{ address: contractAddresses.b3tr, price: b3trUsdPrice || 0 },
|
|
3754
|
+
{ address: contractAddresses.USDGLO, price: 1 }
|
|
3755
|
+
// gloDollar is pegged to 1 USD
|
|
3745
3756
|
];
|
|
3746
3757
|
const totalBalance = balances.reduce((acc, { priceAddress, value }) => {
|
|
3747
3758
|
const price = prices.find((p) => p.address === priceAddress)?.price || 0;
|
|
@@ -3823,7 +3834,7 @@ var vechain = viem.defineChain({
|
|
|
3823
3834
|
});
|
|
3824
3835
|
var vechainConnector = () => {
|
|
3825
3836
|
return rainbowKit.toPrivyWalletConnector({
|
|
3826
|
-
id:
|
|
3837
|
+
id: chunkDBQR2OKX_cjs.VECHAIN_PRIVY_APP_ID,
|
|
3827
3838
|
name: "VeChain",
|
|
3828
3839
|
iconUrl: "https://imagedelivery.net/oHBRUd2clqykxgDWmeAyLg/661dd77c-2f9d-40e7-baa1-f4e24fd7bf00/icon",
|
|
3829
3840
|
smartWalletMode: false
|
|
@@ -3878,7 +3889,7 @@ var usePrivyCrossAppSdk = () => {
|
|
|
3878
3889
|
setIsConnecting(true);
|
|
3879
3890
|
setConnectionError(null);
|
|
3880
3891
|
const connector = connectors.find(
|
|
3881
|
-
(c) => c.id === (appID ||
|
|
3892
|
+
(c) => c.id === (appID || chunkDBQR2OKX_cjs.VECHAIN_PRIVY_APP_ID)
|
|
3882
3893
|
);
|
|
3883
3894
|
if (!connector) {
|
|
3884
3895
|
throw new Error("Connector not found");
|
|
@@ -3940,7 +3951,7 @@ var useWalletMetadata = (address, networkType) => {
|
|
|
3940
3951
|
const { data: domain, isLoading: isLoadingVechainDomain } = useVechainDomain(address ?? "");
|
|
3941
3952
|
const { data: avatar, isLoading: isLoadingMetadata } = useGetAvatarOfAddress(address ?? "");
|
|
3942
3953
|
const { data: textRecords, isLoading: isLoadingRecords } = useGetTextRecords(domain?.domain ?? "");
|
|
3943
|
-
const headerUrl = textRecords?.header ?
|
|
3954
|
+
const headerUrl = textRecords?.header ? chunkDBQR2OKX_cjs.convertUriToUrl(textRecords.header, networkType) : null;
|
|
3944
3955
|
return {
|
|
3945
3956
|
domain: domain?.domain,
|
|
3946
3957
|
image: avatar,
|
|
@@ -3972,7 +3983,7 @@ var useWallet = () => {
|
|
|
3972
3983
|
const isConnectedWithDappKit = !!dappKitAccount;
|
|
3973
3984
|
const isConnectedWithSocialLogin = authenticated && !!user;
|
|
3974
3985
|
const isConnectedWithPrivy = isConnectedWithSocialLogin || isConnectedWithCrossApp;
|
|
3975
|
-
const isConnectedWithVeChain = isConnectedWithSocialLogin && privy?.appId ===
|
|
3986
|
+
const isConnectedWithVeChain = isConnectedWithSocialLogin && privy?.appId === chunkDBQR2OKX_cjs.VECHAIN_PRIVY_APP_ID || isConnectedWithCrossApp && connectionCache?.ecosystemApp?.appId === chunkDBQR2OKX_cjs.VECHAIN_PRIVY_APP_ID;
|
|
3976
3987
|
const isLoading = isConnectingWithCrossApp || isReconnectingWithCrossApp || isLoadingLoginOAuth || !ready;
|
|
3977
3988
|
const [isConnected, setIsConnected] = React10.useState(false);
|
|
3978
3989
|
const connectionSource = isConnectedWithCrossApp ? {
|
|
@@ -4038,7 +4049,7 @@ var useWallet = () => {
|
|
|
4038
4049
|
const { data: smartAccountVersion } = useSmartAccountVersion(
|
|
4039
4050
|
smartAccount?.address ?? ""
|
|
4040
4051
|
);
|
|
4041
|
-
const hasActiveSmartAccount = !!smartAccount?.address && !!account?.address &&
|
|
4052
|
+
const hasActiveSmartAccount = !!smartAccount?.address && !!account?.address && chunkDBQR2OKX_cjs.compareAddresses(smartAccount?.address, account?.address);
|
|
4042
4053
|
const disconnect = React10.useCallback(async () => {
|
|
4043
4054
|
try {
|
|
4044
4055
|
setIsConnected(false);
|
|
@@ -4162,17 +4173,17 @@ var useCustomTokens = () => {
|
|
|
4162
4173
|
};
|
|
4163
4174
|
const isTokenIncluded = (address) => {
|
|
4164
4175
|
return customTokens.some(
|
|
4165
|
-
(t) =>
|
|
4176
|
+
(t) => chunkDBQR2OKX_cjs.compareAddresses(t.address, address)
|
|
4166
4177
|
);
|
|
4167
4178
|
};
|
|
4168
4179
|
const isDefaultToken = (address) => {
|
|
4169
4180
|
const contractAddresses = {
|
|
4170
4181
|
vet: "0x",
|
|
4171
4182
|
// VET has no contract address since it's the native token
|
|
4172
|
-
vtho:
|
|
4173
|
-
b3tr:
|
|
4174
|
-
vot3:
|
|
4175
|
-
veDelegate:
|
|
4183
|
+
vtho: chunkDBQR2OKX_cjs.getConfig(network.type).vthoContractAddress,
|
|
4184
|
+
b3tr: chunkDBQR2OKX_cjs.getConfig(network.type).b3trContractAddress,
|
|
4185
|
+
vot3: chunkDBQR2OKX_cjs.getConfig(network.type).vot3ContractAddress,
|
|
4186
|
+
veDelegate: chunkDBQR2OKX_cjs.getConfig(network.type).veDelegate
|
|
4176
4187
|
};
|
|
4177
4188
|
return Object.values(contractAddresses).includes(address);
|
|
4178
4189
|
};
|
|
@@ -4267,7 +4278,7 @@ var useAccountBalance = (address) => {
|
|
|
4267
4278
|
return reactQuery.useQuery({
|
|
4268
4279
|
queryKey: getAccountBalanceQueryKey(address),
|
|
4269
4280
|
queryFn: () => getAccountBalance(thor, address),
|
|
4270
|
-
enabled: !!address &&
|
|
4281
|
+
enabled: !!address && chunkDBQR2OKX_cjs.isValidAddress(address),
|
|
4271
4282
|
refetchInterval: 1e4
|
|
4272
4283
|
});
|
|
4273
4284
|
};
|
|
@@ -4300,7 +4311,7 @@ var useRefreshMetadata = (domain, address) => {
|
|
|
4300
4311
|
// src/hooks/api/utility/useGetNodeUrl.ts
|
|
4301
4312
|
var useGetNodeUrl = () => {
|
|
4302
4313
|
const { network } = useVeChainKitConfig();
|
|
4303
|
-
return network.nodeUrl ??
|
|
4314
|
+
return network.nodeUrl ?? chunkDBQR2OKX_cjs.getConfig(network.type).nodeUrl;
|
|
4304
4315
|
};
|
|
4305
4316
|
|
|
4306
4317
|
// src/hooks/api/utility/useGetChainId.ts
|
|
@@ -4328,7 +4339,7 @@ var getCustomTokenBalance = async (thor, token, address) => {
|
|
|
4328
4339
|
if (res.reverted) throw new Error("Reverted");
|
|
4329
4340
|
const original = res.decoded[0];
|
|
4330
4341
|
const scaled = viem.formatEther(original);
|
|
4331
|
-
const formatted = scaled === "0" ? "0" :
|
|
4342
|
+
const formatted = scaled === "0" ? "0" : chunkDBQR2OKX_cjs.humanNumber(scaled);
|
|
4332
4343
|
return {
|
|
4333
4344
|
...token,
|
|
4334
4345
|
original,
|
|
@@ -4349,9 +4360,136 @@ var useGetCustomTokenBalances = (address) => {
|
|
|
4349
4360
|
}))
|
|
4350
4361
|
});
|
|
4351
4362
|
};
|
|
4363
|
+
var parseSignatureToAbi = (signature) => {
|
|
4364
|
+
const match = signature.match(/^([^(]+)\(([^)]*)\)$/);
|
|
4365
|
+
if (!match) return { name: signature, inputs: [] };
|
|
4366
|
+
const [, name, paramsStr] = match;
|
|
4367
|
+
const inputs = paramsStr ? paramsStr.split(",").map((param, index) => ({
|
|
4368
|
+
name: `param${index}`,
|
|
4369
|
+
type: param.trim()
|
|
4370
|
+
})) : [];
|
|
4371
|
+
return {
|
|
4372
|
+
name,
|
|
4373
|
+
inputs
|
|
4374
|
+
};
|
|
4375
|
+
};
|
|
4376
|
+
var fetchFunctionSignature = async (signature) => {
|
|
4377
|
+
const urls = [
|
|
4378
|
+
`https://b32.vecha.in/q/${signature}.json`,
|
|
4379
|
+
`https://sig.api.vechain.energy/${signature}`,
|
|
4380
|
+
`https://api.openchain.xyz/signature-database/v1/lookup?function=${signature}`
|
|
4381
|
+
];
|
|
4382
|
+
for (const url of urls) {
|
|
4383
|
+
const response = await fetch(url);
|
|
4384
|
+
if (!response.ok) {
|
|
4385
|
+
console.error(
|
|
4386
|
+
`Failed to fetch from ${url}: ${response.statusText}`
|
|
4387
|
+
);
|
|
4388
|
+
continue;
|
|
4389
|
+
}
|
|
4390
|
+
if (url.includes("b32.vecha.in")) {
|
|
4391
|
+
const data = await response.json();
|
|
4392
|
+
if (data?.length > 0) {
|
|
4393
|
+
return data[0];
|
|
4394
|
+
}
|
|
4395
|
+
} else if (url.includes("sig.api.vechain.energy")) {
|
|
4396
|
+
const data = await response.json();
|
|
4397
|
+
if (data?.abi) {
|
|
4398
|
+
return data.abi;
|
|
4399
|
+
}
|
|
4400
|
+
} else if (url.includes("openchain.xyz")) {
|
|
4401
|
+
const data = await response.json();
|
|
4402
|
+
if (data?.ok && data.result?.function?.[signature]?.length > 0) {
|
|
4403
|
+
const funcName = data.result.function[signature][0].name;
|
|
4404
|
+
const parsedAbi = parseSignatureToAbi(funcName);
|
|
4405
|
+
return {
|
|
4406
|
+
...parsedAbi,
|
|
4407
|
+
name: parsedAbi.name || "unknown",
|
|
4408
|
+
inputs: parsedAbi.inputs || [],
|
|
4409
|
+
outputs: [],
|
|
4410
|
+
type: "function",
|
|
4411
|
+
payable: false,
|
|
4412
|
+
constant: false
|
|
4413
|
+
};
|
|
4414
|
+
}
|
|
4415
|
+
}
|
|
4416
|
+
}
|
|
4417
|
+
return {
|
|
4418
|
+
name: "unknown",
|
|
4419
|
+
inputs: [],
|
|
4420
|
+
outputs: [],
|
|
4421
|
+
type: "function",
|
|
4422
|
+
payable: false,
|
|
4423
|
+
constant: false
|
|
4424
|
+
};
|
|
4425
|
+
};
|
|
4426
|
+
var decodeParams = (calldata, abiDefinition) => {
|
|
4427
|
+
try {
|
|
4428
|
+
if (!abiDefinition || !abiDefinition.inputs || abiDefinition.inputs.length === 0) {
|
|
4429
|
+
return [];
|
|
4430
|
+
}
|
|
4431
|
+
const paramData = calldata.length > 10 ? `0x${calldata.slice(10)}` : "0x";
|
|
4432
|
+
const decoded = thorDevkit.abi.decodeParameters(abiDefinition.inputs, paramData);
|
|
4433
|
+
return abiDefinition.inputs.map((param) => ({
|
|
4434
|
+
name: param.name || "unnamed",
|
|
4435
|
+
type: param.type,
|
|
4436
|
+
value: decoded ? decoded[param.name] : "Unknown"
|
|
4437
|
+
}));
|
|
4438
|
+
} catch (e) {
|
|
4439
|
+
console.error("Error decoding call data", e);
|
|
4440
|
+
return abiDefinition.inputs.map((param) => ({
|
|
4441
|
+
name: param.name || "unnamed",
|
|
4442
|
+
type: param.type,
|
|
4443
|
+
value: "Error decoding"
|
|
4444
|
+
}));
|
|
4445
|
+
}
|
|
4446
|
+
};
|
|
4447
|
+
var decodeFunctionSignature = async (input) => {
|
|
4448
|
+
if (!input || input === "0x") {
|
|
4449
|
+
return {
|
|
4450
|
+
definition: {
|
|
4451
|
+
name: "empty",
|
|
4452
|
+
inputs: [],
|
|
4453
|
+
outputs: [],
|
|
4454
|
+
type: "function",
|
|
4455
|
+
payable: false,
|
|
4456
|
+
constant: false
|
|
4457
|
+
},
|
|
4458
|
+
humanName: "empty()",
|
|
4459
|
+
decodedParams: []
|
|
4460
|
+
};
|
|
4461
|
+
}
|
|
4462
|
+
const signature = input.slice(0, 10);
|
|
4463
|
+
const functionDefinition = await fetchFunctionSignature(signature);
|
|
4464
|
+
const abiDefinition = new thorDevkit.abi.Function(
|
|
4465
|
+
functionDefinition
|
|
4466
|
+
);
|
|
4467
|
+
const decodedParams = input.length > 10 ? decodeParams(input, abiDefinition.definition) : [];
|
|
4468
|
+
const humanName = decodedParams.length > 0 ? `${functionDefinition.name}(${decodedParams.map((param) => `${param.name}: ${String(param.value)}`).join(", ")})` : `${functionDefinition.name}(${functionDefinition.inputs.map((input2) => `${input2.name || "unnamed"}: ${input2.type}`).join(", ")})`;
|
|
4469
|
+
return {
|
|
4470
|
+
definition: abiDefinition.definition,
|
|
4471
|
+
humanName,
|
|
4472
|
+
decodedParams
|
|
4473
|
+
};
|
|
4474
|
+
};
|
|
4475
|
+
var getDecodeFunctionSignatureQueryKey = (input) => [
|
|
4476
|
+
"decodeFunctionSignature",
|
|
4477
|
+
input
|
|
4478
|
+
];
|
|
4479
|
+
var useDecodeFunctionSignature = (input) => {
|
|
4480
|
+
return reactQuery.useQuery({
|
|
4481
|
+
queryKey: getDecodeFunctionSignatureQueryKey(input),
|
|
4482
|
+
queryFn: async () => await decodeFunctionSignature(input),
|
|
4483
|
+
enabled: !!input,
|
|
4484
|
+
staleTime: 1e3 * 60 * 5,
|
|
4485
|
+
// Cache results for 5 minutes
|
|
4486
|
+
retry: 2
|
|
4487
|
+
// Retry failed queries twice
|
|
4488
|
+
});
|
|
4489
|
+
};
|
|
4352
4490
|
var getNFTMetadataUri = async (networkType, thor, tokenID) => {
|
|
4353
4491
|
if (!tokenID) return Promise.reject(new Error("tokenID not provided"));
|
|
4354
|
-
const galaxyMemberContract =
|
|
4492
|
+
const galaxyMemberContract = chunkDBQR2OKX_cjs.getConfig(networkType).galaxyMemberContractAddress;
|
|
4355
4493
|
const functionFragment2 = chunk5GZ7N47F_cjs.GalaxyMember__factory.createInterface().getFunction("tokenURI").format("json");
|
|
4356
4494
|
const res = await thor.account(galaxyMemberContract).method(JSON.parse(functionFragment2)).call(tokenID);
|
|
4357
4495
|
if (res.vmError) return Promise.reject(new Error(res.vmError));
|
|
@@ -4415,7 +4553,7 @@ var getAccountAddress = async (thor, ownerAddress, networkType) => {
|
|
|
4415
4553
|
const functionFragment2 = SimpleAccountFactoryInterface.getFunction("getAccountAddress").format(
|
|
4416
4554
|
"json"
|
|
4417
4555
|
);
|
|
4418
|
-
const res = await thor.account(
|
|
4556
|
+
const res = await thor.account(chunkDBQR2OKX_cjs.getConfig(networkType).accountFactoryAddress).method(JSON.parse(functionFragment2)).call(ownerAddress);
|
|
4419
4557
|
if (res.reverted) throw new Error("Reverted");
|
|
4420
4558
|
return res.decoded[0];
|
|
4421
4559
|
};
|
|
@@ -4441,7 +4579,7 @@ var getUpgradeRequiredForAccount = async (thor, contractAddress, targetVersion,
|
|
|
4441
4579
|
const functionFragment2 = SimpleAccountFactoryInterface2.getFunction(
|
|
4442
4580
|
"upgradeRequiredForAccount"
|
|
4443
4581
|
).format("json");
|
|
4444
|
-
const res = await thor.account(
|
|
4582
|
+
const res = await thor.account(chunkDBQR2OKX_cjs.getConfig(networkType).accountFactoryAddress).method(JSON.parse(functionFragment2)).call(contractAddress, targetVersion);
|
|
4445
4583
|
if (res.reverted) throw new Error("Reverted");
|
|
4446
4584
|
return res.decoded[0];
|
|
4447
4585
|
};
|
|
@@ -4496,7 +4634,7 @@ var getAccountImplementationAddress = async (thor, version, networkType) => {
|
|
|
4496
4634
|
default:
|
|
4497
4635
|
throw new Error("Invalid version, must be between 1 and 3");
|
|
4498
4636
|
}
|
|
4499
|
-
const res = await thor.account(
|
|
4637
|
+
const res = await thor.account(chunkDBQR2OKX_cjs.getConfig(networkType).accountFactoryAddress).method(JSON.parse(functionFragment2)).call();
|
|
4500
4638
|
if (res.reverted) throw new Error("Reverted");
|
|
4501
4639
|
return res.decoded[0];
|
|
4502
4640
|
};
|
|
@@ -4527,7 +4665,7 @@ var getHasV1SmartAccount = async (thor, ownerAddress, networkType) => {
|
|
|
4527
4665
|
const functionFragment2 = SimpleAccountFactoryInterface4.getFunction("hasLegacyAccount").format(
|
|
4528
4666
|
"json"
|
|
4529
4667
|
);
|
|
4530
|
-
const res = await thor.account(
|
|
4668
|
+
const res = await thor.account(chunkDBQR2OKX_cjs.getConfig(networkType).accountFactoryAddress).method(JSON.parse(functionFragment2)).call(ownerAddress);
|
|
4531
4669
|
if (res.reverted) throw new Error("Reverted");
|
|
4532
4670
|
return res.decoded[0];
|
|
4533
4671
|
};
|
|
@@ -4552,7 +4690,7 @@ var getUpgradeRequired = async (thor, accountAddress, ownerAddress, targetVersio
|
|
|
4552
4690
|
const functionFragment2 = SimpleAccountFactoryInterface5.getFunction("upgradeRequired").format(
|
|
4553
4691
|
"json"
|
|
4554
4692
|
);
|
|
4555
|
-
const res = await thor.account(
|
|
4693
|
+
const res = await thor.account(chunkDBQR2OKX_cjs.getConfig(networkType).accountFactoryAddress).method(JSON.parse(functionFragment2)).call(accountAddress, ownerAddress, targetVersion);
|
|
4556
4694
|
if (res.reverted) throw new Error("Reverted");
|
|
4557
4695
|
return res.decoded[0];
|
|
4558
4696
|
};
|
|
@@ -4591,7 +4729,7 @@ var getAccountVersion = async (thor, accountAddress, ownerAddress, networkType)
|
|
|
4591
4729
|
const functionFragment2 = SimpleAccountFactoryInterface6.getFunction("getAccountVersion").format(
|
|
4592
4730
|
"json"
|
|
4593
4731
|
);
|
|
4594
|
-
const res = await thor.account(
|
|
4732
|
+
const res = await thor.account(chunkDBQR2OKX_cjs.getConfig(networkType).accountFactoryAddress).method(JSON.parse(functionFragment2)).call(accountAddress, ownerAddress);
|
|
4595
4733
|
if (res.reverted) throw new Error("Reverted");
|
|
4596
4734
|
return {
|
|
4597
4735
|
version: res.decoded[0],
|
|
@@ -4626,7 +4764,7 @@ var getCurrentAccountImplementationVersion = async (thor, networkType) => {
|
|
|
4626
4764
|
const functionFragment2 = SimpleAccountFactoryInterface7.getFunction(
|
|
4627
4765
|
"currentAccountImplementationVersion"
|
|
4628
4766
|
).format("json");
|
|
4629
|
-
const res = await thor.account(
|
|
4767
|
+
const res = await thor.account(chunkDBQR2OKX_cjs.getConfig(networkType).accountFactoryAddress).method(JSON.parse(functionFragment2)).call();
|
|
4630
4768
|
if (res.reverted) throw new Error("Reverted");
|
|
4631
4769
|
return parseInt(res.decoded[0]);
|
|
4632
4770
|
};
|
|
@@ -4651,7 +4789,7 @@ var getSmartAccount = async (thor, network, ownerAddress) => {
|
|
|
4651
4789
|
return { address: void 0 };
|
|
4652
4790
|
}
|
|
4653
4791
|
const account = await thor.contracts.executeCall(
|
|
4654
|
-
|
|
4792
|
+
chunkDBQR2OKX_cjs.getConfig(network).accountFactoryAddress,
|
|
4655
4793
|
sdkCore.ABIContract.ofAbi(chunkA4NZ5AVL_cjs.SimpleAccountFactoryABI).getFunction(
|
|
4656
4794
|
"getAccountAddress"
|
|
4657
4795
|
),
|
|
@@ -4869,7 +5007,7 @@ var useUpgradeSmartAccount = ({
|
|
|
4869
5007
|
const { refresh: refreshSmartAccountQueries } = useRefreshSmartAccountQueries();
|
|
4870
5008
|
const { data: newImplementationAddress } = useAccountImplementationAddress(targetVersion);
|
|
4871
5009
|
const buildClauses = React10.useCallback(async () => {
|
|
4872
|
-
if (!smartAccountAddress || !
|
|
5010
|
+
if (!smartAccountAddress || !chunkDBQR2OKX_cjs.isValidAddress(smartAccountAddress)) {
|
|
4873
5011
|
throw new Error("Invalid smart account address");
|
|
4874
5012
|
}
|
|
4875
5013
|
if (!newImplementationAddress) {
|
|
@@ -4900,7 +5038,7 @@ var useUpgradeSmartAccount = ({
|
|
|
4900
5038
|
const result = useSendTransaction({
|
|
4901
5039
|
privyUIOptions: {
|
|
4902
5040
|
title: "Upgrade Smart Account",
|
|
4903
|
-
description: `Upgrading your account at ${
|
|
5041
|
+
description: `Upgrading your account at ${chunkDBQR2OKX_cjs.humanAddress(
|
|
4904
5042
|
smartAccountAddress
|
|
4905
5043
|
)} to version ${targetVersion}`,
|
|
4906
5044
|
buttonText: "Sign to continue"
|
|
@@ -4917,6 +5055,31 @@ var useUpgradeSmartAccount = ({
|
|
|
4917
5055
|
}
|
|
4918
5056
|
};
|
|
4919
5057
|
};
|
|
5058
|
+
var getErc20Balance = async (thor, tokenAddress, address) => {
|
|
5059
|
+
if (!tokenAddress || !address) {
|
|
5060
|
+
throw new Error("Token address and user address are required");
|
|
5061
|
+
}
|
|
5062
|
+
const functionFragment2 = chunk5GZ7N47F_cjs.IERC20__factory.createInterface().getFunction("balanceOf").format("json");
|
|
5063
|
+
const res = await thor.account(tokenAddress).method(JSON.parse(functionFragment2)).call(address);
|
|
5064
|
+
if (res.reverted) throw new Error("Reverted");
|
|
5065
|
+
const original = res.decoded[0];
|
|
5066
|
+
const scaled = ethers.formatEther(original);
|
|
5067
|
+
const formatted = scaled === "0" ? "0" : chunkDBQR2OKX_cjs.humanNumber(scaled);
|
|
5068
|
+
return {
|
|
5069
|
+
original,
|
|
5070
|
+
scaled,
|
|
5071
|
+
formatted
|
|
5072
|
+
};
|
|
5073
|
+
};
|
|
5074
|
+
var getErc20BalanceQueryKey = (tokenAddress, address) => ["VECHAIN_KIT_ERC20_BALANCE", tokenAddress, address];
|
|
5075
|
+
var useGetErc20Balance = (tokenAddress, address) => {
|
|
5076
|
+
const { thor } = dappKitReact.useConnex();
|
|
5077
|
+
return reactQuery.useQuery({
|
|
5078
|
+
queryKey: getErc20BalanceQueryKey(tokenAddress, address),
|
|
5079
|
+
queryFn: async () => getErc20Balance(thor, tokenAddress, address),
|
|
5080
|
+
enabled: !!thor && !!address && !!tokenAddress
|
|
5081
|
+
});
|
|
5082
|
+
};
|
|
4920
5083
|
var FadeInView = ({ children }) => {
|
|
4921
5084
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4922
5085
|
framerMotion.motion.div,
|
|
@@ -5042,7 +5205,7 @@ var AddressDisplay = ({
|
|
|
5042
5205
|
react.Input,
|
|
5043
5206
|
{
|
|
5044
5207
|
cursor: "pointer",
|
|
5045
|
-
value: showHumanAddress ?
|
|
5208
|
+
value: showHumanAddress ? chunkDBQR2OKX_cjs.humanAddress(
|
|
5046
5209
|
wallet.address ?? "",
|
|
5047
5210
|
8,
|
|
5048
5211
|
7
|
|
@@ -5075,7 +5238,7 @@ var AddressDisplay = ({
|
|
|
5075
5238
|
react.Input,
|
|
5076
5239
|
{
|
|
5077
5240
|
cursor: "pointer",
|
|
5078
|
-
value: showHumanAddress ?
|
|
5241
|
+
value: showHumanAddress ? chunkDBQR2OKX_cjs.humanAddress(wallet?.address ?? "", 6, 4) : wallet?.address,
|
|
5079
5242
|
readOnly: true,
|
|
5080
5243
|
fontSize: "sm",
|
|
5081
5244
|
fontWeight: "700",
|
|
@@ -5104,7 +5267,7 @@ var AddressDisplay = ({
|
|
|
5104
5267
|
// package.json
|
|
5105
5268
|
var package_default = {
|
|
5106
5269
|
name: "@vechain/vechain-kit",
|
|
5107
|
-
version: "1.5.
|
|
5270
|
+
version: "1.5.11",
|
|
5108
5271
|
private: false,
|
|
5109
5272
|
homepage: "https://github.com/vechain/vechain-kit",
|
|
5110
5273
|
repository: "github:vechain/vechain-kit",
|
|
@@ -5195,7 +5358,9 @@ var package_default = {
|
|
|
5195
5358
|
},
|
|
5196
5359
|
resolutions: {
|
|
5197
5360
|
"@vechain/sdk-core": "^1.0.0-rc.5",
|
|
5198
|
-
"@vechain/sdk-network": "^1.0.0-rc.5"
|
|
5361
|
+
"@vechain/sdk-network": "^1.0.0-rc.5",
|
|
5362
|
+
"@vechain/dapp-kit-ui": "1.5.0",
|
|
5363
|
+
"@vechain/dapp-kit": "1.5.0"
|
|
5199
5364
|
},
|
|
5200
5365
|
overrides: {
|
|
5201
5366
|
"@vechain/sdk-core": "^1.0.0-rc.5",
|
|
@@ -5409,13 +5574,13 @@ var AssetButton = ({
|
|
|
5409
5574
|
...buttonProps,
|
|
5410
5575
|
children: [
|
|
5411
5576
|
/* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { children: [
|
|
5412
|
-
|
|
5577
|
+
chunkDBQR2OKX_cjs.TOKEN_LOGO_COMPONENTS[symbol] ? React10__default.default.cloneElement(chunkDBQR2OKX_cjs.TOKEN_LOGO_COMPONENTS[symbol], {
|
|
5413
5578
|
boxSize: "24px",
|
|
5414
5579
|
borderRadius: "full"
|
|
5415
5580
|
}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
5416
5581
|
react.Image,
|
|
5417
5582
|
{
|
|
5418
|
-
src:
|
|
5583
|
+
src: chunkDBQR2OKX_cjs.TOKEN_LOGOS[symbol],
|
|
5419
5584
|
alt: `${symbol} logo`,
|
|
5420
5585
|
boxSize: "24px",
|
|
5421
5586
|
borderRadius: "full",
|
|
@@ -5500,8 +5665,8 @@ var AddressDisplayCard = ({
|
|
|
5500
5665
|
),
|
|
5501
5666
|
/* @__PURE__ */ jsxRuntime.jsx(react.VStack, { align: "start", spacing: 0, children: domain ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5502
5667
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: "medium", fontSize: "sm", children: domain }),
|
|
5503
|
-
!hideAddress && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", opacity: 0.5, children:
|
|
5504
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: "medium", fontSize: "sm", children:
|
|
5668
|
+
!hideAddress && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", opacity: 0.5, children: chunkDBQR2OKX_cjs.humanAddress(address, 6, 4) })
|
|
5669
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: "medium", fontSize: "sm", children: chunkDBQR2OKX_cjs.humanAddress(address, 6, 4) }) })
|
|
5505
5670
|
] }),
|
|
5506
5671
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5507
5672
|
react.VStack,
|
|
@@ -5617,7 +5782,7 @@ var TransactionButtonAndStatus = ({
|
|
|
5617
5782
|
color: isDark ? "whiteAlpha.600" : "blackAlpha.600",
|
|
5618
5783
|
textAlign: "center",
|
|
5619
5784
|
width: "full",
|
|
5620
|
-
href: `${
|
|
5785
|
+
href: `${chunkDBQR2OKX_cjs.getConfig(network.type).explorerUrl}/${txReceipt?.meta.txID}`,
|
|
5621
5786
|
target: "_blank",
|
|
5622
5787
|
rel: "noopener noreferrer",
|
|
5623
5788
|
children: t("View transaction on the explorer")
|
|
@@ -6334,7 +6499,7 @@ var AccountDetailsButton = ({
|
|
|
6334
6499
|
wordBreak: "break-word",
|
|
6335
6500
|
whiteSpace: "normal",
|
|
6336
6501
|
w: "full",
|
|
6337
|
-
children: wallet?.domain ?
|
|
6502
|
+
children: wallet?.domain ? chunkDBQR2OKX_cjs.humanDomain(wallet?.domain ?? "", 18, 0) : chunkDBQR2OKX_cjs.humanAddress(wallet?.address ?? "", 6, 4)
|
|
6338
6503
|
}
|
|
6339
6504
|
)
|
|
6340
6505
|
] }),
|
|
@@ -6460,7 +6625,7 @@ var AccountSelector = ({
|
|
|
6460
6625
|
props: { width: 7, height: 7 }
|
|
6461
6626
|
}
|
|
6462
6627
|
),
|
|
6463
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: size, fontWeight: "500", children:
|
|
6628
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: size, fontWeight: "500", children: chunkDBQR2OKX_cjs.humanDomain(wallet?.domain ?? "", 22, 0) || chunkDBQR2OKX_cjs.humanAddress(wallet?.address ?? "", 6, 4) })
|
|
6464
6629
|
] }),
|
|
6465
6630
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6466
6631
|
react.Icon,
|
|
@@ -6507,7 +6672,7 @@ var AssetIcons = ({
|
|
|
6507
6672
|
const { tokens } = useBalances({ address });
|
|
6508
6673
|
const { darkMode } = useVeChainKitConfig();
|
|
6509
6674
|
const marginLeft = iconsGap < 1 ? `-${iconSize / 2}px` : `${iconsGap}px`;
|
|
6510
|
-
const tokensList = Object.values(tokens).filter((token) => token.value > 0).sort((a, b) => b.usdValue - a.usdValue);
|
|
6675
|
+
const tokensList = Object.values(tokens).filter((token) => Number(token.value) > 0).sort((a, b) => Number(b.usdValue) - Number(a.usdValue));
|
|
6511
6676
|
const tokensToShow = tokensList.slice(0, maxIcons);
|
|
6512
6677
|
const remainingTokens = tokensList.length - maxIcons;
|
|
6513
6678
|
if (!address) return null;
|
|
@@ -6525,17 +6690,17 @@ var AssetIcons = ({
|
|
|
6525
6690
|
border: "2px solid #00000024",
|
|
6526
6691
|
alignItems: "center",
|
|
6527
6692
|
justifyContent: "center",
|
|
6528
|
-
children:
|
|
6529
|
-
|
|
6693
|
+
children: chunkDBQR2OKX_cjs.TOKEN_LOGO_COMPONENTS[token.symbol] ? React10__default.default.cloneElement(
|
|
6694
|
+
chunkDBQR2OKX_cjs.TOKEN_LOGO_COMPONENTS[token.symbol],
|
|
6530
6695
|
{
|
|
6531
6696
|
width: `${iconSize * 0.8}px`,
|
|
6532
6697
|
height: `${iconSize * 0.8}px`,
|
|
6533
6698
|
rounded: "full"
|
|
6534
6699
|
}
|
|
6535
|
-
) :
|
|
6700
|
+
) : chunkDBQR2OKX_cjs.TOKEN_LOGOS[token.symbol] ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6536
6701
|
react.Image,
|
|
6537
6702
|
{
|
|
6538
|
-
src:
|
|
6703
|
+
src: chunkDBQR2OKX_cjs.TOKEN_LOGOS[token.symbol],
|
|
6539
6704
|
alt: `${token.symbol} logo`,
|
|
6540
6705
|
width: `${iconSize * 0.8}px`,
|
|
6541
6706
|
height: `${iconSize * 0.8}px`,
|
|
@@ -6729,15 +6894,15 @@ var AssetsTabPanel = ({ setCurrentContent }) => {
|
|
|
6729
6894
|
value: tokens[token.symbol]?.value ?? 0,
|
|
6730
6895
|
price: tokens[token.symbol]?.price ?? 0
|
|
6731
6896
|
}))
|
|
6732
|
-
].sort((a, b) => b.value * b.price - a.value * a.price);
|
|
6897
|
+
].sort((a, b) => Number(b.value) * b.price - Number(a.value) * a.price);
|
|
6733
6898
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 2, align: "stretch", mt: 2, children: [
|
|
6734
6899
|
allTokens.map((token) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6735
6900
|
AssetButton,
|
|
6736
6901
|
{
|
|
6737
6902
|
symbol: token.symbol,
|
|
6738
|
-
amount: token.value,
|
|
6739
|
-
usdValue: token.value * token.price,
|
|
6740
|
-
isDisabled: token.value === 0,
|
|
6903
|
+
amount: Number(token.value),
|
|
6904
|
+
usdValue: Number(token.value) * token.price,
|
|
6905
|
+
isDisabled: Number(token.value) === 0,
|
|
6741
6906
|
onClick: () => handleTokenSelect(token)
|
|
6742
6907
|
},
|
|
6743
6908
|
token.address
|
|
@@ -7707,7 +7872,7 @@ var NetworkInfo = () => {
|
|
|
7707
7872
|
InfoRow,
|
|
7708
7873
|
{
|
|
7709
7874
|
label: t("Node URL"),
|
|
7710
|
-
value: network.nodeUrl ||
|
|
7875
|
+
value: network.nodeUrl || chunkDBQR2OKX_cjs.getConfig(network.type).nodeUrl
|
|
7711
7876
|
}
|
|
7712
7877
|
),
|
|
7713
7878
|
connection.isConnectedWithPrivy ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -7944,7 +8109,7 @@ var WalletSecuredBy = () => {
|
|
|
7944
8109
|
var EmbeddedWalletContent = ({ setCurrentContent }) => {
|
|
7945
8110
|
const { t } = reactI18next.useTranslation();
|
|
7946
8111
|
const { connectedWallet, connection } = useWallet();
|
|
7947
|
-
const walletImage =
|
|
8112
|
+
const walletImage = chunkDBQR2OKX_cjs.getPicassoImage(connectedWallet?.address ?? "");
|
|
7948
8113
|
const { getConnectionCache } = useCrossAppConnectionCache();
|
|
7949
8114
|
const connectionCache = getConnectionCache();
|
|
7950
8115
|
const { darkMode: isDark } = useVeChainKitConfig();
|
|
@@ -8190,7 +8355,7 @@ var SendTokenContent = ({
|
|
|
8190
8355
|
};
|
|
8191
8356
|
const onSubmit = async (data) => {
|
|
8192
8357
|
if (!selectedToken) return;
|
|
8193
|
-
const isValidReceiver = !
|
|
8358
|
+
const isValidReceiver = !chunkDBQR2OKX_cjs.compareAddresses(resolvedAddress ?? ethers.ZeroAddress, ethers.ZeroAddress) || chunkDBQR2OKX_cjs.isValidAddress(data.toAddressOrDomain);
|
|
8194
8359
|
if (!isValidReceiver) {
|
|
8195
8360
|
setError("toAddressOrDomain", {
|
|
8196
8361
|
type: "manual",
|
|
@@ -8303,8 +8468,8 @@ var SendTokenContent = ({
|
|
|
8303
8468
|
bg: isDark ? "whiteAlpha.300" : "blackAlpha.300"
|
|
8304
8469
|
},
|
|
8305
8470
|
onClick: () => setIsSelectingToken(true),
|
|
8306
|
-
leftIcon:
|
|
8307
|
-
|
|
8471
|
+
leftIcon: chunkDBQR2OKX_cjs.TOKEN_LOGO_COMPONENTS[selectedToken.symbol] ? React10__default.default.cloneElement(
|
|
8472
|
+
chunkDBQR2OKX_cjs.TOKEN_LOGO_COMPONENTS[selectedToken.symbol],
|
|
8308
8473
|
{
|
|
8309
8474
|
boxSize: "20px",
|
|
8310
8475
|
borderRadius: "full"
|
|
@@ -8312,7 +8477,7 @@ var SendTokenContent = ({
|
|
|
8312
8477
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
8313
8478
|
react.Image,
|
|
8314
8479
|
{
|
|
8315
|
-
src:
|
|
8480
|
+
src: chunkDBQR2OKX_cjs.TOKEN_LOGOS[selectedToken.symbol],
|
|
8316
8481
|
alt: `${selectedToken.symbol} logo`,
|
|
8317
8482
|
boxSize: "20px",
|
|
8318
8483
|
borderRadius: "full",
|
|
@@ -8500,7 +8665,7 @@ var SendTokenSummaryContent = ({
|
|
|
8500
8665
|
if (avatar) {
|
|
8501
8666
|
return avatar;
|
|
8502
8667
|
}
|
|
8503
|
-
return
|
|
8668
|
+
return chunkDBQR2OKX_cjs.getPicassoImage(resolvedAddress || toAddressOrDomain);
|
|
8504
8669
|
}, [avatar, network.type, resolvedAddress, toAddressOrDomain]);
|
|
8505
8670
|
const {
|
|
8506
8671
|
sendTransaction: transferERC20,
|
|
@@ -8836,7 +9001,7 @@ var DomainListItem = ({
|
|
|
8836
9001
|
props: {
|
|
8837
9002
|
width: "40px",
|
|
8838
9003
|
height: "40px",
|
|
8839
|
-
src: metadata.image ??
|
|
9004
|
+
src: metadata.image ?? chunkDBQR2OKX_cjs.getPicassoImage(domain.name),
|
|
8840
9005
|
alt: domain.name
|
|
8841
9006
|
}
|
|
8842
9007
|
}
|
|
@@ -12969,7 +13134,7 @@ var CustomizationContent = ({
|
|
|
12969
13134
|
setPreviewImageUrl(newPreviewUrl);
|
|
12970
13135
|
const uploadedImage = await onUpload(file);
|
|
12971
13136
|
if (!uploadedImage) throw new Error("Failed to compress image");
|
|
12972
|
-
const ipfsHash = await
|
|
13137
|
+
const ipfsHash = await chunkDBQR2OKX_cjs.uploadBlobToIPFS(
|
|
12973
13138
|
uploadedImage.file,
|
|
12974
13139
|
file.name,
|
|
12975
13140
|
network.type
|
|
@@ -13039,7 +13204,7 @@ var CustomizationContent = ({
|
|
|
13039
13204
|
backgroundPosition: "center",
|
|
13040
13205
|
position: "relative",
|
|
13041
13206
|
h: "80px",
|
|
13042
|
-
background: `no-repeat url('${
|
|
13207
|
+
background: `no-repeat url('${chunkDBQR2OKX_cjs.getPicassoImage(
|
|
13043
13208
|
account?.address ?? ""
|
|
13044
13209
|
)}')`,
|
|
13045
13210
|
w: "100%",
|
|
@@ -13927,7 +14092,7 @@ var ManageCustomTokenContent = ({
|
|
|
13927
14092
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13928
14093
|
react.Image,
|
|
13929
14094
|
{
|
|
13930
|
-
src:
|
|
14095
|
+
src: chunkDBQR2OKX_cjs.TOKEN_LOGOS[token?.symbol],
|
|
13931
14096
|
alt: `${token.symbol} logo`,
|
|
13932
14097
|
boxSize: "20px",
|
|
13933
14098
|
borderRadius: "full",
|
|
@@ -13957,7 +14122,7 @@ var ManageCustomTokenContent = ({
|
|
|
13957
14122
|
),
|
|
13958
14123
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: "medium", children: token.symbol ?? "Unknown" })
|
|
13959
14124
|
] }),
|
|
13960
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { opacity: 0.7, children:
|
|
14125
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { opacity: 0.7, children: chunkDBQR2OKX_cjs.humanAddress(
|
|
13961
14126
|
token.address ?? "",
|
|
13962
14127
|
4,
|
|
13963
14128
|
4
|
|
@@ -14248,7 +14413,7 @@ var PrivyLinkedAccounts = ({ onBack }) => {
|
|
|
14248
14413
|
case "phone":
|
|
14249
14414
|
return account.number;
|
|
14250
14415
|
case "wallet":
|
|
14251
|
-
return `${
|
|
14416
|
+
return `${chunkDBQR2OKX_cjs.humanAddress(account.address)} - ${account.walletClientType}`;
|
|
14252
14417
|
default:
|
|
14253
14418
|
return "";
|
|
14254
14419
|
}
|
|
@@ -14763,7 +14928,7 @@ var SharedAppCard = ({
|
|
|
14763
14928
|
react.Image,
|
|
14764
14929
|
{
|
|
14765
14930
|
src: imageUrl,
|
|
14766
|
-
fallbackSrc:
|
|
14931
|
+
fallbackSrc: chunkDBQR2OKX_cjs.notFoundImage,
|
|
14767
14932
|
alt: name,
|
|
14768
14933
|
height: "90px",
|
|
14769
14934
|
objectFit: "contain",
|
|
@@ -14863,7 +15028,7 @@ var ShortcutsSection = ({}) => {
|
|
|
14863
15028
|
react.Image,
|
|
14864
15029
|
{
|
|
14865
15030
|
src: shortcut.image,
|
|
14866
|
-
fallbackSrc:
|
|
15031
|
+
fallbackSrc: chunkDBQR2OKX_cjs.notFoundImage,
|
|
14867
15032
|
alt: shortcut.name,
|
|
14868
15033
|
objectFit: "contain",
|
|
14869
15034
|
rounded: "full"
|
|
@@ -15250,7 +15415,7 @@ var TransactionModalContent = ({
|
|
|
15250
15415
|
}
|
|
15251
15416
|
};
|
|
15252
15417
|
const statusConfig = getStatusConfig();
|
|
15253
|
-
const socialDescription = `${
|
|
15418
|
+
const socialDescription = `${chunkDBQR2OKX_cjs.getConfig(network.type).explorerUrl}/${txReceipt?.meta.txID}`;
|
|
15254
15419
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
|
|
15255
15420
|
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
15256
15421
|
/* @__PURE__ */ jsxRuntime.jsx(react.ModalHeader, { children: statusConfig.title }),
|
|
@@ -15328,7 +15493,7 @@ var TransactionModalContent = ({
|
|
|
15328
15493
|
uiConfig?.showExplorerButton && txReceipt?.meta.txID && /* @__PURE__ */ jsxRuntime.jsx(
|
|
15329
15494
|
react.Link,
|
|
15330
15495
|
{
|
|
15331
|
-
href: `${
|
|
15496
|
+
href: `${chunkDBQR2OKX_cjs.getConfig(network.type).explorerUrl}/${txReceipt?.meta.txID}`,
|
|
15332
15497
|
isExternal: true,
|
|
15333
15498
|
opacity: 0.5,
|
|
15334
15499
|
fontSize: "14px",
|
|
@@ -15391,7 +15556,7 @@ var SuccessfulOperationContent = ({
|
|
|
15391
15556
|
}) => {
|
|
15392
15557
|
const { t } = reactI18next.useTranslation();
|
|
15393
15558
|
const { network, darkMode } = useVeChainKitConfig();
|
|
15394
|
-
const explorerUrl =
|
|
15559
|
+
const explorerUrl = chunkDBQR2OKX_cjs.getConfig(network.type).explorerUrl;
|
|
15395
15560
|
const socialDescription = `${explorerUrl}/${txId}`;
|
|
15396
15561
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
|
|
15397
15562
|
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
@@ -15727,16 +15892,16 @@ var ConnectPopover = ({
|
|
|
15727
15892
|
var WalletDisplay = ({ variant }) => {
|
|
15728
15893
|
const { account } = useWallet();
|
|
15729
15894
|
const [isSmallMobile] = react.useMediaQuery("(max-width: 480px)");
|
|
15895
|
+
const accountDomain = React10.useMemo(() => {
|
|
15896
|
+
const isLongDomain = account?.domain && account.domain.length > 18;
|
|
15897
|
+
return isSmallMobile && isLongDomain ? chunkDBQR2OKX_cjs.humanDomain(account?.domain ?? "", 18, 0) : account?.domain;
|
|
15898
|
+
}, [isSmallMobile, account?.domain]);
|
|
15730
15899
|
if (!account) return /* @__PURE__ */ jsxRuntime.jsx(react.Spinner, {});
|
|
15731
15900
|
if (variant === "icon") {
|
|
15732
15901
|
return null;
|
|
15733
15902
|
}
|
|
15734
|
-
const accountDomain = React10.useMemo(() => {
|
|
15735
|
-
const isLongDomain = account?.domain && account.domain.length > 18;
|
|
15736
|
-
return isSmallMobile && isLongDomain ? chunk5YN7CZ5H_cjs.humanDomain(account?.domain ?? "", 18, 0) : account?.domain;
|
|
15737
|
-
}, [isSmallMobile, account?.domain]);
|
|
15738
15903
|
if (variant === "iconAndDomain") {
|
|
15739
|
-
return account.domain ? /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", children: accountDomain }) : /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", children:
|
|
15904
|
+
return account.domain ? /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", children: accountDomain }) : /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", children: chunkDBQR2OKX_cjs.humanAddress(account.address ?? "", 6, 4) });
|
|
15740
15905
|
}
|
|
15741
15906
|
if (variant === "iconDomainAndAssets") {
|
|
15742
15907
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { spacing: 4, children: [
|
|
@@ -15747,7 +15912,7 @@ var WalletDisplay = ({ variant }) => {
|
|
|
15747
15912
|
{
|
|
15748
15913
|
fontSize: account.domain ? "xs" : "sm",
|
|
15749
15914
|
opacity: account.domain ? 0.5 : 1,
|
|
15750
|
-
children:
|
|
15915
|
+
children: chunkDBQR2OKX_cjs.humanAddress(account.address ?? "", 4, 4)
|
|
15751
15916
|
}
|
|
15752
15917
|
)
|
|
15753
15918
|
] }),
|
|
@@ -15761,7 +15926,7 @@ var WalletDisplay = ({ variant }) => {
|
|
|
15761
15926
|
{
|
|
15762
15927
|
fontSize: account.domain ? "xs" : "sm",
|
|
15763
15928
|
opacity: account.domain ? 0.5 : 1,
|
|
15764
|
-
children:
|
|
15929
|
+
children: chunkDBQR2OKX_cjs.humanAddress(account.address ?? "", 4, 4)
|
|
15765
15930
|
}
|
|
15766
15931
|
)
|
|
15767
15932
|
] });
|
|
@@ -15935,7 +16100,7 @@ var TransactionToastContent = ({
|
|
|
15935
16100
|
}) => {
|
|
15936
16101
|
const { t } = reactI18next.useTranslation();
|
|
15937
16102
|
const { network } = useVeChainKitConfig();
|
|
15938
|
-
const explorerUrl =
|
|
16103
|
+
const explorerUrl = chunkDBQR2OKX_cjs.getConfig(network.type).explorerUrl;
|
|
15939
16104
|
const errorMessage = React10.useMemo(() => {
|
|
15940
16105
|
if (!txError) return null;
|
|
15941
16106
|
return txError.reason || t("Something went wrong. Please try again.");
|
|
@@ -16387,7 +16552,7 @@ var ProfileCard = ({
|
|
|
16387
16552
|
const activeAccountTextRecords = useGetTextRecords(
|
|
16388
16553
|
activeAccountDomain?.data?.domain
|
|
16389
16554
|
);
|
|
16390
|
-
const headerImageSvg =
|
|
16555
|
+
const headerImageSvg = chunkDBQR2OKX_cjs.getPicassoImage(address);
|
|
16391
16556
|
const isConnectedAccount = address === account?.address;
|
|
16392
16557
|
const hasLinks = activeAccountTextRecords?.data?.url || activeAccountTextRecords?.data?.["com.x"] || activeAccountTextRecords?.data?.email;
|
|
16393
16558
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Card, { variant: "vechainKitBase", ...style?.card, children: [
|
|
@@ -16543,7 +16708,7 @@ var SuccessfulOperationContent2 = ({
|
|
|
16543
16708
|
}) => {
|
|
16544
16709
|
const { t } = reactI18next.useTranslation();
|
|
16545
16710
|
const { network, darkMode } = useVeChainKitConfig();
|
|
16546
|
-
const explorerUrl =
|
|
16711
|
+
const explorerUrl = chunkDBQR2OKX_cjs.getConfig(network.type).explorerUrl;
|
|
16547
16712
|
const socialDescription = `${explorerUrl}/${txId}`;
|
|
16548
16713
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
|
|
16549
16714
|
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
@@ -17168,7 +17333,7 @@ var useReceiveModal = () => {
|
|
|
17168
17333
|
var ReceiveModalProvider = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
17169
17334
|
var useLoginModalContent = () => {
|
|
17170
17335
|
const { privy, loginMethods } = useVeChainKitConfig();
|
|
17171
|
-
const isVeChainApp = privy?.appId ===
|
|
17336
|
+
const isVeChainApp = privy?.appId === chunkDBQR2OKX_cjs.VECHAIN_PRIVY_APP_ID;
|
|
17172
17337
|
const isLoginMethodEnabled = (method35) => {
|
|
17173
17338
|
if (!loginMethods) return true;
|
|
17174
17339
|
if (Array.isArray(method35)) {
|
|
@@ -17274,7 +17439,7 @@ var useTransferERC20 = ({
|
|
|
17274
17439
|
const queryClient = reactQuery.useQueryClient();
|
|
17275
17440
|
const { refresh } = useRefreshBalances();
|
|
17276
17441
|
const buildClauses = React10.useCallback(async () => {
|
|
17277
|
-
if (!receiverAddress || !amount || !
|
|
17442
|
+
if (!receiverAddress || !amount || !chunkDBQR2OKX_cjs.isValidAddress(receiverAddress))
|
|
17278
17443
|
throw new Error("Invalid receiver address or amount");
|
|
17279
17444
|
const clausesArray = [];
|
|
17280
17445
|
clausesArray.push({
|
|
@@ -17297,7 +17462,7 @@ var useTransferERC20 = ({
|
|
|
17297
17462
|
signerAccountAddress: fromAddress,
|
|
17298
17463
|
privyUIOptions: {
|
|
17299
17464
|
title: "Confirm Transfer",
|
|
17300
|
-
description: `Transfer ${amount} ${tokenName} to ${
|
|
17465
|
+
description: `Transfer ${amount} ${tokenName} to ${chunkDBQR2OKX_cjs.humanAddress(
|
|
17301
17466
|
receiverAddress
|
|
17302
17467
|
)}`,
|
|
17303
17468
|
buttonText: "Sign to continue"
|
|
@@ -17323,7 +17488,7 @@ var useTransferVET = ({
|
|
|
17323
17488
|
}) => {
|
|
17324
17489
|
const { refresh } = useRefreshBalances();
|
|
17325
17490
|
const buildClauses = React10.useCallback(async () => {
|
|
17326
|
-
if (!receiverAddress || !amount || !
|
|
17491
|
+
if (!receiverAddress || !amount || !chunkDBQR2OKX_cjs.isValidAddress(receiverAddress))
|
|
17327
17492
|
throw new Error("Invalid receiver address or amount");
|
|
17328
17493
|
if (isNaN(Number(amount))) {
|
|
17329
17494
|
throw new Error("Invalid amount");
|
|
@@ -17347,7 +17512,7 @@ var useTransferVET = ({
|
|
|
17347
17512
|
signerAccountAddress: fromAddress,
|
|
17348
17513
|
privyUIOptions: {
|
|
17349
17514
|
title: "Confirm Transfer",
|
|
17350
|
-
description: `Transfer ${amount} VET to ${
|
|
17515
|
+
description: `Transfer ${amount} VET to ${chunkDBQR2OKX_cjs.humanAddress(
|
|
17351
17516
|
receiverAddress
|
|
17352
17517
|
)}`,
|
|
17353
17518
|
buttonText: "Sign to continue"
|
|
@@ -17524,14 +17689,14 @@ var useCrossAppConnectionCache = () => {
|
|
|
17524
17689
|
var useLoginWithVeChain = () => {
|
|
17525
17690
|
const { login: loginWithVeChain } = usePrivyCrossAppSdk();
|
|
17526
17691
|
const { setConnectionCache } = useCrossAppConnectionCache();
|
|
17527
|
-
const { data: appsInfo } = useFetchAppInfo([
|
|
17692
|
+
const { data: appsInfo } = useFetchAppInfo([chunkDBQR2OKX_cjs.VECHAIN_PRIVY_APP_ID]);
|
|
17528
17693
|
const login = async () => {
|
|
17529
17694
|
try {
|
|
17530
|
-
await loginWithVeChain(
|
|
17695
|
+
await loginWithVeChain(chunkDBQR2OKX_cjs.VECHAIN_PRIVY_APP_ID);
|
|
17531
17696
|
setConnectionCache({
|
|
17532
17697
|
name: "VeChain",
|
|
17533
|
-
logoUrl: appsInfo?.[
|
|
17534
|
-
appId:
|
|
17698
|
+
logoUrl: appsInfo?.[chunkDBQR2OKX_cjs.VECHAIN_PRIVY_APP_ID]?.logo_url,
|
|
17699
|
+
appId: chunkDBQR2OKX_cjs.VECHAIN_PRIVY_APP_ID,
|
|
17535
17700
|
website: "https://governance.vebetterdao.org"
|
|
17536
17701
|
});
|
|
17537
17702
|
} catch (error) {
|
|
@@ -17795,7 +17960,7 @@ var PrivyWalletProvider = ({
|
|
|
17795
17960
|
clauses.push(
|
|
17796
17961
|
sdkCore.Clause.callFunction(
|
|
17797
17962
|
sdkCore.Address.of(
|
|
17798
|
-
|
|
17963
|
+
chunkDBQR2OKX_cjs.getConfig(network.type).accountFactoryAddress
|
|
17799
17964
|
),
|
|
17800
17965
|
sdkCore.ABIContract.ofAbi(chunkA4NZ5AVL_cjs.SimpleAccountFactoryABI).getFunction(
|
|
17801
17966
|
"createAccount"
|
|
@@ -17870,7 +18035,7 @@ var PrivyWalletProvider = ({
|
|
|
17870
18035
|
clauses.push(
|
|
17871
18036
|
sdkCore.Clause.callFunction(
|
|
17872
18037
|
sdkCore.Address.of(
|
|
17873
|
-
|
|
18038
|
+
chunkDBQR2OKX_cjs.getConfig(network.type).accountFactoryAddress
|
|
17874
18039
|
),
|
|
17875
18040
|
sdkCore.ABIContract.ofAbi(chunkA4NZ5AVL_cjs.SimpleAccountFactoryABI).getFunction(
|
|
17876
18041
|
"createAccount"
|
|
@@ -17919,10 +18084,10 @@ var PrivyWalletProvider = ({
|
|
|
17919
18084
|
[
|
|
17920
18085
|
{
|
|
17921
18086
|
privateKey: Buffer.from(
|
|
17922
|
-
|
|
18087
|
+
chunkDBQR2OKX_cjs.randomTransactionUser.privateKey.slice(2),
|
|
17923
18088
|
"hex"
|
|
17924
18089
|
),
|
|
17925
|
-
address:
|
|
18090
|
+
address: chunkDBQR2OKX_cjs.randomTransactionUser.address
|
|
17926
18091
|
}
|
|
17927
18092
|
],
|
|
17928
18093
|
{ delegator: { delegatorUrl } }
|
|
@@ -17933,11 +18098,11 @@ var PrivyWalletProvider = ({
|
|
|
17933
18098
|
true
|
|
17934
18099
|
);
|
|
17935
18100
|
const signer = await providerWithDelegationEnabled.getSigner(
|
|
17936
|
-
|
|
18101
|
+
chunkDBQR2OKX_cjs.randomTransactionUser.address
|
|
17937
18102
|
);
|
|
17938
18103
|
const txInput = sdkNetwork.signerUtils.transactionBodyToTransactionRequestInput(
|
|
17939
18104
|
txBody,
|
|
17940
|
-
|
|
18105
|
+
chunkDBQR2OKX_cjs.randomTransactionUser.address
|
|
17941
18106
|
);
|
|
17942
18107
|
const rawDelegateSigned = await signer.signTransaction(txInput);
|
|
17943
18108
|
const { id } = await fetch(`${nodeUrl}/transactions`, {
|
|
@@ -17976,7 +18141,7 @@ var PrivyWalletProvider = ({
|
|
|
17976
18141
|
PrivyWalletProviderContext.Provider,
|
|
17977
18142
|
{
|
|
17978
18143
|
value: {
|
|
17979
|
-
accountFactory:
|
|
18144
|
+
accountFactory: chunkDBQR2OKX_cjs.getConfig(network.type).accountFactoryAddress,
|
|
17980
18145
|
sendTransaction,
|
|
17981
18146
|
signMessage,
|
|
17982
18147
|
signTypedData,
|
|
@@ -18099,7 +18264,7 @@ var VeChainKitProvider = (props) => {
|
|
|
18099
18264
|
const userEcosystemMethods = validatedLoginMethods?.find(
|
|
18100
18265
|
(method35) => method35.method === "ecosystem"
|
|
18101
18266
|
);
|
|
18102
|
-
return userEcosystemMethods?.allowedApps ??
|
|
18267
|
+
return userEcosystemMethods?.allowedApps ?? chunkDBQR2OKX_cjs.DEFAULT_PRIVY_ECOSYSTEM_APPS.map((app) => app.id);
|
|
18103
18268
|
}, [validatedLoginMethods]);
|
|
18104
18269
|
let privyAppId, privyClientId;
|
|
18105
18270
|
if (!privy) {
|
|
@@ -18176,8 +18341,8 @@ var VeChainKitProvider = (props) => {
|
|
|
18176
18341
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18177
18342
|
dappKitReact.DAppKitProvider,
|
|
18178
18343
|
{
|
|
18179
|
-
nodeUrl: network.nodeUrl ??
|
|
18180
|
-
genesis:
|
|
18344
|
+
nodeUrl: network.nodeUrl ?? chunkDBQR2OKX_cjs.getConfig(network.type).nodeUrl,
|
|
18345
|
+
genesis: chunkDBQR2OKX_cjs.getConfig(network.type).network.genesis,
|
|
18181
18346
|
i18n: i18nConfig,
|
|
18182
18347
|
language,
|
|
18183
18348
|
logLevel: dappKit.logLevel,
|
|
@@ -18192,7 +18357,7 @@ var VeChainKitProvider = (props) => {
|
|
|
18192
18357
|
"--vdk-modal-width": "22rem",
|
|
18193
18358
|
"--vdk-modal-backdrop-filter": "blur(3px)",
|
|
18194
18359
|
"--vdk-border-dark-source-card": `1px solid ${"#ffffff0a"}`,
|
|
18195
|
-
"--vdk-border-light-source-card": `1px solid ${"#ebebeb"}
|
|
18360
|
+
"--vdk-border-light-source-card": `1px solid ${"#ebebeb"}`,
|
|
18196
18361
|
// Dark mode colors
|
|
18197
18362
|
"--vdk-color-dark-primary": "transparent",
|
|
18198
18363
|
"--vdk-color-dark-primary-hover": "rgba(255, 255, 255, 0.05)",
|
|
@@ -18212,7 +18377,7 @@ var VeChainKitProvider = (props) => {
|
|
|
18212
18377
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18213
18378
|
PrivyWalletProvider,
|
|
18214
18379
|
{
|
|
18215
|
-
nodeUrl: network.nodeUrl ??
|
|
18380
|
+
nodeUrl: network.nodeUrl ?? chunkDBQR2OKX_cjs.getConfig(network.type).nodeUrl,
|
|
18216
18381
|
delegatorUrl: feeDelegation?.delegatorUrl ?? "",
|
|
18217
18382
|
delegateAllTransactions: feeDelegation?.delegateAllTransactions ?? false,
|
|
18218
18383
|
children: /* @__PURE__ */ jsxRuntime.jsx(ModalProvider, { children })
|
|
@@ -18550,7 +18715,7 @@ var VechainKitThemeProvider = ({
|
|
|
18550
18715
|
|
|
18551
18716
|
Object.defineProperty(exports, "getConfig", {
|
|
18552
18717
|
enumerable: true,
|
|
18553
|
-
get: function () { return
|
|
18718
|
+
get: function () { return chunkDBQR2OKX_cjs.getConfig; }
|
|
18554
18719
|
});
|
|
18555
18720
|
Object.defineProperty(exports, "useMfaEnrollment", {
|
|
18556
18721
|
enumerable: true,
|
|
@@ -18680,6 +18845,7 @@ exports.buildClaimRewardsTx = buildClaimRewardsTx;
|
|
|
18680
18845
|
exports.buildClaimRoundReward = buildClaimRoundReward;
|
|
18681
18846
|
exports.compressImages = compressImages;
|
|
18682
18847
|
exports.currentBlockQueryKey = currentBlockQueryKey;
|
|
18848
|
+
exports.decodeFunctionSignature = decodeFunctionSignature;
|
|
18683
18849
|
exports.fetchPrivyAppInfo = fetchPrivyAppInfo;
|
|
18684
18850
|
exports.fetchPrivyStatus = fetchPrivyStatus;
|
|
18685
18851
|
exports.fetchVechainDomain = fetchVechainDomain;
|
|
@@ -18731,6 +18897,8 @@ exports.getDomainsOfAddress = getDomainsOfAddress;
|
|
|
18731
18897
|
exports.getDomainsOfAddressQueryKey = getDomainsOfAddressQueryKey;
|
|
18732
18898
|
exports.getEnsRecordExistsQueryKey = getEnsRecordExistsQueryKey;
|
|
18733
18899
|
exports.getEntitiesLinkedToPassportQueryKey = getEntitiesLinkedToPassportQueryKey;
|
|
18900
|
+
exports.getErc20Balance = getErc20Balance;
|
|
18901
|
+
exports.getErc20BalanceQueryKey = getErc20BalanceQueryKey;
|
|
18734
18902
|
exports.getEvents = getEvents;
|
|
18735
18903
|
exports.getGMBaseUriQueryKey = getGMBaseUriQueryKey;
|
|
18736
18904
|
exports.getGMLevel = getGMLevel;
|
|
@@ -18853,6 +19021,7 @@ exports.useCurrentAccountImplementationVersion = useCurrentAccountImplementation
|
|
|
18853
19021
|
exports.useCurrentAllocationsRound = useCurrentAllocationsRound;
|
|
18854
19022
|
exports.useCurrentAllocationsRoundId = useCurrentAllocationsRoundId;
|
|
18855
19023
|
exports.useCurrentBlock = useCurrentBlock;
|
|
19024
|
+
exports.useDecodeFunctionSignature = useDecodeFunctionSignature;
|
|
18856
19025
|
exports.useEcosystemShortcuts = useEcosystemShortcuts;
|
|
18857
19026
|
exports.useEnsRecordExists = useEnsRecordExists;
|
|
18858
19027
|
exports.useExploreEcosystemModal = useExploreEcosystemModal;
|
|
@@ -18875,6 +19044,7 @@ exports.useGetDelegatee = useGetDelegatee;
|
|
|
18875
19044
|
exports.useGetDelegator = useGetDelegator;
|
|
18876
19045
|
exports.useGetDomainsOfAddress = useGetDomainsOfAddress;
|
|
18877
19046
|
exports.useGetEntitiesLinkedToPassport = useGetEntitiesLinkedToPassport;
|
|
19047
|
+
exports.useGetErc20Balance = useGetErc20Balance;
|
|
18878
19048
|
exports.useGetNodeManager = useGetNodeManager;
|
|
18879
19049
|
exports.useGetNodeUrl = useGetNodeUrl;
|
|
18880
19050
|
exports.useGetPassportForEntity = useGetPassportForEntity;
|