Closed yrashk closed 6 years ago
@akolotov is there anything holding this PR from merging that I can address?
@yrashk could you provide environment dependencies and a manual which I could use to verify your changes?
Dependencies: parity
and solc
in PATH, Rust 1.24+, cd integration-tests && cargo test
and wait. Please let me know if this helps.
Thanks! I will check it this evening and if everything is OK will merge the changes.
@yrashk I cannot run the tests. The following error appears:
Compiling web3 v0.2.0 (https://github.com/tomusdrw/rust-web3?branch=bridge#aad14c09)
Compiling integration-tests v0.1.0 (file:///home/koal/git_repos/PR_test/parity-bridge/integration-tests)
error: proc-macro derive panicked
--> tests/basic_deposit_then_withdraw.rs:17:1
|
17 | use_contract!(token, "Token", "../compiled_contracts/Token.abi");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: message: `derive(EthabiContract)` failed: Error(Msg("Cannot load contract abi from `/home/koal/git_repos/PR_test/parity-bridge/integration-tests/../compiled_contracts/Token.abi`"), State { next_error: Some(Error { repr: Os { code: 2, message: "No such file or directory" } }), backtrace: None })
= note: this error originates in a macro outside of the current crate
error: Could not compile `integration-tests`.
To learn more, run the command again with --verbose.
If I list the content of directory ../compiled_contracts/
, there is no Token.abi
file there:
$ ll ../compiled_contracts/
total 76
-rw-rw-r--. 1 koal koal 882 Mar 9 10:14 ERC20.abi
-rw-rw-r--. 1 koal koal 0 Mar 9 10:14 ERC20.bin
-rw-rw-r--. 1 koal koal 2719 Mar 9 10:14 ForeignBridge.abi
-rw-rw-r--. 1 koal koal 8134 Mar 9 10:14 ForeignBridge.bin
-rw-rw-r--. 1 koal koal 2 Mar 9 10:14 Helpers.abi
-rw-rw-r--. 1 koal koal 160 Mar 9 10:14 Helpers.bin
-rw-rw-r--. 1 koal koal 797 Mar 9 10:14 HelpersTest.abi
-rw-rw-r--. 1 koal koal 3782 Mar 9 10:14 HelpersTest.bin
-rw-rw-r--. 1 koal koal 1399 Mar 9 10:14 HomeBridge.abi
-rw-rw-r--. 1 koal koal 5000 Mar 9 10:14 HomeBridge.bin
-rw-rw-r--. 1 koal koal 2 Mar 9 10:14 Message.abi
-rw-rw-r--. 1 koal koal 160 Mar 9 10:14 Message.bin
-rw-rw-r--. 1 koal koal 2 Mar 9 10:14 MessageSigning.abi
-rw-rw-r--. 1 koal koal 160 Mar 9 10:14 MessageSigning.bin
-rw-rw-r--. 1 koal koal 241 Mar 9 10:14 MessageSigningTest.abi
-rw-rw-r--. 1 koal koal 2242 Mar 9 10:14 MessageSigningTest.bin
-rw-rw-r--. 1 koal koal 746 Mar 9 10:14 MessageTest.abi
-rw-rw-r--. 1 koal koal 1250 Mar 9 10:14 MessageTest.bin
My bad. Forgot to add a build scripy for tokens. Can you try now?
Seems it is OK now. I ran it with PATH=/opt/ethereum-go/bin:/opt/parity/:$PATH cargo test
.
Solution: map it to the API used in bridge.sol