anymal-protocol 1.0.139 → 1.0.140
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 +45 -36
- package/dist/index.mjs +45 -36
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3043,52 +3043,61 @@ function useCoinbaseCreateOrganizationWallet() {
|
|
|
3043
3043
|
status: "error"
|
|
3044
3044
|
};
|
|
3045
3045
|
}
|
|
3046
|
-
const result = await sendOperationFn(
|
|
3047
|
-
evmAddress,
|
|
3048
|
-
orgContractAddress,
|
|
3049
|
-
ORGANIZATION_BEACON_ABI,
|
|
3050
|
-
"createOrganizationProxy",
|
|
3051
|
-
[ownerAddress, orgName, orgPid]
|
|
3052
|
-
);
|
|
3053
|
-
if (!result.success) {
|
|
3054
|
-
return { ...result, status: "error" };
|
|
3055
|
-
}
|
|
3056
|
-
let proxyAddress;
|
|
3057
3046
|
try {
|
|
3058
|
-
const
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3047
|
+
const result = await sendOperationFn(
|
|
3048
|
+
evmAddress,
|
|
3049
|
+
orgContractAddress,
|
|
3050
|
+
ORGANIZATION_BEACON_ABI,
|
|
3051
|
+
"createOrganizationProxy",
|
|
3052
|
+
[ownerAddress, orgName, orgPid]
|
|
3053
|
+
);
|
|
3054
|
+
if (!result.success) {
|
|
3055
|
+
return { ...result, status: "error" };
|
|
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 {
|
|
3073
3076
|
}
|
|
3074
|
-
} catch {
|
|
3075
3077
|
}
|
|
3076
3078
|
}
|
|
3079
|
+
} catch (e) {
|
|
3080
|
+
console.error("Failed to get transaction receipt:", e);
|
|
3081
|
+
}
|
|
3082
|
+
if (!proxyAddress) {
|
|
3083
|
+
return {
|
|
3084
|
+
...result,
|
|
3085
|
+
status
|
|
3086
|
+
};
|
|
3077
3087
|
}
|
|
3078
|
-
} catch (e) {
|
|
3079
|
-
console.error("Failed to get transaction receipt:", e);
|
|
3080
|
-
}
|
|
3081
|
-
if (!proxyAddress) {
|
|
3082
3088
|
return {
|
|
3083
3089
|
...result,
|
|
3090
|
+
proxyAddress,
|
|
3084
3091
|
status
|
|
3085
3092
|
};
|
|
3093
|
+
} catch (error) {
|
|
3094
|
+
console.error("Org wallet creation error", error);
|
|
3095
|
+
return {
|
|
3096
|
+
success: false,
|
|
3097
|
+
message: "Error",
|
|
3098
|
+
status: "error"
|
|
3099
|
+
};
|
|
3086
3100
|
}
|
|
3087
|
-
return {
|
|
3088
|
-
...result,
|
|
3089
|
-
proxyAddress,
|
|
3090
|
-
status
|
|
3091
|
-
};
|
|
3092
3101
|
},
|
|
3093
3102
|
[sendOperationFn, data, publicClient, status]
|
|
3094
3103
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -2964,52 +2964,61 @@ function useCoinbaseCreateOrganizationWallet() {
|
|
|
2964
2964
|
status: "error"
|
|
2965
2965
|
};
|
|
2966
2966
|
}
|
|
2967
|
-
const result = await sendOperationFn(
|
|
2968
|
-
evmAddress,
|
|
2969
|
-
orgContractAddress,
|
|
2970
|
-
ORGANIZATION_BEACON_ABI,
|
|
2971
|
-
"createOrganizationProxy",
|
|
2972
|
-
[ownerAddress, orgName, orgPid]
|
|
2973
|
-
);
|
|
2974
|
-
if (!result.success) {
|
|
2975
|
-
return { ...result, status: "error" };
|
|
2976
|
-
}
|
|
2977
|
-
let proxyAddress;
|
|
2978
2967
|
try {
|
|
2979
|
-
const
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2968
|
+
const result = await sendOperationFn(
|
|
2969
|
+
evmAddress,
|
|
2970
|
+
orgContractAddress,
|
|
2971
|
+
ORGANIZATION_BEACON_ABI,
|
|
2972
|
+
"createOrganizationProxy",
|
|
2973
|
+
[ownerAddress, orgName, orgPid]
|
|
2974
|
+
);
|
|
2975
|
+
if (!result.success) {
|
|
2976
|
+
return { ...result, status: "error" };
|
|
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 {
|
|
2994
2997
|
}
|
|
2995
|
-
} catch {
|
|
2996
2998
|
}
|
|
2997
2999
|
}
|
|
3000
|
+
} catch (e) {
|
|
3001
|
+
console.error("Failed to get transaction receipt:", e);
|
|
3002
|
+
}
|
|
3003
|
+
if (!proxyAddress) {
|
|
3004
|
+
return {
|
|
3005
|
+
...result,
|
|
3006
|
+
status
|
|
3007
|
+
};
|
|
2998
3008
|
}
|
|
2999
|
-
} catch (e) {
|
|
3000
|
-
console.error("Failed to get transaction receipt:", e);
|
|
3001
|
-
}
|
|
3002
|
-
if (!proxyAddress) {
|
|
3003
3009
|
return {
|
|
3004
3010
|
...result,
|
|
3011
|
+
proxyAddress,
|
|
3005
3012
|
status
|
|
3006
3013
|
};
|
|
3014
|
+
} catch (error) {
|
|
3015
|
+
console.error("Org wallet creation error", error);
|
|
3016
|
+
return {
|
|
3017
|
+
success: false,
|
|
3018
|
+
message: "Error",
|
|
3019
|
+
status: "error"
|
|
3020
|
+
};
|
|
3007
3021
|
}
|
|
3008
|
-
return {
|
|
3009
|
-
...result,
|
|
3010
|
-
proxyAddress,
|
|
3011
|
-
status
|
|
3012
|
-
};
|
|
3013
3022
|
},
|
|
3014
3023
|
[sendOperationFn, data, publicClient, status]
|
|
3015
3024
|
);
|
package/package.json
CHANGED