@@ -73,7 +73,7 @@ impl Assembled {
73
73
key : & ed25519_dalek:: SigningKey ,
74
74
network_passphrase : & str ,
75
75
) -> Result < TransactionEnvelope , xdr:: Error > {
76
- let tx = self . txn ( ) ;
76
+ let tx = self . transaction ( ) ;
77
77
let tx_hash = self . hash ( network_passphrase) ?;
78
78
let tx_signature = key. sign ( & tx_hash) ;
79
79
@@ -133,7 +133,7 @@ impl Assembled {
133
133
// Build and submit the restore transaction
134
134
client
135
135
. send_transaction (
136
- & Assembled :: new ( & restore ( self . txn ( ) , restore_preamble) ?, client)
136
+ & Assembled :: new ( & restore ( self . transaction ( ) , restore_preamble) ?, client)
137
137
. await ?
138
138
. sign ( source_key, network_passphrase) ?,
139
139
)
@@ -145,12 +145,15 @@ impl Assembled {
145
145
}
146
146
147
147
/// Returns a reference to the original transaction.
148
- pub fn txn ( & self ) -> & Transaction {
148
+ #[ must_use]
149
+ pub fn transaction ( & self ) -> & Transaction {
149
150
& self . txn
150
151
}
151
152
152
153
/// Returns a reference to the simulation response.
153
- pub fn sim_res ( & self ) -> & SimulateTransactionResponse {
154
+ #[ must_use]
155
+
156
+ pub fn sim_response ( & self ) -> & SimulateTransactionResponse {
154
157
& self . sim_res
155
158
}
156
159
@@ -165,7 +168,7 @@ impl Assembled {
165
168
network_passphrase : & str ,
166
169
) -> Result < Self , Error > {
167
170
if let Some ( txn) = sign_soroban_authorizations (
168
- self . txn ( ) ,
171
+ self . transaction ( ) ,
169
172
source_key,
170
173
signers,
171
174
seq_num,
@@ -185,7 +188,8 @@ impl Assembled {
185
188
186
189
///
187
190
/// # Errors
188
- pub fn auth ( & self ) -> VecM < SorobanAuthorizationEntry > {
191
+ #[ must_use]
192
+ pub fn auth_entries ( & self ) -> VecM < SorobanAuthorizationEntry > {
189
193
self . txn
190
194
. operations
191
195
. first ( )
@@ -216,31 +220,31 @@ impl Assembled {
216
220
log ( resources) ;
217
221
}
218
222
if let Some ( log) = log_events {
219
- log ( footprint, & [ self . auth ( ) ] , & self . sim_res . events ( ) ?) ;
223
+ log ( footprint, & [ self . auth_entries ( ) ] , & self . sim_res . events ( ) ?) ;
220
224
} ;
221
225
}
222
226
Ok ( ( ) )
223
227
}
224
228
229
+ #[ must_use]
225
230
pub fn requires_auth ( & self ) -> bool {
226
231
requires_auth ( & self . txn ) . is_some ( )
227
232
}
228
233
234
+ #[ must_use]
229
235
pub fn is_view ( & self ) -> bool {
230
- if let TransactionExt :: V1 ( SorobanTransactionData {
236
+ let TransactionExt :: V1 ( SorobanTransactionData {
231
237
resources :
232
238
SorobanResources {
233
239
footprint : LedgerFootprint { read_write, .. } ,
234
240
..
235
241
} ,
236
242
..
237
243
} ) = & self . txn . ext
238
- {
239
- if read_write. is_empty ( ) {
240
- return true ;
241
- }
242
- }
243
- false
244
+ else {
245
+ return false ;
246
+ } ;
247
+ read_write. is_empty ( )
244
248
}
245
249
246
250
#[ must_use]
@@ -311,7 +315,7 @@ pub fn assemble(
311
315
}
312
316
313
317
// update the fees of the actual transaction to meet the minimum resource fees.
314
- let classic_transaction_fees = 100 ;
318
+ let classic_transaction_fees = crate :: DEFAULT_TRANSACTION_FEES ;
315
319
// Pad the fees up by 15% for a bit of wiggle room.
316
320
tx. fee = ( tx. fee . max (
317
321
classic_transaction_fees
0 commit comments