I256 implementation (#175)

* Resolve: add I256 implementation

* Resolve: add I256 implementation - Untracked files

* fix: make i256 tests work

Co-authored-by: 1saf <me@ansaf.net>
This commit is contained in:
Georgios Konstantopoulos 2021-01-19 14:21:46 +02:00 committed by GitHub
parent 2769c97018
commit 1b12fd8aff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 1746 additions and 2 deletions

1
Cargo.lock generated
View File

@ -678,6 +678,7 @@ dependencies = [
"glob",
"hex",
"k256",
"once_cell",
"rand 0.7.3",
"rlp",
"serde",

View File

@ -37,6 +37,8 @@ ethers = { version = "0.2", path = "../ethers" }
serde_json = { version = "1.0.53", default-features = false }
bincode = { version = "1.2.1", default-features = false }
once_cell = { version = "1.5.2", default-features = false }
[features]
celo = [] # celo support extends the transaction format with extra fields

View File

@ -3,7 +3,7 @@
#![allow(clippy::all)]
use crate::{
abi::Token,
types::{Address, Bytes, H256, U128, U256},
types::{Address, Bytes, H256, I256, U128, U256},
};
use arrayvec::ArrayVec;
@ -302,7 +302,7 @@ macro_rules! tokenizable_item {
}
tokenizable_item! {
Token, String, Address, H256, U256, U128, bool, Vec<u8>,
Token, String, Address, H256, U256, I256, U128, bool, Vec<u8>,
i8, i16, i32, i64, i128, u16, u32, u64, u128,
}

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,9 @@ pub use ethereum_types::{Address, Bloom, H160, H256, U128, U256, U64};
mod transaction;
pub use transaction::{Transaction, TransactionReceipt, TransactionRequest};
mod i256;
pub use i256::I256;
mod bytes;
pub use self::bytes::Bytes;