diff --git a/src/client/embedded/bootstrap/client_proto_context.ml b/src/client/embedded/bootstrap/client_proto_context.ml index 92ed97fda..893fd2534 100644 --- a/src/client/embedded/bootstrap/client_proto_context.ml +++ b/src/client/embedded/bootstrap/client_proto_context.ml @@ -253,7 +253,7 @@ let commands () = return ()) ; command ~group: "context" - ~desc: "transfer funds" + ~desc: "transfer tokens" ~args: [ fee_arg ; arg_arg ; force_arg ] (prefixes [ "transfer" ] @@ tez_param diff --git a/src/proto/bootstrap/script_interpreter.ml b/src/proto/bootstrap/script_interpreter.ml index 8b18f1589..55bae920a 100644 --- a/src/proto/bootstrap/script_interpreter.ml +++ b/src/proto/bootstrap/script_interpreter.ml @@ -463,7 +463,7 @@ let rec interp | Manager, Item ((_, _, contract), rest) -> Contract.get_manager ctxt contract >>=? fun manager -> return (Item (manager, rest), qta - 1, ctxt) - | Transfer_funds (storage_type, loc), + | Transfer_tokens (storage_type, loc), Item (p, Item (amount, Item ((tp, Void_t, destination), Item (sto, Empty)))) -> begin Contract.unconditional_spend ctxt source amount >>=? fun ctxt -> Contract.credit ctxt destination amount >>=? fun ctxt -> @@ -493,7 +493,7 @@ let rec interp parse_untagged_data ctxt storage_type storage >>=? fun sto -> return (Item ((), Item (sto, Empty)), qta - 1, ctxt)) end - | Transfer_funds (storage_type, loc), + | Transfer_tokens (storage_type, loc), Item (p, Item (amount, Item ((tp, tr, destination), Item (sto, Empty)))) -> begin Contract.unconditional_spend ctxt source amount >>=? fun ctxt -> Contract.credit ctxt destination amount >>=? fun ctxt -> diff --git a/src/proto/bootstrap/script_ir_translator.ml b/src/proto/bootstrap/script_ir_translator.ml index 2e60e92e3..449d9c439 100644 --- a/src/proto/bootstrap/script_ir_translator.ml +++ b/src/proto/bootstrap/script_ir_translator.ml @@ -1076,13 +1076,13 @@ and parse_instr (* protocol *) | Prim (_, "manager", []), Item_t (Contract_t _, rest) -> return (Typed (Manager, Item_t (Key_t, rest))) - | Prim (loc, "transfer_funds", []), + | Prim (loc, "transfer_tokens", []), Item_t (p, Item_t (Tez_t, Item_t (Contract_t (cp, cr), Item_t (storage, Empty_t)))) -> check_item_ty p cp loc 1 >>=? fun (Eq _) -> begin match storage_type with | Some storage_type -> check_item_ty storage storage_type loc 3 >>=? fun (Eq _) -> - return (Typed (Transfer_funds (storage, loc), Item_t (cr, Item_t (storage, Empty_t)))) + return (Typed (Transfer_tokens (storage, loc), Item_t (cr, Item_t (storage, Empty_t)))) | None -> fail (Transfer_in_lambda loc) end @@ -1128,7 +1128,7 @@ and parse_instr | "abs" | "neg" | "lsl" | "lsr" | "compare" | "eq" | "neq" | "lt" | "gt" | "le" | "ge" - | "manager" | "transfer_funds" | "create_account" + | "manager" | "transfer_tokens" | "create_account" | "create_contract" | "now" | "amount" | "balance" | "check_signature" | "h" | "steps_to_quota" as name), (_ :: _ as l)), _ -> @@ -1162,7 +1162,7 @@ and parse_instr fail (Bad_stack (loc, 6, Stack_ty stack_ty)) | Prim (loc, "create_account", []), _ -> fail (Bad_stack (loc, 4, Stack_ty stack_ty)) - | Prim (loc, "transfer_funds", []), _ -> + | Prim (loc, "transfer_tokens", []), _ -> fail (Bad_stack (loc, 3, Stack_ty stack_ty)) | Prim (loc, ("drop" | "dup" | "car" | "cdr" | "some" | "h" | "dip" | "if_none" | "left" | "right" | "if_left" | "if" diff --git a/src/proto/bootstrap/script_typed_ir.ml b/src/proto/bootstrap/script_typed_ir.ml index f884a84d8..476b15c77 100644 --- a/src/proto/bootstrap/script_typed_ir.ml +++ b/src/proto/bootstrap/script_typed_ir.ml @@ -296,7 +296,7 @@ and ('bef, 'aft) instr = (* protocol *) | Manager : (('arg, 'ret) typed_contract * 'rest, public_key_hash * 'rest) instr - | Transfer_funds : 'sto ty * Script.location -> + | Transfer_tokens : 'sto ty * Script.location -> ('arg * (Tez.t * (('arg, 'ret) typed_contract * ('sto * end_of_stack))), 'ret * ('sto * end_of_stack)) instr | Create_account : (public_key_hash * (public_key_hash option * (bool * (Tez.t * 'rest))), diff --git a/src/proto/bootstrap/script_typed_ir.mli b/src/proto/bootstrap/script_typed_ir.mli index 7af163b26..4be436835 100644 --- a/src/proto/bootstrap/script_typed_ir.mli +++ b/src/proto/bootstrap/script_typed_ir.mli @@ -296,7 +296,7 @@ and ('bef, 'aft) instr = (* protocol *) | Manager : (('arg, 'ret) typed_contract * 'rest, public_key_hash * 'rest) instr - | Transfer_funds : 'sto ty * Script.location -> + | Transfer_tokens : 'sto ty * Script.location -> ('arg * (Tez.t * (('arg, 'ret) typed_contract * ('sto * end_of_stack))), 'ret * ('sto * end_of_stack)) instr | Create_account : (public_key_hash * (public_key_hash option * (bool * (Tez.t * 'rest))), diff --git a/src/proto/bootstrap/services.ml b/src/proto/bootstrap/services.ml index 1dc100cfd..7310611e0 100644 --- a/src/proto/bootstrap/services.ml +++ b/src/proto/bootstrap/services.ml @@ -243,7 +243,7 @@ module Context = struct let spendable custom_root = RPC.service - ~description: "Tells if the contract funds can be spent by the manager." + ~description: "Tells if the contract tokens can be spent by the manager." ~input: empty ~output: (wrap_tzerror bool) RPC.Path.(custom_root / "context" / "contracts" /: Contract.arg / "spendable")