Skip to content
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

Refactor the CCTX tracking functionality #167

Open
4 tasks
fadeev opened this issue Aug 6, 2024 · 1 comment
Open
4 tasks

Refactor the CCTX tracking functionality #167

fadeev opened this issue Aug 6, 2024 · 1 comment

Comments

@fadeev
Copy link
Member

fadeev commented Aug 6, 2024

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.

const url = `${API}/zeta-chain/crosschain/inTxHashToCctx/${hash}`;

Then, the function queries the API by CCTX hash to get CCTX data:

const url = `${API}/zeta-chain/crosschain/cctx/${hash}`;

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

Tasks

Preview Give feedback

Feel free to use these hashes for testing purposes:

npx hardhat cctx 0xce8832232639d29d40078e14d0a5b20c055123d6df1e1d39f90cfd130c33466d

✓ CCTXs on ZetaChain found.
✓ 0x1ae1436358ef755c1c782d0a249ae99e857b0aecb91dcd8da4a4e7171f5d9459: 11155111 → 7001: OutboundMined (Remote omnichain contract call completed)
✓ 0xbefe99d3e17d16fc88762f85b1becd1396b01956c04b5ec037abc2c63d821caa: 7001 → 97: OutboundMined (ZRC20 withdrawal event setting to pending outbound directly : Outbound succeeded, mined)
npx hardhat cctx 0xf6895678629b99d756c8d4378d4d3e57e495c95edd39b2ab51cbd707bff75d59

✓ CCTXs on ZetaChain found.
✓ 0x83dc34b68d36fbafb7a9c7eef51f3a19a5b842a39f1364f53091a236266d4ff1: 97 → 7001: OutboundMined (Remote omnichain contract call completed)
✓ 0x25494fd66075c98a1ef1d13723fb0ca9029377580cf1c2847d0b786896d850cb: 7001 → 11155111: PendingOutbound  → OutboundMined
✓ 0xacc9d061b051c48b79b1dfec9e2ed3b7679af7ac225e8c995fab77b96d437bcc: 7001 → 18332: PendingOutbound  → OutboundMined
@mikelord007
Copy link
Collaborator

I can take this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants