detect changes in safe_contract

This commit is contained in:
Robert Habermeier
2017-04-12 22:10:18 +02:00
parent 34a1512ff0
commit b4f3e30cd6
3 changed files with 132 additions and 11 deletions

View File

@@ -47,7 +47,7 @@ pub fn generate_module(struct_name: &str, abi: &str) -> Result<String, Error> {
Ok(format!(r##"
use byteorder::{{BigEndian, ByteOrder}};
use futures::{{future, Future, IntoFuture, BoxFuture}};
use ethabi::{{Contract, Interface, Token}};
use ethabi::{{Contract, Interface, Token, Event}};
use util::{{self, Uint}};
pub struct {name} {{
@@ -70,6 +70,11 @@ impl {name} {{
}}
}}
/// Access the underlying `ethabi` contract.
pub fn contract(this: &Self) -> &Contract {{
&this.contract
}}
{functions}
}}
"##,