Remove oracles, update deps (except sophia)

This commit is contained in:
2025-01-23 23:51:18 +09:00
parent 06fc0ac403
commit b69ababf0f
2 changed files with 26 additions and 21 deletions
+20 -14
View File
@@ -45,7 +45,7 @@
acc/1, acc_at_height/2, acc_at_block_id/2,
acc_pending_txs/1,
next_nonce/1,
dry_run/1, dry_run/2, dry_run/3,
dry_run/1, dry_run/2, dry_run/3, dry_run_map/1,
tx/1, tx_info/1,
post_tx/1,
contract/1, contract_code/1,
@@ -643,6 +643,12 @@ dry_run(TX, Accounts, KBHash) ->
JSON = zj:binary_encode(DryData),
request("/v3/dry_run", JSON).
dry_run_map(Map) ->
JSON = zj:binary_encode(Map),
request("/v3/dry_run", JSON).
-spec decode_bytearray_fate(EncodedStr) -> {ok, Result} | {error, Reason}
when EncodedStr :: binary() | string(),
Result :: none | term(),
@@ -762,18 +768,6 @@ contract_code(ID) ->
contract_poi(ID) ->
request(["/v3/contracts/", ID, "/poi"]).
% TODO
%oracle(ID) ->
% request(["/v3/oracles/", ID]).
% TODO
%oracle_queries(ID) ->
% request(["/v3/oracles/", ID, "/queries"]).
% TODO
%oracle_queries_by_id(OracleID, QueryID) ->
% request(["/v3/oracles/", OracleID, "/queries/", QueryID]).
-spec name(Name) -> {ok, Info} | {error, Reason}
when Name :: string(), % _ ++ ".chain"
@@ -797,7 +791,7 @@ name(Name) ->
when Pubkey :: peer_pubkey(),
Reason :: term(). % FIXME
%% @doc
%% Returns the given node's public key, assuming there an AE node is reachable at
%% Returns the given node's public key, assuming a node is reachable at
%% the given address.
peer_pubkey() ->
@@ -1014,6 +1008,18 @@ contract_create(CreatorID, Nonce, Amount, TTL, Gas, GasPrice, Path, InitArgs) ->
end.
-spec contract_create_built(CreatorID, Compiled, InitArgs) -> Result
when CreatorID :: unicode:chardata(),
Compiled :: map(),
InitArgs :: [string()],
Result :: {ok, CreateTX} | {error, Reason},
CreateTX :: binary(),
Reason :: file:posix() | term().
%% @doc
%% This function takes the compiler output (instead of starting from source),
%% and returns the unsigned create contract call data with default values.
%% For more control over exactly what those values are, use create_contract/8.
contract_create_built(CreatorID, Compiled, InitArgs) ->
case next_nonce(CreatorID) of
{ok, Nonce} ->