{"action":"opened","issue":{"url":"https://api.github.com/repos/ethereumjs/testrpc/issues/96","repository_url":"https://api.github.com/repos/ethereumjs/testrpc","labels_url":"https://api.github.com/repos/ethereumjs/testrpc/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/ethereumjs/testrpc/issues/96/comments","events_url":"https://api.github.com/repos/ethereumjs/testrpc/issues/96/events","html_url":"https://github.com/ethereumjs/testrpc/issues/96","id":157565494,"number":96,"title":"estimateGas bug - minimal example","user":{"login":"kumavis","id":1474978,"avatar_url":"https://avatars.githubusercontent.com/u/1474978?v=3","gravatar_id":"","url":"https://api.github.com/users/kumavis","html_url":"https://github.com/kumavis","followers_url":"https://api.github.com/users/kumavis/followers","following_url":"https://api.github.com/users/kumavis/following{/other_user}","gists_url":"https://api.github.com/users/kumavis/gists{/gist_id}","starred_url":"https://api.github.com/users/kumavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumavis/subscriptions","organizations_url":"https://api.github.com/users/kumavis/orgs","repos_url":"https://api.github.com/users/kumavis/repos","events_url":"https://api.github.com/users/kumavis/events{/privacy}","received_events_url":"https://api.github.com/users/kumavis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-30T23:16:38Z","updated_at":"2016-05-30T23:16:38Z","closed_at":null,"body":"\r\n\r\n\r\n0. initialize\r\n\r\nI reccomend `npm i -g jsonogram` for pretty printing json\r\n\r\n```\r\ntestrpc -m \"pencil blouse boat super visual window huge image flip usual debris hospital\"\r\n```\r\n\r\n1. publish contract\r\n\r\n```\r\ncurl -X POST -d '{\"method\": \"eth_sendTransaction\", \"params\": [{\"from\": \"0x435d00bd45e771cc663da08d8f3b9173414cd24c\",\"data\": \"6060604052600160a060020a03321660009081526020819052604090206127109055609f80602d6000396000f3606060405260e060020a600035046390b98a1181146024578063f8b2cb4f146050575b005b606c60043560243533600160a060020a0316600090815260208190526040812054829010156076576099565b600160a060020a03600435166000908152602081905260409020545b6060908152602090f35b604080822080548490039055600160a060020a0384168252902080548201905560015b9291505056\"}]}' localhost:8545 | jsonogram\r\n```\r\n\r\n2. estimate tx gas\r\n\r\n```\r\ncurl -X POST -d '{\"method\": \"eth_estimateGas\", \"params\": [{\"from\": \"0x435d00bd45e771cc663da08d8f3b9173414cd24c\",\"to\":\"0xc01508458a7bb72d63f996561115069a2c328202\",\"data\":\"0x90b98a11000000000000000000000000b0a34f864f14506216e7178df35e031161cc3c9e0000000000000000000000000000000000000000000000000000000000000001\"}]}' localhost:8545 | jsonogram\r\n```\r\n\r\n-> \"0x82b5\" 33461\r\n\r\n3. send tx and check gas used\r\n\r\n```\r\ncurl -X POST -d '{\"method\": \"eth_sendTransaction\", \"params\": [{\"from\": \"0x435d00bd45e771cc663da08d8f3b9173414cd24c\",\"to\":\"0xc01508458a7bb72d63f996561115069a2c328202\",\"data\":\"0x90b98a11000000000000000000000000b0a34f864f14506216e7178df35e031161cc3c9e0000000000000000000000000000000000000000000000000000000000000001\"}]}' localhost:8545 | jsonogram\r\ncurl -X POST -d '{\"method\": \"eth_getTransactionByHash\", \"params\": [\"0x850bc690fcca104b4f0f3b9523ba65e9d920a9c98d7587efd4e0fba62cd5043d\"]}' http://localhost:8545/ | jsonogram\r\n```\r\n\r\n-> \"0x47e7c4\" 4712388\r\n\r\n4. compare gas\r\n\r\n\"0x82b5\" 33461 !== \"0x47e7c4\" 4712388\r\n\r\nZOMG\r\n"}}
{"actor":{"display_login":"kumavis"}}