0xHaM-dLoan Started
    Updated 6 days ago
    -- forked from ytterbic-amethyst @ https://flipsidecrypto.xyz/studio/queries/55268528-d594-4458-9934-2d772749f339
    -- with PaymentMade as (
    select*
    -- BLOCK_TIMESTAMP,
    -- TX_HASH,
    -- EVENT_DATA:amount/1e8 as zKSH_amt,
    -- EVENT_DATA:debt_remaining/1e8 as debt_remaining,
    -- EVENT_DATA:principal_remaining/1e8 as principal_remaining,
    -- EVENT_DATA:fa_metadata:inner as zKSH_add,
    -- EVENT_DATA:loan:inner as loan_add,
    -- EVENT_DATA:loan_book:inner as loan_book,
    -- EVENT_DATA:toward_interest/1e8 as toward_interest,
    -- EVENT_DATA:toward_principal/1e8 as toward_principal,
    from aptos.core.fact_events
    -- where PAYLOAD_FUNCTION ilike '0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618f%'
    -- and EVENT_ADDRESS = '0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618f'
    -- and EVENT_MODULE = 'loan_book'
    -- and EVENT_RESOURCE = 'LoanStarted'
    -- and EVENT_MODULE = 'collection'
    -- and EVENT_RESOURCE = 'Burn'
    -- where TX_HASH = '0xff03faf7a11b8e2e08b151bc78bcb95081619ab4c9916552544c940e422b539b' -- mint
    where TX_HASH = '0x0796a7260f1450d34478655f4148b821382ec0e77fc85bf52e1a530fc66bbc9d' -- Burn
    -- and SUCCESS = TRUE
    -- 0x5b0976a3a48c17c87419242e0533838d2fc4624cd30434f54020cf6bafa18812 zKSH Kenya Shilling ZVT
    limit 10
    -- )
    -- select
    -- loan_add,
    -- loan_book,
    -- count(distinct TX_HASH) as n_txs,
    -- sum(zKSH_amt) as zKSH_amount,
    -- from PaymentMade
    -- group by all

    Last run: 6 days ago
    BLOCK_NUMBER
    BLOCK_TIMESTAMP
    VERSION
    TX_HASH
    SUCCESS
    TX_TYPE
    PAYLOAD_FUNCTION
    EVENT_INDEX
    EVENT_TYPE
    EVENT_ADDRESS
    EVENT_MODULE
    EVENT_RESOURCE
    EVENT_DATA
    ACCOUNT_ADDRESS
    CREATION_NUMBER
    SEQUENCE_NUMBER
    FACT_EVENTS_ID
    INSERTED_TIMESTAMP
    MODIFIED_TIMESTAMP
    1
    2817733662025-01-25 14:14:13.22522555230640x0796a7260f1450d34478655f4148b821382ec0e77fc85bf52e1a530fc66bbc9dTRUEuser_transaction
    0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618f::zvt_...
    30x1::fungible_asset::Deposit0x1fungible_assetDeposit
    {"amount":"3400000000","store":"0x2462b1b69424d35c4874a747498fea192fb1c4...
    0x0004ad49e2b982c2c817980e10aed1a2e7e2025-01-25 14:32:41.1982025-01-25 14:32:41.198
    2
    2817733662025-01-25 14:14:13.22522555230640x0796a7260f1450d34478655f4148b821382ec0e77fc85bf52e1a530fc66bbc9dTRUEuser_transaction
    0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618f::zvt_...
    2
    0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618f::loan...
    0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618floan_bookPaymentScheduleIndexUpdated
    {"index":3,"loan_address":"0x6b057fdb891670c001a00bd996ad27f306167822dba...
    0x000cd96fae097a3abec1566a16a89dc15992025-01-25 14:32:41.1982025-01-25 14:32:41.198
    3
    2817733662025-01-25 14:14:13.22522555230640x0796a7260f1450d34478655f4148b821382ec0e77fc85bf52e1a530fc66bbc9dTRUEuser_transaction
    0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618f::zvt_...
    1
    0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618f::zvt_...
    0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618fzvt_loanbook_alphaUnaccountedFee
    {"amount":"254100000000","loan_address":"0x6b057fdb891670c001a00bd996ad2...
    0x00032493dc4e8f80b8d1a5526df3de5eb572025-01-25 14:32:41.1982025-01-25 14:32:41.198
    4
    2817733662025-01-25 14:14:13.22522555230640x0796a7260f1450d34478655f4148b821382ec0e77fc85bf52e1a530fc66bbc9dTRUEuser_transaction
    0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618f::zvt_...
    00x1::fungible_asset::Withdraw0x1fungible_assetWithdraw
    {"amount":"257500000000","store":"0x62b007797310b2a70ec566243f9446ffe966...
    0x000f0ebe3e2f28a94663cb0be408cd8e6972025-01-25 14:32:41.1982025-01-25 14:32:41.198
    5
    2817733662025-01-25 14:14:13.22522555230640x0796a7260f1450d34478655f4148b821382ec0e77fc85bf52e1a530fc66bbc9dTRUEuser_transaction
    0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618f::zvt_...
    60x4::collection::Burn0x4collectionBurn
    {"collection":"0xfb054d86ed6b3d4d903348c31d5485359d0aec3eb9c94abd0b2b463...
    0x000e99c8c1c024ee32256866fe94e21ebb42025-01-25 14:32:41.1982025-01-25 14:32:41.198
    6
    2817733662025-01-25 14:14:13.22522555230640x0796a7260f1450d34478655f4148b821382ec0e77fc85bf52e1a530fc66bbc9dTRUEuser_transaction
    0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618f::zvt_...
    5
    0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618f::loan...
    0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618floan_bookPaymentMade
    {"amount":"257500000000","debt_remaining":"0","fa_metadata":{"inner":"0x...
    0x000575e50e5ab2771882a0260e3d376d68c2025-01-25 14:32:41.1982025-01-25 14:32:41.198
    7
    2817733662025-01-25 14:14:13.22522555230640x0796a7260f1450d34478655f4148b821382ec0e77fc85bf52e1a530fc66bbc9dTRUEuser_transaction
    0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618f::zvt_...
    70x1::transaction_fee::FeeStatement0x1transaction_feeFeeStatement
    {"execution_gas_units":"16","io_gas_units":"22","storage_fee_octas":"0",...
    0x0009112d0ec28206afd38eea487f2beb48a2025-01-25 14:32:41.1982025-01-25 14:32:41.198
    8
    2817733662025-01-25 14:14:13.22522555230640x0796a7260f1450d34478655f4148b821382ec0e77fc85bf52e1a530fc66bbc9dTRUEuser_transaction
    0x5f1ee32ffd50e4c6b1733b00e8e4cf53050d27527488c0c45544e153f8c3618f::zvt_...
    40x1::fungible_asset::Deposit0x1fungible_assetDeposit
    {"amount":"254100000000","store":"0x2462b1b69424d35c4874a747498fea192fb1...
    0x0007b030fc1c0dbf922e2d8bf68cfee9ce32025-01-25 14:32:41.1982025-01-25 14:32:41.198
    8
    5KB
    27s