Sandeshkaito yap leaderboard
    Updated 2025-03-17
    -- credits to 0xdatawolf for suggesting we use schema id to be sure only kaito attestaions are included.
    -- and sam for suggesting to use traces table, this will allow us to identify the attestation irrespective of who signs it.

    WITH kaito_write_txn as
    (
    select tx_hash from base.core.fact_traces
    where 1=1
    and block_timestamp >= '2025-01-05'
    and to_address='0xbeb5fc579115071764c7423a4f12edde41f106ed'
    and substr(input,0,10)='0x44adc90e'
    and type='DELEGATECALL'
    and trace_status='SUCCESS'
    and tx_status='SUCCESS'
    )
    ,temp AS (
    SELECT
    tx_hash, block_timestamp,
    regexp_substr_all(SUBSTR(input, 11), '.{64}') AS segmented,
    concat('0x', segmented[3]) AS schema,
    utils.udf_hex_to_int(segmented[5]) AS records,
    ARRAY_SLICE(segmented, 6 + utils.udf_hex_to_int(segmented[5]), 1000) AS data_array
    FROM base.core.fact_traces
    WHERE tx_hash in (select tx_hash from kaito_write_txn)
    and block_timestamp >= '2025-01-05'
    and to_address='0xbeb5fc579115071764c7423a4f12edde41f106ed'
    and substr(input,0,10)='0x44adc90e'
    and type='DELEGATECALL'
    and trace_status='SUCCESS'
    and tx_status='SUCCESS'
    AND schema='0xcb66276cf243e78fad68dd5e633f7bb56814b49ac9a91256615340591577a0e8'
    ),
    exploded AS (
    SELECT
    tx_hash,
    block_timestamp,
    value,
    Last run: about 1 month ago
    TX_HASH
    BLOCK_TIMESTAMP
    TWITTER_ID
    USERNAME
    YAP_POINTS
    TIMESTAMP
    POSITION
    1
    0xe851e9c895e9966347383c199eed114094ed5a7721c053c8a150d8612167fdf62025-03-11 09:26:31.0001099790079294287872lokithebird9992025-03-01 00:00:00.0001
    2
    0xe851e9c895e9966347383c199eed114094ed5a7721c053c8a150d8612167fdf62025-03-11 09:26:31.0001482640180855160832banditxbt9972025-03-01 00:00:00.0002
    3
    0xe851e9c895e9966347383c199eed114094ed5a7721c053c8a150d8612167fdf62025-03-11 09:26:31.0001056015925667942400ChartFuMonkey9962025-03-01 00:00:00.0003
    4
    0xe851e9c895e9966347383c199eed114094ed5a7721c053c8a150d8612167fdf62025-03-11 09:26:31.0001068950834IAmNickDodson9962025-03-01 00:00:00.0004
    5
    0xe851e9c895e9966347383c199eed114094ed5a7721c053c8a150d8612167fdf62025-03-11 09:26:31.0002650025562The__Solstice9962025-03-01 00:00:00.0005
    6
    0xe851e9c895e9966347383c199eed114094ed5a7721c053c8a150d8612167fdf62025-03-11 09:26:31.000958495164686917632Justin_Bons9952025-03-01 00:00:00.0006
    7
    0xe851e9c895e9966347383c199eed114094ed5a7721c053c8a150d8612167fdf62025-03-11 09:26:31.00080722677TimBeiko9942025-03-01 00:00:00.0007
    8
    0x87cd916b25c959a7a4c9a2fc0ad4b7d1a297a3c227d4ae357a2ccd9608ee3ac62025-03-11 09:25:39.0001499585375534206980beast_ico99342025-03-01 00:00:00.0008
    9
    0xe851e9c895e9966347383c199eed114094ed5a7721c053c8a150d8612167fdf62025-03-11 09:26:31.00014354083600236707860xDesigner9912025-03-01 00:00:00.0009
    10
    0xe851e9c895e9966347383c199eed114094ed5a7721c053c8a150d8612167fdf62025-03-11 09:26:31.000787634466CryptoJelleNL9902025-03-01 00:00:00.00010
    11
    0x0414ac2cf49d3f9557bc64471ed6f6190207389c67f1a48d5fd69c4f8df828412025-01-05 09:34:07.0001354329758755147776iamTiwaa992025-01-01 00:00:00.00011
    12
    0x0414ac2cf49d3f9557bc64471ed6f6190207389c67f1a48d5fd69c4f8df828412025-01-05 09:34:07.0001477305214046810117Trim_Bot992025-01-01 00:00:00.00012
    13
    0x0414ac2cf49d3f9557bc64471ed6f6190207389c67f1a48d5fd69c4f8df828412025-01-05 09:34:07.0001537512051337306112heather11666992025-01-01 00:00:00.00013
    14
    0x0414ac2cf49d3f9557bc64471ed6f6190207389c67f1a48d5fd69c4f8df828412025-01-05 09:34:07.0002241233808byteboro992025-01-01 00:00:00.00014
    15
    0x8cd5d1d139d3f734a2e2c54a251384eb184e1deb5f406a97c159015ef77704612025-03-11 09:26:37.000298491091MetamateDaz9872025-03-01 00:00:00.00015
    16
    0x8cd5d1d139d3f734a2e2c54a251384eb184e1deb5f406a97c159015ef77704612025-03-11 09:26:37.0001319287761048723458MarioNawfal9842025-03-01 00:00:00.00016
    17
    0x8cd5d1d139d3f734a2e2c54a251384eb184e1deb5f406a97c159015ef77704612025-03-11 09:26:37.000943869911293726720Pickle_cRypto9832025-03-01 00:00:00.00017
    18
    0x0414ac2cf49d3f9557bc64471ed6f6190207389c67f1a48d5fd69c4f8df828412025-01-05 09:34:07.00011922492jmj982025-01-01 00:00:00.00018
    19
    0x0414ac2cf49d3f9557bc64471ed6f6190207389c67f1a48d5fd69c4f8df828412025-01-05 09:34:07.0001371024834545717251MuddyRC982025-01-01 00:00:00.00019
    20
    0x0414ac2cf49d3f9557bc64471ed6f6190207389c67f1a48d5fd69c4f8df828412025-01-05 09:34:07.00014841770215968890920xkaiserkarel982025-01-01 00:00:00.00020
    ...
    1402
    226KB
    156s