stellar / soroban-example-dapp

End-to-End Example Soroban Dapp
Apache License 2.0
1.03k stars 829 forks source link

feat: switch from soroban-react to generated libs #117

Closed chadoh closed 1 year ago

chadoh commented 1 year ago

The Idea

Rather than use the @soroban-react suite of packages, this switches to packages generated by the new soroban contract bindings typescript command.

Get it Running

You should be able to run npm run install and npm run reset to get everything set up! Check out the new scripts in package.json to see the magic. Yes, it works with a postinstall script and generates the libraries directly into the node_modules folder. This smells bad but worked better than anything else we tried!

You'll also see that there's a cargo install_soroban step. This uses the install_soroban alias that's defined in the newly-added .cargo/config.toml file, and saves it to ./target/bin/soroban. If you want to work with your own local branch of soroban-cli, you can remove the built ./target/bin/soroban and add a symlink there instead pointing at your local CLI build's target folder.

Shaptic commented 1 year ago

I ran this with --root-dir . and it completely wiped my repo LOL, so I dunno if that's very good behavior given the innocuous where to place generated project help text

paulbellamy commented 1 year ago

Seems like there are a ton of clippy errors in the abundance token, so running make fails.

paulbellamy commented 1 year ago

This also doesn't work in standalone mode anymore (because the RPC_URL is hardcoded to futurenet). We should either fix that (which I'd prefer) or remove standalone mode (as a stopgap).