Documentation
¶
Index ¶
Constants ¶
const ( // BCRP bytom contract register protocol BCRP = "bcrp" // Version bcrp version Version = 1 )
Variables ¶
This section is empty.
Functions ¶
func IsBCRPScript ¶
IsBCRPScript checks if a control program is bytom contract register protocol BCRP script format: OP_FAIL + OP_DATA_4 + "bcrp" + OP_DATA_1 + "1" + {{dynamic_op}} + contract 0 < len(contract) <= 75 dynamic_op -> OP_DATA_N 75 <len(contract) < 256 dynamic_op -> OP_PUSHDATA1 256 <= len(contract) < 65536 dynamic_op -> OP_PUSHDATA2 len(contract) >= 65536 dynamic_op -> OP_PUSHDATA4
func IsCallContractScript ¶
IsCallContractScript checks if a program is script call contract registered by BCRP call contract script format: OP_DATA_4 + "bcrp"+ OP_DATA_32 + SHA3-256(contract)
func ParseContract ¶
ParseContract parse contract from BCRP script BCRP script format: OP_FAIL + OP_DATA_4 + "bcrp" + OP_DATA_1 + "1" + {{dynamic_op}} + contract
func ParseContractHash ¶
ParseContractHash parse contract hash from call BCRP script call contract script format: OP_DATA_4 + "bcrp"+ OP_DATA_32 + SHA3-256(contract)
Types ¶
This section is empty.