-
Notifications
You must be signed in to change notification settings - Fork 899
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
build: update for preview 11 #136
Conversation
|
||
export interface IDepositsProps { | ||
address: string | ||
decimals: number | ||
name?: string | ||
symbol?: string | ||
idCrowdfund: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was already obsolete; we just missed removing it previously
2163d8d
to
9d57e8f
Compare
- 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.
9d57e8f
to
ceb40b8
Compare
- copy abundance source from stellar/soroban-example-dapp#136 - pin soroban-cli from stellar/stellar-cli#973 - update everything else as needed
@chadoh , can probably use the latest commit off quickstart:master of |
Just tried this out. Everything is working an no issue to report! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏🏻
I want to point out that I initially tried this out on futurenet which worked with no issues to report. However, after trying it again on standalone, I ran into the error: 'xdr processing error: xdr value invalid.' |
.cargo/config.toml
Outdated
@@ -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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this use https://github.com/stellar/soroban-tools --rev 20.0.0-rc2
or is there a branch on your fork that needs to be merged back to stellar/soroban-tools?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, there's a branch (stellar/stellar-cli#973), see PR description.
This branch is waiting on a quickstart that works with preview 11 + standalone.
The lack of such a quickstart is probably also the cause of your troubles running this on standalone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see, you are referring to the stellar/quickstart:soroban-dev
docker image? yes, it's been recently published for preview11 as stellar/quickstart:testing@sha256:1c98f895f8b69cc843eeaa5230d67044dbeb390a5529d51dd7762d8ff685c3f8
I replied here for the quickstart docker version which you were probably more interested in. on the 'testnet' enablement, that would be adding it as another network choice in initialize.sh and quickstart.sh. also, in regards to using the preview11 quickstart version, it has deprecated the usage of |
I do think that changing all the language from I would also prefer the addition of I updated the quickstart image in stellar/stellar-cli#973 and here, and I switched the
|
@chadoh , thanks sounds good.
ok, will try out locally, we just need to verify initialize&run of dapp for local and futurenet network types correct? |
@chadoh , that format error from gh workflow is a platform discrepancy of host and image, that sha is pointing at wrong image version actually, you can see earlier in the logs of it downloading the image it reports the issue So, that's one issue, which needs to get fixed in soroban docs also, as it should be the multi-platform sha instead and needs to be updated to newer build anyways, because, I'm trying the pr locally on an arm64 host for the standalone network, where that image gets past format errors, but errors for real on contract deploys during init due to resource limits on the local network from I've manually installed latest cli - With that in place , i'm able to run but when I run the server - |
@sreuland this one should be working now |
@@ -19,7 +19,7 @@ esac | |||
|
|||
# this is set to the quickstart `soroban-dev` image annointed as the release | |||
# for a given Soroban Release, it is captured on Soroban Releases - https://soroban.stellar.org/docs/reference/releases | |||
QUICKSTART_SOROBAN_DOCKER_SHA=stellar/quickstart:soroban-dev@sha256:a6b03cf6b0433c99f2f799b719f0faadbb79684b1b763e7674ba749fb0f648ee | |||
QUICKSTART_SOROBAN_DOCKER_SHA=stellar/quickstart:soroban-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i had recommended not using pinned version earlier, I think it might be good to re-introduce the pinned version of quickstart though, sorry for churn, the preview11 version of quickstart has changed often as newer rc's coming out, but it looks like rc4 versions of cli/rpc are now in quickstart, and would be best to reference that for now, docker.io/stellar/quickstart:testing@sha256:40636cdb1b9168b47e5dc120949fe3610ff914e8dd43409edb6fa66496bdd9c3
, and avoid regression from latest
un-pinned usage, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quickstart:testing
or quickstart:soroban-dev
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's the quickstart:testing
, docker will resolve the same sha from both docker.io/stellar/quickstart:testing@sha256:40636cdb1b9168b47e5dc120949fe3610ff914e8dd43409edb6fa66496bdd9c3
or docker.io/stellar/quickstart@sha256:40636cdb1b9168b47e5dc120949fe3610ff914e8dd43409edb6fa66496bdd9c3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chadoh , one minor cleanup, can you set QUICKSTART_SOROBAN_DOCKER_SHA=docker.io/stellar/quickstart:testing@sha256:40636cdb1b9168b47e5dc120949fe3610ff914e8dd43409edb6fa66496bdd9c3
, then this pr is done, and ready to merge both @Julian-dev28 and I have tested locally as well.
@@ -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 c7fb7e08ba8efa9828d9df863d991558f269e35b --root ./target soroban-cli --debug" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chadoh , can this be changed now to use a released version of cli like:
install --root ./target [email protected] --debug
@chadoh , I tried latest from pr, it's initializing correctly but the dapp in browser is getting different js error: I did in one terminal:
and in second terminal:
|
@chadoh , I think this error was due to the local 'target' directory on my machine not being wiped as part of dapp init steps so, some older contract was in there, and bindings got generated from that, or at least after purging the target directory and init'ing dapp from npm reset again, this forced new cli, ontract wasm, contract bindings from the wasm to be re-built regardless, and eliminated the error on ts gen code saw earlier, and the dapp loads now. During investigation, I tried following the steps in README for how to init, and it gets pretty complex with different instructions for different networks, so, I took a small step back and tried to consolidate dapp init to always just be I put up PR with these suggestions based on your |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chadoh , looks good, I just tested out standalone and futurenet back to back, and both cases worked, the only thing I found was the 'clean' behavior between resets and put up a pr with a suggestion - AhaLabs/soroban-example-dapp/1
Just tested both cases back to back as well and can confirm this is working |
abundance
source fromtoken
contract at Changes for the next release soroban-examples#277. Note that I did not author most of the changes in thecontracts/abundance
folder. I only copied in the changes originally authored by @leighmcculloch, then updated for the single tweak that thisabundance
contract already had: 1. comments on themint
method; 2. slightly modifiedmint
behavior.Contract
class, rather than a flat bag of functions. Instantiating these contracts is now taken care of inshared/contracts.ts
, with code throughout the rest of the codebase referencing these instances.network
andrpcUrl
used with theinitialize.sh
script. NextJS doesn't allow reading the files we already write (like.soroban-example-dapp/network
), so for now I've alsoecho
d relevant values to ashared/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 usedotenv cross-env
or similar.