Hello guys,
I am following a moralis tutorial to generate and mint nft, and they have this minting function, but its not moralis call, is there alternative function for this function in moralis.
async function mintToken(_uri){
const encodedFunction = web3.eth.abi.encodeFunctionCall({
name: āmintTokenā,
type: āfunctionā,
inputs: [{
type: āstringā,
name: ātokenURIā
}]
}, [_uri]);
const transactionParameters = {
to: nft_contract_address,
from: ethereum.selectedAddress,
data: encodedFunction
};
const txt = await ethereum.request({
method: āeth_sendTransactionā,
params: [transactionParameters]
});
return txt
}
Thanks in Advance.