Add Auth.tx_hash
This commit is contained in:
parent
2ed9d17ce5
commit
db64978d2e
@ -443,6 +443,11 @@ global_env() ->
|
||||
{"sha256", Fun1(A, Hash)},
|
||||
{"blake2b", Fun1(A, Hash)}]) },
|
||||
|
||||
%% Authentication
|
||||
AuthScope = #scope
|
||||
{ funs = MkDefs(
|
||||
[{"tx_hash", Option(Hash)}]) },
|
||||
|
||||
%% Strings
|
||||
StringScope = #scope
|
||||
{ funs = MkDefs(
|
||||
@ -477,6 +482,7 @@ global_env() ->
|
||||
, ["Oracle"] => OracleScope
|
||||
, ["AENS"] => AENSScope
|
||||
, ["Map"] => MapScope
|
||||
, ["Auth"] => AuthScope
|
||||
, ["Crypto"] => CryptoScope
|
||||
, ["String"] => StringScope
|
||||
, ["Bits"] => BitsScope
|
||||
|
@ -182,6 +182,11 @@ ast_body(?id_app("abort", [String], _, _), Icode) ->
|
||||
#funcall{ function = #var_ref{ name = {builtin, abort} },
|
||||
args = [ast_body(String, Icode)] };
|
||||
|
||||
%% Authentication
|
||||
ast_body({qid, _, ["Auth", "tx_hash"]}, _Icode) ->
|
||||
prim_call(?PRIM_CALL_AUTH_TX_HASH, #integer{value = 0},
|
||||
[], [], aeso_icode:option_typerep(word));
|
||||
|
||||
%% Oracles
|
||||
ast_body(?qid_app(["Oracle", "register"], Args, _, ?oracle_t(QType, RType)), Icode) ->
|
||||
{Sign, [Acct, QFee, TTL]} = get_signature_arg(Args),
|
||||
|
Loading…
x
Reference in New Issue
Block a user