Ethereum 2.0: A Complete Guide. Ewasm. by Colin Schwarz ...

First contract to contain swarm hash to its metadata and source

I love it when technology finally comes together!
I just fired up the geth light client (I did not do a full sync beyond the attack blocks yet), it was up to date faster than I could find my correct account. Then I deployed the contract at 0x45D779c6696fdB1eECFBbaf5E3F8b4Af9861291f which was compiled with an experimental Solidity feature that automatically generates a metadata file and inserts the swarm hash of that file into the bytecode of the contract (before the file is uploaded to swarm, that's the nice thing!).
If you take a close look, the bytecode starts with
which decodes to
PUSH32 0xe886dc769ec7d83a00b8647920917cf4b932fbb8c6fd59bf6da7d18ee84d2447 POP 
If you interpret the pushed constant as a swarm hash and download the corresponding file, you will get
{ "compilationTarget": "HelloSwarm.sol:HelloSwarm", "compiler": { "version": "0.4.5-develop.2016.11.15+commit.744d81f7.mod.Linux.g++" }, "language": "Solidity", "output": { "abi": "[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"greeters\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_greeting\",\"type\":\"string\"}],\"name\":\"greet\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"\",\"type\":\"string\"}],\"name\":\"Greeted\",\"type\":\"event\"}]", "natspec": "{\n \"methods\" : {\n \"greet(string)\" : {\n \"notice\" : \"Send your personal greeting to the contract. Will permanently store your address inside this contract.\"\n }\n }\n}\n" }, "settings": { "optimizer": { "enabled": false, "runs": 200 } }, "sources": { "HelloSwarm.sol": { "swarm": "0x10a421d906cd976536e5980b53a73e2d3ce6528b2df1e93b4f3358b1e2c6acb5" } }, "version": 1 } 
Which contains all you need for basic interaction and source-code verification of the contract! No need to copy-paste the stupid ABI Json string anymore!
Oh and uploading the file using "bzzup" was instant, the file was immediately retrievable from the gateway.
My next steps will be bringing browser-solidity and all the compiler versions into swarm -- bye-bye, github!
submitted by chriseth to ethereum [link] [comments]

Web3 UX Working Group - YouTube Luis - Radspec: A Safe Alternative to Ethereum's Natspec to Make Transactions Human-readable

两种以太坊智能合约编程语言Vper与Solidity的NatSpec格式有所不同。 Check out NatSpec documentation for additional information. Importing external code into your Ethereum smart contract. The import section is optional but can be powerful when used correctly in your Ethereum smart contract. If your smart contract needs to refer to code in other files, you’ll have to import those other files first. is here to help you build with Ethereum with documentation on foundational concepts as well as the development stack. Plus there are tutorials to get you up and running. Inspired by the Mozilla Developer Network , we thought Ethereum needed a place to house great developer content and resources. In articles one, two and three of this series, I explored various features of the anticipated Ethereum update Eth 2.0. Article one gave an introduction to the update and offered general information… NatSpec. You can also write your Solidity comments in the Ethereum Natural Language Specification Format (NatSpec). It defines a special form of comments in Solidity contracts. Developers use it for documenting return variables, functions, and so on. You should insert all documentation before class, interface, and function keywords. You can ...

[index] [6866] [649] [490] [5065] [2032] [4069] [1708] [6044] [5321] [1839]

Web3 UX Working Group - YouTube

With Jeff Anthony. This video is unavailable. Watch Queue Queue Luis - Radspec: A Safe Alternative to Ethereum's Natspec to Make Transactions Human-readable - Duration: 19 minutes. ... Universal Logins for Ethereum - Duration: 13 minutes, 45 seconds. The next video is starting stop. Loading... Watch Queue