@elgora/cli 7.2.2 → 7.2.3
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/cli.js +15 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3215,6 +3215,16 @@ function decodeBountyStatus(status) {
|
|
|
3215
3215
|
}
|
|
3216
3216
|
return decoded;
|
|
3217
3217
|
}
|
|
3218
|
+
var BPS_DENOMINATOR = 10000n;
|
|
3219
|
+
function settlementAmounts(escrowAmount, treasuryFeeBps, guardianFeeBps) {
|
|
3220
|
+
const treasuryAmount = escrowAmount * BigInt(treasuryFeeBps) / BPS_DENOMINATOR;
|
|
3221
|
+
const guardianAmount = escrowAmount * BigInt(guardianFeeBps) / BPS_DENOMINATOR;
|
|
3222
|
+
return {
|
|
3223
|
+
treasuryAmount,
|
|
3224
|
+
guardianAmount,
|
|
3225
|
+
winnerPool: escrowAmount - treasuryAmount - guardianAmount
|
|
3226
|
+
};
|
|
3227
|
+
}
|
|
3218
3228
|
|
|
3219
3229
|
// ../../packages/core/src/api/bounty-detail.ts
|
|
3220
3230
|
import { zeroAddress } from "viem";
|
|
@@ -4101,6 +4111,11 @@ async function main(env = process.env, argv = process.argv.slice(2)) {
|
|
|
4101
4111
|
`Award for bounty_id ${args.bountyId.toString()} is already claimed or partially claimed`
|
|
4102
4112
|
);
|
|
4103
4113
|
}
|
|
4114
|
+
claimableAmount = settlementAmounts(
|
|
4115
|
+
parameters.escrowAmount,
|
|
4116
|
+
parameters.treasuryFeeBps,
|
|
4117
|
+
parameters.guardianFeeBps
|
|
4118
|
+
).winnerPool;
|
|
4104
4119
|
functionName = "claimAward";
|
|
4105
4120
|
} else if (status === "no_valid_submission" || status === "timed_out") {
|
|
4106
4121
|
if (parameters.poster.toLowerCase() !== normalizedClaimant) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elgora/cli",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.3",
|
|
4
4
|
"description": "Command-line client for Elgora, a decentralized bounty marketplace for science. Lets Posters, Solvers, and Guardians interact with Elgora's public API and on-chain contracts.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|