{"action":"created","issue":{"url":"https://api.github.com/repos/ivy-lang/ivy-bitcoin/issues/1","repository_url":"https://api.github.com/repos/ivy-lang/ivy-bitcoin","labels_url":"https://api.github.com/repos/ivy-lang/ivy-bitcoin/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/ivy-lang/ivy-bitcoin/issues/1/comments","events_url":"https://api.github.com/repos/ivy-lang/ivy-bitcoin/issues/1/events","html_url":"https://github.com/ivy-lang/ivy-bitcoin/issues/1","id":283053656,"number":1,"title":"Fixed point contracts?","user":{"login":"copumpkin","id":2623,"avatar_url":"https://avatars1.githubusercontent.com/u/2623?v=4","gravatar_id":"","url":"https://api.github.com/users/copumpkin","html_url":"https://github.com/copumpkin","followers_url":"https://api.github.com/users/copumpkin/followers","following_url":"https://api.github.com/users/copumpkin/following{/other_user}","gists_url":"https://api.github.com/users/copumpkin/gists{/gist_id}","starred_url":"https://api.github.com/users/copumpkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/copumpkin/subscriptions","organizations_url":"https://api.github.com/users/copumpkin/orgs","repos_url":"https://api.github.com/users/copumpkin/repos","events_url":"https://api.github.com/users/copumpkin/events{/privacy}","received_events_url":"https://api.github.com/users/copumpkin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"danrobinson","id":1187252,"avatar_url":"https://avatars2.githubusercontent.com/u/1187252?v=4","gravatar_id":"","url":"https://api.github.com/users/danrobinson","html_url":"https://github.com/danrobinson","followers_url":"https://api.github.com/users/danrobinson/followers","following_url":"https://api.github.com/users/danrobinson/following{/other_user}","gists_url":"https://api.github.com/users/danrobinson/gists{/gist_id}","starred_url":"https://api.github.com/users/danrobinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danrobinson/subscriptions","organizations_url":"https://api.github.com/users/danrobinson/orgs","repos_url":"https://api.github.com/users/danrobinson/repos","events_url":"https://api.github.com/users/danrobinson/events{/privacy}","received_events_url":"https://api.github.com/users/danrobinson/received_events","type":"User","site_admin":false},"assignees":[{"login":"danrobinson","id":1187252,"avatar_url":"https://avatars2.githubusercontent.com/u/1187252?v=4","gravatar_id":"","url":"https://api.github.com/users/danrobinson","html_url":"https://github.com/danrobinson","followers_url":"https://api.github.com/users/danrobinson/followers","following_url":"https://api.github.com/users/danrobinson/following{/other_user}","gists_url":"https://api.github.com/users/danrobinson/gists{/gist_id}","starred_url":"https://api.github.com/users/danrobinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danrobinson/subscriptions","organizations_url":"https://api.github.com/users/danrobinson/orgs","repos_url":"https://api.github.com/users/danrobinson/repos","events_url":"https://api.github.com/users/danrobinson/events{/privacy}","received_events_url":"https://api.github.com/users/danrobinson/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-12-18T23:18:55Z","updated_at":"2017-12-18T23:34:18Z","closed_at":null,"author_association":"NONE","body":"I'm trying to express a contract that lets you redeem it if you find the fixed point of a hash function. For example, I wanted to try:\r\n\r\n```\r\ncontract FixedPoint(val: Value) {\r\n  clause reveal(hash: Bytes) {\r\n    verify sha256(hash) == hash\r\n    unlock val\r\n  }\r\n}\r\n```\r\n\r\nUnfortunately Ivy's type system seems to be forbidding this, because the type of `sha256` on a `T` is always a `Sha256(T)`, so equality comparisons will fail to typecheck. Is there a coercion operator or some other way for me to express this? I can express it natively in script pretty easily."},"comment":{"url":"https://api.github.com/repos/ivy-lang/ivy-bitcoin/issues/comments/352592024","html_url":"https://github.com/ivy-lang/ivy-bitcoin/issues/1#issuecomment-352592024","issue_url":"https://api.github.com/repos/ivy-lang/ivy-bitcoin/issues/1","id":352592024,"user":{"login":"danrobinson","id":1187252,"avatar_url":"https://avatars2.githubusercontent.com/u/1187252?v=4","gravatar_id":"","url":"https://api.github.com/users/danrobinson","html_url":"https://github.com/danrobinson","followers_url":"https://api.github.com/users/danrobinson/followers","following_url":"https://api.github.com/users/danrobinson/following{/other_user}","gists_url":"https://api.github.com/users/danrobinson/gists{/gist_id}","starred_url":"https://api.github.com/users/danrobinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danrobinson/subscriptions","organizations_url":"https://api.github.com/users/danrobinson/orgs","repos_url":"https://api.github.com/users/danrobinson/repos","events_url":"https://api.github.com/users/danrobinson/events{/privacy}","received_events_url":"https://api.github.com/users/danrobinson/received_events","type":"User","site_admin":false},"created_at":"2017-12-18T23:34:18Z","updated_at":"2017-12-18T23:34:18Z","author_association":"CONTRIBUTOR","body":"This is definitely a reasonable feature. Will add a `bytes` coercion function (that'll be a no-op at the VM level)"}}
{"actor":{"display_login":"danrobinson"}}