-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pt 166233685 fate oracles #2515
Pt 166233685 fate oracles #2515
Conversation
Implement oracle query instruction and object Implement oracle get question in fate Implement oracle query fee in fate Implement oracle get answer in fate Implement oracle respond in fate Implement oracle extend in fate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I think the level git conflicts should be manageble
@@ -1750,7 +1775,10 @@ sophia_oracles(_Cfg) -> | |||
Ct1 = ?call(create_contract, Acc, oracles, {}, #{amount => 1000000}), | |||
QuestionType = {variant_t, [{why, [word]}, {how, [string]}]}, | |||
AnswerType = {variant_t, [{noAnswer, []}, {yesAnswer, [QuestionType, string, word]}]}, | |||
Question1 = {variant, 1, [<<"birds fly?">>]}, | |||
Question1 = case ?IS_FATE_SOPHIA(vm_version()) of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use IF_AEVM
?
-define(CHAIN_ABSOLUTE_TTL_MEMORY_ENCODING_TYPE(X), tuple()). | ||
|
||
-define(CHAIN_RELATIVE_TTL_MEMORY_ENCODING(X), | ||
case ?IS_FATE_SOPHIA(vm_version()) of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shorter with ?IF_AEVM
@@ -1777,11 +1807,13 @@ sophia_oracles_type_error_out(_Cfg) -> | |||
Ct = <<CtId:256>> = ?call(create_contract, Acc, oracles, {}, #{amount => 100000}), | |||
QueryFee = 100, | |||
TTL = 15, | |||
CtId = ?call(call_contract, Acc, Ct, registerStringStringOracle, word, {CtId, QueryFee, FixedTTL(TTL)}), | |||
Oracle = ?call(call_contract, Acc, Ct, registerStringStringOracle, word, {Ct, QueryFee, FixedTTL(TTL)}), | |||
?assertMatchAEVM(CtId, Oracle), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just ?assertMatchVM
perhaps?
@hanssv @UlfNorell I changed the base branch to a temporary master branch. |
* Handle oracles in fate Implement oracle query instruction and object Implement oracle get question in fate Implement oracle query fee in fate Implement oracle get answer in fate Implement oracle respond in fate Implement oracle extend in fate * Add stub for not yet implemented op
https://www.pivotaltracker.com/story/show/166233685