stellar / rs-soroban-env

Rust environment for Soroban contracts.
Apache License 2.0
59 stars 40 forks source link

Remove ConversionError from ScVal/Val conversions #1339

Closed graydon closed 6 months ago

graydon commented 6 months ago

This is as minimal a change as I could manage to remove ConversionError from the ScVal/Val conversion paths, allowing Error codes to flow through (eg. invalid inputs or, more importantly, budget exhaustion or the like).

This is observable, and it does break public API (contra semver) so .. we should be sure if we want to do it. It also has a corresponding SDK change I'll post shortly. But I think it's very worthwhile and one of the last bugs I really wanted to fix before locking things down. Didn't think we'd be able to, but it looks like enough got cleaned up in the meantime that it was possible.

Fixes #1076 Fixes #1046