1export type HeroPlaygroundData = {
2 title: string
3 description: string
4 code: React.ReactElement<HTMLElement>
5 requestUrl: string
6}
7
8export const heroPlaygroundData: HeroPlaygroundData[] = [
9 {
10 title: 'Recent NFT Mints',
11 description: 'Retrieve the 100 most recent NFT mints in Ethereum.',
12 code: (
13 <code className='text-sm leading-6'>
14 <span className='text-red-400'>SELECT</span> token_address, token_id, to_address,
15 UNIX_TIMESTAMP() - block_timestamp <span className='text-red-400'>as</span> seconds_ago
16 <span className='text-red-400'> FROM</span> eth.recent_nft_mints
17 </code>
18 ),
19 requestUrl: 'recent_nft_mints'
20 },
21 {
22 title: 'Recent Ethereum Blocks',
23 description: 'Discover core information about the 10 most recent Ethereum blocks.',
24 code: (
25 <code className='text-sm leading-6'>
26 <span className='text-red-400'>SELECT</span> number, "timestamp", hash, transaction_count,
27 gas_used
28 <br />
29 <span className='text-red-400'> FROM</span> eth.recent_blocks
30 </code>
31 ),
32 requestUrl: 'recent_ethereum_blocks'
33 },
34 {
35 title: 'OpenSea NFT Sales Across Ethereum/Polygon',
36 description:
37 'Compare the number of NFTs being sold in a five-minute window across both Polygon and Ethereum.',
38 code: (
39 <code className='text-sm leading-6'>
40 <span className='text-red-400'>SELECT</span> chain,{' '}
41 <span className='text-red-400'>count</span>(*) as nft_sales, TO_TIMESTAMP((block_timestamp /{' '}
42 <span className='text-red-400'>300</span>) * <span className='text-red-400'>300</span>){' '}
43 <span className='text-red-400'>as</span> time_window <span className='text-red-400'></span>
44 FROM nft.recent_sales <br />
45 <span className='text-red-400'>GROUP BY </span>
46 time_window, chain <br />
47 <span className='text-red-400'>ORDER BY</span> time_window{' '}
48 <span className='text-red-400'>desc</span>
49 </code>
50 ),
51 requestUrl: 'opensea_sales'
52 },
53 {
54 title: 'Average Transaction Fees for Ethereum',
55 description:
56 'See the recent average transaction fees paid to include a transaction in the Ethereum network.',
57 code: (
58 <code className='text-sm leading-6'>
59 <span className='text-red-400'>SELECT</span> block_number, TO_TIMESTAMP(block_timestamp){' '}
60 <span className='text-red-400'>as</span> block_timestamp,{' '}
61 <span className='text-red-400'>avg</span>(gas) <span className='text-red-400'>as</span>{' '}
62 avg_gas_used,
63 <span className='text-red-400'> avg</span>(gas_price /{' '}
64 <span className='text-red-400'>1e9</span>) <span className='text-red-400'>as</span>{' '}
65 avg_gas_price_in_gwei, <span className='text-red-400'>avg</span>(gas * (gas_price /{' '}
66 <span className='text-red-400'>1e18</span>)) <span className='text-red-400'>as</span>{' '}
67 avg_fee_in_eth <br /> <span className='text-red-400'>FROM</span> eth.recent_transactions{' '}
68 <br />
69 <span className='text-red-400'>GROUP BY</span> block_number, block_timestamp
70 </code>
71 ),
72 requestUrl: 'average_ethereum_transaction_fee'
73 },
74 {
75 title: 'Total Bitcoin Transferred by Block Number',
76 description:
77 'See the recent average transaction fees paid to include a transaction in the Ethereum network.',
78 code: (
79 <code className='text-sm leading-6'>
80 <span className='text-red-400'>SELECT</span> block_number, SUM(output_value) / 1e8 as
81 btc_transferred avg_fee_in_eth <br /> <span className='text-red-400'>FROM</span>{' '}
82 btc.recent_transactions <br />
83 <span className='text-red-400'>GROUP BY</span> block_number
84 </code>
85 ),
86 requestUrl: 'total_bitcoin_transferred'
87 }
88]
89
1export type HeroPlaygroundData = {
2 title: string
3 description: string
4 code: React.ReactElement<HTMLElement>
5 requestUrl: string
6}
7
8export const heroPlaygroundData: HeroPlaygroundData[] = [
9 {
10 title: 'Recent NFT Mints',
11 description: 'Retrieve the 100 most recent NFT mints in Ethereum.',
12 code: (
13 <code className='text-sm leading-6'>
14 <span className='text-red-400'>SELECT</span> token_address, token_id, to_address,
15 UNIX_TIMESTAMP() - block_timestamp <span className='text-red-400'>as</span> seconds_ago
16 <span className='text-red-400'> FROM</span> eth.recent_nft_mints
17 </code>
18 ),
19 requestUrl: 'recent_nft_mints'
20 },
21 {
22 title: 'Recent Ethereum Blocks',
23 description: 'Discover core information about the 10 most recent Ethereum blocks.',
24 code: (
25 <code className='text-sm leading-6'>
26 <span className='text-red-400'>SELECT</span> number, "timestamp", hash, transaction_count,
27 gas_used
28 <br />
29 <span className='text-red-400'> FROM</span> eth.recent_blocks
30 </code>
31 ),
32 requestUrl: 'recent_ethereum_blocks'
33 },
34 {
35 title: 'OpenSea NFT Sales Across Ethereum/Polygon',
36 description:
37 'Compare the number of NFTs being sold in a five-minute window across both Polygon and Ethereum.',
38 code: (
39 <code className='text-sm leading-6'>
40 <span className='text-red-400'>SELECT</span> chain,{' '}
41 <span className='text-red-400'>count</span>(*) as nft_sales, TO_TIMESTAMP((block_timestamp /{' '}
42 <span className='text-red-400'>300</span>) * <span className='text-red-400'>300</span>){' '}
43 <span className='text-red-400'>as</span> time_window <span className='text-red-400'></span>
44 FROM nft.recent_sales <br />
45 <span className='text-red-400'>GROUP BY </span>
46 time_window, chain <br />
47 <span className='text-red-400'>ORDER BY</span> time_window{' '}
48 <span className='text-red-400'>desc</span>
49 </code>
50 ),
51 requestUrl: 'opensea_sales'
52 },
53 {
54 title: 'Average Transaction Fees for Ethereum',
55 description:
56 'See the recent average transaction fees paid to include a transaction in the Ethereum network.',
57 code: (
58 <code className='text-sm leading-6'>
59 <span className='text-red-400'>SELECT</span> block_number, TO_TIMESTAMP(block_timestamp){' '}
60 <span className='text-red-400'>as</span> block_timestamp,{' '}
61 <span className='text-red-400'>avg</span>(gas) <span className='text-red-400'>as</span>{' '}
62 avg_gas_used,
63 <span className='text-red-400'> avg</span>(gas_price /{' '}
64 <span className='text-red-400'>1e9</span>) <span className='text-red-400'>as</span>{' '}
65 avg_gas_price_in_gwei, <span className='text-red-400'>avg</span>(gas * (gas_price /{' '}
66 <span className='text-red-400'>1e18</span>)) <span className='text-red-400'>as</span>{' '}
67 avg_fee_in_eth <br /> <span className='text-red-400'>FROM</span> eth.recent_transactions{' '}
68 <br />
69 <span className='text-red-400'>GROUP BY</span> block_number, block_timestamp
70 </code>
71 ),
72 requestUrl: 'average_ethereum_transaction_fee'
73 },
74 {
75 title: 'Total Bitcoin Transferred by Block Number',
76 description:
77 'See the recent average transaction fees paid to include a transaction in the Ethereum network.',
78 code: (
79 <code className='text-sm leading-6'>
80 <span className='text-red-400'>SELECT</span> block_number, SUM(output_value) / 1e8 as
81 btc_transferred avg_fee_in_eth <br /> <span className='text-red-400'>FROM</span>{' '}
82 btc.recent_transactions <br />
83 <span className='text-red-400'>GROUP BY</span> block_number
84 </code>
85 ),
86 requestUrl: 'total_bitcoin_transferred'
87 }
88]
89