You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having this custom sol struct with i128 numbers, i find that snippet 1 works and it results in a correct hash, but snippet 2 doesnt, showing a "number out of range" error. i think this is cause snippet2 function will use serde::json serialization while first 1 wont
oh yeah, you're definitely running into underlying serde_json i/u128 precision limitations. This will likely require changes to the sol macro or the sol-types data model 🤔
Component
primitives
What version of Alloy are you on?
alloy-core 0.7.2
Operating System
Linux
Describe the bug
Having this custom sol struct with i128 numbers, i find that snippet 1 works and it results in a correct hash, but snippet 2 doesnt, showing a "number out of range" error. i think this is cause snippet2 function will use serde::json serialization while first 1 wont
Snippet 1
let sig: FixedBytes<32> = msg.eip712_signing_hash(&(domain.clone()));
info!("sig 1 {:?}", sig);
Snippet 1
info!("st {:?} {:?}", TypedData::from_struct(&msg, Some(domain)).eip712_signing_hash(), sig);
info!("sig 2 {:?}", sig);
The text was updated successfully, but these errors were encountered: