anymal-protocol 1.0.149 → 1.0.151
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/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +110 -75
- package/dist/index.mjs +94 -60
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -443,6 +443,12 @@ declare function useCoinbaseMintOrgAnymalNFT(): (evmAddress: `0x${string}`, pid:
|
|
|
443
443
|
status: string;
|
|
444
444
|
}>;
|
|
445
445
|
|
|
446
|
+
declare function useCoinbaseClaimOrgActionReward(): (evmSmartAddress: `0x${string}`, orgContractAddress: `0x${string}`, rewardableActionContractAddress: string, actionId: string, claimIndex: number) => Promise<{
|
|
447
|
+
success: boolean;
|
|
448
|
+
message: string;
|
|
449
|
+
status: string;
|
|
450
|
+
}>;
|
|
451
|
+
|
|
446
452
|
declare function useMintAnymalNFT(): (pid: string, nftId: string, anymalTxId: string, dbAuthToken: string, validationContractAddress: string, smartAccount: any, bundlerClient: any) => Promise<{
|
|
447
453
|
success: boolean;
|
|
448
454
|
message: string;
|
|
@@ -879,4 +885,4 @@ declare function useSubmitContractAction(): (idToken: string, pid: string, sourc
|
|
|
879
885
|
*/
|
|
880
886
|
declare function humanRevert(raw: `0x${string}` | undefined, shortMessage?: string): string;
|
|
881
887
|
|
|
882
|
-
export { AUTH_API_ENDPOINTS, type ActionDefinition, type ActionPayload, type ActionRecord, type ActionReferral, ActionSourceType, ActionStatus, ActionType, type AnymalNftMetadataInputData, type AuthEnvelope, type ContractActionPayload, type CreateAnymalInputData, ERROR_ABI, type ExternalActionPayload, FIREBASE_WEB_API_KEYS, FIREBASE_WEB_AUTH_API_ENDPOINTS, type GraphQLActionPayload, type JWTOptions, KIBBLE_TOKEN_ABI, MARKETPLACE_ABI, type MarketplaceActionPayload, MarketplacePaymentType, NETWORK_HOSTS, Network, type NotificationData, type NotificationEventData, ORGANIZATION_BEACON_ABI, ORGANIZATION_IMPL_ABI, ORG_FUNCTION, PET_NFT_ABI, REWARDABLE_ACTIONS_ABI, type SubmitResponse, type WishlistPurchaseActionPayload, convertToActionDefinition, convertToActionRecord, convertToMultipleActionDefinitions, convertToMultipleActionRecords, createApp, createAuthEnvelope, flattenFirestoreData, generateAppSignature, generateBytes32Nonce, generateJWT, getFirebaseTokenForApp, humanRevert, loadExistingSecp256k1PrivateKey, processDirectKibbleApproval, processDirectPartialPayment, processOrgKibbleApproval, processOrgPartialPayment, sendUserOpWithRetries, serializePublicKeyCompressed, submitAction, useApproveKibbleToken, useApproveOrgPartialPayment, useClaimActionReward, useClaimOrgActionReward, useCoinbaseClaimActionReward, useCoinbaseCreateOrganizationWallet, useCoinbaseMintAnymalNFT, useCoinbaseMintOrgAnymalNFT, useCreateOrganizationAppData, useCreateOrganizationBase, useCreateUserAppData, useCreateWeb3Account, useFetchActionDefinitions, useFetchActions, useFetchBalance, useFetchNotifications, useFetchUserData, useMintAnymalNFT, useMintOrgAnymalNFT, useProcessOrgPartialKibblePayment, useProcessPartialKibblePayment, useSaveAnymalMetadata, useSendCoinbaseUserOperation, useSubmitContractAction, useUpdateOrgWalletAddress, useUpdateUserAsVerified, useUpdateUserEmail, useUpdateUserName, useUpdateUserPid, useUploadAnymalImage, useVerifyAccount, useVerifyWeb3AuthSession, waitForAllowance, waitForReceiptWithRetries };
|
|
888
|
+
export { AUTH_API_ENDPOINTS, type ActionDefinition, type ActionPayload, type ActionRecord, type ActionReferral, ActionSourceType, ActionStatus, ActionType, type AnymalNftMetadataInputData, type AuthEnvelope, type ContractActionPayload, type CreateAnymalInputData, ERROR_ABI, type ExternalActionPayload, FIREBASE_WEB_API_KEYS, FIREBASE_WEB_AUTH_API_ENDPOINTS, type GraphQLActionPayload, type JWTOptions, KIBBLE_TOKEN_ABI, MARKETPLACE_ABI, type MarketplaceActionPayload, MarketplacePaymentType, NETWORK_HOSTS, Network, type NotificationData, type NotificationEventData, ORGANIZATION_BEACON_ABI, ORGANIZATION_IMPL_ABI, ORG_FUNCTION, PET_NFT_ABI, REWARDABLE_ACTIONS_ABI, type SubmitResponse, type WishlistPurchaseActionPayload, convertToActionDefinition, convertToActionRecord, convertToMultipleActionDefinitions, convertToMultipleActionRecords, createApp, createAuthEnvelope, flattenFirestoreData, generateAppSignature, generateBytes32Nonce, generateJWT, getFirebaseTokenForApp, humanRevert, loadExistingSecp256k1PrivateKey, processDirectKibbleApproval, processDirectPartialPayment, processOrgKibbleApproval, processOrgPartialPayment, sendUserOpWithRetries, serializePublicKeyCompressed, submitAction, useApproveKibbleToken, useApproveOrgPartialPayment, useClaimActionReward, useClaimOrgActionReward, useCoinbaseClaimActionReward, useCoinbaseClaimOrgActionReward, useCoinbaseCreateOrganizationWallet, useCoinbaseMintAnymalNFT, useCoinbaseMintOrgAnymalNFT, useCreateOrganizationAppData, useCreateOrganizationBase, useCreateUserAppData, useCreateWeb3Account, useFetchActionDefinitions, useFetchActions, useFetchBalance, useFetchNotifications, useFetchUserData, useMintAnymalNFT, useMintOrgAnymalNFT, useProcessOrgPartialKibblePayment, useProcessPartialKibblePayment, useSaveAnymalMetadata, useSendCoinbaseUserOperation, useSubmitContractAction, useUpdateOrgWalletAddress, useUpdateUserAsVerified, useUpdateUserEmail, useUpdateUserName, useUpdateUserPid, useUploadAnymalImage, useVerifyAccount, useVerifyWeb3AuthSession, waitForAllowance, waitForReceiptWithRetries };
|
package/dist/index.d.ts
CHANGED
|
@@ -443,6 +443,12 @@ declare function useCoinbaseMintOrgAnymalNFT(): (evmAddress: `0x${string}`, pid:
|
|
|
443
443
|
status: string;
|
|
444
444
|
}>;
|
|
445
445
|
|
|
446
|
+
declare function useCoinbaseClaimOrgActionReward(): (evmSmartAddress: `0x${string}`, orgContractAddress: `0x${string}`, rewardableActionContractAddress: string, actionId: string, claimIndex: number) => Promise<{
|
|
447
|
+
success: boolean;
|
|
448
|
+
message: string;
|
|
449
|
+
status: string;
|
|
450
|
+
}>;
|
|
451
|
+
|
|
446
452
|
declare function useMintAnymalNFT(): (pid: string, nftId: string, anymalTxId: string, dbAuthToken: string, validationContractAddress: string, smartAccount: any, bundlerClient: any) => Promise<{
|
|
447
453
|
success: boolean;
|
|
448
454
|
message: string;
|
|
@@ -879,4 +885,4 @@ declare function useSubmitContractAction(): (idToken: string, pid: string, sourc
|
|
|
879
885
|
*/
|
|
880
886
|
declare function humanRevert(raw: `0x${string}` | undefined, shortMessage?: string): string;
|
|
881
887
|
|
|
882
|
-
export { AUTH_API_ENDPOINTS, type ActionDefinition, type ActionPayload, type ActionRecord, type ActionReferral, ActionSourceType, ActionStatus, ActionType, type AnymalNftMetadataInputData, type AuthEnvelope, type ContractActionPayload, type CreateAnymalInputData, ERROR_ABI, type ExternalActionPayload, FIREBASE_WEB_API_KEYS, FIREBASE_WEB_AUTH_API_ENDPOINTS, type GraphQLActionPayload, type JWTOptions, KIBBLE_TOKEN_ABI, MARKETPLACE_ABI, type MarketplaceActionPayload, MarketplacePaymentType, NETWORK_HOSTS, Network, type NotificationData, type NotificationEventData, ORGANIZATION_BEACON_ABI, ORGANIZATION_IMPL_ABI, ORG_FUNCTION, PET_NFT_ABI, REWARDABLE_ACTIONS_ABI, type SubmitResponse, type WishlistPurchaseActionPayload, convertToActionDefinition, convertToActionRecord, convertToMultipleActionDefinitions, convertToMultipleActionRecords, createApp, createAuthEnvelope, flattenFirestoreData, generateAppSignature, generateBytes32Nonce, generateJWT, getFirebaseTokenForApp, humanRevert, loadExistingSecp256k1PrivateKey, processDirectKibbleApproval, processDirectPartialPayment, processOrgKibbleApproval, processOrgPartialPayment, sendUserOpWithRetries, serializePublicKeyCompressed, submitAction, useApproveKibbleToken, useApproveOrgPartialPayment, useClaimActionReward, useClaimOrgActionReward, useCoinbaseClaimActionReward, useCoinbaseCreateOrganizationWallet, useCoinbaseMintAnymalNFT, useCoinbaseMintOrgAnymalNFT, useCreateOrganizationAppData, useCreateOrganizationBase, useCreateUserAppData, useCreateWeb3Account, useFetchActionDefinitions, useFetchActions, useFetchBalance, useFetchNotifications, useFetchUserData, useMintAnymalNFT, useMintOrgAnymalNFT, useProcessOrgPartialKibblePayment, useProcessPartialKibblePayment, useSaveAnymalMetadata, useSendCoinbaseUserOperation, useSubmitContractAction, useUpdateOrgWalletAddress, useUpdateUserAsVerified, useUpdateUserEmail, useUpdateUserName, useUpdateUserPid, useUploadAnymalImage, useVerifyAccount, useVerifyWeb3AuthSession, waitForAllowance, waitForReceiptWithRetries };
|
|
888
|
+
export { AUTH_API_ENDPOINTS, type ActionDefinition, type ActionPayload, type ActionRecord, type ActionReferral, ActionSourceType, ActionStatus, ActionType, type AnymalNftMetadataInputData, type AuthEnvelope, type ContractActionPayload, type CreateAnymalInputData, ERROR_ABI, type ExternalActionPayload, FIREBASE_WEB_API_KEYS, FIREBASE_WEB_AUTH_API_ENDPOINTS, type GraphQLActionPayload, type JWTOptions, KIBBLE_TOKEN_ABI, MARKETPLACE_ABI, type MarketplaceActionPayload, MarketplacePaymentType, NETWORK_HOSTS, Network, type NotificationData, type NotificationEventData, ORGANIZATION_BEACON_ABI, ORGANIZATION_IMPL_ABI, ORG_FUNCTION, PET_NFT_ABI, REWARDABLE_ACTIONS_ABI, type SubmitResponse, type WishlistPurchaseActionPayload, convertToActionDefinition, convertToActionRecord, convertToMultipleActionDefinitions, convertToMultipleActionRecords, createApp, createAuthEnvelope, flattenFirestoreData, generateAppSignature, generateBytes32Nonce, generateJWT, getFirebaseTokenForApp, humanRevert, loadExistingSecp256k1PrivateKey, processDirectKibbleApproval, processDirectPartialPayment, processOrgKibbleApproval, processOrgPartialPayment, sendUserOpWithRetries, serializePublicKeyCompressed, submitAction, useApproveKibbleToken, useApproveOrgPartialPayment, useClaimActionReward, useClaimOrgActionReward, useCoinbaseClaimActionReward, useCoinbaseClaimOrgActionReward, useCoinbaseCreateOrganizationWallet, useCoinbaseMintAnymalNFT, useCoinbaseMintOrgAnymalNFT, useCreateOrganizationAppData, useCreateOrganizationBase, useCreateUserAppData, useCreateWeb3Account, useFetchActionDefinitions, useFetchActions, useFetchBalance, useFetchNotifications, useFetchUserData, useMintAnymalNFT, useMintOrgAnymalNFT, useProcessOrgPartialKibblePayment, useProcessPartialKibblePayment, useSaveAnymalMetadata, useSendCoinbaseUserOperation, useSubmitContractAction, useUpdateOrgWalletAddress, useUpdateUserAsVerified, useUpdateUserEmail, useUpdateUserName, useUpdateUserPid, useUploadAnymalImage, useVerifyAccount, useVerifyWeb3AuthSession, waitForAllowance, waitForReceiptWithRetries };
|
package/dist/index.js
CHANGED
|
@@ -62,6 +62,7 @@ __export(index_exports, {
|
|
|
62
62
|
useClaimActionReward: () => useClaimActionReward,
|
|
63
63
|
useClaimOrgActionReward: () => useClaimOrgActionReward,
|
|
64
64
|
useCoinbaseClaimActionReward: () => useCoinbaseClaimActionReward,
|
|
65
|
+
useCoinbaseClaimOrgActionReward: () => useCoinbaseClaimOrgActionReward,
|
|
65
66
|
useCoinbaseCreateOrganizationWallet: () => useCoinbaseCreateOrganizationWallet,
|
|
66
67
|
useCoinbaseMintAnymalNFT: () => useCoinbaseMintAnymalNFT,
|
|
67
68
|
useCoinbaseMintOrgAnymalNFT: () => useCoinbaseMintOrgAnymalNFT,
|
|
@@ -3094,8 +3095,8 @@ function useCoinbaseMintOrgAnymalNFT() {
|
|
|
3094
3095
|
const result = await sendOperationFn(
|
|
3095
3096
|
evmAddress,
|
|
3096
3097
|
validationContractAddress,
|
|
3097
|
-
|
|
3098
|
-
|
|
3098
|
+
ORGANIZATION_IMPL_ABI,
|
|
3099
|
+
ORG_FUNCTION,
|
|
3099
3100
|
executeArgs
|
|
3100
3101
|
);
|
|
3101
3102
|
return { ...result, status };
|
|
@@ -3104,9 +3105,42 @@ function useCoinbaseMintOrgAnymalNFT() {
|
|
|
3104
3105
|
);
|
|
3105
3106
|
}
|
|
3106
3107
|
|
|
3107
|
-
// src/utils/
|
|
3108
|
-
var import_viem6 = require("viem");
|
|
3108
|
+
// src/utils/coinbase/useCoinbaseClaimOrgActionReward.ts
|
|
3109
3109
|
var import_react15 = require("react");
|
|
3110
|
+
var import_viem5 = require("viem");
|
|
3111
|
+
function useCoinbaseClaimOrgActionReward() {
|
|
3112
|
+
const { sendOperationFn, status } = useSendCoinbaseUserOperation();
|
|
3113
|
+
return (0, import_react15.useCallback)(
|
|
3114
|
+
async (evmSmartAddress, orgContractAddress, rewardableActionContractAddress, actionId, claimIndex) => {
|
|
3115
|
+
if (!evmSmartAddress || !orgContractAddress || !actionId || claimIndex === void 0) {
|
|
3116
|
+
return {
|
|
3117
|
+
success: false,
|
|
3118
|
+
message: "Coinbase Org Kibble Claim: Missing Data",
|
|
3119
|
+
status: "error"
|
|
3120
|
+
};
|
|
3121
|
+
}
|
|
3122
|
+
const claimCallData = (0, import_viem5.encodeFunctionData)({
|
|
3123
|
+
abi: REWARDABLE_ACTIONS_ABI,
|
|
3124
|
+
functionName: "claimByIndex",
|
|
3125
|
+
args: [actionId, claimIndex]
|
|
3126
|
+
});
|
|
3127
|
+
const args = [rewardableActionContractAddress, claimCallData];
|
|
3128
|
+
const result = await sendOperationFn(
|
|
3129
|
+
evmSmartAddress,
|
|
3130
|
+
orgContractAddress,
|
|
3131
|
+
ORGANIZATION_IMPL_ABI,
|
|
3132
|
+
ORG_FUNCTION,
|
|
3133
|
+
args
|
|
3134
|
+
);
|
|
3135
|
+
return { ...result, status };
|
|
3136
|
+
},
|
|
3137
|
+
[sendOperationFn, status]
|
|
3138
|
+
);
|
|
3139
|
+
}
|
|
3140
|
+
|
|
3141
|
+
// src/utils/anymals/useMintAnymalNFT.ts
|
|
3142
|
+
var import_viem7 = require("viem");
|
|
3143
|
+
var import_react16 = require("react");
|
|
3110
3144
|
|
|
3111
3145
|
// src/helpers/GasEstimateHelper.tsx
|
|
3112
3146
|
async function applyBundlerGasEstimator(account, bundlerClient, options) {
|
|
@@ -3150,18 +3184,18 @@ async function applyBundlerGasEstimator(account, bundlerClient, options) {
|
|
|
3150
3184
|
}
|
|
3151
3185
|
|
|
3152
3186
|
// src/helpers/HumanRevert.tsx
|
|
3153
|
-
var
|
|
3187
|
+
var import_viem6 = require("viem");
|
|
3154
3188
|
function humanRevert(raw, shortMessage) {
|
|
3155
3189
|
if (!raw) return shortMessage ?? "Simulation reverted";
|
|
3156
3190
|
try {
|
|
3157
|
-
const { errorName, args } = (0,
|
|
3191
|
+
const { errorName, args } = (0, import_viem6.decodeErrorResult)({
|
|
3158
3192
|
abi: ERROR_ABI,
|
|
3159
3193
|
data: raw
|
|
3160
3194
|
});
|
|
3161
3195
|
return `${errorName}(${args.map(String).join(", ")})`;
|
|
3162
3196
|
} catch {
|
|
3163
3197
|
if (raw.startsWith("0x08c379a0") && raw.length >= 138) {
|
|
3164
|
-
return (0,
|
|
3198
|
+
return (0, import_viem6.hexToString)(`0x${raw.slice(138)}`);
|
|
3165
3199
|
}
|
|
3166
3200
|
return `${raw.slice(0, 10)}\u2026`;
|
|
3167
3201
|
}
|
|
@@ -3187,7 +3221,7 @@ async function simulateCall(publicClient, target, abi, functionName, args, calle
|
|
|
3187
3221
|
|
|
3188
3222
|
// src/utils/anymals/useMintAnymalNFT.ts
|
|
3189
3223
|
function useMintAnymalNFT() {
|
|
3190
|
-
return (0,
|
|
3224
|
+
return (0, import_react16.useCallback)(
|
|
3191
3225
|
async (pid, nftId, anymalTxId, dbAuthToken, validationContractAddress, smartAccount, bundlerClient) => {
|
|
3192
3226
|
if (!dbAuthToken || !nftId || !bundlerClient || !smartAccount || !pid || !validationContractAddress) {
|
|
3193
3227
|
return {
|
|
@@ -3203,7 +3237,7 @@ function useMintAnymalNFT() {
|
|
|
3203
3237
|
"petastic-signup-campaign-1",
|
|
3204
3238
|
anymalTxId
|
|
3205
3239
|
];
|
|
3206
|
-
const callData = (0,
|
|
3240
|
+
const callData = (0, import_viem7.encodeFunctionData)({
|
|
3207
3241
|
abi: PET_NFT_ABI,
|
|
3208
3242
|
functionName,
|
|
3209
3243
|
args
|
|
@@ -3239,9 +3273,9 @@ function useMintAnymalNFT() {
|
|
|
3239
3273
|
}
|
|
3240
3274
|
|
|
3241
3275
|
// src/utils/anymals/useSaveAnymalMetadata.ts
|
|
3242
|
-
var
|
|
3276
|
+
var import_react17 = require("react");
|
|
3243
3277
|
function useSaveAnymalMetadata() {
|
|
3244
|
-
return (0,
|
|
3278
|
+
return (0, import_react17.useCallback)(
|
|
3245
3279
|
async (userPid, anymalTxId, idToken, nftMetadataInput, authServiceBaseUrl) => {
|
|
3246
3280
|
const response = await fetch(`${authServiceBaseUrl}/process-nft`, {
|
|
3247
3281
|
method: "POST",
|
|
@@ -3269,7 +3303,7 @@ function useSaveAnymalMetadata() {
|
|
|
3269
3303
|
}
|
|
3270
3304
|
|
|
3271
3305
|
// src/utils/anymals/useUploadAnymalImage.ts
|
|
3272
|
-
var
|
|
3306
|
+
var import_react18 = require("react");
|
|
3273
3307
|
|
|
3274
3308
|
// src/helpers/UploadImageHelper.tsx
|
|
3275
3309
|
function resizeImage(file, maxWidth = 800, maxHeight = 800, quality = 0.7) {
|
|
@@ -3326,7 +3360,7 @@ function toBase64(file) {
|
|
|
3326
3360
|
|
|
3327
3361
|
// src/utils/anymals/useUploadAnymalImage.ts
|
|
3328
3362
|
function useUploadAnymalImage() {
|
|
3329
|
-
return (0,
|
|
3363
|
+
return (0, import_react18.useCallback)(
|
|
3330
3364
|
async (imageFile, type, idToken, authServiceBaseUrl, petType, breed, lifestage, anymalPid) => {
|
|
3331
3365
|
if (!imageFile || !idToken) {
|
|
3332
3366
|
return {
|
|
@@ -3387,10 +3421,10 @@ function useUploadAnymalImage() {
|
|
|
3387
3421
|
}
|
|
3388
3422
|
|
|
3389
3423
|
// src/utils/marketplace/useProcessPartialKibblePayment.ts
|
|
3390
|
-
var
|
|
3424
|
+
var import_react19 = require("react");
|
|
3391
3425
|
|
|
3392
3426
|
// src/helpers/ProcessDirectPartialPayment.tsx
|
|
3393
|
-
var
|
|
3427
|
+
var import_viem8 = require("viem");
|
|
3394
3428
|
|
|
3395
3429
|
// src/helpers/SendUserOpWithRetries.tsx
|
|
3396
3430
|
async function sendUserOpWithRetries(bundlerClient, params, retries = 3, delay = 1e3) {
|
|
@@ -3450,7 +3484,7 @@ async function processDirectPartialPayment(marketplaceContract, smartAccount, bu
|
|
|
3450
3484
|
deadline,
|
|
3451
3485
|
backendSignature
|
|
3452
3486
|
];
|
|
3453
|
-
const partialPayCalldata = (0,
|
|
3487
|
+
const partialPayCalldata = (0, import_viem8.encodeFunctionData)({
|
|
3454
3488
|
abi: MARKETPLACE_ABI,
|
|
3455
3489
|
functionName,
|
|
3456
3490
|
args
|
|
@@ -3487,7 +3521,7 @@ async function processDirectPartialPayment(marketplaceContract, smartAccount, bu
|
|
|
3487
3521
|
|
|
3488
3522
|
// src/utils/marketplace/useProcessPartialKibblePayment.ts
|
|
3489
3523
|
function useProcessPartialKibblePayment() {
|
|
3490
|
-
return (0,
|
|
3524
|
+
return (0, import_react19.useCallback)(
|
|
3491
3525
|
async (pid, nftId, orderId, dbAuthToken, marketplaceContract, smartAccount, bundlerClient, amountInTokens, maxTokenPayment, nonce, deadline, backendSignature) => {
|
|
3492
3526
|
if (!orderId || !dbAuthToken || !nftId || !bundlerClient || !smartAccount || !pid || !marketplaceContract || !amountInTokens || !maxTokenPayment || !nonce || !deadline) {
|
|
3493
3527
|
return {
|
|
@@ -3543,23 +3577,23 @@ function useProcessPartialKibblePayment() {
|
|
|
3543
3577
|
}
|
|
3544
3578
|
|
|
3545
3579
|
// src/utils/marketplace/useApproveKibbleToken.ts
|
|
3546
|
-
var
|
|
3580
|
+
var import_react20 = require("react");
|
|
3547
3581
|
|
|
3548
3582
|
// src/helpers/ProcessDirectKibbleApproval.tsx
|
|
3549
|
-
var
|
|
3583
|
+
var import_viem9 = require("viem");
|
|
3550
3584
|
async function processDirectKibbleApproval(kibbleTokenAddress, spenderAddress, smartAccount, bundlerClient, approveAmount) {
|
|
3551
3585
|
try {
|
|
3552
3586
|
const functionName = "approve";
|
|
3553
3587
|
const args = [spenderAddress, approveAmount];
|
|
3554
|
-
const approveCalldata = (0,
|
|
3555
|
-
abi:
|
|
3588
|
+
const approveCalldata = (0, import_viem9.encodeFunctionData)({
|
|
3589
|
+
abi: import_viem9.erc20Abi,
|
|
3556
3590
|
functionName,
|
|
3557
3591
|
args
|
|
3558
3592
|
});
|
|
3559
3593
|
await simulateCall(
|
|
3560
3594
|
bundlerClient.client,
|
|
3561
3595
|
kibbleTokenAddress,
|
|
3562
|
-
|
|
3596
|
+
import_viem9.erc20Abi,
|
|
3563
3597
|
functionName,
|
|
3564
3598
|
args,
|
|
3565
3599
|
smartAccount.address
|
|
@@ -3588,7 +3622,7 @@ async function processDirectKibbleApproval(kibbleTokenAddress, spenderAddress, s
|
|
|
3588
3622
|
|
|
3589
3623
|
// src/utils/marketplace/useApproveKibbleToken.ts
|
|
3590
3624
|
function useApproveKibbleToken() {
|
|
3591
|
-
return (0,
|
|
3625
|
+
return (0, import_react20.useCallback)(
|
|
3592
3626
|
async (kibbleTokenAddress, marketplaceContract, amount, smartAccount, bundlerClient) => {
|
|
3593
3627
|
try {
|
|
3594
3628
|
const result = await processDirectKibbleApproval(
|
|
@@ -3615,10 +3649,10 @@ function useApproveKibbleToken() {
|
|
|
3615
3649
|
}
|
|
3616
3650
|
|
|
3617
3651
|
// src/utils/organization/useCreateOrganizationBase.ts
|
|
3618
|
-
var
|
|
3619
|
-
var
|
|
3652
|
+
var import_react21 = require("react");
|
|
3653
|
+
var import_viem10 = require("viem");
|
|
3620
3654
|
function useCreateOrganizationBase() {
|
|
3621
|
-
return (0,
|
|
3655
|
+
return (0, import_react21.useCallback)(
|
|
3622
3656
|
/**
|
|
3623
3657
|
* Creates a new organization on-chain.
|
|
3624
3658
|
*
|
|
@@ -3640,7 +3674,7 @@ function useCreateOrganizationBase() {
|
|
|
3640
3674
|
try {
|
|
3641
3675
|
const functionName = "createOrganizationProxy";
|
|
3642
3676
|
const args = [ownerAddress, orgName, orgPid];
|
|
3643
|
-
const callData = (0,
|
|
3677
|
+
const callData = (0, import_viem10.encodeFunctionData)({
|
|
3644
3678
|
abi: ORGANIZATION_BEACON_ABI,
|
|
3645
3679
|
functionName,
|
|
3646
3680
|
args
|
|
@@ -3678,7 +3712,7 @@ function useCreateOrganizationBase() {
|
|
|
3678
3712
|
let proxyAddress;
|
|
3679
3713
|
for (const log of txReceipt.logs) {
|
|
3680
3714
|
try {
|
|
3681
|
-
const decoded = (0,
|
|
3715
|
+
const decoded = (0, import_viem10.decodeEventLog)({
|
|
3682
3716
|
abi: ORGANIZATION_BEACON_ABI,
|
|
3683
3717
|
data: log.data,
|
|
3684
3718
|
topics: log.topics
|
|
@@ -3714,13 +3748,13 @@ function useCreateOrganizationBase() {
|
|
|
3714
3748
|
}
|
|
3715
3749
|
|
|
3716
3750
|
// src/utils/organization/useApproveOrgKibbleToken.ts
|
|
3717
|
-
var
|
|
3751
|
+
var import_react22 = require("react");
|
|
3718
3752
|
|
|
3719
3753
|
// src/helpers/ProcessOrgKibbleApproval.tsx
|
|
3720
|
-
var
|
|
3754
|
+
var import_viem12 = require("viem");
|
|
3721
3755
|
|
|
3722
3756
|
// src/helpers/WaitForAllowance.tsx
|
|
3723
|
-
var
|
|
3757
|
+
var import_viem11 = require("viem");
|
|
3724
3758
|
async function waitForAllowance(publicClient, tokenAddress, ownerAddress, spenderAddress, expectedAmount) {
|
|
3725
3759
|
const MAX_RETRIES = 10;
|
|
3726
3760
|
const RETRY_INTERVAL = 2e3;
|
|
@@ -3729,7 +3763,7 @@ async function waitForAllowance(publicClient, tokenAddress, ownerAddress, spende
|
|
|
3729
3763
|
try {
|
|
3730
3764
|
const currentAllowance = await publicClient.readContract({
|
|
3731
3765
|
address: tokenAddress,
|
|
3732
|
-
abi:
|
|
3766
|
+
abi: import_viem11.erc20Abi,
|
|
3733
3767
|
functionName: "allowance",
|
|
3734
3768
|
args: [ownerAddress, spenderAddress]
|
|
3735
3769
|
});
|
|
@@ -3754,13 +3788,13 @@ async function processOrgKibbleApproval(orgContractAddress, kibbleTokenAddress,
|
|
|
3754
3788
|
if (approveAmount <= 0n) {
|
|
3755
3789
|
return { success: false, message: "Approval amount must be greater than zero." };
|
|
3756
3790
|
}
|
|
3757
|
-
const approveCalldata = (0,
|
|
3758
|
-
abi:
|
|
3791
|
+
const approveCalldata = (0, import_viem12.encodeFunctionData)({
|
|
3792
|
+
abi: import_viem12.erc20Abi,
|
|
3759
3793
|
functionName: "approve",
|
|
3760
3794
|
args: [partialPaymentModuleAddress, approveAmount]
|
|
3761
3795
|
});
|
|
3762
3796
|
const args = [kibbleTokenAddress, approveCalldata];
|
|
3763
|
-
const executeApproveCalldata = (0,
|
|
3797
|
+
const executeApproveCalldata = (0, import_viem12.encodeFunctionData)({
|
|
3764
3798
|
abi: ORGANIZATION_IMPL_ABI,
|
|
3765
3799
|
functionName: ORG_FUNCTION,
|
|
3766
3800
|
args
|
|
@@ -3812,7 +3846,7 @@ async function processOrgKibbleApproval(orgContractAddress, kibbleTokenAddress,
|
|
|
3812
3846
|
|
|
3813
3847
|
// src/utils/organization/useApproveOrgKibbleToken.ts
|
|
3814
3848
|
function useApproveOrgPartialPayment() {
|
|
3815
|
-
return (0,
|
|
3849
|
+
return (0, import_react22.useCallback)(
|
|
3816
3850
|
async (orgContractAddress, kibbleTokenAddress, partialPaymentModuleAddress, managerSmartAccount, bundlerClient, approveAmount) => {
|
|
3817
3851
|
if (!orgContractAddress || !kibbleTokenAddress || !partialPaymentModuleAddress || !managerSmartAccount || !bundlerClient || !approveAmount) {
|
|
3818
3852
|
return {
|
|
@@ -3844,13 +3878,13 @@ function useApproveOrgPartialPayment() {
|
|
|
3844
3878
|
}
|
|
3845
3879
|
|
|
3846
3880
|
// src/utils/organization/useProcessOrgPartialKibblePayment.ts
|
|
3847
|
-
var
|
|
3881
|
+
var import_react23 = require("react");
|
|
3848
3882
|
|
|
3849
3883
|
// src/helpers/ProcessOrgPartialPayment.tsx
|
|
3850
|
-
var
|
|
3884
|
+
var import_viem13 = require("viem");
|
|
3851
3885
|
async function processOrgPartialPayment(orgContractAddress, partialPaymentModuleAddress, managerSmartAccount, bundlerClient, orderId, anymalNftId, pid, amountInTokens, maxTokenPayment, nonce, deadline, backendSignature) {
|
|
3852
3886
|
try {
|
|
3853
|
-
const partialPayCalldata = (0,
|
|
3887
|
+
const partialPayCalldata = (0, import_viem13.encodeFunctionData)({
|
|
3854
3888
|
abi: MARKETPLACE_ABI,
|
|
3855
3889
|
functionName: "partialPay",
|
|
3856
3890
|
args: [
|
|
@@ -3865,7 +3899,7 @@ async function processOrgPartialPayment(orgContractAddress, partialPaymentModule
|
|
|
3865
3899
|
]
|
|
3866
3900
|
});
|
|
3867
3901
|
const args = [partialPaymentModuleAddress, partialPayCalldata];
|
|
3868
|
-
const executePartialPayCalldata = (0,
|
|
3902
|
+
const executePartialPayCalldata = (0, import_viem13.encodeFunctionData)({
|
|
3869
3903
|
abi: ORGANIZATION_IMPL_ABI,
|
|
3870
3904
|
functionName: ORG_FUNCTION,
|
|
3871
3905
|
args
|
|
@@ -3902,7 +3936,7 @@ async function processOrgPartialPayment(orgContractAddress, partialPaymentModule
|
|
|
3902
3936
|
|
|
3903
3937
|
// src/utils/organization/useProcessOrgPartialKibblePayment.ts
|
|
3904
3938
|
function useProcessOrgPartialKibblePayment() {
|
|
3905
|
-
return (0,
|
|
3939
|
+
return (0, import_react23.useCallback)(
|
|
3906
3940
|
async (orgContractAddress, partialPaymentModuleAddress, managerSmartAccount, bundlerClient, orderId, anymalNftId, pid, amountInTokens, maxTokenPayment, nonce, deadline, backendSignature) => {
|
|
3907
3941
|
if (!orgContractAddress || !partialPaymentModuleAddress || !managerSmartAccount || !bundlerClient || !orderId || !pid || !nonce || !backendSignature) {
|
|
3908
3942
|
return {
|
|
@@ -3940,9 +3974,9 @@ function useProcessOrgPartialKibblePayment() {
|
|
|
3940
3974
|
}
|
|
3941
3975
|
|
|
3942
3976
|
// src/utils/organization/useUpdateOrgWalletAddress.ts
|
|
3943
|
-
var
|
|
3977
|
+
var import_react24 = require("react");
|
|
3944
3978
|
function useUpdateOrgWalletAddress() {
|
|
3945
|
-
return (0,
|
|
3979
|
+
return (0, import_react24.useCallback)(
|
|
3946
3980
|
async (dbAuthToken, docID, baseWalletAddress, endpoint) => {
|
|
3947
3981
|
try {
|
|
3948
3982
|
const mutation = `
|
|
@@ -3981,10 +4015,10 @@ function useUpdateOrgWalletAddress() {
|
|
|
3981
4015
|
}
|
|
3982
4016
|
|
|
3983
4017
|
// src/utils/organization/useMintOrgAnymalNFT.ts
|
|
3984
|
-
var
|
|
3985
|
-
var
|
|
4018
|
+
var import_viem14 = require("viem");
|
|
4019
|
+
var import_react25 = require("react");
|
|
3986
4020
|
function useMintOrgAnymalNFT() {
|
|
3987
|
-
return (0,
|
|
4021
|
+
return (0, import_react25.useCallback)(
|
|
3988
4022
|
async (orgContractAddress, pid, nftId, anymalTxId, dbAuthToken, validationContractAddress, managerSmartAccount, bundlerClient) => {
|
|
3989
4023
|
if (!dbAuthToken || !nftId || !bundlerClient || !managerSmartAccount || !pid || !validationContractAddress || !orgContractAddress) {
|
|
3990
4024
|
return {
|
|
@@ -4000,13 +4034,13 @@ function useMintOrgAnymalNFT() {
|
|
|
4000
4034
|
"petastic-signup-campaign-1",
|
|
4001
4035
|
anymalTxId
|
|
4002
4036
|
];
|
|
4003
|
-
const callData = (0,
|
|
4037
|
+
const callData = (0, import_viem14.encodeFunctionData)({
|
|
4004
4038
|
abi: PET_NFT_ABI,
|
|
4005
4039
|
functionName,
|
|
4006
4040
|
args
|
|
4007
4041
|
});
|
|
4008
4042
|
const executeArgs = [validationContractAddress, callData];
|
|
4009
|
-
const executeSubmitMetaCalldata = (0,
|
|
4043
|
+
const executeSubmitMetaCalldata = (0, import_viem14.encodeFunctionData)({
|
|
4010
4044
|
abi: ORGANIZATION_IMPL_ABI,
|
|
4011
4045
|
functionName: ORG_FUNCTION,
|
|
4012
4046
|
args: executeArgs
|
|
@@ -4039,10 +4073,10 @@ function useMintOrgAnymalNFT() {
|
|
|
4039
4073
|
|
|
4040
4074
|
// src/helpers/NonceHelper.tsx
|
|
4041
4075
|
var import_uuid = require("uuid");
|
|
4042
|
-
var
|
|
4076
|
+
var import_viem15 = require("viem");
|
|
4043
4077
|
var generateBytes32Nonce = () => {
|
|
4044
4078
|
const uuid3 = (0, import_uuid.v4)().replace(/-/g, "");
|
|
4045
|
-
return (0,
|
|
4079
|
+
return (0, import_viem15.padHex)(`0x${uuid3}`, { size: 32 });
|
|
4046
4080
|
};
|
|
4047
4081
|
|
|
4048
4082
|
// src/helpers/CryptoUtils.tsx
|
|
@@ -4252,9 +4286,9 @@ async function submitAction(idToken, pid, sourceType, payload, endpointBaseUrl)
|
|
|
4252
4286
|
}
|
|
4253
4287
|
|
|
4254
4288
|
// src/utils/actions/useFetchActions.ts
|
|
4255
|
-
var
|
|
4289
|
+
var import_react26 = require("react");
|
|
4256
4290
|
function useFetchActions() {
|
|
4257
|
-
return (0,
|
|
4291
|
+
return (0, import_react26.useCallback)(
|
|
4258
4292
|
async (idToken, actionsServiceBaseUrl, pid, status, limit, offset) => {
|
|
4259
4293
|
const params = new URLSearchParams({ pid });
|
|
4260
4294
|
if (status) params.set("status", status);
|
|
@@ -4283,9 +4317,9 @@ function useFetchActions() {
|
|
|
4283
4317
|
}
|
|
4284
4318
|
|
|
4285
4319
|
// src/utils/actions/useFetchActionDefinitions.ts
|
|
4286
|
-
var
|
|
4320
|
+
var import_react27 = require("react");
|
|
4287
4321
|
function useFetchActionDefinitions() {
|
|
4288
|
-
return (0,
|
|
4322
|
+
return (0, import_react27.useCallback)(
|
|
4289
4323
|
async (idToken, actionsServiceBaseUrl) => {
|
|
4290
4324
|
try {
|
|
4291
4325
|
const response = await fetch(
|
|
@@ -4382,10 +4416,10 @@ var convertToMultipleActionRecords = (frs) => frs.map(convertToActionRecord);
|
|
|
4382
4416
|
var convertToMultipleActionDefinitions = (frs) => frs.map(convertToActionDefinition);
|
|
4383
4417
|
|
|
4384
4418
|
// src/utils/application/useCreateUserAppData.ts
|
|
4385
|
-
var
|
|
4419
|
+
var import_react28 = require("react");
|
|
4386
4420
|
var import_uuid2 = require("uuid");
|
|
4387
4421
|
function useCreateUserAppData() {
|
|
4388
|
-
return (0,
|
|
4422
|
+
return (0, import_react28.useCallback)(
|
|
4389
4423
|
async (appId, pid, dbAuthToken, endpoint) => {
|
|
4390
4424
|
if (!dbAuthToken || !pid || !dbAuthToken || !endpoint) return;
|
|
4391
4425
|
const appValues = {
|
|
@@ -4440,10 +4474,10 @@ function useCreateUserAppData() {
|
|
|
4440
4474
|
}
|
|
4441
4475
|
|
|
4442
4476
|
// src/utils/application/useCreateOrganizationAppData.ts
|
|
4443
|
-
var
|
|
4477
|
+
var import_react29 = require("react");
|
|
4444
4478
|
var import_uuid3 = require("uuid");
|
|
4445
4479
|
function useCreateOrganizationAppData() {
|
|
4446
|
-
return (0,
|
|
4480
|
+
return (0, import_react29.useCallback)(
|
|
4447
4481
|
async (appId, pid, dbAuthToken, endpoint) => {
|
|
4448
4482
|
if (!dbAuthToken || !pid || !dbAuthToken || !endpoint) return;
|
|
4449
4483
|
const appValues = {
|
|
@@ -4497,17 +4531,17 @@ function useCreateOrganizationAppData() {
|
|
|
4497
4531
|
}
|
|
4498
4532
|
|
|
4499
4533
|
// src/utils/balance/useFetchBalance.ts
|
|
4500
|
-
var
|
|
4501
|
-
var
|
|
4534
|
+
var import_react30 = require("react");
|
|
4535
|
+
var import_viem16 = require("viem");
|
|
4502
4536
|
function useFetchBalance() {
|
|
4503
|
-
return (0,
|
|
4537
|
+
return (0, import_react30.useCallback)(
|
|
4504
4538
|
async (publicClient, walletAddress, kibbleTokenAddress) => {
|
|
4505
4539
|
try {
|
|
4506
4540
|
const balance = await publicClient.readContract({
|
|
4507
|
-
address: (0,
|
|
4508
|
-
abi:
|
|
4541
|
+
address: (0, import_viem16.getAddress)(kibbleTokenAddress),
|
|
4542
|
+
abi: import_viem16.erc20Abi,
|
|
4509
4543
|
functionName: "balanceOf",
|
|
4510
|
-
args: [(0,
|
|
4544
|
+
args: [(0, import_viem16.getAddress)(walletAddress)]
|
|
4511
4545
|
});
|
|
4512
4546
|
return Number(balance);
|
|
4513
4547
|
} catch (error) {
|
|
@@ -4519,10 +4553,10 @@ function useFetchBalance() {
|
|
|
4519
4553
|
}
|
|
4520
4554
|
|
|
4521
4555
|
// src/utils/actions/useClaimActionReward.ts
|
|
4522
|
-
var
|
|
4523
|
-
var
|
|
4556
|
+
var import_viem17 = require("viem");
|
|
4557
|
+
var import_react31 = require("react");
|
|
4524
4558
|
function useClaimActionReward() {
|
|
4525
|
-
return (0,
|
|
4559
|
+
return (0, import_react31.useCallback)(
|
|
4526
4560
|
async (actionId, claimIndex, rewardableActionContractAddress, smartAccount, bundlerClient) => {
|
|
4527
4561
|
if (!actionId || claimIndex === void 0 || !bundlerClient || !smartAccount || !rewardableActionContractAddress) {
|
|
4528
4562
|
return {
|
|
@@ -4532,7 +4566,7 @@ function useClaimActionReward() {
|
|
|
4532
4566
|
}
|
|
4533
4567
|
const args = [actionId, claimIndex];
|
|
4534
4568
|
const functionName = "claimByIndex";
|
|
4535
|
-
const callData = (0,
|
|
4569
|
+
const callData = (0, import_viem17.encodeFunctionData)({
|
|
4536
4570
|
abi: REWARDABLE_ACTIONS_ABI,
|
|
4537
4571
|
functionName,
|
|
4538
4572
|
args
|
|
@@ -4568,10 +4602,10 @@ function useClaimActionReward() {
|
|
|
4568
4602
|
}
|
|
4569
4603
|
|
|
4570
4604
|
// src/utils/actions/useClaimOrgActionReward.ts
|
|
4571
|
-
var
|
|
4572
|
-
var
|
|
4605
|
+
var import_viem18 = require("viem");
|
|
4606
|
+
var import_react32 = require("react");
|
|
4573
4607
|
function useClaimOrgActionReward() {
|
|
4574
|
-
return (0,
|
|
4608
|
+
return (0, import_react32.useCallback)(
|
|
4575
4609
|
async (orgContractAddress, rewardableActionContractAddress, actionId, claimIndex, smartAccount, bundlerClient) => {
|
|
4576
4610
|
if (!orgContractAddress || !actionId || claimIndex === void 0 || !bundlerClient || !smartAccount) {
|
|
4577
4611
|
return {
|
|
@@ -4579,13 +4613,13 @@ function useClaimOrgActionReward() {
|
|
|
4579
4613
|
message: "Missing web3auth account info or contract address."
|
|
4580
4614
|
};
|
|
4581
4615
|
}
|
|
4582
|
-
const claimCallData = (0,
|
|
4616
|
+
const claimCallData = (0, import_viem18.encodeFunctionData)({
|
|
4583
4617
|
abi: REWARDABLE_ACTIONS_ABI,
|
|
4584
4618
|
functionName: "claimByIndex",
|
|
4585
4619
|
args: [actionId, claimIndex]
|
|
4586
4620
|
});
|
|
4587
4621
|
const args = [rewardableActionContractAddress, claimCallData];
|
|
4588
|
-
const executeClaimCalldata = (0,
|
|
4622
|
+
const executeClaimCalldata = (0, import_viem18.encodeFunctionData)({
|
|
4589
4623
|
abi: ORGANIZATION_IMPL_ABI,
|
|
4590
4624
|
functionName: ORG_FUNCTION,
|
|
4591
4625
|
args
|
|
@@ -4621,9 +4655,9 @@ function useClaimOrgActionReward() {
|
|
|
4621
4655
|
}
|
|
4622
4656
|
|
|
4623
4657
|
// src/utils/actions/useSubmitContractAction.ts
|
|
4624
|
-
var
|
|
4658
|
+
var import_react33 = require("react");
|
|
4625
4659
|
function useSubmitContractAction() {
|
|
4626
|
-
return (0,
|
|
4660
|
+
return (0, import_react33.useCallback)(
|
|
4627
4661
|
(idToken, pid, source, endpoint, payload) => {
|
|
4628
4662
|
if (!idToken || !pid || !source || !endpoint || !payload) return;
|
|
4629
4663
|
let sourceTypePayload = {};
|
|
@@ -4782,6 +4816,7 @@ function isMarketplacePurchaseAction(payload) {
|
|
|
4782
4816
|
useClaimActionReward,
|
|
4783
4817
|
useClaimOrgActionReward,
|
|
4784
4818
|
useCoinbaseClaimActionReward,
|
|
4819
|
+
useCoinbaseClaimOrgActionReward,
|
|
4785
4820
|
useCoinbaseCreateOrganizationWallet,
|
|
4786
4821
|
useCoinbaseMintAnymalNFT,
|
|
4787
4822
|
useCoinbaseMintOrgAnymalNFT,
|
package/dist/index.mjs
CHANGED
|
@@ -3014,8 +3014,8 @@ function useCoinbaseMintOrgAnymalNFT() {
|
|
|
3014
3014
|
const result = await sendOperationFn(
|
|
3015
3015
|
evmAddress,
|
|
3016
3016
|
validationContractAddress,
|
|
3017
|
-
|
|
3018
|
-
|
|
3017
|
+
ORGANIZATION_IMPL_ABI,
|
|
3018
|
+
ORG_FUNCTION,
|
|
3019
3019
|
executeArgs
|
|
3020
3020
|
);
|
|
3021
3021
|
return { ...result, status };
|
|
@@ -3024,9 +3024,42 @@ function useCoinbaseMintOrgAnymalNFT() {
|
|
|
3024
3024
|
);
|
|
3025
3025
|
}
|
|
3026
3026
|
|
|
3027
|
-
// src/utils/
|
|
3028
|
-
import { encodeFunctionData as encodeFunctionData3 } from "viem";
|
|
3027
|
+
// src/utils/coinbase/useCoinbaseClaimOrgActionReward.ts
|
|
3029
3028
|
import { useCallback as useCallback15 } from "react";
|
|
3029
|
+
import { encodeFunctionData as encodeFunctionData3 } from "viem";
|
|
3030
|
+
function useCoinbaseClaimOrgActionReward() {
|
|
3031
|
+
const { sendOperationFn, status } = useSendCoinbaseUserOperation();
|
|
3032
|
+
return useCallback15(
|
|
3033
|
+
async (evmSmartAddress, orgContractAddress, rewardableActionContractAddress, actionId, claimIndex) => {
|
|
3034
|
+
if (!evmSmartAddress || !orgContractAddress || !actionId || claimIndex === void 0) {
|
|
3035
|
+
return {
|
|
3036
|
+
success: false,
|
|
3037
|
+
message: "Coinbase Org Kibble Claim: Missing Data",
|
|
3038
|
+
status: "error"
|
|
3039
|
+
};
|
|
3040
|
+
}
|
|
3041
|
+
const claimCallData = encodeFunctionData3({
|
|
3042
|
+
abi: REWARDABLE_ACTIONS_ABI,
|
|
3043
|
+
functionName: "claimByIndex",
|
|
3044
|
+
args: [actionId, claimIndex]
|
|
3045
|
+
});
|
|
3046
|
+
const args = [rewardableActionContractAddress, claimCallData];
|
|
3047
|
+
const result = await sendOperationFn(
|
|
3048
|
+
evmSmartAddress,
|
|
3049
|
+
orgContractAddress,
|
|
3050
|
+
ORGANIZATION_IMPL_ABI,
|
|
3051
|
+
ORG_FUNCTION,
|
|
3052
|
+
args
|
|
3053
|
+
);
|
|
3054
|
+
return { ...result, status };
|
|
3055
|
+
},
|
|
3056
|
+
[sendOperationFn, status]
|
|
3057
|
+
);
|
|
3058
|
+
}
|
|
3059
|
+
|
|
3060
|
+
// src/utils/anymals/useMintAnymalNFT.ts
|
|
3061
|
+
import { encodeFunctionData as encodeFunctionData4 } from "viem";
|
|
3062
|
+
import { useCallback as useCallback16 } from "react";
|
|
3030
3063
|
|
|
3031
3064
|
// src/helpers/GasEstimateHelper.tsx
|
|
3032
3065
|
async function applyBundlerGasEstimator(account, bundlerClient, options) {
|
|
@@ -3107,7 +3140,7 @@ async function simulateCall(publicClient, target, abi, functionName, args, calle
|
|
|
3107
3140
|
|
|
3108
3141
|
// src/utils/anymals/useMintAnymalNFT.ts
|
|
3109
3142
|
function useMintAnymalNFT() {
|
|
3110
|
-
return
|
|
3143
|
+
return useCallback16(
|
|
3111
3144
|
async (pid, nftId, anymalTxId, dbAuthToken, validationContractAddress, smartAccount, bundlerClient) => {
|
|
3112
3145
|
if (!dbAuthToken || !nftId || !bundlerClient || !smartAccount || !pid || !validationContractAddress) {
|
|
3113
3146
|
return {
|
|
@@ -3123,7 +3156,7 @@ function useMintAnymalNFT() {
|
|
|
3123
3156
|
"petastic-signup-campaign-1",
|
|
3124
3157
|
anymalTxId
|
|
3125
3158
|
];
|
|
3126
|
-
const callData =
|
|
3159
|
+
const callData = encodeFunctionData4({
|
|
3127
3160
|
abi: PET_NFT_ABI,
|
|
3128
3161
|
functionName,
|
|
3129
3162
|
args
|
|
@@ -3159,9 +3192,9 @@ function useMintAnymalNFT() {
|
|
|
3159
3192
|
}
|
|
3160
3193
|
|
|
3161
3194
|
// src/utils/anymals/useSaveAnymalMetadata.ts
|
|
3162
|
-
import { useCallback as
|
|
3195
|
+
import { useCallback as useCallback17 } from "react";
|
|
3163
3196
|
function useSaveAnymalMetadata() {
|
|
3164
|
-
return
|
|
3197
|
+
return useCallback17(
|
|
3165
3198
|
async (userPid, anymalTxId, idToken, nftMetadataInput, authServiceBaseUrl) => {
|
|
3166
3199
|
const response = await fetch(`${authServiceBaseUrl}/process-nft`, {
|
|
3167
3200
|
method: "POST",
|
|
@@ -3189,7 +3222,7 @@ function useSaveAnymalMetadata() {
|
|
|
3189
3222
|
}
|
|
3190
3223
|
|
|
3191
3224
|
// src/utils/anymals/useUploadAnymalImage.ts
|
|
3192
|
-
import { useCallback as
|
|
3225
|
+
import { useCallback as useCallback18 } from "react";
|
|
3193
3226
|
|
|
3194
3227
|
// src/helpers/UploadImageHelper.tsx
|
|
3195
3228
|
function resizeImage(file, maxWidth = 800, maxHeight = 800, quality = 0.7) {
|
|
@@ -3246,7 +3279,7 @@ function toBase64(file) {
|
|
|
3246
3279
|
|
|
3247
3280
|
// src/utils/anymals/useUploadAnymalImage.ts
|
|
3248
3281
|
function useUploadAnymalImage() {
|
|
3249
|
-
return
|
|
3282
|
+
return useCallback18(
|
|
3250
3283
|
async (imageFile, type, idToken, authServiceBaseUrl, petType, breed, lifestage, anymalPid) => {
|
|
3251
3284
|
if (!imageFile || !idToken) {
|
|
3252
3285
|
return {
|
|
@@ -3307,10 +3340,10 @@ function useUploadAnymalImage() {
|
|
|
3307
3340
|
}
|
|
3308
3341
|
|
|
3309
3342
|
// src/utils/marketplace/useProcessPartialKibblePayment.ts
|
|
3310
|
-
import { useCallback as
|
|
3343
|
+
import { useCallback as useCallback19 } from "react";
|
|
3311
3344
|
|
|
3312
3345
|
// src/helpers/ProcessDirectPartialPayment.tsx
|
|
3313
|
-
import { encodeFunctionData as
|
|
3346
|
+
import { encodeFunctionData as encodeFunctionData5 } from "viem";
|
|
3314
3347
|
|
|
3315
3348
|
// src/helpers/SendUserOpWithRetries.tsx
|
|
3316
3349
|
async function sendUserOpWithRetries(bundlerClient, params, retries = 3, delay = 1e3) {
|
|
@@ -3370,7 +3403,7 @@ async function processDirectPartialPayment(marketplaceContract, smartAccount, bu
|
|
|
3370
3403
|
deadline,
|
|
3371
3404
|
backendSignature
|
|
3372
3405
|
];
|
|
3373
|
-
const partialPayCalldata =
|
|
3406
|
+
const partialPayCalldata = encodeFunctionData5({
|
|
3374
3407
|
abi: MARKETPLACE_ABI,
|
|
3375
3408
|
functionName,
|
|
3376
3409
|
args
|
|
@@ -3407,7 +3440,7 @@ async function processDirectPartialPayment(marketplaceContract, smartAccount, bu
|
|
|
3407
3440
|
|
|
3408
3441
|
// src/utils/marketplace/useProcessPartialKibblePayment.ts
|
|
3409
3442
|
function useProcessPartialKibblePayment() {
|
|
3410
|
-
return
|
|
3443
|
+
return useCallback19(
|
|
3411
3444
|
async (pid, nftId, orderId, dbAuthToken, marketplaceContract, smartAccount, bundlerClient, amountInTokens, maxTokenPayment, nonce, deadline, backendSignature) => {
|
|
3412
3445
|
if (!orderId || !dbAuthToken || !nftId || !bundlerClient || !smartAccount || !pid || !marketplaceContract || !amountInTokens || !maxTokenPayment || !nonce || !deadline) {
|
|
3413
3446
|
return {
|
|
@@ -3463,15 +3496,15 @@ function useProcessPartialKibblePayment() {
|
|
|
3463
3496
|
}
|
|
3464
3497
|
|
|
3465
3498
|
// src/utils/marketplace/useApproveKibbleToken.ts
|
|
3466
|
-
import { useCallback as
|
|
3499
|
+
import { useCallback as useCallback20 } from "react";
|
|
3467
3500
|
|
|
3468
3501
|
// src/helpers/ProcessDirectKibbleApproval.tsx
|
|
3469
|
-
import { encodeFunctionData as
|
|
3502
|
+
import { encodeFunctionData as encodeFunctionData6, erc20Abi } from "viem";
|
|
3470
3503
|
async function processDirectKibbleApproval(kibbleTokenAddress, spenderAddress, smartAccount, bundlerClient, approveAmount) {
|
|
3471
3504
|
try {
|
|
3472
3505
|
const functionName = "approve";
|
|
3473
3506
|
const args = [spenderAddress, approveAmount];
|
|
3474
|
-
const approveCalldata =
|
|
3507
|
+
const approveCalldata = encodeFunctionData6({
|
|
3475
3508
|
abi: erc20Abi,
|
|
3476
3509
|
functionName,
|
|
3477
3510
|
args
|
|
@@ -3508,7 +3541,7 @@ async function processDirectKibbleApproval(kibbleTokenAddress, spenderAddress, s
|
|
|
3508
3541
|
|
|
3509
3542
|
// src/utils/marketplace/useApproveKibbleToken.ts
|
|
3510
3543
|
function useApproveKibbleToken() {
|
|
3511
|
-
return
|
|
3544
|
+
return useCallback20(
|
|
3512
3545
|
async (kibbleTokenAddress, marketplaceContract, amount, smartAccount, bundlerClient) => {
|
|
3513
3546
|
try {
|
|
3514
3547
|
const result = await processDirectKibbleApproval(
|
|
@@ -3535,10 +3568,10 @@ function useApproveKibbleToken() {
|
|
|
3535
3568
|
}
|
|
3536
3569
|
|
|
3537
3570
|
// src/utils/organization/useCreateOrganizationBase.ts
|
|
3538
|
-
import { useCallback as
|
|
3539
|
-
import { decodeEventLog, encodeFunctionData as
|
|
3571
|
+
import { useCallback as useCallback21 } from "react";
|
|
3572
|
+
import { decodeEventLog, encodeFunctionData as encodeFunctionData7 } from "viem";
|
|
3540
3573
|
function useCreateOrganizationBase() {
|
|
3541
|
-
return
|
|
3574
|
+
return useCallback21(
|
|
3542
3575
|
/**
|
|
3543
3576
|
* Creates a new organization on-chain.
|
|
3544
3577
|
*
|
|
@@ -3560,7 +3593,7 @@ function useCreateOrganizationBase() {
|
|
|
3560
3593
|
try {
|
|
3561
3594
|
const functionName = "createOrganizationProxy";
|
|
3562
3595
|
const args = [ownerAddress, orgName, orgPid];
|
|
3563
|
-
const callData =
|
|
3596
|
+
const callData = encodeFunctionData7({
|
|
3564
3597
|
abi: ORGANIZATION_BEACON_ABI,
|
|
3565
3598
|
functionName,
|
|
3566
3599
|
args
|
|
@@ -3634,10 +3667,10 @@ function useCreateOrganizationBase() {
|
|
|
3634
3667
|
}
|
|
3635
3668
|
|
|
3636
3669
|
// src/utils/organization/useApproveOrgKibbleToken.ts
|
|
3637
|
-
import { useCallback as
|
|
3670
|
+
import { useCallback as useCallback22 } from "react";
|
|
3638
3671
|
|
|
3639
3672
|
// src/helpers/ProcessOrgKibbleApproval.tsx
|
|
3640
|
-
import { encodeFunctionData as
|
|
3673
|
+
import { encodeFunctionData as encodeFunctionData8, erc20Abi as erc20Abi3 } from "viem";
|
|
3641
3674
|
|
|
3642
3675
|
// src/helpers/WaitForAllowance.tsx
|
|
3643
3676
|
import { erc20Abi as erc20Abi2 } from "viem";
|
|
@@ -3674,13 +3707,13 @@ async function processOrgKibbleApproval(orgContractAddress, kibbleTokenAddress,
|
|
|
3674
3707
|
if (approveAmount <= 0n) {
|
|
3675
3708
|
return { success: false, message: "Approval amount must be greater than zero." };
|
|
3676
3709
|
}
|
|
3677
|
-
const approveCalldata =
|
|
3710
|
+
const approveCalldata = encodeFunctionData8({
|
|
3678
3711
|
abi: erc20Abi3,
|
|
3679
3712
|
functionName: "approve",
|
|
3680
3713
|
args: [partialPaymentModuleAddress, approveAmount]
|
|
3681
3714
|
});
|
|
3682
3715
|
const args = [kibbleTokenAddress, approveCalldata];
|
|
3683
|
-
const executeApproveCalldata =
|
|
3716
|
+
const executeApproveCalldata = encodeFunctionData8({
|
|
3684
3717
|
abi: ORGANIZATION_IMPL_ABI,
|
|
3685
3718
|
functionName: ORG_FUNCTION,
|
|
3686
3719
|
args
|
|
@@ -3732,7 +3765,7 @@ async function processOrgKibbleApproval(orgContractAddress, kibbleTokenAddress,
|
|
|
3732
3765
|
|
|
3733
3766
|
// src/utils/organization/useApproveOrgKibbleToken.ts
|
|
3734
3767
|
function useApproveOrgPartialPayment() {
|
|
3735
|
-
return
|
|
3768
|
+
return useCallback22(
|
|
3736
3769
|
async (orgContractAddress, kibbleTokenAddress, partialPaymentModuleAddress, managerSmartAccount, bundlerClient, approveAmount) => {
|
|
3737
3770
|
if (!orgContractAddress || !kibbleTokenAddress || !partialPaymentModuleAddress || !managerSmartAccount || !bundlerClient || !approveAmount) {
|
|
3738
3771
|
return {
|
|
@@ -3764,13 +3797,13 @@ function useApproveOrgPartialPayment() {
|
|
|
3764
3797
|
}
|
|
3765
3798
|
|
|
3766
3799
|
// src/utils/organization/useProcessOrgPartialKibblePayment.ts
|
|
3767
|
-
import { useCallback as
|
|
3800
|
+
import { useCallback as useCallback23 } from "react";
|
|
3768
3801
|
|
|
3769
3802
|
// src/helpers/ProcessOrgPartialPayment.tsx
|
|
3770
|
-
import { encodeFunctionData as
|
|
3803
|
+
import { encodeFunctionData as encodeFunctionData9 } from "viem";
|
|
3771
3804
|
async function processOrgPartialPayment(orgContractAddress, partialPaymentModuleAddress, managerSmartAccount, bundlerClient, orderId, anymalNftId, pid, amountInTokens, maxTokenPayment, nonce, deadline, backendSignature) {
|
|
3772
3805
|
try {
|
|
3773
|
-
const partialPayCalldata =
|
|
3806
|
+
const partialPayCalldata = encodeFunctionData9({
|
|
3774
3807
|
abi: MARKETPLACE_ABI,
|
|
3775
3808
|
functionName: "partialPay",
|
|
3776
3809
|
args: [
|
|
@@ -3785,7 +3818,7 @@ async function processOrgPartialPayment(orgContractAddress, partialPaymentModule
|
|
|
3785
3818
|
]
|
|
3786
3819
|
});
|
|
3787
3820
|
const args = [partialPaymentModuleAddress, partialPayCalldata];
|
|
3788
|
-
const executePartialPayCalldata =
|
|
3821
|
+
const executePartialPayCalldata = encodeFunctionData9({
|
|
3789
3822
|
abi: ORGANIZATION_IMPL_ABI,
|
|
3790
3823
|
functionName: ORG_FUNCTION,
|
|
3791
3824
|
args
|
|
@@ -3822,7 +3855,7 @@ async function processOrgPartialPayment(orgContractAddress, partialPaymentModule
|
|
|
3822
3855
|
|
|
3823
3856
|
// src/utils/organization/useProcessOrgPartialKibblePayment.ts
|
|
3824
3857
|
function useProcessOrgPartialKibblePayment() {
|
|
3825
|
-
return
|
|
3858
|
+
return useCallback23(
|
|
3826
3859
|
async (orgContractAddress, partialPaymentModuleAddress, managerSmartAccount, bundlerClient, orderId, anymalNftId, pid, amountInTokens, maxTokenPayment, nonce, deadline, backendSignature) => {
|
|
3827
3860
|
if (!orgContractAddress || !partialPaymentModuleAddress || !managerSmartAccount || !bundlerClient || !orderId || !pid || !nonce || !backendSignature) {
|
|
3828
3861
|
return {
|
|
@@ -3860,9 +3893,9 @@ function useProcessOrgPartialKibblePayment() {
|
|
|
3860
3893
|
}
|
|
3861
3894
|
|
|
3862
3895
|
// src/utils/organization/useUpdateOrgWalletAddress.ts
|
|
3863
|
-
import { useCallback as
|
|
3896
|
+
import { useCallback as useCallback24 } from "react";
|
|
3864
3897
|
function useUpdateOrgWalletAddress() {
|
|
3865
|
-
return
|
|
3898
|
+
return useCallback24(
|
|
3866
3899
|
async (dbAuthToken, docID, baseWalletAddress, endpoint) => {
|
|
3867
3900
|
try {
|
|
3868
3901
|
const mutation = `
|
|
@@ -3901,10 +3934,10 @@ function useUpdateOrgWalletAddress() {
|
|
|
3901
3934
|
}
|
|
3902
3935
|
|
|
3903
3936
|
// src/utils/organization/useMintOrgAnymalNFT.ts
|
|
3904
|
-
import { encodeFunctionData as
|
|
3905
|
-
import { useCallback as
|
|
3937
|
+
import { encodeFunctionData as encodeFunctionData10 } from "viem";
|
|
3938
|
+
import { useCallback as useCallback25 } from "react";
|
|
3906
3939
|
function useMintOrgAnymalNFT() {
|
|
3907
|
-
return
|
|
3940
|
+
return useCallback25(
|
|
3908
3941
|
async (orgContractAddress, pid, nftId, anymalTxId, dbAuthToken, validationContractAddress, managerSmartAccount, bundlerClient) => {
|
|
3909
3942
|
if (!dbAuthToken || !nftId || !bundlerClient || !managerSmartAccount || !pid || !validationContractAddress || !orgContractAddress) {
|
|
3910
3943
|
return {
|
|
@@ -3920,13 +3953,13 @@ function useMintOrgAnymalNFT() {
|
|
|
3920
3953
|
"petastic-signup-campaign-1",
|
|
3921
3954
|
anymalTxId
|
|
3922
3955
|
];
|
|
3923
|
-
const callData =
|
|
3956
|
+
const callData = encodeFunctionData10({
|
|
3924
3957
|
abi: PET_NFT_ABI,
|
|
3925
3958
|
functionName,
|
|
3926
3959
|
args
|
|
3927
3960
|
});
|
|
3928
3961
|
const executeArgs = [validationContractAddress, callData];
|
|
3929
|
-
const executeSubmitMetaCalldata =
|
|
3962
|
+
const executeSubmitMetaCalldata = encodeFunctionData10({
|
|
3930
3963
|
abi: ORGANIZATION_IMPL_ABI,
|
|
3931
3964
|
functionName: ORG_FUNCTION,
|
|
3932
3965
|
args: executeArgs
|
|
@@ -3989,9 +4022,9 @@ async function submitAction(idToken, pid, sourceType, payload, endpointBaseUrl)
|
|
|
3989
4022
|
}
|
|
3990
4023
|
|
|
3991
4024
|
// src/utils/actions/useFetchActions.ts
|
|
3992
|
-
import { useCallback as
|
|
4025
|
+
import { useCallback as useCallback26 } from "react";
|
|
3993
4026
|
function useFetchActions() {
|
|
3994
|
-
return
|
|
4027
|
+
return useCallback26(
|
|
3995
4028
|
async (idToken, actionsServiceBaseUrl, pid, status, limit, offset) => {
|
|
3996
4029
|
const params = new URLSearchParams({ pid });
|
|
3997
4030
|
if (status) params.set("status", status);
|
|
@@ -4020,9 +4053,9 @@ function useFetchActions() {
|
|
|
4020
4053
|
}
|
|
4021
4054
|
|
|
4022
4055
|
// src/utils/actions/useFetchActionDefinitions.ts
|
|
4023
|
-
import { useCallback as
|
|
4056
|
+
import { useCallback as useCallback27 } from "react";
|
|
4024
4057
|
function useFetchActionDefinitions() {
|
|
4025
|
-
return
|
|
4058
|
+
return useCallback27(
|
|
4026
4059
|
async (idToken, actionsServiceBaseUrl) => {
|
|
4027
4060
|
try {
|
|
4028
4061
|
const response = await fetch(
|
|
@@ -4119,10 +4152,10 @@ var convertToMultipleActionRecords = (frs) => frs.map(convertToActionRecord);
|
|
|
4119
4152
|
var convertToMultipleActionDefinitions = (frs) => frs.map(convertToActionDefinition);
|
|
4120
4153
|
|
|
4121
4154
|
// src/utils/application/useCreateUserAppData.ts
|
|
4122
|
-
import { useCallback as
|
|
4155
|
+
import { useCallback as useCallback28 } from "react";
|
|
4123
4156
|
import { v4 as uuid } from "uuid";
|
|
4124
4157
|
function useCreateUserAppData() {
|
|
4125
|
-
return
|
|
4158
|
+
return useCallback28(
|
|
4126
4159
|
async (appId, pid, dbAuthToken, endpoint) => {
|
|
4127
4160
|
if (!dbAuthToken || !pid || !dbAuthToken || !endpoint) return;
|
|
4128
4161
|
const appValues = {
|
|
@@ -4177,10 +4210,10 @@ function useCreateUserAppData() {
|
|
|
4177
4210
|
}
|
|
4178
4211
|
|
|
4179
4212
|
// src/utils/application/useCreateOrganizationAppData.ts
|
|
4180
|
-
import { useCallback as
|
|
4213
|
+
import { useCallback as useCallback29 } from "react";
|
|
4181
4214
|
import { v4 as uuid2 } from "uuid";
|
|
4182
4215
|
function useCreateOrganizationAppData() {
|
|
4183
|
-
return
|
|
4216
|
+
return useCallback29(
|
|
4184
4217
|
async (appId, pid, dbAuthToken, endpoint) => {
|
|
4185
4218
|
if (!dbAuthToken || !pid || !dbAuthToken || !endpoint) return;
|
|
4186
4219
|
const appValues = {
|
|
@@ -4234,10 +4267,10 @@ function useCreateOrganizationAppData() {
|
|
|
4234
4267
|
}
|
|
4235
4268
|
|
|
4236
4269
|
// src/utils/balance/useFetchBalance.ts
|
|
4237
|
-
import { useCallback as
|
|
4270
|
+
import { useCallback as useCallback30 } from "react";
|
|
4238
4271
|
import { erc20Abi as erc20Abi4, getAddress } from "viem";
|
|
4239
4272
|
function useFetchBalance() {
|
|
4240
|
-
return
|
|
4273
|
+
return useCallback30(
|
|
4241
4274
|
async (publicClient, walletAddress, kibbleTokenAddress) => {
|
|
4242
4275
|
try {
|
|
4243
4276
|
const balance = await publicClient.readContract({
|
|
@@ -4256,10 +4289,10 @@ function useFetchBalance() {
|
|
|
4256
4289
|
}
|
|
4257
4290
|
|
|
4258
4291
|
// src/utils/actions/useClaimActionReward.ts
|
|
4259
|
-
import { encodeFunctionData as
|
|
4260
|
-
import { useCallback as
|
|
4292
|
+
import { encodeFunctionData as encodeFunctionData11 } from "viem";
|
|
4293
|
+
import { useCallback as useCallback31 } from "react";
|
|
4261
4294
|
function useClaimActionReward() {
|
|
4262
|
-
return
|
|
4295
|
+
return useCallback31(
|
|
4263
4296
|
async (actionId, claimIndex, rewardableActionContractAddress, smartAccount, bundlerClient) => {
|
|
4264
4297
|
if (!actionId || claimIndex === void 0 || !bundlerClient || !smartAccount || !rewardableActionContractAddress) {
|
|
4265
4298
|
return {
|
|
@@ -4269,7 +4302,7 @@ function useClaimActionReward() {
|
|
|
4269
4302
|
}
|
|
4270
4303
|
const args = [actionId, claimIndex];
|
|
4271
4304
|
const functionName = "claimByIndex";
|
|
4272
|
-
const callData =
|
|
4305
|
+
const callData = encodeFunctionData11({
|
|
4273
4306
|
abi: REWARDABLE_ACTIONS_ABI,
|
|
4274
4307
|
functionName,
|
|
4275
4308
|
args
|
|
@@ -4305,10 +4338,10 @@ function useClaimActionReward() {
|
|
|
4305
4338
|
}
|
|
4306
4339
|
|
|
4307
4340
|
// src/utils/actions/useClaimOrgActionReward.ts
|
|
4308
|
-
import { encodeFunctionData as
|
|
4309
|
-
import { useCallback as
|
|
4341
|
+
import { encodeFunctionData as encodeFunctionData12 } from "viem";
|
|
4342
|
+
import { useCallback as useCallback32 } from "react";
|
|
4310
4343
|
function useClaimOrgActionReward() {
|
|
4311
|
-
return
|
|
4344
|
+
return useCallback32(
|
|
4312
4345
|
async (orgContractAddress, rewardableActionContractAddress, actionId, claimIndex, smartAccount, bundlerClient) => {
|
|
4313
4346
|
if (!orgContractAddress || !actionId || claimIndex === void 0 || !bundlerClient || !smartAccount) {
|
|
4314
4347
|
return {
|
|
@@ -4316,13 +4349,13 @@ function useClaimOrgActionReward() {
|
|
|
4316
4349
|
message: "Missing web3auth account info or contract address."
|
|
4317
4350
|
};
|
|
4318
4351
|
}
|
|
4319
|
-
const claimCallData =
|
|
4352
|
+
const claimCallData = encodeFunctionData12({
|
|
4320
4353
|
abi: REWARDABLE_ACTIONS_ABI,
|
|
4321
4354
|
functionName: "claimByIndex",
|
|
4322
4355
|
args: [actionId, claimIndex]
|
|
4323
4356
|
});
|
|
4324
4357
|
const args = [rewardableActionContractAddress, claimCallData];
|
|
4325
|
-
const executeClaimCalldata =
|
|
4358
|
+
const executeClaimCalldata = encodeFunctionData12({
|
|
4326
4359
|
abi: ORGANIZATION_IMPL_ABI,
|
|
4327
4360
|
functionName: ORG_FUNCTION,
|
|
4328
4361
|
args
|
|
@@ -4358,9 +4391,9 @@ function useClaimOrgActionReward() {
|
|
|
4358
4391
|
}
|
|
4359
4392
|
|
|
4360
4393
|
// src/utils/actions/useSubmitContractAction.ts
|
|
4361
|
-
import { useCallback as
|
|
4394
|
+
import { useCallback as useCallback33 } from "react";
|
|
4362
4395
|
function useSubmitContractAction() {
|
|
4363
|
-
return
|
|
4396
|
+
return useCallback33(
|
|
4364
4397
|
(idToken, pid, source, endpoint, payload) => {
|
|
4365
4398
|
if (!idToken || !pid || !source || !endpoint || !payload) return;
|
|
4366
4399
|
let sourceTypePayload = {};
|
|
@@ -4518,6 +4551,7 @@ export {
|
|
|
4518
4551
|
useClaimActionReward,
|
|
4519
4552
|
useClaimOrgActionReward,
|
|
4520
4553
|
useCoinbaseClaimActionReward,
|
|
4554
|
+
useCoinbaseClaimOrgActionReward,
|
|
4521
4555
|
useCoinbaseCreateOrganizationWallet,
|
|
4522
4556
|
useCoinbaseMintAnymalNFT,
|
|
4523
4557
|
useCoinbaseMintOrgAnymalNFT,
|
package/package.json
CHANGED