carbon-marginfi-v2-decoder 1.0.0

MarginfiV2 Decoder
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
//! This code was AUTOGENERATED using the Codama library.
use carbon_core::{
    account::AccountMetadata,
    postgres::{
        metadata::AccountRowMetadata,
        primitives::{Pubkey, U64, U8},
    },
};

#[derive(sqlx::FromRow, Debug, Clone)]
pub struct SolendMinimalReserveRow {
    #[sqlx(flatten)]
    pub account_metadata: AccountRowMetadata,
    pub last_update_slot: U64,
    pub last_update_stale: U8,
    pub lending_market: Pubkey,
    pub liquidity_mint_pubkey: Pubkey,
    pub liquidity_mint_decimals: U8,
    pub liquidity_supply_pubkey: Pubkey,
    pub liquidity_pyth_oracle_pubkey: Pubkey,
    pub liquidity_switchboard_oracle_pubkey: Pubkey,
    pub liquidity_available_amount: U64,
    pub liquidity_borrowed_amount_wads: Vec<u8>,
    pub liquidity_cumulative_borrow_rate_wads: Vec<u8>,
    pub liquidity_market_price: Vec<u8>,
    pub collateral_mint_pubkey: Pubkey,
    pub collateral_mint_total_supply: U64,
    pub collateral_supply_pubkey: Pubkey,
    pub config_optimal_utilization_rate: U8,
    pub config_loan_to_value_ratio: U8,
    pub config_liquidation_bonus: U8,
    pub config_liquidation_threshold: U8,
    pub padding_to_fees64: Vec<u8>,
    pub padding_to_fees6: Vec<u8>,
    pub liquidity_accumulated_protocol_fees_wads: Vec<u8>,
    pub padding_final128: Vec<u8>,
    pub padding_final64: Vec<u8>,
    pub padding_final32: Vec<u8>,
    pub padding_final6: Vec<u8>,
}

impl SolendMinimalReserveRow {
    pub fn from_parts(
        source: crate::accounts::solend_minimal_reserve::SolendMinimalReserve,
        metadata: AccountMetadata,
    ) -> Self {
        Self {
            account_metadata: metadata.into(),
            last_update_slot: source.last_update_slot.into(),
            last_update_stale: source.last_update_stale.into(),
            lending_market: source.lending_market.into(),
            liquidity_mint_pubkey: source.liquidity_mint_pubkey.into(),
            liquidity_mint_decimals: source.liquidity_mint_decimals.into(),
            liquidity_supply_pubkey: source.liquidity_supply_pubkey.into(),
            liquidity_pyth_oracle_pubkey: source.liquidity_pyth_oracle_pubkey.into(),
            liquidity_switchboard_oracle_pubkey: source.liquidity_switchboard_oracle_pubkey.into(),
            liquidity_available_amount: source.liquidity_available_amount.into(),
            liquidity_borrowed_amount_wads: source.liquidity_borrowed_amount_wads.to_vec(),
            liquidity_cumulative_borrow_rate_wads: source
                .liquidity_cumulative_borrow_rate_wads
                .to_vec(),
            liquidity_market_price: source.liquidity_market_price.to_vec(),
            collateral_mint_pubkey: source.collateral_mint_pubkey.into(),
            collateral_mint_total_supply: source.collateral_mint_total_supply.into(),
            collateral_supply_pubkey: source.collateral_supply_pubkey.into(),
            config_optimal_utilization_rate: source.config_optimal_utilization_rate.into(),
            config_loan_to_value_ratio: source.config_loan_to_value_ratio.into(),
            config_liquidation_bonus: source.config_liquidation_bonus.into(),
            config_liquidation_threshold: source.config_liquidation_threshold.into(),
            padding_to_fees64: source.padding_to_fees64.to_vec(),
            padding_to_fees6: source.padding_to_fees6.to_vec(),
            liquidity_accumulated_protocol_fees_wads: source
                .liquidity_accumulated_protocol_fees_wads
                .to_vec(),
            padding_final128: source.padding_final128.to_vec(),
            padding_final64: source.padding_final64.to_vec(),
            padding_final32: source.padding_final32.to_vec(),
            padding_final6: source.padding_final6.to_vec(),
        }
    }
}

