Registry / crypto / alloy-sol-types

alloy-sol-types

JSON →
library1.6.0rscratesunverified

Compile-time ABI and EIP-712 implementations.

# Cargo.toml [dependencies] alloy-sol-types = "1.6.0"
INSTALL
IMPORT
SIG · ALLOY-SOL-TYPES
A
alloy-sol-types
cryptorustv1.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SolValue
use alloy_sol_types::SolValue;

ABI-encode a Solidity value.

use alloy_sol_types::SolValue; fn main() { let value: u256 = 42.into(); let encoded = value.abi_encode(); println!("Encoded: {:?}", encoded); }
Debug
Known issues
gotchaRequires the `sol!` macro from `alloy-sol-macro` for complex types.
fix
Add `alloy-sol-macro` as a dependency and use `sol!` to define types.
affects: >=1.0.0
Upgrade
Version history
1.6.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
35 hits · last 30 days
node
32
Resources
alloy-sol-types — cargo add alloy-sol-types · libregistry