Skip to content

Commit 797c209

Browse files
authored
Merge pull request #63 from ewasm/api-0.8
Update to ewasm-api 0.8
2 parents 3e7692e + 90a7b0a commit 797c209

File tree

16 files changed

+17
-17
lines changed

16 files changed

+17
-17
lines changed

blake2/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ edition = "2018"
1010

1111
[dependencies]
1212
blake2 = "0.7"
13-
ewasm_api = "0.6"
13+
ewasm_api = "0.8"
1414

1515
[lib]
1616
crate-type = ["cdylib"]

bls12pairing/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ publish = false
99
edition = "2018"
1010

1111
[dependencies]
12-
ewasm_api = "0.6"
12+
ewasm_api = "0.8"
1313
ethereum-bls12 = { git = "https://github.com/ewasm/ethereum-bls12.rs", tag = "0.1.1" }
1414
parity-bytes = { git = "https://github.com/paritytech/parity-common", version = "0.1.0" }
1515

ecadd/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ publish = false
99
edition = "2018"
1010

1111
[dependencies]
12-
ewasm_api = "0.6"
12+
ewasm_api = "0.8"
1313
ethereum-bn128 = { git = "https://github.com/ewasm/ethereum-bn128.rs", tag = "0.0.1" }
1414
parity-bytes = { git = "https://github.com/paritytech/parity-common", version = "0.1.0" }
1515

ecadd/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ pub extern "C" fn main() {
1717
let mut output = [0u8; 64];
1818
match ethereum_bn128::bn128_add(&input[..], &mut BytesRef::Fixed(&mut output[..])) {
1919
Ok(_) => ewasm_api::finish_data(&output),
20-
Err(_) => panic!(),
20+
Err(_) => ewasm_api::abort(),
2121
}
2222
}

ecmul/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ publish = false
99
edition = "2018"
1010

1111
[dependencies]
12-
ewasm_api = "0.6"
12+
ewasm_api = "0.8"
1313
ethereum-bn128 = { git = "https://github.com/ewasm/ethereum-bn128.rs", tag = "0.0.1" }
1414
parity-bytes = { git = "https://github.com/paritytech/parity-common", version = "0.1.0" }
1515

ecmul/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ pub extern "C" fn main() {
1717
let mut output = [0u8; 64];
1818
match ethereum_bn128::bn128_mul(&input[..], &mut BytesRef::Fixed(&mut output[..])) {
1919
Ok(_) => ewasm_api::finish_data(&output),
20-
Err(_) => panic!(),
20+
Err(_) => ewasm_api::abort(),
2121
}
2222
}

ecpairing/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ publish = false
99
edition = "2018"
1010

1111
[dependencies]
12-
ewasm_api = "0.6"
12+
ewasm_api = "0.8"
1313
ethereum-bn128 = { git = "https://github.com/ewasm/ethereum-bn128.rs", tag = "0.0.1" }
1414
parity-bytes = { git = "https://github.com/paritytech/parity-common", version = "0.1.0" }
1515

ecpairing/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub extern "C" fn main() {
1212
// NOTE: this validation will also be done by bn128_pairing
1313

1414
if length % 192 != 0 {
15-
panic!();
15+
ewasm_api::abort();
1616
}
1717

1818
// charge a base fee plus a word fee for every element
@@ -27,6 +27,6 @@ pub extern "C" fn main() {
2727
let mut output = [0u8; 32];
2828
match ethereum_bn128::bn128_pairing(&input[..], &mut BytesRef::Fixed(&mut output[..])) {
2929
Ok(_) => ewasm_api::finish_data(&output),
30-
Err(_) => panic!(),
30+
Err(_) => ewasm_api::abort(),
3131
}
3232
}

ecrecover/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ publish = false
99
edition = "2018"
1010

1111
[dependencies]
12-
ewasm_api = "0.6"
12+
ewasm_api = "0.8"
1313
libsecp256k1 = "^0.2.1"
1414
sha3 = "^0.6"
1515

ed25519/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ publish = false
99
edition = "2018"
1010

1111
[dependencies]
12-
ewasm_api = "0.6"
12+
ewasm_api = "0.8"
1313
parity-bytes = { git = "https://github.com/paritytech/parity-common", version = "0.1.0" }
1414
hex = "0.3.1"
1515
sha2 = "0.7.1"

0 commit comments

Comments
 (0)