tomusdrw / rust-web3

Ethereum JSON-RPC multi-transport client. Rust implementation of web3 library. ENS address: rust-web3.eth
MIT License
1.45k stars 466 forks source link

Possible regression from 0.13 to 0.14 #432

Closed elpiel closed 3 years ago

elpiel commented 3 years ago

We have a test that started failing after upgrading to 0.14 that was working before.

The test and the failing call can be found here: https://github.com/AdExNetwork/adex-validator-stack-rust/blob/dev/adapter/src/ethereum.rs#L591-L600

The error I get is:

---- ethereum::test::should_validate_valid_channel_properly stdout ----
thread 'ethereum::test::should_validate_valid_channel_properly' panicked at
'Correct parameters are passed to the constructor.: Abi(Other("hex decode error: Odd number of digits"))',
adapter/src/ethereum.rs:613:14

Which after a quick check in the repo is found here:

0.13: https://github.com/tomusdrw/rust-web3/blob/v0.13.0/src/contract/deploy.rs#L131

0.14: https://github.com/tomusdrw/rust-web3/blob/v0.14.0/src/contract/deploy.rs#L126

elpiel commented 3 years ago

I believe this is caused by a new line \n at the end of the json file we read and use in our deploy. This was working on 0.13