This is the 10th article in the Solidity Tutorial series, with a full understanding of solidity's function modifier.For a complete list of articles in the solidity series, see Category-solidity.Write in frontSolidity is the Ethereum Smart Contract programming language, you should know about Ethereum and smart contracts before reading this article.If you don't und
It 's written in front .
Solidity is an intelligent contract programming language for Ethernet, you should have a better understanding of Ethernet and intelligent contracts before reading this article,If you don't understand it, I suggest you look at the etheric square first.
The first half of this article is a reference to the official document of solidity (current latest version: 0.4.20) for translation,
Index"Solidity" 1. The layout of a solidity source file "solidity" 2. Structure of the contract
"Solidity" 3. Type "solidity" 4. Unit and global variable "solidity" 5. Expression and control structure "
Index"Solidity" 1. The layout of a solidity source file "solidity" 2. Structure of the contract
"Solidity" 3. Type "solidity" 4. Unit and global variable "solidity" 5. Expression and control structure "
vote
The following contracts are quite complex, but show a lot of solidity features. Implement a voting contract. Of course, the main problem with electronic voting is how to allocate the right to vote to the right people and how to prevent manipulation. We will not solve all of the problems here, but at least we will show how to conduct a commission vote so that the votes are automatically and completely transparent.
The idea is to create a contract
:
WEB3J tutorial, mainly for Java and Android programmers for the blockchain development of WEB3J detailed.
Ethereum tutorial, mainly introduces the intelligent contract and DAPP application development, suitable for getting started.
Ethereum development, mainly introduces the use of node. js, MongoDB, Blockchain, IPFs to achieve a central e-commerce Dapp actual combat, suitable for
variable was introduced. Pseudo code: CodeGen item:ast-Opcode_stream =match Item {assemblyblock ({items})->join (CodeGen (item) for item in items) if L AST generated opcode have continuing control flow:pop for all local variables registered at the block (including Variablesi ntroduced by labels) warn if the stack height at the-is not the same as at the start of the Blockidentifier (ID)-gt Lookup ID in the syntactic stack of blocksmatch type of idlocal Variable, dupi where i = 1 + stack_height-
).
Business Contract PreparationImplement the Contract interface definition and implement the user's business logic. In the constructor of the business contract, the business contract needs to be registered in the module contract.If users just want to write a business contract, do the study, test, you can register the business contract in the "Juzix.io.debugModule" the special name of the module contract, then the user can not need to write a module contract, in the juice client IDE directly
In the course of my research on the technology of Ethernet square, due to the relatively few data, it took a lot of detours. So here we will not first introduce the grammatical structure of solidity, but will be in the next phase, from the actual combat, to introduce you to Geth, browser-solidity, mist these three tools, and in the process of constantly explaining the basic concept of the ether.
Through the
Solidity is the high-level language of contract-oriented implementation of smart contracts. It is influenced by C ++,python and JavaScript and is designed for Ethereum virtual machines (EVM).
Solidity is a static type that supports features such as inheritance, libraries, and complex user-defined types.
You will see that you can create contracts for voting, crowdfunding, blind auctions, multi-signature wall
A simple smart contractStart with a very basic example, and don't worry that you don't know it at all, and we'll get to know more details.Storecontract SimpleStorage { uint storedData; function set(uint x) { storedData = x; } function get() constant returns (uint retVal) { return storedData; }}In solidity, a contract consists of a set of code (the function of the contract) and the data (the state of the contract). The cont
Use * * Ethereum wallet DEVELOPMENT * * To achieve the classic Helloword smart contract class. In this article, we'll see how to write a simple contract and deploy it to a blockchain. We'll also learn how to interact with our smart contracts by sending and reading data. Solidity's contract syntax is actually similar to classes in object-oriented programming languages. Smart contracts have functions that we can call and variables that can be stored and read. Our ' Counter ' contract will store th
Basic type conversion in solidity (14) | Getting Started series2017/4/29 posted in Solidity entry seriesClick to view the original text for optimized typography.
Implicit conversionsIf an operator can support different types. The compiler implicitly attempts to convert the type of an operand to the type of another operand, with the same assignment.
In general, the semantics can be converted as
Assign Value (Assignment)
deconstruct assignment and return multiple results (destructing Assignments and returning multip values)
The solidity built-in support tuple (tuple), that is, supports a list of possible completely different types, fixed in number (tuple generally refers to two, and a triple generally refers to three).
This built-in structure can return multiple results at the same time, and can also be used to assign values to multiple var
with the chain and describe in the constructor all the business contracts that the module contract will use.the user has written the module contract and deployed it to After juice the blockchain, the module name will be displayed in the "My apps" of juice Open service platform, click on "My Apps" app, will jump to the user open Dapp app. How to set the app's Jump URL, reference module contract writing HTTPS://OPEN.JUZIX.NET/API_DOC/PART03/EXAMPLE/MODULES.MD
Compiling the deployment, te
In the first article in this series, I introduced the concept of a non-fake token (NFT) and the need for the ERC721 (draft) standard.In this article, we will first introduce the ERC721 standard interface and decompose some requirements. There will also be a brief but important detour on the ERC165 standard. "Todd Quackenbush's display of a toolkit on Unsplash shows tool interfaces and ERC165 standards such as hammers, axes, box cutters, iron and flashlights.
The ERC721 standard states: "Every co
Solidity characteristics
1, the exception can not capture2, the function return value can be multiple3, including address and other special types4, the return value declaration can be placed on the function declaration5, run the function will consume gas, gas shortage will cause the intelligent contract can not run6, can be in Go-ethereum, solidity online compiler, mist wallet interface to run the smart co
In my study of Ethereum technology, because of less relevant information, so took more detours. So here we will not introduce the grammatical structure of solidity, but will be in the next stage, from the actual combat, in succession to introduce Geth, browser-solidity, mist these three tools, and in the process of constantly explaining the basic concept of ethereum.
Through the practical use of these tools
In the process of compiling and installing solidity, I met a strange problem.Webthree-umbrella/libethereum/libethereum/executive.CPP: in memberfunction 'void Dev::eth::standardtrace::operator () (uint64_t, uint64_t, Dev::eth::instruction, Dev::bigint, Dev::bigint, Dev::bigint, dev::eth::vm*, const dev::eth::extvmface*)':/home/vagrant/code/workspace/webthree-umbrella/libethereum/libethereum/executive.CPP: 81:8: error:unused Variable'returned'[-werror=u
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.