TransactionData

Hello,
Whenever I am creating a TransactionData and adding value on TransactionData.data to send with EthSendTransaction to MetaMask and sending the metadata containing ABI and NFT metadata, it is returning the following: Cannot convert string to buffer.
What should I exactly send with data? Thank You!

Hi @bassel.l please add the related code and then the full error with the stacktrace. Also if you are following any docs, that would be helpful to further investigate.

Can you please provide a Link for a proper Unity Documentation because I honestly can’t find any. Even after searching in the documentation for TransactionData type, nothing shows. Please send me a link where I can follow any documentation for unity. Meanwhile, I’ll be sending you the code

Thank you!

@bassel.l here is some documentation for Unity. Please post the code when you have a moment to understand more about the implementation you are using:

A possibility in Unity is to use HTTP requests directly to our endpoints using UnityWebRequest. Here are the corresponding docs and our swagger docs were you can find the API URLs:

https://docs.unity3d.com/Manual/UnityWebRequest.html
https://deep-index.moralis.io/api-docs/#/
https://api.moralis-streams.com/api-docs/
https://www.youtube.com/watch?v=K9uVHI645Pk

Ok, so now instead of sending the TransactionData, I decided to follow the documentation that you’ve sent and figure out my way. First step of minting an NFT is to upload metadata to IPFS. Moralis provides a way of doing it, which is very simple:

        IpfsFileRequest ipfsFileRequest = new IpfsFileRequest(){ Path = name, Content = data};
        List<IpfsFileRequest> requests = new List<IpfsFileRequest> { ipfsFileRequest };

        List<IpfsFile> resp = await Moralis.GetClient().Web3Api.Storage.UploadFolder(requests);

The above very simple code, that can never go wrong, has resulted in the following error:

ApiException: Error calling UploadFolder: {“code”:141,“error”:"{“code”:“invalid_post_request”,“message”:“Invalid POST Request”}"}

Please let me know what could possibly go wrong with it. Thank you

Any Update on this matter?

Hi @bassel.l we are planning to remove IPFS. I recommend you to check Pinata instead: https://docs.pinata.cloud/sdks