Stabilize ecdsa_ functions (#11486)

This commit is contained in:
Alexander Gryaznov
2022-05-20 14:20:41 +03:00
committed by GitHub
parent 927019a734
commit c0fb033206
5 changed files with 7 additions and 17 deletions
+2 -5
View File
@@ -1059,7 +1059,6 @@ mod tests {
);
}
#[cfg(feature = "unstable-interface")]
const CODE_ECDSA_RECOVER: &str = r#"
(module
;; seal_ecdsa_recover(
@@ -1067,7 +1066,7 @@ mod tests {
;; message_hash_ptr: u32,
;; output_ptr: u32
;; ) -> u32
(import "__unstable__" "seal_ecdsa_recover" (func $seal_ecdsa_recover (param i32 i32 i32) (result i32)))
(import "seal0" "seal_ecdsa_recover" (func $seal_ecdsa_recover (param i32 i32 i32) (result i32)))
(import "env" "memory" (memory 1 1))
(func (export "call")
(drop
@@ -1097,7 +1096,6 @@ mod tests {
"#;
#[test]
#[cfg(feature = "unstable-interface")]
fn contract_ecdsa_recover() {
let mut mock_ext = MockExt::default();
assert_ok!(execute(&CODE_ECDSA_RECOVER, vec![], &mut mock_ext));
@@ -1105,13 +1103,12 @@ mod tests {
}
#[test]
#[cfg(feature = "unstable-interface")]
fn contract_ecdsa_to_eth_address() {
/// calls `seal_ecdsa_to_eth_address` for the contstant and ensures the result equals the
/// expected one.
const CODE_ECDSA_TO_ETH_ADDRESS: &str = r#"
(module
(import "__unstable__" "seal_ecdsa_to_eth_address" (func $seal_ecdsa_to_eth_address (param i32 i32) (result i32)))
(import "seal0" "seal_ecdsa_to_eth_address" (func $seal_ecdsa_to_eth_address (param i32 i32) (result i32)))
(import "seal0" "seal_return" (func $seal_return (param i32 i32 i32)))
(import "env" "memory" (memory 1 1))