Yun Hai Chain International block chain contestMain Office: micro-Software Hot Cool Shenzhou Numerals new Financial Science and Technology Consortium"Activity Theme"The core concept of the "cloud Sea chain" is that, in the era of progressive maturity of the district chain, the spirit of the new and actual practices is to encourage developers to explore more of the new block chain scene in the race.known for its centrality, transparent sharing, irreversibility, and the keys and private keys encry
first, the smart contract issue token process
1, the Smart Contract token agreement ERC20
Tokens represent digital assets in Ethereum, and not all tokens conform to specific specifications. Tokens based on ERC20 are easier to swap and can be DAPP compatible with a variety of wallets. Standardization is very advantageous, it means that these assets can be used for different platforms and projects, or can o
Ethereum is the best programming platform in the area of blockchain development, and truffle is the most popular development framework of Ethereum (Ethereum), which is the reason why our first blockchain technology article introduces truffle, the actual combat is the most important thing, this article does not speak the principle, only build the environment, Run
This article summarizes how the transactions on the etheric square are built and broadcast all over the web.
Trading is the core of the block chain. When you interact with an Ethernet trader, you are essentially executing a transaction and changing its state. Are you curious as to what has happened in the process of being executed on the etheric square? Let's use an example to illustrate the nature of the ether trade, in this article we will cover the following knowledge points: End-to-end profi
Gets the code for the specified address on the chain
Call:
Web3.eth.getCode (addresshexstring [, Defaultblock] [, callback])
Parameter: addresshexstring:string-to get the address of the code. defaultblock:number| String-(optional) If a parameter is not passed, the block defined by Web3.eth.defaultBlock is used by default, otherwise the specified chunk is used. Callback:function-callback function, which is used to support asynchronous execution.
Return value: String-the compiled byte code for
technology and smart contracts yourself, and as blockchain technology matures and market size expands, you'll have more skills to write more complex Java chain code.So what are you going to do next?Follow-up actionThe following recommendations will help you to continue your research based on the knowledge you are currently learning:In-depth study of Hyperledger fabric architectureThanksThank you very much for Du Yu carefully review this article, to provide constructive advice and correction.Sha
Blockchain Enthusiast (qq:53016353)
Digital currency is the best programming platform in the area of blockchain development, and truffle is the most popular development framework of digital currency (Ethereum), this is our first Blockchain technology article introduced truffle reason, the actual combat is the most important thing, this article does not talk about the principle, only build the environment, Run the first Blockchain program (
back-end engineers for DAPP applications and traditional Web application systems
Job Requirements
More than three years programming experience, proficient in Golang, Java, Python, C + +, JavaScript at least one language, programming basic skills solid, have good engineering experience background;
Familiar with Ethereum or other blockchain related mechanisms and principles;
Familiar with Ethernum/hyperledge
Go-ethereum
The Go-ethereum client is often referred to as the Geth, which is a command-line interface that executes the complete etheric square node that is implemented on the go. By installing and running the Geth, you can participate in the real-time network of the front desk of the ether and do the following: Mining the real etheric currency transfer funds between different addresses create contracts,
two parts.
Application layer: The display layer of the block chain. For example, the etheric square uses truffle and WEB3-JS. The application layer of the block chain can be either a mobile end, a Web side, or an existing server that integrates the current business Server as an application tier.
2. Ethernet Square Structure
The top of the etheric square is dapp. It is exchanged through Web3.js and the Intelligent contract layer. All in
in the country.
2.1 Controller contract and data contract: 1->1
Suppose there are only two banks in the country, bank A and Bank B. A bank only deposits business, B bank only withdrawals business. One possible design is this:
Agent controller contract: For Dapp, is the entry point for all business contracts, provides namespace services, and provides a mapping of namespaces to contract addresses. Allows Dapp
contract: 1->1
Suppose there are only two banks in the country, bank A and Bank B. A bank only deposits business, B bank only withdrawals business. One possible design is this:
Agent controller contract: For Dapp, is the entry point for all business contracts, provides namespace services, and provides a mapping of namespaces to contract addresses. Allows Dapp to have no sense of address changes caused by
28-29
5. Modify the App.js file
Note the introduction of the file.
Import the page ' s CSS.
Webpack'll know what to does with it. Import "..
/stylesheets/app.css ";
Import Libraries we need.
Import {default as Web3} from ' web3 '; Import {default as Contract} from ' Truffle-contract '//Import we contract artifacts and turn them into usable abstrac
tions. Import credit_artifacts from '. /..
/build/contracts/credit.json '//Metacoin are our usable abstraction, which we'll use through the code be
, such as freezing and releasing the entire contract.
Modifier Onlyclevel () {
require (
msg.sender = = Cooaddress | |
Msg.sender = = Ceoaddress | |
Msg.sender = = Cfoaddress
);
_;
}
///...
@dev called by any "c-level" role to pause the contract. Used only when
/// a bug or exploit are detected and we need to limit damage.
function pause () external onlyclevel whennotpaused {
paused = true;
}
According to the explanation in the code, the original desig
only one Genesis block):
Next, we'll send some POST requests via POSTMAN:
Refresh the page just now, there are a few more blocks in the chain, exactly what we just generated, and you can see that the order and hash values of the blocks are correct.
Next
We have just completed a block chain of our own, although very simple (the burrow), but it has block generation, hash calculation, block check and other basic capabilities. You can then continue to learn more about other important chunks o
, and we can see that the page shows the current entire blockchain information (of course, there is only one Genesis block):
Next, we'll send some POST requests via POSTMAN:
Refresh the page just now, there are a few more blocks in the chain, exactly what we just generated, and you can see that the order and hash values of the blocks are correct.
Next
We have just completed a block chain of our own, although very simple (the burrow), but it has block generation, hash calculation, block
intelligent contract based on the solidity language, and the smart contract as a special account, so that in the intelligent contract can also achieve a specific way to achieve the implementation of the Intelligent contract EVM (Ethernet square virtual machine), through the Ethernet square virtual machine, So that the solidity such a class JS code into the block chain can be executed on the encryption code. Unlike Bitcoin, where gas is used in the transaction of the ether, a contract or a trans
Ethereum Network
The basis of central consensus is to participate in node-to-point network, node maintenance and security of blockchain network. See mining. Ethereum Network data statistics
Ethstats.net is a dashboard of ethereum network real-time data that showcases important information such as current chunks, table difficulty, gas prices and gas costs. The no
follow the requirements of the Docker compose file can be modified.
Second, the test environment construction process
The practice of our deployment of the Docker are running on an Ubuntu Linux, this Ubuntu Linux is a virtual machine I came out of VMware, the virtual Machine network is a NAT way to share the host's external network. The main parameters are as follows:
Ubuntu 16.04 LTS RAM 4G
ip:192.168.5.172 gateway:192.168.5.2 hostname:ubu-blockchain2
Docker Network Bridge
gateway:172.16.238
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.