<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Sort</title>
    <description>The latest articles on Forem by Sort (@sort_xyz).</description>
    <link>https://forem.com/sort_xyz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F846647%2F933f71e9-88d7-4b00-a493-948f02a29dd9.png</url>
      <title>Forem: Sort</title>
      <link>https://forem.com/sort_xyz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sort_xyz"/>
    <language>en</language>
    <item>
      <title>Sort's Web3 React Components Are Now Open Source!</title>
      <dc:creator>Sort</dc:creator>
      <pubDate>Thu, 01 Jun 2023 17:56:08 +0000</pubDate>
      <link>https://forem.com/sort/sorts-react-components-are-now-open-source-now-its-easy-to-build-data-rich-uis-for-web3-49p7</link>
      <guid>https://forem.com/sort/sorts-react-components-are-now-open-source-now-its-easy-to-build-data-rich-uis-for-web3-49p7</guid>
      <description>&lt;p&gt;We're excited to announce the Alpha release of Sort's React Components: &lt;a href="https://github.com/sortxyz/react-components"&gt;https://github.com/sortxyz/react-components&lt;/a&gt;. This release marks our first iteration of simplifying data-rich UIs for Web3.&lt;/p&gt;

&lt;p&gt;We're initially starting with three core components for building data rich UIs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;lt;LatestTransactions/&amp;gt;&lt;/code&gt;&lt;/strong&gt; - Displays a pageable table of the latest transactions of a contract address.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;lt;SQLQuery/&amp;gt;&lt;/code&gt;&lt;/strong&gt; - Easily include blockchain data from a Sort SQL Query in your application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;lt;PushNotifications/&amp;gt;&lt;/code&gt;&lt;/strong&gt; - Show real-time transactions for a contract.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All three components support Ethereum, Polygon and Goerli data sources.&lt;/p&gt;

&lt;h2&gt;
  
  
  LatestTransactions
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://docs.sort.xyz/docs/latest-transactions"&gt;&lt;code&gt;&amp;lt;LatestTransactions/&amp;gt;&lt;/code&gt;&lt;/a&gt; React Component displays a pageable table of the latest transactions of a contract address.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;LatestTransactions&lt;/span&gt;
  &lt;span class="nx"&gt;contract_address&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0xd1f9c58e33933a993a3891f8acfe05a68e1afc05&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;chain&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;polygon&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;API_KEY&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;theme&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dark&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Preview:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wZIY10Xh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/apcp2bdlx2eg19rntxq7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wZIY10Xh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/apcp2bdlx2eg19rntxq7.png" alt="Image description" width="800" height="602"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  SQLQuery
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://docs.sort.xyz/docs/sql-query"&gt;&lt;code&gt;&amp;lt;SQLQuery/&amp;gt;&lt;/code&gt;&lt;/a&gt; React Component lets you easily include blockchain data from a Sort SQL Query in your application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;SQLQuery&lt;/span&gt;
  &lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;select * from polygon.transaction where to_address='0xd1f9c58e33933a993a3891f8acfe05a68e1afc05' order by block_id desc&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;API_KEY&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Preview:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U-1ImV3k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y2rtubd3kqs4gtfelnxv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U-1ImV3k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y2rtubd3kqs4gtfelnxv.png" alt="Image description" width="800" height="526"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  PushNotifications
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://docs.sort.xyz/docs/push-notifications"&gt;&lt;code&gt;&amp;lt;PushNotifications/&amp;gt;&lt;/code&gt;&lt;/a&gt; React Component lets you easily include live blockchain transactions into your application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;PushNotifications&lt;/span&gt;
  &lt;span class="nx"&gt;contract_address&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0xd1f9c58e33933a993a3891f8acfe05a68e1afc05&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;contract_function&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;
  &lt;span class="nx"&gt;num&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Preview:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o93ZoGYl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x3cu9fg8fe5ckpisxwpk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o93ZoGYl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x3cu9fg8fe5ckpisxwpk.png" alt="Image description" width="800" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Started Today
&lt;/h2&gt;

&lt;p&gt;Head over to Sort to &lt;a href="https://docs.sort.xyz/docs/api-keys"&gt;create a free API Key and start building today&lt;/a&gt;. Let us know what you think by &lt;a href="https://github.com/sortxyz/react-components"&gt;opening issues in the repo&lt;/a&gt; for new feature requests, feedback, or general questions.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. Interested in a free Sort hoodie? &lt;a href="https://sort.xyz/survey"&gt;Complete our Developer Survey&lt;/a&gt; and we'll mail you one!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z-_0ht8e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wd3v1l5vkm2bmkd92pv4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z-_0ht8e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wd3v1l5vkm2bmkd92pv4.png" alt="Sort hoodie" width="800" height="683"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;-- Your friends at &lt;a href="https://sort.xyz"&gt;Sort&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>ethereum</category>
      <category>polygon</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Build Together for Free with Sponsored Contracts on Sort</title>
      <dc:creator>Sort</dc:creator>
      <pubDate>Fri, 26 May 2023 17:09:25 +0000</pubDate>
      <link>https://forem.com/sort_xyz/build-together-for-free-with-sponsored-contracts-on-sort-2egp</link>
      <guid>https://forem.com/sort_xyz/build-together-for-free-with-sponsored-contracts-on-sort-2egp</guid>
      <description>&lt;p&gt;&lt;em&gt;Sponsor a contract address on Sort for only &lt;a href="https://sort.xyz/add-contract"&gt;$9/month&lt;/a&gt; and make it free for anyone to use data produced by that contract.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We originally focused on charging each developer that uses Sort, but something didn’t feel right. Charging per developer works very well with traditional applications, &lt;strong&gt;but things are very different in crypto:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Protocols and contracts make revenue when they get transactions, driving transactions to a contract is very important&lt;/li&gt;
&lt;li&gt;The more applications built on top of a contract, the more transactions will be generated, and that means more revenue (think about all the applications built on top of the UniSwap contracts)&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Sort works with crypto projects and protocols to help drive developers to them, via Sort &lt;a href="https://sort.xyz/contracts"&gt;Sponsored Contracts&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When a contract is Sponsored on Sort, it is free for anyone to use data produced by that contract: SQL, push notifications, NFT metadata, and more. &lt;strong&gt;The contract author gets two large benefits:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sort is their backend-as-a-service&lt;/strong&gt;, no need to host servers anywhere (we’ll even give you disposable read-only API keys)&lt;/li&gt;
&lt;li&gt;Incentive the community, let them build applications using contract data &lt;strong&gt;for free&lt;/strong&gt;!&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;For instance, let’s look at the currently Sponsored contracts:&lt;/p&gt;

&lt;p&gt;An &lt;a href="https://docs.sort.xyz/reference/createabi"&gt;API call to get latest transactions&lt;/a&gt; is free, using a demo API key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const response = await fetch('https://api.sort.xyz/v1/queries/run', {
    method: 'POST',
    headers: {
      'x-api-key': "ec2fa3f2-7fdc-4342-9ebc-95f8b2bd7d21",
      'Accept': 'application/json',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      "query": "SELECT token_id as id, metadata_content FROM ethereum.nft_metadata WHERE contract_address = '0x887f3909c14dabd9e9510128ca6cbb448e932d7f'"
    }),
  })

const full_response = await response.json();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or use a &lt;a href="https://docs.sort.xyz/docs/latest-transactions"&gt;Sort React Component&lt;/a&gt; to show latest transactions for the contract, for free:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;LatestTransactions  
contract_address="0x887f3909c14dabd9e9510128ca6cbb448e932d7f"
  api_key="ec2fa3f2-7fdc-4342-9ebc-95f8b2bd7d21"
  theme="dark"
  blockchain="ethereum"
/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check out &lt;a href="https://sort.xyz/contracts"&gt;Sponsored Contracts&lt;/a&gt; on Sort, or Sponsor a contract address for only $9/month and make it free for anyone to use.&lt;/p&gt;

</description>
      <category>ethereum</category>
      <category>web3</category>
      <category>polygon</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Power Tools for Blockchain UI Development: $3.5M Seed Round, An Innovative Revenue Model, and Open Access to Contract Data</title>
      <dc:creator>Sort</dc:creator>
      <pubDate>Mon, 22 May 2023 15:09:26 +0000</pubDate>
      <link>https://forem.com/sort_xyz/power-tools-for-blockchain-ui-development-35m-seed-round-an-innovative-revenue-model-and-open-access-to-contract-data-3k9n</link>
      <guid>https://forem.com/sort_xyz/power-tools-for-blockchain-ui-development-35m-seed-round-an-innovative-revenue-model-and-open-access-to-contract-data-3k9n</guid>
      <description>&lt;h2&gt;
  
  
  Writing Decentralized Applications is Hard
&lt;/h2&gt;

&lt;p&gt;Writing decentralized applications is incredibly difficult. Developers are dealing with low level blockchain decoding, building infrastructure, and managing servers instead of focusing on their core business. As developers moved to the cloud, more time was available to focus on their core product. We see the same bottleneck affecting Web3 development today.&lt;/p&gt;




&lt;h2&gt;
  
  
  Sort Seed Round: Let’s Make Decentralized Application Development Easy
&lt;/h2&gt;

&lt;p&gt;We’re excited to announce the seed funding round for &lt;a href="https://sort.xyz"&gt;Sort&lt;/a&gt;, raising $3.5 million to build power tools for Blockchain UI development. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.thegp.com/"&gt;The General Partnership&lt;/a&gt; and &lt;a href="https://lemniscap.com"&gt;Lemniscap&lt;/a&gt; led the round, with support from Alliance DAO, Punk DAO, Orange DAO, Blizzard Fund, Parasol, Primal Capital, Red Rooster Ventures, and a number of angels from Coinbase, Gemini, and Snyk. The funding will give us the runway to build our product suite and increase adoption.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We’re focusing Sort’s roadmap on the following areas:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Making data-rich UI components easy to integrate into decentralized applications&lt;/li&gt;
&lt;li&gt;Giving users access to real-time contract data for transactions and contract events&lt;/li&gt;
&lt;li&gt;Leveraging ChatGPT and LLMs to formulate SQL queries for populating UIs&lt;/li&gt;
&lt;li&gt;Supporting off-chain data&lt;/li&gt;
&lt;li&gt;Deploying end-to-end, full-stack blockchain applications&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Read our &lt;a href="https://docs.sort.xyz/docs/our-vision"&gt;full vision on Sort.xyz&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Build an Application with Sort today
&lt;/h2&gt;

&lt;p&gt;We want to make writing applications as easy as possible so we’re starting with a base set of React components and a &lt;a href="https://docs.sort.xyz/reference/runquery"&gt;feature rich data API&lt;/a&gt;. These are powerful tools that can be used to create beautiful blockchain applications with fast page load times.&lt;/p&gt;

