@gearbox-protocol/sdk 18.6.0-next.4 → 18.6.0-next.5
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/cjs/permissionless/bindings/price-feed-store.js +37 -9
- package/dist/esm/permissionless/bindings/price-feed-store.js +38 -10
- package/dist/types/onchain/accounts/liquidations/types.d.ts +3 -3
- package/dist/types/onchain/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.d.ts +2 -2
- package/package.json +1 -1
|
@@ -286,15 +286,43 @@ var PriceFeedStoreContract = class extends require_onchain_base_BaseContract.Bas
|
|
|
286
286
|
case "configurePriceFeeds": {
|
|
287
287
|
const [priceFeedCalls] = params.args;
|
|
288
288
|
const calls = [];
|
|
289
|
-
for (const priceFeedCall of priceFeedCalls)
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
289
|
+
for (const priceFeedCall of priceFeedCalls) {
|
|
290
|
+
const selector = priceFeedCall.callData.slice(0, 10).toLowerCase();
|
|
291
|
+
if (selector === "0xbc489a65") calls.push({
|
|
292
|
+
target: priceFeedCall.target,
|
|
293
|
+
functionName: "setLimiter",
|
|
294
|
+
args: { lowerBound: (0, viem.formatUnits)(BigInt(`0x${priceFeedCall.callData.slice(10)}`), 18) }
|
|
295
|
+
});
|
|
296
|
+
else if (selector === "0x533258de") {
|
|
297
|
+
const { args } = (0, viem.decodeFunctionData)({
|
|
298
|
+
abi: [{
|
|
299
|
+
type: "function",
|
|
300
|
+
name: "setRateAndBounds",
|
|
301
|
+
inputs: [{
|
|
302
|
+
name: "_growthRate",
|
|
303
|
+
type: "uint16"
|
|
304
|
+
}, {
|
|
305
|
+
name: "_lowerBoundBase",
|
|
306
|
+
type: "uint256"
|
|
307
|
+
}],
|
|
308
|
+
outputs: [],
|
|
309
|
+
stateMutability: "nonpayable"
|
|
310
|
+
}],
|
|
311
|
+
data: priceFeedCall.callData
|
|
312
|
+
});
|
|
313
|
+
calls.push({
|
|
314
|
+
target: priceFeedCall.target,
|
|
315
|
+
functionName: "setRateAndBounds",
|
|
316
|
+
args: {
|
|
317
|
+
growthRate: args[0],
|
|
318
|
+
lowerBound: (0, viem.formatUnits)(args[1], 18)
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
} else calls.push({
|
|
322
|
+
target: priceFeedCall.target,
|
|
323
|
+
callData: priceFeedCall.callData
|
|
324
|
+
});
|
|
325
|
+
}
|
|
298
326
|
return { calls: require_onchain_utils_json.json_stringify(calls) };
|
|
299
327
|
}
|
|
300
328
|
default: return super.parseFunctionParams(params);
|
|
@@ -4,7 +4,7 @@ import { iPriceFeedStoreAbi } from "../../abi/310/iPriceFeedStore.js";
|
|
|
4
4
|
import "../../onchain/index.js";
|
|
5
5
|
import { PRICE_FEED_STORE } from "../utils/literals.js";
|
|
6
6
|
import { priceFeedSetupParams } from "./pricefeeds/index.js";
|
|
7
|
-
import { encodeAbiParameters, formatUnits, hexToString, recoverTypedDataAddress } from "viem";
|
|
7
|
+
import { decodeFunctionData, encodeAbiParameters, formatUnits, hexToString, recoverTypedDataAddress } from "viem";
|
|
8
8
|
// src/permissionless/bindings/price-feed-store.ts
|
|
9
9
|
const abi = iPriceFeedStoreAbi;
|
|
10
10
|
var PriceFeedStoreContract = class extends BaseContract {
|
|
@@ -285,15 +285,43 @@ var PriceFeedStoreContract = class extends BaseContract {
|
|
|
285
285
|
case "configurePriceFeeds": {
|
|
286
286
|
const [priceFeedCalls] = params.args;
|
|
287
287
|
const calls = [];
|
|
288
|
-
for (const priceFeedCall of priceFeedCalls)
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
288
|
+
for (const priceFeedCall of priceFeedCalls) {
|
|
289
|
+
const selector = priceFeedCall.callData.slice(0, 10).toLowerCase();
|
|
290
|
+
if (selector === "0xbc489a65") calls.push({
|
|
291
|
+
target: priceFeedCall.target,
|
|
292
|
+
functionName: "setLimiter",
|
|
293
|
+
args: { lowerBound: formatUnits(BigInt(`0x${priceFeedCall.callData.slice(10)}`), 18) }
|
|
294
|
+
});
|
|
295
|
+
else if (selector === "0x533258de") {
|
|
296
|
+
const { args } = decodeFunctionData({
|
|
297
|
+
abi: [{
|
|
298
|
+
type: "function",
|
|
299
|
+
name: "setRateAndBounds",
|
|
300
|
+
inputs: [{
|
|
301
|
+
name: "_growthRate",
|
|
302
|
+
type: "uint16"
|
|
303
|
+
}, {
|
|
304
|
+
name: "_lowerBoundBase",
|
|
305
|
+
type: "uint256"
|
|
306
|
+
}],
|
|
307
|
+
outputs: [],
|
|
308
|
+
stateMutability: "nonpayable"
|
|
309
|
+
}],
|
|
310
|
+
data: priceFeedCall.callData
|
|
311
|
+
});
|
|
312
|
+
calls.push({
|
|
313
|
+
target: priceFeedCall.target,
|
|
314
|
+
functionName: "setRateAndBounds",
|
|
315
|
+
args: {
|
|
316
|
+
growthRate: args[0],
|
|
317
|
+
lowerBound: formatUnits(args[1], 18)
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
} else calls.push({
|
|
321
|
+
target: priceFeedCall.target,
|
|
322
|
+
callData: priceFeedCall.callData
|
|
323
|
+
});
|
|
324
|
+
}
|
|
297
325
|
return { calls: json_stringify(calls) };
|
|
298
326
|
}
|
|
299
327
|
default: return super.parseFunctionParams(params);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { LiquidatableAccountFilter } from "../../../model/liquidations.js";
|
|
2
1
|
import { iLiquidationCompressorV313Abi } from "../../../abi/ILiquidationCompressorV313.js";
|
|
2
|
+
import { LiquidatableAccountFilter } from "../../../model/liquidations.js";
|
|
3
|
+
import "../../../model/index.js";
|
|
3
4
|
import { MultichainChainIdsProps, MultichainNetworkProps, WithBlock, WithMultichain } from "../../types/multichain.js";
|
|
4
5
|
import { RouterCASlice, RouterCloseResult } from "../../router/types.js";
|
|
5
|
-
import "../../../model/index.js";
|
|
6
|
-
import { MultiCall, RawTx } from "../../types/transactions.js";
|
|
7
6
|
import "../../router/index.js";
|
|
7
|
+
import { MultiCall, RawTx } from "../../types/transactions.js";
|
|
8
8
|
import "../../types/index.js";
|
|
9
9
|
import { Address, ContractFunctionReturnType } from "viem";
|
|
10
10
|
/**
|
package/dist/types/onchain/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { MulticallBatch } from "../../utils/viem/executeMulticallBatches.js";
|
|
2
1
|
import { iWithdrawalCompressorV313Abi } from "../../../abi/IWithdrawalCompressorV313.js";
|
|
2
|
+
import { MulticallBatch } from "../../utils/viem/executeMulticallBatches.js";
|
|
3
3
|
import "../../base/index.js";
|
|
4
4
|
import { OnchainSDK } from "../../OnchainSDK.js";
|
|
5
|
-
import { BaseContract, BaseContractArgs } from "../../base/BaseContract.js";
|
|
6
5
|
import "../../utils/viem/index.js";
|
|
6
|
+
import { BaseContract, BaseContractArgs } from "../../base/BaseContract.js";
|
|
7
7
|
import { ClaimableWithdrawal, CurrentWithdrawals, GetExternalAccountCurrentWithdrawalsProps, GetWithdrawalRequestResultProps, IWithdrawalCompressorContract, PendingWithdrawal, RequestableWithdrawal, WithdrawableAsset, WithdrawalStatus, WithdrawalsState } from "./types.js";
|
|
8
8
|
import { Abi, Address, ContractFunctionReturnType } from "viem";
|
|
9
9
|
export declare const iCreditAccountAbi: readonly [{
|