{"action":"created","issue":{"url":"https://api.github.com/repos/paritytech/substrate/issues/675","repository_url":"https://api.github.com/repos/paritytech/substrate","labels_url":"https://api.github.com/repos/paritytech/substrate/issues/675/labels{/name}","comments_url":"https://api.github.com/repos/paritytech/substrate/issues/675/comments","events_url":"https://api.github.com/repos/paritytech/substrate/issues/675/events","html_url":"https://github.com/paritytech/substrate/pull/675","id":357604128,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNTc3OTkx","number":675,"title":"Integrate contracts into substrate-demo runtime","user":{"login":"pepyakin","id":2205845,"node_id":"MDQ6VXNlcjIyMDU4NDU=","avatar_url":"https://avatars2.githubusercontent.com/u/2205845?v=4","gravatar_id":"","url":"https://api.github.com/users/pepyakin","html_url":"https://github.com/pepyakin","followers_url":"https://api.github.com/users/pepyakin/followers","following_url":"https://api.github.com/users/pepyakin/following{/other_user}","gists_url":"https://api.github.com/users/pepyakin/gists{/gist_id}","starred_url":"https://api.github.com/users/pepyakin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pepyakin/subscriptions","organizations_url":"https://api.github.com/users/pepyakin/orgs","repos_url":"https://api.github.com/users/pepyakin/repos","events_url":"https://api.github.com/users/pepyakin/events{/privacy}","received_events_url":"https://api.github.com/users/pepyakin/received_events","type":"User","site_admin":false},"labels":[{"id":746560607,"node_id":"MDU6TGFiZWw3NDY1NjA2MDc=","url":"https://api.github.com/repos/paritytech/substrate/labels/A0-pleasereview","name":"A0-pleasereview","color":"666666","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-09-06T11:01:48Z","updated_at":"2018-09-07T17:02:32Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/paritytech/substrate/pulls/675","html_url":"https://github.com/paritytech/substrate/pull/675","diff_url":"https://github.com/paritytech/substrate/pull/675.diff","patch_url":"https://github.com/paritytech/substrate/pull/675.patch"},"body":"Also, the way contract address is calculated is changed. \r\n\r\n`ext_create` now takes one additional parameter: salt (`u64`), which is ultimately passed into the `contract_address_for`. You can read about motivation in [KIP-4](https://github.com/kovan-testnet/KIPs/blob/33a116649116ddad656302311080438264bb2dba/KIPs/kip-4.md). \r\n\r\nAdditionally, `data` (input parameter for constructor) is also passed to the `contract_address_for `. This was changed to make address calculation mechanism to be similar to pwasm's one, where input data is also accounted for address calculation (since it is a part of the constructor code there).\r\n\r\n`contract_address_for` for substrate-demo has the following formula: \r\n\r\n```\r\nblake2_256(blake2_256(code) + blake2_256(data) + LE(salt) + origin)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/paritytech/substrate/issues/comments/419503575","html_url":"https://github.com/paritytech/substrate/pull/675#issuecomment-419503575","issue_url":"https://api.github.com/repos/paritytech/substrate/issues/675","id":419503575,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTUwMzU3NQ==","user":{"login":"pepyakin","id":2205845,"node_id":"MDQ6VXNlcjIyMDU4NDU=","avatar_url":"https://avatars2.githubusercontent.com/u/2205845?v=4","gravatar_id":"","url":"https://api.github.com/users/pepyakin","html_url":"https://github.com/pepyakin","followers_url":"https://api.github.com/users/pepyakin/followers","following_url":"https://api.github.com/users/pepyakin/following{/other_user}","gists_url":"https://api.github.com/users/pepyakin/gists{/gist_id}","starred_url":"https://api.github.com/users/pepyakin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pepyakin/subscriptions","organizations_url":"https://api.github.com/users/pepyakin/orgs","repos_url":"https://api.github.com/users/pepyakin/repos","events_url":"https://api.github.com/users/pepyakin/events{/privacy}","received_events_url":"https://api.github.com/users/pepyakin/received_events","type":"User","site_admin":false},"created_at":"2018-09-07T17:02:32Z","updated_at":"2018-09-07T17:02:32Z","author_association":"CONTRIBUTOR","body":"Ok, removing salt then!"}}
{"actor":{"display_login":"pepyakin"}}