stellar / rs-soroban-sdk

Rust SDK for Soroban contracts.
Apache License 2.0
118 stars 66 forks source link

Remove event topics length limit; refactor tuple code into separate file #1263

Closed jayz22 closed 4 months ago

jayz22 commented 4 months ago

What

Resolves https://github.com/stellar/rs-soroban-sdk/issues/480 Plus a minor enhancement to impl_topics_for_tuple for tuple up to size 13.

Why

The event topics length limit was a residual from an earlier design, where the limit was set to 4, matching with what's in Ethereum. Since then the length limit has been removed, but sdk has not been updated, so the user still can only submit events with topic length <=4. Expanding impl_topics_for_tuple makes it more convenient to construct longer topics (up to 13). Constructing topics from a Vec<T> does not subject to any length limit.

Known limitations

[TODO or N/A]