&lt;p&gt;Get started with just a few steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Choose an &lt;a href="https://sort.xyz/contracts"&gt;available contract&lt;/a&gt; listed on Sort (or &lt;a href="https://sort.xyz/add-contract"&gt;add&lt;/a&gt; your own)&lt;/li&gt;
&lt;li&gt;Explore the &lt;a href="https://docs.sort.xyz/reference/runquery"&gt;Sort API Reference Docs&lt;/a&gt;, including two endpoints dedicated to ChatGPT requests (e.g. &lt;a href="https://docs.sort.xyz/reference/generatesql"&gt;Generate a Sort SQL Query from a text prompt&lt;/a&gt; or &lt;a href="https://docs.sort.xyz/reference/generateandrunsql"&gt;Generate and run a Sort SQL query from a text prompt.&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Cut and paste React components into your application:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://docs.sort.xyz/docs/sql-query"&gt;&lt;code&gt;&amp;lt;SQLQuery /&amp;gt;&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt; - display data from a Sort SQL query directly in an application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;SQLQuery 
  query="select * from ethereum.transaction where to_address='0xdac17f958d2ee523a2206206994597c13d831ec7' order by block_id desc" 
  api_key="MY_API_KEY"
/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;a href="https://docs.sort.xyz/docs/push-notifications"&gt;&lt;code&gt;&amp;lt;PushNotifications /&amp;gt;&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt; -  show real-time contract events, filtered by contract function&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;PushNotifications 
  contract_address="0x6b175474e89094c44da98b954eedeac495271d0f"
  function_name="execute"
  height="200px"
  theme="light"
/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;a href="https://docs.sort.xyz/docs/latest-transactions"&gt;&lt;code&gt;&amp;lt;LatestTransactions /&amp;gt;&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt; - display latest transactions for your contract&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;LatestTransactions 
  contract_address="0x887f3909c14dabd9e9510128ca6cbb448e932d7f"
  api_key="MY_API_KEY"
  theme="dark"
  blockchain="ethereum"
/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our APIs and components are backed by Sort’s real time infrastructure allowing you to easily access contract data as soon as an event occurs.&lt;/p&gt;




&lt;h2&gt;
  
  
  A New Business Model for Aligning Incentives: Sponsored Contracts
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Once a contract has been sponsored on Sort, it is free for anyone to access and use data produced by the contract.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We believe you get the best outcomes by aligning incentives. &lt;br&gt;
We are working together with contract authors to get builders using their contracts and driving transactions. By partnering with developers and protocols, we win together.&lt;/p&gt;

&lt;p&gt;Sponsored contracts on Sort have the following benefits:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sort can be used as a complete backend-as-a-service for decentralized applications, no additional infrastructure is needed.&lt;/li&gt;
&lt;li&gt;Anyone in the community can build web applications on sponsored contracts for free. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Best of all, sponsoring a contract on Sort is only $9/month, or $99/year when paying with USDC or ETH.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  We need your feedback!
&lt;/h2&gt;

&lt;p&gt;We’re just getting started and look forward to a roadmap shaped by the community. &lt;a href="https://sort.xyz"&gt;Try Sort today&lt;/a&gt; and let us know what you think. &lt;/p&gt;

&lt;p&gt;Send us feedback on the &lt;a href="https://docs.sort.xyz/docs"&gt;Sort API&lt;/a&gt; or &lt;a href="https://docs.sort.xyz/docs/installation"&gt;React components&lt;/a&gt; and we'll send you a free Sort hoodie! &lt;strong&gt;Just complete the &lt;a href="https://sort.xyz/survey"&gt;developer survey here&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AtGVwzPb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a0vhhu7hl54nyfrl34n2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AtGVwzPb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a0vhhu7hl54nyfrl34n2.png" alt="Image description" width="800" height="591"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Learn more about Sort&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.sort.xyz/docs/build-ethereum-and-polygon-applications-with-sort"&gt;Read our docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.gg/sort"&gt;Join our Discord&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twiter.com/sort_xyz"&gt;Follow us on Twitter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ethereum</category>
      <category>blockchain</category>
      <category>polygon</category>
      <category>javascript</category>
    </item>
    <item>
      <title>The new Sort NPM package for querying Ethereum data with SQL</title>
      <dc:creator>Sort</dc:creator>
      <pubDate>Tue, 16 Aug 2022 15:29:00 +0000</pubDate>
      <link>https://forem.com/sort_xyz/our-new-npm-package-for-querying-ethereum-data-with-sql-57kc</link>
      <guid>https://forem.com/sort_xyz/our-new-npm-package-for-querying-ethereum-data-with-sql-57kc</guid>
      <description>&lt;p&gt;We're excited to release a new NPM package for querying decoded Ethereum transactions with SQL. Results in milliseconds, using an in-memory column store, we want to remove the need to manage a backend for your dApp!&lt;/p&gt;

&lt;p&gt;Our NPM package is the next step in making "Hello World" to Web3 as simple as possible, expect a few more similar developments from &lt;a href="https://sort.xyz"&gt;Sort&lt;/a&gt; as we put the final touches on a new Ethereum "Hello World" tutorial that will push the ecosystem forward.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { Sort }  = require('sort-xyz');

// initialize Sort client using free api key from sort.xyz
let sort = new Sort({ api_key: 'ce4c9316-f7ce-4955-b6b3-2292a8be7afa' });

let result = await sort.query("select * from ethereum_latest.transaction_log l where l.name = 'Nested' limit 10");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;API keys are free, and available at &lt;a href="https://sort.xyz"&gt;sort.xyz&lt;/a&gt;. The Sort NPM package overview is &lt;a href="https://www.npmjs.com/package/sort-xyz"&gt;listed here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run a SQL query
&lt;/h2&gt;

&lt;p&gt;Formulate the query at &lt;a href="https://sort.xyz"&gt;sort.xyz&lt;/a&gt;, then run the query directly in your application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// send a SQL query to sort

let result = await sort.query("select _id as hash, value_eth as amount, timestamp, t.function.params[1].value as punkId from ethereum_latest.transaction t where t.to = '0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb' and t.function.name = 'buyPunk' order by timestamp desc limit 100");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use the query id from the Sort UI to minimize the amount of SQL within your code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// query id obtained from the id at sort.xyz
// -&amp;gt; create a query on sort.xyz
// -&amp;gt; save the query
// -&amp;gt; obtain the query id from the URL: https://sort.xyz/query/&amp;lt;QUERY ID&amp;gt;

let result = await sort.queryById('62f7d1001a096c757ce8f355');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Latest decoded transactions for a contract address
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// get latest 100 transactions for the OpenSea Seaport contract
let result = await sort.contractTransactions(
  '0x00000000006c3852cbef3e08e8df289169ede581');

// get latest 10 transactions for the OpenSea Seaport contract
let result = await sort.contractTransactions(
  '0x00000000006c3852cbef3e08e8df289169ede581', 10);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Latest decoded contract events / logs
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// get latest 100 events/logs for the OpenSea Seaport contract
let result = await sort.contractEvents(
  '0x00000000006c3852cbef3e08e8df289169ede581');

// get latest 10 events/logs for the OpenSea Seaport contract
let result = await sort.contractEvents(
  '0x00000000006c3852cbef3e08e8df289169ede581', 10);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Decoded transaction by hash
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let result = await sort.transaction("0x32ef066346ed78ceac0f6fdb888adf44819856564b8268985c3f09a68c8c4ddb");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And also decoded transaction events / logs by hash&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let result = await sort.transactionEvents("0x32ef066346ed78ceac0f6fdb888adf44819856564b8268985c3f09a68c8c4ddb");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Focus on client-side code, Sort will be your backend
&lt;/h2&gt;

&lt;p&gt;All of these examples can run directly in Javascript, with a public API key (no secrets needed). This means there is no longer a need to host a backend server. Simplify your Ethereum app development and use &lt;a href="https://sort.xyz"&gt;Sort&lt;/a&gt; as your backend! &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Our 5 favorite crypto projects - August 2022</title>
      <dc:creator>Sort</dc:creator>
      <pubDate>Tue, 02 Aug 2022 17:07:34 +0000</pubDate>
      <link>https://forem.com/sort_xyz/our-5-favorite-crypto-projects-august-2022-55e</link>
      <guid>https://forem.com/sort_xyz/our-5-favorite-crypto-projects-august-2022-55e</guid>
      <description>&lt;p&gt;At &lt;a href="https://sort.xyz"&gt;Sort&lt;/a&gt; we comb through a lot of crypto projects, whether it's DeFi, NFTs, or anything else that uses Ethereum. We've decided to start compiling a list of some of the more interesting projects each month. Please feel free to give us feedback in our &lt;a href="https://discord.gg/sort"&gt;discord&lt;/a&gt; on how we can improve this list! &lt;/p&gt;

&lt;h3&gt;
  
  
  1. Farcaster
&lt;/h3&gt;

&lt;p&gt;In the early days of Twitter, there was so much enthusiasm and excitement for Twitter as a protocol, and lots of lots of apps were built on top of it. When Twitter started focusing on their advertising business, they cracked down on app usage, and the many apps built on Twitter died. That's why we're so excited for &lt;a href="https://www.farcaster.xyz/"&gt;Farcaster&lt;/a&gt;, a permissionless social protocol that is open! Usage on the app is already taking off, and the company behind the protocol &lt;a href="https://dailyhodl.com/2022/07/13/former-coinbase-executive-to-launch-decentralized-social-media-project-after-raising-30000000-from-investors/"&gt;recently raised $30 million&lt;/a&gt;. Looking for an invite? Follow &lt;a href="https://twitter.com/dwr"&gt;@dwr&lt;/a&gt; on Twitter and respond to one of his invite tweets.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Beanstalk
&lt;/h3&gt;

&lt;p&gt;Not another algo-stablecoin! There have been a lot of these lately, but &lt;a href="https://bean.money/"&gt;Beanstalk&lt;/a&gt; will be the one to rule them all. Beanstalk gets "replanted" this week (re-launched) after it suffered a major hack to it's governance protocol. The governance protocol was updated, and there is nothing insecure about the Beanstalk protocol itself. Prior to relaunch the coin went through two large audits by two different firms (&lt;a href="https://bean.money/blog/trail-of-bits-audit-of-beanstalk-completed"&gt;Trail of Bits&lt;/a&gt; and &lt;a href="https://bean.money/blog/halborn-audit-of-beanstalk-completed"&gt;Halborn&lt;/a&gt;). What really sets Beanstalk apart is its community and it's 0 collateral model. This is a high-risk high-reward project that we believe will be here for a long time. &lt;a href="https://medium.com/@root_protocol/root-protocol-rent-free-markets-on-beanstalk-6a6b3f71415d"&gt;The Root protocol&lt;/a&gt; has also &lt;a href="https://medium.com/@root_protocol/root-protocol-rent-free-markets-on-beanstalk-6a6b3f71415d"&gt;raised $9 million&lt;/a&gt; to support the new Beanstalk ecosystem.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Regulars Jobs
&lt;/h3&gt;

&lt;p&gt;We're hoping the &lt;a href="https://twitter.com/monharti/status/1553429859568869382?s=20&amp;amp;t=uOhEp1xlWSLT_j2Z5x_qcw"&gt;launch of Regulars Jobs&lt;/a&gt; leads to a decentralized sims future for the project. Regulars jobs launched this past week, mint a job for your Regular and start earning Regular Dollars ($REG). TBD what you can do with the Regular Dollars (buy pets, houses, etc?). It will be interesting to watch the ecosystem emerge around Regulars, maybe even a Regulars Casino?&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Dark Forest
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://zkga.me/"&gt;Dark Forest&lt;/a&gt; ecosystem is continuing to grow with new plugins like &lt;a href="https://blog.zkga.me/nightmarket"&gt;Night Market&lt;/a&gt;, which creates a marketplace for planet coordinates. &lt;a href="https://zkga.me/"&gt;Dark Forest&lt;/a&gt; is still in the early days and we're excited to watch it continue to progress. If you're unaware of Dark Forest, this description does a great job describing the Ethereum based game: "Dark Forest is a space-conquest game built on Ethereum where players discover and conquer planets in an infinite, procedurally-generated, cryptographically-specified universe. It uses zero-knowledge proofs to validate game moves on Ethereum without sharing information to other players about the moves."&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Royal
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://royal.io/"&gt;Royal&lt;/a&gt; is sending out their &lt;a href="https://royal.io/blog/royalty-payouts"&gt;first royalty payouts&lt;/a&gt; to token holders: "In total, collectors will earn $36,000 in royalties across four songs". Royal is exciting to us because it's a new way for artists to connect with their fans, and help artists share success with their most loyal fans.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Ingest Regulars NFT events into your App!</title>
      <dc:creator>Sort</dc:creator>
      <pubDate>Mon, 01 Aug 2022 16:16:46 +0000</pubDate>
      <link>https://forem.com/sort_xyz/ingest-regulars-nft-events-into-your-app-109h</link>
      <guid>https://forem.com/sort_xyz/ingest-regulars-nft-events-into-your-app-109h</guid>
      <description>&lt;p&gt;If you're like us, you've been extremely excited about the &lt;a href="https://twitter.com/monharti/status/1553429859568869382?s=20&amp;amp;t=uOhEp1xlWSLT_j2Z5x_qcw"&gt;launch of Regulars Jobs&lt;/a&gt;. Regulars are exciting for a few reasons. First, the art is different than anything else out there (&lt;a href="https://opensea.io/collection/regulars"&gt;see for yourself&lt;/a&gt;). Second, jobs!!! Regulars can work, get on-chain names from NFT owners, and earn $REG tokens from their jobs. Could this be the beginning of a de-centralized sims? It will be interesting to watch the ecosystem around Regulars continue to grow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--unpCUJZl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4bjb2s8f2yby02abksux.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--unpCUJZl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4bjb2s8f2yby02abksux.jpeg" alt="Image description" width="800" height="552"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  On-chain names
&lt;/h2&gt;

&lt;p&gt;Regulars can get on-chain names, let's create a Sort query to see what users are naming their Regulars!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select
  params[2].value as name,
  params[1].value as token_id,
  transaction_hash,
  timestamp,
from
  ethereum.transaction_log l
where
  function_address = '0x1ffe4026573cead0f49355b9d1b276a78f79924f'
  and name = 'NameChange'
order by
  timestamp desc
limit
  1000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://sort.xyz/query/62e749149f63500cf96437f2"&gt;View query results here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Latest Regulars Jobs Minted
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select
  params[1].value as regular_id,
  params[2].value as new_job_id,
  params[3].value as company_id,
  params[4].value as sender,
  transaction_hash,
  timestamp,
from
  ethereum.transaction_log l
where
  function_address = '0x7e300bb12e416a9242e17ec44bbd9ae4e97f3f54'
  and name = 'jobIDCreated'
order by
  timestamp desc
limit
  10000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://sort.xyz/query/62e7f869d91f287873138664"&gt;View query results here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hopefully these queries are enough to get started ingesting Regulars data into your app!&lt;/p&gt;

&lt;p&gt;Feel free to ask any questions (or for query help) on our &lt;a href="https://discord.gg/sort"&gt;Discord&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Watching Beanstalk Fundraising with Sort</title>
      <dc:creator>Sort</dc:creator>
      <pubDate>Thu, 21 Jul 2022 17:51:35 +0000</pubDate>
      <link>https://forem.com/sort_xyz/watching-beanstalk-fundraising-with-sort-2knb</link>
      <guid>https://forem.com/sort_xyz/watching-beanstalk-fundraising-with-sort-2knb</guid>
      <description>&lt;p&gt;&lt;a href="https://bean.money/"&gt;Beanstalk&lt;/a&gt; is working to build the world's best stablecoin, as the Beanstalk &lt;a href="https://docs.bean.money/"&gt;guide mentions&lt;/a&gt;, Beanstalk is:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A stablecoin that (1) prioritizes decentralization, (2) does not require collateral, and (3) organically trends toward more liquidity and stability over time, will unlock the potential of DeFi&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Unfortunately, in April of 2022, &lt;a href="https://halborn.com/explained-the-beanstalk-hack-april-2022/"&gt;Beanstalk funds were stolen&lt;/a&gt; through a governance exploit. Having one of the strongest communities in crypto, Beanstalk started a fundraising event called the &lt;a href="https://bean.money/blog/path-forward"&gt;"Barn Raise"&lt;/a&gt; to recapitalize the protocol.&lt;/p&gt;

&lt;p&gt;We'll use &lt;a href="https://sort.xyz"&gt;Sort&lt;/a&gt; to track &lt;a href="https://bean.money/blog/path-forward"&gt;Barn Raise&lt;/a&gt; progress, and even export results to a spreadsheet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Craft a Sort query for the Beanstalk Barn Raise
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select
  transaction_hash as tx,
  transaction_from as from_address,
  timestamp,
  CAST(l.params [5].value as integer) as amount,
  CASE
    WHEN transaction_value_eth &amp;gt; 0 THEN 'ETH'
    ELSE 'USDC'
  END AS currency
from
  ethereum.transaction_log l
where
  l.transaction_to IN (
    '0x402c84de2ce49af88f5e2ef3710ff89bfed36cb6',
    '0x735cab9b02fd153174763958ffb4e0a971dd7f29'
  )
  and l.name = 'TransferSingle'
order by
  timestamp desc
limit
  1000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://sort.xyz/query/62d9720ad594d46c3ce8b2f2"&gt;View query results here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  View a total for the fundraise
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select
  SUM(CAST(l.params [5].value as integer)) as amount,
from
  ethereum.transaction_log l
where
  l.transaction_to IN (
    '0x402c84de2ce49af88f5e2ef3710ff89bfed36cb6',
    '0x735cab9b02fd153174763958ffb4e0a971dd7f29'
  )
  and l.name = 'TransferSingle'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://sort.xyz/query/62d972e3d594d46c3ce8b2f6"&gt;View query results here&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>ENS Registration Data with Sort</title>
      <dc:creator>Sort</dc:creator>
      <pubDate>Tue, 19 Jul 2022 23:04:33 +0000</pubDate>
      <link>https://forem.com/sort_xyz/ens-registration-data-with-sort-2nm</link>
      <guid>https://forem.com/sort_xyz/ens-registration-data-with-sort-2nm</guid>
      <description>&lt;p&gt;&lt;em&gt;Clickable examples in this post:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://sort.xyz/query/62d5f985667f5ef099bc6e81"&gt;Latest ENS registered domains&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sort.xyz/query/62d58a1e663a6a902f723ff0"&gt;ENS daily registrations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sort.xyz/query/62d587fcb8281dc0b0369755"&gt;ENS name taken query&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sort.xyz/query/62d5886e663a6a902f723fea"&gt;ENS names that start with 'ape'&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sort.xyz/query/62d6286b667f5ef099bc6e8d"&gt;ENS transactions for a wallet address&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ENS stands for &lt;strong&gt;E&lt;/strong&gt;thereum &lt;strong&gt;N&lt;/strong&gt;aming &lt;strong&gt;S&lt;/strong&gt;ervice, &lt;a href="https://docs.ens.domains"&gt;in their words&lt;/a&gt;: &lt;em&gt;&lt;strong&gt;'The Ethereum Name Service (ENS) is a distributed, open, and extensible naming system based on the Ethereum blockchain.'&lt;/strong&gt;&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;There is a large amount of ENS volume on Ethereum each month, we'll use Sort to dig into it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Building an ENS SQL query with Sort
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://sort.xyz"&gt;Sort&lt;/a&gt; allows you to write SQL statements for accessing Blockchain data. All responses are available through an API or can be exported to a spreadsheet.&lt;/p&gt;

&lt;p&gt;Let's start by writing our most basic SQL statement for ENS on &lt;a href="https://sort.xyz"&gt;Sort&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select
  *
from
  ethereum.transaction t
where
  t.to = '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5'
order by
  timestamp desc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Results all come back as a single _json column per row, with Sort's SQL flavor you must be specific about the fields requested. &lt;/p&gt;

&lt;p&gt;Let's expand on our query above to get more information:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select
  t.timestamp,
  t.value_eth eth_value,
  t.gas.transaction_fee.eth as eth_gas,
  t.function.name,
  t._id as hash
from
  ethereum.transaction t
where
  t.to = '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5'
order by
  timestamp desc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's cool! Now we get to see function names for each transaction.&lt;/p&gt;

&lt;p&gt;There is one more table to add to our query: &lt;em&gt;'transaction_log'&lt;/em&gt;. The &lt;em&gt;'transaction_log'&lt;/em&gt; table stores the outcome of the transaction, and is very useful in determining what is happening behind the scenes (e.g. maybe additional contracts are called from this transaction).&lt;/p&gt;

&lt;h2&gt;
  
  
  Latest ENS registered domains (using the 'registerWithConfig' function)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select
    params [1].value as name,
    params [5].value as expires,
    transaction_hash,
    timestamp,
    transaction_value_eth
from
    ethereum.transaction_log t
where
    t.transaction_to = '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5'
    and name = 'NameRegistered'
    and transaction_function_name = 'registerWithConfig'
    and function_address = '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5'
order by
    timestamp desc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://sort.xyz/query/62d5f985667f5ef099bc6e81"&gt;View results on sort.xyz&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ENS daily registrations
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select
  DATE(timestamp) as date,
  count(*) as number_of_registrations
from
  ethereum.transaction t
where
  t.to = '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5'
  and t.function.name = 'registerWithConfig'
group by
  date
order by
  date desc
limit
  30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;a href="https://sort.xyz/query/62d58a1e663a6a902f723ff0"&gt;View results on sort.xyz&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ENS name taken query
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select
    params [1].value as ens_name,
    params [5].value as expires,
    transaction_hash,
    timestamp,
    transaction_value_eth
from
    ethereum.transaction_log t
where
    t.transaction_to = '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5'
    and name = 'NameRegistered'
    and transaction_function_name = 'registerWithConfig'
    and function_address = '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5'
    and params [1].value = 'realdisco'
order by
    timestamp desc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;a href="https://sort.xyz/query/62d587fcb8281dc0b0369755"&gt;View Results on sort.xyz&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ENS names that start with 'ape'
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select
    params [1].value as ens_name,
    params [5].value as expires,
    transaction_hash,
    timestamp,
    transaction_value_eth
from
    ethereum.transaction_log t
where
    t.transaction_to = '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5'
    and name = 'NameRegistered'
    and transaction_function_name = 'registerWithConfig'
    and function_address = '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5'
    and REGEXP_LIKE(params [1].value, '^ape')
order by
    timestamp desc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;a href="https://sort.xyz/query/62d5886e663a6a902f723fea"&gt;View results on sort.xyz&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ENS transactions for a wallet address
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select
  t.timestamp,
  t.value_eth eth_value,
  t.gas.transaction_fee.eth as eth_gas,
  t.value_eth + t.gas.transaction_fee.eth as eth_total,
  t.function.name,
  t._id as hash
from
  ethereum.transaction t
where
  t.to in (
    '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5',
    '0xff252725f6122a92551a5fa9a6b6bf10eb0be035',
    '0x4976fb03c32e5b8cfe2b6ccb31c09ba78ebaba41',
    '0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85',
    '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
    '0x58774bb8acd458a640af0b88238369a167546ef2',
    '0x084b1c3c81545d370f3634392de611caabff8148'
  )
  and t."from" = '0x179a862703a4adfb29896552df9e307980d19285'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;a href="https://sort.xyz/query/62d6286b667f5ef099bc6e8d"&gt;View results on sort.xyz&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; we've been primarily querying the '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5' contract address, however, there are additional ENS contract addresses to consider (mentioned in the last query above).&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Primer for querying ENS data with Sort
&lt;/h2&gt;

&lt;p&gt;Hopefully this has been a useful primer for querying ENS data with Sort (and SQL!). Please don't hesitate to join our &lt;a href="https://discord.gg/sort"&gt;Discord&lt;/a&gt; (and ask lots of questions), visit &lt;a href="https://sort.xyz"&gt;sort.xyz&lt;/a&gt;, or visit &lt;a href="https://docs.sort.xyz"&gt;Sort documentation&lt;/a&gt; to learn more!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Magically import Moonbirds NFT sales into Google Sheets using Sort</title>
      <dc:creator>Sort</dc:creator>
      <pubDate>Thu, 28 Apr 2022 22:55:11 +0000</pubDate>
      <link>https://forem.com/sort_xyz/magically-import-moonbirds-nft-sales-into-google-sheets-using-sort-2556</link>
      <guid>https://forem.com/sort_xyz/magically-import-moonbirds-nft-sales-into-google-sheets-using-sort-2556</guid>
      <description>&lt;p&gt;Using the &lt;a href="https://docs.sort.xyz" rel="noopener noreferrer"&gt;Sort API&lt;/a&gt;, we can get any Ethereum transaction data into Google Sheets. Specifically for &lt;a href="https://etherscan.io/address/0x23581767a106ae21c074b2276d25e5c3e136a68b" rel="noopener noreferrer"&gt;Moonbirds&lt;/a&gt;, we can create a Google Sheet of nesting birds, sales, transfers, or any event that occurred on the blockchain for Moonbirds. For this tutorial, we'll focus on sales (across OpenSea, LooksRare, and Rarible exchanges, Coinbase coming soon).&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://docs.sort.xyz" rel="noopener noreferrer"&gt;Sort API&lt;/a&gt; allows us to look at individual blockchain transactions, or even perform millisecond aggregations (average, sum, etc, useful for charting). We'll focus on the individual transactions, and to simplify the tutorial, we'll use a Google Sheets plugin called &lt;a href="https://syncwith.com/" rel="noopener noreferrer"&gt;SyncWith&lt;/a&gt;, useful for sending API calls and storing the result in a Google Sheet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install SyncWith Google Sheets Add-on
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open a new Google Sheet, in the menu bar, click "Extensions" -&amp;gt; "Add-ons" -&amp;gt; "Get add-ons", search for "SyncWith" and install.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After the plugin is installed, visit the plugin via "Extensions" -&amp;gt; "SyncWith" -&amp;gt; "Manage Connections"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scroll to the very bottom of the "SyncWith" app and click "Custom"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a POST request with a JSON body&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fll96kbt9k1niv6yv0bsu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fll96kbt9k1niv6yv0bsu.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Create a Sort API Request
&lt;/h2&gt;

&lt;p&gt;Let's formulate our API request for Moonbirds data&lt;/p&gt;

&lt;p&gt;API endpoint:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;https://api.sort.xyz/v0/transaction&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;POST body:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "nft_event": "sale",
  "nft_address": "0x23581767a106ae21c074b2276D25e5C3e136a68b",
  "limit" : 50,
  "fields" : { "nft" : 1 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;nft_event: only look for sales&lt;/li&gt;
&lt;li&gt;nft_address: contract address of NFT&lt;/li&gt;
&lt;li&gt;limit: number of results to return from API request (max is 250, to go further back for historical data, use the &lt;a href="https://docs.sort.xyz/api-docs/reference/api-reference/transaction#parameters" rel="noopener noreferrer"&gt;"timestamp"&lt;/a&gt; field)&lt;/li&gt;
&lt;li&gt;fields: the responses will be large, let's only return the "nft" field (which includes all useful NFT data), and leave out other data such as logs and function parameters. To also include a timestamp, change this value to { "timestamp" : 1, "nft" : 1 }&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;(if you're familiar with Dune Analytics, think of Sort as an API-first version of Dune)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now put the API request in "SyncWith"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F26egfz6ouovxlsd6dwqn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F26egfz6ouovxlsd6dwqn.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click Preview&lt;/p&gt;

&lt;h2&gt;
  
  
  Shape the data result
&lt;/h2&gt;

&lt;p&gt;There is a list of results in the "result" field.&lt;/p&gt;

&lt;p&gt;Delete the "id", "status", and "object" fields (by clicking the trash can icon), click "expand" on the "result" field&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbhqimyqxmyclo9yb5ci4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbhqimyqxmyclo9yb5ci4.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, "expand" the "nft" field, click "Update".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5alvo7npnpzh8poo87qm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5alvo7npnpzh8poo87qm.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All done! You should have a list of the latest Moonbirds sales in Google Sheets!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpuayzqlxn9fzbbhpblhl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpuayzqlxn9fzbbhpblhl.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can continue further to expand the "attributes" column, specify different dates to get historical data (using the &lt;a href="https://docs.sort.xyz/api-docs/reference/api-reference/transaction#parameters" rel="noopener noreferrer"&gt;"timestamp" API field&lt;/a&gt;), or perform more detailed analysis.&lt;/p&gt;

&lt;h1&gt;
  
  
  More to come
&lt;/h1&gt;

&lt;p&gt;We can do other things too, such as looking for blockchain transactions that have executed the "toggleNesting" function (executed when a bird nests/un-nests):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "contract_address": 
  "0x23581767a106ae21c074b2276d25e5c3e136a68b",
  "contract_function": "toggleNesting",
  "limit" : 50
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hopefully this has been a good primer on using the &lt;a href="https://docs.sort.xyz" rel="noopener noreferrer"&gt;Sort API&lt;/a&gt; to get data into Google Sheets. Please visit us in &lt;a href="https://discord.gg/sort" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; to ask any questions, or stay tuned for more tutorials using Moonbirds transaction data.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Dissecting Trades in a Uniswap Transaction with the Sort API</title>
      <dc:creator>Sort</dc:creator>
      <pubDate>Tue, 19 Apr 2022 17:00:25 +0000</pubDate>
      <link>https://forem.com/sort_xyz/dissecting-trades-in-a-uniswap-transaction-with-the-sort-api-52jl</link>
      <guid>https://forem.com/sort_xyz/dissecting-trades-in-a-uniswap-transaction-with-the-sort-api-52jl</guid>
      <description>&lt;p&gt;The Uniswap contract, and mechanism behind the contract, is an &lt;a href="https://docs.uniswap.org/protocol/V2/concepts/protocol-overview/how-uniswap-works"&gt;interesting contract to study&lt;/a&gt;. We won't go through all &lt;a href="https://docs.uniswap.org/protocol/V2/concepts/protocol-overview/smart-contracts"&gt;Uniswap contracts&lt;/a&gt;, but just how a transaction works and visualizing the various coins that were exchanged to complete the transaction.&lt;/p&gt;

&lt;p&gt;We'll start with the contract address we're interested in: &lt;a href="https://etherscan.io/address/0x7a250d5630b4cf539739df2c5dacb4c659f2488d#code"&gt;0x7a250d5630b4cf539739df2c5dacb4c659f2488d&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's grab a few sample Uniswap transactions using the &lt;a href="https://docs.sort.xyz"&gt;Sort API&lt;/a&gt; to see what we can learn:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST https://api.sort.xyz/v0/transaction/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Body:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "contract_address" : "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
  "limit": 5
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The API call above will return the latest 5 Uniswap transactions, sorted by date descending. You may notice there are 5 primary Uniswap trading functions in the transactions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;swapExactTokensForTokens&lt;/li&gt;
&lt;li&gt;swapExactETHForTokens&lt;/li&gt;
&lt;li&gt;swapExactTokensForETH&lt;/li&gt;
&lt;li&gt;swapTokensForExactTokens&lt;/li&gt;
&lt;li&gt;swapETHForExactTokens&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's focus on 'swapExactTokensForTokens' and refine our &lt;a href="https://docs.sort.xyz"&gt;API call&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST https://api.sort.xyz/v0/transaction/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Body:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "contract_address" : "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
  "contract_function" : "swapExactTokensForTokens",
  "limit": 10
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's look at this transaction (you can follow along in your web browser by accessing &lt;a href="https://api.sort.xyz/v0/transaction/0xb5f32cd7524fc4f33fd656625bb98dfed5d1396f9c6580b82a9501a89c5569f5"&gt;this link&lt;/a&gt; for the transaction hash):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0xb5f32cd7524fc4f33fd656625bb98dfed5d1396f9c6580b82a9501a89c5569f5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://api.sort.xyz/v0/transaction/0xb5f32cd7524fc4f33fd656625bb98dfed5d1396f9c6580b82a9501a89c5569f5"&gt;View transaction information&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET https://api.sort.xyz/v0/transaction/0xb5f32cd7524fc4f33fd656625bb98dfed5d1396f9c6580b82a9501a89c5569f5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first thing we'll want to look at is the function name and parameters passed into it, this is located in the top level "function" field:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"function": {
  "name": "swapExactTokensForTokens",
  "params": [
      {
          "name": "amountIn",
          "value": "100000000000000000000",
          "type": "uint256"
      },
      {
          "name": "amountOutMin",
          "value": "37541924376765909332716544",
          "type": "uint256"
      },
      {
          "name": "path",
          "value": [
              {
                  "raw": "0xb1191f691a355b43542bea9b8847bc73e7abb137",
                  "name": "Kirobo",
                  "symbol": "KIRO"
              },
              {
                  "raw": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                  "name": "ETH",
                  "symbol": "ETH"
              },
              {
                  "raw": "0x1c7e83f8c581a967940dbfa7984744646ae46b29",
                  "name": "random",
                  "symbol": "RND"
              }
          ],
          "type": "address[]"
      },
      {
          "name": "to",
          "value": "0xeb9fbacfac3dceded5dc45daa3b319a9a1593dc7",
          "type": "address"
      },
      {
          "name": "deadline",
          "value": "1647875834",
          "type": "uint256"
      }
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By looking at the function call, you can get an idea of the transaction that is being requested:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trade "100000000000000000000" KIRO tokens for "37541924376765909332716544" RND tokens (you'll notice the numbers seem very large, this is because they have not been shifted X decimals places based on the contract value)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, let's look at the logs to see what actually happened. The logs can be found in the top level "logs" field:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"logs": {
  "functions": [
      {
          "name": "Transfer",
          "type": "event",
          "params": [
              {
                  "value": "0xeb9fbacfac3dceded5dc45daa3b319a9a1593dc7",
                  "name": "from",
                  "symbol": null,
                  "type": "address"
              },
              {
                  "value": "0x5cd136e8197be513b06d39730dc674b1e0f6b7da",
                  "name": "to",
                  "symbol": "UNI-V2",
                  "type": "address"
              },
              {
                  "value": "100000000000000000000",
                  "type": "uint256",
                  "name": "value"
              }
          ],
          "function_address": {
              "value": "0xb1191f691a355b43542bea9b8847bc73e7abb137",
              "name": "Kirobo",
              "symbol": "KIRO"
          }
      },
      {
          "name": "Approval",
          "type": "event",
          "params": [
              {
                  "value": "0xeb9fbacfac3dceded5dc45daa3b319a9a1593dc7",
                  "name": "owner",
                  "symbol": null,
                  "type": "address"
              },
              {
                  "value": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
                  "name": "spender",
                  "symbol": null,
                  "type": "address"
              },
              {
                  "value": "115792089237316195423570985008687907853269984665640564039357584007913129639935",
                  "type": "uint256",
                  "name": "value"
              }
          ],
          "function_address": {
              "value": "0xb1191f691a355b43542bea9b8847bc73e7abb137",
              "name": "Kirobo",
              "symbol": "KIRO"
          }
      },
      {
          "name": "Transfer",
          "type": "event",
          "params": [
              {
                  "value": "0x5cd136e8197be513b06d39730dc674b1e0f6b7da",
                  "name": "src",
                  "symbol": "UNI-V2",
                  "type": "address"
              },
              {
                  "value": "0x5449bd1a97296125252db2d9cf23d5d6e30ca3c1",
                  "name": "dst",
                  "symbol": "UNI-V2",
                  "type": "address"
              },
              {
                  "value": "4305548873194210",
                  "type": "uint256",
                  "name": "wad"
              }
          ],
          "function_address": {
              "value": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
              "name": "ETH",
              "symbol": "ETH"
          }
      },
      {
          "name": "Sync",
          "type": "event",
          "params": [
              {
                  "value": "5340477822266522423654997",
                  "type": "uint112",
                  "name": "reserve0"
              },
              {
                  "value": "230624450502417018204",
                  "type": "uint112",
                  "name": "reserve1"
              }
          ],
          "function_address": {
              "value": "0x5cd136e8197be513b06d39730dc674b1e0f6b7da",
              "name": "Uniswap V2",
              "symbol": "UNI-V2"
          }
      },
      {
          "name": "Swap",
          "type": "event",
          "params": [
              {
                  "value": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
                  "name": "sender",
                  "symbol": null,
                  "type": "address"
              },
              {
                  "value": "100000000000000000000",
                  "type": "uint256",
                  "name": "amount0In"
              },
              {
                  "value": "0",
                  "type": "uint256",
                  "name": "amount1In"
              },
              {
                  "value": "0",
                  "type": "uint256",
                  "name": "amount0Out"
              },
              {
                  "value": "4305548873194210",
                  "type": "uint256",
                  "name": "amount1Out"
              },
              {
                  "value": "0x5449bd1a97296125252db2d9cf23d5d6e30ca3c1",
                  "name": "to",
                  "symbol": "UNI-V2",
                  "type": "address"
              }
          ],
          "function_address": {
              "value": "0x5cd136e8197be513b06d39730dc674b1e0f6b7da",
              "name": "Uniswap V2",
              "symbol": "UNI-V2"
          }
      },
      {
          "name": "Transfer",
          "type": "event",
          "params": [
              {
                  "value": "0x5449bd1a97296125252db2d9cf23d5d6e30ca3c1",
                  "name": "from",
                  "symbol": "UNI-V2",
                  "type": "address"
              },
              {
                  "value": "0xeb9fbacfac3dceded5dc45daa3b319a9a1593dc7",
                  "name": "to",
                  "symbol": null,
                  "type": "address"
              },
              {
                  "value": "37579466301142675242049261",
                  "type": "uint256",
                  "name": "value"
              }
          ],
          "function_address": {
              "value": "0x1c7e83f8c581a967940dbfa7984744646ae46b29",
              "name": "random",
              "symbol": "RND"
          }
      },
      {
          "name": "Sync",
          "type": "event",
          "params": [
              {
                  "value": "18139246877011718508631881984",
                  "type": "uint112",
                  "name": "reserve0"
              },
              {
                  "value": "2076317830422973219",
                  "type": "uint112",
                  "name": "reserve1"
              }
          ],
          "function_address": {
              "value": "0x5449bd1a97296125252db2d9cf23d5d6e30ca3c1",
              "name": "Uniswap V2",
              "symbol": "UNI-V2"
          }
      },
      {
          "name": "Swap",
          "type": "event",
          "params": [
              {
                  "value": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
                  "name": "sender",
                  "symbol": null,
                  "type": "address"
              },
              {
                  "value": "0",
                  "type": "uint256",
                  "name": "amount0In"
              },
              {
                  "value": "4305548873194210",
                  "type": "uint256",
                  "name": "amount1In"
              },
              {
                  "value": "37579466301142675242049261",
                  "type": "uint256",
                  "name": "amount0Out"
              },
              {
                  "value": "0",
                  "type": "uint256",
                  "name": "amount1Out"
              },
              {
                  "value": "0xeb9fbacfac3dceded5dc45daa3b319a9a1593dc7",
                  "name": "to",
                  "symbol": null,
                  "type": "address"
              }
          ],
          "function_address": {
              "value": "0x5449bd1a97296125252db2d9cf23d5d6e30ca3c1",
              "name": "Uniswap V2",
              "symbol": "UNI-V2"
          }
      }
  ],
  "num_logs": 8,
  "status": 1
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A few notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The "status" field is 1 or 0, and tells us whether the transaction was successful.&lt;/li&gt;
&lt;li&gt;The "function_address" field tells us on which contract the function was executed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We can see 8 function calls. There is a transfer of "KIRO" to the contract from the initiator (Transfer/Approval), then swap from "KIRO" to "ETH", then the final swap from "ETH" to "RND". The "RND" is then sent back to the initiator of the request. &lt;/p&gt;

&lt;p&gt;We can spend a lot more time going through each function in-depth, this tutorial was meant to be a primer to get you started walking through transactions and using the &lt;a href="http://docs.sort.xyz"&gt;Sort API&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Feel free to ask more questions on our &lt;a href="https://discord.gg/sort"&gt;Discord&lt;/a&gt;, or continue on to the &lt;a href="http://docs.sort.xyz"&gt;Sort API documentation&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Charting OpenSea Volume for NFTs: Dune vs Sort</title>
      <dc:creator>Sort</dc:creator>
      <pubDate>Fri, 15 Apr 2022 15:32:54 +0000</pubDate>
      <link>https://forem.com/sort_xyz/charting-opensea-volume-for-nfts-dune-vs-sort-52km</link>
      <guid>https://forem.com/sort_xyz/charting-opensea-volume-for-nfts-dune-vs-sort-52km</guid>
      <description>&lt;p&gt;&lt;a href="http://sort.xyz"&gt;Sort&lt;/a&gt; is an API-first version of Dune. What Sort lacks in functionality compared to Dune, it makes up for in speed and UI customization. &lt;a href="https://docs.sort.xyz"&gt;The Alpha version of the Sort API&lt;/a&gt; was released on April 12th, 2022, for any bugs or feature enhancement requests, please feel free to jump into the &lt;a href="https://discord.gg/sort"&gt;Discord&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;The Sort API is also open and free, and doesn't require any API keys.&lt;/p&gt;

&lt;p&gt;Dune uses SQL, which is a powerful query language that has been around since the 1970s. Although SQL is powerful, it can become complex over time, especially as the number of tables and relationships between those tables grow. Here is the Dune SQL query for OpenSea volume (reported by their &lt;a href="https://dune.xyz/rchen8/opensea"&gt;most popular OpenSea dashboard&lt;/a&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WITH token AS
  (SELECT DISTINCT call_tx_hash AS tx_hash,
                   CASE
                       WHEN addrs[7] = '\x0000000000000000000000000000000000000000' THEN '\xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
                       ELSE addrs[7]
                   END AS token_address
   FROM opensea."WyvernExchange_call_atomicMatch_"
   WHERE (addrs[4] = '\x5b3256965e7c3cf26e11fcaf296dfc8807c01073'
          OR addrs[11] = '\x5b3256965e7c3cf26e11fcaf296dfc8807c01073')
     AND call_success),
     excluded_txns AS
  (SELECT call_tx_hash
   FROM opensea."WyvernExchange_call_atomicMatch_"
   WHERE (addrs[4] = '\x5b3256965e7c3cf26e11fcaf296dfc8807c01073'
          OR addrs[11] = '\x5b3256965e7c3cf26e11fcaf296dfc8807c01073')
     AND call_success
     AND call_block_time &amp;gt; '2022-01-21'
   GROUP BY 1
   HAVING count(DISTINCT CASE
                             WHEN addrs[7] = '\x0000000000000000000000000000000000000000' THEN '\xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
                             ELSE addrs[7]
                         END) &amp;gt; 1)
SELECT date_trunc('day', evt_block_time) AS DAY,
       SUM((om.price / 10^erc.decimals) * p.price) AS usd
FROM opensea."WyvernExchange_evt_OrdersMatched" om
INNER JOIN token ON token.tx_hash = om.evt_tx_hash
INNER JOIN erc20.tokens erc ON token.token_address = erc.contract_address
INNER JOIN prices.usd p ON p.minute = date_trunc('minute', evt_block_time)
AND maker != taker
AND token.token_address = p.contract_address
AND date_trunc('day', p.minute) &amp;gt; date_trunc('day', now()) - interval '90 days'
AND evt_tx_hash not in
  (SELECT *
   FROM excluded_txns)
GROUP BY 1
ORDER BY 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simple right?&lt;/p&gt;

&lt;p&gt;Sort takes a different approach, automatically storing every fully decoded blockchain transaction (logs and all) in a single location, allowing for very simple queries. We can form an API request to Sort for OpenSea volume data just with the contract address and function name. If you're not familiar with the &lt;a href="https://etherscan.io/address/0x7f268357a8c2552623316e2562d90e642bb538e5"&gt;OpenSea contract&lt;/a&gt;, sales are made via the 'atomicMatch_' function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST https://api.sort.xyz/v0/transaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;POST body:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "contract_address": "0x7f268357A8c2552623316e2562D90e642bB538E5",
  "contract_function": "atomicMatch_",
  "aggregate" : {
    "op": "sum",
    "by": "hour",
    "field": "value.eth"
  },
  "limit": 24
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The API call above matches on the "0x7f268357A8c2552623316e2562D90e642bB538E5" contract address (OpenSea) and the "atomicMatch_" function (used when an NFT trade is performed). The "aggregate" field sums up the "value.eth" field by hour, and returns the last 24 hours of data based on the "limit" specified.&lt;/p&gt;

&lt;p&gt;The API is new, and you may notice it doesn't do a few things the Dune API does, such as return results in US dollars. However, we're working fast and hope to catch up in functionality very quickly. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: When an OpenSea transaction is performed in WETH (instead of ETH), the value field is 0, however, Sort stores the ETH equivalent of WETH in the "nft.value_eth" field (along with ETH), which can also be used for aggregations.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;View the complete Javascript example for charting OpenSea Volume here:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/snakeeyes000/embed/YzYJjWv?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;We hope you'll continue on to learn more about the &lt;a href="https://docs.sort.xyz"&gt;Sort API&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Tutorial: Adding Analytics to the CryptoPunks V1 Site</title>
      <dc:creator>Sort</dc:creator>
      <pubDate>Wed, 13 Apr 2022 18:29:17 +0000</pubDate>
      <link>https://forem.com/sort_xyz/tutorial-adding-analytics-to-the-cryptopunks-v1-site-4ad0</link>
      <guid>https://forem.com/sort_xyz/tutorial-adding-analytics-to-the-cryptopunks-v1-site-4ad0</guid>
      <description>&lt;p&gt;For an NFT project, it can be hard to add items like recent sales and charts to a website. There are existing NFT APIs; however most require API keys that you wouldn't want to expose to your users. Let's use the fully open (and free) &lt;a href="https://docs.sort.xyz"&gt;Sort API&lt;/a&gt; to add analytics to the CryptoPunks V1 website using only client-side Javascript.&lt;/p&gt;

&lt;p&gt;We'll include the full example (which you can inspect to see the code) below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MJiC5nEn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jv789v5zzwn579v6ngnz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MJiC5nEn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jv789v5zzwn579v6ngnz.png" alt="Screenshot of completed site" width="800" height="548"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding a real-time sales feed
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;First, we are going to query the &lt;a href="https://docs.sort.xyz/api-docs/reference/api-reference/transaction"&gt;transaction API&lt;/a&gt; using a POST call to get some information about the punks contract&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST https://api.sort.xyz/v0/transaction

BODY:
{
      "nft_event": "sale",
      "nft_address": "0x282bdd42f4eb70e7a9d9f40c8fea0825b7f68c5d",
      "limit" : 10,
      "timestamp" : "gte:2022-04-01",
      "fields" : { "logs" : 0, "function" : 0 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;nft_event - only look for sales&lt;/li&gt;
&lt;li&gt;nft_address - use the CryptoPunks V1 contract address&lt;/li&gt;
&lt;li&gt;limit - get the latest 10 results&lt;/li&gt;
&lt;li&gt;timestamp - only search after 2022-04-01 (greater than or equal to, gte)&lt;/li&gt;
&lt;li&gt;fields - omit 2 very long fields from the response to increase performance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Write our Javascript&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var sortxyz_result = await axios.post('https://api.sort.xyz/v0/transaction',
    {
      "nft_event": "sale",
      "nft_address": "0x282bdd42f4eb70e7a9d9f40c8fea0825b7f68c5d",
      "limit" : 10,
      "timestamp" : "gte:2022-04-01",
      "fields" : { "logs" : 0, "function" : 0 }
    }
);

let sortxyz_data = sortxyz_result.data.result;
for (var i=0; i&amp;lt;sortxyz_data.length; i++) {
  // Fill in our HTML
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice the field values from the API response we'll use in our HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; new_sale.innerHTML = 
    "&amp;lt;div class=\"row\"&amp;gt; " + 
      "&amp;lt;div class=\"col\"&amp;gt; " +
        "&amp;lt;img width=\"75\" class=\"lazyload\" src=\""+sortxyz_data[i].nft.image_url+"\" /&amp;gt;" +
      "&amp;lt;/div&amp;gt;" +
      "&amp;lt;div class=\"col\"&amp;gt;" +
        "&amp;lt;div&amp;gt;" + sortxyz_data[i].nft.value_eth + "&amp;lt;/div&amp;gt;" +
        "&amp;lt;div&amp;gt;#" + sortxyz_data[i].nft.token_index + "&amp;lt;/div&amp;gt;" +
      "&amp;lt;/div&amp;gt;" +
    "&amp;lt;/div&amp;gt;";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;nft.image_url - The URL to the image of the punk sold&lt;/li&gt;
&lt;li&gt;nft.value_eth - Value of sale in ETH (no conversions needed)&lt;/li&gt;
&lt;li&gt;nft.token_index - The ID of the punk sold&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Display our feed&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--myneAeWy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bd0epf3p2ssui91hjmcu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--myneAeWy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bd0epf3p2ssui91hjmcu.png" alt="CryptoPunks V1 Sales Feed" width="428" height="756"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding a scatter plot chart for recent sales
&lt;/h2&gt;

&lt;p&gt;We'll use the same API call from the previous sales feed, however, we'll use the timestamp from the transaction in our bubble/scatter plot chart.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST https://api.sort.xyz/v0/transaction

BODY:
{
      "nft_event": "sale",
      "nft_address": "0x282bdd42f4eb70e7a9d9f40c8fea0825b7f68c5d",
      "limit" : 10,
      "timestamp" : "gte:2022-04-01",
      "fields" : { "logs" : 0, "function" : 0 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use the timestamp in our chart&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let sortxyz_data = sortxyz_result.data.result;
for (var i=0; i&amp;lt;sortxyz_data.length; i++) {
  let chart_item = {
      "y": sortxyz_data[i].nft.value_eth,
      "date" : sortxyz_data[i].timestamp,
      "value": sortxyz_data[i].nft.value_eth,
      "image": sortxyz_data[i].nft.image_url,
      "punk" : sortxyz_data[i].nft.token_index
  }
  ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;For the date of the transaction, we'll use 'sortxyz_data[i].timestamp'&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Add our chart&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zQtB6p7W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0uqyuxzf15t33pywukki.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zQtB6p7W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0uqyuxzf15t33pywukki.png" alt="Recent sales chart" width="800" height="612"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding a chart for average sale price
&lt;/h2&gt;

&lt;p&gt;We'll need to aggregate data to get the average CryptoPunks V1 sales price per day.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BODY:
{
      "nft_event": "sale",
      "nft_address": "0x282bdd42f4eb70e7a9d9f40c8fea0825b7f68c5d",
      "aggregate" : { "op" : "avg", "by" : "day", "field" : "nft.value_eth" },
      "limit" : 10,
      "timestamp" : "gte:2022-04-01"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;nft_event, nft_address - same as before, no changes here&lt;/li&gt;
&lt;li&gt;aggregate - get the avg value of the field 'nft.value_eth', bucketed by day&lt;/li&gt;
&lt;li&gt;limit - last 10 results&lt;/li&gt;
&lt;li&gt;timestamp - start at 2022-04-01&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Parsing the aggregation API result&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let sortxyz_data = sortxyz_result.data.result;
let position = 0;
for (var i=0; i&amp;lt;sortxyz_data.length; i++) {
    let chart_item = {
      "y": sortxyz_data[i].total,
      "x": position,
      "date" : sortxyz_data[i].timestamp
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result from this API call has a different format from previous API calls, since we're aggregating data instead of returning enriched transactions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add our chart&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3GhpCPBR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bol8zjpntihnr0ohjhts.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3GhpCPBR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bol8zjpntihnr0ohjhts.png" alt="Average Daily Price" width="800" height="624"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Bonus: Add contract events
&lt;/h2&gt;

&lt;p&gt;We can add additional information, such as contract events (not shown within the mockups).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST https://api.sort.xyz/v0/transaction

BODY:
{
      "contract_address": "0x282bdd42f4eb70e7a9d9f40c8fea0825b7f68c5d",
      "limit" : 10
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Putting it all together
&lt;/h2&gt;

&lt;p&gt;Access the &lt;a href="https://sort.xyz/mockups/punksv1.html"&gt;completed example here&lt;/a&gt; (view source code to see complete Javascript examples). &lt;/p&gt;

&lt;p&gt;View the &lt;a href="https://docs.sort.xyz"&gt;Sort API docs&lt;/a&gt; to learn more, and create even more complex aggregations and queries.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
