Skip to content

add builtin function and more primitive type#22

Merged
boomyl merged 4 commits intomainfrom
support_contract_primitive_type
Aug 9, 2021
Merged

add builtin function and more primitive type#22
boomyl merged 4 commits intomainfrom
support_contract_primitive_type

Conversation

@shenao78
Copy link
Contributor

@shenao78 shenao78 commented Aug 9, 2021

No description provided.

"amount" return AMOUNT_T;
"pubkey" return PUBKEY_T;
"hex" return HEX_T;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"sig" return SIG_T;

{"check_msg_sig", check_msg_sig_params, ARRAY_SIZE(check_msg_sig_params), BOOLEAN_TYPE, "CHECKSIG"},
{"below", below_params, ARRAY_SIZE(below_params), BOOLEAN_TYPE, "BLOCKHEIGHT GREATERTHAN"},
{"above", above_params, ARRAY_SIZE(above_params), BOOLEAN_TYPE, "BLOCKHEIGHT LESSTHAN"},
{"lock", lock_params, ARRAY_SIZE(lock_params), VOID_TYPE, ""},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lock的op组合逻辑:

index  (index)
addAmount (amount)
addAsset  (asset)
addInt64 (version)
addCheckOutput (stmt中取program及state)
addVerify   (验证栈顶结果)

{"below", below_params, ARRAY_SIZE(below_params), BOOLEAN_TYPE, "BLOCKHEIGHT GREATERTHAN"},
{"above", above_params, ARRAY_SIZE(above_params), BOOLEAN_TYPE, "BLOCKHEIGHT LESSTHAN"},
{"lock", lock_params, ARRAY_SIZE(lock_params), VOID_TYPE, ""},
{"verify", verify_params, ARRAY_SIZE(verify_params), VOID_TYPE, ""},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

op就是对应的VERIFY

@boomyl boomyl merged commit 88ede3f into main Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants