Currently, the trackCCTX function queries the /zeta-chain/crosschain/inTxHashToCctx/${hash} to convert an inbound (connected chain) hash into a cross-chain tx hash.
### Tasks
- [ ] Refactor `trackCCTX` so that it no longer uses `/inTxHashToCctx` and uses `/cctx`, instead
- [ ] Add tests to the function
- [ ] Make sure that this refactor doesn't break the event emitting API. If it does, document the changes
- [ ] Make any additional changes you think are necessary to simplify the logic
Feel free to use these hashes for testing purposes:
Background
Currently, the
trackCCTX
function queries the/zeta-chain/crosschain/inTxHashToCctx/${hash}
to convert an inbound (connected chain) hash into a cross-chain tx hash.https://github.com/zeta-chain/toolkit/blob/f0bf8b19b2b1f7686fbc44982f821640e416f7a1/packages/client/src/trackCCTX.ts#L35
Then, the function queries the API by CCTX hash to get CCTX data:
https://github.com/zeta-chain/toolkit/blob/f0bf8b19b2b1f7686fbc44982f821640e416f7a1/packages/client/src/trackCCTX.ts#L115
This is no longer needed, as there is an API endpoint that converts an inbound hash directly to CCTX data:
https://zetachain-athens.blockpi.network/lcd/v1/public/zeta-chain/crosschain/inboundHashToCctxData/0xce8832232639d29d40078e14d0a5b20c055123d6df1e1d39f90cfd130c33466d
Task
Feel free to use these hashes for testing purposes: