I am also having this issue and not sure what to change, datetime.now.ticks returns an error in web browsers, here is my current code;
{
public async UniTask ExecuteMinting(string metadataUrl)
long currentTime = DateTime.Now.Ticks;
Debug.Log(currentTime);
// Dummy TokenId based on current time
_currentTokenId = new BigInteger(currentTime);
object[] parameters = {
_currentTokenId.ToString("x"), // This is the format the contract expects
metadataUrl
};
// Set gas estimate
HexBigInteger value = new HexBigInteger(0);
HexBigInteger gas = new HexBigInteger(0);
HexBigInteger gasPrice = new HexBigInteger(0);
string resp = await Moralis.ExecuteContractFunction(ContractAddress, ContractAbi, "mintItem", parameters, value, gas, gasPrice);
return resp;
}