Merge pull request #68 from aeternity/PT-165964555-make-remote-calls-to-contract-objects

Keep the contract type in fate code
This commit is contained in:
Tobias Lindahl 2019-05-14 09:41:31 +02:00 committed by GitHub
commit d4238c0bdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,7 +141,6 @@ type_to_scode({list, Type}) -> {list, type_to_scode(Type)};
type_to_scode({tuple, Types}) -> {tuple, lists:map(fun type_to_scode/1, Types)};
type_to_scode({map, Key, Val}) -> {map, type_to_scode(Key), type_to_scode(Val)};
type_to_scode({function, _Args, _Res}) -> {tuple, [string, any]};
type_to_scode(contract) -> address;
type_to_scode(T) -> T.
%% -- Phase I ----------------------------------------------------------------
@ -183,7 +182,7 @@ to_scode(_Env, {lit, L}) ->
{string, S} -> [push(?i(aeb_fate_data:make_string(S)))];
{bool, B} -> [push(?i(B))];
{account_pubkey, K} -> [push(?i(aeb_fate_data:make_address(K)))];
{contract_pubkey, K} -> [push(?i(aeb_fate_data:make_address(K)))];
{contract_pubkey, K} -> [push(?i(aeb_fate_data:make_contract(K)))];
{oracle_pubkey, K} -> [push(?i(aeb_fate_data:make_oracle(K)))];
{oracle_query_id, _} -> ?TODO(fate_oracle_query_id_value)
end;