impl TryFrom<SolendMinimalReserveRow>
    for crate::accounts::solend_minimal_reserve::SolendMinimalReserve
{
    type Error = carbon_core::error::Error;
    fn try_from(source: SolendMinimalReserveRow) -> Result<Self, Self::Error> {
        Ok(Self {
            last_update_slot: *source.last_update_slot,
            last_update_stale: source.last_update_stale.try_into().map_err(|_| {
                carbon_core::error::Error::Custom(
                    "Failed to convert value from postgres primitive".to_string(),
                )
            })?,
            lending_market: *source.lending_market,
            liquidity_mint_pubkey: *source.liquidity_mint_pubkey,
            liquidity_mint_decimals: source.liquidity_mint_decimals.try_into().map_err(|_| {
                carbon_core::error::Error::Custom(
                    "Failed to convert value from postgres primitive".to_string(),
                )
            })?,
            liquidity_supply_pubkey: *source.liquidity_supply_pubkey,
            liquidity_pyth_oracle_pubkey: *source.liquidity_pyth_oracle_pubkey,
            liquidity_switchboard_oracle_pubkey: *source.liquidity_switchboard_oracle_pubkey,
            liquidity_available_amount: *source.liquidity_available_amount,
            liquidity_borrowed_amount_wads: source
                .liquidity_borrowed_amount_wads
                .as_slice()
                .try_into()
                .map_err(|_| {
                    carbon_core::error::Error::Custom(
                        "Failed to convert padding from postgres primitive: expected 16 bytes"
                            .to_string(),
                    )
                })?,
            liquidity_cumulative_borrow_rate_wads: source
                .liquidity_cumulative_borrow_rate_wads
                .as_slice()
                .try_into()
                .map_err(|_| {
                    carbon_core::error::Error::Custom(
                        "Failed to convert padding from postgres primitive: expected 16 bytes"
                            .to_string(),
                    )
                })?,
            liquidity_market_price: source
                .liquidity_market_price
                .as_slice()
                .try_into()
                .map_err(|_| {
                    carbon_core::error::Error::Custom(
                        "Failed to convert padding from postgres primitive: expected 16 bytes"
                            .to_string(),
                    )
                })?,
            collateral_mint_pubkey: *source.collateral_mint_pubkey,
            collateral_mint_total_supply: *source.collateral_mint_total_supply,
            collateral_supply_pubkey: *source.collateral_supply_pubkey,
            config_optimal_utilization_rate: source
                .config_optimal_utilization_rate
                .try_into()
                .map_err(|_| {
                    carbon_core::error::Error::Custom(
                        "Failed to convert value from postgres primitive".to_string(),
                    )
                })?,
            config_loan_to_value_ratio: source.config_loan_to_value_ratio.try_into().map_err(
                |_| {
                    carbon_core::error::Error::Custom(
                        "Failed to convert value from postgres primitive".to_string(),
                    )
                },
            )?,
            config_liquidation_bonus: source.config_liquidation_bonus.try_into().map_err(|_| {
                carbon_core::error::Error::Custom(
                    "Failed to convert value from postgres primitive".to_string(),
                )
            })?,
            config_liquidation_threshold: source.config_liquidation_threshold.try_into().map_err(
                |_| {
                    carbon_core::error::Error::Custom(
                        "Failed to convert value from postgres primitive".to_string(),
                    )
                },
            )?,
            padding_to_fees64: source
                .padding_to_fees64
                .as_slice()
                .try_into()
                .map_err(|_| {
                    carbon_core::error::Error::Custom(
                        "Failed to convert padding from postgres primitive: expected 64 bytes"
                            .to_string(),
                    )
                })?,
            padding_to_fees6: source.padding_to_fees6.as_slice().try_into().map_err(|_| {
                carbon_core::error::Error::Custom(
                    "Failed to convert padding from postgres primitive: expected 6 bytes"
                        .to_string(),
                )
            })?,
            liquidity_accumulated_protocol_fees_wads: source
                .liquidity_accumulated_protocol_fees_wads
                .as_slice()
                .try_into()
                .map_err(|_| {
                    carbon_core::error::Error::Custom(
                        "Failed to convert padding from postgres primitive: expected 16 bytes"
                            .to_string(),
                    )
                })?,
            padding_final128: source.padding_final128.as_slice().try_into().map_err(|_| {
                carbon_core::error::Error::Custom(
                    "Failed to convert padding from postgres primitive: expected 128 bytes"
                        .to_string(),
                )
            })?,
            padding_final64: source.padding_final64.as_slice().try_into().map_err(|_| {
                carbon_core::error::Error::Custom(
                    "Failed to convert padding from postgres primitive: expected 64 bytes"
                        .to_string(),
                )
            })?,
            padding_final32: source.padding_final32.as_slice().try_into().map_err(|_| {
                carbon_core::error::Error::Custom(
                    "Failed to convert padding from postgres primitive: expected 32 bytes"
                        .to_string(),
                )
            })?,
            padding_final6: source.padding_final6.as_slice().try_into().map_err(|_| {
                carbon_core::error::Error::Custom(
                    "Failed to convert padding from postgres primitive: expected 6 bytes"
                        .to_string(),
                )
            })?,
        })
    }
}

impl carbon_core::postgres::operations::Table
    for crate::accounts::solend_minimal_reserve::SolendMinimalReserve
{
    fn table() -> &'static str {
        "solend_minimal_reserve_account"
    }

    fn columns() -> Vec<&'static str> {
        vec![
            "__pubkey",
            "__slot",
            "last_update_slot",
            "last_update_stale",
            "lending_market",
            "liquidity_mint_pubkey",
            "liquidity_mint_decimals",
            "liquidity_supply_pubkey",
            "liquidity_pyth_oracle_pubkey",
            "liquidity_switchboard_oracle_pubkey",
            "liquidity_available_amount",
            "liquidity_borrowed_amount_wads",
            "liquidity_cumulative_borrow_rate_wads",
            "liquidity_market_price",
            "collateral_mint_pubkey",
            "collateral_mint_total_supply",
            "collateral_supply_pubkey",
            "config_optimal_utilization_rate",
            "config_loan_to_value_ratio",
            "config_liquidation_bonus",
            "config_liquidation_threshold",
            "padding_to_fees64",
            "padding_to_fees6",
            "liquidity_accumulated_protocol_fees_wads",
            "padding_final128",
            "padding_final64",
            "padding_final32",
            "padding_final6",
        ]
    }
}

#[async_trait::async_trait]
impl carbon_core::postgres::operations::Insert for SolendMinimalReserveRow {
    async fn insert(&self, pool: &sqlx::PgPool) -> carbon_core::error::CarbonResult<()> {
        sqlx::query(r#"
            INSERT INTO solend_minimal_reserve_account (
                "last_update_slot",
                "last_update_stale",
                "lending_market",
                "liquidity_mint_pubkey",
                "liquidity_mint_decimals",
                "liquidity_supply_pubkey",
                "liquidity_pyth_oracle_pubkey",
                "liquidity_switchboard_oracle_pubkey",
                "liquidity_available_amount",
                "liquidity_borrowed_amount_wads",
                "liquidity_cumulative_borrow_rate_wads",
                "liquidity_market_price",
                "collateral_mint_pubkey",
                "collateral_mint_total_supply",
                "collateral_supply_pubkey",
                "config_optimal_utilization_rate",
                "config_loan_to_value_ratio",
                "config_liquidation_bonus",
                "config_liquidation_threshold",
                "padding_to_fees64",
                "padding_to_fees6",
                "liquidity_accumulated_protocol_fees_wads",
                "padding_final128",
                "padding_final64",
                "padding_final32",
                "padding_final6",
                __pubkey, __slot
            ) VALUES (
                $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28
            )"#)
        .bind(&self.last_update_slot)
        .bind(self.last_update_stale)
        .bind(self.lending_market)
        .bind(self.liquidity_mint_pubkey)
        .bind(self.liquidity_mint_decimals)
        .bind(self.liquidity_supply_pubkey)
        .bind(self.liquidity_pyth_oracle_pubkey)
        .bind(self.liquidity_switchboard_oracle_pubkey)
        .bind(&self.liquidity_available_amount)
        .bind(&self.liquidity_borrowed_amount_wads)
        .bind(&self.liquidity_cumulative_borrow_rate_wads)
        .bind(&self.liquidity_market_price)
        .bind(self.collateral_mint_pubkey)
        .bind(&self.collateral_mint_total_supply)
        .bind(self.collateral_supply_pubkey)
        .bind(self.config_optimal_utilization_rate)
        .bind(self.config_loan_to_value_ratio)
        .bind(self.config_liquidation_bonus)
        .bind(self.config_liquidation_threshold)
        .bind(&self.padding_to_fees64)
        .bind(&self.padding_to_fees6)
        .bind(&self.liquidity_accumulated_protocol_fees_wads)
        .bind(&self.padding_final128)
        .bind(&self.padding_final64)
        .bind(&self.padding_final32)
        .bind(&self.padding_final6)
        .bind(self.account_metadata.pubkey)
        .bind(&self.account_metadata.slot)
        .execute(pool).await
        .map_err(|e| carbon_core::error::Error::Custom(e.to_string()))?;
        Ok(())
    }
}

#[async_trait::async_trait]
impl carbon_core::postgres::operations::Upsert for SolendMinimalReserveRow {
    async fn upsert(&self, pool: &sqlx::PgPool) -> carbon_core::error::CarbonResult<()> {
        sqlx::query(r#"INSERT INTO solend_minimal_reserve_account (
                "last_update_slot",
                "last_update_stale",
                "lending_market",
                "liquidity_mint_pubkey",
                "liquidity_mint_decimals",
                "liquidity_supply_pubkey",
                "liquidity_pyth_oracle_pubkey",
                "liquidity_switchboard_oracle_pubkey",
                "liquidity_available_amount",
                "liquidity_borrowed_amount_wads",
                "liquidity_cumulative_borrow_rate_wads",
                "liquidity_market_price",
                "collateral_mint_pubkey",
                "collateral_mint_total_supply",
                "collateral_supply_pubkey",
                "config_optimal_utilization_rate",
                "config_loan_to_value_ratio",
                "config_liquidation_bonus",
                "config_liquidation_threshold",
                "padding_to_fees64",
                "padding_to_fees6",
                "liquidity_accumulated_protocol_fees_wads",
                "padding_final128",
                "padding_final64",
                "padding_final32",
                "padding_final6",
                __pubkey, __slot
            ) VALUES (
                $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28
            ) ON CONFLICT (
                __pubkey
            ) DO UPDATE SET
                "last_update_slot" = EXCLUDED."last_update_slot",
                "last_update_stale" = EXCLUDED."last_update_stale",
                "lending_market" = EXCLUDED."lending_market",
                "liquidity_mint_pubkey" = EXCLUDED."liquidity_mint_pubkey",
                "liquidity_mint_decimals" = EXCLUDED."liquidity_mint_decimals",
                "liquidity_supply_pubkey" = EXCLUDED."liquidity_supply_pubkey",
                "liquidity_pyth_oracle_pubkey" = EXCLUDED."liquidity_pyth_oracle_pubkey",
                "liquidity_switchboard_oracle_pubkey" = EXCLUDED."liquidity_switchboard_oracle_pubkey",
                "liquidity_available_amount" = EXCLUDED."liquidity_available_amount",
                "liquidity_borrowed_amount_wads" = EXCLUDED."liquidity_borrowed_amount_wads",
                "liquidity_cumulative_borrow_rate_wads" = EXCLUDED."liquidity_cumulative_borrow_rate_wads",
                "liquidity_market_price" = EXCLUDED."liquidity_market_price",
                "collateral_mint_pubkey" = EXCLUDED."collateral_mint_pubkey",
                "collateral_mint_total_supply" = EXCLUDED."collateral_mint_total_supply",
                "collateral_supply_pubkey" = EXCLUDED."collateral_supply_pubkey",
                "config_optimal_utilization_rate" = EXCLUDED."config_optimal_utilization_rate",
                "config_loan_to_value_ratio" = EXCLUDED."config_loan_to_value_ratio",
                "config_liquidation_bonus" = EXCLUDED."config_liquidation_bonus",
                "config_liquidation_threshold" = EXCLUDED."config_liquidation_threshold",
                "padding_to_fees64" = EXCLUDED."padding_to_fees64",
                "padding_to_fees6" = EXCLUDED."padding_to_fees6",
                "liquidity_accumulated_protocol_fees_wads" = EXCLUDED."liquidity_accumulated_protocol_fees_wads",
                "padding_final128" = EXCLUDED."padding_final128",
                "padding_final64" = EXCLUDED."padding_final64",
                "padding_final32" = EXCLUDED."padding_final32",
                "padding_final6" = EXCLUDED."padding_final6",
                __slot = EXCLUDED.__slot
            "#)
        .bind(&self.last_update_slot)
        .bind(self.last_update_stale)
        .bind(self.lending_market)
        .bind(self.liquidity_mint_pubkey)
        .bind(self.liquidity_mint_decimals)
        .bind(self.liquidity_supply_pubkey)
        .bind(self.liquidity_pyth_oracle_pubkey)
        .bind(self.liquidity_switchboard_oracle_pubkey)
        .bind(&self.liquidity_available_amount)
        .bind(&self.liquidity_borrowed_amount_wads)
        .bind(&self.liquidity_cumulative_borrow_rate_wads)
        .bind(&self.liquidity_market_price)
        .bind(self.collateral_mint_pubkey)
        .bind(&self.collateral_mint_total_supply)
        .bind(self.collateral_supply_pubkey)
        .bind(self.config_optimal_utilization_rate)
        .bind(self.config_loan_to_value_ratio)
        .bind(self.config_liquidation_bonus)
        .bind(self.config_liquidation_threshold)
        .bind(&self.padding_to_fees64)
        .bind(&self.padding_to_fees6)
        .bind(&self.liquidity_accumulated_protocol_fees_wads)
        .bind(&self.padding_final128)
        .bind(&self.padding_final64)
        .bind(&self.padding_final32)
        .bind(&self.padding_final6)
        .bind(self.account_metadata.pubkey)
        .bind(&self.account_metadata.slot)
        .execute(pool).await
        .map_err(|e| carbon_core::error::Error::Custom(e.to_string()))?;
        Ok(())
    }
}

#[async_trait::async_trait]
impl carbon_core::postgres::operations::Delete for SolendMinimalReserveRow {
    type Key = carbon_core::postgres::primitives::Pubkey;

    async fn delete(key: Self::Key, pool: &sqlx::PgPool) -> carbon_core::error::CarbonResult<()> {
        sqlx::query(
            r#"DELETE FROM solend_minimal_reserve_account WHERE
                __pubkey = $1
            "#,
        )
        .bind(key)
        .execute(pool)
        .await
        .map_err(|e| carbon_core::error::Error::Custom(e.to_string()))?;
        Ok(())
    }
}

#[async_trait::async_trait]
impl carbon_core::postgres::operations::Lookup for SolendMinimalReserveRow {
    type Key = carbon_core::postgres::primitives::Pubkey;

    async fn lookup(
        key: Self::Key,
        pool: &sqlx::PgPool,
    ) -> carbon_core::error::CarbonResult<Option<Self>> {
        let row = sqlx::query_as(
            r#"SELECT * FROM solend_minimal_reserve_account WHERE
                __pubkey = $1
            "#,
        )
        .bind(key)
        .fetch_optional(pool)
        .await
        .map_err(|e| carbon_core::error::Error::Custom(e.to_string()))?;
        Ok(row)
    }
}

pub struct SolendMinimalReserveMigrationOperation;

#[async_trait::async_trait]
impl sqlx_migrator::Operation<sqlx::Postgres> for SolendMinimalReserveMigrationOperation {
    async fn up(
        &self,
        connection: &mut sqlx::PgConnection,
    ) -> Result<(), sqlx_migrator::error::Error> {
        sqlx::query(
            r#"CREATE TABLE IF NOT EXISTS solend_minimal_reserve_account (
                -- Account data
                "last_update_slot" NUMERIC(20) NOT NULL,
                "last_update_stale" INT2 NOT NULL,
                "lending_market" BYTEA NOT NULL,
                "liquidity_mint_pubkey" BYTEA NOT NULL,
                "liquidity_mint_decimals" INT2 NOT NULL,
                "liquidity_supply_pubkey" BYTEA NOT NULL,
                "liquidity_pyth_oracle_pubkey" BYTEA NOT NULL,
                "liquidity_switchboard_oracle_pubkey" BYTEA NOT NULL,
                "liquidity_available_amount" NUMERIC(20) NOT NULL,
                "liquidity_borrowed_amount_wads" BYTEA NOT NULL,
                "liquidity_cumulative_borrow_rate_wads" BYTEA NOT NULL,
                "liquidity_market_price" BYTEA NOT NULL,
                "collateral_mint_pubkey" BYTEA NOT NULL,
                "collateral_mint_total_supply" NUMERIC(20) NOT NULL,
                "collateral_supply_pubkey" BYTEA NOT NULL,
                "config_optimal_utilization_rate" INT2 NOT NULL,
                "config_loan_to_value_ratio" INT2 NOT NULL,
                "config_liquidation_bonus" INT2 NOT NULL,
                "config_liquidation_threshold" INT2 NOT NULL,
                "padding_to_fees64" BYTEA NOT NULL,
                "padding_to_fees6" BYTEA NOT NULL,
                "liquidity_accumulated_protocol_fees_wads" BYTEA NOT NULL,
                "padding_final128" BYTEA NOT NULL,
                "padding_final64" BYTEA NOT NULL,
                "padding_final32" BYTEA NOT NULL,
                "padding_final6" BYTEA NOT NULL,
                -- Account metadata
                __pubkey BYTEA NOT NULL,
                __slot NUMERIC(20),
                PRIMARY KEY (__pubkey)
            )"#,
        )
        .execute(connection)
        .await?;
        Ok(())
    }

    async fn down(
        &self,
        connection: &mut sqlx::PgConnection,
    ) -> Result<(), sqlx_migrator::error::Error> {
        sqlx::query(r#"DROP TABLE IF EXISTS solend_minimal_reserve_account"#)
            .execute(connection)
            .await?;
        Ok(())
    }
}