Submitted by bin2chen, also found by carrotsmuggler and cccz
If the user isApproved(), the user can call TapiocaOptionBroker.participate().
The code is as follows:
However, in the current implementation, even though msg.sender has obtained authorization (isApprovedOrOwner(msg.sender) == true), it is still unable to execute due to the incorrect usage of: pearlmit.transferFromERC721(msg.sender, address(this), address(tOLP), _tOLPTokenID);
Passing msg.sender as the owner will result in failure to execute.
pearlmit.transferFromERC721(msg.sener,to) -> IERC721(token).transferFrom(owner, to) -> _transfer(owner,to) -> require(ERC721.ownerOf(tokenId) == owner.
It will check the first parameter is the owner of NFT. It should use: pearlmit.transferFromERC721(tOLP.ownerOf(_tOLPTokenID), address(this), address(tOLP), _tOLPTokenID).
Although msg.sender has been granted authorization, it is still unable to execute participate().
Context
0xRektora (Tapioca) confirmed
cryptotechmaker (Tapioca) commented:
