marigold-dev/deku

Ligo in JS

Opened this issue · 2 comments

Objective
Deadline: 2022-11-30 00:00:00

Why?

tl;dr, to make it easy for web apps to interact with contracts written in Ligo and deployed to Deku-C.

I want calling a contract method to be as easy as:

await contract.tx("JsLigo", "<some ligo expression>")

For this we need to compile <some ligo expression> in the context of the contract. We can store the contract source code on-chain, but the ligo compiler needs to run in JS.

IMO it would be even better to generate Typescript helpers from Ligo contracts that provide type-safe interfaces to the contracts. However, compiling Ligo to JS is probably not too hard to do, and would be helpful in general.