@@ -387,10 +387,25 @@ pub struct TapConfig {
387387#[ derive( Debug , Deserialize ) ]
388388#[ cfg_attr( test, derive( PartialEq ) ) ]
389389pub struct DipsConfig {
390+ pub host : String ,
391+ pub port : String ,
392+ pub expected_payee : Address ,
390393 pub allowed_payers : Vec < Address > ,
391394 pub cancellation_time_tolerance : Option < Duration > ,
392395}
393396
397+ impl Default for DipsConfig {
398+ fn default ( ) -> Self {
399+ DipsConfig {
400+ host : "0.0.0.0" . to_string ( ) ,
401+ port : "7601" . to_string ( ) ,
402+ expected_payee : Address :: ZERO ,
403+ allowed_payers : vec ! [ ] ,
404+ cancellation_time_tolerance : None ,
405+ }
406+ }
407+ }
408+
394409impl TapConfig {
395410 pub fn get_trigger_value ( & self ) -> u128 {
396411 let grt_wei = self . max_amount_willing_to_lose_grt . get_value ( ) ;
@@ -420,11 +435,11 @@ pub struct RavRequestConfig {
420435
421436#[ cfg( test) ]
422437mod tests {
423- use std:: { env, fs, path:: PathBuf } ;
438+ use std:: { env, fs, path:: PathBuf , str :: FromStr } ;
424439
425440 use figment:: value:: Uncased ;
426441 use sealed_test:: prelude:: * ;
427- use thegraph_core:: alloy:: primitives:: address ;
442+ use thegraph_core:: alloy:: primitives:: { Address , FixedBytes } ;
428443 use tracing_test:: traced_test;
429444
430445 use super :: { DatabaseConfig , SHARED_PREFIX } ;
@@ -448,8 +463,11 @@ mod tests {
448463 )
449464 . unwrap ( ) ;
450465 max_config. dips = Some ( crate :: DipsConfig {
451- allowed_payers : vec ! [ address!( "3333333333333333333333333333333333333333" ) ] ,
452- cancellation_time_tolerance : None ,
466+ allowed_payers : vec ! [ Address (
467+ FixedBytes :: <20 >:: from_str( "0x3333333333333333333333333333333333333333" ) . unwrap( ) ,
468+ ) ] ,
469+ expected_payee : Address :: ZERO ,
470+ ..Default :: default ( )
453471 } ) ;
454472
455473 let max_config_file: Config = toml:: from_str (
0 commit comments