MCPcopy Create free account
hub / github.com/cowprotocol/services / to_string

Method to_string

crates/e2e/src/setup/colocation.rs:102–132  ·  view source on GitHub ↗
(&self, contracts: &Contracts)

Source from the content-addressed store, hash-verified

100
101impl LiquidityProvider {
102 pub fn to_string(&self, contracts: &Contracts) -> String {
103 match self {
104 Self::UniswapV2 => format!(
105 r#"
106[[liquidity.uniswap-v2]]
107router = "{:?}"
108pool-code = "{:?}"
109missing-pool-cache-time = "0s"
110"#,
111 contracts.uniswap_v2_router.address(),
112 contracts.default_pool_code()
113 ),
114 Self::ZeroEx { api_port } => format!(
115 r#"
116[liquidity.zeroex]
117base-url = {:?}
118api-key = {:?}
119http-timeout = "10s"
120"#,
121 format!("http://0.0.0.0:{}", api_port),
122 "no-api-key".to_string()
123 ),
124 Self::UniswapV3 { subgraph } => format!(
125 r#"
126[[liquidity.uniswap-v3]]
127preset = "uniswap-v3"
128indexer-config = {{ subgraph = {{ url = "{subgraph}" }} }}
129"#
130 ),
131 }
132 }
133}
134
135pub fn start_driver(

Callers 15

newMethod · 0.80
hermod_secrets_redactedFunction · 0.80
test_defaultMethod · 0.80
debug_redacts_secretsFunction · 0.80
testMethod · 0.80
into_s3_configFunction · 0.80
roundtrip_serializationFunction · 0.80
auth_token_is_redactedFunction · 0.80
roundtrip_serializationFunction · 0.80
fetch_swapr_poolFunction · 0.80
newMethod · 0.80

Calls

no outgoing calls

Tested by 15

hermod_secrets_redactedFunction · 0.64
test_defaultMethod · 0.64
debug_redacts_secretsFunction · 0.64
into_s3_configFunction · 0.64
roundtrip_serializationFunction · 0.64
auth_token_is_redactedFunction · 0.64
roundtrip_serializationFunction · 0.64
test_baseline_sourceFunction · 0.64
test_httpsFunction · 0.64