File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -405,7 +405,9 @@ spec.test('safeTransfer does not call onERC721Received to constructing contract'
405405 contract : 'SendsToSelfOnConstruct' ,
406406 } ) ;
407407
408- const receipt = sendsToSelfOnConstruct . receipt ;
409- console . log ( receipt . events . Received ( ) ) ;
410- ctx . not ( receipt . events . Received , undefined ) ; // I want to confirm here that there is only one event (the mint(), and not the safeTransferFrom)
411- } ) ;
408+ const logs = sendsToSelfOnConstruct . receipt . logs ;
409+ ctx . is ( logs . length , 2 ) ; // There need to be 2 logs. First transfer event for creating the token. Second transfer event for sending yourself a token.
410+ // There must not be a Receive event.
411+ ctx . is ( logs [ 0 ] . topics [ 0 ] , '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' ) ; // this represents transfer topic hash
412+ ctx . is ( logs [ 1 ] . topics [ 0 ] , '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' ) ; // this represents transfer topic hash
413+ } ) ;
You can’t perform that action at this time.
0 commit comments