@@ -21,13 +21,14 @@ pub trait IErc1155Burnable {
21
21
///
22
22
/// # Arguments
23
23
///
24
+ /// * `&mut self` - Write access to the contract's state.
24
25
/// * `account` - Account to burn tokens from.
25
26
/// * `token_id` - Token id to be burnt.
26
27
/// * `value` - Amount to be burnt.
27
28
///
28
29
/// # Errors
29
30
///
30
- /// If the caller is not account address and the account has not been
31
+ /// If the caller is not ` account` address and the ` account` has not been
31
32
/// approved, then the error [`Error::MissingApprovalForAll`] is
32
33
/// returned.
33
34
/// If `from` is the `Address::ZERO`, then the error
@@ -51,13 +52,14 @@ pub trait IErc1155Burnable {
51
52
///
52
53
/// # Arguments
53
54
///
55
+ /// * `&mut self` - Write access to the contract's state.
54
56
/// * `account` - Accounts to burn tokens from.
55
57
/// * `values` - All amount to be burnt.
56
58
/// * `token_ids` - All token id to be burnt.
57
59
///
58
60
/// # Errors
59
61
///
60
- /// If the caller is not account address and the account has not been
62
+ /// If the caller is not ` account` address and the ` account` has not been
61
63
/// approved, then the error [`Error::MissingApprovalForAll`] is
62
64
/// returned.
63
65
/// If `from` is the `Address::ZERO`, then the error
@@ -228,7 +230,7 @@ mod tests {
228
230
229
231
let err = contract
230
232
. burn ( invalid_sender, token_ids[ 0 ] , values[ 0 ] )
231
- . expect_err ( "should not burn tokens from the zero address " ) ;
233
+ . expect_err ( "should not burn tokens from the `Address::ZERO` " ) ;
232
234
233
235
assert ! ( matches!(
234
236
err,
@@ -250,7 +252,7 @@ mod tests {
250
252
251
253
contract
252
254
. burn_batch ( alice, token_ids. clone ( ) , values. clone ( ) )
253
- . expect ( "should burn own tokens" ) ;
255
+ . expect ( "should burn own tokens in batch " ) ;
254
256
255
257
for token_id in token_ids {
256
258
let balance = contract. balance_of ( alice, token_id) ;
@@ -272,7 +274,7 @@ mod tests {
272
274
273
275
contract
274
276
. burn_batch ( BOB , token_ids. clone ( ) , values. clone ( ) )
275
- . expect ( "should burn Bob's tokens" ) ;
277
+ . expect ( "should burn Bob's tokens in batch " ) ;
276
278
277
279
for token_id in token_ids {
278
280
let balance = contract. balance_of ( BOB , token_id) ;
@@ -287,7 +289,7 @@ mod tests {
287
289
288
290
let err = contract
289
291
. burn_batch ( BOB , token_ids. clone ( ) , values. clone ( ) )
290
- . expect_err ( "should not burn tokens without approval" ) ;
292
+ . expect_err ( "should not burn tokens in batch without approval" ) ;
291
293
292
294
assert ! ( matches!(
293
295
err,
@@ -312,7 +314,7 @@ mod tests {
312
314
313
315
let err = contract
314
316
. burn_batch ( invalid_sender, token_ids. clone ( ) , values. clone ( ) )
315
- . expect_err ( "should not burn tokens from the zero address " ) ;
317
+ . expect_err ( "should not burn tokens in batch from the `Address::ZERO` " ) ;
316
318
317
319
assert ! ( matches!(
318
320
err,
0 commit comments