{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/solidity/issues/3969","repository_url":"https://api.github.com/repos/ethereum/solidity","labels_url":"https://api.github.com/repos/ethereum/solidity/issues/3969/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/solidity/issues/3969/comments","events_url":"https://api.github.com/repos/ethereum/solidity/issues/3969/events","html_url":"https://github.com/ethereum/solidity/issues/3969","id":316529075,"number":3969,"title":"Issue calling function on another contract since version 4.22+","user":{"login":"BlockchainBud","id":35855134,"avatar_url":"https://avatars3.githubusercontent.com/u/35855134?v=4","gravatar_id":"","url":"https://api.github.com/users/BlockchainBud","html_url":"https://github.com/BlockchainBud","followers_url":"https://api.github.com/users/BlockchainBud/followers","following_url":"https://api.github.com/users/BlockchainBud/following{/other_user}","gists_url":"https://api.github.com/users/BlockchainBud/gists{/gist_id}","starred_url":"https://api.github.com/users/BlockchainBud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BlockchainBud/subscriptions","organizations_url":"https://api.github.com/users/BlockchainBud/orgs","repos_url":"https://api.github.com/users/BlockchainBud/repos","events_url":"https://api.github.com/users/BlockchainBud/events{/privacy}","received_events_url":"https://api.github.com/users/BlockchainBud/received_events","type":"User","site_admin":false},"labels":[{"id":250881248,"url":"https://api.github.com/repos/ethereum/solidity/labels/more%20info%20please","name":"more info please","color":"fbaac8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":23,"created_at":"2018-04-21T22:01:07Z","updated_at":"2018-05-21T08:36:39Z","closed_at":null,"author_association":"NONE","body":"The following example works fine in Solidity 4.21 and below. Since upgrading to 4.22+ (In RemixIDE and with Truffle compiler), I cannot call functions from another contract in this manner.\r\n\r\nThis is the case when running my own private Geth node, but not when running `truffle develop`\r\n\r\n**Code Example**\r\n```\r\ncontract One {\r\n    Two public twoContract;\r\n\r\n    function setTwoContract(address _twoAddress) public returns (bool) {\r\n        twoContract = Two(_twoAddress);\r\n        return true;\r\n    }\r\n\r\n    function setValueOnTwo() public returns (bool) {\r\n        twoContract.setValue(1);\r\n        return true;\r\n    }\r\n}\r\n\r\ncontract Two {\r\n    uint256 public myInt;\r\n\r\n    function setValue(uint256 _int) public returns (bool) {\r\n       myInt = _int;\r\n       return true;\r\n    }\r\n}\r\n```\r\n\r\n**Reproduce**\r\n1. Deploy both contracts\r\n2. Call One->setTwoContract(<address>)\r\n3. Call One->setValueOnTwo() _(fails, out of gas)_\r\n\r\n**Geth Settings**\r\n\r\n```\r\ngeth --port 3001 --networkid 155 --nodiscover --datadir=$DATADIR --maxpeers=0 \\\r\n     --rpc --rpcport 8545 --rpcaddr 127.0.0.1 --rpccorsdomain \"*\" --rpcapi \"db,eth,net,web3,personal\" \\\r\n     --gcmode archive\r\n```\r\n\r\n```\r\ninstance: Geth/v1.8.4-stable/darwin-amd64/go1.10.1\r\ncoinbase: 0x627306090abab3a6e1400e9345bc60c78a8bef57\r\nat block: 487 (Sat, 21 Apr 2018 17:36:43 EDT)\r\n datadir: /Users/guest/Documents/Ethereum/chain99\r\n modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ethereum/solidity/issues/comments/390590287","html_url":"https://github.com/ethereum/solidity/issues/3969#issuecomment-390590287","issue_url":"https://api.github.com/repos/ethereum/solidity/issues/3969","id":390590287,"user":{"login":"artjoma","id":15686738,"avatar_url":"https://avatars0.githubusercontent.com/u/15686738?v=4","gravatar_id":"","url":"https://api.github.com/users/artjoma","html_url":"https://github.com/artjoma","followers_url":"https://api.github.com/users/artjoma/followers","following_url":"https://api.github.com/users/artjoma/following{/other_user}","gists_url":"https://api.github.com/users/artjoma/gists{/gist_id}","starred_url":"https://api.github.com/users/artjoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artjoma/subscriptions","organizations_url":"https://api.github.com/users/artjoma/orgs","repos_url":"https://api.github.com/users/artjoma/repos","events_url":"https://api.github.com/users/artjoma/events{/privacy}","received_events_url":"https://api.github.com/users/artjoma/received_events","type":"User","site_admin":false},"created_at":"2018-05-21T08:36:39Z","updated_at":"2018-05-21T08:36:39Z","author_association":"NONE","body":"@chriseth  POA network\r\ngenesis: \r\n``` \r\n{\r\n  \"name\": \"expirnet\",\r\n  \"engine\": {\r\n    \"authorityRound\": {\r\n      \"params\": {\r\n        \"stepDuration\": \"4\",\r\n        \"validators\" : {\r\n          \"safeContract\": \"0x0000000000000000000000000000000000000005\"\r\n        }\r\n      }\r\n    }\r\n  },\r\n  \"params\": {\r\n    \"gasLimitBoundDivisor\": \"0x400\",\r\n    \"maximumExtraDataSize\": \"0x20\",\r\n    \"minGasLimit\": \"0x1388\",\r\n    \"networkID\" : \"0x2714\"\r\n  },\r\n  \"genesis\": {\r\n    \"seal\": {\r\n      \"authorityRound\": {\r\n        \"step\": \"0x0\",\r\n        \"signature\": \"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"\r\n      }\r\n    },\r\n    \"difficulty\": \"0x400\",\r\n    \"author\": \"0x0000000000000000000000000000000000000000\",\r\n    \"timestamp\": \"0x00\",\r\n    \"parentHash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\r\n    \"extraData\": \"0x\",\r\n    \"gasLimit\": \"0x10000000\"\r\n  },\r\n  \"accounts\": {\r\n    \"0x0000000000000000000000000000000000000001\": { \"balance\": \"1\", \"builtin\": { \"name\": \"ecrecover\", \"pricing\": { \"linear\": { \"base\": 3000, \"word\": 0 } } } },\r\n    \"0x0000000000000000000000000000000000000002\": { \"balance\": \"1\", \"builtin\": { \"name\": \"sha256\", \"pricing\": { \"linear\": { \"base\": 60, \"word\": 12 } } } },\r\n    \"0x0000000000000000000000000000000000000003\": { \"balance\": \"1\", \"builtin\": { \"name\": \"ripemd160\", \"pricing\": { \"linear\": { \"base\": 600, \"word\": 120 } } } },\r\n    \"0x0000000000000000000000000000000000000004\": { \"balance\": \"1\", \"builtin\": { \"name\": \"identity\", \"pricing\": { \"linear\": { \"base\": 15, \"word\": 3 } } } },\r\n    \"0xafeb1ac1c25255dbe8a9b96ad83d6b3cc0ebad73\": { \"balance\": \"50000000000000000000000000\" },\r\n```"}}
{"actor":{"display_login":"artjoma"}}