Skip to content

Cross-Chain Log Information

Obtain cross-chain data based on transaction information.

Query transaction details using the transaction hash (displays may vary slightly between different blockchains, but EVM series are generally the same).

  1. If there is no transaction hash, you can use the corresponding address to obtain the transaction hash in the blockchain browser
  2. Taking the evm(eth chain) transaction hash as an example:
    • Check transaction details:
    • Switch to the Logs page, scroll to the Topic module at the bottom, and get the data, which is the cross-chain data information we need:
  3. trx transaction hash
    • Check transaction details:
    • Switch to the Logs page, scroll to the Topic module at the bottom, and get the data, which is the cross-chain data information we need:
  4. sol transaction hash
    • Check transaction details:
    • Switch to the Logs page, scroll to the Topic module at the bottom, and get the data, which is the cross-chain data information we need:
  5. ton transaction hash
    • Check transaction details:
    • Query the detailed information of B node and obtain the data, that is, the cross-chain data information we need:

Data Structure Description:

  1. vaultReceiver: Cross-chain liquidity pool receiving address (the first segment of users' funds will enter this address, with a corresponding address for each chain).
  2. sender: The originating address of the source chain user.
  3. receiver: Target chain user's payment address.
  4. srcToken: Source chain Token contract address.
  5. dstToken: Target chain Token contract address.
  6. srcChainId: chainId of the source chain.
  7. dstChainId: The target chain's chainId.
  8. amount: The amount of the user's transaction.
  9. timestamp: Time when the transaction was initiated.

For non-EVM chains, vaultReceiver, sender, receiver, srcToken, and dstToken are different and need to be converted to get the original value. The conversion rules are as follows:

  1. TRX:
  2. SOL、TON:
    • Conversion rules: '0x' + pubkey.toBuffer().toString("hex")

The correspondence between chainId and the actual chain is as follows:

json
{
  "eth": 1,
  "bnb": 56,
  "matic": 137,
  "avax_c": 43114,
  "arbitrum": 42161,
  "optimism": 10,
  "zksv2": 324,
  "base": 8453,
  "trx": 728126428,
  "zkfair": 42766,
  "manta": 169,
  "opbnb": 204,
  "linea": 59144,
  "sol": 100278,
  "ton": 100280,
  "morph": 2818
}
{
  "eth": 1,
  "bnb": 56,
  "matic": 137,
  "avax_c": 43114,
  "arbitrum": 42161,
  "optimism": 10,
  "zksv2": 324,
  "base": 8453,
  "trx": 728126428,
  "zkfair": 42766,
  "manta": 169,
  "opbnb": 204,
  "linea": 59144,
  "sol": 100278,
  "ton": 100280,
  "morph": 2818
}