stellar / soroban-examples

Example Soroban Contracts
Apache License 2.0
57 stars 60 forks source link

`contract_a`'s checked_add fails before `.expect` #282

Open willemneal opened 11 months ago

willemneal commented 11 months ago

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