diff --git a/include/aeb_opcodes.hrl b/include/aeb_opcodes.hrl index 31fff90..8474651 100644 --- a/include/aeb_opcodes.hrl +++ b/include/aeb_opcodes.hrl @@ -201,3 +201,4 @@ -define(PRIM_CALL_IN_ADDRESS_RANGE(__TTYPE__), (((__TTYPE__) > 599) andalso ((__TTYPE__) < 700))). -define(PRIM_CALL_ADDR_IS_ORACLE, 600). -define(PRIM_CALL_ADDR_IS_CONTRACT, 601). +-define(PRIM_CALL_ADDR_IS_PAYABLE, 610). diff --git a/src/aeb_fate_generate_ops.erl b/src/aeb_fate_generate_ops.erl index 6ba0190..54efdf4 100644 --- a/src/aeb_fate_generate_ops.erl +++ b/src/aeb_fate_generate_ops.erl @@ -176,6 +176,7 @@ ops_defs() -> , { 'IS_CONTRACT', 16#7b, false, false, true, 3, [a,a], is_contract, {address}, bool, "Arg0 := is Arg1 a contract"} , { 'CREATOR', 16#7c, false, true, true, 3, [a], contract_creator, {}, address, "Arg0 := contract creator"} , { 'ECRECOVER_SECP256K1', 16#7d, false, true, true, 1300, [a,a,a], ecrecover_secp256k1, {bytes, bytes}, bytes, "Arg0 := ecrecover_secp256k1(Hash, Signature)"} + , { 'IS_PAYABLE', 16#7e, false, false, true, 3, [a,a], is_payable, {address}, bool, "Arg0 := is Arg1 a payable address"} , { 'DEACTIVATE', 16#fa, false, true, true, 3, [], deactivate, {}, none, "Mark the current contract for deactivation."} , { 'ABORT', 16#fb, true, true, true, 3, [a], abort, {string}, none, "Abort execution (dont use all gas) with error message in Arg0."} diff --git a/test/asm_code/all_instructions.fate b/test/asm_code/all_instructions.fate index 807cba1..aca125f 100644 --- a/test/asm_code/all_instructions.fate +++ b/test/asm_code/all_instructions.fate @@ -251,3 +251,9 @@ FUNCTION foo () : {tuple, []} AUTH_TX_HASH CONTRACT_TO_ADDRESS @ct_nv5B93FPzRHrGNmMdTDfGdd5xGZvep3MVSpJqzcQmMp59bBCv + + IS_ORACLE @ak_nv5B93FPzRHrGNmMdTDfGdd5xGZvep3MVSpJqzcQmMp59bBCv + + IS_CONTRACT @ak_nv5B93FPzRHrGNmMdTDfGdd5xGZvep3MVSpJqzcQmMp59bBCv + + IS_PAYABLE @ak_nv5B93FPzRHrGNmMdTDfGdd5xGZvep3MVSpJqzcQmMp59bBCv