diff --git a/executor/src/network/query.rs b/executor/src/network/query.rs index bcde1c1..2c47c2e 100644 --- a/executor/src/network/query.rs +++ b/executor/src/network/query.rs @@ -87,4 +87,15 @@ impl QueryExecutor for &str { async fn execute(&self, request: &ScCallStep) -> Result where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { ProxyQueryExecutor::new(self).execute::(request).await } +} + +#[async_trait] +impl QueryExecutor for String { + /// Allows using a string representing the gateway URL to execute a query on the real blockchain environment. + /// + /// This implementation creates a new `ProxyQueryExecutor` instance using the string as the gateway URL, + /// and delegates the query execution to it. + async fn execute(&self, request: &ScCallStep) -> Result where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { + self.as_str().execute::(request).await + } } \ No newline at end of file