stellar / rs-soroban-env

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

Validate `Asset` when wrapping a SAC #1262

Closed dmkozh closed 9 months ago

dmkozh commented 9 months ago

Core enforces a set of rules on the Asset XDR structure when establishing a trustline. SAC doesn't do that, so it's possible to 'wrap' an asset that may never exist in core and then mint it on Soroban. This might be misleading/error-prone, so we should implement the same validation logic in Host as in Core.