Hello,
I am getting this error
(argument=“value”, value=“https://ipfs.moralis.io:2053/ipfs/Qmc1TvL5RwDQhFUTNRBv7V5WVSeoWjs87RypJvZ1qfGJrU”, code=INVALID_ARGUMENT, version=bytes/5.4.0)
Here’s my code
const encodedFunction= web3.eth.abi.encodeFunctionCall({
name:"mint",
type:"function",
inputs:[{
type:'address',
name:'account'
},{
type:'uint256',
name:'id'
},{
type:'uint256',
name:'amount'
},{
type:'bytes',
name:'memory data'
}
]
},[ethereum.selectedAddress,100,1,_uri])
const transactionParameters= {
to:contract,
from:ethereum.selectedAddress,
data:encodedFunction
}
const txt = await ethereum.request({
method:'eth_sendTransaction',
params:[transactionParameters]
});
resolve(txt)
Here’s the contract function
function mint(address account, uint256 id, uint256 amount, bytes memory data)
public
onlyRole(MINTER_ROLE)
{
_mint(account, id, amount, data);
}
This is for an erc1155, I used the example on this youtube tutorial