contract-address

Crates.iocontract-address
lib.rscontract-address
version0.6.0
sourcesrc
created_at2019-08-12 14:23:59.933159
updated_at2021-01-27 16:54:24.555559
descriptionA utility crate to create an ethereum contract address
homepagehttps://github.com/paritytech/parity-common
repositoryhttps://github.com/paritytech/parity-common
max_upload_size
id156140
size6,863
Core devs (github:paritytech:core-devs)

documentation

https://docs.rs/contract-address/

README

Contract address

Provides a function to create an ethereum contract address.

Examples

Create an ethereum address from sender and nonce.

use contract_address::{
	Address, U256, ContractAddress
};
use std::str::FromStr;

let sender = Address::from_str("0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6").unwrap();
let contract_address = ContractAddress::from_sender_and_nonce(&sender, &U256::zero());
Commit count: 1615

cargo fmt