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
use alloy_primitives::{U256,U8};use alloy_sol_types::SolValue;fnmain(){let data = U256::from(0);let encoded:Vec<u8> = data.abi_encode();let data2 = U8::from(0);let encoded:Vec<u8> = data2.abi_encode();// let encoded: Vec<u8> = alloy_primitives::Uint::<8, 1>::abi_encode(&data2);}
It will give the error: no method named abi_encodefound for structalloy_primitives::Uint in the current scope for the U8 data.
The above U256 has no errors.
The text was updated successfully, but these errors were encountered:
Component
sol-types
What version of Alloy are you on?
lastest version, 0.8.18
Operating System
Linux
Describe the bug
It will give the error:
no method named
abi_encodefound for struct
alloy_primitives::Uintin the current scope
for the U8 data.The above U256 has no errors.
The text was updated successfully, but these errors were encountered: