<?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 v v on Medium]]></title>
        <description><![CDATA[Stories by v v on Medium]]></description>
        <link>https://medium.com/@angel_145?source=rss-69a978908abf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*fpxAWHNjdF4JL2w3.</url>
            <title>Stories by v v on Medium</title>
            <link>https://medium.com/@angel_145?source=rss-69a978908abf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 14:53:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@angel_145/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[Questions — ERC20]]></title>
            <link>https://medium.com/@angel_145/questions-erc20-c1ebe6f45348?source=rss-69a978908abf------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1ebe6f45348</guid>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[v v]]></dc:creator>
            <pubDate>Sat, 30 Mar 2019 12:59:02 GMT</pubDate>
            <atom:updated>2019-03-30T22:44:53.594Z</atom:updated>
            <content:encoded><![CDATA[<h3>Questions — ERC20</h3><p><strong>- (Updated) Transactions to different accounts (one fails and another one goes thru)</strong></p><p>After I deployed our contract again (with truffle), I was able to send tokens successfully (with Metamask) to one of my accounts but transactions to the other one always fail.</p><p>All three accounts are under one Metamask account. The one that fails doesn’t have any ETH in it but does that matter?</p><p>You can check the transactions here:</p><p><a href="https://rinkeby.etherscan.io/address/0xc7e5bd1e1b91b9f63b51934d7e6a76e778a2beb9">https://rinkeby.etherscan.io/address/0xc7e5bd1e1b91b9f63b51934d7e6a76e778a2beb9</a></p><p>A similar thing happens with the contract that we created yesterday. I am only able to send tokens successfully to one account only. Funnily, it’s the one that fails with the other token but works with the one we created.</p><p>You can check it out here:</p><p><a href="https://rinkeby.etherscan.io/address/0x631139b4217b851a5990066dc56137fcd1b52bd0">https://rinkeby.etherscan.io/address/0x631139b4217b851a5990066dc56137fcd1b52bd0</a></p><p><strong>*Update:</strong> sending tokens from MEW seem to be working well for multiple addresses. Could this be a Metamask problem?</p><p><strong>-Double spending</strong></p><p>Could you please explain again how you think is best to prevent double spending (of the token) and what kind of code do we need to include in the crowdsale (and token) contracts?</p><p><strong>- Deploying on mainnet</strong></p><p>Overall, is the process of building and deploying a contract to mainnet more or less the same as the one we did? If different, what is different?</p><p>How much would it cost, roughly, to deploy a token like the one we created on mainnet?</p><p><strong>- Verifying and publishing the contract we created on Etherscan</strong></p><p>After our call, I copied and pasted all the files in one single txt doc which I then copied into the field on Etherscan to verify but did not work.</p><p>I got an error saying it couldn’t find info about the constructor in ABI format. I didn’t know where to get that one.</p><p>How can I verify when deploying from Remix?</p><p>As a side note, later I deployed the same contract (the one we built) with truffle from Terminal and was able to verify it after flattening the files with truffle-flattener. So, at least I know one way of doing it :)</p><p><strong>- initialSupply — decimals</strong></p><p>I know that when I put 10 decimals, I can send 0.0000000001 of the token.</p><p>But can you please explain this below. I don’t quite get it:</p><pre>1000000 *(10** uint256(_decimals));</pre><p>How do we calculate the initial supply here?</p><p>Also, the line above says we have 6 decimals (because I just put an arbitrary number there):</p><pre>uint8 public constant _decimals = 6;</pre><p><strong>- What is the difference between our code and the one below</strong> (<a href="https://hackernoon.com/create-your-own-ethereum-token-bfa6302084da">source</a>)</p><pre>string internal _name;<br> string internal _symbol;<br> uint8 internal _decimals;<br> uint256 internal _totalSupply;</pre><pre>mapping (address =&gt; uint256) internal balances;<br> mapping (address =&gt; mapping (address =&gt; uint256)) internal allowed;</pre><pre>function StandardToken(string name, string symbol, uint8 decimals, uint256 totalSupply) public {<br> _symbol = symbol;<br> _name = name;<br> _decimals = decimals;<br> _totalSupply = totalSupply;<br> balances[msg.sender] = totalSupply;</pre><p>I guess they’re using parts of ERC20.sol straight in the code although they’re also importing the same file.</p><p>At the same time, <a href="https://medium.freecodecamp.org/create-an-ethereum-token-using-open-source-contracts-open-zeppelin-1e132e6233ed">others</a> are saying straight away:</p><pre>contract TestToken is MintableToken {<br> string public constant name = “Test Token”;<br> string public constant symbol = “TT”;<br> uint8 public constant decimals = 18;<br>}</pre><p>I mean, the last one looks easier but which one is better if any?</p><p><strong>- Selling tokens</strong></p><p>Can you please check this code:</p><p><a href="https://github.com/bitfwdcommunity/Issue-your-own-ERC20-token/blob/master/contracts/erc20_tutorial.sol">https://github.com/bitfwdcommunity/Issue-your-own-ERC20-token/blob/master/contracts/erc20_tutorial.sol</a></p><p>A few weeks ago, I was able to successfully deploy it with Remix and verify on Etherscan but I wasn’t able to send any of it because of some “out of gas” error. Anyway, this code is supposed to incorporate a <em>transfer ownership</em> function, so anyone can buy tokens directly by sending ETH to the contract’s address. And supposedly the token can be listed on exchanges.</p><p>Looking at the code, do you think that is the case?</p><p>Related to the crowdsale, we were talking about, is there a way to incorporate such a function in the token code?</p><p><strong>- Why did we get rid of <em>string memory</em> in our code yesterday?</strong></p><p><strong>- Implementing with truffle, I had to change var to const in “initial migrations” (as per instructions)</strong></p><p>Do you have any idea why that is?</p><pre><strong>const</strong> Migrations = artifacts.require(“Migrations”);</pre><pre>module.exports = function(deployer) {<br> deployer.deploy(Migrations);<br>};</pre><p><strong>- Slightly offtopic</strong></p><p>Is there a way to link token minting to specific user actions — clucking on a link, registering on a site, spending a given amount of time or making a download/purchase?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1ebe6f45348" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>