diff --git a/compiled/creator.wasm b/compiled/creator.wasm index 9c09f37..c4e3025 100644 Binary files a/compiled/creator.wasm and b/compiled/creator.wasm differ diff --git a/compiled/events.wasm b/compiled/events.wasm index 5307ea0..03e2da9 100644 Binary files a/compiled/events.wasm and b/compiled/events.wasm differ diff --git a/compiled/keccak.wasm b/compiled/keccak.wasm index ea9a67c..19c0802 100644 Binary files a/compiled/keccak.wasm and b/compiled/keccak.wasm differ diff --git a/compiled/math.wasm b/compiled/math.wasm index 4cc50c5..31a0274 100644 Binary files a/compiled/math.wasm and b/compiled/math.wasm differ diff --git a/compiled/setter.wasm b/compiled/setter.wasm index 17a79eb..a8f36f7 100644 Binary files a/compiled/setter.wasm and b/compiled/setter.wasm differ diff --git a/gen/main.rs b/gen/main.rs index f15a232..4bf6fe2 100644 --- a/gen/main.rs +++ b/gen/main.rs @@ -4,8 +4,8 @@ use std::path::PathBuf; fn main() { let args = env::args().collect::>(); let (file_name, pwasm_ethereum_version) = match args.len() { - 2 => (&args[1], r#""0.6.1""#.to_string()), - 3 => (&args[1], format!(r#"{{ git = "https://github.com/paritytech/pwasm-ethereum", features = [{}] }}"#, args[2].split(",").map(|s| format!(r#""{}""#, s)).collect::>().join(", "))), + 2 => (&args[1], r#""0.6.3""#.to_string()), + 3 => (&args[1], format!(r#"{{ version = "0.6.3", features = [{}] }}"#, args[2].split(",").map(|s| format!(r#""{}""#, s)).collect::>().join(", "))), _ => { println!("Usage: {} gen ", args[0]); return; @@ -21,8 +21,8 @@ authors = ["NikVolf "] [dependencies] pwasm-std = "0.10.0" pwasm-ethereum = {} -bigint = {{ version = "4", default-features = false }} -parity-hash = {{ version = "1", default-features = false }} +uint = {{ version = "0.3", default-features = false }} +parity-hash = {{ version = "1.2.2", default-features = false }} [lib] name = "$file_name" diff --git a/src/creator.rs b/src/creator.rs index 1e7c9cc..0895ebf 100644 --- a/src/creator.rs +++ b/src/creator.rs @@ -2,12 +2,14 @@ extern crate pwasm_std; extern crate pwasm_ethereum; -extern crate bigint; +extern crate uint; + extern crate parity_hash as hash; use pwasm_std::logger; use pwasm_ethereum::{input, ret, create, create2, value}; -use bigint::U256; + +use uint::U256; use hash::H256; #[no_mangle] diff --git a/src/externs.rs b/src/externs.rs index 058f95b..87f9b53 100644 --- a/src/externs.rs +++ b/src/externs.rs @@ -2,11 +2,11 @@ extern crate pwasm_std; extern crate pwasm_ethereum; -extern crate bigint; +extern crate uint; use pwasm_std::{Vec, write_u64}; use pwasm_ethereum::{self as ext}; -use bigint::U256; +use uint::U256; fn push_u64(buf: &mut Vec, val: u64) { let mut slc = [0u8; 8]; diff --git a/src/logger.rs b/src/logger.rs index fd981a5..001470d 100644 --- a/src/logger.rs +++ b/src/logger.rs @@ -2,11 +2,11 @@ extern crate pwasm_std; extern crate pwasm_ethereum as ext; -extern crate bigint; +extern crate uint; use pwasm_std::write_u32; use pwasm_std::hash::H256; -use bigint::U256; +use uint::U256; fn set_key_from_addr(key: u32, val: &[u8]) { let mut full_key = [0u8; 32]; diff --git a/src/math.rs b/src/math.rs index ebe3329..204715a 100644 --- a/src/math.rs +++ b/src/math.rs @@ -1,9 +1,11 @@ #![no_std] -extern crate bigint; +extern crate uint; + extern crate pwasm_ethereum; use pwasm_ethereum::{ret, input}; +use uint::U256; #[no_mangle] pub fn call() { @@ -12,8 +14,8 @@ pub fn call() { ret(&{ let code = input[0]; - let a_param: bigint::U256 = (&input[1..33]).into(); - let b_param: bigint::U256 = (&input[33..65]).into(); + let a_param: U256 = (&input[1..33]).into(); + let b_param: U256 = (&input[33..65]).into(); let result = match code { 0 => { a_param + b_param },