@@ -387,10 +387,23 @@ pub struct TapConfig {
387387#[ derive( Debug , Deserialize ) ]
388388#[ cfg_attr( test, derive( PartialEq ) ) ]
389389pub struct DipsConfig {
390+ pub host : String ,
391+ pub port : String ,
390392 pub allowed_payers : Vec < Address > ,
391393 pub cancellation_time_tolerance : Option < Duration > ,
392394}
393395
396+ impl Default for DipsConfig {
397+ fn default ( ) -> Self {
398+ DipsConfig {
399+ host : "0.0.0.0" . to_string ( ) ,
400+ port : "7601" . to_string ( ) ,
401+ allowed_payers : vec ! [ ] ,
402+ cancellation_time_tolerance : None ,
403+ }
404+ }
405+ }
406+
394407impl TapConfig {
395408 pub fn get_trigger_value ( & self ) -> u128 {
396409 let grt_wei = self . max_amount_willing_to_lose_grt . get_value ( ) ;
@@ -420,11 +433,11 @@ pub struct RavRequestConfig {
420433
421434#[ cfg( test) ]
422435mod tests {
423- use std:: { env, fs, path:: PathBuf } ;
436+ use std:: { env, fs, path:: PathBuf , str :: FromStr } ;
424437
425438 use figment:: value:: Uncased ;
426439 use sealed_test:: prelude:: * ;
427- use thegraph_core:: alloy:: primitives:: address ;
440+ use thegraph_core:: alloy:: primitives:: { Address , FixedBytes } ;
428441 use tracing_test:: traced_test;
429442
430443 use super :: { DatabaseConfig , SHARED_PREFIX } ;
@@ -448,8 +461,10 @@ mod tests {
448461 )
449462 . unwrap ( ) ;
450463 max_config. dips = Some ( crate :: DipsConfig {
451- allowed_payers : vec ! [ address!( "3333333333333333333333333333333333333333" ) ] ,
452- cancellation_time_tolerance : None ,
464+ allowed_payers : vec ! [ Address (
465+ FixedBytes :: <20 >:: from_str( "0x3333333333333333333333333333333333333333" ) . unwrap( ) ,
466+ ) ] ,
467+ ..Default :: default ( )
453468 } ) ;
454469
455470 let max_config_file: Config = toml:: from_str (
0 commit comments