Skip to content

Commit

Permalink
build: update for preview 11
Browse files Browse the repository at this point in the history
- Pin soroban-cli to latest commit from
  stellar/stellar-cli#973. This PR will be
  mergeable once a new quickstart image is released and we can verify
  that its tests pass.
- Update the contract's SDK version
  - Copy in abundance source from token contract at "Changes for the next
    release," stellar/soroban-examples#277. Note
    that I did not author most of the changes in the contracts/abundance
    folder. I only copied in the changes originally authored by
    @leighmcculloch, then updated for the single tweak that this
    abundance contract already had: 1. comments on the mint method; and
    2.  slightly modified mint behavior.
- New CLI's typescript-bindings-generated libraries export a `Contract`
  class, rather than a flat bag of functions. Instantiating these
  contracts is now taken care of in `shared/contracts.ts`, with code
  throughout the rest of the codebase referencing these instances.
- Instantiating these classes required access to the `network` and
  `rpcUrl` used with the `initialize.sh` script. NextJS doesn't allow
  reading the files we already write (like `.soroban-example-dapp/network`),
  so for now I've also `echo`d relevant values to a `shared/config.json`
  file, which is hidden. This could probably be cleaned up in the future
  by putting all relevant settings in an `.env` file, and cleaning up
  the package.json scripts to use `dotenv cross-env` or similar.
  • Loading branch information
chadoh committed Sep 20, 2023
1 parent 29d76fe commit 453a18d
Show file tree
Hide file tree
Showing 22 changed files with 327 additions and 1,002 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# paths = ["/path/to/override"] # path dependency overrides

[alias] # command aliases
install_soroban = "install --git https://github.com/stellar/soroban-tools --rev cb3c44f9d8080917a7cb019d6be25019f6cf78c3 --root ./target soroban-cli --debug"
install_soroban = "install --git https://github.com/AhaLabs/soroban-tools --rev dc2a543993a293155516df52e79cc120cbd3dfe0 --root ./target soroban-cli --debug"
b = "build --target wasm32-unknown-unknown --release"
# c = "check"
# t = "test"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
/.soroban-example-dapp
/.soroban
/shared/config.json
# dependencies
/node_modules
/.pnp
Expand Down
Loading

0 comments on commit 453a18d

Please sign in to comment.