<?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 laitmiro on Medium]]></title>
        <description><![CDATA[Stories by laitmiro on Medium]]></description>
        <link>https://medium.com/@laitmiro?source=rss-ae82d83169a0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FIs4m9wVFhS-1-S7pmrikQ.jpeg</url>
            <title>Stories by laitmiro on Medium</title>
            <link>https://medium.com/@laitmiro?source=rss-ae82d83169a0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 11:26:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@laitmiro/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[Journey! Ethereum to Solana (trip 1) : ERC20 to SPL token.]]></title>
            <link>https://medium.com/@laitmiro/journey-ethereum-to-solana-trip-1-erc20-to-spl-token-73c575ff4c59?source=rss-ae82d83169a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/73c575ff4c59</guid>
            <dc:creator><![CDATA[laitmiro]]></dc:creator>
            <pubDate>Wed, 10 Nov 2021 11:29:23 GMT</pubDate>
            <atom:updated>2025-07-14T14:48:38.698Z</atom:updated>
            <content:encoded><![CDATA[<h3>Comparison: ERC20 vs SPL token.</h3><p>Do you know about Ethereum?</p><p>Ok, Just joking.</p><p>Ethereum is a well-known blockchain network which many developers and users have been focusing on, while Solana is a new but rapidly growing one that has amazingly high transaction performance but is a bit complex to develop programs(We say the term of “smart contract” of Ethereum as “program” for Solana.).</p><p>They have different ways to manage accounts, data, programs(smart contracts for Ethereum), and so on, so developers who have been using solidity for smart contract development, usually struggle to understand the program in Rust at the first time.</p><p>They would try to know how to develop, build and deploy smart contracts, mint new tokens and send transactions on Solana, but they would notice that it has big differences with Ethereum. The reason is that Solana has its own original way to provide super high performance. You can read about that in <a href="https://medium.com/coinmonks/from-ethereum-smart-contracts-to-solana-programs-two-common-security-pitfalls-and-beyond-ea5b919ade1c">this blog</a>.</p><p>Then let’s start our journey from ERC20 to SPL, instead of feeling complaints about the difference.</p><p><strong>ERC20 in Ethereum</strong></p><p>As you know, on the Ethereum network, we create a new ERC20 token by writing and deploying a smart contract which implements the IERC20 interface.</p><pre>interface <strong>IERC20 </strong>{</pre><pre>  function <strong>totalSupply</strong>() external view returns (uint256);</pre><pre>  function <strong>balanceOf</strong>(address account) external view returns (uint256);</pre><pre>  function <strong>transfer</strong>(address recipient, uint256 amount) external returns (bool);</pre><pre>  function <strong>allowance</strong>(address owner, address spender) external view returns (uint256);</pre><pre>  function <strong>approve</strong>(address spender, uint256 amount) external returns (bool);</pre><pre>  function <strong>transferFrom</strong>(address sender, address recipient, uint256 amount) external returns (bool);</pre><pre>  event <strong>Transfer</strong>(address indexed from, address indexed to, uint256 value);</pre><pre>  event <strong>Approval</strong>(address indexed owner, address indexed spender, uint256 value);</pre><pre>}</pre><p>Ethereum understands the contract which implements the IERC20 interface as an ERC20 token and all data which represents balance, approval, and supply appears to like being stored in the memory of the contract so the code is easy to understand.</p><p><strong>SPL token in Solana</strong></p><p>Like the ERC20 token in Ethereum, the SPL token is a fungible token that is being used on the Solana network.</p><p>In the case of Solana, we don’t create a new program to create a new token. We just use the <a href="https://spl.solana.com/token">spl-token program</a> which is running on the Solana network and helping users to create and manage SPL tokens. Spl-token is an open-source program and we can get an image of how it mints and manages new tokens from its <a href="https://github.com/solana-labs/solana-program-library/tree/master/token">source code</a>.</p><p>In other words, we don’t deploy a new program but call instructions of the spl-token program to do mint, transfer and approve, etc… You can see what instructions the spl-token program has in the <strong>instructions.rs</strong> file in the source code.</p><pre>pub enum <strong>TokenInstruction </strong>{<br>    <strong>InitializeMint </strong>{<br>        decimals: u8,<br>        mint_authority: Pubkey,<br>        freeze_authority: COption&lt;Pubkey&gt;,<br>    },<br>    <strong>InitializeAccount</strong>,<br>    <strong>InitializeMultisig </strong>{<br>        m: u8,<br>    },<br>    <strong>Transfer </strong>{<br>        amount: u64,<br>    },<br>    <strong>Approve </strong>{<br>        amount: u64,<br>    },<br>    <strong>Revoke</strong>,<br>    <strong>SetAuthority </strong>{<br>        authority_type: AuthorityType,<br>        new_authority: COption&lt;Pubkey&gt;,<br>    },<br>    <strong>MintTo </strong>{<br>        amount: u64,<br>    },<br>    <strong>Burn </strong>{<br>        amount: u64,<br>    },<br>    <strong>CloseAccount</strong>,<br>    <strong>FreezeAccount</strong>,<br>    <strong>ThawAccount</strong>,</pre><pre>...</pre><pre>}</pre><p>We can consider that the instructions of Solana programs are similar to the functions of Ethereum smart contracts. We can interact with programs by calling the instructions of that program.</p><p>And now what?</p><p>Yeah, we need to know how to call the instructions of the spl-token program. There are mainly three methods to interact with the spl-token program represented below. Note that the spl-token program is already running on the Solana network and you don’t need to deploy it.</p><ol><li>While we can say that the program on the Solana network is the back-end part, we can use <a href="https://www.npmjs.com/package/@solana/spl-token"><strong>solana/spl-token.js</strong></a> in the front-end part to interact with the back-end.</li><li>We can also interact with the spl-token program without any front-end part, simply by using command lines. We can mint, transfer, approve, and that kind of thing via a prompt! Of course, some installations are required to use the CLI tools. You can read about that <a href="https://spl.solana.com/token#command-line-utility">here</a>.</li><li>Like other networks, Solana also provides <a href="https://docs.solana.com/wallet-guide/web-wallets">web wallets</a>, and you can mint a new token and transfer it by using the wallets. In another word, you can interact with the spl-token program by using wallets. Other kinds of <a href="https://docs.solana.com/wallet-guide">effective wallets</a> are also supported on Solana as well.</li></ol><p>That’s it. Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73c575ff4c59" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>