[SOLVED] Monitoring of a project (contract)

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

Exactly. I am not sure if this hash is from the topic event or if it is about the transfer event that every ERC721 has.

payable(msg.sender).transfer(userFunds[msg.sender]);
If you look at the function make a transfer to the marketplace contract,
And every transfer has its event, right?
Then comes the call to the ClaimFunds event. In short, there should be 2 Logs in the transaction log and there is only one. Am I scattering with this?

  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;    
  }

How to know what event it is?

there is only one event there, it seems that in your event sync on that server there is a different topic and not the one that is expected

I’m going to use this hash to check if that’s the topic.
0x4f0554190111f93f8c2ccef2cc41473f187d7f29ff5a5c308ca41f9dfe4e989a

Great!!

All the transactions that have triggered that event is show it!!

Thanks…

Now the next challenge is how to know how to work on these tables to get information. For example, knowing which transaction has been the highest sale.

But this is something else. Thanks a lot for your help @cryptokid .