Pt 166233685 fate oracles (#52)

* Introduce typereps

* Use typereps for registering oracles

* Add TTL to oracle register

* Introduce oracle query object and ORACLE_QUERY operation

* Stub the remaining oracle instructions

* Adapt oracle respond and extend

* Document oracle ops

* Add unit tests for all oracle instructions
This commit is contained in:
Tobias Lindahl
2019-06-18 13:56:48 +02:00
committed by GitHub
parent b45509962e
commit e321882b98
8 changed files with 100 additions and 16 deletions
+2
View File
@@ -75,6 +75,7 @@ FUNCTION : {token, {function, TokenLine, 'FUNCTION' }}.
\{ : {token, {'{', TokenLine}}.
\} : {token, {'}', TokenLine}}.
\| : {token, {'|', TokenLine}}.
\' : {token, {typerep, TokenLine}}.
;;.* :
{token, {comment, TokenLine, drop_prefix($;, TokenChars)}}.
@@ -118,6 +119,7 @@ parse_object([_|Chars]) ->
{account_pubkey, Bin} -> {address, Bin};
{contract_pubkey, Bin} -> {contract, Bin};
{oracle_pubkey, Bin} -> {oracle, Bin};
{oracle_query_id, Bin} -> {oracle_query, Bin};
{name, Bin} -> {name, Bin};
{channel, Bin} -> {channel, Bin};
{signature, Bin} -> {signature, Bin}