@tokenops/sdk 2.0.0-alpha.2 → 2.0.0-alpha.4
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/CHANGELOG.md +92 -3
- package/README.md +76 -34
- package/SUPPORT.md +1 -1
- package/dist/{chunk-PYYSB5ZN.js → chunk-2ND7US2I.js} +1 -1
- package/dist/{chunk-EYDA6Q6C.js → chunk-3ZSPRHR3.js} +63 -12
- package/dist/{chunk-X7WBPCEU.js → chunk-67Q6KSVV.js} +4578 -3383
- package/dist/{chunk-UHHMVBLU.cjs → chunk-6AYJRUGP.cjs} +7 -50
- package/dist/{chunk-FEDX7B6T.cjs → chunk-6FUHF73F.cjs} +5 -5
- package/dist/{chunk-NWFMBLSQ.js → chunk-7KY4K4PH.js} +1 -1
- package/dist/{chunk-FHWSBGWE.cjs → chunk-ARZ5C3FS.cjs} +7 -7
- package/dist/{chunk-SPLNGUFF.js → chunk-AX6MQAWU.js} +2 -2
- package/dist/{chunk-IGO5XSPS.js → chunk-BSXEX2SH.js} +3 -3
- package/dist/{chunk-44YJPMQC.js → chunk-CHGY6B7L.js} +34 -81
- package/dist/{chunk-IUKKNJ2R.cjs → chunk-DFK5GCJP.cjs} +55 -72
- package/dist/{chunk-PZZK3O3S.cjs → chunk-E4IV4M4E.cjs} +4598 -3403
- package/dist/{chunk-A4DCEE33.js → chunk-GHGF65LN.js} +16 -12
- package/dist/{chunk-TWT3STIX.js → chunk-K3R27WX4.js} +8 -46
- package/dist/{chunk-GADGBQJO.js → chunk-KJUNBOJQ.js} +52 -71
- package/dist/{chunk-MM5BV5CS.cjs → chunk-PO3A2AQX.cjs} +4 -4
- package/dist/{chunk-EBLBPUPI.cjs → chunk-QHDMPT7I.cjs} +72 -19
- package/dist/{chunk-3YHBO2DL.cjs → chunk-S47IBDTA.cjs} +36 -83
- package/dist/{chunk-UG5RKLU2.cjs → chunk-SUYBAF27.cjs} +1 -1
- package/dist/{chunk-WJMEBBU7.js → chunk-TWU7L5H7.js} +5 -48
- package/dist/{chunk-WJLECC22.cjs → chunk-UUSSWOPR.cjs} +9 -47
- package/dist/{chunk-AREQJHKA.cjs → chunk-VHKMWWBA.cjs} +428 -22
- package/dist/{chunk-FT5H2Q7Y.cjs → chunk-YAL6JSAZ.cjs} +16 -12
- package/dist/{chunk-VW356KR3.js → chunk-YMWMIWBP.js} +421 -25
- package/dist/core/addresses.d.ts +4 -4
- package/dist/core/errors.d.ts +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/pending.d.ts +57 -0
- package/dist/core/version.d.ts +1 -1
- package/dist/fhe/operators.d.ts +6 -5
- package/dist/fhe/types.d.ts +1 -1
- package/dist/fhe-airdrop/abis/airdrop-base.d.ts +97 -1
- package/dist/fhe-airdrop/abis/ecdsa.d.ts +117 -1
- package/dist/fhe-airdrop/abis/factory.d.ts +332 -1
- package/dist/fhe-airdrop/abis/merkle.d.ts +116 -1
- package/dist/fhe-airdrop/advanced/index.cjs +8 -4
- package/dist/fhe-airdrop/advanced/index.d.cts +1 -0
- package/dist/fhe-airdrop/advanced/index.d.ts +1 -0
- package/dist/fhe-airdrop/advanced/index.js +1 -1
- package/dist/fhe-airdrop/advanced/react/index.cjs +145 -137
- package/dist/fhe-airdrop/advanced/react/index.d.cts +1 -0
- package/dist/fhe-airdrop/advanced/react/index.d.ts +1 -0
- package/dist/fhe-airdrop/advanced/react/index.js +85 -78
- package/dist/fhe-airdrop/advanced/react/useClearCompliancePolicy.d.ts +3 -1
- package/dist/fhe-airdrop/advanced/react/useDisableCustomFee.d.ts +4 -1
- package/dist/fhe-airdrop/advanced/react/useFactoryComplianceDelegate.d.ts +2 -4
- package/dist/fhe-airdrop/advanced/react/useFactoryRenounceRole.d.ts +4 -3
- package/dist/fhe-airdrop/advanced/react/useFactoryRevokeRole.d.ts +9 -7
- package/dist/fhe-airdrop/advanced/react/useFactoryRoleMembers.d.ts +6 -5
- package/dist/fhe-airdrop/advanced/react/useSetComplianceDelegate.d.ts +7 -7
- package/dist/fhe-airdrop/advanced/react/useSetComplianceManagerImpl.d.ts +3 -1
- package/dist/fhe-airdrop/advanced/react/useSetCompliancePolicy.d.ts +2 -1
- package/dist/fhe-airdrop/advanced/react/useSetCustomFee.d.ts +4 -1
- package/dist/fhe-airdrop/advanced/react/useSetDefaultDelegateToCompliance.d.ts +5 -4
- package/dist/fhe-airdrop/advanced/react/useSetDefaultGasFee.d.ts +7 -3
- package/dist/fhe-airdrop/advanced/react/useSetMaxGasFee.d.ts +37 -0
- package/dist/fhe-airdrop/airdrop-base.d.ts +142 -18
- package/dist/fhe-airdrop/campaign.d.ts +37 -73
- package/dist/fhe-airdrop/compliance-clone.d.ts +21 -0
- package/dist/fhe-airdrop/constants.d.ts +11 -1
- package/dist/fhe-airdrop/ecdsa.d.ts +79 -26
- package/dist/fhe-airdrop/encryption.d.ts +19 -6
- package/dist/fhe-airdrop/errors.d.ts +136 -2
- package/dist/fhe-airdrop/factory-params.d.ts +2361 -0
- package/dist/fhe-airdrop/factory.d.ts +189 -75
- package/dist/fhe-airdrop/guards.d.ts +183 -19
- package/dist/fhe-airdrop/index.cjs +88 -56
- package/dist/fhe-airdrop/index.d.cts +12 -10
- package/dist/fhe-airdrop/index.d.ts +12 -10
- package/dist/fhe-airdrop/index.js +5 -5
- package/dist/fhe-airdrop/merkle-tree.d.ts +9 -9
- package/dist/fhe-airdrop/merkle.d.ts +32 -11
- package/dist/fhe-airdrop/react/_shared.d.ts +12 -6
- package/dist/fhe-airdrop/react/index.cjs +336 -240
- package/dist/fhe-airdrop/react/index.d.cts +19 -9
- package/dist/fhe-airdrop/react/index.d.ts +19 -9
- package/dist/fhe-airdrop/react/index.js +158 -97
- package/dist/fhe-airdrop/react/keys.d.ts +54 -7
- package/dist/fhe-airdrop/react/useAccessEcdsaClaimAmount.d.ts +6 -3
- package/dist/fhe-airdrop/react/useAccessMerkleClaimAmount.d.ts +2 -2
- package/dist/fhe-airdrop/react/useAirdropConfig.d.ts +8 -3
- package/dist/fhe-airdrop/react/useAirdropPause.d.ts +5 -0
- package/dist/fhe-airdrop/react/useBuildMerkleCampaign.d.ts +4 -6
- package/dist/fhe-airdrop/react/useComplianceManager.d.ts +2 -2
- package/dist/fhe-airdrop/react/useComplianceManagerOf.d.ts +1 -2
- package/dist/fhe-airdrop/react/useCreateAndFundEcdsaAirdrop.d.ts +16 -11
- package/dist/fhe-airdrop/react/useCreateAndFundMerkleAirdrop.d.ts +23 -7
- package/dist/fhe-airdrop/react/useCreateEcdsaAirdrop.d.ts +13 -8
- package/dist/fhe-airdrop/react/useCreateMerkleAirdrop.d.ts +27 -7
- package/dist/fhe-airdrop/react/useDedupMode.d.ts +16 -0
- package/dist/fhe-airdrop/react/useDiscloseHandleToParty.d.ts +4 -3
- package/dist/fhe-airdrop/react/useEcdsaClaim.d.ts +6 -4
- package/dist/fhe-airdrop/react/useEcdsaClaimAndUnwrap.d.ts +15 -8
- package/dist/fhe-airdrop/react/useEcdsaDomain.d.ts +1 -1
- package/dist/fhe-airdrop/react/useEncryptCampaignAmounts.d.ts +5 -7
- package/dist/fhe-airdrop/react/useExtendClaimWindow.d.ts +4 -1
- package/dist/fhe-airdrop/react/useFactoryFees.d.ts +11 -4
- package/dist/fhe-airdrop/react/useFundAirdrop.d.ts +3 -4
- package/dist/fhe-airdrop/react/useGrantInstanceRoles.d.ts +2 -1
- package/dist/fhe-airdrop/react/useIsAirdrop.d.ts +44 -0
- package/dist/fhe-airdrop/react/useIsSignatureValid.d.ts +5 -4
- package/dist/fhe-airdrop/react/useMerkleClaim.d.ts +4 -1
- package/dist/fhe-airdrop/react/useMerkleClaimAndUnwrap.d.ts +14 -3
- package/dist/fhe-airdrop/react/usePlanMerkleCampaign.d.ts +18 -3
- package/dist/fhe-airdrop/react/usePreflightClaim.d.ts +1 -1
- package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +34 -13
- package/dist/fhe-airdrop/react/useRefreshComplianceBalance.d.ts +36 -0
- package/dist/fhe-airdrop/react/useRescueERC20.d.ts +3 -3
- package/dist/fhe-airdrop/react/useRescueNativeToken.d.ts +23 -0
- package/dist/fhe-airdrop/react/useResolveGasFee.d.ts +30 -0
- package/dist/fhe-airdrop/react/useRotateMerkleRoot.d.ts +5 -2
- package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +4 -0
- package/dist/fhe-airdrop/react/useTokenOf.d.ts +29 -0
- package/dist/fhe-airdrop/react/useUnwrapRequest.d.ts +25 -0
- package/dist/fhe-airdrop/react/useWithdrawConfidential.d.ts +4 -0
- package/dist/fhe-airdrop/roles.d.ts +82 -7
- package/dist/fhe-airdrop/types.d.ts +122 -14
- package/dist/fhe-disperse/errors.d.ts +3 -3
- package/dist/fhe-disperse/index.cjs +22 -22
- package/dist/fhe-disperse/index.d.cts +2 -1
- package/dist/fhe-disperse/index.d.ts +2 -1
- package/dist/fhe-disperse/index.js +3 -3
- package/dist/fhe-disperse/react/index.cjs +27 -25
- package/dist/fhe-disperse/react/index.d.cts +2 -1
- package/dist/fhe-disperse/react/index.d.ts +2 -1
- package/dist/fhe-disperse/react/index.js +8 -6
- package/dist/fhe-disperse/react/useDisperse.d.ts +6 -2
- package/dist/fhe-disperse/react/useRegister.d.ts +9 -3
- package/dist/fhe-disperse/react/useSingletonWithdrawTokenFee.d.ts +7 -2
- package/dist/fhe-disperse/react/useWithdrawTokenFee.d.ts +7 -2
- package/dist/fhe-disperse/singleton.d.ts +33 -19
- package/dist/fhe-disperse/types.d.ts +48 -8
- package/dist/fhe-vesting/advanced/index.cjs +6 -6
- package/dist/fhe-vesting/advanced/index.js +4 -4
- package/dist/fhe-vesting/advanced/react/index.cjs +9 -9
- package/dist/fhe-vesting/advanced/react/index.js +6 -6
- package/dist/fhe-vesting/factory.d.ts +31 -8
- package/dist/fhe-vesting/index.cjs +23 -23
- package/dist/fhe-vesting/index.d.cts +3 -2
- package/dist/fhe-vesting/index.d.ts +3 -2
- package/dist/fhe-vesting/index.js +4 -4
- package/dist/fhe-vesting/manager.d.ts +27 -2
- package/dist/fhe-vesting/react/index.cjs +126 -126
- package/dist/fhe-vesting/react/index.d.cts +3 -2
- package/dist/fhe-vesting/react/index.d.ts +3 -2
- package/dist/fhe-vesting/react/index.js +5 -5
- package/dist/fhe-vesting/react/useCreateManager.d.ts +16 -9
- package/dist/fhe-vesting/react/useCreateManagerAndGetAddress.d.ts +9 -5
- package/dist/fhe-vesting/react/useSplitVesting.d.ts +9 -3
- package/dist/index.cjs +18 -18
- package/dist/index.js +1 -1
- package/dist/testnet-faucet/faucet.d.ts +3 -0
- package/dist/testnet-faucet/index.cjs +15 -15
- package/dist/testnet-faucet/index.js +3 -3
- package/dist/testnet-faucet/react/index.cjs +9 -9
- package/dist/testnet-faucet/react/index.js +4 -4
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../../chunk-
|
|
5
|
-
require('../../../chunk-
|
|
3
|
+
var chunkQHDMPT7I_cjs = require('../../../chunk-QHDMPT7I.cjs');
|
|
4
|
+
require('../../../chunk-E4IV4M4E.cjs');
|
|
5
|
+
require('../../../chunk-VHKMWWBA.cjs');
|
|
6
6
|
require('../../../chunk-FAXIIH5R.cjs');
|
|
7
|
-
require('../../../chunk-
|
|
7
|
+
require('../../../chunk-SUYBAF27.cjs');
|
|
8
8
|
require('../../../chunk-MVDQMV25.cjs');
|
|
9
|
-
require('../../../chunk-
|
|
9
|
+
require('../../../chunk-YAL6JSAZ.cjs');
|
|
10
10
|
require('../../../chunk-JK4XMMKM.cjs');
|
|
11
11
|
require('../../../chunk-66IHPTOK.cjs');
|
|
12
12
|
var chunk67OV5CX2_cjs = require('../../../chunk-67OV5CX2.cjs');
|
|
@@ -15,36 +15,36 @@ var reactQuery = require('@tanstack/react-query');
|
|
|
15
15
|
|
|
16
16
|
function usePredictEcdsaAirdropAddress(args) {
|
|
17
17
|
const { params, mode, deployer, userSalt, ...base } = args;
|
|
18
|
-
const { client, chainId, resolvedAddress } =
|
|
18
|
+
const { client, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(base);
|
|
19
19
|
return reactQuery.useQuery({
|
|
20
20
|
...args.query,
|
|
21
|
-
queryKey:
|
|
22
|
-
chainId,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.predictEcdsaAddress(
|
|
22
|
+
{ chainId, address: resolvedAddress },
|
|
23
|
+
mode,
|
|
24
|
+
deployer,
|
|
25
|
+
userSalt
|
|
26
|
+
),
|
|
27
27
|
queryFn: () => client.predictEcdsaAirdropAddress({ params, mode, deployer, userSalt }),
|
|
28
28
|
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
function usePredictMerkleAirdropAddress(args) {
|
|
32
32
|
const { params, mode, deployer, userSalt, ...base } = args;
|
|
33
|
-
const { client, chainId, resolvedAddress } =
|
|
33
|
+
const { client, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(base);
|
|
34
34
|
return reactQuery.useQuery({
|
|
35
35
|
...args.query,
|
|
36
|
-
queryKey:
|
|
37
|
-
chainId,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.predictMerkleAddress(
|
|
37
|
+
{ chainId, address: resolvedAddress },
|
|
38
|
+
mode,
|
|
39
|
+
deployer,
|
|
40
|
+
userSalt
|
|
41
|
+
),
|
|
42
42
|
queryFn: () => client.predictMerkleAirdropAddress({ params, mode, deployer, userSalt }),
|
|
43
43
|
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
function useClearCompliancePolicy(options = {}) {
|
|
47
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
47
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
48
48
|
const queryClient = reactQuery.useQueryClient();
|
|
49
49
|
return reactQuery.useMutation({
|
|
50
50
|
mutationFn: async (args) => {
|
|
@@ -56,20 +56,17 @@ function useClearCompliancePolicy(options = {}) {
|
|
|
56
56
|
onSuccess: (_hash, variables) => {
|
|
57
57
|
const scope = { chainId, address: resolvedAddress };
|
|
58
58
|
void queryClient.invalidateQueries({
|
|
59
|
-
queryKey:
|
|
59
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.compliancePolicy(scope, variables.creator)
|
|
60
60
|
});
|
|
61
61
|
void queryClient.invalidateQueries({
|
|
62
|
-
queryKey:
|
|
63
|
-
...scope,
|
|
64
|
-
fn: "effectiveDelegateToCompliance",
|
|
65
|
-
args: [variables.creator]
|
|
66
|
-
})
|
|
62
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.effectiveDelegateToCompliance(scope, variables.creator)
|
|
67
63
|
});
|
|
64
|
+
void queryClient.invalidateQueries({ queryKey: chunkQHDMPT7I_cjs.airdropKeys.preflightCreateAll(scope) });
|
|
68
65
|
}
|
|
69
66
|
});
|
|
70
67
|
}
|
|
71
68
|
function useClearUpgradeabilityPolicy(options = {}) {
|
|
72
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
69
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
73
70
|
const queryClient = reactQuery.useQueryClient();
|
|
74
71
|
return reactQuery.useMutation({
|
|
75
72
|
mutationFn: async (args) => {
|
|
@@ -81,23 +78,19 @@ function useClearUpgradeabilityPolicy(options = {}) {
|
|
|
81
78
|
onSuccess: (_hash, variables) => {
|
|
82
79
|
const scope = { chainId, address: resolvedAddress };
|
|
83
80
|
void queryClient.invalidateQueries({
|
|
84
|
-
queryKey:
|
|
85
|
-
...scope,
|
|
86
|
-
fn: "effectiveUpgradeable",
|
|
87
|
-
args: [variables.creator]
|
|
88
|
-
})
|
|
81
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.effectiveUpgradeable(scope, variables.creator)
|
|
89
82
|
});
|
|
90
83
|
void queryClient.invalidateQueries({
|
|
91
|
-
queryKey:
|
|
84
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.upgradeabilityPolicy(scope, variables.creator)
|
|
92
85
|
});
|
|
93
86
|
void queryClient.invalidateQueries({
|
|
94
|
-
queryKey:
|
|
87
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.preflightCreateAll(scope)
|
|
95
88
|
});
|
|
96
89
|
}
|
|
97
90
|
});
|
|
98
91
|
}
|
|
99
92
|
function useDisableCustomFee(options = {}) {
|
|
100
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
93
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
101
94
|
const queryClient = reactQuery.useQueryClient();
|
|
102
95
|
return reactQuery.useMutation({
|
|
103
96
|
mutationFn: async ({ creator, account }) => {
|
|
@@ -108,14 +101,20 @@ function useDisableCustomFee(options = {}) {
|
|
|
108
101
|
},
|
|
109
102
|
onSuccess: (_hash, variables) => {
|
|
110
103
|
void queryClient.invalidateQueries({
|
|
111
|
-
queryKey:
|
|
104
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.resolvedGasFeeAll({ chainId, address: resolvedAddress })
|
|
105
|
+
});
|
|
106
|
+
void queryClient.invalidateQueries({
|
|
107
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.customFee({ chainId, address: resolvedAddress }, variables.creator)
|
|
108
|
+
});
|
|
109
|
+
void queryClient.invalidateQueries({
|
|
110
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.preflightCreateAll({ chainId, address: resolvedAddress })
|
|
112
111
|
});
|
|
113
112
|
}
|
|
114
113
|
});
|
|
115
114
|
}
|
|
116
115
|
function useEcdsaInitCodeHash(args) {
|
|
117
116
|
const { params, mode, ...base } = args;
|
|
118
|
-
const { client, chainId, resolvedAddress } =
|
|
117
|
+
const { client, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(base);
|
|
119
118
|
return reactQuery.useQuery({
|
|
120
119
|
...args.query,
|
|
121
120
|
// `params` is omitted for the same reason the predict hooks omit it: the
|
|
@@ -123,36 +122,26 @@ function useEcdsaInitCodeHash(args) {
|
|
|
123
122
|
// implementation pointer, which is what this read reports) moves the
|
|
124
123
|
// result. If a future factory version makes params hash-affecting, this
|
|
125
124
|
// key has to grow with it.
|
|
126
|
-
queryKey:
|
|
127
|
-
chainId,
|
|
128
|
-
address: resolvedAddress,
|
|
129
|
-
fn: "getEcdsaInitCodeHash",
|
|
130
|
-
args: [mode]
|
|
131
|
-
}),
|
|
125
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.ecdsaInitCodeHash({ chainId, address: resolvedAddress }, mode),
|
|
132
126
|
queryFn: () => client.getEcdsaInitCodeHash({ params, mode }),
|
|
133
127
|
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
134
128
|
});
|
|
135
129
|
}
|
|
136
130
|
function useFactoryComplianceDelegate(args = {}) {
|
|
137
|
-
const { client, chainId, resolvedAddress } =
|
|
131
|
+
const { client, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(args);
|
|
138
132
|
return reactQuery.useQuery({
|
|
139
133
|
...args.query,
|
|
140
|
-
queryKey:
|
|
141
|
-
chainId,
|
|
142
|
-
address: resolvedAddress,
|
|
143
|
-
fn: "complianceDelegate",
|
|
144
|
-
args: []
|
|
145
|
-
}),
|
|
134
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.complianceDelegate({ chainId, address: resolvedAddress }),
|
|
146
135
|
queryFn: () => client.complianceDelegate(),
|
|
147
136
|
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
148
137
|
});
|
|
149
138
|
}
|
|
150
139
|
function useFactoryCompliancePolicy(args = {}) {
|
|
151
140
|
const { creator, ...base } = args;
|
|
152
|
-
const { client, chainId, resolvedAddress } =
|
|
141
|
+
const { client, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(base);
|
|
153
142
|
return reactQuery.useQuery({
|
|
154
143
|
...args.query,
|
|
155
|
-
queryKey:
|
|
144
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.compliancePolicy({ chainId, address: resolvedAddress }, creator),
|
|
156
145
|
queryFn: async () => {
|
|
157
146
|
const [policy, effective] = await Promise.all([
|
|
158
147
|
client.getCompliancePolicy(creator),
|
|
@@ -169,16 +158,16 @@ function useFactoryCompliancePolicy(args = {}) {
|
|
|
169
158
|
}
|
|
170
159
|
function useFactoryCustomFee(args = {}) {
|
|
171
160
|
const { creator, ...base } = args;
|
|
172
|
-
const { client, chainId, resolvedAddress } =
|
|
161
|
+
const { client, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(base);
|
|
173
162
|
return reactQuery.useQuery({
|
|
174
163
|
...args.query,
|
|
175
|
-
queryKey:
|
|
164
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.customFee({ chainId, address: resolvedAddress }, creator),
|
|
176
165
|
queryFn: () => client.getCustomFee(creator),
|
|
177
166
|
enabled: Boolean(client && creator && (args.query?.enabled ?? true))
|
|
178
167
|
});
|
|
179
168
|
}
|
|
180
169
|
function useFactoryGrantRole(options = {}) {
|
|
181
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
170
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
182
171
|
const queryClient = reactQuery.useQueryClient();
|
|
183
172
|
return reactQuery.useMutation({
|
|
184
173
|
mutationFn: async (args) => {
|
|
@@ -190,29 +179,29 @@ function useFactoryGrantRole(options = {}) {
|
|
|
190
179
|
onSuccess: (_hash, variables) => {
|
|
191
180
|
const scope = { chainId, address: resolvedAddress };
|
|
192
181
|
void queryClient.invalidateQueries({
|
|
193
|
-
queryKey:
|
|
182
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.factoryHasRole(scope, variables.role, variables.holder)
|
|
194
183
|
});
|
|
195
184
|
void queryClient.invalidateQueries({
|
|
196
|
-
queryKey:
|
|
185
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.factoryRoleMembers(scope, variables.role)
|
|
197
186
|
});
|
|
198
187
|
}
|
|
199
188
|
});
|
|
200
189
|
}
|
|
201
190
|
function useFactoryHasRole(args = {}) {
|
|
202
191
|
const { role, holder, ...base } = args;
|
|
203
|
-
const { client, chainId, resolvedAddress } =
|
|
192
|
+
const { client, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(base);
|
|
204
193
|
return reactQuery.useQuery({
|
|
205
194
|
...args.query,
|
|
206
|
-
queryKey:
|
|
195
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.factoryHasRole({ chainId, address: resolvedAddress }, role, holder),
|
|
207
196
|
queryFn: () => client.hasRole({ role, holder }),
|
|
208
197
|
enabled: Boolean(client && role && holder && (args.query?.enabled ?? true))
|
|
209
198
|
});
|
|
210
199
|
}
|
|
211
200
|
function useFactoryImplementations(args = {}) {
|
|
212
|
-
const { client, chainId, resolvedAddress } =
|
|
201
|
+
const { client, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(args);
|
|
213
202
|
return reactQuery.useQuery({
|
|
214
203
|
...args.query,
|
|
215
|
-
queryKey:
|
|
204
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.implementations({ chainId, address: resolvedAddress }),
|
|
216
205
|
queryFn: async () => {
|
|
217
206
|
const [ecdsa, merkle, complianceManager] = await Promise.all([
|
|
218
207
|
client.ecdsaImplementation(),
|
|
@@ -225,7 +214,7 @@ function useFactoryImplementations(args = {}) {
|
|
|
225
214
|
});
|
|
226
215
|
}
|
|
227
216
|
function useFactoryRenounceRole(options = {}) {
|
|
228
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
217
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
229
218
|
const queryClient = reactQuery.useQueryClient();
|
|
230
219
|
return reactQuery.useMutation({
|
|
231
220
|
mutationFn: async (args) => {
|
|
@@ -236,15 +225,15 @@ function useFactoryRenounceRole(options = {}) {
|
|
|
236
225
|
},
|
|
237
226
|
onSuccess: (_hash, variables) => {
|
|
238
227
|
const scope = { chainId, address: resolvedAddress };
|
|
239
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
228
|
+
void queryClient.invalidateQueries({ queryKey: chunkQHDMPT7I_cjs.airdropKeys.factoryHasRoleAll(scope) });
|
|
240
229
|
void queryClient.invalidateQueries({
|
|
241
|
-
queryKey:
|
|
230
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.factoryRoleMembers(scope, variables.role)
|
|
242
231
|
});
|
|
243
232
|
}
|
|
244
233
|
});
|
|
245
234
|
}
|
|
246
235
|
function useFactoryRevokeRole(options = {}) {
|
|
247
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
236
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
248
237
|
const queryClient = reactQuery.useQueryClient();
|
|
249
238
|
return reactQuery.useMutation({
|
|
250
239
|
mutationFn: async (args) => {
|
|
@@ -256,22 +245,22 @@ function useFactoryRevokeRole(options = {}) {
|
|
|
256
245
|
onSuccess: (_hash, variables) => {
|
|
257
246
|
const scope = { chainId, address: resolvedAddress };
|
|
258
247
|
void queryClient.invalidateQueries({
|
|
259
|
-
queryKey:
|
|
248
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.factoryHasRole(scope, variables.role, variables.holder)
|
|
260
249
|
});
|
|
261
250
|
void queryClient.invalidateQueries({
|
|
262
|
-
queryKey:
|
|
251
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.factoryRoleMembers(scope, variables.role)
|
|
263
252
|
});
|
|
264
253
|
}
|
|
265
254
|
});
|
|
266
255
|
}
|
|
267
256
|
function useFactoryRoleConstants(args = {}) {
|
|
268
|
-
const { client, chainId, resolvedAddress } =
|
|
257
|
+
const { client, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(args);
|
|
269
258
|
return reactQuery.useQuery({
|
|
270
259
|
// A default, not a lock: `query.staleTime` still wins if a consumer wants refetching.
|
|
271
260
|
staleTime: Infinity,
|
|
272
261
|
...args.query,
|
|
273
262
|
// `fn` label is unique to this hook, so it stays inline rather than in keys.ts.
|
|
274
|
-
queryKey:
|
|
263
|
+
queryKey: chunkQHDMPT7I_cjs.airdropQueryKey({
|
|
275
264
|
chainId,
|
|
276
265
|
address: resolvedAddress,
|
|
277
266
|
fn: "factoryRoleConstants",
|
|
@@ -304,10 +293,10 @@ function useFactoryRoleConstants(args = {}) {
|
|
|
304
293
|
}
|
|
305
294
|
function useFactoryRoleMembers(args = {}) {
|
|
306
295
|
const { role, ...base } = args;
|
|
307
|
-
const { client, chainId, resolvedAddress } =
|
|
296
|
+
const { client, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(base);
|
|
308
297
|
return reactQuery.useQuery({
|
|
309
298
|
...args.query,
|
|
310
|
-
queryKey:
|
|
299
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.factoryRoleMembers({ chainId, address: resolvedAddress }, role),
|
|
311
300
|
queryFn: async () => {
|
|
312
301
|
const [members, count] = await Promise.all([
|
|
313
302
|
client.getRoleMembers(role),
|
|
@@ -320,10 +309,10 @@ function useFactoryRoleMembers(args = {}) {
|
|
|
320
309
|
}
|
|
321
310
|
function useFactoryUpgradeabilityPolicy(args = {}) {
|
|
322
311
|
const { creator, ...base } = args;
|
|
323
|
-
const { client, chainId, resolvedAddress } =
|
|
312
|
+
const { client, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(base);
|
|
324
313
|
return reactQuery.useQuery({
|
|
325
314
|
...args.query,
|
|
326
|
-
queryKey:
|
|
315
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.upgradeabilityPolicy({ chainId, address: resolvedAddress }, creator),
|
|
327
316
|
queryFn: async () => {
|
|
328
317
|
const [defaultUpgradeable, policy, effective] = await Promise.all([
|
|
329
318
|
client.defaultUpgradeable(),
|
|
@@ -342,22 +331,17 @@ function useFactoryUpgradeabilityPolicy(args = {}) {
|
|
|
342
331
|
}
|
|
343
332
|
function useMerkleInitCodeHash(args) {
|
|
344
333
|
const { params, mode, ...base } = args;
|
|
345
|
-
const { client, chainId, resolvedAddress } =
|
|
334
|
+
const { client, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(base);
|
|
346
335
|
return reactQuery.useQuery({
|
|
347
336
|
...args.query,
|
|
348
337
|
// `params` omitted deliberately — see useEcdsaInitCodeHash for why.
|
|
349
|
-
queryKey:
|
|
350
|
-
chainId,
|
|
351
|
-
address: resolvedAddress,
|
|
352
|
-
fn: "getMerkleInitCodeHash",
|
|
353
|
-
args: [mode]
|
|
354
|
-
}),
|
|
338
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.merkleInitCodeHash({ chainId, address: resolvedAddress }, mode),
|
|
355
339
|
queryFn: () => client.getMerkleInitCodeHash({ params, mode }),
|
|
356
340
|
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
357
341
|
});
|
|
358
342
|
}
|
|
359
343
|
function useSetComplianceDelegate(options = {}) {
|
|
360
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
344
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
361
345
|
const queryClient = reactQuery.useQueryClient();
|
|
362
346
|
return reactQuery.useMutation({
|
|
363
347
|
mutationFn: async (args) => {
|
|
@@ -368,18 +352,16 @@ function useSetComplianceDelegate(options = {}) {
|
|
|
368
352
|
},
|
|
369
353
|
onSuccess: () => {
|
|
370
354
|
void queryClient.invalidateQueries({
|
|
371
|
-
queryKey:
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
args: []
|
|
376
|
-
})
|
|
355
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.complianceDelegate({ chainId, address: resolvedAddress })
|
|
356
|
+
});
|
|
357
|
+
void queryClient.invalidateQueries({
|
|
358
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.preflightCreateAll({ chainId, address: resolvedAddress })
|
|
377
359
|
});
|
|
378
360
|
}
|
|
379
361
|
});
|
|
380
362
|
}
|
|
381
363
|
function useSetComplianceManagerImpl(options = {}) {
|
|
382
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
364
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
383
365
|
const queryClient = reactQuery.useQueryClient();
|
|
384
366
|
return reactQuery.useMutation({
|
|
385
367
|
mutationFn: async (args) => {
|
|
@@ -390,13 +372,16 @@ function useSetComplianceManagerImpl(options = {}) {
|
|
|
390
372
|
},
|
|
391
373
|
onSuccess: () => {
|
|
392
374
|
void queryClient.invalidateQueries({
|
|
393
|
-
queryKey:
|
|
375
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.implementations({ chainId, address: resolvedAddress })
|
|
376
|
+
});
|
|
377
|
+
void queryClient.invalidateQueries({
|
|
378
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.preflightCreateAll({ chainId, address: resolvedAddress })
|
|
394
379
|
});
|
|
395
380
|
}
|
|
396
381
|
});
|
|
397
382
|
}
|
|
398
383
|
function useSetCompliancePolicy(options = {}) {
|
|
399
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
384
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
400
385
|
const queryClient = reactQuery.useQueryClient();
|
|
401
386
|
return reactQuery.useMutation({
|
|
402
387
|
mutationFn: async (args) => {
|
|
@@ -408,20 +393,17 @@ function useSetCompliancePolicy(options = {}) {
|
|
|
408
393
|
onSuccess: (_hash, variables) => {
|
|
409
394
|
const scope = { chainId, address: resolvedAddress };
|
|
410
395
|
void queryClient.invalidateQueries({
|
|
411
|
-
queryKey:
|
|
396
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.compliancePolicy(scope, variables.creator)
|
|
412
397
|
});
|
|
413
398
|
void queryClient.invalidateQueries({
|
|
414
|
-
queryKey:
|
|
415
|
-
...scope,
|
|
416
|
-
fn: "effectiveDelegateToCompliance",
|
|
417
|
-
args: [variables.creator]
|
|
418
|
-
})
|
|
399
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.effectiveDelegateToCompliance(scope, variables.creator)
|
|
419
400
|
});
|
|
401
|
+
void queryClient.invalidateQueries({ queryKey: chunkQHDMPT7I_cjs.airdropKeys.preflightCreateAll(scope) });
|
|
420
402
|
}
|
|
421
403
|
});
|
|
422
404
|
}
|
|
423
405
|
function useSetCustomFee(options = {}) {
|
|
424
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
406
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
425
407
|
const queryClient = reactQuery.useQueryClient();
|
|
426
408
|
return reactQuery.useMutation({
|
|
427
409
|
mutationFn: async ({ creator, gasFee, account }) => {
|
|
@@ -432,13 +414,19 @@ function useSetCustomFee(options = {}) {
|
|
|
432
414
|
},
|
|
433
415
|
onSuccess: (_hash, variables) => {
|
|
434
416
|
void queryClient.invalidateQueries({
|
|
435
|
-
queryKey:
|
|
417
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.resolvedGasFeeAll({ chainId, address: resolvedAddress })
|
|
418
|
+
});
|
|
419
|
+
void queryClient.invalidateQueries({
|
|
420
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.customFee({ chainId, address: resolvedAddress }, variables.creator)
|
|
421
|
+
});
|
|
422
|
+
void queryClient.invalidateQueries({
|
|
423
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.preflightCreateAll({ chainId, address: resolvedAddress })
|
|
436
424
|
});
|
|
437
425
|
}
|
|
438
426
|
});
|
|
439
427
|
}
|
|
440
428
|
function useSetDefaultDelegateToCompliance(options = {}) {
|
|
441
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
429
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
442
430
|
const queryClient = reactQuery.useQueryClient();
|
|
443
431
|
return reactQuery.useMutation({
|
|
444
432
|
mutationFn: async (args) => {
|
|
@@ -449,20 +437,22 @@ function useSetDefaultDelegateToCompliance(options = {}) {
|
|
|
449
437
|
},
|
|
450
438
|
onSuccess: () => {
|
|
451
439
|
void queryClient.invalidateQueries({
|
|
452
|
-
queryKey:
|
|
440
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.effectiveDelegateToComplianceAll({
|
|
453
441
|
chainId,
|
|
454
|
-
address: resolvedAddress
|
|
455
|
-
fn: "effectiveDelegateToCompliance"
|
|
442
|
+
address: resolvedAddress
|
|
456
443
|
})
|
|
457
444
|
});
|
|
458
445
|
void queryClient.invalidateQueries({
|
|
459
|
-
queryKey:
|
|
446
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.compliancePolicyAll({ chainId, address: resolvedAddress })
|
|
447
|
+
});
|
|
448
|
+
void queryClient.invalidateQueries({
|
|
449
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.preflightCreateAll({ chainId, address: resolvedAddress })
|
|
460
450
|
});
|
|
461
451
|
}
|
|
462
452
|
});
|
|
463
453
|
}
|
|
464
454
|
function useSetDefaultGasFee(options = {}) {
|
|
465
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
455
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
466
456
|
const queryClient = reactQuery.useQueryClient();
|
|
467
457
|
return reactQuery.useMutation({
|
|
468
458
|
mutationFn: async ({ gasFee, account }) => {
|
|
@@ -473,13 +463,42 @@ function useSetDefaultGasFee(options = {}) {
|
|
|
473
463
|
},
|
|
474
464
|
onSuccess: () => {
|
|
475
465
|
void queryClient.invalidateQueries({
|
|
476
|
-
queryKey:
|
|
466
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.resolvedGasFeeAll({ chainId, address: resolvedAddress })
|
|
467
|
+
});
|
|
468
|
+
void queryClient.invalidateQueries({
|
|
469
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.fees({ chainId, address: resolvedAddress })
|
|
470
|
+
});
|
|
471
|
+
void queryClient.invalidateQueries({
|
|
472
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.preflightCreateAll({ chainId, address: resolvedAddress })
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
function useSetMaxGasFee(options = {}) {
|
|
478
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
479
|
+
const queryClient = reactQuery.useQueryClient();
|
|
480
|
+
return reactQuery.useMutation({
|
|
481
|
+
mutationFn: async ({ maxGasFee, account }) => {
|
|
482
|
+
if (!client) {
|
|
483
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetMaxGasFee", "factory");
|
|
484
|
+
}
|
|
485
|
+
return client.setMaxGasFee(maxGasFee, account);
|
|
486
|
+
},
|
|
487
|
+
onSuccess: () => {
|
|
488
|
+
void queryClient.invalidateQueries({
|
|
489
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.fees({ chainId, address: resolvedAddress })
|
|
490
|
+
});
|
|
491
|
+
void queryClient.invalidateQueries({
|
|
492
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.resolvedGasFeeAll({ chainId, address: resolvedAddress })
|
|
493
|
+
});
|
|
494
|
+
void queryClient.invalidateQueries({
|
|
495
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.preflightCreateAll({ chainId, address: resolvedAddress })
|
|
477
496
|
});
|
|
478
497
|
}
|
|
479
498
|
});
|
|
480
499
|
}
|
|
481
500
|
function useSetDefaultUpgradeable(options = {}) {
|
|
482
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
501
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
483
502
|
const queryClient = reactQuery.useQueryClient();
|
|
484
503
|
return reactQuery.useMutation({
|
|
485
504
|
mutationFn: async (args) => {
|
|
@@ -491,19 +510,19 @@ function useSetDefaultUpgradeable(options = {}) {
|
|
|
491
510
|
onSuccess: () => {
|
|
492
511
|
const scope = { chainId, address: resolvedAddress };
|
|
493
512
|
void queryClient.invalidateQueries({
|
|
494
|
-
queryKey:
|
|
513
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.effectiveUpgradeableAll(scope)
|
|
495
514
|
});
|
|
496
515
|
void queryClient.invalidateQueries({
|
|
497
|
-
queryKey:
|
|
516
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.upgradeabilityPolicyAll(scope)
|
|
498
517
|
});
|
|
499
518
|
void queryClient.invalidateQueries({
|
|
500
|
-
queryKey:
|
|
519
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.preflightCreateAll(scope)
|
|
501
520
|
});
|
|
502
521
|
}
|
|
503
522
|
});
|
|
504
523
|
}
|
|
505
524
|
function useSetEcdsaImplementation(options = {}) {
|
|
506
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
525
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
507
526
|
const queryClient = reactQuery.useQueryClient();
|
|
508
527
|
return reactQuery.useMutation({
|
|
509
528
|
mutationFn: async ({ implementation, account }) => {
|
|
@@ -514,21 +533,17 @@ function useSetEcdsaImplementation(options = {}) {
|
|
|
514
533
|
},
|
|
515
534
|
onSuccess: () => {
|
|
516
535
|
const scope = { chainId, address: resolvedAddress };
|
|
517
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
518
|
-
void queryClient.invalidateQueries({
|
|
519
|
-
|
|
520
|
-
});
|
|
536
|
+
void queryClient.invalidateQueries({ queryKey: chunkQHDMPT7I_cjs.airdropKeys.implementations(scope) });
|
|
537
|
+
void queryClient.invalidateQueries({ queryKey: chunkQHDMPT7I_cjs.airdropKeys.ecdsaInitCodeHashAll(scope) });
|
|
538
|
+
void queryClient.invalidateQueries({ queryKey: chunkQHDMPT7I_cjs.airdropKeys.predictEcdsaAddressAll(scope) });
|
|
521
539
|
void queryClient.invalidateQueries({
|
|
522
|
-
queryKey:
|
|
523
|
-
});
|
|
524
|
-
void queryClient.invalidateQueries({
|
|
525
|
-
queryKey: chunkEBLBPUPI_cjs.airdropKeys.preflightCreateAll(scope)
|
|
540
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.preflightCreateAll(scope)
|
|
526
541
|
});
|
|
527
542
|
}
|
|
528
543
|
});
|
|
529
544
|
}
|
|
530
545
|
function useSetFeeCollector(options = {}) {
|
|
531
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
546
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
532
547
|
const queryClient = reactQuery.useQueryClient();
|
|
533
548
|
return reactQuery.useMutation({
|
|
534
549
|
mutationFn: async ({ feeCollector, account }) => {
|
|
@@ -539,13 +554,13 @@ function useSetFeeCollector(options = {}) {
|
|
|
539
554
|
},
|
|
540
555
|
onSuccess: () => {
|
|
541
556
|
void queryClient.invalidateQueries({
|
|
542
|
-
queryKey:
|
|
557
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.fees({ chainId, address: resolvedAddress })
|
|
543
558
|
});
|
|
544
559
|
}
|
|
545
560
|
});
|
|
546
561
|
}
|
|
547
562
|
function useSetMerkleImplementation(options = {}) {
|
|
548
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
563
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
549
564
|
const queryClient = reactQuery.useQueryClient();
|
|
550
565
|
return reactQuery.useMutation({
|
|
551
566
|
mutationFn: async ({ implementation, account }) => {
|
|
@@ -556,21 +571,17 @@ function useSetMerkleImplementation(options = {}) {
|
|
|
556
571
|
},
|
|
557
572
|
onSuccess: () => {
|
|
558
573
|
const scope = { chainId, address: resolvedAddress };
|
|
559
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
560
|
-
void queryClient.invalidateQueries({
|
|
561
|
-
|
|
562
|
-
});
|
|
574
|
+
void queryClient.invalidateQueries({ queryKey: chunkQHDMPT7I_cjs.airdropKeys.implementations(scope) });
|
|
575
|
+
void queryClient.invalidateQueries({ queryKey: chunkQHDMPT7I_cjs.airdropKeys.merkleInitCodeHashAll(scope) });
|
|
576
|
+
void queryClient.invalidateQueries({ queryKey: chunkQHDMPT7I_cjs.airdropKeys.predictMerkleAddressAll(scope) });
|
|
563
577
|
void queryClient.invalidateQueries({
|
|
564
|
-
queryKey:
|
|
565
|
-
});
|
|
566
|
-
void queryClient.invalidateQueries({
|
|
567
|
-
queryKey: chunkEBLBPUPI_cjs.airdropKeys.preflightCreateAll(scope)
|
|
578
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.preflightCreateAll(scope)
|
|
568
579
|
});
|
|
569
580
|
}
|
|
570
581
|
});
|
|
571
582
|
}
|
|
572
583
|
function useSetUpgradeabilityPolicy(options = {}) {
|
|
573
|
-
const { client, resolutionError, chainId, resolvedAddress } =
|
|
584
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkQHDMPT7I_cjs.useMemoAirdropFactoryClient(options);
|
|
574
585
|
const queryClient = reactQuery.useQueryClient();
|
|
575
586
|
return reactQuery.useMutation({
|
|
576
587
|
mutationFn: async (args) => {
|
|
@@ -582,17 +593,13 @@ function useSetUpgradeabilityPolicy(options = {}) {
|
|
|
582
593
|
onSuccess: (_hash, variables) => {
|
|
583
594
|
const scope = { chainId, address: resolvedAddress };
|
|
584
595
|
void queryClient.invalidateQueries({
|
|
585
|
-
queryKey:
|
|
586
|
-
...scope,
|
|
587
|
-
fn: "effectiveUpgradeable",
|
|
588
|
-
args: [variables.creator]
|
|
589
|
-
})
|
|
596
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.effectiveUpgradeable(scope, variables.creator)
|
|
590
597
|
});
|
|
591
598
|
void queryClient.invalidateQueries({
|
|
592
|
-
queryKey:
|
|
599
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.upgradeabilityPolicy(scope, variables.creator)
|
|
593
600
|
});
|
|
594
601
|
void queryClient.invalidateQueries({
|
|
595
|
-
queryKey:
|
|
602
|
+
queryKey: chunkQHDMPT7I_cjs.airdropKeys.preflightCreateAll(scope)
|
|
596
603
|
});
|
|
597
604
|
}
|
|
598
605
|
});
|
|
@@ -625,5 +632,6 @@ exports.useSetDefaultGasFee = useSetDefaultGasFee;
|
|
|
625
632
|
exports.useSetDefaultUpgradeable = useSetDefaultUpgradeable;
|
|
626
633
|
exports.useSetEcdsaImplementation = useSetEcdsaImplementation;
|
|
627
634
|
exports.useSetFeeCollector = useSetFeeCollector;
|
|
635
|
+
exports.useSetMaxGasFee = useSetMaxGasFee;
|
|
628
636
|
exports.useSetMerkleImplementation = useSetMerkleImplementation;
|
|
629
637
|
exports.useSetUpgradeabilityPolicy = useSetUpgradeabilityPolicy;
|
|
@@ -31,6 +31,7 @@ export { useSetCompliancePolicy, type SetCompliancePolicyArgs } from "./useSetCo
|
|
|
31
31
|
export { useSetCustomFee, type SetCustomFeeArgs } from "./useSetCustomFee.js";
|
|
32
32
|
export { useSetDefaultDelegateToCompliance, type SetDefaultDelegateToComplianceArgs, } from "./useSetDefaultDelegateToCompliance.js";
|
|
33
33
|
export { useSetDefaultGasFee, type SetDefaultGasFeeArgs } from "./useSetDefaultGasFee.js";
|
|
34
|
+
export { useSetMaxGasFee, type SetMaxGasFeeArgs } from "./useSetMaxGasFee.js";
|
|
34
35
|
export { useSetDefaultUpgradeable, type SetDefaultUpgradeableArgs, } from "./useSetDefaultUpgradeable.js";
|
|
35
36
|
export { useSetEcdsaImplementation, type SetEcdsaImplementationArgs, } from "./useSetEcdsaImplementation.js";
|
|
36
37
|
export { useSetFeeCollector, type SetFeeCollectorArgs } from "./useSetFeeCollector.js";
|
|
@@ -31,6 +31,7 @@ export { useSetCompliancePolicy, type SetCompliancePolicyArgs } from "./useSetCo
|
|
|
31
31
|
export { useSetCustomFee, type SetCustomFeeArgs } from "./useSetCustomFee.js";
|
|
32
32
|
export { useSetDefaultDelegateToCompliance, type SetDefaultDelegateToComplianceArgs, } from "./useSetDefaultDelegateToCompliance.js";
|
|
33
33
|
export { useSetDefaultGasFee, type SetDefaultGasFeeArgs } from "./useSetDefaultGasFee.js";
|
|
34
|
+
export { useSetMaxGasFee, type SetMaxGasFeeArgs } from "./useSetMaxGasFee.js";
|
|
34
35
|
export { useSetDefaultUpgradeable, type SetDefaultUpgradeableArgs, } from "./useSetDefaultUpgradeable.js";
|
|
35
36
|
export { useSetEcdsaImplementation, type SetEcdsaImplementationArgs, } from "./useSetEcdsaImplementation.js";
|
|
36
37
|
export { useSetFeeCollector, type SetFeeCollectorArgs } from "./useSetFeeCollector.js";
|