At present many counterfeit currency is developed based on Ethernet fang ERC 20 standard tokens, that is why I want to study the reasons, want to see the potential value of these fake currency, from a purely technical point of view, these fake the value of digital currency appears to be not too big, because as the etheric form industrial development platform, Individuals can also develop and issue tokens, and this article is about how to use Node.js. Therefore, from the point of view of economy, Shanzhai digital currency has a great risk (almost zero cost for the issuer), then where does the premium come from in the current market? From the issuer wants to use what the scrip, ETH ecological you can understand as “alibaba”, many of the shanzhai digital currency, you can understand for many enterprises in the ecological “alibaba”, someone release the flow of currency, specialized in the field of electrical business guide traffic to make money, and the flow of money is used by the issuer to raise money, The value of flow coin is that the issuer uses the funds raised to do this diversion, which is a popular way to say.
Note: This article is not intended as investment advice and is intended only for front-end developers to learn how to develop and issue personal digital currency. In addition, some basic knowledge of this article needs to be understood by the readers of this article. By default, you already know the basic knowledge of blockchain, Node.js development, network protocol, etc.)
There are Swiss Army Knife frameworks in the Node.js ecosystem that allow you to ignore the ethereum network nodes implemented in the original Go, and you don’t need to know much about ethereum (Demo level, of course), You can visit http://truffleframework.com/docs/getting_started/installation to get to know truffle project, This project is very similar to create-React-app or VUE-CLI (front-end oriented developers), which is used to launch an ERC project skeleton.
npm install -g truffle
mkdir MetaCoin && cd MetaCoin
truffle unbox metacoin
(Note: unbox is to download an example of a project, similar to the scaffolding project, requires scientific Internet access.)
If you don’t need the scaffolding, use Truffle Init to create a new project from scratch.
Next, you need to choose the Ethereum network. There are several different Ethereum clients recommended on the Truffle website, depending on whether you want to develop or deploy them. If you want to develop, you can use Truffle Develop, which works well with the Truffle framework. You don’t have to do extra configuration. Among them, there is a warning you must take seriously: Do not use this mnemonic on the main Ethereum network (mainnet). If you send ETH to any account generated from this Mnemonic, you will lose it all!” Do not send any ETH to the network.
In the downloaded project, focus on two directories “contracts” and “migrations”, the former belonging to the deployment script, where you can change some names to your own, Read carefully the “http://truffleframework.com/docs/getting_started/contracts” to make configuration changes.
Next you need to create a “4_example_migration.js” file and write:
var MyContract = artifacts.require("MyContract"); module.exports = function(deployer) { // deployment steps deployer.deploy(MyContract); };
Copy the code
Compile contract and deploy contract, these two operations are named truffle compile and Truffle Migrate, the process will take some time.
Basically, some other development approaches are the same as if you were developing a Node.js application, using NPM to manage modules and JavaScript to do some business development. Truffle configuration files are in truffle. Js, and other code that you can develop depending on your business scenario.
Now, you can write some test code to test your token issued the success (http://truffleframework.com/docs/getting_started/javascript-tests).
At this point, the development phase is over, we have seen, based on ethereum smart contract development entry is very simple, but the application of the current blockchain ecosystem is very limited and thin, the most current application scenario is ICO, through tokens to raise funds, the operation of the project.
Finally, I recommend an interesting project, a platform similar to Zhihu in the field of blockchain, with more useful learning resources. Real-name registration is now available at https://zt.bihu.com/?id=39768
If these shares are useful to you, support tipping:
Cardano tip address:
DdzFFzCqrhssiX2gAn17QNegNvSEixGi5RtgmEqeNrghMnU3F6GbmD1SWA3ZEKkTCuYnMnXTTpwWZrJpfxxiaLwg1Fm4p5z5WeyQWmbB
Any token of ERC 20 standard, tipping address:
0x4A40Eb870DcF533D4dC097c3d87aaFE9f64490A1