| Crates.io | alloy-ethers-typecast |
| lib.rs | alloy-ethers-typecast |
| version | 0.2.0 |
| created_at | 2024-01-01 05:18:46.42098+00 |
| updated_at | 2024-01-01 15:09:59.258622+00 |
| description | Crate for safe typecasting between ethers and alloy types |
| homepage | https://github.com/rainlanguage/rain.interpreter |
| repository | |
| max_upload_size | |
| id | 1085165 |
| size | 5,969 |
Currently supporting type conversion for:
ethers::types::H160 to alloy_primitives::Addressalloy_primitives::Address to ethers::types::H160ethers::types::U256 to alloy_primitives::U256alloy_primitives::U256 to ethers::types::U256ethers::types::Bytes to alloy_primitives::Bytesalloy_primitives::Bytes to ethers::types::Byteslet ethers_address: ethers::types::H160 = ethers::types::H160::random();
let alloy_address: alloy_primitives::Address = ethers_address_to_alloy(ethers_address);
let ethers_u256: ethers::types::U256 = ethers::types::U256::from_dec_str("126731272983");
let alloy_u256: alloy_primitives::U256 = ethers_u256_to_alloy(ethers_u256);