From 5eb31ceae915f4289edd27f314979d0a42f55ff1 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Thu, 1 Apr 2021 20:02:34 +0300 Subject: [PATCH] chore: use latest ethabi (#253) * chore: use latest ethabi * chore: use re-exported ethereum types --- Cargo.lock | 6 +++--- ethers-core/Cargo.toml | 4 +--- ethers-core/src/types/i256.rs | 2 +- ethers-core/src/types/mod.rs | 4 ++-- ethers-core/src/utils/hash.rs | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ffd71e89..92f155e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -573,8 +573,9 @@ dependencies = [ [[package]] name = "ethabi" -version = "13.0.0" -source = "git+https://github.com/rust-ethereum/ethabi#a9126613ecd18295f48fa3222eabdc4b65c07392" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c52991643379afc90bfe2df3c64d53983e59c35a82ba6e75c997cfc2880d8524" dependencies = [ "anyhow", "ethereum-types", @@ -689,7 +690,6 @@ dependencies = [ "ecdsa", "elliptic-curve 0.9.5", "ethabi", - "ethereum-types", "ethers", "funty", "futures-util", diff --git a/ethers-core/Cargo.toml b/ethers-core/Cargo.toml index 42bfc959..c4a28b0f 100644 --- a/ethers-core/Cargo.toml +++ b/ethers-core/Cargo.toml @@ -10,10 +10,8 @@ repository = "https://github.com/gakonst/ethers-rs" keywords = ["ethereum", "web3", "celo", "ethers"] [dependencies] -# ethereum related -ethereum-types = { version = "0.11.0", default-features = false } rlp = { version = "0.5.0", default-features = false } -ethabi = { git = "https://github.com/rust-ethereum/ethabi", version = "13.0.0", default-features = false } +ethabi = { version = "14.0.0", default-features = false } arrayvec = { version = "0.5.1", default-features = false } # crypto diff --git a/ethers-core/src/types/i256.rs b/ethers-core/src/types/i256.rs index fee188d0..8dba6ead 100644 --- a/ethers-core/src/types/i256.rs +++ b/ethers-core/src/types/i256.rs @@ -3,7 +3,7 @@ use crate::abi::{InvalidOutputType, Token, Tokenizable}; use crate::types::U256; -use ethereum_types::FromDecStrErr; +use ethabi::ethereum_types::FromDecStrErr; use serde::{Deserialize, Serialize}; use std::cmp; use std::convert::{TryFrom, TryInto}; diff --git a/ethers-core/src/types/mod.rs b/ethers-core/src/types/mod.rs index 47613556..05cba56a 100644 --- a/ethers-core/src/types/mod.rs +++ b/ethers-core/src/types/mod.rs @@ -3,9 +3,9 @@ pub type Selector = [u8; 4]; // Re-export common ethereum datatypes with more specific names /// A transaction Hash -pub use ethereum_types::H256 as TxHash; +pub use ethabi::ethereum_types::H256 as TxHash; -pub use ethereum_types::{Address, Bloom, H160, H256, U128, U256, U64}; +pub use ethabi::ethereum_types::{Address, Bloom, H160, H256, U128, U256, U64}; mod transaction; pub use transaction::{Transaction, TransactionReceipt, TransactionRequest}; diff --git a/ethers-core/src/utils/hash.rs b/ethers-core/src/utils/hash.rs index 20bb39f3..0950c472 100644 --- a/ethers-core/src/utils/hash.rs +++ b/ethers-core/src/utils/hash.rs @@ -1,5 +1,5 @@ //! Various utilities for manipulating Ethereum related dat -use ethereum_types::H256; +use ethabi::ethereum_types::H256; use tiny_keccak::{Hasher, Keccak}; const PREFIX: &str = "\x19Ethereum Signed Message:\n";