stellar / rs-soroban-env

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

Allow `Budget::try_from_configs` inputs to be less than current xdr-defined count #1407

Closed jayz22 closed 2 months ago

jayz22 commented 2 months ago

What

Resolves #1388

Why

The current way of constructing the Budget from config enforces the config size must match the protocol-defined count (ContractCostType::variants().len()). While this ensures the validity of the config entry for the current protocol, it does not take into consideration config from an earlier protocol, with fewer number of cost types.

Known limitations

[TODO or N/A]