@@ -81,8 +81,8 @@ pub trait IErc721Wrapper {
81
81
///
82
82
/// # Errors
83
83
///
84
- /// * [`Error::Erc721FailedOperation`] - If the underlying token is not a
85
- /// [`Erc721`] contract, or the contract fails to execute the call.
84
+ /// * [`Error::Erc721FailedOperation`] - If the underlying token is not an
85
+ /// ERC-721 contract, or the contract fails to execute the call.
86
86
///
87
87
/// # Examples
88
88
///
@@ -154,7 +154,7 @@ pub trait IErc721Wrapper {
154
154
/// }
155
155
fn on_erc721_received (
156
156
& mut self ,
157
- _operator : Address ,
157
+ operator : Address ,
158
158
from : Address ,
159
159
token_id : U256 ,
160
160
data : Bytes ,
@@ -229,6 +229,8 @@ impl IErc721Wrapper for Erc721Wrapper {
229
229
let underlying = Erc721Interface :: new ( self . underlying ( ) ) ;
230
230
231
231
for token_id in token_ids {
232
+ // Setting the `auth` argument enables the `_is_authorized` check which verifies that the token exists
233
+ // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.
232
234
erc721. _update ( Address :: ZERO , token_id, sender) ?;
233
235
underlying
234
236
. safe_transfer_from (
@@ -496,15 +498,15 @@ mod tests {
496
498
contract. wrapper . underlying . set ( erc721_contract. address ( ) ) ;
497
499
} ) ;
498
500
499
- for token_id in & token_ids {
501
+ for & token_id in & token_ids {
500
502
erc721_contract
501
503
. sender ( alice)
502
- . _mint ( alice, * token_id)
504
+ . _mint ( alice, token_id)
503
505
. motsu_expect ( "should mint {token_id} for {alice}" ) ;
504
506
505
507
erc721_contract
506
508
. sender ( alice)
507
- . approve ( contract. address ( ) , * token_id)
509
+ . approve ( contract. address ( ) , token_id)
508
510
. motsu_expect (
509
511
"should approve {token_id} for {contract.address()}" ,
510
512
) ;
0 commit comments