@axonfi/sdk 0.11.0 → 0.13.0
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.cjs +6 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -14
- package/dist/index.d.ts +11 -14
- package/dist/index.js +6 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1203,19 +1203,6 @@ var AxonVaultAbi = [
|
|
|
1203
1203
|
],
|
|
1204
1204
|
"stateMutability": "view"
|
|
1205
1205
|
},
|
|
1206
|
-
{
|
|
1207
|
-
"type": "function",
|
|
1208
|
-
"name": "operatorMaxDrainPerDay",
|
|
1209
|
-
"inputs": [],
|
|
1210
|
-
"outputs": [
|
|
1211
|
-
{
|
|
1212
|
-
"name": "",
|
|
1213
|
-
"type": "uint256",
|
|
1214
|
-
"internalType": "uint256"
|
|
1215
|
-
}
|
|
1216
|
-
],
|
|
1217
|
-
"stateMutability": "view"
|
|
1218
|
-
},
|
|
1219
1206
|
{
|
|
1220
1207
|
"type": "function",
|
|
1221
1208
|
"name": "owner",
|
|
@@ -3237,12 +3224,12 @@ async function getOperatorCeilings(publicClient, vaultAddress) {
|
|
|
3237
3224
|
minAiTriggerFloor
|
|
3238
3225
|
};
|
|
3239
3226
|
}
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3227
|
+
function operatorMaxDrainPerDay(ceilings) {
|
|
3228
|
+
const { maxOperatorBots, maxBotDailyLimit, vaultDailyAggregate } = ceilings;
|
|
3229
|
+
if (maxOperatorBots === 0n || maxBotDailyLimit === 0n) return 0;
|
|
3230
|
+
const theoretical = maxOperatorBots * maxBotDailyLimit;
|
|
3231
|
+
const raw = vaultDailyAggregate > 0n && vaultDailyAggregate < theoretical ? vaultDailyAggregate : theoretical;
|
|
3232
|
+
return Number(raw) / 1e6;
|
|
3246
3233
|
}
|
|
3247
3234
|
async function isErc1271BotsEnabled(publicClient, vaultAddress) {
|
|
3248
3235
|
return publicClient.readContract({
|