Hi
I’ve written a smart contract and deployed to local ganache environment that emits the following events:
event Payout(address indexed winner, uint amount);
event MaxBet(uint amount);
event Play(address indexed player, uint betSize, Side side, uint maxBet);
I’ve configured all 3 events to be captured by Moralis in their respective tables using the ‘Sync and Watch Contract Events’ plugin.
However, only the MaxBet
and Payout
events are successfully captured by Moralis. The PlayEvents table never gets created by Moralis. Nothing in the log files either.
The events do fire as I can capture these events in my front-end application using the web3.eth.Contract(abi, contractAddress)
object to listen for the respective events.
The Play event does declare an enum Side
as one of the arguments. I’m wondering whether this is the source of the issue although the plugin does get registered successfully.
The Play plugin configuration is as follows:
Play Event
topic : Play(address, uint, Side, uint)
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "player",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "betSize",
"type": "uint256"
},
{
"indexed": false,
"internalType": "enum CoinToss.Side",
"name": "side",
"type": "uint8"
},
{
"indexed": false,
"internalType": "uint256",
"name": "maxBet",
"type": "uint256"
}
],
"name": "Play",
"type": "event"
}
The server url is: https://y1gn3irfux99.moralis.io:2053/server
Thanks
Jon