Skip to content

Commit

Permalink
Merge pull request rust-ethereum#155 from paritytech/dp/fix/edition-2018
Browse files Browse the repository at this point in the history
Fix for use in edition 2018 crates
  • Loading branch information
dvdplm authored Aug 8, 2019
2 parents 43cb5c6 + 7333a1f commit 0dd94b3
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 49 deletions.
47 changes: 16 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contract/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ethabi-contract"
version = "8.0.0"
version = "8.0.1"
authors = ["Parity Technologies <[email protected]>"]
homepage = "https://github.com/paritytech/ethabi"
license = "MIT/Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion contract/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ macro_rules! use_contract {
#[allow(unused_mut)]
#[allow(unused_variables)]
pub mod $module {
#[derive(EthabiContract)]
#[derive(ethabi_derive::EthabiContract)]
#[ethabi_contract_options(path = $path)]
struct _Dummy;
}
Expand Down
4 changes: 2 additions & 2 deletions ethabi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ethabi"
version = "8.0.0"
version = "8.0.1"
authors = ["Parity Technologies <[email protected]>"]
homepage = "https://github.com/paritytech/ethabi"
license = "MIT/Apache-2.0"
Expand All @@ -17,7 +17,7 @@ error-chain = { version = "0.12", default-features = false }
ethereum-types = "0.6.0"

[dev-dependencies]
hex-literal = "0.1.1"
hex-literal = "0.2.0"
paste = "0.1.5"

[features]
Expand Down
5 changes: 3 additions & 2 deletions tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[package]
name = "ethabi-tests"
version = "0.1.0"
version = "0.1.1"
authors = ["debris <[email protected]>"]
edition = "2018"

[dependencies]
ethabi = { path = "../ethabi" }
ethabi-derive = { path = "../derive" }
ethabi-contract = { path = "../contract" }
rustc-hex = "2.0"
hex-literal = "0.1.1"
hex-literal = "0.2.0"
15 changes: 3 additions & 12 deletions tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@
#![deny(dead_code)]
#![deny(unused_imports)]

extern crate rustc_hex;
extern crate ethabi;
#[macro_use]
extern crate ethabi_derive;
#[macro_use]
extern crate ethabi_contract;
#[cfg(test)]
#[macro_use]
extern crate hex_literal;
use ethabi_contract::use_contract;

use_contract!(eip20, "../res/eip20.abi");
use_contract!(constructor, "../res/constructor.abi");
Expand All @@ -25,6 +17,8 @@ use_contract!(test_rust_keywords, "../res/test_rust_keywords.abi");
mod tests {
use rustc_hex::ToHex;
use ethabi::{Address, Uint};
use hex_literal::hex;
use crate::{validators, eip20};

struct Wrapper([u8; 20]);

Expand Down Expand Up @@ -57,7 +51,6 @@ mod tests {

// given

use eip20;
let output = hex!("000000000000000000000000000000000000000000000000000000000036455B").to_vec();

// when
Expand Down Expand Up @@ -107,8 +100,6 @@ mod tests {

#[test]
fn encoding_input_works() {
use eip20;

let expected = "dd62ed3e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010101010101010101010101010101010101".to_owned();
let owner = [0u8; 20];
let spender = [1u8; 20];
Expand Down

0 comments on commit 0dd94b3

Please sign in to comment.