BlockTrackersquid- regular or expressed
    Updated 2023-08-21

    SELECT
    'base'as source_chain,
    block_timestamp,
    tx_hash,
    origin_from_address,
    (decoded_log:amount::numeric)/1e6 as value,
    lower(decoded_log:destinationChain::string) as destinasion_chain,
    decoded_log:symbol::string,
    decoded_log:payloadHash::string as payloadhash,
    CASE when decoded_log:payloadHash::string IN (SELECT decoded_log:payloadHash::string FROM ethereum.core.ez_decoded_event_logs WHERE contract_address = '0xce16f69375520ab01377ce7b88f5ba8c48f8d666') then 'expressed'
    when decoded_log:payloadHash::string IN (SELECT decoded_log:payloadHash::string FROM optimism.core.ez_decoded_event_logs WHERE contract_address = '0xce16f69375520ab01377ce7b88f5ba8c48f8d666') then 'expressed'
    when decoded_log:payloadHash::string IN (SELECT decoded_log:payloadHash::string FROM avalanche.core.ez_decoded_event_logs WHERE contract_address = '0xce16f69375520ab01377ce7b88f5ba8c48f8d666') then 'expressed'
    when decoded_log:payloadHash::string IN (SELECT decoded_log:payloadHash::string FROM arbitrum.core.ez_decoded_event_logs WHERE contract_address = '0xce16f69375520ab01377ce7b88f5ba8c48f8d666') then 'expressed'
    when decoded_log:payloadHash::string IN (SELECT decoded_log:payloadHash::string FROM bsc.core.ez_decoded_event_logs WHERE contract_address = '0xce16f69375520ab01377ce7b88f5ba8c48f8d666') then 'expressed'
    when decoded_log:payloadHash::string IN (SELECT decoded_log:payloadHash::string FROM polygon.core.ez_decoded_event_logs WHERE contract_address = '0xce16f69375520ab01377ce7b88f5ba8c48f8d666') then 'expressed'
    else 'regular' end as type
    FROM base.core.ez_decoded_event_logs
    WHERE event_name = 'ContractCallWithToken'
    AND origin_to_address = '0xce16f69375520ab01377ce7b88f5ba8c48f8d666'
    AND lower(decoded_log:destinationChain::string) IN ('ethereum', 'optimism', 'avalanche', 'arbitrum', 'binance', 'polygon')
    UNION
    SELECT
    'avalanche'as source_chain,
    block_timestamp,
    tx_hash,
    origin_from_address,
    (decoded_log:amount::numeric)/1e6 as value,
    lower(decoded_log:destinationChain::string) as destinasion_chain,
    decoded_log:symbol::string,
    decoded_log:payloadHash::string as payloadhash,
    CASE when decoded_log:payloadHash::string IN (SELECT decoded_log:payloadHash::string FROM ethereum.core.ez_decoded_event_logs WHERE contract_address = '0xce16f69375520ab01377ce7b88f5ba8c48f8d666') then 'expressed'
    when decoded_log:payloadHash::string IN (SELECT decoded_log:payloadHash::string FROM optimism.core.ez_decoded_event_logs WHERE contract_address = '0xce16f69375520ab01377ce7b88f5ba8c48f8d666') then 'expressed'
    when decoded_log:payloadHash::string IN (SELECT decoded_log:payloadHash::string FROM base.core.ez_decoded_event_logs WHERE contract_address = '0xce16f69375520ab01377ce7b88f5ba8c48f8d666') then 'expressed'
    when decoded_log:payloadHash::string IN (SELECT decoded_log:payloadHash::string FROM arbitrum.core.ez_decoded_event_logs WHERE contract_address = '0xce16f69375520ab01377ce7b88f5ba8c48f8d666') then 'expressed'
    when decoded_log:payloadHash::string IN (SELECT decoded_log:payloadHash::string FROM bsc.core.ez_decoded_event_logs WHERE contract_address = '0xce16f69375520ab01377ce7b88f5ba8c48f8d666') then 'expressed'