{"action":"opened","issue":{"url":"https://api.github.com/repos/ethereum/ethereum.js/issues/90","labels_url":"https://api.github.com/repos/ethereum/ethereum.js/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/ethereum.js/issues/90/comments","events_url":"https://api.github.com/repos/ethereum/ethereum.js/issues/90/events","html_url":"https://github.com/ethereum/ethereum.js/issues/90","id":59353026,"number":90,"title":"Solidity annotations (suggestion)","user":{"login":"androlo","id":2809499,"avatar_url":"https://avatars.githubusercontent.com/u/2809499?v=3","gravatar_id":"","url":"https://api.github.com/users/androlo","html_url":"https://github.com/androlo","followers_url":"https://api.github.com/users/androlo/followers","following_url":"https://api.github.com/users/androlo/following{/other_user}","gists_url":"https://api.github.com/users/androlo/gists{/gist_id}","starred_url":"https://api.github.com/users/androlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/androlo/subscriptions","organizations_url":"https://api.github.com/users/androlo/orgs","repos_url":"https://api.github.com/users/androlo/repos","events_url":"https://api.github.com/users/androlo/events{/privacy}","received_events_url":"https://api.github.com/users/androlo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-28T18:52:46Z","updated_at":"2015-02-28T18:52:46Z","closed_at":null,"body":"Hi. I'm playing around with a system to generate ABIs from solidity contract source code, using web3. Not sure if you have already done that. Either way I will present my stuff here. What I'm doing is to allow annotations in solidity contract code, sort of like how natspec annotations work. The idea is this:\r\n\r\nFunctions, fields and contracts can have annotations above the function/contract name. Lines that has annotations in them starts with `//`, so that they are simply consumed by the solidity parser. The annotations I'm mostly concerned with now are these:\r\n\r\n`@accessor=val` (`val` is `true` or `false`, default value [if no accessor annotation is found] is `false`)\r\n`@exported=val` (`val` is `true` or `false`, default value [if no exported annotation is found] is `true`)\r\n\r\nAccessor is important as it will make the selection between using `call`and `transact` automatic, even in complex accessor functions that involves calls to other functions, and even contracts.\r\n\r\n`exported` is good too, because even if a function is public, it may be unreachable from any javascript code due to permissions. For example, certain contracts I use can only be called by other contracts in the system due to restrictions that has to do with account permissions. I don't want to have to export those functions into the javascript contract. Also, since accessor functions get names based on the field names it's simple to check the annotation on the field then just find the function with the same name in the abi.\r\n\r\nAnyone interested in this in some way, or is perhaps working on something similar? Again sorry if something like this is right under my nose but I can't find it.\r\n\r\nNames are of course not set in stone..."}}