From c44313efb9c8fecace217e799d90e3d91d7e54d1 Mon Sep 17 00:00:00 2001 From: Ulf Wiger Date: Sun, 23 Aug 2026 00:14:44 +0200 Subject: [PATCH] Add FATE opcodes for account-issued currency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SPEND_CURRENCY, BALANCE_CURRENCY, and CURRENCY_SUPPLY (0xba–0xbc) expose AIC transfer, holder balance, and issuer total supply to Sophia/FATE. Regenerated op modules follow from this table. --- src/gmb_fate_generate_ops.erl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gmb_fate_generate_ops.erl b/src/gmb_fate_generate_ops.erl index 0ab1589..974114c 100644 --- a/src/gmb_fate_generate_ops.erl +++ b/src/gmb_fate_generate_ops.erl @@ -251,6 +251,9 @@ ops_defs() -> , { 'VERIFY_SIG_MLDSA44', 16#b7, false, true, true, ?GAS(2340), [a,a,a,a], verify_sig_mldsa44, {bytes, bytes, bytes}, boolean, "Arg0 := verify_sig_mldsa44(Hash, Pubkey, Signature)"} , { 'VERIFY_SIG_MLDSA65', 16#b8, false, true, true, ?GAS(3640), [a,a,a,a], verify_sig_mldsa65, {bytes, bytes, bytes}, boolean, "Arg0 := verify_sig_mldsa65(Hash, Pubkey, Signature)"} , { 'VERIFY_SIG_MLDSA87', 16#b9, false, true, true, ?GAS(5720), [a,a,a,a], verify_sig_mldsa87, {bytes, bytes, bytes}, boolean, "Arg0 := verify_sig_mldsa87(Hash, Pubkey, Signature)"} + , { 'SPEND_CURRENCY', 16#ba, false, false, true, ?GAS(5000), [a,a,a], spend_currency, {address, address, integer}, none, "Transfer Arg2 units of the currency issued by Arg1 to account Arg0."} + , { 'BALANCE_CURRENCY', 16#bb, false, true, true, ?GAS(2000), [a,a,a], balance_currency, {address, address}, integer, "Arg0 := Arg1's balance of the currency issued by Arg2."} + , { 'CURRENCY_SUPPLY', 16#bc, false, true, true, ?GAS(2000), [a,a], currency_supply, {address}, integer, "Arg0 := total supply of the account-issued currency of Arg1 (0 if none)."} , { 'DBG_LOC', 16#f0, false, true, true, ?GAS(0), [a, a], dbg_loc, {string, integer}, none, "Debug Op: Execution location. Args = {file_name, line_num}" } , { 'DBG_DEF', 16#f1, false, true, true, ?GAS(0), [a, a], dbg_def, {string, any}, none, "Debug Op: Define a variable. Args = {var_name, register}" }