calling commitBlock ok
@@ -7,7 +7,7 @@ extern crate web3;
use self::web3::futures::{Future, Stream};
use self::web3::contract::{Contract, Options, CallFuture};
-use self::web3::types::{Address, U256, H256};
+use self::web3::types::{Address, U256, H256, U128, Bytes};
use self::rustc_hex::FromHex;
// extern crate rustc_serialize;
@@ -42,7 +42,7 @@ fn test_web3() {
//println!("Accounts: {:?}", accounts);
- let contract_address = "b036057AC77eBb41DCE9751796Fbaf72dCC83FdF".parse().unwrap();
+ let contract_address = "664d79b5c0C762c83eBd0d1D1D5B048C0b53Ab58".parse().unwrap();
let contract = Contract::from_json(
web3.eth(),
contract_address,
@@ -53,8 +53,13 @@ fn test_web3() {
let r: Result<(), ()> = Ok(());
+ let block_num: u64 = 0;
+ let total_fees: U128 = U128::from_dec_str("0").unwrap();
+ let txDataPacked: Vec<u8> = vec![];
+ let newRoot: H256 = H256::zero();
+
let call_future = contract
- .call("test", (), accounts[0], Options::default())
+ .call("commitBlock", (block_num, total_fees, txDataPacked, newRoot), accounts[0], Options::default())
.then(|tx| {
println!("got tx: {:?}", tx);
Ok(()) as Result<(), ()>
