-
Notifications
You must be signed in to change notification settings - Fork 38
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
Build new contracts on bootstrap, save them in config, load with checks afterward #95
Conversation
Pull Request Test Coverage Report for Build 3014410921
💛 - Coveralls |
414f46d
to
d6a610e
Compare
implement Default for BootstrapConfig;
…acleConfig::oracle_address;
…::oracle_address;
save update RefreshContractParameters in bootstrap process;
make BallotContractInputs::new checked ctor; make BallotBoxWrapperInputs to hold BallotContractInputs;
use RefreshContractInputs in RefreshBoxWrapperInputs;
…tParameters; update oracle contract P2S on bootstrap and check its corresponding to the token ids on config load;
…ntract_parameters`;
…ract_parameters`;
…ract_parameters`;
remove redundant updated BootstrapConfig;
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 great! Please check my comments for very minor issues.
Also, I wonder whether we could change the name of the load
methods across the crate to something like checked_load
, or check_and_load
; just as a quick indicator to whoever reads it. What do you think?
I'm glad you mentioned it. I don't like |
How about |
Sounds good! Thanks! I like build_with. |
Co-authored-by: Tim Ling <tim.ling@gmail.com>
Co-authored-by: Tim Ling <tim.ling@gmail.com>
Co-authored-by: Tim Ling <tim.ling@gmail.com>
Co-authored-by: Tim Ling <tim.ling@gmail.com>
contract parameters and inputs type hierarchy;
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.
Great, thank you!
Close #92
In this PR:
OracleConfig
with updated P2S in contract parameters;*Contract
,*ContractInputs
,*BoxWrapperInputs
got two constructors:create
(substitutes constant values inp2s
) andload
(checks constant values inp2s
correspond to the properties);*ContractParameters
inOracleConfig
to*BoxWrapperInputs
;Addresses
in favor ofOracleConfig::oracle_address
;OracleConfig::rescan_height
, set during the bootstrap;