anymal-protocol 1.0.126 → 1.0.128
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 +15 -10
- package/dist/index.mjs +15 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2935,19 +2935,24 @@ function useCoinbaseClaimActionReward() {
|
|
|
2935
2935
|
if (!evmAddress || !actionId || claimIndex === void 0 || !validationContractAddress) {
|
|
2936
2936
|
return {
|
|
2937
2937
|
success: false,
|
|
2938
|
-
message: "Missing
|
|
2938
|
+
message: "Missing important data",
|
|
2939
2939
|
status: "error"
|
|
2940
2940
|
};
|
|
2941
2941
|
}
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2942
|
+
try {
|
|
2943
|
+
const args = [actionId, claimIndex];
|
|
2944
|
+
const functionName = "claimByIndex";
|
|
2945
|
+
const callData = (0, import_viem2.encodeFunctionData)({
|
|
2946
|
+
abi: REWARDABLE_ACTIONS_ABI,
|
|
2947
|
+
functionName,
|
|
2948
|
+
args
|
|
2949
|
+
});
|
|
2950
|
+
await sendOperationFn(evmAddress, callData, validationContractAddress);
|
|
2951
|
+
return { success: true, message: "Reward claimed", status };
|
|
2952
|
+
} catch (error) {
|
|
2953
|
+
console.error(error);
|
|
2954
|
+
return { success: false, message: "Reward not claimed", status };
|
|
2955
|
+
}
|
|
2951
2956
|
},
|
|
2952
2957
|
[]
|
|
2953
2958
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -2857,19 +2857,24 @@ function useCoinbaseClaimActionReward() {
|
|
|
2857
2857
|
if (!evmAddress || !actionId || claimIndex === void 0 || !validationContractAddress) {
|
|
2858
2858
|
return {
|
|
2859
2859
|
success: false,
|
|
2860
|
-
message: "Missing
|
|
2860
|
+
message: "Missing important data",
|
|
2861
2861
|
status: "error"
|
|
2862
2862
|
};
|
|
2863
2863
|
}
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2864
|
+
try {
|
|
2865
|
+
const args = [actionId, claimIndex];
|
|
2866
|
+
const functionName = "claimByIndex";
|
|
2867
|
+
const callData = encodeFunctionData({
|
|
2868
|
+
abi: REWARDABLE_ACTIONS_ABI,
|
|
2869
|
+
functionName,
|
|
2870
|
+
args
|
|
2871
|
+
});
|
|
2872
|
+
await sendOperationFn(evmAddress, callData, validationContractAddress);
|
|
2873
|
+
return { success: true, message: "Reward claimed", status };
|
|
2874
|
+
} catch (error) {
|
|
2875
|
+
console.error(error);
|
|
2876
|
+
return { success: false, message: "Reward not claimed", status };
|
|
2877
|
+
}
|
|
2873
2878
|
},
|
|
2874
2879
|
[]
|
|
2875
2880
|
);
|
package/package.json
CHANGED