From 506f9ca72ea5df5fb2abd3aaddcbf9d58423e556 Mon Sep 17 00:00:00 2001 From: Hans Svensson Date: Tue, 11 Jun 2019 13:29:29 +0200 Subject: [PATCH] Add AUTH_TX_HASH operation --- src/aeb_fate_generate_ops.erl | 1 + test/asm_code/all_instructions.fate | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/aeb_fate_generate_ops.erl b/src/aeb_fate_generate_ops.erl index 757ecb2..1458a34 100644 --- a/src/aeb_fate_generate_ops.erl +++ b/src/aeb_fate_generate_ops.erl @@ -166,6 +166,7 @@ ops_defs() -> , { 'ECVERIFY_SECP256K1', 16#73, false, 1300, [a,a,a,a], ecverify_secp256k1, {hash, signature, signature}, boolean, "Arg0 := ecverify_secp256k1(Hash, PubKey, Signature)"} , { 'CONTRACT_TO_ADDRESS', 16#74, false, 3, [a,a], contract_to_address, {contract}, address, "Arg0 := Arg1 - A no-op type conversion"} + , { 'AUTH_TX_HASH', 16#75, false, 3, [a], auth_tx_hash, {}, variant, "If in GA authentication context return Some(TxHash) otherwise None."} , { 'DEACTIVATE', 16#fa, false, 3, [], deactivate, {}, none, "Mark the current contract for deactivation."} , { 'ABORT', 16#fb, true, 3, [a], abort, {string}, none, "Abort execution (dont use all gas) with error message in Arg0."} diff --git a/test/asm_code/all_instructions.fate b/test/asm_code/all_instructions.fate index d40dbbb..0516967 100644 --- a/test/asm_code/all_instructions.fate +++ b/test/asm_code/all_instructions.fate @@ -243,3 +243,7 @@ FUNCTION foo () : {tuple, []} BALANCE_OTHER a arg0 SETELEMENT a 2 (1, "two", 3) 2 + + AUTH_TX_HASH + + CONTRACT_TO_ADDRESS @ct_nv5B93FPzRHrGNmMdTDfGdd5xGZvep3MVSpJqzcQmMp59bBCv