1919 fs,
2020 time:: Duration ,
2121 } ,
22+ uuid:: Uuid ,
2223} ;
2324
2425pub mod server;
@@ -150,33 +151,39 @@ pub enum Config {
150151pub struct ConfigSvm {
151152 /// Id of the express relay program.
152153 #[ serde_as( as = "DisplayFromStr" ) ]
153- pub express_relay_program_id : Pubkey ,
154+ pub express_relay_program_id : Pubkey ,
154155 /// RPC endpoint to use for reading from the blockchain.
155- pub rpc_read_url : String ,
156+ pub rpc_read_url : String ,
156157 /// RPC endpoint to use for broadcasting transactions
157- pub rpc_tx_submission_urls : Vec < String > ,
158+ pub rpc_tx_submission_urls : Vec < String > ,
158159 /// WS endpoint to use for interacting with the blockchain.
159- pub ws_addr : String ,
160+ pub ws_addr : String ,
160161 /// Timeout for RPC requests in seconds.
161162 #[ serde( default = "ConfigSvm::default_rpc_timeout_svm" ) ]
162- pub rpc_timeout : u64 ,
163+ pub rpc_timeout : u64 ,
163164 #[ serde( default ) ]
164165 /// Percentile of prioritization fees to query from the `rpc_read_url`.
165166 /// This should be None unless the RPC `getRecentPrioritizationFees`'s supports the percentile parameter, for example Triton RPC.
166167 /// It is an integer between 0 and 10000 with 10000 representing 100%.
167- pub prioritization_fee_percentile : Option < u64 > ,
168+ pub prioritization_fee_percentile : Option < u64 > ,
168169 /// List of accepted token programs for the swap instruction.
169170 #[ serde_as( as = "Vec<DisplayFromStr>" ) ]
170- pub accepted_token_programs : Vec < Pubkey > ,
171+ pub accepted_token_programs : Vec < Pubkey > ,
171172 /// Ordered list of fee tokens, with first being the most preferred.
172173 #[ serde_as( as = "Vec<DisplayFromStr>" ) ]
173- pub ordered_fee_tokens : Vec < Pubkey > ,
174+ pub ordered_fee_tokens : Vec < Pubkey > ,
174175 /// Whitelisted token mints
175176 #[ serde( default ) ]
176- pub token_whitelist : TokenWhitelistConfig ,
177+ pub token_whitelist : TokenWhitelistConfig ,
178+ /// Minimum fee list
179+ #[ serde( default ) ]
180+ pub minimum_fee_list : MinimumFeeListConfig ,
181+ /// Whether to allow permissionless quote requests.
182+ #[ serde( default ) ]
183+ pub allow_permissionless_quote_requests : bool ,
177184 /// Auction time for the chain (how long to wait before choosing winning bids)
178185 #[ serde( default = "ConfigSvm::default_auction_time" , with = "humantime_serde" ) ]
179- pub auction_time : Duration ,
186+ pub auction_time : Duration ,
180187}
181188
182189impl ConfigSvm {
@@ -199,3 +206,25 @@ pub struct TokenWhitelistConfig {
199206 #[ serde_as( as = "Vec<DisplayFromStr>" ) ]
200207 pub whitelist_mints : Vec < Pubkey > ,
201208}
209+
210+ /// Optional minimum fee list to determine validity of quote request
211+ #[ serde_as]
212+ #[ derive( Clone , Debug , Default , serde:: Serialize , serde:: Deserialize ) ]
213+ pub struct MinimumFeeListConfig {
214+ #[ serde( default ) ]
215+ pub profiles : Vec < MinimumFeeProfile > ,
216+ }
217+
218+ #[ derive( Clone , Debug , Default , serde:: Serialize , serde:: Deserialize ) ]
219+ pub struct MinimumFeeProfile {
220+ pub profile_id : Option < Uuid > ,
221+ pub minimum_fees : Vec < MinimumFee > ,
222+ }
223+
224+ #[ serde_as]
225+ #[ derive( Clone , Debug , Default , serde:: Serialize , serde:: Deserialize ) ]
226+ pub struct MinimumFee {
227+ #[ serde_as( as = "DisplayFromStr" ) ]
228+ pub mint : Pubkey ,
229+ pub fee_ppm : u64 ,
230+ }
0 commit comments