[SOLVED] Monitoring of a project (contract)

Hello Moralis People:

I was wondering what was the most appropriate way to follow a project in moralis. it an ERC20 or ERC721 contract etc.

The server connects with our account, giving us information on all the contracts related to it on the dashboard. Apart from filtering, what is the most correct way to be able to follow the movements of a specific contract?

can you try to give an example of what you need?

Know the transfers of a contract which I am the owner. Either ERC20 or ERC721.
In the first, holders and movements. In the second, transfers of NFTs.

if you add a watch address or watch event then you can get events or transactions synced in your server db: https://docs.moralis.io/moralis-server/automatic-transaction-sync/smart-contract-events

https://docs.moralis.io/moralis-server/automatic-transaction-sync/historical-transactions#sync-and-watch-address

Thank you @cryptokid

I knew the event watch but not the address watching.
It has to be very useful. I will take a look.

Is it necessary to prepare the table to receive the data?

no, the data should appear there

I have tested calling an event to see if it whatching data on table. But I see that he does not.

Watch contract event:

Topic: ClaimFunds(address user, uint amount)

abi: {
“anonymous”: false,
“inputs”: [
{
“indexed”: false,
“internalType”: “address”,
“name”: “user”,
“type”: “address”
},
{
“indexed”: false,
“internalType”: “uint256”,
“name”: “amount”,
“type”: “uint256”
}
],
“name”: “ClaimFunds”,
“type”: “event”
}
Address:
0xBb5CA1bf94d868EE0BfA7b5F4E0A7Dfc3AEE152c

Transaction do it
https://testnet.bscscan.com/tx/0xbbd1dc96dd19739f26080b2cadf9b97dd3bb946e3d7675861d6f624811a9ca2c

And the table no have infomartion:

you have to use for topic ClaimFunds(address, uint256) or the hash version of the topic that you’ll find in bscscan for that event

this?
para_mandar

I get the impression that it is the transfer event and not the Claimfunds event

But is correcly implement in the code not?

  event ClaimFunds(address user, uint amount);

  function claimFunds() public {
    require(userFunds[msg.sender] > 0, 'This user has no funds to be claimed');
    payable(msg.sender).transfer(userFunds[msg.sender]);
    emit ClaimFunds(msg.sender, userFunds[msg.sender]);
    userFunds[msg.sender] = 0;    
  }

Oh god, ok CalimFunds(address, uint256) whithout variables names…

From what I see it can’t be edited.
A new table must be created.
How do you delete the old one?

you can delete the old one from the dashboard

A new table has been made with the correct topic, but it still does not show data in the new table.

Ok, in edit delete class.
Do it.

you may need to wait 1-2 minutes

I’m not going to bother you anymore today because you’ve been very kind to me.

I have made another transaction and it does not appear.
Tomorrow we will try again.

you can also paste the server url here

https://joptfimdkbwd.usemoralis.com:2053/server

Today I will make other purchase and sale transactions to monitor this event that is not registered in the table. I will tell you if I have been successful or not.

from here: https://testnet.bscscan.com/tx/0x9cdf4bd24a7dbf8bc27f37670704c022f30c8057b697bca0014ab4eddd8a1789#eventlog

it seems the the topic should be 0x4f0554190111f93f8c2ccef2cc41473f187d7f29ff5a5c308ca41f9dfe4e989a

1 Like