Add CREATOR opcode and address check primops #156

Merged
zxq9 merged 1 commits from PT-165440601-165713319-sophia_addons into master 2019-05-09 16:51:40 +09:00
2 changed files with 10 additions and 0 deletions

View File

@ -30,6 +30,7 @@
-define( 'SHA3', 16#20). -define( 'SHA3', 16#20).
-define( 'CREATOR', 16#2f).
-define( 'ADDRESS', 16#30). -define( 'ADDRESS', 16#30).
-define( 'BALANCE', 16#31). -define( 'BALANCE', 16#31).
-define( 'ORIGIN', 16#32). -define( 'ORIGIN', 16#32).
@ -165,6 +166,8 @@
-define(PRIM_CALL_ORACLE_GET_ANSWER, 104). -define(PRIM_CALL_ORACLE_GET_ANSWER, 104).
-define(PRIM_CALL_ORACLE_GET_QUESTION, 105). -define(PRIM_CALL_ORACLE_GET_QUESTION, 105).
-define(PRIM_CALL_ORACLE_QUERY_FEE, 106). -define(PRIM_CALL_ORACLE_QUERY_FEE, 106).
-define(PRIM_CALL_ORACLE_CHECK, 110).
-define(PRIM_CALL_ORACLE_CHECK_QUERY, 111).
-define(PRIM_CALL_IN_AENS_RANGE(__TTYPE__), (((__TTYPE__) > 199) andalso ((__TTYPE__) < 300))). -define(PRIM_CALL_IN_AENS_RANGE(__TTYPE__), (((__TTYPE__) > 199) andalso ((__TTYPE__) < 300))).
-define(PRIM_CALL_AENS_RESOLVE, 200). -define(PRIM_CALL_AENS_RESOLVE, 200).
@ -193,3 +196,7 @@
-define(PRIM_CALL_IN_AUTH_RANGE(__TTYPE__), (((__TTYPE__) > 499) andalso ((__TTYPE__) < 600))). -define(PRIM_CALL_IN_AUTH_RANGE(__TTYPE__), (((__TTYPE__) > 499) andalso ((__TTYPE__) < 600))).
-define(PRIM_CALL_AUTH_TX_HASH, 500). -define(PRIM_CALL_AUTH_TX_HASH, 500).
-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).

View File

@ -51,6 +51,7 @@ opcode(?SHL) -> ?SHL;
opcode(?SHR) -> ?SHR; opcode(?SHR) -> ?SHR;
opcode(?SAR) -> ?SAR; opcode(?SAR) -> ?SAR;
opcode(?SHA3) -> ?SHA3; opcode(?SHA3) -> ?SHA3;
opcode(?CREATOR) -> ?CREATOR;
opcode(?ADDRESS) -> ?ADDRESS; opcode(?ADDRESS) -> ?ADDRESS;
opcode(?BALANCE) -> ?BALANCE; opcode(?BALANCE) -> ?BALANCE;
opcode(?ORIGIN) -> ?ORIGIN; opcode(?ORIGIN) -> ?ORIGIN;
@ -191,6 +192,7 @@ mnemonic(?SHL) -> 'SHL' ;
mnemonic(?SHR) -> 'SHR' ; mnemonic(?SHR) -> 'SHR' ;
mnemonic(?SAR) -> 'SAR' ; mnemonic(?SAR) -> 'SAR' ;
mnemonic(?SHA3) -> 'SHA3' ; mnemonic(?SHA3) -> 'SHA3' ;
mnemonic(?CREATOR) -> 'CREATOR' ;
mnemonic(?ADDRESS) -> 'ADDRESS' ; mnemonic(?ADDRESS) -> 'ADDRESS' ;
mnemonic(?BALANCE) -> 'BALANCE' ; mnemonic(?BALANCE) -> 'BALANCE' ;
mnemonic(?ORIGIN) -> 'ORIGIN' ; mnemonic(?ORIGIN) -> 'ORIGIN' ;
@ -332,6 +334,7 @@ m_to_op('SHL') -> ?SHL ;
m_to_op('SHR') -> ?SHR ; m_to_op('SHR') -> ?SHR ;
m_to_op('SAR') -> ?SAR ; m_to_op('SAR') -> ?SAR ;
m_to_op('SHA3') -> ?SHA3 ; m_to_op('SHA3') -> ?SHA3 ;
m_to_op('CREATOR') -> ?CREATOR ;
m_to_op('ADDRESS') -> ?ADDRESS ; m_to_op('ADDRESS') -> ?ADDRESS ;
m_to_op('BALANCE') -> ?BALANCE ; m_to_op('BALANCE') -> ?BALANCE ;
m_to_op('ORIGIN') -> ?ORIGIN ; m_to_op('ORIGIN') -> ?ORIGIN ;