<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Charles Crain on Medium]]></title>
        <description><![CDATA[Stories by Charles Crain on Medium]]></description>
        <link>https://medium.com/@charleschain?source=rss-c4aaf1826f3d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KdeuLnpgl91GFUnlKHTQlQ.jpeg</url>
            <title>Stories by Charles Crain on Medium</title>
            <link>https://medium.com/@charleschain?source=rss-c4aaf1826f3d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 18:07:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@charleschain/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Integrating with 0x]]></title>
            <link>https://medium.com/superrare/integrating-with-0x-f037faf7e224?source=rss-c4aaf1826f3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f037faf7e224</guid>
            <category><![CDATA[erc20]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[0x]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[erc721]]></category>
            <dc:creator><![CDATA[Charles Crain]]></dc:creator>
            <pubDate>Fri, 11 Jan 2019 18:26:50 GMT</pubDate>
            <atom:updated>2019-01-12T17:01:36.196Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Poz1VxdH87YcCcR7074sVg.png" /></figure><p>Our mission at Pixura is to make it easy to publish, sell and trade virtual goods. Since launching SuperRare last year, over $50,000 has been earned by digital artists through our beta smart contract. Next, we’re releasing of the mainnet beta of the Pixura platform, allowing anyone to easily launch a branded storefront and sell NFTs.</p><p>Looking to the future, we’ve thought about how best to maintain and scale a marketplace platform that can offer users the most valuable real-world features as the Ethereum ecosystem evolves. The 0x team continues to prove that they’re one of the best in the space, and have built an impressive, feature-rich protocol for trading tokens on Ethereum. So, we’re happy to announce that the Pixura is integrating with 0x!</p><p>We’re really excited to start building features with 0x-powered capabilities such as arbitrary ERC20 support for marketplaces (enabling Dai stablecoin purchases), swapping ERC721 tokens as a trade, and the ability for new users to have their gas paid for them. And, the 0x team ships code at an eye-watering pace, so we look forward to working with the team as they improve and continue to build out the protocol in 2019.</p><p>Our indexer is now tracking events on the 0x smart contracts. Feel free to check out our <a href="https://livenet-api.pixura.io/graphiql">GraphQL API</a> and explore activity happening on the 0x exchange.</p><p>As an example, one can easily find the number of filled orders to a specific ERC20 contract. Here’s a query to get the total orders filled where MKR is sold:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/be7e40a57a89658cd6b35a1b3f282b56/href">https://medium.com/media/be7e40a57a89658cd6b35a1b3f282b56/href</a></iframe><p>Here we are using the condition argument to get orders that have a matching makerAssetData.</p><p>For those unfamiliar with 0x orders and how they work, the makerAssetData indicates:</p><ol><li>the type of asset the maker(seller) wants to sell, 0xf47261b0 for ERC20 tokens.</li><li>the address of the ERC20 contract the maker(seller) wants to trade.</li></ol><p>For more details checkout the <a href="https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#assetproxy">0x specification</a>.</p><p>The response to the query at the time writing this post is:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/68960b74e6f2a5ec33a3b8b05a276715/href">https://medium.com/media/68960b74e6f2a5ec33a3b8b05a276715/href</a></iframe><p>As you can see we get the total count of filled orders selling MKR tokens.</p><p>Another example would be a query for a relayer to get the latest canceled orders. One might do this to see if any of the hashes of the canceled orders match hashes in their order book:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/596c480d1029f2e56f805ec01e61b733/href">https://medium.com/media/596c480d1029f2e56f805ec01e61b733/href</a></iframe><p>In this query I am asking for the last 3 canceled orders and ordering the results by the block timestamp.</p><p>The query currently responds with:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eae2a47bb1b96f0e50cff792cbf9b2ed/href">https://medium.com/media/eae2a47bb1b96f0e50cff792cbf9b2ed/href</a></iframe><p>This is just the beginning of our integration with 0x. We are currently adding our own relayer that will expose orders via the standard relayer API, as well as, the Pixura GraphQL API. The advantage to the GraphQL API being the ability to join orders details on specific ERC721/ERC20 token data.</p><p>We support arbitrary ERC20 and ERC721 contracts; any contract compliant with these token standards can be indexed within Pixura to be accessible via the GraphQL API and up to date changes through web socket connections.</p><p>The indexer maintains the state of ERC721/ERC20 tokens including arbitrary JSON for token metadata. This makes querying tokens, token metadata, and historical data quite simple.</p><p>To join the conversation and stay up-to-date join our <a href="https://t.me/pixura">Telegram</a>.</p><p>With love from the Pixura team.</p><p>Special thanks to the <a href="https://0x.org/about/team">0x team,</a> <a href="https://github.com/benjie">benjie</a> for his work on <a href="http://graphile.org/postgraphile">graphile</a>, the <a href="https://www.foam.space/">FOAM</a> team for their work on <a href="https://github.com/f-o-a-m/hs-web3">hs-web3</a> and <a href="https://github.com/valderman">valderman</a> for the work on s<a href="https://github.com/valderman/selda">elda</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f037faf7e224" width="1" height="1" alt=""><hr><p><a href="https://medium.com/superrare/integrating-with-0x-f037faf7e224">Integrating with 0x</a> was originally published in <a href="https://medium.com/superrare">SuperRare 💎</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Batching 300 Ethereum Transactions for NFTs]]></title>
            <link>https://medium.com/superrare/batching-300-ethereum-transactions-for-nfts-76430d05edd6?source=rss-c4aaf1826f3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/76430d05edd6</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Charles Crain]]></dc:creator>
            <pubDate>Thu, 06 Sep 2018 17:45:22 GMT</pubDate>
            <atom:updated>2018-09-06T17:45:22.861Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IGV9-T3-HOXoofbI" /><figcaption>Artworks by Robbie Barrat to be tokenized on Ethereum</figcaption></figure><p>At the end of July, the Pixura team had a great time attending the Christie’s Art + Tech Summit in London. As a way fun way to introduce the concept of digital art collecting, we <a href="https://medium.com/@SuperRare_co/christies-blockchain-summit-giving-away-300-unique-digital-fragments-of-an-artwork-d74df494aaab">gave away</a> 300 unique, AI generated digital artworks by Robbie Barrat on <a href="https://superrare.co/">SuperRare</a>, our CryptoArt platform. This post explores the technical challenges we faced in creating and transferring the 300 non-fungible tokens that represent the artworks.</p><h3>The UX Challenge:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*bHGAYDXs30zRZTa1" /></figure><p>As with most dapps, building a great user experience into SuperRare has been a challenge, and something we’re always trying to improve. But, once an artist has become accustomed to signing transactions, tokenizing a single NFT is straightforward. Fill out a form, accept a MetaMask transaction, and boom! They’ve got a shiny new token with their rad artwork. Unfortunately, this UX flow falls apart once you get into the 10+ range of tokens you’d like to create. With 600 transactions to create and sign, manually approving each transactions was not an option.</p><h3>The Solution:</h3><p>The solution to our problem was a bulk tokenizer and transfer tool, which batch uploads tokens from a CSV. The CSV describes the tokens to create and the new owner addresses to transfer to. The creator runs the program from their own computer, enters their seed phrase when prompted, and so begins the tokenization process. A couple hours later you’ve got 300 tokens distributed to 300 wallets!</p><h3>Lessons Learned:</h3><h4>1. Sequential Transactions</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NV-3KxNr3ySSfEdNk2vnpQ.png" /></figure><p>When batch-running any transactions on a blockchain, one must keep in mind that sequencing the transactions is really important. Tools such as MetaMask will handle this for you and keep the low-level transaction details hidden. With MetaMask not an option, we found ourselves manually building and sending the transactions. In an attempt to “optimize” this process, we sent each transaction to the node with a 100ms delay. Once sent, we verified that the node received the transaction. To those familiar with Ethereum, the potential issues with this approach may be obvious. To those who are not, the problem is with the transaction <a href="https://kb.myetherwallet.com/transactions/what-is-nonce.html">nonce</a>. Since the eth-node is forwarding all the transactions it receives to other nodes, there’s no guarantee that the transaction with nonce 4 will be mined before the transaction with nonce 5. This would invalidate the transaction with a nonce of 4. So much for optimization :(. To deal with the problem, we sequentially waited for transactions to be mined before sending off the next one.</p><p>This is by no means the best solution, but it is the solution that worked for us given our time constraints. Our next iteration of the tool will have robust parallelization to handle and resubmit transactions with valid nonces..</p><h4>2. Testing Locally vs Live on a Testnet</h4><p>Once you’ve overcome the hurdle of getting a local node set up, (check out <a href="https://github.com/f-o-a-m/cliquebait">this awesome tool</a> if you’re looking to do some local eth development) it’s pretty easy to start developing your dapp. Too often, I find myself overly confident once I have my dapp working on a local Ethereum network. Network delay is all too real and has shaken my confidence when a perfectly performing application suddenly reveals bugs due to unforeseen edge cases. I would like to stress getting the MVP of your dapp/smart contract onto one of the testnets as soon as possible. The previous section was one of those issues that we only discovered once we were deployed on the Ropsten testnet. The sooner you get your dapp on a testnet, the sooner you are be able to handle the trickier, distributed system problems that crop up.</p><h4>3. Two batches of 300</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*uDOgQkBEKQLiQiyX" /></figure><p>This last section describes the foolishness on my part when we ran the bulk tokenizer for the giveaway. All 300 transactions to create the tokens went smoothly; it took about two hours–but successful nonetheless. The second batch of transactions for the transfers did not work. Not a single transaction went through. All the transactions were rejected due to invalid nonces. Quickly, it became clear that I was reusing the same nonce I started with for the creation transactions rather than bumping that nonce up by 300 as we needed. The lesson learned here is to always check your nonces or, an even better solution, move the responsibility to someone else’s library that has spent the time making all the mistakes for you.</p><h3>Conclusion</h3><p>Ethereum and blockchains in general are amazing and powerful, and the developer tooling has come a long way, but bulk or batch transactions are tricky and the tooling could still use some work. A summary of advice for fellow dapp devs:</p><ol><li>Go to a testnet ASAP</li><li>Leverage existing libraries as much as possible to handle lower level transaction logic</li><li>If you are doing things yourself, check your nonces!!</li></ol><h3>Get involved</h3><p>At Pixura, we’re passionate about non-fungible tokens and the future of digital assets. We’re building the tools to empower anyone to painlessly build an NFT marketplace, starting with easy-to-use developer APIs. If you’re interested in starting a business selling digital goods on the blockchain, hit us up!</p><ul><li>Say 👋 to the team — hello@pixura.io</li><li>Follow us on <a href="https://twitter.com/pixura_io">Twitter</a></li><li>Sign up for our <a href="https://pixura.us15.list-manage.com/subscribe?u=5dfce9177b2176b567e783c36&amp;id=6bf850e75d">newsletter</a></li><li>Join <a href="https://superrare.co/">SuperRare</a>, our CryptoArt community</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76430d05edd6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/superrare/batching-300-ethereum-transactions-for-nfts-76430d05edd6">Batching 300 Ethereum Transactions for NFTs</a> was originally published in <a href="https://medium.com/superrare">SuperRare 💎</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>