@gitmyabi/isolationmodefreezableliquidator 0.0.0-stage → 1.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/README.md CHANGED
@@ -1,3 +1,108 @@
1
- # Temporary Holding Version
1
+ # @gitmyabi/isolationmodefreezableliquidator
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Auto-generated TypeScript type bindings for **IsolationModeFreezableLiquidator**
4
+
5
+ - **Build ID**: `etherscan-isolationmodefreezableliquidator-8d178ff4-1794274605638`
6
+ - **Build Number**: 1
7
+ - **Commit**: `7d54a68`
8
+ - **Branch**: `etherscan`
9
+ - **Target**: `ethers-v6`
10
+ - **Contracts**: 1
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install @gitmyabi/isolationmodefreezableliquidator@1.0.0
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ### Class-based API (TypeChain-like)
21
+
22
+ ```typescript
23
+ import { createPublicClient, createWalletClient, http } from 'viem';
24
+ import { mainnet } from 'viem/chains';
25
+ import { YourContract } from '@gitmyabi/isolationmodefreezableliquidator';
26
+
27
+ const publicClient = createPublicClient({ chain: mainnet, transport: http() });
28
+ const walletClient = createWalletClient({ chain: mainnet, transport: http() });
29
+
30
+ // Create contract instance
31
+ const contract = new YourContract('0x...', { publicClient, walletClient });
32
+
33
+ // Read functions - call directly like TypeChain!
34
+ const result = await contract.yourMethod(param1, param2);
35
+
36
+ // Write functions - also call directly!
37
+ const hash = await contract.transfer('0x...', 1000n);
38
+ ```
39
+
40
+ ### With viem directly
41
+
42
+ ```typescript
43
+ import { createPublicClient, http } from 'viem';
44
+ import { mainnet } from 'viem/chains';
45
+ import { YourContractAbi } from '@gitmyabi/isolationmodefreezableliquidator';
46
+
47
+ const client = createPublicClient({
48
+ chain: mainnet,
49
+ transport: http(),
50
+ });
51
+
52
+ // Fully typed contract read
53
+ const result = await client.readContract({
54
+ address: '0x...',
55
+ abi: YourContractAbi,
56
+ functionName: 'yourMethod',
57
+ args: [param1, param2],
58
+ });
59
+
60
+ // Fully typed contract write
61
+ const hash = await client.writeContract({
62
+ address: '0x...',
63
+ abi: YourContractAbi,
64
+ functionName: 'yourMethod',
65
+ args: [param1, param2],
66
+ });
67
+ ```
68
+
69
+ ### With wagmi
70
+
71
+ ```typescript
72
+ import { useReadContract, useWriteContract } from 'wagmi';
73
+ import { YourContractAbi } from '@gitmyabi/isolationmodefreezableliquidator';
74
+
75
+ function MyComponent() {
76
+ const { data } = useReadContract({
77
+ address: '0x...',
78
+ abi: YourContractAbi,
79
+ functionName: 'yourMethod',
80
+ args: [param1, param2],
81
+ });
82
+
83
+ const { writeContract } = useWriteContract();
84
+
85
+ const handleWrite = () => {
86
+ writeContract({
87
+ address: '0x...',
88
+ abi: YourContractAbi,
89
+ functionName: 'yourMethod',
90
+ args: [param1, param2],
91
+ });
92
+ };
93
+
94
+ return <button onClick={handleWrite}>Call Contract</button>;
95
+ }
96
+ ```
97
+
98
+ ## Type Safety
99
+
100
+ This package provides full TypeScript type safety for all contract methods, events, and parameters using viem's type system. All ABIs are exported as `const` assertions for maximum type inference.
101
+
102
+ ## Generated Contracts
103
+
104
+ This package includes type bindings for 1 contract(s) generated from ABI artifacts.
105
+
106
+ ## License
107
+
108
+ Apache License 2.0
@@ -0,0 +1,280 @@
1
+ import type { Address, PublicClient, WalletClient } from 'viem';
2
+ /**
3
+ * IIsolationModeFreezableLiquidatorProxy.PrepareForLiquidationParams struct type
4
+ */
5
+ export type IIsolationModeFreezableLiquidatorProxy_PrepareForLiquidationParams = {
6
+ liquidAccount: IDolomiteStructs_AccountInfo;
7
+ freezableMarketId: bigint;
8
+ inputTokenAmount: bigint;
9
+ outputMarketId: bigint;
10
+ minOutputAmount: bigint;
11
+ expirationTimestamp: bigint;
12
+ extraData: `0x${string}`;
13
+ };
14
+ /**
15
+ * IDolomiteStructs.AccountInfo struct type
16
+ */
17
+ export type IDolomiteStructs_AccountInfo = {
18
+ owner: `0x${string}`;
19
+ number: bigint;
20
+ };
21
+ /**
22
+ * IsolationModeFreezableLiquidatorProxy ABI
23
+ *
24
+ * This ABI is typed using viem's type system for full type safety.
25
+ */
26
+ export declare const IsolationModeFreezableLiquidatorProxyAbi: readonly [{
27
+ readonly inputs: readonly [{
28
+ readonly internalType: "address";
29
+ readonly name: "_dolomiteRegistry";
30
+ readonly type: "address";
31
+ }, {
32
+ readonly internalType: "address";
33
+ readonly name: "_liquidatorAssetRegistry";
34
+ readonly type: "address";
35
+ }, {
36
+ readonly internalType: "address";
37
+ readonly name: "_dolomiteMargin";
38
+ readonly type: "address";
39
+ }, {
40
+ readonly internalType: "address";
41
+ readonly name: "_expiry";
42
+ readonly type: "address";
43
+ }, {
44
+ readonly internalType: "uint256";
45
+ readonly name: "_chainId";
46
+ readonly type: "uint256";
47
+ }];
48
+ readonly stateMutability: "nonpayable";
49
+ readonly type: "constructor";
50
+ }, {
51
+ readonly inputs: readonly [];
52
+ readonly name: "DOLOMITE_MARGIN";
53
+ readonly outputs: readonly [{
54
+ readonly internalType: "contract IDolomiteMargin";
55
+ readonly name: "";
56
+ readonly type: "address";
57
+ }];
58
+ readonly stateMutability: "view";
59
+ readonly type: "function";
60
+ }, {
61
+ readonly inputs: readonly [];
62
+ readonly name: "DOLOMITE_MARGIN_OWNER";
63
+ readonly outputs: readonly [{
64
+ readonly internalType: "address";
65
+ readonly name: "";
66
+ readonly type: "address";
67
+ }];
68
+ readonly stateMutability: "view";
69
+ readonly type: "function";
70
+ }, {
71
+ readonly inputs: readonly [];
72
+ readonly name: "DOLOMITE_REGISTRY";
73
+ readonly outputs: readonly [{
74
+ readonly internalType: "contract IDolomiteRegistry";
75
+ readonly name: "";
76
+ readonly type: "address";
77
+ }];
78
+ readonly stateMutability: "view";
79
+ readonly type: "function";
80
+ }, {
81
+ readonly inputs: readonly [];
82
+ readonly name: "EXPIRY";
83
+ readonly outputs: readonly [{
84
+ readonly internalType: "contract IExpiry";
85
+ readonly name: "";
86
+ readonly type: "address";
87
+ }];
88
+ readonly stateMutability: "view";
89
+ readonly type: "function";
90
+ }, {
91
+ readonly inputs: readonly [];
92
+ readonly name: "LIQUIDATOR_ASSET_REGISTRY";
93
+ readonly outputs: readonly [{
94
+ readonly internalType: "contract ILiquidatorAssetRegistry";
95
+ readonly name: "";
96
+ readonly type: "address";
97
+ }];
98
+ readonly stateMutability: "view";
99
+ readonly type: "function";
100
+ }, {
101
+ readonly inputs: readonly [{
102
+ readonly components: readonly [{
103
+ readonly components: readonly [{
104
+ readonly internalType: "address";
105
+ readonly name: "owner";
106
+ readonly type: "address";
107
+ }, {
108
+ readonly internalType: "uint256";
109
+ readonly name: "number";
110
+ readonly type: "uint256";
111
+ }];
112
+ readonly internalType: "struct IDolomiteStructs.AccountInfo";
113
+ readonly name: "liquidAccount";
114
+ readonly type: "tuple";
115
+ }, {
116
+ readonly internalType: "uint256";
117
+ readonly name: "freezableMarketId";
118
+ readonly type: "uint256";
119
+ }, {
120
+ readonly internalType: "uint256";
121
+ readonly name: "inputTokenAmount";
122
+ readonly type: "uint256";
123
+ }, {
124
+ readonly internalType: "uint256";
125
+ readonly name: "outputMarketId";
126
+ readonly type: "uint256";
127
+ }, {
128
+ readonly internalType: "uint256";
129
+ readonly name: "minOutputAmount";
130
+ readonly type: "uint256";
131
+ }, {
132
+ readonly internalType: "uint256";
133
+ readonly name: "expirationTimestamp";
134
+ readonly type: "uint256";
135
+ }, {
136
+ readonly internalType: "bytes";
137
+ readonly name: "extraData";
138
+ readonly type: "bytes";
139
+ }];
140
+ readonly internalType: "struct IIsolationModeFreezableLiquidatorProxy.PrepareForLiquidationParams";
141
+ readonly name: "_params";
142
+ readonly type: "tuple";
143
+ }];
144
+ readonly name: "prepareForLiquidation";
145
+ readonly outputs: readonly [];
146
+ readonly stateMutability: "payable";
147
+ readonly type: "function";
148
+ }];
149
+ /**
150
+ * Type-safe ABI for IsolationModeFreezableLiquidatorProxy
151
+ */
152
+ export type IsolationModeFreezableLiquidatorProxyAbi = typeof IsolationModeFreezableLiquidatorProxyAbi;
153
+ /**
154
+ * Contract instance type for IsolationModeFreezableLiquidatorProxy
155
+ */
156
+ export type IsolationModeFreezableLiquidatorProxyContract = any;
157
+ /**
158
+ * IsolationModeFreezableLiquidatorProxy Contract Class
159
+ *
160
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
161
+ *
162
+ * @example
163
+ * ```typescript
164
+ * import { createPublicClient, createWalletClient, http } from 'viem';
165
+ * import { mainnet } from 'viem/chains';
166
+ * import { IsolationModeFreezableLiquidatorProxy } from 'IsolationModeFreezableLiquidatorProxy';
167
+ *
168
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
169
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
170
+ *
171
+ * const contract = new IsolationModeFreezableLiquidatorProxy('0x...', { publicClient, walletClient });
172
+ *
173
+ * // Read functions
174
+ * const result = await contract.balanceOf('0x...');
175
+ *
176
+ * // Write functions
177
+ * const hash = await contract.transfer('0x...', 1000n);
178
+ *
179
+ * // Simulate transactions (dry-run)
180
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
181
+ * console.log('Gas estimate:', simulation.request.gas);
182
+ *
183
+ * // Watch events
184
+ * const unwatch = contract.watch.Transfer((event) => {
185
+ * console.log('Transfer event:', event);
186
+ * });
187
+ * ```
188
+ */
189
+ export declare class IsolationModeFreezableLiquidatorProxy {
190
+ private contract;
191
+ private contractAddress;
192
+ private publicClient;
193
+ constructor(address: Address, clients: {
194
+ publicClient: PublicClient;
195
+ walletClient?: WalletClient;
196
+ });
197
+ /**
198
+ * Get the contract address
199
+ */
200
+ get address(): Address;
201
+ /**
202
+ * Get the underlying viem contract instance.
203
+ */
204
+ getContract(): IsolationModeFreezableLiquidatorProxyContract;
205
+ /**
206
+ * DOLOMITE_MARGIN
207
+ * view
208
+ */
209
+ DOLOMITE_MARGIN(): Promise<`0x${string}`>;
210
+ /**
211
+ * DOLOMITE_MARGIN_OWNER
212
+ * view
213
+ */
214
+ DOLOMITE_MARGIN_OWNER(): Promise<`0x${string}`>;
215
+ /**
216
+ * DOLOMITE_REGISTRY
217
+ * view
218
+ */
219
+ DOLOMITE_REGISTRY(): Promise<`0x${string}`>;
220
+ /**
221
+ * EXPIRY
222
+ * view
223
+ */
224
+ EXPIRY(): Promise<`0x${string}`>;
225
+ /**
226
+ * LIQUIDATOR_ASSET_REGISTRY
227
+ * view
228
+ */
229
+ LIQUIDATOR_ASSET_REGISTRY(): Promise<`0x${string}`>;
230
+ /**
231
+ * prepareForLiquidation
232
+ * payable
233
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
234
+ */
235
+ prepareForLiquidation(_params: IIsolationModeFreezableLiquidatorProxy_PrepareForLiquidationParams, options?: {
236
+ accessList?: import('viem').AccessList;
237
+ authorizationList?: import('viem').AuthorizationList;
238
+ chain?: import('viem').Chain | null;
239
+ dataSuffix?: `0x${string}`;
240
+ gas?: bigint;
241
+ gasPrice?: bigint;
242
+ maxFeePerGas?: bigint;
243
+ maxPriorityFeePerGas?: bigint;
244
+ nonce?: number;
245
+ value?: bigint;
246
+ }): Promise<`0x${string}`>;
247
+ /**
248
+ * Simulate contract write operations (dry-run without sending transaction)
249
+ *
250
+ * @example
251
+ * const result = await contract.simulate.transfer('0x...', 1000n);
252
+ * console.log('Gas estimate:', result.request.gas);
253
+ * console.log('Would succeed:', result.result);
254
+ */
255
+ get simulate(): {
256
+ /**
257
+ * Simulate prepareForLiquidation
258
+ * Returns gas estimate and result without sending transaction
259
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
260
+ */
261
+ prepareForLiquidation(_params: IIsolationModeFreezableLiquidatorProxy_PrepareForLiquidationParams, options?: {
262
+ accessList?: import("viem").AccessList;
263
+ authorizationList?: import("viem").AuthorizationList;
264
+ chain?: import("viem").Chain | null;
265
+ dataSuffix?: `0x${string}`;
266
+ gas?: bigint;
267
+ gasPrice?: bigint;
268
+ maxFeePerGas?: bigint;
269
+ maxPriorityFeePerGas?: bigint;
270
+ nonce?: number;
271
+ value?: bigint;
272
+ }): Promise<void>;
273
+ };
274
+ /**
275
+ * Watch contract events
276
+ *
277
+ * Note: This contract has no events, so watch returns an empty object.
278
+ */
279
+ get watch(): {};
280
+ }
@@ -0,0 +1,306 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IsolationModeFreezableLiquidatorProxy = exports.IsolationModeFreezableLiquidatorProxyAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * IsolationModeFreezableLiquidatorProxy ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.IsolationModeFreezableLiquidatorProxyAbi = [
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "address",
15
+ "name": "_dolomiteRegistry",
16
+ "type": "address"
17
+ },
18
+ {
19
+ "internalType": "address",
20
+ "name": "_liquidatorAssetRegistry",
21
+ "type": "address"
22
+ },
23
+ {
24
+ "internalType": "address",
25
+ "name": "_dolomiteMargin",
26
+ "type": "address"
27
+ },
28
+ {
29
+ "internalType": "address",
30
+ "name": "_expiry",
31
+ "type": "address"
32
+ },
33
+ {
34
+ "internalType": "uint256",
35
+ "name": "_chainId",
36
+ "type": "uint256"
37
+ }
38
+ ],
39
+ "stateMutability": "nonpayable",
40
+ "type": "constructor"
41
+ },
42
+ {
43
+ "inputs": [],
44
+ "name": "DOLOMITE_MARGIN",
45
+ "outputs": [
46
+ {
47
+ "internalType": "contract IDolomiteMargin",
48
+ "name": "",
49
+ "type": "address"
50
+ }
51
+ ],
52
+ "stateMutability": "view",
53
+ "type": "function"
54
+ },
55
+ {
56
+ "inputs": [],
57
+ "name": "DOLOMITE_MARGIN_OWNER",
58
+ "outputs": [
59
+ {
60
+ "internalType": "address",
61
+ "name": "",
62
+ "type": "address"
63
+ }
64
+ ],
65
+ "stateMutability": "view",
66
+ "type": "function"
67
+ },
68
+ {
69
+ "inputs": [],
70
+ "name": "DOLOMITE_REGISTRY",
71
+ "outputs": [
72
+ {
73
+ "internalType": "contract IDolomiteRegistry",
74
+ "name": "",
75
+ "type": "address"
76
+ }
77
+ ],
78
+ "stateMutability": "view",
79
+ "type": "function"
80
+ },
81
+ {
82
+ "inputs": [],
83
+ "name": "EXPIRY",
84
+ "outputs": [
85
+ {
86
+ "internalType": "contract IExpiry",
87
+ "name": "",
88
+ "type": "address"
89
+ }
90
+ ],
91
+ "stateMutability": "view",
92
+ "type": "function"
93
+ },
94
+ {
95
+ "inputs": [],
96
+ "name": "LIQUIDATOR_ASSET_REGISTRY",
97
+ "outputs": [
98
+ {
99
+ "internalType": "contract ILiquidatorAssetRegistry",
100
+ "name": "",
101
+ "type": "address"
102
+ }
103
+ ],
104
+ "stateMutability": "view",
105
+ "type": "function"
106
+ },
107
+ {
108
+ "inputs": [
109
+ {
110
+ "components": [
111
+ {
112
+ "components": [
113
+ {
114
+ "internalType": "address",
115
+ "name": "owner",
116
+ "type": "address"
117
+ },
118
+ {
119
+ "internalType": "uint256",
120
+ "name": "number",
121
+ "type": "uint256"
122
+ }
123
+ ],
124
+ "internalType": "struct IDolomiteStructs.AccountInfo",
125
+ "name": "liquidAccount",
126
+ "type": "tuple"
127
+ },
128
+ {
129
+ "internalType": "uint256",
130
+ "name": "freezableMarketId",
131
+ "type": "uint256"
132
+ },
133
+ {
134
+ "internalType": "uint256",
135
+ "name": "inputTokenAmount",
136
+ "type": "uint256"
137
+ },
138
+ {
139
+ "internalType": "uint256",
140
+ "name": "outputMarketId",
141
+ "type": "uint256"
142
+ },
143
+ {
144
+ "internalType": "uint256",
145
+ "name": "minOutputAmount",
146
+ "type": "uint256"
147
+ },
148
+ {
149
+ "internalType": "uint256",
150
+ "name": "expirationTimestamp",
151
+ "type": "uint256"
152
+ },
153
+ {
154
+ "internalType": "bytes",
155
+ "name": "extraData",
156
+ "type": "bytes"
157
+ }
158
+ ],
159
+ "internalType": "struct IIsolationModeFreezableLiquidatorProxy.PrepareForLiquidationParams",
160
+ "name": "_params",
161
+ "type": "tuple"
162
+ }
163
+ ],
164
+ "name": "prepareForLiquidation",
165
+ "outputs": [],
166
+ "stateMutability": "payable",
167
+ "type": "function"
168
+ }
169
+ ];
170
+ /**
171
+ * IsolationModeFreezableLiquidatorProxy Contract Class
172
+ *
173
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
174
+ *
175
+ * @example
176
+ * ```typescript
177
+ * import { createPublicClient, createWalletClient, http } from 'viem';
178
+ * import { mainnet } from 'viem/chains';
179
+ * import { IsolationModeFreezableLiquidatorProxy } from 'IsolationModeFreezableLiquidatorProxy';
180
+ *
181
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
182
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
183
+ *
184
+ * const contract = new IsolationModeFreezableLiquidatorProxy('0x...', { publicClient, walletClient });
185
+ *
186
+ * // Read functions
187
+ * const result = await contract.balanceOf('0x...');
188
+ *
189
+ * // Write functions
190
+ * const hash = await contract.transfer('0x...', 1000n);
191
+ *
192
+ * // Simulate transactions (dry-run)
193
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
194
+ * console.log('Gas estimate:', simulation.request.gas);
195
+ *
196
+ * // Watch events
197
+ * const unwatch = contract.watch.Transfer((event) => {
198
+ * console.log('Transfer event:', event);
199
+ * });
200
+ * ```
201
+ */
202
+ class IsolationModeFreezableLiquidatorProxy {
203
+ constructor(address, clients) {
204
+ this.contractAddress = address;
205
+ this.publicClient = clients.publicClient;
206
+ this.contract = (0, viem_1.getContract)({
207
+ address,
208
+ abi: exports.IsolationModeFreezableLiquidatorProxyAbi,
209
+ client: {
210
+ public: clients.publicClient,
211
+ wallet: clients.walletClient,
212
+ },
213
+ });
214
+ }
215
+ /**
216
+ * Get the contract address
217
+ */
218
+ get address() {
219
+ return this.contractAddress;
220
+ }
221
+ /**
222
+ * Get the underlying viem contract instance.
223
+ */
224
+ getContract() {
225
+ return this.contract;
226
+ }
227
+ /**
228
+ * DOLOMITE_MARGIN
229
+ * view
230
+ */
231
+ async DOLOMITE_MARGIN() {
232
+ return this.contract.read.DOLOMITE_MARGIN();
233
+ }
234
+ /**
235
+ * DOLOMITE_MARGIN_OWNER
236
+ * view
237
+ */
238
+ async DOLOMITE_MARGIN_OWNER() {
239
+ return this.contract.read.DOLOMITE_MARGIN_OWNER();
240
+ }
241
+ /**
242
+ * DOLOMITE_REGISTRY
243
+ * view
244
+ */
245
+ async DOLOMITE_REGISTRY() {
246
+ return this.contract.read.DOLOMITE_REGISTRY();
247
+ }
248
+ /**
249
+ * EXPIRY
250
+ * view
251
+ */
252
+ async EXPIRY() {
253
+ return this.contract.read.EXPIRY();
254
+ }
255
+ /**
256
+ * LIQUIDATOR_ASSET_REGISTRY
257
+ * view
258
+ */
259
+ async LIQUIDATOR_ASSET_REGISTRY() {
260
+ return this.contract.read.LIQUIDATOR_ASSET_REGISTRY();
261
+ }
262
+ /**
263
+ * prepareForLiquidation
264
+ * payable
265
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
266
+ */
267
+ async prepareForLiquidation(_params, options) {
268
+ if (!this.contract.write) {
269
+ throw new Error('Wallet client is required for write operations');
270
+ }
271
+ return this.contract.write.prepareForLiquidation([_params], options);
272
+ }
273
+ /**
274
+ * Simulate contract write operations (dry-run without sending transaction)
275
+ *
276
+ * @example
277
+ * const result = await contract.simulate.transfer('0x...', 1000n);
278
+ * console.log('Gas estimate:', result.request.gas);
279
+ * console.log('Would succeed:', result.result);
280
+ */
281
+ get simulate() {
282
+ const contract = this.contract;
283
+ if (!contract.simulate) {
284
+ throw new Error('Public client is required for simulation');
285
+ }
286
+ return {
287
+ /**
288
+ * Simulate prepareForLiquidation
289
+ * Returns gas estimate and result without sending transaction
290
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
291
+ */
292
+ async prepareForLiquidation(_params, options) {
293
+ return contract.simulate.prepareForLiquidation([_params], options);
294
+ }
295
+ };
296
+ }
297
+ /**
298
+ * Watch contract events
299
+ *
300
+ * Note: This contract has no events, so watch returns an empty object.
301
+ */
302
+ get watch() {
303
+ return {};
304
+ }
305
+ }
306
+ exports.IsolationModeFreezableLiquidatorProxy = IsolationModeFreezableLiquidatorProxy;
@@ -0,0 +1,382 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+
5
+ /**
6
+ * IIsolationModeFreezableLiquidatorProxy.PrepareForLiquidationParams struct type
7
+ */
8
+ export type IIsolationModeFreezableLiquidatorProxy_PrepareForLiquidationParams = {
9
+ liquidAccount: IDolomiteStructs_AccountInfo;
10
+ freezableMarketId: bigint;
11
+ inputTokenAmount: bigint;
12
+ outputMarketId: bigint;
13
+ minOutputAmount: bigint;
14
+ expirationTimestamp: bigint;
15
+ extraData: `0x${string}`;
16
+ };
17
+
18
+ /**
19
+ * IDolomiteStructs.AccountInfo struct type
20
+ */
21
+ export type IDolomiteStructs_AccountInfo = {
22
+ owner: `0x${string}`;
23
+ number: bigint;
24
+ };
25
+ /**
26
+ * IsolationModeFreezableLiquidatorProxy ABI
27
+ *
28
+ * This ABI is typed using viem's type system for full type safety.
29
+ */
30
+ export const IsolationModeFreezableLiquidatorProxyAbi = [
31
+ {
32
+ "inputs": [
33
+ {
34
+ "internalType": "address",
35
+ "name": "_dolomiteRegistry",
36
+ "type": "address"
37
+ },
38
+ {
39
+ "internalType": "address",
40
+ "name": "_liquidatorAssetRegistry",
41
+ "type": "address"
42
+ },
43
+ {
44
+ "internalType": "address",
45
+ "name": "_dolomiteMargin",
46
+ "type": "address"
47
+ },
48
+ {
49
+ "internalType": "address",
50
+ "name": "_expiry",
51
+ "type": "address"
52
+ },
53
+ {
54
+ "internalType": "uint256",
55
+ "name": "_chainId",
56
+ "type": "uint256"
57
+ }
58
+ ],
59
+ "stateMutability": "nonpayable",
60
+ "type": "constructor"
61
+ },
62
+ {
63
+ "inputs": [],
64
+ "name": "DOLOMITE_MARGIN",
65
+ "outputs": [
66
+ {
67
+ "internalType": "contract IDolomiteMargin",
68
+ "name": "",
69
+ "type": "address"
70
+ }
71
+ ],
72
+ "stateMutability": "view",
73
+ "type": "function"
74
+ },
75
+ {
76
+ "inputs": [],
77
+ "name": "DOLOMITE_MARGIN_OWNER",
78
+ "outputs": [
79
+ {
80
+ "internalType": "address",
81
+ "name": "",
82
+ "type": "address"
83
+ }
84
+ ],
85
+ "stateMutability": "view",
86
+ "type": "function"
87
+ },
88
+ {
89
+ "inputs": [],
90
+ "name": "DOLOMITE_REGISTRY",
91
+ "outputs": [
92
+ {
93
+ "internalType": "contract IDolomiteRegistry",
94
+ "name": "",
95
+ "type": "address"
96
+ }
97
+ ],
98
+ "stateMutability": "view",
99
+ "type": "function"
100
+ },
101
+ {
102
+ "inputs": [],
103
+ "name": "EXPIRY",
104
+ "outputs": [
105
+ {
106
+ "internalType": "contract IExpiry",
107
+ "name": "",
108
+ "type": "address"
109
+ }
110
+ ],
111
+ "stateMutability": "view",
112
+ "type": "function"
113
+ },
114
+ {
115
+ "inputs": [],
116
+ "name": "LIQUIDATOR_ASSET_REGISTRY",
117
+ "outputs": [
118
+ {
119
+ "internalType": "contract ILiquidatorAssetRegistry",
120
+ "name": "",
121
+ "type": "address"
122
+ }
123
+ ],
124
+ "stateMutability": "view",
125
+ "type": "function"
126
+ },
127
+ {
128
+ "inputs": [
129
+ {
130
+ "components": [
131
+ {
132
+ "components": [
133
+ {
134
+ "internalType": "address",
135
+ "name": "owner",
136
+ "type": "address"
137
+ },
138
+ {
139
+ "internalType": "uint256",
140
+ "name": "number",
141
+ "type": "uint256"
142
+ }
143
+ ],
144
+ "internalType": "struct IDolomiteStructs.AccountInfo",
145
+ "name": "liquidAccount",
146
+ "type": "tuple"
147
+ },
148
+ {
149
+ "internalType": "uint256",
150
+ "name": "freezableMarketId",
151
+ "type": "uint256"
152
+ },
153
+ {
154
+ "internalType": "uint256",
155
+ "name": "inputTokenAmount",
156
+ "type": "uint256"
157
+ },
158
+ {
159
+ "internalType": "uint256",
160
+ "name": "outputMarketId",
161
+ "type": "uint256"
162
+ },
163
+ {
164
+ "internalType": "uint256",
165
+ "name": "minOutputAmount",
166
+ "type": "uint256"
167
+ },
168
+ {
169
+ "internalType": "uint256",
170
+ "name": "expirationTimestamp",
171
+ "type": "uint256"
172
+ },
173
+ {
174
+ "internalType": "bytes",
175
+ "name": "extraData",
176
+ "type": "bytes"
177
+ }
178
+ ],
179
+ "internalType": "struct IIsolationModeFreezableLiquidatorProxy.PrepareForLiquidationParams",
180
+ "name": "_params",
181
+ "type": "tuple"
182
+ }
183
+ ],
184
+ "name": "prepareForLiquidation",
185
+ "outputs": [],
186
+ "stateMutability": "payable",
187
+ "type": "function"
188
+ }
189
+ ] as const satisfies Abi;
190
+
191
+ /**
192
+ * Type-safe ABI for IsolationModeFreezableLiquidatorProxy
193
+ */
194
+ export type IsolationModeFreezableLiquidatorProxyAbi = typeof IsolationModeFreezableLiquidatorProxyAbi;
195
+
196
+ /**
197
+ * Contract instance type for IsolationModeFreezableLiquidatorProxy
198
+ */
199
+ // Use any for contract type to avoid complex viem type issues
200
+ // The runtime behavior is type-safe through viem's ABI typing
201
+ export type IsolationModeFreezableLiquidatorProxyContract = any;
202
+
203
+ /**
204
+ * IsolationModeFreezableLiquidatorProxy Contract Class
205
+ *
206
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
207
+ *
208
+ * @example
209
+ * ```typescript
210
+ * import { createPublicClient, createWalletClient, http } from 'viem';
211
+ * import { mainnet } from 'viem/chains';
212
+ * import { IsolationModeFreezableLiquidatorProxy } from 'IsolationModeFreezableLiquidatorProxy';
213
+ *
214
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
215
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
216
+ *
217
+ * const contract = new IsolationModeFreezableLiquidatorProxy('0x...', { publicClient, walletClient });
218
+ *
219
+ * // Read functions
220
+ * const result = await contract.balanceOf('0x...');
221
+ *
222
+ * // Write functions
223
+ * const hash = await contract.transfer('0x...', 1000n);
224
+ *
225
+ * // Simulate transactions (dry-run)
226
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
227
+ * console.log('Gas estimate:', simulation.request.gas);
228
+ *
229
+ * // Watch events
230
+ * const unwatch = contract.watch.Transfer((event) => {
231
+ * console.log('Transfer event:', event);
232
+ * });
233
+ * ```
234
+ */
235
+ export class IsolationModeFreezableLiquidatorProxy {
236
+ private contract: IsolationModeFreezableLiquidatorProxyContract;
237
+ private contractAddress: Address;
238
+ private publicClient: PublicClient;
239
+
240
+ constructor(
241
+ address: Address,
242
+ clients: {
243
+ publicClient: PublicClient;
244
+ walletClient?: WalletClient;
245
+ }
246
+ ) {
247
+ this.contractAddress = address;
248
+ this.publicClient = clients.publicClient;
249
+ this.contract = getContract({
250
+ address,
251
+ abi: IsolationModeFreezableLiquidatorProxyAbi,
252
+ client: {
253
+ public: clients.publicClient,
254
+ wallet: clients.walletClient,
255
+ },
256
+ });
257
+ }
258
+
259
+ /**
260
+ * Get the contract address
261
+ */
262
+ get address(): Address {
263
+ return this.contractAddress;
264
+ }
265
+
266
+ /**
267
+ * Get the underlying viem contract instance.
268
+ */
269
+ getContract(): IsolationModeFreezableLiquidatorProxyContract {
270
+ return this.contract;
271
+ }
272
+
273
+ /**
274
+ * DOLOMITE_MARGIN
275
+ * view
276
+ */
277
+ async DOLOMITE_MARGIN(): Promise<`0x${string}`> {
278
+ return this.contract.read.DOLOMITE_MARGIN() as Promise<`0x${string}`>;
279
+ }
280
+
281
+ /**
282
+ * DOLOMITE_MARGIN_OWNER
283
+ * view
284
+ */
285
+ async DOLOMITE_MARGIN_OWNER(): Promise<`0x${string}`> {
286
+ return this.contract.read.DOLOMITE_MARGIN_OWNER() as Promise<`0x${string}`>;
287
+ }
288
+
289
+ /**
290
+ * DOLOMITE_REGISTRY
291
+ * view
292
+ */
293
+ async DOLOMITE_REGISTRY(): Promise<`0x${string}`> {
294
+ return this.contract.read.DOLOMITE_REGISTRY() as Promise<`0x${string}`>;
295
+ }
296
+
297
+ /**
298
+ * EXPIRY
299
+ * view
300
+ */
301
+ async EXPIRY(): Promise<`0x${string}`> {
302
+ return this.contract.read.EXPIRY() as Promise<`0x${string}`>;
303
+ }
304
+
305
+ /**
306
+ * LIQUIDATOR_ASSET_REGISTRY
307
+ * view
308
+ */
309
+ async LIQUIDATOR_ASSET_REGISTRY(): Promise<`0x${string}`> {
310
+ return this.contract.read.LIQUIDATOR_ASSET_REGISTRY() as Promise<`0x${string}`>;
311
+ }
312
+
313
+ /**
314
+ * prepareForLiquidation
315
+ * payable
316
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
317
+ */
318
+ async prepareForLiquidation(_params: IIsolationModeFreezableLiquidatorProxy_PrepareForLiquidationParams, options?: {
319
+ accessList?: import('viem').AccessList;
320
+ authorizationList?: import('viem').AuthorizationList;
321
+ chain?: import('viem').Chain | null;
322
+ dataSuffix?: `0x${string}`;
323
+ gas?: bigint;
324
+ gasPrice?: bigint;
325
+ maxFeePerGas?: bigint;
326
+ maxPriorityFeePerGas?: bigint;
327
+ nonce?: number;
328
+ value?: bigint;
329
+ }): Promise<`0x${string}`> {
330
+ if (!this.contract.write) {
331
+ throw new Error('Wallet client is required for write operations');
332
+ }
333
+ return this.contract.write.prepareForLiquidation([_params] as const, options) as Promise<`0x${string}`>;
334
+ }
335
+
336
+
337
+
338
+ /**
339
+ * Simulate contract write operations (dry-run without sending transaction)
340
+ *
341
+ * @example
342
+ * const result = await contract.simulate.transfer('0x...', 1000n);
343
+ * console.log('Gas estimate:', result.request.gas);
344
+ * console.log('Would succeed:', result.result);
345
+ */
346
+ get simulate() {
347
+ const contract = this.contract;
348
+ if (!contract.simulate) {
349
+ throw new Error('Public client is required for simulation');
350
+ }
351
+ return {
352
+ /**
353
+ * Simulate prepareForLiquidation
354
+ * Returns gas estimate and result without sending transaction
355
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
356
+ */
357
+ async prepareForLiquidation(_params: IIsolationModeFreezableLiquidatorProxy_PrepareForLiquidationParams, options?: {
358
+ accessList?: import('viem').AccessList;
359
+ authorizationList?: import('viem').AuthorizationList;
360
+ chain?: import('viem').Chain | null;
361
+ dataSuffix?: `0x${string}`;
362
+ gas?: bigint;
363
+ gasPrice?: bigint;
364
+ maxFeePerGas?: bigint;
365
+ maxPriorityFeePerGas?: bigint;
366
+ nonce?: number;
367
+ value?: bigint;
368
+ }): Promise<void> {
369
+ return contract.simulate.prepareForLiquidation([_params] as const, options) as Promise<void>;
370
+ }
371
+ };
372
+ }
373
+
374
+ /**
375
+ * Watch contract events
376
+ *
377
+ * Note: This contract has no events, so watch returns an empty object.
378
+ */
379
+ get watch() {
380
+ return {};
381
+ }
382
+ }
@@ -0,0 +1,2 @@
1
+ export { IsolationModeFreezableLiquidatorProxyAbi, IsolationModeFreezableLiquidatorProxy } from './IsolationModeFreezableLiquidatorProxy';
2
+ export type { IsolationModeFreezableLiquidatorProxyAbi as IsolationModeFreezableLiquidatorProxyAbiType, IsolationModeFreezableLiquidatorProxyContract } from './IsolationModeFreezableLiquidatorProxy';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IsolationModeFreezableLiquidatorProxy = exports.IsolationModeFreezableLiquidatorProxyAbi = void 0;
4
+ // Auto-generated exports for all contracts
5
+ var IsolationModeFreezableLiquidatorProxy_1 = require("./IsolationModeFreezableLiquidatorProxy");
6
+ Object.defineProperty(exports, "IsolationModeFreezableLiquidatorProxyAbi", { enumerable: true, get: function () { return IsolationModeFreezableLiquidatorProxy_1.IsolationModeFreezableLiquidatorProxyAbi; } });
7
+ Object.defineProperty(exports, "IsolationModeFreezableLiquidatorProxy", { enumerable: true, get: function () { return IsolationModeFreezableLiquidatorProxy_1.IsolationModeFreezableLiquidatorProxy; } });
@@ -0,0 +1,3 @@
1
+ // Auto-generated exports for all contracts
2
+ export { IsolationModeFreezableLiquidatorProxyAbi, IsolationModeFreezableLiquidatorProxy } from './IsolationModeFreezableLiquidatorProxy';
3
+ export type { IsolationModeFreezableLiquidatorProxyAbi as IsolationModeFreezableLiquidatorProxyAbiType, IsolationModeFreezableLiquidatorProxyContract } from './IsolationModeFreezableLiquidatorProxy';
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './contracts';
package/index.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ // Auto-generated TypeScript type bindings
3
+ // This file exports all generated contract types
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ __exportStar(require("./contracts"), exports);
package/package.json CHANGED
@@ -1,6 +1,43 @@
1
1
  {
2
2
  "name": "@gitmyabi/isolationmodefreezableliquidator",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.0",
4
+ "description": "Auto-generated TypeScript type bindings for IsolationModeFreezableLiquidator (build etherscan-isolationmodefreezableliquidator-8d178ff4-1794274605638, commit 7d54a68, branch etherscan)",
5
+ "main": "./index.js",
6
+ "types": "./index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./index.js",
10
+ "require": "./index.js",
11
+ "types": "./index.d.ts"
12
+ },
13
+ "./contracts": {
14
+ "import": "./contracts/index.js",
15
+ "require": "./contracts/index.js",
16
+ "types": "./contracts/index.d.ts"
17
+ }
18
+ },
19
+ "files": [
20
+ "index.js",
21
+ "index.d.ts",
22
+ "contracts"
23
+ ],
24
+ "keywords": [
25
+ "ethereum",
26
+ "smart-contracts",
27
+ "viem",
28
+ "wagmi",
29
+ "typescript",
30
+ "abi",
31
+ "ethers-v6"
32
+ ],
33
+ "license": "Apache-2.0",
34
+ "dependencies": {
35
+ "viem": "^2.0.0"
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "https://github.com/etherscan/isolationmodefreezableliquidator"
40
+ },
41
+ "branch": "etherscan",
42
+ "shortHash": "7d54a68"
6
43
  }