NatSpec Ethereum Frontier Guide

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

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 ... 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… We would like to show you a description here but the site won’t allow us. Ethereum Frontier Guide. NatSpec. This section will further elaborate what you can do with contracts and transactions building on a protocol NatSpec. Solidity implements smart comments doxigen style which then can be used to generate various facades meta documents of the code. One such use case is to generate custom messages for transaction ... NatSpec Format¶ Solidity contracts can use a special form of comments to provide rich documentation for functions, return variables and more. This special form is named the Ethereum Natural Language Specification Format (NatSpec). This documentation is segmented into developer-focused messages and end-user-facing messages.

[index] [5623] [5325] [32] [6497] [4440] [2850] [3729] [656] [4650] [3385]

Web3 UX Working Group - YouTube

The next video is starting stop. Loading... Watch 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. With Jeff Anthony. This video is unavailable. Watch Queue Queue