anymal-protocol 1.0.140 → 1.0.141
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 +0 -32
- package/dist/index.mjs +3 -35
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3054,40 +3054,8 @@ function useCoinbaseCreateOrganizationWallet() {
|
|
|
3054
3054
|
if (!result.success) {
|
|
3055
3055
|
return { ...result, status: "error" };
|
|
3056
3056
|
}
|
|
3057
|
-
let proxyAddress;
|
|
3058
|
-
try {
|
|
3059
|
-
const txHash = data?.receipts?.[0]?.transactionHash || data?.transactionHash;
|
|
3060
|
-
if (txHash) {
|
|
3061
|
-
const receipt = await publicClient.getTransactionReceipt({
|
|
3062
|
-
hash: txHash
|
|
3063
|
-
});
|
|
3064
|
-
for (const log of receipt.logs) {
|
|
3065
|
-
try {
|
|
3066
|
-
const decoded = (0, import_viem3.decodeEventLog)({
|
|
3067
|
-
abi: ORGANIZATION_BEACON_ABI,
|
|
3068
|
-
data: log.data,
|
|
3069
|
-
topics: log.topics
|
|
3070
|
-
});
|
|
3071
|
-
if (decoded.eventName === "NewOrganizationCreated") {
|
|
3072
|
-
proxyAddress = decoded.args.proxyAddress;
|
|
3073
|
-
break;
|
|
3074
|
-
}
|
|
3075
|
-
} catch {
|
|
3076
|
-
}
|
|
3077
|
-
}
|
|
3078
|
-
}
|
|
3079
|
-
} catch (e) {
|
|
3080
|
-
console.error("Failed to get transaction receipt:", e);
|
|
3081
|
-
}
|
|
3082
|
-
if (!proxyAddress) {
|
|
3083
|
-
return {
|
|
3084
|
-
...result,
|
|
3085
|
-
status
|
|
3086
|
-
};
|
|
3087
|
-
}
|
|
3088
3057
|
return {
|
|
3089
3058
|
...result,
|
|
3090
|
-
proxyAddress,
|
|
3091
3059
|
status
|
|
3092
3060
|
};
|
|
3093
3061
|
} catch (error) {
|
package/dist/index.mjs
CHANGED
|
@@ -2934,7 +2934,7 @@ function useCoinbaseMintAnymalNFT() {
|
|
|
2934
2934
|
|
|
2935
2935
|
// src/utils/coinbase/useCoinbaseCreateOrganizationWallet.ts
|
|
2936
2936
|
import { useCallback as useCallback13, useMemo as useMemo2 } from "react";
|
|
2937
|
-
import { createPublicClient as createPublicClient2,
|
|
2937
|
+
import { createPublicClient as createPublicClient2, http as http2 } from "viem";
|
|
2938
2938
|
import { baseSepolia as baseSepolia2 } from "viem/chains";
|
|
2939
2939
|
function useCoinbaseCreateOrganizationWallet() {
|
|
2940
2940
|
const { sendOperationFn, data, status } = useSendCoinbaseUserOperation();
|
|
@@ -2975,40 +2975,8 @@ function useCoinbaseCreateOrganizationWallet() {
|
|
|
2975
2975
|
if (!result.success) {
|
|
2976
2976
|
return { ...result, status: "error" };
|
|
2977
2977
|
}
|
|
2978
|
-
let proxyAddress;
|
|
2979
|
-
try {
|
|
2980
|
-
const txHash = data?.receipts?.[0]?.transactionHash || data?.transactionHash;
|
|
2981
|
-
if (txHash) {
|
|
2982
|
-
const receipt = await publicClient.getTransactionReceipt({
|
|
2983
|
-
hash: txHash
|
|
2984
|
-
});
|
|
2985
|
-
for (const log of receipt.logs) {
|
|
2986
|
-
try {
|
|
2987
|
-
const decoded = decodeEventLog({
|
|
2988
|
-
abi: ORGANIZATION_BEACON_ABI,
|
|
2989
|
-
data: log.data,
|
|
2990
|
-
topics: log.topics
|
|
2991
|
-
});
|
|
2992
|
-
if (decoded.eventName === "NewOrganizationCreated") {
|
|
2993
|
-
proxyAddress = decoded.args.proxyAddress;
|
|
2994
|
-
break;
|
|
2995
|
-
}
|
|
2996
|
-
} catch {
|
|
2997
|
-
}
|
|
2998
|
-
}
|
|
2999
|
-
}
|
|
3000
|
-
} catch (e) {
|
|
3001
|
-
console.error("Failed to get transaction receipt:", e);
|
|
3002
|
-
}
|
|
3003
|
-
if (!proxyAddress) {
|
|
3004
|
-
return {
|
|
3005
|
-
...result,
|
|
3006
|
-
status
|
|
3007
|
-
};
|
|
3008
|
-
}
|
|
3009
2978
|
return {
|
|
3010
2979
|
...result,
|
|
3011
|
-
proxyAddress,
|
|
3012
2980
|
status
|
|
3013
2981
|
};
|
|
3014
2982
|
} catch (error) {
|
|
@@ -3536,7 +3504,7 @@ function useApproveKibbleToken() {
|
|
|
3536
3504
|
|
|
3537
3505
|
// src/utils/organization/useCreateOrganizationBase.ts
|
|
3538
3506
|
import { useCallback as useCallback19 } from "react";
|
|
3539
|
-
import { decodeEventLog
|
|
3507
|
+
import { decodeEventLog, encodeFunctionData as encodeFunctionData5 } from "viem";
|
|
3540
3508
|
function useCreateOrganizationBase() {
|
|
3541
3509
|
return useCallback19(
|
|
3542
3510
|
/**
|
|
@@ -3598,7 +3566,7 @@ function useCreateOrganizationBase() {
|
|
|
3598
3566
|
let proxyAddress;
|
|
3599
3567
|
for (const log of txReceipt.logs) {
|
|
3600
3568
|
try {
|
|
3601
|
-
const decoded =
|
|
3569
|
+
const decoded = decodeEventLog({
|
|
3602
3570
|
abi: ORGANIZATION_BEACON_ABI,
|
|
3603
3571
|
data: log.data,
|
|
3604
3572
|
topics: log.topics
|
package/package.json
CHANGED