implemented eth_call

This commit is contained in:
debris
2016-03-19 21:37:11 +01:00
parent bc5df9c908
commit 521f2a1433
6 changed files with 69 additions and 1 deletions

View File

@@ -490,6 +490,8 @@ pub trait Uint: Sized + Default + FromStr + From<u64> + fmt::Debug + fmt::Displa
fn zero() -> Self;
/// Returns new instance equalling one.
fn one() -> Self;
/// Returns the largest value that can be represented by this integer type.
fn max_value() -> Self;
/// Error type for converting from a decimal string.
type FromDecStrErr;
@@ -647,6 +649,15 @@ macro_rules! construct_uint {
From::from(1u64)
}
#[inline]
fn max_value() -> Self {
let mut result = [0; $n_words];
for i in 0..$n_words {
result[i] = u64::max_value();
}
$name(result)
}
/// Fast exponentation by squaring
/// https://en.wikipedia.org/wiki/Exponentiation_by_squaring
fn pow(self, expon: Self) -> Self {