marigold-dev / deku

MIT License
80 stars 16 forks source link

Ligo in JS #893

Open Marigold-infrabot opened 1 year ago

Marigold-infrabot commented 1 year ago

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

d4hines commented 1 year ago

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.

d4hines commented 1 year ago

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.