-
Notifications
You must be signed in to change notification settings - Fork 408
feat: track hyperbridge evm activity #433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Hi. Quick question! (Wasn't answered in discord). Our protocol enables cross-chain messages for things like cross-chain swaps (Intent Gateway), token teleports, and other dApp interactions. To fit in the deposit/withdrawal terminology this pr tracks individual dapps, and stores volume data. Is it possible to track token transfer volumes from cross-chain message events even if they don't follow the traditional bridge deposit/withdrawal model? Or does the bridges dashboard strictly require that semantic? |
hi, yes u can track these messages. pr looks good, please resolve conflicts |
So it is possible to track those events without the |
fd76e2d to
f7953fe
Compare
|
@vrtnd I have fixed the conflicts |
|
@royvardhan since |
I have now removed the individual product tracking and added ISMP tracking instead, but without the |
|
Hi @vrtnd, can you please give this another review? |
| "event PostResponseEvent(string source, string dest, address indexed from, bytes to, uint256 nonce, uint256 timeoutTimestamp, bytes body, bytes response, uint256 responseTimeoutTimestamp, uint256 fee)", | ||
| ], | ||
| logKeys: { | ||
| blockNumber: "blockNumber", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing from and to in all events
please check by running tests npm run test hyperbridge 1000
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If from and to denotes the transfer direction then I don't think it fits what we are doing here.
These are messaging layer events, and inside these events the transfer of tokens can happen from any dapp integrating Hyperbridge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A dapp at Chain A can dispatch a GetRequest to get some data from Chain B, and when GetResponse is received, there may or may not be events of transfer.
In simple terms, a dapp can integrate Hyperbridge, use the messaging functions to execute certain operations, and in these operations, there can be transfer events.
So if we look at these messaging layer events, we will find the transfer events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but there is from and to in event abi event PostResponseEvent(string source, string dest, address indexed from, bytes to what do they mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The events in this PR are all ISMP (Hyperbridge's messaging protocol) events, and the from and to addresses in the event signatures are the contract addresses that send or receive the message.
Our methodology for tracking volume on Hyperbridge is to sum all token Transfer events from any transaction that emits any ISMP event. The core idea is that any token Transfer event found in a transaction that emits an ISMP event was triggered by the processing or dispatch of a cross-chain message on the Hyperbridge protocol.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of your events are missing the isDeposit param. can we figure out which event is related to deposit (user -> smart contract) and which is the opposite?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought isDeposit is not a strict requirement: #433 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we still need to track direction of transfers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i suggest using api if possible


Track Hyperbridge evm volume by dapps.