From 4565188c6a12c04f260b601d218d15b689e09d29 Mon Sep 17 00:00:00 2001 From: Hans Svensson Date: Mon, 3 Feb 2020 13:19:08 +0100 Subject: [PATCH] Add AENS_LOOKUP and ORACLE_EXPIRY as FATE operations --- quickcheck/aefate_code_eqc.erl | 2 +- src/aeb_fate_generate_ops.erl | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/quickcheck/aefate_code_eqc.erl b/quickcheck/aefate_code_eqc.erl index bda66bf..ad66074 100644 --- a/quickcheck/aefate_code_eqc.erl +++ b/quickcheck/aefate_code_eqc.erl @@ -77,7 +77,7 @@ prop_opcodes() -> valid_opcodes() -> - lists:seq(0, 16#80) ++ lists:seq(16#fa, 16#fd). + lists:seq(0, 16#9a) ++ lists:seq(16#fa, 16#fd). fate_code(Failure) -> diff --git a/src/aeb_fate_generate_ops.erl b/src/aeb_fate_generate_ops.erl index f9fc4f2..da0e853 100644 --- a/src/aeb_fate_generate_ops.erl +++ b/src/aeb_fate_generate_ops.erl @@ -209,6 +209,9 @@ ops_defs() -> , { 'BLS12_381_FR_TO_INT', 16#97, false, true, true, 30, [a,a], bls12_381_fr_to_int, {tuple}, tuple, "Arg0 := from_montgomery(Arg1) - Convert montgomery representation (32 bytes) to integer"} , { 'BLS12_381_FP_TO_INT', 16#98, false, true, true, 30, [a,a], bls12_381_fp_to_int, {tuple}, tuple, "Arg0 := from_montgomery(Arg1) - Convert montgomery representation (48 bytes) to integer"} + , { 'AENS_LOOKUP', 16#99, false, false, true, 100, [a,a], aens_lookup, {string}, variant, "Lookup the name of Arg0. Returns option(AENS.name)"} + , { 'ORACLE_EXPIRY', 16#9a, false, false, true, 100, [a,a], oracle_expiry, {oracle}, int, "Arg0 := expiry block for oracle Arg1"} + , { 'DEACTIVATE', 16#fa, false, true, true, 10, [], deactivate, {}, none, "Mark the current contract for deactivation."} , { 'ABORT', 16#fb, true, true, true, 10, [a], abort, {string}, none, "Abort execution (dont use all gas) with error message in Arg0."} , { 'EXIT', 16#fc, true, true, true, 10, [a], exit, {string}, none, "Abort execution (use upp all gas) with error message in Arg0."}