ethereum-natural-specification-format · Ethereum Wiki · GitHub

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
0x7fe886dc769ec7d83a00b8647920917cf4b932fbb8c6fd59bf6da7d18ee84d244750 
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]

Giveth.io ethereum work study 2017-05-20 = natspec, parity browser, etc Web3 UX Working Group - YouTube

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. 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 ... We would like to show you a description here but the site won’t allow us. Allow NatSpec comments for state variables #8532 Merged chriseth merged 3 commits into ethereum : develop from aarlt : structured-docs-variables-aarlt May 19, 2020 两种以太坊智能合约编程语言Vper与Solidity的NatSpec格式有所不同。

[index] [289] [4994] [536] [3959] [2103] [4983] [2176] [6762] [6220] [5723]

Giveth.io ethereum work study 2017-05-20 = natspec, parity browser, etc

With Jeff Anthony. This video is unavailable. Watch Queue Queue 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.

https://arabbinaryoption.xn--80ad2a2a0d.xn--p1ai