File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ fn build_full_client(
140
140
let mut client = :: ink_e2e:: Client :: <
141
141
:: ink_e2e:: PolkadotConfig ,
142
142
#environment
143
- >:: new( node_rpc. rpc( ) , contracts) . await ?;
143
+ >:: new( node_rpc. rpc( ) , contracts, node_rpc . url ( ) . to_string ( ) ) . await ?;
144
144
}
145
145
}
146
146
}
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ where
111
111
{
112
112
api : ReviveApi < C , E > ,
113
113
contracts : ContractsRegistry ,
114
+ url : String ,
114
115
}
115
116
116
117
impl < C , E > Client < C , E >
@@ -133,10 +134,12 @@ where
133
134
pub async fn new < P : Into < PathBuf > > (
134
135
client : subxt:: backend:: rpc:: RpcClient ,
135
136
contracts : impl IntoIterator < Item = P > ,
137
+ url : String ,
136
138
) -> Result < Self , subxt:: Error > {
137
139
Ok ( Self {
138
140
api : ReviveApi :: new ( client) . await ?,
139
141
contracts : ContractsRegistry :: new ( contracts) ,
142
+ url,
140
143
} )
141
144
}
142
145
@@ -312,6 +315,11 @@ where
312
315
DispatchError :: decode_from ( dispatch_err_encoded, self . api . client . metadata ( ) )
313
316
. expect ( "failed to decode valid dispatch error" )
314
317
}
318
+
319
+ /// Returns the URL of the running node.
320
+ pub fn url ( & self ) -> & str {
321
+ & self . url
322
+ }
315
323
}
316
324
317
325
#[ async_trait]
You can’t perform that action at this time.
0 commit comments