Add oracle types to some oracle instructions
This commit is contained in:
parent
e321882b98
commit
f92e23c955
@ -143,11 +143,11 @@ ops_defs() ->
|
|||||||
%% Transaction ops
|
%% Transaction ops
|
||||||
, { 'SPEND', 16#60, false, 3, [a,a], spend, {address, integer}, none, "Transfer Arg1 tokens to account Arg0. (If the contract account has at least that many tokens."}
|
, { 'SPEND', 16#60, false, 3, [a,a], spend, {address, integer}, none, "Transfer Arg1 tokens to account Arg0. (If the contract account has at least that many tokens."}
|
||||||
, { 'ORACLE_REGISTER', 16#61, false, 3, [a,a,a,a,a,a,a], oracle_register, {signature, address, integer, variant, typerep, typerep}, oracle, "Arg0 := New oracle with address Arg2, query fee Arg3, TTL Arg4, query type Arg5 and response type Arg6. Arg0 contains delegation signature."}
|
, { 'ORACLE_REGISTER', 16#61, false, 3, [a,a,a,a,a,a,a], oracle_register, {signature, address, integer, variant, typerep, typerep}, oracle, "Arg0 := New oracle with address Arg2, query fee Arg3, TTL Arg4, query type Arg5 and response type Arg6. Arg0 contains delegation signature."}
|
||||||
, { 'ORACLE_QUERY', 16#62, false, 3, [a,a,a,a,a,a], oracle_query, {oracle, any, integer, variant, variant}, oracle_query, "Arg0 := New oracle query for oracle Arg1, question in Arg2, query fee in Arg3, query TTL in Arg4, response TTL in Arg5"}
|
, { 'ORACLE_QUERY', 16#62, false, 3, [a,a,a,a,a,a,a,a], oracle_query, {oracle, any, integer, variant, variant, typerep, typerep}, oracle_query, "Arg0 := New oracle query for oracle Arg1, question in Arg2, query fee in Arg3, query TTL in Arg4, response TTL in Arg5. Typereps for checking oracle type is in Arg6 and Arg7."}
|
||||||
, { 'ORACLE_RESPOND', 16#63, false, 3, [a,a,a,a], oracle_respond, {signature, oracle, oracle_query,any}, none, "Respond as oracle Arg1 to query in Arg2 with response Arg3. Arg0 contains delegation signature."}
|
, { 'ORACLE_RESPOND', 16#63, false, 3, [a,a,a,a,a,a], oracle_respond, {signature, oracle, oracle_query,any, typerep, typerep}, none, "Respond as oracle Arg1 to query in Arg2 with response Arg3. Arg0 contains delegation signature. Typereps for checking oracle type is in Arg4 and Arg5."}
|
||||||
, { 'ORACLE_EXTEND', 16#64, false, 3, [a,a,a], oracle_extend, {signature, oracle, variant}, none, "Extend oracle in Arg1 with TTL in Arg2. Arg0 contains delegation signature."}
|
, { 'ORACLE_EXTEND', 16#64, false, 3, [a,a,a], oracle_extend, {signature, oracle, variant}, none, "Extend oracle in Arg1 with TTL in Arg2. Arg0 contains delegation signature."}
|
||||||
, { 'ORACLE_GET_ANSWER', 16#65, false, 3, [a,a,a], oracle_get_answer, {oracle, oracle_query}, any, "Arg0 := option variant with answer (if any) from oracle query in Arg1 given by oracle Arg0"}
|
, { 'ORACLE_GET_ANSWER', 16#65, false, 3, [a,a,a,a,a], oracle_get_answer, {oracle, oracle_query, typerep, typerep}, any, "Arg0 := option variant with answer (if any) from oracle query in Arg1 given by oracle Arg0. Typereps for checking oracle type is in Arg3 and Arg4."}
|
||||||
, { 'ORACLE_GET_QUESTION', 16#66, false, 3, [a,a,a], oracle_get_question, {oracle, oracle_query}, any, "Arg0 := question in oracle query Arg2 given to oracle Arg1"}
|
, { 'ORACLE_GET_QUESTION', 16#66, false, 3, [a,a,a,a,a], oracle_get_question, {oracle, oracle_query, typerep, typerep}, any, "Arg0 := question in oracle query Arg2 given to oracle Arg1. Typereps for checking oracle type is in Arg3 and Arg4."}
|
||||||
, { 'ORACLE_QUERY_FEE', 16#67, false, 3, [a,a], oracle_query_fee, {oracle}, integer, "Arg0 := query fee for oracle Arg1"}
|
, { 'ORACLE_QUERY_FEE', 16#67, false, 3, [a,a], oracle_query_fee, {oracle}, integer, "Arg0 := query fee for oracle Arg1"}
|
||||||
, { 'AENS_RESOLVE', 16#68, false, 3, [], aens_resolve, {}, none, "NYI"}
|
, { 'AENS_RESOLVE', 16#68, false, 3, [], aens_resolve, {}, none, "NYI"}
|
||||||
, { 'AENS_PRECLAIM', 16#69, false, 3, [], aens_preclaim, {}, none, "NYI"}
|
, { 'AENS_PRECLAIM', 16#69, false, 3, [], aens_preclaim, {}, none, "NYI"}
|
||||||
|
@ -5,14 +5,14 @@ FUNCTION register (address, integer, {variant, [{tuple, [integer]}, {tuple, [int
|
|||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
FUNCTION query (oracle, integer, string) : oracle_query
|
FUNCTION query (oracle, integer, string) : oracle_query
|
||||||
ORACLE_QUERY a arg0 arg1 arg2 (| [1,1] | 0 | (100) |) (| [1,1] | 0 | (100) |)
|
ORACLE_QUERY a arg0 arg1 arg2 (| [1,1] | 0 | (100) |) (| [1,1] | 0 | (100) |) 'string '{variant, [{tuple, []}, {tuple, [integer]}]}
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
FUNCTION bogus_query () : oracle_query
|
FUNCTION bogus_query () : oracle_query
|
||||||
RETURNR @oq_nv5B93FPzRHrGNmMdTDfGdd5xGZvep3MVSpJqzcQmMp59bBCv
|
RETURNR @oq_nv5B93FPzRHrGNmMdTDfGdd5xGZvep3MVSpJqzcQmMp59bBCv
|
||||||
|
|
||||||
FUNCTION respond (oracle, integer, string) : {tuple, []}
|
FUNCTION respond (oracle, integer, string) : {tuple, []}
|
||||||
ORACLE_RESPOND $sg_11111111111111111111111111111111111111111111111111111111111111116oUsJe arg0 arg1 arg2
|
ORACLE_RESPOND $sg_11111111111111111111111111111111111111111111111111111111111111116oUsJe arg0 arg1 arg2 'string '{variant, [{tuple, []}, {tuple, [integer]}]}
|
||||||
RETURNR {}
|
RETURNR {}
|
||||||
|
|
||||||
FUNCTION extend (oracle, {variant, [{tuple, [integer]}, {tuple, [integer]}]}) : {tuple, []}
|
FUNCTION extend (oracle, {variant, [{tuple, [integer]}, {tuple, [integer]}]}) : {tuple, []}
|
||||||
@ -20,13 +20,13 @@ FUNCTION extend (oracle, {variant, [{tuple, [integer]}, {tuple, [integer]}]}) :
|
|||||||
RETURNR {}
|
RETURNR {}
|
||||||
|
|
||||||
FUNCTION get_question (oracle, oracle_query) : string
|
FUNCTION get_question (oracle, oracle_query) : string
|
||||||
ORACLE_GET_QUESTION arg0 arg1
|
ORACLE_GET_QUESTION a arg0 arg1 'string '{variant, [{tuple, []}, {tuple, [integer]}]}
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
FUNCTION get_answer (oracle, oracle_query) : {variant, [{tuple, []}, {tuple, [string]}]}
|
FUNCTION get_answer (oracle, oracle_query) : {variant, [{tuple, []}, {tuple, [string]}]}
|
||||||
ORACLE_GET_ANSWER arg0 arg1
|
ORACLE_GET_ANSWER a arg1 arg2 'string '{variant, [{tuple, []}, {tuple, [integer]}]}
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
FUNCTION query_fee (oracle) : integer
|
FUNCTION query_fee (oracle) : integer
|
||||||
ORACLE_QUERY_FEE arg0
|
ORACLE_QUERY_FEE a arg0
|
||||||
RETURN
|
RETURN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user