@@ -25,8 +25,7 @@ import { createAnvilClient } from "./createAnvilClient";
2525export interface SDKExampleOptions {
2626 addressProvider ?: string ;
2727 addressProviderJson ?: string ;
28- marketConfigurator ?: string ;
29- marketConfiguratorJson ?: string ;
28+ marketConfigurators : Address [ ] ;
3029 anvilUrl ?: string ;
3130 outFile ?: string ;
3231}
@@ -43,8 +42,7 @@ export class SDKExample {
4342 const {
4443 addressProvider : ap ,
4544 addressProviderJson,
46- marketConfigurator : mc ,
47- marketConfiguratorJson,
45+ marketConfigurators,
4846 anvilUrl = "http://127.0.0.1:8545" ,
4947 outFile,
5048 } = opts ;
@@ -53,25 +51,19 @@ export class SDKExample {
5351 ap ,
5452 addressProviderJson ,
5553 ) ;
56- const marketConfigurator = await this . #readConfigAddress(
57- "marketConfigurator" ,
58- mc ,
59- marketConfiguratorJson ,
60- ) ;
6154
6255 this . #sdk = await GearboxSDK . attach ( {
6356 rpcURLs : [ anvilUrl ] ,
6457 timeout : 480_000 ,
6558 addressProvider,
6659 logger : this . #logger,
6760 ignoreUpdateablePrices : true ,
68- marketConfigurators : [ marketConfigurator ] ,
61+ marketConfigurators,
6962 } ) ;
7063 await this . #safeMigrateFaucet( addressProvider ) ;
7164
72- const puTx = await this . #sdk. priceFeeds . getUpdatePriceFeedsTx ( [
73- marketConfigurator ,
74- ] ) ;
65+ const puTx =
66+ await this . #sdk. priceFeeds . getUpdatePriceFeedsTx ( marketConfigurators ) ;
7567 const updater = createWalletClient ( {
7668 account : privateKeyToAccount (
7769 "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" , // well-known anvil private key
@@ -84,7 +76,7 @@ export class SDKExample {
8476 const hash = await sendRawTx ( updater , { tx : puTx } ) ;
8577 await publicClient . waitForTransactionReceipt ( { hash } ) ;
8678
87- await this . #sdk. marketRegister . loadMarkets ( [ marketConfigurator ] , true ) ;
79+ await this . #sdk. marketRegister . loadMarkets ( marketConfigurators , true ) ;
8880
8981 this . #logger?. info ( "attached sdk" ) ;
9082 if ( outFile ) {
0 commit comments