OffchainLabs / stylus-sdk-rs

Rust Smart Contracts on Arbitrum
239 stars 79 forks source link

Old alloy dependencies (EIP-712 nested struct hashing bug) #93

Closed edburmai closed 4 months ago

edburmai commented 10 months ago

Currently, stylus-sdk-rs depends on alloy-primitives and alloy-sol-types version 0.3.1. This version contains a known EIP-712 nested struct hashing bug (https://github.com/alloy-rs/core/issues/257).

Example: eip712_signing_hash for Mail produces an incorrect hash.

sol! {
      struct Person {
          string name;
          address wallet;
      }

      struct Mail {
          Person from;
          Person to;
          string contents;
      }
  }
rory-ocl commented 4 months ago

Duplicate of #125