sidan-lab / plutus-cborhex-automation

A Haskell package for creating RESTful API endpoints for dynamic parameterized Cardano Plutus script.
15 stars 3 forks source link

REST endpoint: research options #3

Closed aleeusgr closed 1 year ago

aleeusgr commented 1 year ago

that returns CBOR and Address for any pre-defined, parameterized Plutus Validator.

HinsonSIDAN commented 1 year ago

Different Haskell libraries to tested out: https://hackage.haskell.org/package/servant-server https://www.yesodweb.com/ https://hackage.haskell.org/package/scotty-0.12/docs/Web-Scotty.html

aleeusgr commented 1 year ago

there is a doc on Yesod + docker

aleeusgr commented 1 year ago

Haskell: state of the ecosystem

https://github.com/Gabriella439/post-rfc/blob/main/sotu.md

aleeusgr commented 1 year ago

I could not make this work

there is a doc on Yesod + docker

testing docker build

Yesod web Server from scratch

❌ I get various errors

aleeusgr commented 1 year ago

@SIDANWhatever I moved your code from example-validator to the root of directory. Check this branch, I get "spock running on 8080" on nix-shell $ cabal run but I dunno how to query its endpoint.

plutus-apps in docker is a thing that I don't understand how to do. Adding stack may help, it has nix support and docker support.

Awesome job on building Spock, respect man!!! I tried several implementations but keep running into same error which I've no idea what it means. It keeps me bugged

aleeusgr commented 1 year ago

Hm, I am having difficulties not only with spock, but other frameworks as well. It seem I am missing something on how Haskell build system works. Diggin

aleeusgr commented 1 year ago

✅ This builds on my machine

  1. $stack new my-name spock-template
  2. Maybe fix zlib, see above.
  3. stack build
  4. stack exec name

    Spock is running on port 8080

Does not have plutus-apps, https://github.com/SIDANWhatever/plutus-cborhex-automation/issues/18 needed