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

contract_a's checked_add fails before .expect #282

Open
willemneal opened this issue Sep 18, 2023 · 0 comments
Open

contract_a's checked_add fails before .expect #282

willemneal opened this issue Sep 18, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@willemneal
Copy link
Member

What version are you using?

Current main branch

What did you do?

Updated contract_a to use 20.0.0-rc1. Deployed to futurenet.

Then invoked with an overflow.

I tried with and without overflow checks in the Cargo.toml, but I find it strange that using a checked_add would panic.

What did you expect to see?

Message from .expect("no overflow")

What did you see instead?

SOROBAN_NETWORK=futurenet soroban contract invoke --id $(cat contract_a.txt) -- add --x 4294967295 --y 1

2023-09-18T17:21:09.186326Z ERROR soroban_cli::log::diagnostic_event: 0: "AAAAAAAAAAAAAAAAAAAAAgAAAAAAAAADAAAADwAAAAdmbl9jYWxsAAAAAA0AAAAg0meKu45LxAmN2TJiGUopC4etdHqFmWfIAkGZLz2WMW4AAAAPAAAAA2FkZAAAAAAQAAAAAQAAAAIAAAAD/////wAAAAMAAAAB"
error: transaction simulation failed: host invocation failed

Caused by:
    HostError: Error(WasmVm, InvalidAction)
    DebugInfo not available
    

@willemneal willemneal added the bug Something isn't working label Sep 18, 2023
@willemneal willemneal changed the title contract_a's checked add fails before .expect contract_a's checked_add fails before .expect Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
@willemneal and others