If you sell only using ethereum wallet you will loose a lot of users not familiar with blockchain. Take a look at the solutions offered by OpenZeppelin project. Just read their contracts code and I think you'll find solutions you were looking for in this post.
Stack Overflow for Teams — Start collaborating and sharing organizational knowledge. Create a free Team Why Teams? Collectives on Stack Overflow. Learn more. Working with tokens in the ethereum blockchain Ask Question. Asked 4 years, 10 months ago. Modified 4 years, 9 months ago. Viewed times. I am writing a test application that allows people to purchase tokens.
Visually, it would look something like this: How to do this is a puzzle to me. Improve this question. HappyCoder HappyCoder 5, 6 6 gold badges 37 37 silver badges 69 69 bronze badges. Add a comment. Sorted by: Reset to default. Highest score default Date modified newest first Date created oldest first. You can do the registry in your token sale smart-contract by making event like this event TokenPurchase address indexed purchaser, address indexed beneficiary, uint value, uint amount ; In this case you will be able to watch event log later and get all the addresses you need.
Lets say I want to split a token into a number of parts as such Take a look at the solutions offered by OpenZeppelin project. Improve this answer. Andrey Degtyaruk Andrey Degtyaruk 4 4 silver badges 9 9 bronze badges.
Thank you for your feedback, very useful! Sign up or log in Sign up using Google. You can watch this video below for more information on how crowd sales work in addition to following along with this article. Whenever a crowd sale takes place, the company gets liquid capital in the form of Ether that was paid by the investors, as well as holding onto a reserved amount of the ERC tokens that were sold in the crowd sale. In order to participate in a crowd sale, an investor must connect to the Etherum Blockchain with an account.
This account has a wallet address that can store Ether, as well as the ERC tokens that are purchased in the crowd sale. The investor must visit a crowd sale website that talks to a smart contract. The smart contract governs all of the rules for how the crowd sale works. Whenever an investor purchases tokens on the crowd sale website, they send Ether from their wallet to the smart contract, and the smart contract instantly dispenses the purchased tokens to their wallet.
The smart contract sets the price of the token in the crowd sale and governs how the crowd sale behaves. Crowd sales can take on all kinds of shapes and sizes. Each of these tiers can happen at different points of time and can behave differently. They can also have a reserved amount of tokens that are not sold in the crowd sale. These reserves are usually set aside for specific members of each company like founders and advisors.
These reserves can be a fixed amount of tokens or a percentage. Whenever a crowd sale ends, it can be finalized by an administrator. Whenever this happens, all of the reserved tokens will be distributed to the appropriate accounts and the crowd sale will officially be over. So what is a smart contract? Ethereum allows developers to write applications that run on the blockchain with smart contracts, which encapsulate all of the business logic of these applications.
We want to build a token that is compliant with this standard so that it can be widely accepted. If we did not have a standard like this, we could have endless ways to create tokens, and they might not be compatible with one another! Using the ERC standard ensures that a token is compliant for the following use cases and more :. The ERC specification essentially dictates the interface that the smart contract must respond to.
It specifies the structure of the smart contract and types of functions that the smart contract must have. It also provides some suggested functions that are nice to have, but ultimately optional. It dictates certain events that our token must have, like a transfer event.
See, smart contracts can emit events that consumers can subscribe to, and with this standard, we can subscribe to events that tell us when tokens are sold. Here is an example implementation of the transfer function specified by the ERC standard.
It is required by the smart contract, and governs how someone can send an ERC token from their wallet to another. Don't worry if all this doesn't perfectly make sense just yet. I'll explain all these parts in detail as we build out the ERC token during the step-by-step video tutorial.
This is where all of the community discussion around Ethereum standards takes place. I highly recommend bookmarking that repository and reading through the submissions, as this is where you can watch the Ethereum technology grow and change in real time! I also recommend this Wikipedia article. We'll build an ICO website that will talk to a crowd sale smart contract on the blockchain. This client-side website will have a form where users can purchase tokens in the crowd sale.
It will show the progress for the crowd sale, like how many tokens the user has purchased, how many tokens have been purchased by all users, and the total number of tokens available in the crowd sale. It will also show the account we're connected to the blockchain with under "your account". You can see if you have node already installed by going to your termial and typing:. The next dependency is the Truffle Framework , which allows us to build decentralized applications on the Ethereum blockchain.
It provides a suite of tools that allow us to write smart contacts with the Solidity programming language. It also enables us to test our smart contracts and deploy them to the blockchain. It also gives us a place to develop our client-side application. The next dependency is Ganache , a local in-memory blockchain. You can install Ganache by downloading it from the Truffle Framework website.
It will give us 10 external accounts with addresses on our local Ethereum blockchain. Each account is preloaded with fake ether. The next dependency is the Metamask extension for Google Chrome. In order to use the blockchain, we must connect to it remember, I said the block chain is a network.
You could also check the status of your transaction by taking a look at the receiving wallet. At the bottom of the page, we can see the list of all transactions associated with the address:. If you're regularly interacting with smart contracts in DApps, it's a good idea to learn how to find them on Etherscan.
This way, you can double-check that you're sending your funds to the correct contract. If you ever need to add a new token to your wallet, you'll have to find the token's contract address. The smart contract address contains the token's logic, such as how token transfers are made and other behavior. Copy and paste the smart contract address into the search field. You'll now see details on the contract balance and other general information regarding the Uniswap UNI token contract.
Underneath, we have more options to look at, including transactions, a comments section, and the smart contract itself. The [Read Contract] tab shows you general contract information. It allows you, for example, to query the balance of specific addresses or wallets that have permission to use the token in your wallet.
Clicking [Connect to Web3] will allow you to connect a crypto wallet like MetaMask or Binance Chain Wallet and interact with the contract. The simplest action here would be a transfer of coins. Using [transferFrom], you can transfer tokens from an address you have permission over to other addresses. The transaction below would send 1 UNI from our connected wallet to the receiving wallet address pasted in.
You also have to make sure to include the correct amount of decimals for the amount you want to send. Etherscan is free and straightforward to use, and it's a great tool when you need more information than your wallet or exchange can show. For the most basic features, you can quickly learn to use them in a short amount of time. Etherscan is also the basis for other block explorers like BscScan, making your skills easily transferable. Table of Contents. Etherscan is a block explorer that lets you view public data on transactions, smart contracts, addresses, and more on the Ethereum blockchain.
All interactions on Ethereum are public, and Etherscan allows you to look through them like a search engine. You can use a transaction hash transaction ID to check all related activity, including tokens, smart contracts, and wallet addresses.. Etherscan doesn't provide you with an Ethereum wallet to use or store any of your private keys.
You also can't use it for trading. It only acts as a source of blockchain information and a database of smart contracts. Etherscan is one of the most trusted and popular block explorers for Ethereum. Having more knowledge of how you interact with the blockchain can help you better understand what's going on with DApps and transactions.
This knowledge can also keep you safe and help you spot suspicious blockchain activity. For example, whale alerts let you know if large amounts of a cryptocurrency have been moved onto an exchange. While not always the case, this information might suggest a large sell-off.
You can also see what the founders of a project are doing with their project's tokens. This can help you spot potential scams or rug pulls , where developers abandon their projects and sell their coins. You also paid a 0. After making the transaction, your wallet displays this TXID :. Status Whether your transaction has failed, is in progress, or was successful. Block The block number your transaction was included in. Timestamp The timestamp of the block your transaction was added to.
From The wallet address that made the transaction.. To The receiving address or smart contract. Value The amount sent in the transaction. Transaction Fee The fee paid for making the transaction. Gas Price The cost per unit of gas for the transaction.
Information on whether a transaction was conducted under the old legacy gas system 1 or the new EIP block fee system 2. The transaction in red is the 0. You can see it marked as In , showing that the address you searched was on the receiving end. Our Web ETH Wallet is perfect cryptocurrency storage for day-to-day use, for it has all the features that a crypto hodler might need: a high level of security, fast transactions, purchases with a bank card and easy, registration-free exchanges.
Hedera Token Service HTS , Hedera makes it possible to issue tokens on a network that spreads around the world without risking performance. Written By Elizabeth Saul. How to store ERC tokens? Stay in Touch Academy. Learn about blockchain, cryptocurrencies, DeFi, wallets and get useful guides. Start Learning. Email is invalid Thank you! You are subscribed. Our Blog. Read our blog to stay up to date on Guarda news, new features, and press releases. Read Blog. Latest articles in Tutorials.
Ethereum Tokens Explorer View balances, trading volumes, operations and transfers per token, per day;; View price charts in Candles or Line mode;. If you haven't already, get a Free Amberdata API Key: Go to huge.crptocurrencyupdates.com, and click “Get Started” to get a Free Developer API Key. Find and compare Ethereum wallets based on the features you want. Trade between ETH and other tokens directly from your wallet.