starknet-io / SNIPs

Starknet Improvement Proposal repository
MIT License
158 stars 99 forks source link

SNIP-5 proposal: identify Span with Array #73

Closed ArielElp closed 8 months ago

ArielElp commented 10 months ago

Currently, an interface containing foo(arg: Array<u256>) will result in a different interface-id than an interface with foo(arg: Span<u256>), although the same transaction can interact with both interfaces.

This PR proposes to replace all Span<T> with Array<T> before applying the hash in the interface-id computation. This will keep the existing interface id of accounts as described in SNIP-6, and allow contracts to move away from Array to Span in external functions to benefit from compiler optimization and enjoying lower gas costs.

github-actions[bot] commented 9 months ago

There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale. This PR will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!