princefarzamBurn and Mint USDC on Optimism
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with
Mint AS (
SELECT
date_trunc('day', BLOCK_TIMESTAMP)::date AS day,
count(DISTINCT TX_HASH) AS Number_of_Mint,
sum(AMOUNT_USD) AS USDC_Mint,
sum(USDC_Mint) over (
ORDER by
day
) AS Cum_Sum_USDC_Mint
FROM
optimism.core.ez_token_transfers
WHERE
CONTRACT_ADDRESS = lower('0x7F5c764cBc14f9669B88837ca1490cCa17c31607')
AND FROM_ADDRESS = '0x0000000000000000000000000000000000000000'
GROUP BY
day
ORDER BY
day ASC
),
Burn AS (
SELECT
date_trunc('day', BLOCK_TIMESTAMP)::date AS day,
count(DISTINCT TX_HASH) AS Number_of_Burn,
sum(AMOUNT_USD) AS USDC_Burn,
sum(USDC_Burn) over (
ORDER by
day
) AS Cum_Sum_USDC_Burn
FROM
optimism.core.ez_token_transfers
WHERE
CONTRACT_ADDRESS = lower('0x7F5c764cBc14f9669B88837ca1490cCa17c31607')
AND TO_ADDRESS = '0x0000000000000000000000000000000000000000'
GROUP BY
day