anymal-protocol 1.0.115 → 1.0.117
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.js +23 -22
- package/dist/index.mjs +30 -29
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1268,34 +1268,38 @@ var ORGANIZATION_IMPL_ABI = [
|
|
|
1268
1268
|
var import_react10 = require("react");
|
|
1269
1269
|
|
|
1270
1270
|
// src/helpers/GasEstimateHelper.tsx
|
|
1271
|
-
function applyBundlerGasEstimator(account, bundlerClient, options) {
|
|
1271
|
+
async function applyBundlerGasEstimator(account, bundlerClient, options) {
|
|
1272
1272
|
const {
|
|
1273
1273
|
callGasMultiplier = 1.2,
|
|
1274
1274
|
verificationGasMultiplier = 1.2,
|
|
1275
1275
|
preVerificationGasMultiplier = 2,
|
|
1276
|
+
maxCallGasPercentOfBlock = 0.1,
|
|
1277
|
+
// 10% for now?
|
|
1276
1278
|
debug = true
|
|
1277
1279
|
} = options || {};
|
|
1280
|
+
const publicClient = bundlerClient.client;
|
|
1281
|
+
const blockGasLimit = (await publicClient.getBlock()).gasLimit;
|
|
1282
|
+
const dynamicCallGasCap = blockGasLimit * BigInt(Math.floor(maxCallGasPercentOfBlock * 100)) / 100n;
|
|
1278
1283
|
account.userOperation = {
|
|
1279
1284
|
estimateGas: async (userOp) => {
|
|
1280
1285
|
const estimate = await bundlerClient.estimateUserOperationGas(userOp);
|
|
1281
|
-
const paddedCallGasLimit = BigInt(
|
|
1282
|
-
|
|
1283
|
-
);
|
|
1284
|
-
const
|
|
1285
|
-
estimate.verificationGasLimit * BigInt(Math.ceil(verificationGasMultiplier * 100)) / 100n
|
|
1286
|
-
);
|
|
1287
|
-
const paddedPreVerificationGas = BigInt(
|
|
1288
|
-
estimate.preVerificationGas * BigInt(Math.ceil(preVerificationGasMultiplier * 100)) / 100n
|
|
1289
|
-
);
|
|
1286
|
+
const paddedCallGasLimit = estimate.callGasLimit * BigInt(Math.ceil(callGasMultiplier * 100)) / 100n;
|
|
1287
|
+
const cappedCallGasLimit = paddedCallGasLimit > dynamicCallGasCap ? dynamicCallGasCap : paddedCallGasLimit;
|
|
1288
|
+
const paddedVerificationGasLimit = estimate.verificationGasLimit * BigInt(Math.ceil(verificationGasMultiplier * 100)) / 100n;
|
|
1289
|
+
const paddedPreVerificationGas = estimate.preVerificationGas * BigInt(Math.ceil(preVerificationGasMultiplier * 100)) / 100n;
|
|
1290
1290
|
if (debug) {
|
|
1291
1291
|
console.log("\u{1F4E6} Bundler Gas Estimates:");
|
|
1292
|
-
console.log("
|
|
1292
|
+
console.log(" blockGasLimit:", blockGasLimit.toString());
|
|
1293
|
+
console.log(" maxCallGasLimit (% cap):", dynamicCallGasCap.toString());
|
|
1294
|
+
console.log(" original callGasLimit:", estimate.callGasLimit.toString());
|
|
1295
|
+
console.log(" padded callGasLimit:", paddedCallGasLimit.toString());
|
|
1296
|
+
console.log(" capped callGasLimit:", cappedCallGasLimit.toString());
|
|
1293
1297
|
console.log(" verificationGasLimit:", paddedVerificationGasLimit.toString());
|
|
1294
1298
|
console.log(" preVerificationGas:", paddedPreVerificationGas.toString());
|
|
1295
1299
|
}
|
|
1296
1300
|
return {
|
|
1297
1301
|
...estimate,
|
|
1298
|
-
callGasLimit:
|
|
1302
|
+
callGasLimit: cappedCallGasLimit,
|
|
1299
1303
|
verificationGasLimit: paddedVerificationGasLimit,
|
|
1300
1304
|
preVerificationGas: paddedPreVerificationGas
|
|
1301
1305
|
};
|
|
@@ -1333,7 +1337,7 @@ function useMintAnymalNFT() {
|
|
|
1333
1337
|
data: callData
|
|
1334
1338
|
}
|
|
1335
1339
|
],
|
|
1336
|
-
|
|
1340
|
+
paymaster: true
|
|
1337
1341
|
});
|
|
1338
1342
|
await bundlerClient.waitForUserOperationReceipt({
|
|
1339
1343
|
hash: userOpHash,
|
|
@@ -1762,7 +1766,7 @@ function useProcessPartialKibblePayment() {
|
|
|
1762
1766
|
data: callData
|
|
1763
1767
|
}
|
|
1764
1768
|
],
|
|
1765
|
-
|
|
1769
|
+
paymaster: true
|
|
1766
1770
|
});
|
|
1767
1771
|
const receipt = await bundlerClient.waitForUserOperationReceipt({
|
|
1768
1772
|
hash: userOpHash,
|
|
@@ -1808,8 +1812,7 @@ function useApproveKibbleToken() {
|
|
|
1808
1812
|
data: callData
|
|
1809
1813
|
}
|
|
1810
1814
|
],
|
|
1811
|
-
|
|
1812
|
-
// maxFeePerGas: parseGwei("0.01"),
|
|
1815
|
+
paymaster: true
|
|
1813
1816
|
});
|
|
1814
1817
|
await bundlerClient.waitForUserOperationReceipt({
|
|
1815
1818
|
hash: userOpHash,
|
|
@@ -1953,8 +1956,7 @@ function useApproveOrgPartialPayment() {
|
|
|
1953
1956
|
data: executeApproveCalldata
|
|
1954
1957
|
}
|
|
1955
1958
|
],
|
|
1956
|
-
|
|
1957
|
-
// maxFeePerGas: parseGwei("0.01"),
|
|
1959
|
+
paymaster: true
|
|
1958
1960
|
});
|
|
1959
1961
|
await bundlerClient.waitForUserOperationReceipt({
|
|
1960
1962
|
hash: userOpApproveHash
|
|
@@ -2013,8 +2015,7 @@ function useProcessOrgPartialKibblePayment() {
|
|
|
2013
2015
|
data: executePartialPayCalldata
|
|
2014
2016
|
}
|
|
2015
2017
|
],
|
|
2016
|
-
|
|
2017
|
-
// maxFeePerGas: parseGwei("0.01"),
|
|
2018
|
+
paymaster: true
|
|
2018
2019
|
});
|
|
2019
2020
|
const receipt = await bundlerClient.waitForUserOperationReceipt({
|
|
2020
2021
|
hash: userOpPartialPayHash
|
|
@@ -2477,7 +2478,7 @@ function useClaimActionReward() {
|
|
|
2477
2478
|
data: callData
|
|
2478
2479
|
}
|
|
2479
2480
|
],
|
|
2480
|
-
|
|
2481
|
+
paymaster: true
|
|
2481
2482
|
});
|
|
2482
2483
|
await bundlerClient.waitForUserOperationReceipt({
|
|
2483
2484
|
hash: userOpHash,
|
|
@@ -2521,7 +2522,7 @@ function useClaimOrgActionReward() {
|
|
|
2521
2522
|
data: executeClaimCalldata
|
|
2522
2523
|
}
|
|
2523
2524
|
],
|
|
2524
|
-
|
|
2525
|
+
paymaster: true
|
|
2525
2526
|
});
|
|
2526
2527
|
await bundlerClient.waitForUserOperationReceipt({
|
|
2527
2528
|
hash: userOpHash,
|
package/dist/index.mjs
CHANGED
|
@@ -383,7 +383,7 @@ function useFetchNotifications() {
|
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
// src/utils/anymals/useMintAnymalNFT.ts
|
|
386
|
-
import { encodeFunctionData
|
|
386
|
+
import { encodeFunctionData } from "viem";
|
|
387
387
|
|
|
388
388
|
// src/helpers/BlockchainAbiHelper.tsx
|
|
389
389
|
var PET_NFT_ABI = [{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "AccessControlBadConfirmation", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "account", "type": "address" }, { "internalType": "bytes32", "name": "neededRole", "type": "bytes32" }], "name": "AccessControlUnauthorizedAccount", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "target", "type": "address" }], "name": "AddressEmptyCode", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "implementation", "type": "address" }], "name": "ERC1967InvalidImplementation", "type": "error" }, { "inputs": [], "name": "ERC1967NonPayable", "type": "error" }, { "inputs": [], "name": "EnforcedPause", "type": "error" }, { "inputs": [], "name": "ExpectedPause", "type": "error" }, { "inputs": [], "name": "FailedCall", "type": "error" }, { "inputs": [], "name": "InvalidInitialization", "type": "error" }, { "inputs": [], "name": "NotInitializing", "type": "error" }, { "inputs": [], "name": "UUPSUnauthorizedCallContext", "type": "error" }, { "inputs": [{ "internalType": "bytes32", "name": "slot", "type": "bytes32" }], "name": "UUPSUnsupportedProxiableUUID", "type": "error" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint64", "name": "version", "type": "uint64" }], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "string", "name": "pid", "type": "string" }, { "indexed": false, "internalType": "string", "name": "nftId", "type": "string" }, { "indexed": false, "internalType": "string", "name": "metadataURL", "type": "string" }, { "indexed": false, "internalType": "uint256", "name": "campaignId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "rewardAmount", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "_anymalTxId", "type": "string" }], "name": "MetadataApproved", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "string", "name": "anymalTxId", "type": "string" }, { "indexed": false, "internalType": "string", "name": "pid", "type": "string" }, { "indexed": false, "internalType": "string", "name": "nftId", "type": "string" }, { "indexed": false, "internalType": "string", "name": "metadataURL", "type": "string" }, { "indexed": false, "internalType": "uint256", "name": "campaignId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "rewardAmount", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "_anymalTxId", "type": "string" }], "name": "MetadataRejected", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "string", "name": "pid", "type": "string" }, { "indexed": false, "internalType": "string", "name": "nftId", "type": "string" }, { "indexed": false, "internalType": "string", "name": "metadataURL", "type": "string" }, { "indexed": false, "internalType": "uint256", "name": "campaignId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "rewardAmount", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "_anymalTxId", "type": "string" }], "name": "MetadataSubmitted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "account", "type": "address" }], "name": "Paused", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "string", "name": "pid", "type": "string" }, { "indexed": false, "internalType": "string", "name": "nftId", "type": "string" }, { "indexed": false, "internalType": "uint256", "name": "rewardAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "campaignId", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "_anymalTxId", "type": "string" }], "name": "RewardDistributed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "indexed": true, "internalType": "bytes32", "name": "previousAdminRole", "type": "bytes32" }, { "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" }], "name": "RoleAdminChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }], "name": "RoleGranted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }], "name": "RoleRevoked", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "account", "type": "address" }], "name": "Unpaused", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "implementation", "type": "address" }], "name": "Upgraded", "type": "event" }, { "inputs": [], "name": "APPROVER_ROLE", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "DEFAULT_ADMIN_ROLE", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "UPGRADE_INTERFACE_VERSION", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "string", "name": "_pid", "type": "string" }, { "internalType": "string", "name": "_nftId", "type": "string" }, { "internalType": "string", "name": "_metadataURL", "type": "string" }, { "internalType": "uint256", "name": "_campaignId", "type": "uint256" }, { "internalType": "string", "name": "_anymalTxId", "type": "string" }], "name": "approveMetadata", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "campaignCount", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "campaigns", "outputs": [{ "internalType": "string", "name": "name", "type": "string" }, { "internalType": "uint256", "name": "rewardAmount", "type": "uint256" }, { "internalType": "bool", "name": "isActive", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "string", "name": "_name", "type": "string" }, { "internalType": "uint256", "name": "_rewardAmount", "type": "uint256" }], "name": "createCampaign", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "defaultRewardAmount", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], "name": "getRoleAdmin", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "account", "type": "address" }], "name": "grantRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "account", "type": "address" }], "name": "hasRole", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "initialOwner", "type": "address" }, { "internalType": "contract IERC20", "name": "_rewardToken", "type": "address" }, { "internalType": "contract IPetToken", "name": "_petToken", "type": "address" }, { "internalType": "uint256", "name": "_defaultRewardAmount", "type": "uint256" }], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "pause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "paused", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "petToken", "outputs": [{ "internalType": "contract IPetToken", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "proxiableUUID", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "callerConfirmation", "type": "address" }], "name": "renounceRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "account", "type": "address" }], "name": "revokeRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "rewardToken", "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "string", "name": "_pid", "type": "string" }, { "internalType": "string", "name": "_nftId", "type": "string" }, { "internalType": "string", "name": "_metadataURL", "type": "string" }, { "internalType": "uint256", "name": "_campaignId", "type": "uint256" }, { "internalType": "string", "name": "_anymalTxId", "type": "string" }], "name": "submitMetadata", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "string", "name": "_pid", "type": "string" }, { "internalType": "string", "name": "_nftId", "type": "string" }, { "internalType": "string", "name": "_metadataURL", "type": "string" }, { "internalType": "string", "name": "_campaignName", "type": "string" }, { "internalType": "string", "name": "_anymalTxId", "type": "string" }], "name": "submitMetadataByCampaignName", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], "name": "supportsInterface", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "unpause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_campaignId", "type": "uint256" }, { "internalType": "uint256", "name": "_rewardAmount", "type": "uint256" }, { "internalType": "bool", "name": "_isActive", "type": "bool" }], "name": "updateCampaign", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_rewardAmount", "type": "uint256" }], "name": "updateDefaultReward", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newImplementation", "type": "address" }, { "internalType": "bytes", "name": "data", "type": "bytes" }], "name": "upgradeToAndCall", "outputs": [], "stateMutability": "payable", "type": "function" }];
|
|
@@ -1205,34 +1205,38 @@ var ORGANIZATION_IMPL_ABI = [
|
|
|
1205
1205
|
import { useCallback as useCallback10 } from "react";
|
|
1206
1206
|
|
|
1207
1207
|
// src/helpers/GasEstimateHelper.tsx
|
|
1208
|
-
function applyBundlerGasEstimator(account, bundlerClient, options) {
|
|
1208
|
+
async function applyBundlerGasEstimator(account, bundlerClient, options) {
|
|
1209
1209
|
const {
|
|
1210
1210
|
callGasMultiplier = 1.2,
|
|
1211
1211
|
verificationGasMultiplier = 1.2,
|
|
1212
1212
|
preVerificationGasMultiplier = 2,
|
|
1213
|
+
maxCallGasPercentOfBlock = 0.1,
|
|
1214
|
+
// 10% for now?
|
|
1213
1215
|
debug = true
|
|
1214
1216
|
} = options || {};
|
|
1217
|
+
const publicClient = bundlerClient.client;
|
|
1218
|
+
const blockGasLimit = (await publicClient.getBlock()).gasLimit;
|
|
1219
|
+
const dynamicCallGasCap = blockGasLimit * BigInt(Math.floor(maxCallGasPercentOfBlock * 100)) / 100n;
|
|
1215
1220
|
account.userOperation = {
|
|
1216
1221
|
estimateGas: async (userOp) => {
|
|
1217
1222
|
const estimate = await bundlerClient.estimateUserOperationGas(userOp);
|
|
1218
|
-
const paddedCallGasLimit = BigInt(
|
|
1219
|
-
|
|
1220
|
-
);
|
|
1221
|
-
const
|
|
1222
|
-
estimate.verificationGasLimit * BigInt(Math.ceil(verificationGasMultiplier * 100)) / 100n
|
|
1223
|
-
);
|
|
1224
|
-
const paddedPreVerificationGas = BigInt(
|
|
1225
|
-
estimate.preVerificationGas * BigInt(Math.ceil(preVerificationGasMultiplier * 100)) / 100n
|
|
1226
|
-
);
|
|
1223
|
+
const paddedCallGasLimit = estimate.callGasLimit * BigInt(Math.ceil(callGasMultiplier * 100)) / 100n;
|
|
1224
|
+
const cappedCallGasLimit = paddedCallGasLimit > dynamicCallGasCap ? dynamicCallGasCap : paddedCallGasLimit;
|
|
1225
|
+
const paddedVerificationGasLimit = estimate.verificationGasLimit * BigInt(Math.ceil(verificationGasMultiplier * 100)) / 100n;
|
|
1226
|
+
const paddedPreVerificationGas = estimate.preVerificationGas * BigInt(Math.ceil(preVerificationGasMultiplier * 100)) / 100n;
|
|
1227
1227
|
if (debug) {
|
|
1228
1228
|
console.log("\u{1F4E6} Bundler Gas Estimates:");
|
|
1229
|
-
console.log("
|
|
1229
|
+
console.log(" blockGasLimit:", blockGasLimit.toString());
|
|
1230
|
+
console.log(" maxCallGasLimit (% cap):", dynamicCallGasCap.toString());
|
|
1231
|
+
console.log(" original callGasLimit:", estimate.callGasLimit.toString());
|
|
1232
|
+
console.log(" padded callGasLimit:", paddedCallGasLimit.toString());
|
|
1233
|
+
console.log(" capped callGasLimit:", cappedCallGasLimit.toString());
|
|
1230
1234
|
console.log(" verificationGasLimit:", paddedVerificationGasLimit.toString());
|
|
1231
1235
|
console.log(" preVerificationGas:", paddedPreVerificationGas.toString());
|
|
1232
1236
|
}
|
|
1233
1237
|
return {
|
|
1234
1238
|
...estimate,
|
|
1235
|
-
callGasLimit:
|
|
1239
|
+
callGasLimit: cappedCallGasLimit,
|
|
1236
1240
|
verificationGasLimit: paddedVerificationGasLimit,
|
|
1237
1241
|
preVerificationGas: paddedPreVerificationGas
|
|
1238
1242
|
};
|
|
@@ -1270,7 +1274,7 @@ function useMintAnymalNFT() {
|
|
|
1270
1274
|
data: callData
|
|
1271
1275
|
}
|
|
1272
1276
|
],
|
|
1273
|
-
|
|
1277
|
+
paymaster: true
|
|
1274
1278
|
});
|
|
1275
1279
|
await bundlerClient.waitForUserOperationReceipt({
|
|
1276
1280
|
hash: userOpHash,
|
|
@@ -1655,7 +1659,7 @@ function useFetchAnymals() {
|
|
|
1655
1659
|
}
|
|
1656
1660
|
|
|
1657
1661
|
// src/utils/marketplace/useProcessPartialKibblePayment.ts
|
|
1658
|
-
import { encodeFunctionData as encodeFunctionData2
|
|
1662
|
+
import { encodeFunctionData as encodeFunctionData2 } from "viem";
|
|
1659
1663
|
import { useCallback as useCallback17 } from "react";
|
|
1660
1664
|
function useProcessPartialKibblePayment() {
|
|
1661
1665
|
return useCallback17(
|
|
@@ -1699,7 +1703,7 @@ function useProcessPartialKibblePayment() {
|
|
|
1699
1703
|
data: callData
|
|
1700
1704
|
}
|
|
1701
1705
|
],
|
|
1702
|
-
|
|
1706
|
+
paymaster: true
|
|
1703
1707
|
});
|
|
1704
1708
|
const receipt = await bundlerClient.waitForUserOperationReceipt({
|
|
1705
1709
|
hash: userOpHash,
|
|
@@ -1720,7 +1724,7 @@ function useProcessPartialKibblePayment() {
|
|
|
1720
1724
|
}
|
|
1721
1725
|
|
|
1722
1726
|
// src/utils/marketplace/useApproveKibbleToken.ts
|
|
1723
|
-
import { encodeFunctionData as encodeFunctionData3, erc20Abi
|
|
1727
|
+
import { encodeFunctionData as encodeFunctionData3, erc20Abi } from "viem";
|
|
1724
1728
|
import { useCallback as useCallback18 } from "react";
|
|
1725
1729
|
function useApproveKibbleToken() {
|
|
1726
1730
|
return useCallback18(
|
|
@@ -1745,8 +1749,7 @@ function useApproveKibbleToken() {
|
|
|
1745
1749
|
data: callData
|
|
1746
1750
|
}
|
|
1747
1751
|
],
|
|
1748
|
-
|
|
1749
|
-
// maxFeePerGas: parseGwei("0.01"),
|
|
1752
|
+
paymaster: true
|
|
1750
1753
|
});
|
|
1751
1754
|
await bundlerClient.waitForUserOperationReceipt({
|
|
1752
1755
|
hash: userOpHash,
|
|
@@ -1860,7 +1863,7 @@ function useCreateOrganizationBase() {
|
|
|
1860
1863
|
|
|
1861
1864
|
// src/utils/organization/useApproveOrgKibbleToken.ts
|
|
1862
1865
|
import { useCallback as useCallback20 } from "react";
|
|
1863
|
-
import { encodeFunctionData as encodeFunctionData5, erc20Abi as erc20Abi2
|
|
1866
|
+
import { encodeFunctionData as encodeFunctionData5, erc20Abi as erc20Abi2 } from "viem";
|
|
1864
1867
|
function useApproveOrgPartialPayment() {
|
|
1865
1868
|
return useCallback20(
|
|
1866
1869
|
async (orgContractAddress, kibbleTokenAddress, partialPaymentModuleAddress, managerSmartAccount, bundlerClient, approveAmount) => {
|
|
@@ -1890,8 +1893,7 @@ function useApproveOrgPartialPayment() {
|
|
|
1890
1893
|
data: executeApproveCalldata
|
|
1891
1894
|
}
|
|
1892
1895
|
],
|
|
1893
|
-
|
|
1894
|
-
// maxFeePerGas: parseGwei("0.01"),
|
|
1896
|
+
paymaster: true
|
|
1895
1897
|
});
|
|
1896
1898
|
await bundlerClient.waitForUserOperationReceipt({
|
|
1897
1899
|
hash: userOpApproveHash
|
|
@@ -1911,7 +1913,7 @@ function useApproveOrgPartialPayment() {
|
|
|
1911
1913
|
|
|
1912
1914
|
// src/utils/organization/useProcessOrgPartialKibblePayment.ts
|
|
1913
1915
|
import { useCallback as useCallback21 } from "react";
|
|
1914
|
-
import { encodeFunctionData as encodeFunctionData6
|
|
1916
|
+
import { encodeFunctionData as encodeFunctionData6 } from "viem";
|
|
1915
1917
|
function useProcessOrgPartialKibblePayment() {
|
|
1916
1918
|
return useCallback21(
|
|
1917
1919
|
async (orgContractAddress, partialPaymentModuleAddress, managerSmartAccount, bundlerClient, orderId, anymalNftId, pid, amountInTokens, maxTokenPayment, nonce, deadline, backendSignature) => {
|
|
@@ -1950,8 +1952,7 @@ function useProcessOrgPartialKibblePayment() {
|
|
|
1950
1952
|
data: executePartialPayCalldata
|
|
1951
1953
|
}
|
|
1952
1954
|
],
|
|
1953
|
-
|
|
1954
|
-
// maxFeePerGas: parseGwei("0.01"),
|
|
1955
|
+
paymaster: true
|
|
1955
1956
|
});
|
|
1956
1957
|
const receipt = await bundlerClient.waitForUserOperationReceipt({
|
|
1957
1958
|
hash: userOpPartialPayHash
|
|
@@ -2309,7 +2310,7 @@ function useFetchBalance() {
|
|
|
2309
2310
|
}
|
|
2310
2311
|
|
|
2311
2312
|
// src/utils/actions/useClaimActionReward.ts
|
|
2312
|
-
import { encodeFunctionData as encodeFunctionData7
|
|
2313
|
+
import { encodeFunctionData as encodeFunctionData7 } from "viem";
|
|
2313
2314
|
import { useCallback as useCallback28 } from "react";
|
|
2314
2315
|
function useClaimActionReward() {
|
|
2315
2316
|
return useCallback28(
|
|
@@ -2334,7 +2335,7 @@ function useClaimActionReward() {
|
|
|
2334
2335
|
data: callData
|
|
2335
2336
|
}
|
|
2336
2337
|
],
|
|
2337
|
-
|
|
2338
|
+
paymaster: true
|
|
2338
2339
|
});
|
|
2339
2340
|
await bundlerClient.waitForUserOperationReceipt({
|
|
2340
2341
|
hash: userOpHash,
|
|
@@ -2348,7 +2349,7 @@ function useClaimActionReward() {
|
|
|
2348
2349
|
}
|
|
2349
2350
|
|
|
2350
2351
|
// src/utils/actions/useClaimOrgActionReward.ts
|
|
2351
|
-
import { encodeFunctionData as encodeFunctionData8
|
|
2352
|
+
import { encodeFunctionData as encodeFunctionData8 } from "viem";
|
|
2352
2353
|
import { useCallback as useCallback29 } from "react";
|
|
2353
2354
|
function useClaimOrgActionReward() {
|
|
2354
2355
|
return useCallback29(
|
|
@@ -2378,7 +2379,7 @@ function useClaimOrgActionReward() {
|
|
|
2378
2379
|
data: executeClaimCalldata
|
|
2379
2380
|
}
|
|
2380
2381
|
],
|
|
2381
|
-
|
|
2382
|
+
paymaster: true
|
|
2382
2383
|
});
|
|
2383
2384
|
await bundlerClient.waitForUserOperationReceipt({
|
|
2384
2385
|
hash: userOpHash,
|
package/package.json
CHANGED