Update tests for entrypoints

This commit is contained in:
Ulf Norell
2019-06-27 14:16:33 +02:00
parent 85408a12a2
commit 6a59e455ce
51 changed files with 465 additions and 446 deletions
+10 -10
View File
@@ -1,33 +1,33 @@
contract Remote =
function main : (int) => ()
entrypoint main : (int) => ()
contract AddrChain =
type o_type = oracle(string, map(string, int))
type oq_type = oracle_query(string, map(string, int))
function is_o(a : address) =
entrypoint is_o(a : address) =
Address.is_oracle(a)
function is_c(a : address) =
entrypoint is_c(a : address) =
Address.is_contract(a)
// function get_o(a : address) : option(o_type) =
// entrypoint get_o(a : address) : option(o_type) =
// Address.get_oracle(a)
// function get_c(a : address) : option(Remote) =
// entrypoint get_c(a : address) : option(Remote) =
// Address.get_contract(a)
function check_o(o : o_type) =
entrypoint check_o(o : o_type) =
Oracle.check(o)
function check_oq(o : o_type, oq : oq_type) =
entrypoint check_oq(o : o_type, oq : oq_type) =
Oracle.check_query(o, oq)
// function h_to_i(h : hash) : int =
// entrypoint h_to_i(h : hash) : int =
// Hash.to_int(h)
// function a_to_i(a : address) : int =
// entrypoint a_to_i(a : address) : int =
// Address.to_int(a) mod 10 ^ 16
function c_creator() : address =
entrypoint c_creator() : address =
Contract.creator