eventswhen something meaningful happens within the smart contract that the smart contract wants to communicate to dapps and other smart contracts. The developers of the smart contract decide when these events are emitted. For example - when somebody sends an ERC20 token - the token contract will emit a
Transferevent containing all of the data about the transfer.
_don't work for now, like for example
"name": "_side"will not work, and you'll have to change it to
"name": "side"in order to make it work.
"Sync_historical (Optional)option will be disabled and no historical data will be saved. It is possible to contact support to upgrade your account to enable saving it anyway but think hard about whether it's actually necessary before doing so. It's possible to handle the events in real-time without saving the data to the database.
tableName. Boo-urns! Yes, this is inconvenient, but how plugins work will be changing soon anyway when the custom plugin platform is released and this will then be reexamined (so at least there's that to look forward to!).
Sync_historicaloption will be disabled and no historical data will be fetched. The contract event (or watched address transaction) will still be monitored by Moralis, but it requires a trigger to tell Moralis what to do with the data. Until a
beforeConsumetrigger is defined, the default behavior will be to skip the event and log a message to the dashboard.
beforeConsumetrigger needs to be created on the
tableNamegiven in the plugin definition.
truethe event will be saved, otherwise, it will be skipped.
Promiseis returned, it will NOT be awaited, and since a promise is a truthy value the event data will be saved to the database.