Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync this repository with Stellar's #2

Closed
wants to merge 19 commits into from
Closed

Conversation

pselle
Copy link

@pselle pselle commented Jul 2, 2024

Sync this repository with the stellar repository

esteblock and others added 19 commits August 7, 2023 14:15
* build: directly generate js libs to node_modules

Roll back #122, but
keep `crowdfund-contract` and `abundance-token` in
`optionalDependencies`.

As I worked with the old version in earnest, iterating on a local copy
of the CLI and generating new JS libs over and over, the two-step
generate-to-.soroban, then install-to-node_modules wasn't working very
well. Probably because the new library wasn't being added until the
`postinstall` step, and the dependencies are optional.

Generating directly to `node_modules` feels dirty, but it works
consistently. At least in this version, you can still see the
dependencies listed in the `optionalDependencies` section, so they're
not quite as surprising/mysterious.

* build: try adding back optionalDeps

* build: update node; use preinstall and local deps

* Update package-lock.json

* work around a bug in the binding gen

---------

Co-authored-by: Chad Ostrowski <[email protected]>
build: fix nvmrc (can't use range)
- 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.
Build and test the MSRV and latest
Update ubuntu to 22.04 from 20.04
@pselle pselle requested a review from chadoh July 2, 2024 19:00
@pselle pselle closed this Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants