You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We find that user could call sendToCosmos with erc721 tokens, and the nft will end up bridged as a fungible token, with the same count as the token_id.
One possible solution is, erc721 actually have the onERC721Received to prevent user sending nft to unsupported contracts accidentally, but we are not using that because we are not calling the safeTransferFrom method on the token contract itself, but calling the one in SafeERC20 library.
So the proposal is in sendToCosmos we should call the safeTransferFrom on the token contract first, if it's not implemented we call the one in SafeERC20.
The text was updated successfully, but these errors were encountered:
crypto-org-chain/cronos#72
We find that user could call
sendToCosmos
with erc721 tokens, and the nft will end up bridged as a fungible token, with the same count as the token_id.One possible solution is, erc721 actually have the
onERC721Received
to prevent user sending nft to unsupported contracts accidentally, but we are not using that because we are not calling thesafeTransferFrom
method on the token contract itself, but calling the one inSafeERC20
library.So the proposal is in
sendToCosmos
we should call thesafeTransferFrom
on the token contract first, if it's not implemented we call the one inSafeERC20
.The text was updated successfully, but these errors were encountered: