{"id":18623212,"url":"https://github.com/glottologist/liquid-dapp","last_synced_at":"2026-03-19T05:25:32.423Z","repository":{"id":105860017,"uuid":"480744579","full_name":"glottologist/liquid-dapp","owner":"glottologist","description":"Simple liquid staking dapp to demonstrate event emission in Tezos","archived":false,"fork":false,"pushed_at":"2022-05-03T16:17:06.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-17T06:40:45.464Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"LigoLANG","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glottologist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-12T09:41:40.000Z","updated_at":"2022-04-26T14:46:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6a52a86-1af2-4aad-ad8c-124dd00d58f7","html_url":"https://github.com/glottologist/liquid-dapp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/glottologist/liquid-dapp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glottologist%2Fliquid-dapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glottologist%2Fliquid-dapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glottologist%2Fliquid-dapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glottologist%2Fliquid-dapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glottologist","download_url":"https://codeload.github.com/glottologist/liquid-dapp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glottologist%2Fliquid-dapp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28736503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T19:23:36.361Z","status":"ssl_error","status_checked_at":"2026-01-24T19:23:28.966Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T04:22:01.590Z","updated_at":"2026-01-24T20:19:04.773Z","avatar_url":"https://github.com/glottologist.png","language":"LigoLANG","funding_links":[],"categories":[],"sub_categories":[],"readme":"# liquid-dapp\nSimple liquid staking dapp to demonstrate event emission in Tezos\n\n## Building\n\nThe easiest way to build is to use `nix`. With nix installed you can spin up a development shell in the project root using: \n\n```nix\nnix develop\n```\n\nOnce in the shell, use `build` to compile the ligo liquid contract.\n\n## Patching the Michelson code\n\nLigo doesn't currently support event emission so that compiled Michelson code needs to be adjusted to emit the events correctly.  In the resulting compiled code for the liquid contract `liquid.tz` there is a string marker to help narrow down the place that needs to be amended.  In the code one can look for a string \"This is the emission function\".  The surrounding code should be of the following format: \n\n```Michelson\n         APPLY ;\n         LAMBDA\n           (pair nat nat)\n           unit\n           { CDR ;\n             INT ;\n             ISNAT ;\n             IF_NONE\n               { PUSH string \"This is the emission function\" ; FAILWITH }\n               { DROP ; UNIT } } ;\n```\n\nThe `(pair nat nat)` is the liquid exchange rate that needs to be emited.  This can be accomplished with the following: \n\n```Michelson\nPUSH nat ???; PUSH string \"xrate\"; EMIT\n```\n\nThis needs to be patched in between the first `APPLY;` and the callsite of the lambda `LAMBDA` so the patched code should look like the following:\n\n```Michelson\n         APPLY ;\n         PUSH nat ???; PUSH string \"xrate\"; EMIT\n         LAMBDA\n           (pair nat nat)\n           unit\n           { CDR ;\n             INT ;\n             ISNAT ;\n             IF_NONE\n               { PUSH string \"This is the emission function\" ; FAILWITH }\n               { DROP ; UNIT } } ;\n```\n\nOnce the compiled code has been patched it can then be deployed.\n\n## Deploy","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglottologist%2Fliquid-dapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglottologist%2Fliquid-dapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglottologist%2Fliquid-dapp/lists"}