@gauntlet-xyz/sdk 1.0.6 → 2.0.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/constants.d.ts +16 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +28 -0
- package/dist/constants.js.map +1 -0
- package/dist/errors.d.ts +18 -3
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +20 -2
- package/dist/errors.js.map +1 -1
- package/dist/evm/abis/priceAndFeeCalculatorV2.d.ts +233 -0
- package/dist/evm/abis/priceAndFeeCalculatorV2.d.ts.map +1 -0
- package/dist/evm/abis/priceAndFeeCalculatorV2.js +119 -0
- package/dist/evm/abis/priceAndFeeCalculatorV2.js.map +1 -0
- package/dist/evm/abis/provisionerV2.d.ts +460 -0
- package/dist/evm/abis/provisionerV2.d.ts.map +1 -0
- package/dist/evm/abis/provisionerV2.js +203 -0
- package/dist/evm/abis/provisionerV2.js.map +1 -0
- package/dist/evm/adapters/aera.d.ts +3 -3
- package/dist/evm/adapters/aera.d.ts.map +1 -1
- package/dist/evm/adapters/aera.js +179 -103
- package/dist/evm/adapters/aera.js.map +1 -1
- package/dist/evm/adapters/types.d.ts +12 -1
- package/dist/evm/adapters/types.d.ts.map +1 -1
- package/dist/evm/aeraContracts/priceAndFeeCalculator.d.ts +41 -0
- package/dist/evm/aeraContracts/priceAndFeeCalculator.d.ts.map +1 -0
- package/dist/evm/aeraContracts/priceAndFeeCalculator.js +140 -0
- package/dist/evm/aeraContracts/priceAndFeeCalculator.js.map +1 -0
- package/dist/evm/aeraContracts/v1.d.ts +2317 -0
- package/dist/evm/aeraContracts/v1.d.ts.map +1 -0
- package/dist/evm/aeraContracts/v1.js +59 -0
- package/dist/evm/aeraContracts/v1.js.map +1 -0
- package/dist/evm/aeraContracts/v2.d.ts +2802 -0
- package/dist/evm/aeraContracts/v2.d.ts.map +1 -0
- package/dist/evm/aeraContracts/v2.js +217 -0
- package/dist/evm/aeraContracts/v2.js.map +1 -0
- package/dist/evm/aeraContracts.d.ts +23 -2316
- package/dist/evm/aeraContracts.d.ts.map +1 -1
- package/dist/evm/aeraContracts.js +117 -24
- package/dist/evm/aeraContracts.js.map +1 -1
- package/dist/evm/deposit.d.ts +5 -1
- package/dist/evm/deposit.d.ts.map +1 -1
- package/dist/evm/deposit.js +28 -14
- package/dist/evm/deposit.js.map +1 -1
- package/dist/evm/depositReceiverApproval.d.ts +17 -0
- package/dist/evm/depositReceiverApproval.d.ts.map +1 -0
- package/dist/evm/depositReceiverApproval.js +32 -0
- package/dist/evm/depositReceiverApproval.js.map +1 -0
- package/dist/evm/index.d.ts +8 -1
- package/dist/evm/index.d.ts.map +1 -1
- package/dist/evm/index.js +4 -0
- package/dist/evm/index.js.map +1 -1
- package/dist/evm/operationMode.d.ts +9 -0
- package/dist/evm/operationMode.d.ts.map +1 -0
- package/dist/evm/operationMode.js +41 -0
- package/dist/evm/operationMode.js.map +1 -0
- package/dist/evm/types.d.ts +5 -3
- package/dist/evm/types.d.ts.map +1 -1
- package/dist/evm/types.js +4 -1
- package/dist/evm/types.js.map +1 -1
- package/dist/evm/userCurrentBalance.d.ts.map +1 -1
- package/dist/evm/userCurrentBalance.js +68 -58
- package/dist/evm/userCurrentBalance.js.map +1 -1
- package/dist/evm/withdraw.d.ts +5 -1
- package/dist/evm/withdraw.d.ts.map +1 -1
- package/dist/evm/withdraw.js +25 -13
- package/dist/evm/withdraw.js.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/manifest/vaults.json +29 -139
- package/package.json +1 -1
- package/src/constants.ts +32 -0
- package/src/errors.ts +44 -5
- package/src/evm/abis/priceAndFeeCalculatorV2.ts +118 -0
- package/src/evm/abis/provisionerV2.ts +202 -0
- package/src/evm/adapters/aera.ts +419 -137
- package/src/evm/adapters/types.ts +19 -1
- package/src/evm/aeraContracts/priceAndFeeCalculator.ts +223 -0
- package/src/evm/aeraContracts/v1.ts +157 -0
- package/src/evm/aeraContracts/v2.ts +466 -0
- package/src/evm/aeraContracts.ts +173 -52
- package/src/evm/deposit.ts +48 -16
- package/src/evm/depositReceiverApproval.ts +51 -0
- package/src/evm/index.ts +23 -1
- package/src/evm/operationMode.ts +60 -0
- package/src/evm/types.ts +7 -3
- package/src/evm/userCurrentBalance.ts +80 -55
- package/src/evm/withdraw.ts +42 -15
- package/src/index.ts +19 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const MAX_BPS = 10000n;
|
|
2
|
+
export declare const DEFAULT_BPS = 100;
|
|
3
|
+
export declare const SECOND = 1;
|
|
4
|
+
export declare const MINUTE: number;
|
|
5
|
+
export declare const HOUR: number;
|
|
6
|
+
export declare const DAY: number;
|
|
7
|
+
export declare const REQUEST_DEADLINE_BUFFER_DAYS = 3;
|
|
8
|
+
export declare const DEFAULT_MAX_PRICE_AGE_DAYS = 10;
|
|
9
|
+
export declare const DEFAULT_SOLVER_TIP = 0n;
|
|
10
|
+
export declare const DEFAULT_REQUEST_DEADLINE_BUFFER: number;
|
|
11
|
+
export declare const DEFAULT_MAX_PRICE_AGE: bigint;
|
|
12
|
+
export declare const CHAIN_NAMES: Record<number, string>;
|
|
13
|
+
export declare const BLOCKS_3_DAYS: Record<number, bigint>;
|
|
14
|
+
export declare const DEFAULT_BLOCKS_3_DAYS = 129600n;
|
|
15
|
+
export declare const LOG_PAGE_SIZE = 9999n;
|
|
16
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,SAAS,CAAC;AAC9B,eAAO,MAAM,WAAW,MAAM,CAAC;AAE/B,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,MAAM,QAAc,CAAC;AAClC,eAAO,MAAM,IAAI,QAAc,CAAC;AAChC,eAAO,MAAM,GAAG,QAAY,CAAC;AAE7B,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAC9C,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,+BAA+B,QAAqC,CAAC;AAClF,eAAO,MAAM,qBAAqB,QAA2C,CAAC;AAE9E,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAK9C,CAAC;AAGF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKhD,CAAC;AACF,eAAO,MAAM,qBAAqB,UAAW,CAAC;AAG9C,eAAO,MAAM,aAAa,QAAS,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const MAX_BPS = 10000n;
|
|
2
|
+
export const DEFAULT_BPS = 100;
|
|
3
|
+
export const SECOND = 1;
|
|
4
|
+
export const MINUTE = SECOND * 60;
|
|
5
|
+
export const HOUR = MINUTE * 60;
|
|
6
|
+
export const DAY = HOUR * 24;
|
|
7
|
+
export const REQUEST_DEADLINE_BUFFER_DAYS = 3;
|
|
8
|
+
export const DEFAULT_MAX_PRICE_AGE_DAYS = 10;
|
|
9
|
+
export const DEFAULT_SOLVER_TIP = 0n;
|
|
10
|
+
export const DEFAULT_REQUEST_DEADLINE_BUFFER = DAY * REQUEST_DEADLINE_BUFFER_DAYS;
|
|
11
|
+
export const DEFAULT_MAX_PRICE_AGE = BigInt(DAY * DEFAULT_MAX_PRICE_AGE_DAYS);
|
|
12
|
+
export const CHAIN_NAMES = {
|
|
13
|
+
1: 'ethereum',
|
|
14
|
+
8453: 'base',
|
|
15
|
+
42161: 'arbitrum',
|
|
16
|
+
10: 'optimism',
|
|
17
|
+
};
|
|
18
|
+
// Approximate 3-day block lookback per chain based on avg block time.
|
|
19
|
+
export const BLOCKS_3_DAYS = {
|
|
20
|
+
1: 21600n,
|
|
21
|
+
8453: 129600n,
|
|
22
|
+
42161: 1036800n,
|
|
23
|
+
10: 129600n,
|
|
24
|
+
};
|
|
25
|
+
export const DEFAULT_BLOCKS_3_DAYS = 129600n;
|
|
26
|
+
// Many RPC providers cap eth_getLogs to 10,000 blocks per request.
|
|
27
|
+
export const LOG_PAGE_SIZE = 9999n;
|
|
28
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC;AAC9B,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAE/B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC;AAClC,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,GAAG,EAAE,CAAC;AAChC,MAAM,CAAC,MAAM,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;AAE7B,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAC9C,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAC7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AACrC,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,GAAG,4BAA4B,CAAC;AAClF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,GAAG,0BAA0B,CAAC,CAAC;AAE9E,MAAM,CAAC,MAAM,WAAW,GAA2B;IACjD,CAAC,EAAE,UAAU;IACb,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,UAAU;IACjB,EAAE,EAAE,UAAU;CACf,CAAC;AAEF,sEAAsE;AACtE,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,CAAC,EAAE,MAAO;IACV,IAAI,EAAE,OAAQ;IACd,KAAK,EAAE,QAAU;IACjB,EAAE,EAAE,OAAQ;CACb,CAAC;AACF,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAQ,CAAC;AAE9C,mEAAmE;AACnE,MAAM,CAAC,MAAM,aAAa,GAAG,KAAM,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChainId } from './client';
|
|
1
|
+
import type { ChainId } from './client';
|
|
2
2
|
export declare class GauntletSDKError extends Error {
|
|
3
3
|
constructor(message: string);
|
|
4
4
|
}
|
|
@@ -19,9 +19,9 @@ export declare class ChainMismatchError extends GauntletSDKError {
|
|
|
19
19
|
}
|
|
20
20
|
export declare class UnsupportedDepositModeError extends GauntletSDKError {
|
|
21
21
|
readonly vaultId: string;
|
|
22
|
-
readonly requested:
|
|
22
|
+
readonly requested: string;
|
|
23
23
|
readonly available: string;
|
|
24
|
-
constructor(vaultId: string, requested:
|
|
24
|
+
constructor(vaultId: string, requested: string, available: string);
|
|
25
25
|
}
|
|
26
26
|
export declare class RpcNotConfiguredError extends GauntletSDKError {
|
|
27
27
|
readonly chainId: ChainId;
|
|
@@ -49,6 +49,21 @@ export declare class UnitConversionError extends GauntletSDKError {
|
|
|
49
49
|
readonly vaultAddress: string;
|
|
50
50
|
constructor(vaultAddress: string);
|
|
51
51
|
}
|
|
52
|
+
export declare class StalePriceError extends GauntletSDKError {
|
|
53
|
+
readonly blockTimestamp: bigint;
|
|
54
|
+
readonly maxPriceAge: bigint;
|
|
55
|
+
readonly priceTimestamp: bigint;
|
|
56
|
+
constructor({ blockTimestamp, maxPriceAge, priceTimestamp, }: {
|
|
57
|
+
blockTimestamp: bigint;
|
|
58
|
+
maxPriceAge: bigint;
|
|
59
|
+
priceTimestamp: bigint;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
export declare class InvalidSolverTipError extends GauntletSDKError {
|
|
63
|
+
readonly solverTip: bigint;
|
|
64
|
+
readonly availableAmount: bigint;
|
|
65
|
+
constructor(solverTip: bigint, availableAmount: bigint);
|
|
66
|
+
}
|
|
52
67
|
export declare class InvalidSlippageBPSError extends GauntletSDKError {
|
|
53
68
|
readonly slippage: number;
|
|
54
69
|
constructor(slippage: number);
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGxC,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,kBAAmB,SAAQ,gBAAgB;IACtD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;gBAEf,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAS/C;AAED,qBAAa,qBAAsB,SAAQ,gBAAgB;IACzD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEb,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAM3C;AAED,qBAAa,kBAAmB,SAAQ,gBAAgB;IACtD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;gBAEd,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAM/C;AAED,qBAAa,2BAA4B,SAAQ,gBAAgB;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;gBAEf,OAAO,EAAE,MAAM,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Q,gBAAgB;IAC3D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;gBAEd,QAAQ,EAAE,MAAM;CAK7B"}
|
package/dist/errors.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MAX_BPS } from './constants';
|
|
1
2
|
export class GauntletSDKError extends Error {
|
|
2
3
|
constructor(message) {
|
|
3
4
|
super(message);
|
|
@@ -76,7 +77,7 @@ export class UnimplementedFeatureError extends GauntletSDKError {
|
|
|
76
77
|
export class UnsupportedFeatureError extends GauntletSDKError {
|
|
77
78
|
constructor(feature) {
|
|
78
79
|
super(`Feature not supported: "${feature}"`);
|
|
79
|
-
this.name = '
|
|
80
|
+
this.name = 'UnsupportedFeatureError';
|
|
80
81
|
this.feature = feature;
|
|
81
82
|
}
|
|
82
83
|
}
|
|
@@ -87,9 +88,26 @@ export class UnitConversionError extends GauntletSDKError {
|
|
|
87
88
|
this.vaultAddress = vaultAddress;
|
|
88
89
|
}
|
|
89
90
|
}
|
|
91
|
+
export class StalePriceError extends GauntletSDKError {
|
|
92
|
+
constructor({ blockTimestamp, maxPriceAge, priceTimestamp, }) {
|
|
93
|
+
super(`Price is stale: timestamp "${priceTimestamp}" with max age "${maxPriceAge}" is older than block timestamp "${blockTimestamp}"`);
|
|
94
|
+
this.name = 'StalePriceError';
|
|
95
|
+
this.blockTimestamp = blockTimestamp;
|
|
96
|
+
this.maxPriceAge = maxPriceAge;
|
|
97
|
+
this.priceTimestamp = priceTimestamp;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
export class InvalidSolverTipError extends GauntletSDKError {
|
|
101
|
+
constructor(solverTip, availableAmount) {
|
|
102
|
+
super(`Solver tip "${solverTip}" must be less than available token amount "${availableAmount}"`);
|
|
103
|
+
this.name = 'InvalidSolverTipError';
|
|
104
|
+
this.solverTip = solverTip;
|
|
105
|
+
this.availableAmount = availableAmount;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
90
108
|
export class InvalidSlippageBPSError extends GauntletSDKError {
|
|
91
109
|
constructor(slippage) {
|
|
92
|
-
super(`Slippage not in range of
|
|
110
|
+
super(`Slippage not in range of 0-${Number(MAX_BPS)}; argument passed: ${slippage}`);
|
|
93
111
|
this.name = 'IncorrectArgument';
|
|
94
112
|
this.slippage = slippage;
|
|
95
113
|
}
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAED,MAAM,OAAO,kBAAmB,SAAQ,gBAAgB;IAItD,YAAY,OAAe,EAAE,OAAiB;QAC5C,MAAM,GAAG,GAAG,OAAO;YACjB,CAAC,CAAC,UAAU,OAAO,2BAA2B,OAAO,GAAG;YACxD,CAAC,CAAC,UAAU,OAAO,aAAa,CAAC;QACnC,KAAK,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AAED,MAAM,OAAO,qBAAsB,SAAQ,gBAAgB;IAIzD,YAAY,KAAa,EAAE,OAAe;QACxC,KAAK,CAAC,UAAU,KAAK,gCAAgC,OAAO,GAAG,CAAC,CAAC;QACjE,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,C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AE,eAAuB;QACpD,KAAK,CACH,eAAe,SAAS,+CAA+C,eAAe,GAAG,CAC1F,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;CACF;AAED,MAAM,OAAO,uBAAwB,SAAQ,gBAAgB;IAG3D,YAAY,QAAgB;QAC1B,KAAK,CAAC,8BAA8B,MAAM,CAAC,OAAO,CAAC,sBAAsB,QAAQ,EAAE,CAAC,CAAC;QACrF,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF"}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
export declare const priceAndFeeCalculatorV2Abi: readonly [{
|
|
2
|
+
readonly type: "function";
|
|
3
|
+
readonly inputs: readonly [{
|
|
4
|
+
readonly name: "vault";
|
|
5
|
+
readonly internalType: "address";
|
|
6
|
+
readonly type: "address";
|
|
7
|
+
}, {
|
|
8
|
+
readonly name: "token";
|
|
9
|
+
readonly internalType: "contract IERC20";
|
|
10
|
+
readonly type: "address";
|
|
11
|
+
}, {
|
|
12
|
+
readonly name: "tokenAmount";
|
|
13
|
+
readonly internalType: "uint256";
|
|
14
|
+
readonly type: "uint256";
|
|
15
|
+
}];
|
|
16
|
+
readonly name: "convertTokenToUnits";
|
|
17
|
+
readonly outputs: readonly [{
|
|
18
|
+
readonly name: "unitsAmount";
|
|
19
|
+
readonly internalType: "uint256";
|
|
20
|
+
readonly type: "uint256";
|
|
21
|
+
}];
|
|
22
|
+
readonly stateMutability: "view";
|
|
23
|
+
}, {
|
|
24
|
+
readonly type: "function";
|
|
25
|
+
readonly inputs: readonly [{
|
|
26
|
+
readonly name: "vault";
|
|
27
|
+
readonly internalType: "address";
|
|
28
|
+
readonly type: "address";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "token";
|
|
31
|
+
readonly internalType: "contract IERC20";
|
|
32
|
+
readonly type: "address";
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "tokenAmount";
|
|
35
|
+
readonly internalType: "uint256";
|
|
36
|
+
readonly type: "uint256";
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: "rounding";
|
|
39
|
+
readonly internalType: "enum Math.Rounding";
|
|
40
|
+
readonly type: "uint8";
|
|
41
|
+
}];
|
|
42
|
+
readonly name: "convertTokenToUnitsIfActive";
|
|
43
|
+
readonly outputs: readonly [{
|
|
44
|
+
readonly name: "unitsAmount";
|
|
45
|
+
readonly internalType: "uint256";
|
|
46
|
+
readonly type: "uint256";
|
|
47
|
+
}];
|
|
48
|
+
readonly stateMutability: "view";
|
|
49
|
+
}, {
|
|
50
|
+
readonly type: "function";
|
|
51
|
+
readonly inputs: readonly [{
|
|
52
|
+
readonly name: "vault";
|
|
53
|
+
readonly internalType: "address";
|
|
54
|
+
readonly type: "address";
|
|
55
|
+
}, {
|
|
56
|
+
readonly name: "token";
|
|
57
|
+
readonly internalType: "contract IERC20";
|
|
58
|
+
readonly type: "address";
|
|
59
|
+
}, {
|
|
60
|
+
readonly name: "unitsAmount";
|
|
61
|
+
readonly internalType: "uint256";
|
|
62
|
+
readonly type: "uint256";
|
|
63
|
+
}];
|
|
64
|
+
readonly name: "convertUnitsToToken";
|
|
65
|
+
readonly outputs: readonly [{
|
|
66
|
+
readonly name: "tokenAmount";
|
|
67
|
+
readonly internalType: "uint256";
|
|
68
|
+
readonly type: "uint256";
|
|
69
|
+
}];
|
|
70
|
+
readonly stateMutability: "view";
|
|
71
|
+
}, {
|
|
72
|
+
readonly type: "function";
|
|
73
|
+
readonly inputs: readonly [{
|
|
74
|
+
readonly name: "vault";
|
|
75
|
+
readonly internalType: "address";
|
|
76
|
+
readonly type: "address";
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "token";
|
|
79
|
+
readonly internalType: "contract IERC20";
|
|
80
|
+
readonly type: "address";
|
|
81
|
+
}, {
|
|
82
|
+
readonly name: "unitsAmount";
|
|
83
|
+
readonly internalType: "uint256";
|
|
84
|
+
readonly type: "uint256";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "rounding";
|
|
87
|
+
readonly internalType: "enum Math.Rounding";
|
|
88
|
+
readonly type: "uint8";
|
|
89
|
+
}];
|
|
90
|
+
readonly name: "convertUnitsToTokenIfActive";
|
|
91
|
+
readonly outputs: readonly [{
|
|
92
|
+
readonly name: "tokenAmount";
|
|
93
|
+
readonly internalType: "uint256";
|
|
94
|
+
readonly type: "uint256";
|
|
95
|
+
}];
|
|
96
|
+
readonly stateMutability: "view";
|
|
97
|
+
}, {
|
|
98
|
+
readonly type: "function";
|
|
99
|
+
readonly inputs: readonly [{
|
|
100
|
+
readonly name: "vault";
|
|
101
|
+
readonly internalType: "address";
|
|
102
|
+
readonly type: "address";
|
|
103
|
+
}];
|
|
104
|
+
readonly name: "getAnchorTimestamp";
|
|
105
|
+
readonly outputs: readonly [{
|
|
106
|
+
readonly name: "timestamp";
|
|
107
|
+
readonly internalType: "uint32";
|
|
108
|
+
readonly type: "uint32";
|
|
109
|
+
}];
|
|
110
|
+
readonly stateMutability: "view";
|
|
111
|
+
}, {
|
|
112
|
+
readonly type: "function";
|
|
113
|
+
readonly inputs: readonly [{
|
|
114
|
+
readonly name: "vault";
|
|
115
|
+
readonly internalType: "address";
|
|
116
|
+
readonly type: "address";
|
|
117
|
+
}];
|
|
118
|
+
readonly name: "getVaultState";
|
|
119
|
+
readonly outputs: readonly [{
|
|
120
|
+
readonly name: "";
|
|
121
|
+
readonly internalType: "struct VaultPriceStateV2";
|
|
122
|
+
readonly type: "tuple";
|
|
123
|
+
readonly components: readonly [{
|
|
124
|
+
readonly name: "paused";
|
|
125
|
+
readonly internalType: "bool";
|
|
126
|
+
readonly type: "bool";
|
|
127
|
+
}, {
|
|
128
|
+
readonly name: "pauseOnBadAnchorUpdate";
|
|
129
|
+
readonly internalType: "bool";
|
|
130
|
+
readonly type: "bool";
|
|
131
|
+
}, {
|
|
132
|
+
readonly name: "maxPriceAge";
|
|
133
|
+
readonly internalType: "uint16";
|
|
134
|
+
readonly type: "uint16";
|
|
135
|
+
}, {
|
|
136
|
+
readonly name: "minUpdateIntervalMinutes";
|
|
137
|
+
readonly internalType: "uint16";
|
|
138
|
+
readonly type: "uint16";
|
|
139
|
+
}, {
|
|
140
|
+
readonly name: "maxPriceToleranceRatio";
|
|
141
|
+
readonly internalType: "uint16";
|
|
142
|
+
readonly type: "uint16";
|
|
143
|
+
}, {
|
|
144
|
+
readonly name: "minPriceToleranceRatio";
|
|
145
|
+
readonly internalType: "uint16";
|
|
146
|
+
readonly type: "uint16";
|
|
147
|
+
}, {
|
|
148
|
+
readonly name: "maxUpdateDelayDays";
|
|
149
|
+
readonly internalType: "uint8";
|
|
150
|
+
readonly type: "uint8";
|
|
151
|
+
}, {
|
|
152
|
+
readonly name: "accrualLag";
|
|
153
|
+
readonly internalType: "uint32";
|
|
154
|
+
readonly type: "uint32";
|
|
155
|
+
}, {
|
|
156
|
+
readonly name: "anchorTimestamp";
|
|
157
|
+
readonly internalType: "uint32";
|
|
158
|
+
readonly type: "uint32";
|
|
159
|
+
}, {
|
|
160
|
+
readonly name: "driftTimestamp";
|
|
161
|
+
readonly internalType: "uint32";
|
|
162
|
+
readonly type: "uint32";
|
|
163
|
+
}, {
|
|
164
|
+
readonly name: "anchorPrice";
|
|
165
|
+
readonly internalType: "uint128";
|
|
166
|
+
readonly type: "uint128";
|
|
167
|
+
}, {
|
|
168
|
+
readonly name: "driftPrice";
|
|
169
|
+
readonly internalType: "uint128";
|
|
170
|
+
readonly type: "uint128";
|
|
171
|
+
}, {
|
|
172
|
+
readonly name: "highestPrice";
|
|
173
|
+
readonly internalType: "uint128";
|
|
174
|
+
readonly type: "uint128";
|
|
175
|
+
}, {
|
|
176
|
+
readonly name: "lastTotalSupply";
|
|
177
|
+
readonly internalType: "uint128";
|
|
178
|
+
readonly type: "uint128";
|
|
179
|
+
}];
|
|
180
|
+
}, {
|
|
181
|
+
readonly name: "";
|
|
182
|
+
readonly internalType: "struct VaultAccruals";
|
|
183
|
+
readonly type: "tuple";
|
|
184
|
+
readonly components: readonly [{
|
|
185
|
+
readonly name: "fees";
|
|
186
|
+
readonly internalType: "struct Fee";
|
|
187
|
+
readonly type: "tuple";
|
|
188
|
+
readonly components: readonly [{
|
|
189
|
+
readonly name: "tvl";
|
|
190
|
+
readonly internalType: "uint16";
|
|
191
|
+
readonly type: "uint16";
|
|
192
|
+
}, {
|
|
193
|
+
readonly name: "performance";
|
|
194
|
+
readonly internalType: "uint16";
|
|
195
|
+
readonly type: "uint16";
|
|
196
|
+
}];
|
|
197
|
+
}, {
|
|
198
|
+
readonly name: "accruedFees";
|
|
199
|
+
readonly internalType: "uint112";
|
|
200
|
+
readonly type: "uint112";
|
|
201
|
+
}, {
|
|
202
|
+
readonly name: "accruedProtocolFees";
|
|
203
|
+
readonly internalType: "uint112";
|
|
204
|
+
readonly type: "uint112";
|
|
205
|
+
}];
|
|
206
|
+
}];
|
|
207
|
+
readonly stateMutability: "view";
|
|
208
|
+
}, {
|
|
209
|
+
readonly type: "function";
|
|
210
|
+
readonly inputs: readonly [{
|
|
211
|
+
readonly name: "vault";
|
|
212
|
+
readonly internalType: "address";
|
|
213
|
+
readonly type: "address";
|
|
214
|
+
}];
|
|
215
|
+
readonly name: "isVaultPaused";
|
|
216
|
+
readonly outputs: readonly [{
|
|
217
|
+
readonly name: "";
|
|
218
|
+
readonly internalType: "bool";
|
|
219
|
+
readonly type: "bool";
|
|
220
|
+
}];
|
|
221
|
+
readonly stateMutability: "view";
|
|
222
|
+
}, {
|
|
223
|
+
readonly type: "function";
|
|
224
|
+
readonly inputs: readonly [];
|
|
225
|
+
readonly name: "version";
|
|
226
|
+
readonly outputs: readonly [{
|
|
227
|
+
readonly name: "";
|
|
228
|
+
readonly internalType: "string";
|
|
229
|
+
readonly type: "string";
|
|
230
|
+
}];
|
|
231
|
+
readonly stateMutability: "pure";
|
|
232
|
+
}];
|
|
233
|
+
//# sourceMappingURL=priceAndFeeCalculatorV2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"priceAndFeeCalculatorV2.d.ts","sourceRoot":"","sources":["../../../src/evm/abis/priceAndFeeCalculatorV2.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmH7B,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// Compact ABI derived from aera-finance/aera-contracts-v3@f4e3433058c29c3a0b1348ffbd358cc036a1687f
|
|
2
|
+
// source: src/core/interfaces/IPriceAndFeeCalculatorV2.sol
|
|
3
|
+
export const priceAndFeeCalculatorV2Abi = [
|
|
4
|
+
{
|
|
5
|
+
type: 'function',
|
|
6
|
+
inputs: [
|
|
7
|
+
{ name: 'vault', internalType: 'address', type: 'address' },
|
|
8
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
9
|
+
{ name: 'tokenAmount', internalType: 'uint256', type: 'uint256' },
|
|
10
|
+
],
|
|
11
|
+
name: 'convertTokenToUnits',
|
|
12
|
+
outputs: [{ name: 'unitsAmount', internalType: 'uint256', type: 'uint256' }],
|
|
13
|
+
stateMutability: 'view',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
type: 'function',
|
|
17
|
+
inputs: [
|
|
18
|
+
{ name: 'vault', internalType: 'address', type: 'address' },
|
|
19
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
20
|
+
{ name: 'tokenAmount', internalType: 'uint256', type: 'uint256' },
|
|
21
|
+
{ name: 'rounding', internalType: 'enum Math.Rounding', type: 'uint8' },
|
|
22
|
+
],
|
|
23
|
+
name: 'convertTokenToUnitsIfActive',
|
|
24
|
+
outputs: [{ name: 'unitsAmount', internalType: 'uint256', type: 'uint256' }],
|
|
25
|
+
stateMutability: 'view',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: 'function',
|
|
29
|
+
inputs: [
|
|
30
|
+
{ name: 'vault', internalType: 'address', type: 'address' },
|
|
31
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
32
|
+
{ name: 'unitsAmount', internalType: 'uint256', type: 'uint256' },
|
|
33
|
+
],
|
|
34
|
+
name: 'convertUnitsToToken',
|
|
35
|
+
outputs: [{ name: 'tokenAmount', internalType: 'uint256', type: 'uint256' }],
|
|
36
|
+
stateMutability: 'view',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
type: 'function',
|
|
40
|
+
inputs: [
|
|
41
|
+
{ name: 'vault', internalType: 'address', type: 'address' },
|
|
42
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
43
|
+
{ name: 'unitsAmount', internalType: 'uint256', type: 'uint256' },
|
|
44
|
+
{ name: 'rounding', internalType: 'enum Math.Rounding', type: 'uint8' },
|
|
45
|
+
],
|
|
46
|
+
name: 'convertUnitsToTokenIfActive',
|
|
47
|
+
outputs: [{ name: 'tokenAmount', internalType: 'uint256', type: 'uint256' }],
|
|
48
|
+
stateMutability: 'view',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: 'function',
|
|
52
|
+
inputs: [{ name: 'vault', internalType: 'address', type: 'address' }],
|
|
53
|
+
name: 'getAnchorTimestamp',
|
|
54
|
+
outputs: [{ name: 'timestamp', internalType: 'uint32', type: 'uint32' }],
|
|
55
|
+
stateMutability: 'view',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: 'function',
|
|
59
|
+
inputs: [{ name: 'vault', internalType: 'address', type: 'address' }],
|
|
60
|
+
name: 'getVaultState',
|
|
61
|
+
outputs: [
|
|
62
|
+
{
|
|
63
|
+
name: '',
|
|
64
|
+
internalType: 'struct VaultPriceStateV2',
|
|
65
|
+
type: 'tuple',
|
|
66
|
+
components: [
|
|
67
|
+
{ name: 'paused', internalType: 'bool', type: 'bool' },
|
|
68
|
+
{ name: 'pauseOnBadAnchorUpdate', internalType: 'bool', type: 'bool' },
|
|
69
|
+
{ name: 'maxPriceAge', internalType: 'uint16', type: 'uint16' },
|
|
70
|
+
{ name: 'minUpdateIntervalMinutes', internalType: 'uint16', type: 'uint16' },
|
|
71
|
+
{ name: 'maxPriceToleranceRatio', internalType: 'uint16', type: 'uint16' },
|
|
72
|
+
{ name: 'minPriceToleranceRatio', internalType: 'uint16', type: 'uint16' },
|
|
73
|
+
{ name: 'maxUpdateDelayDays', internalType: 'uint8', type: 'uint8' },
|
|
74
|
+
{ name: 'accrualLag', internalType: 'uint32', type: 'uint32' },
|
|
75
|
+
{ name: 'anchorTimestamp', internalType: 'uint32', type: 'uint32' },
|
|
76
|
+
{ name: 'driftTimestamp', internalType: 'uint32', type: 'uint32' },
|
|
77
|
+
{ name: 'anchorPrice', internalType: 'uint128', type: 'uint128' },
|
|
78
|
+
{ name: 'driftPrice', internalType: 'uint128', type: 'uint128' },
|
|
79
|
+
{ name: 'highestPrice', internalType: 'uint128', type: 'uint128' },
|
|
80
|
+
{ name: 'lastTotalSupply', internalType: 'uint128', type: 'uint128' },
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: '',
|
|
85
|
+
internalType: 'struct VaultAccruals',
|
|
86
|
+
type: 'tuple',
|
|
87
|
+
components: [
|
|
88
|
+
{
|
|
89
|
+
name: 'fees',
|
|
90
|
+
internalType: 'struct Fee',
|
|
91
|
+
type: 'tuple',
|
|
92
|
+
components: [
|
|
93
|
+
{ name: 'tvl', internalType: 'uint16', type: 'uint16' },
|
|
94
|
+
{ name: 'performance', internalType: 'uint16', type: 'uint16' },
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
{ name: 'accruedFees', internalType: 'uint112', type: 'uint112' },
|
|
98
|
+
{ name: 'accruedProtocolFees', internalType: 'uint112', type: 'uint112' },
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
stateMutability: 'view',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'function',
|
|
106
|
+
inputs: [{ name: 'vault', internalType: 'address', type: 'address' }],
|
|
107
|
+
name: 'isVaultPaused',
|
|
108
|
+
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
|
|
109
|
+
stateMutability: 'view',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'function',
|
|
113
|
+
inputs: [],
|
|
114
|
+
name: 'version',
|
|
115
|
+
outputs: [{ name: '', internalType: 'string', type: 'string' }],
|
|
116
|
+
stateMutability: 'pure',
|
|
117
|
+
},
|
|
118
|
+
];
|
|
119
|
+
//# sourceMappingURL=priceAndFeeCalculatorV2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"priceAndFeeCalculatorV2.js","sourceRoot":"","sources":["../../../src/evm/abis/priceAndFeeCalculatorV2.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,2DAA2D;AAC3D,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC;QACE,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;YAC3D,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,EAAE;YACnE,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;SAClE;QACD,IAAI,EAAE,q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