I’m working on a contract that can receive NFT transfers, to be held in escrow for auction.
Contracts meant to receive NFT transfers should implement an onERC721Received()
as per the ERC-721 standard.
According to the standard, this funciton should accept the following parameters: function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes _data) external returns(bytes4);
My quesiton is - using the Moralis SDK, how can I send bytes
formatted information to this function as the _data
parameter?
In the past I’ve used Moralis’s executeFunction
to execute transactions passing in parameters of type string
and unit
, but never byte
.
Is it possible to send byte
formatted data using executeFunction
? For example I’d like to send some data related to how long the auction should last within the _data
parameter.
If so, how is that byte data converted back to usable data (strings or uint’s) when received by the contract?