Cross-chain transactions (CCTXs) can be classified into two main types: incoming and outgoing.
Incoming transactions (connected chain → ZetaChain) are initiated on a connected chain and result in a transaction on ZetaChain. An incoming transaction consists of two transactions:
- Inbound: a transaction is initiated and observed on the connected chain.
- Outbound: the corresponding transaction is broadcasted and executed on ZetaChain.
Outgoing transactions (ZetaChain → connected chain) are initiated on ZetaChain and result in a transaction on a connected chain. An outgoing transaction consists of two transactions:
- Inbound: A transaction is initiated and observed on ZetaChain.
- Outbound: The corresponding transaction is broadcasted and executed on the connected chain.
Tracking a CCTX involves querying ZetaChain's Cosmos SDK HTTP API with an inbound transaction hash to get a CCTX hash. If a CCTX results in another CCTX (for example, an incoming results in an outgoing), the first CCTX hash can be used as a inbound hash to get the second CCTX hash.
Incoming & Outgoing
Consider an example of making call from Ethereum Sepolia to a universal app contract on ZetaChain, which triggers an outgoing call from ZetaChain to Polygon Amoy.
In this example a user calls EVM Gateway's depositAndCall
to call a universal
swap contract on ZetaChain, which swaps incoming
tokens for target ZRC-20 tokens and calls ZetaChain's Gateway withdraw
function, which triggers a token transfer on Polygon Amoy.
This example involves two CCTXs:
- Ethereum Sepolia → ZetaChain Testnet
- ZetaChain Testnet → Polygon Amoy
An inbound transaction on Ethereum Sepolia:
Use the inbound transaction hash to get the CCTX 1 hash:
{
"CrossChainTxs": [
{
"creator": "zeta1j8g8ch4uqgl3gtet3nntvczaeppmlxajqwh5u6",
"index": "0x542b6bd80004f4013b725c2170b9ed01731b8af9dc61bfb5c0534dc2f0d511da",
"zeta_fees": "0",
"relayed_message": "000000000000000000000000777915d031d1e8144c90d025c594b3b8bf07a08d0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000144955a3f38ff86ae92a914445099caa8ea2b9ba32000000000000000000000000",
"cctx_status": {
"status": "OutboundMined",
"status_message": "Status changed from PendingOutbound to OutboundMined",
"error_message": "",
"lastUpdate_timestamp": "1736512142",
"isAbortRefunded": false,
"created_timestamp": "1736512142"
},
"inbound_params": {
"sender": "0x4955a3F38ff86ae92A914445099caa8eA2B9bA32",
"sender_chain_id": "11155111",
"tx_origin": "0x4955a3F38ff86ae92A914445099caa8eA2B9bA32",
"coin_type": "Gas",
"asset": "0x0000000000000000000000000000000000000000",
"amount": "100000000000000000",
"observed_hash": "0x8e925fa63c69bd27a3aa8e30f4c0f1e67e5fd3fedb23339b387b51b1543e55af",
"observed_external_height": "7460920",
"ballot_index": "0x542b6bd80004f4013b725c2170b9ed01731b8af9dc61bfb5c0534dc2f0d511da",
"finalized_zeta_height": "8502541",
"tx_finalization_status": "Executed",
"is_cross_chain_call": true
},
"outbound_params": [
{
"receiver": "0x93491dF3516B795321b52Bf0d8F62dc6d7Bf1A57",
"receiver_chainId": "7001",
"coin_type": "Gas",
"amount": "0",
"tss_nonce": "0",
"gas_limit": "0",
"gas_price": "",
"gas_priority_fee": "",
"hash": "0x08e10a86711981a90715a0d91c05b1a3f940142049d7a57181510375c997f34b",
"ballot_index": "",
"observed_external_height": "8502541",
"gas_used": "0",
"effective_gas_price": "0",
"effective_gas_limit": "0",
"tss_pubkey": "zetapub1addwnpepq28c57cvcs0a2htsem5zxr6qnlvq9mzhmm76z3jncsnzz32rclangr2g35p",
"tx_finalization_status": "Executed",
"call_options": {
"gas_limit": "1500000",
"is_arbitrary_call": false
}
}
],
"protocol_contract_version": "V2",
"revert_options": {
"revert_address": "0x0000000000000000000000000000000000000000",
"call_on_revert": false,
"abort_address": "0x0000000000000000000000000000000000000000",
"revert_message": "MHg=",
"revert_gas_limit": "7000000"
}
}
]
}
Use the CCTX 1 hash (0x542b...11da
) as an inbound hash to get CCTX 2 hash:
{
"CrossChainTxs": [
{
"creator": "",
"index": "0x36f41b8ca20bd615b1211de1ff5ec67ea58313a9145628cb25922399472dcc14",
"zeta_fees": "0",
"relayed_message": "",
"cctx_status": {
"status": "OutboundMined",
"status_message": "Status changed from PendingOutbound to OutboundMined",
"error_message": "",
"lastUpdate_timestamp": "1736512276",
"isAbortRefunded": false,
"created_timestamp": "1736512142"
},
"inbound_params": {
"sender": "0x93491dF3516B795321b52Bf0d8F62dc6d7Bf1A57",
"sender_chain_id": "7001",
"tx_origin": "0x4955a3F38ff86ae92A914445099caa8eA2B9bA32",
"coin_type": "Gas",
"asset": "",
"amount": "926697400447853988",
"observed_hash": "0x542b6bd80004f4013b725c2170b9ed01731b8af9dc61bfb5c0534dc2f0d511da",
"observed_external_height": "8502541",
"ballot_index": "0x36f41b8ca20bd615b1211de1ff5ec67ea58313a9145628cb25922399472dcc14",
"finalized_zeta_height": "0",
"tx_finalization_status": "NotFinalized",
"is_cross_chain_call": false
},
"outbound_params": [
{
"receiver": "0x4955a3F38ff86ae92A914445099caa8eA2B9bA32",
"receiver_chainId": "80002",
"coin_type": "Gas",
"amount": "926697400447853988",
"tss_nonce": "203",
"gas_limit": "0",
"gas_price": "70202400018",
"gas_priority_fee": "61914727583",
"hash": "0x49f67ece0c0b59d58312df91342d46b14496abf2d8a52a1a5ce9f4c6136e8d75",
"ballot_index": "0xdd73c61df68c8889065d8db441f87db163fe0ca54a2f9adf358e8f2814e36d2c",
"observed_external_height": "16686973",
"gas_used": "21000",
"effective_gas_price": "70202400018",
"effective_gas_limit": "21000",
"tss_pubkey": "zetapub1addwnpepq28c57cvcs0a2htsem5zxr6qnlvq9mzhmm76z3jncsnzz32rclangr2g35p",
"tx_finalization_status": "Executed",
"call_options": {
"gas_limit": "21000",
"is_arbitrary_call": true
}
}
],
"protocol_contract_version": "V2",
"revert_options": {
"revert_address": "0x93491dF3516B795321b52Bf0d8F62dc6d7Bf1A57",
"call_on_revert": true,
"abort_address": "0x0000000000000000000000000000000000000000",
"revert_message": "AAAAAAAAAAAAAAAASVWj84/4aukqkURFCZyqjqK5ujIAAAAAAAAAAAAAAAAFuhSae9bcH5N/qQRqngXAXzsYsA==",
"revert_gas_limit": "1000000"
}
}
]
}
Outbound hash on Polygon Amoy:
Incoming
Consider an example of making call from Ethereum Sepolia to a universal app contract on ZetaChain.
In this example a user calls EVM Gateway's depositAndCall
to call a universal
swap contract on ZetaChain, which swaps incoming
tokens for target ZRC-20 tokens, which are transferred to the recipient on
ZetaChain.
This example results in a single CCTX: Ethereum Sepolia → ZetaChain Testnet.
An inbound transaction on Ethereum Sepolia:
CCTX:
{
"CrossChainTxs": [
{
"creator": "zeta18pksjzclks34qkqyaahf2rakss80mnusju77cm",
"index": "0x87047470bc90d5bce042c3b375e4b5e0dfdbce3b881421fe37299c0c8dfd27b9",
"zeta_fees": "0",
"relayed_message": "000000000000000000000000777915d031d1e8144c90d025c594b3b8bf07a08d0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000144955a3f38ff86ae92a914445099caa8ea2b9ba32000000000000000000000000",
"cctx_status": {
"status": "OutboundMined",
"status_message": "Status changed from PendingOutbound to OutboundMined",
"error_message": "",
"lastUpdate_timestamp": "1736512592",
"isAbortRefunded": false,
"created_timestamp": "1736512592"
},
"inbound_params": {
"sender": "0x4955a3F38ff86ae92A914445099caa8eA2B9bA32",
"sender_chain_id": "11155111",
"tx_origin": "0x4955a3F38ff86ae92A914445099caa8eA2B9bA32",
"coin_type": "Gas",
"asset": "0x0000000000000000000000000000000000000000",
"amount": "100000000000000000",
"observed_hash": "0xfacdad3d12988e1065e32b757d1bbc7e868fb8cbae51c909b3f178027d233f79",
"observed_external_height": "7460957",
"ballot_index": "0x87047470bc90d5bce042c3b375e4b5e0dfdbce3b881421fe37299c0c8dfd27b9",
"finalized_zeta_height": "8502617",
"tx_finalization_status": "Executed",
"is_cross_chain_call": true
},
"outbound_params": [
{
"receiver": "0x93491dF3516B795321b52Bf0d8F62dc6d7Bf1A57",
"receiver_chainId": "7001",
"coin_type": "Gas",
"amount": "0",
"tss_nonce": "0",
"gas_limit": "0",
"gas_price": "",
"gas_priority_fee": "",
"hash": "0x55dfec4c6fa38b1eadd479ea63fabf7481d6857b2e8a54b375ef6a264a00ddb7",
"ballot_index": "",
"observed_external_height": "8502617",
"gas_used": "0",
"effective_gas_price": "0",
"effective_gas_limit": "0",
"tss_pubkey": "zetapub1addwnpepq28c57cvcs0a2htsem5zxr6qnlvq9mzhmm76z3jncsnzz32rclangr2g35p",
"tx_finalization_status": "Executed",
"call_options": {
"gas_limit": "1500000",
"is_arbitrary_call": false
}
}
],
"protocol_contract_version": "V2",
"revert_options": {
"revert_address": "0x0000000000000000000000000000000000000000",
"call_on_revert": false,
"abort_address": "0x0000000000000000000000000000000000000000",
"revert_message": "MHg=",
"revert_gas_limit": "7000000"
}
}
]
}
If you try querying the API with the CCTX hash as an inbound hash, the API responds with HTTP 404 response, because this CCTX does not trigger another CCTX.
Incoming & Abort
Consider an example of making call from Ethereum Sepolia to a universal app contract on ZetaChain, which aborts.
In this example a user calls EVM Gateway's depositAndCall
to call a universal
swap contract on ZetaChain, which swaps incoming
tokens for target ZRC-20 tokens, but the amount of supplied tokens is not enough
to cover the withdraw gas fee to Polygon Amoy, so the transaction reverts. The
amount of tokens is also not sufficient to cover a revert transaction to
Ethereum Sepolia, so the transaction abort.
An inbound transaction on Ethereum Sepolia:
CCTX:
{
"CrossChainTxs": [
{
"creator": "zeta167ns6zwczl9asjs47jwv3uhtkxfjcvx3dgf3ct",
"index": "0x506981772e198160bbffde947b4c0475861e27adedc60322397db4723eb1db55",
"zeta_fees": "0",
"relayed_message": "000000000000000000000000777915d031d1e8144c90d025c594b3b8bf07a08d0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000144955a3f38ff86ae92a914445099caa8ea2b9ba32000000000000000000000000",
"cctx_status": {
"status": "Aborted",
"status_message": "Status changed from PendingOutbound to Aborted: revert failed",
"error_message": "deposit error: contract call failed: method 'depositAndCall0', contract '0x6c533f7fE93fAE114d0954697069Df33C9B74fD7', args: [{[] 0x4955a3F38ff86ae92A914445099caa8eA2B9bA32 11155111} 0x05BA149A7bd6dC1F937fA9046A9e05C05f3b18b0 1000000 0x93491dF3516B795321b52Bf0d8F62dc6d7Bf1A57 [0 0 0 0 0 0 0 0 0 0 0 0 119 121 21 208 49 209 232 20 76 144 208 37 197 148 179 184 191 7 160 141 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 20 73 85 163 243 143 248 106 233 42 145 68 69 9 156 170 142 162 185 186 50 0 0 0 0 0 0 0 0 0 0 0 0]]: execution reverted: ret 0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000027556e69737761705632526f757465723a204558434553534956455f494e5055545f414d4f554e5400000000000000000000000000000000000000000000000000: evm transaction execution failed, processing error: outTxGasFee(845181378930000) more than available gas for tx (1000000) | Identifiers : 0x4955a3F38ff86ae92A914445099caa8eA2B9bA32-11155111-11155111-0 : not enough gas",
"lastUpdate_timestamp": "1736512743",
"isAbortRefunded": false,
"created_timestamp": "1736512743"
},
"inbound_params": {
"sender": "0x4955a3F38ff86ae92A914445099caa8eA2B9bA32",
"sender_chain_id": "11155111",
"tx_origin": "0x4955a3F38ff86ae92A914445099caa8eA2B9bA32",
"coin_type": "Gas",
"asset": "0x0000000000000000000000000000000000000000",
"amount": "1000000",
"observed_hash": "0x254d687404ff8f1cd481d2b25866e8c0a68c5d7fde08deaa60e61577752e1466",
"observed_external_height": "7460970",
"ballot_index": "0x506981772e198160bbffde947b4c0475861e27adedc60322397db4723eb1db55",
"finalized_zeta_height": "8502643",
"tx_finalization_status": "Executed",
"is_cross_chain_call": true
},
"outbound_params": [
{
"receiver": "0x93491dF3516B795321b52Bf0d8F62dc6d7Bf1A57",
"receiver_chainId": "7001",
"coin_type": "Gas",
"amount": "0",
"tss_nonce": "0",
"gas_limit": "0",
"gas_price": "",
"gas_priority_fee": "",
"hash": "0x89d7f5bd0301bf19724e0257afabdd5df5fc97f967ab796ab4c988be10ef0479",
"ballot_index": "",
"observed_external_height": "8502643",
"gas_used": "0",
"effective_gas_price": "0",
"effective_gas_limit": "0",
"tss_pubkey": "zetapub1addwnpepq28c57cvcs0a2htsem5zxr6qnlvq9mzhmm76z3jncsnzz32rclangr2g35p",
"tx_finalization_status": "Executed",
"call_options": {
"gas_limit": "1500000",
"is_arbitrary_call": false
}
},
{
"receiver": "0x4955a3F38ff86ae92A914445099caa8eA2B9bA32",
"receiver_chainId": "11155111",
"coin_type": "Zeta",
"amount": "0",
"tss_nonce": "0",
"gas_limit": "0",
"gas_price": "",
"gas_priority_fee": "",
"hash": "",
"ballot_index": "",
"observed_external_height": "0",
"gas_used": "0",
"effective_gas_price": "0",
"effective_gas_limit": "0",
"tss_pubkey": "zetapub1addwnpepq28c57cvcs0a2htsem5zxr6qnlvq9mzhmm76z3jncsnzz32rclangr2g35p",
"tx_finalization_status": "NotFinalized",
"call_options": {
"gas_limit": "21000",
"is_arbitrary_call": false
}
}
],
"protocol_contract_version": "V2",
"revert_options": {
"revert_address": "0x0000000000000000000000000000000000000000",
"call_on_revert": false,
"abort_address": "0x0000000000000000000000000000000000000000",
"revert_message": "MHg=",
"revert_gas_limit": "7000000"
}
}
]
}
Incoming & Revert
An example of making call from Base Sepolia to a universal app contract on ZetaChain, which reverts.
In this example a user calls EVM Gateway's depositAndCall
to call a universal
swap contract on ZetaChain, which swaps incoming
tokens for target ZRC-20 tokens, but the amount of supplied tokens is not enough
to cover the withdraw gas fee to Polygon Amoy, so the transaction reverts.
An inbound transaction on Base Sepolia:
{
"CrossChainTxs": [
{
"creator": "zeta1w5czgpk5kc9etxw2anzhr0uyrr4fqks32qmk6k",
"index": "0xd573fe0a42f6f236e789b6cad8c4e0b6b3639a3c0bc0e01de9a5ee92183c1431",
"zeta_fees": "0",
"relayed_message": "00000000000000000000000005ba149a7bd6dc1f937fa9046a9e05c05f3b18b00000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000144955a3f38ff86ae92a914445099caa8ea2b9ba32000000000000000000000000",
"cctx_status": {
"status": "Reverted",
"status_message": "Status changed from PendingRevert to Reverted",
"error_message": "revert executed",
"lastUpdate_timestamp": "1736770365",
"isAbortRefunded": false,
"created_timestamp": "1736770253"
},
"inbound_params": {
"sender": "0x4955a3F38ff86ae92A914445099caa8eA2B9bA32",
"sender_chain_id": "84532",
"tx_origin": "0x4955a3F38ff86ae92A914445099caa8eA2B9bA32",
"coin_type": "Gas",
"asset": "0x0000000000000000000000000000000000000000",
"amount": "200000000000000",
"observed_hash": "0x9fcff3ff5ec57b7198543e6a204f08447d6dd8dc54d33100e3e79f6deb8dc407",
"observed_external_height": "20500946",
"ballot_index": "0xd573fe0a42f6f236e789b6cad8c4e0b6b3639a3c0bc0e01de9a5ee92183c1431",
"finalized_zeta_height": "8546178",
"tx_finalization_status": "Executed",
"is_cross_chain_call": true
},
"outbound_params": [
{
"receiver": "0x9644A8759108C1235572bB14110cA078BeAE87EA",
"receiver_chainId": "7001",
"coin_type": "Gas",
"amount": "0",
"tss_nonce": "0",
"gas_limit": "0",
"gas_price": "",
"gas_priority_fee": "",
"hash": "0x9ca133da011a8492bea1115edcf5675245ebbde6826b747bff54bb7f83d9e94c",
"ballot_index": "",
"observed_external_height": "8546178",
"gas_used": "0",
"effective_gas_price": "0",
"effective_gas_limit": "0",
"tss_pubkey": "zetapub1addwnpepq28c57cvcs0a2htsem5zxr6qnlvq9mzhmm76z3jncsnzz32rclangr2g35p",
"tx_finalization_status": "Executed",
"call_options": {
"gas_limit": "1500000",
"is_arbitrary_call": false
}
},
{
"receiver": "0x4955a3F38ff86ae92A914445099caa8eA2B9bA32",
"receiver_chainId": "84532",
"coin_type": "Zeta",
"amount": "193262732120000",
"tss_nonce": "232",
"gas_limit": "0",
"gas_price": "320822280",
"gas_priority_fee": "781641",
"hash": "0xd86a5babfb7c3297b98d05d145707010aa8f7b690af151729035c3e2d0567eae",
"ballot_index": "0x7cfba6c8a02a2f294397d51cc5d20e3a14fbc54b36fb0d6b06a142ea9b0a69f1",
"observed_external_height": "20501005",
"gas_used": "21000",
"effective_gas_price": "320822280",
"effective_gas_limit": "21000",
"tss_pubkey": "zetapub1addwnpepq28c57cvcs0a2htsem5zxr6qnlvq9mzhmm76z3jncsnzz32rclangr2g35p",
"tx_finalization_status": "Executed",
"call_options": {
"gas_limit": "21000",
"is_arbitrary_call": false
}
}
],
"protocol_contract_version": "V2",
"revert_options": {
"revert_address": "0x0000000000000000000000000000000000000000",
"call_on_revert": false,
"abort_address": "0x0000000000000000000000000000000000000000",
"revert_message": "MHg=",
"revert_gas_limit": "7000000"
}
}
]
}
Revert transaction back on Base Sepolia: