Skip to content

Commit 4865204

Browse files
committed
chore: fix function args, remove duplicate interface, and fix js doc comment
1 parent 8885544 commit 4865204

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

src/pool/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ export interface Request {
7070
amount: i128;
7171
}
7272

73+
export interface FlashLoan {
74+
contract: Address | string;
75+
asset: Address | string;
76+
amount: i128;
77+
}
78+
7379
export interface AuctionKey {
7480
auct_type: u32;
7581
user: string;

src/pool/pool_contract.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
ReserveConfig,
1010
ReserveEmissionMetadata,
1111
ReserveConfigV2,
12+
FlashLoan,
1213
} from './index.js';
1314
import { EmissionDataV2, UserEmissions } from '../emissions.js';
1415
import { AuctionType } from './auction.js';
@@ -32,6 +33,10 @@ export interface PoolConstructorArgs {
3233
blnd_id: Address | string;
3334
}
3435

36+
export interface PoolConstructorArgsV2 extends PoolConstructorArgs {
37+
min_collateral: i128;
38+
}
39+
3540
export interface UpdatePoolV1Args {
3641
backstop_take_rate: u32;
3742
max_positions: u32;
@@ -52,10 +57,7 @@ export interface SetReserveV2Args {
5257
asset: Address | string;
5358
metadata: ReserveConfigV2;
5459
}
55-
export interface SetReserveV1Args {
56-
asset: Address | string;
57-
metadata: ReserveConfig;
58-
}
60+
5961
export interface PoolClaimArgs {
6062
from: Address | string;
6163
reserve_token_ids: Array<u32>;
@@ -76,9 +78,9 @@ export interface NewAuctionArgs {
7678
}
7779

7880
export interface FlashLoanArgs {
79-
contract: Address | string;
80-
asset: Address | string;
81-
amount: i128;
81+
from: Address | string;
82+
flash_loan: FlashLoan;
83+
requests: Array<Request>;
8284
}
8385

8486
export abstract class PoolContract extends Contract {
@@ -288,7 +290,7 @@ export abstract class PoolContract extends Contract {
288290
*
289291
* @param res_emission_metadata - A vector of ReserveEmissionMetadata to update metadata to.
290292
*
291-
* @throws Will throw an error if the caller is not the admin or if the sum of ReserveEmissionMetadata shares is greater than 1.
293+
* @throws Will throw an error if the caller is not the admin.
292294
*
293295
* @returns A base64-encoded string representing the operation.
294296
*/
@@ -592,7 +594,7 @@ export class PoolContractV2 extends PoolContract {
592594
static deploy(
593595
deployer: string,
594596
wasmHash: Buffer | string,
595-
args: PoolConstructorArgs,
597+
args: PoolConstructorArgsV2,
596598
salt?: Buffer,
597599
format?: 'hex' | 'base64'
598600
): string {

0 commit comments

Comments
 (0)