File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 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(
140140 let mut client = :: ink_e2e:: Client :: <
141141 :: ink_e2e:: PolkadotConfig ,
142142 #environment
143- >:: new( node_rpc. rpc( ) , contracts) . await ?;
143+ >:: new( node_rpc. rpc( ) , contracts, node_rpc . url ( ) . to_string ( ) ) . await ?;
144144 }
145145 }
146146 }
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ where
111111{
112112 api : ReviveApi < C , E > ,
113113 contracts : ContractsRegistry ,
114+ url : String ,
114115}
115116
116117impl < C , E > Client < C , E >
@@ -133,10 +134,12 @@ where
133134 pub async fn new < P : Into < PathBuf > > (
134135 client : subxt:: backend:: rpc:: RpcClient ,
135136 contracts : impl IntoIterator < Item = P > ,
137+ url : String ,
136138 ) -> Result < Self , subxt:: Error > {
137139 Ok ( Self {
138140 api : ReviveApi :: new ( client) . await ?,
139141 contracts : ContractsRegistry :: new ( contracts) ,
142+ url,
140143 } )
141144 }
142145
@@ -312,6 +315,11 @@ where
312315 DispatchError :: decode_from ( dispatch_err_encoded, self . api . client . metadata ( ) )
313316 . expect ( "failed to decode valid dispatch error" )
314317 }
318+
319+ /// Returns the URL of the running node.
320+ pub fn url ( & self ) -> & str {
321+ & self . url
322+ }
315323}
316324
317325#[ async_trait]
You can’t perform that action at this time.
0 commit comments