cowprotocol / ethcontract-rs

Generate type-safe bindings for interacting with Ethereum contracts.
Apache License 2.0
307 stars 45 forks source link

Turn U256::from to U256::from_big_endian #946

Closed fleupold closed 1 year ago

fleupold commented 1 year ago

Fixes @nlordell comment on #944

I don't think it's worth releasing a version with this, as the U256 from bytes documentation ensures it's always interpreted as big endian: https://docs.rs/uint/latest/src/uint/uint.rs.html#1363

Test Plan

KMS example still works

nlordell commented 1 year ago

I don't think it's worth releasing a version with this

Agreed. This was mostly about From not having a strict contract that "U256 from big endian bytes". It was mostly a nit about code intent.