diff --git a/rebar.config b/rebar.config index b101255..7ce5174 100644 --- a/rebar.config +++ b/rebar.config @@ -2,7 +2,7 @@ {erl_opts, [debug_info]}. -{deps, [ {aebytecode, {git, "https://github.com/aeternity/aebytecode.git", {ref, "7dd9c29"}}} +{deps, [ {aebytecode, {git, "https://github.com/aeternity/aebytecode.git", {ref, "506f9ca"}}} , {getopt, "1.0.1"} , {jsx, {git, "https://github.com/talentdeficit/jsx.git", {tag, "2.8.0"}}} diff --git a/rebar.lock b/rebar.lock index dcdbc25..694ca86 100644 --- a/rebar.lock +++ b/rebar.lock @@ -1,7 +1,7 @@ {"1.1.0", [{<<"aebytecode">>, {git,"https://github.com/aeternity/aebytecode.git", - {ref,"7dd9c29cc075b52c8f966696e88c8a29fc296240"}}, + {ref,"506f9ca72ea5df5fb2abd3aaddcbf9d58423e556"}}, 0}, {<<"aeserialization">>, {git,"https://github.com/aeternity/aeserialization.git", diff --git a/src/aeso_fcode_to_fate.erl b/src/aeso_fcode_to_fate.erl index b6d6817..2bd4a00 100644 --- a/src/aeso_fcode_to_fate.erl +++ b/src/aeso_fcode_to_fate.erl @@ -101,6 +101,7 @@ Op =:= 'ECVERIFY' orelse Op =:= 'ECVERIFY_SECP256K1' orelse Op =:= 'CONTRACT_TO_ADDRESS' orelse + Op =:= 'AUTH_TX_HASH' orelse false)). -record(env, { contract, vars = [], locals = [], tailpos = true }). @@ -518,7 +519,7 @@ builtin_to_scode(_Env, aens_transfer, [_, _, _, _] = _Args) -> builtin_to_scode(_Env, aens_revoke, [_, _, _] = _Args) -> ?TODO(fate_aens_revoke_instruction); builtin_to_scode(_Env, auth_tx_hash, []) -> - ?TODO(fate_auth_tx_hash_instruction). + [aeb_fate_ops:auth_tx_hash(?a)]. %% -- Operators -- @@ -789,6 +790,7 @@ attributes(I) -> {'ECVERIFY', A, B, C, D} -> Pure(A, [B, C, D]); {'ECVERIFY_SECP256K1', A, B, C, D} -> Pure(A, [B, C, D]); {'CONTRACT_TO_ADDRESS', A, B} -> Pure(A, [B]); + {'AUTH_TX_HASH', A} -> Pure(A, []); {'ADDRESS', A} -> Pure(A, []); {'BALANCE', A} -> Impure(A, []); {'BALANCE_OTHER', A, B} -> Impure(A, [B]); @@ -824,10 +826,6 @@ attributes(I) -> 'AENS_UPDATE' -> Impure(?a, []); %% TODO 'AENS_TRANSFER' -> Impure(?a, []); %% TODO 'AENS_REVOKE' -> Impure(?a, []); %% TODO - 'ECVERIFY' -> Pure(?a, []); %% TODO - 'SHA3' -> Pure(?a, []); %% TODO - 'SHA256' -> Pure(?a, []); %% TODO - 'BLAKE2B' -> Pure(?a, []); %% TODO {'ABORT', A} -> Impure(pc, A); {'EXIT', A} -> Impure(pc, A); 'NOP' -> Pure(none, []) diff --git a/test/aeso_compiler_tests.erl b/test/aeso_compiler_tests.erl index dfca755..6ccacf0 100644 --- a/test/aeso_compiler_tests.erl +++ b/test/aeso_compiler_tests.erl @@ -120,8 +120,6 @@ compilable_contracts() -> not_yet_compilable(fate) -> ["oracles", %% Oracle.register "events", %% events - "basic_auth", %% auth_tx_hash instruction - "bitcoin_auth", %% auth_tx_hash instruction "address_literals", %% oracle_query_id literals "address_chain" %% Oracle.check_query ];