stellar / soroban-example-dapp

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

update soroban-example-dapp with token interface changes #106

Closed tsachiherman closed 1 year ago

tsachiherman commented 1 year ago

What ?

update soroban-example-dapp with token interface changes

paulbellamy commented 1 year ago

Seems like https://github.com/stellar/soroban-example-dapp/pull/105 also updated the token interface incidentally. It's nice as a separate PR, though, so it would be cleaner (but more work) to merge this one, and then rebase/merge #105 on top of that. Or we could just merge #105 when it is ready to go out. Up to you @tsachiherman

tsachiherman commented 1 year ago

Seems like #105 also updated the token interface incidentally. It's nice as a separate PR, though, so it would be cleaner (but more work) to merge this one, and then rebase/merge #105 on top of that. Or we could just merge #105 when it is ready to go out. Up to you @tsachiherman

I'm not sure why @sreuland was updating the token interface as part of his PR. It wasn't required in order to complete the task.. I'm not really picky on which one of these would get merged, but I'd like to merge these asap. The token interface support is a release blocker that I'd like to put behind asap.

sreuland commented 1 year ago

I'm not really picky on which one of these would get merged, but I'd like to merge these asap. The token interface support is a release blocker that I'd like to put behind asap.

yes, merge here first sounds good, I'll port into https://github.com/stellar/soroban-example-dapp/pull/105.

sreuland commented 1 year ago

@tsachiherman , the bump in soroban-sdk version appears to not be backwards compatible for the preview8 version of soroban core ref'd in quickstart.sh and soroban-cli@0.7.0/0.7.1 , I tried running the PR locally to verify, am seeing issue when running initialize.sh, it's unable to invoke function on the crowdfund contract, getting a preflight error:

shawns-MacBook-Pro:soroban-example-dapp sreuland$ ./initialize.sh standalone
...
Contract deployed succesfully with ID: d24903e9a9329eac6659d9e761cf11e8b759736fadd8d6e55c8c6d0cf02a74ac
Initialize the crowdfund contract
error: transaction simulation failed: HostError
Value: Status(HostFunctionError(InputArgsInvalid))

Debug events (newest first):
   0: "Debug unexpected environment interface version"

Backtrace (newest first):
   0: soroban_env_host::host::err_helper::<impl soroban_env_host::host::Host>::err
   1: soroban_env_host::host::err_helper::<impl soroban_env_host::host::Host>::err_status_msg
   2: soroban_env_host::vm::Vm::new
   3: soroban_env_host::host::Host::call_n_internal
   4: soroban_env_host::host::Host::invoke_function
   5: preflight::preflight_host_function_or_maybe_panic
   6: preflight_host_function
   7: _cgo_4d6fbd5954a9_Cfunc_preflight_host_function
             at /tmp/go-build/cgo-gcc-prolog:79:11
   8: runtime.asmcgocall
             at ./runtime/asm_arm64.s:973

should we try to find a version of cli/rpc/core that will work for the new/interim soroban-sdk ref'd here? This version compatibility was similar concern noticed on pr #105 and decided to put it in draft and merge once preview 9 versions are known.

tsachiherman commented 1 year ago

@tsachiherman , the bump in soroban-sdk version appears to not be backwards compatible for the preview8 version of soroban core ref'd in quickstart.sh and soroban-cli@0.7.0/0.7.1 , I tried running the PR locally to verify, am seeing issue when running initialize.sh, it's unable to invoke function on the crowdfund contract, getting a preflight error:

shawns-MacBook-Pro:soroban-example-dapp sreuland$ ./initialize.sh standalone
...
Contract deployed succesfully with ID: d24903e9a9329eac6659d9e761cf11e8b759736fadd8d6e55c8c6d0cf02a74ac
Initialize the crowdfund contract
error: transaction simulation failed: HostError
Value: Status(HostFunctionError(InputArgsInvalid))

Debug events (newest first):
   0: "Debug unexpected environment interface version"

Backtrace (newest first):
   0: soroban_env_host::host::err_helper::<impl soroban_env_host::host::Host>::err
   1: soroban_env_host::host::err_helper::<impl soroban_env_host::host::Host>::err_status_msg
   2: soroban_env_host::vm::Vm::new
   3: soroban_env_host::host::Host::call_n_internal
   4: soroban_env_host::host::Host::invoke_function
   5: preflight::preflight_host_function_or_maybe_panic
   6: preflight_host_function
   7: _cgo_4d6fbd5954a9_Cfunc_preflight_host_function
             at /tmp/go-build/cgo-gcc-prolog:79:11
   8: runtime.asmcgocall
             at ./runtime/asm_arm64.s:973

should we try to find a version of cli/rpc/core that will work for the new/interim soroban-sdk ref'd here? This version compatibility was similar concern noticed on pr #105 and decided to put it in draft and merge once preview 9 versions are known.

We're already in release period - so I don't honestly care that much about breaking stuff if we'll be fixing it shortly. However, given that we don't have much more in this case, I think that it makes sense to punt on this PR until the core release is there.

sreuland commented 1 year ago

105 is pulling in latest component releases for preview9, ideally to be functional as early integration test once system dependencies are in place - https://github.com/stellar/soroban-example-dapp/pull/105/commits/fec9c825c8da5af1bd298dea57f2c746e8f53819, it's a superset of this pr, so this can probably be closed, #105 will be merged as part of release of dapp for preview9.

sreuland commented 1 year ago

@tsachiherman , I think we should close this, #105 merged, it did the same changes.