Conversation
Pull Request Test Coverage Report for Build 2865742887
💛 - Coveralls |
|
I glanced through the code and found that |
|
Also |
|
Sure will do. |
| scans.push(local_scan); | ||
| } | ||
|
|
||
| let network_prefix = |
There was a problem hiding this comment.
It was crucial that OracleConfig::oracle_address is encoded as it allows us to obtain the network prefix used to generate ballot_token_owner_address_str, since we no longer have OracleConfig::on_mainnet.
|
It's ready for review. One addition I made is to check for consistency of network prefixes in more places, so it will error-out if the operator tries to mix testnet and mainnet addresses. |
greenhat
left a comment
There was a problem hiding this comment.
Looking great! Thank you!
My bad for insisting on Address vs. NetworkAddress. I believe we can ditch more network prefixes. See my comments.
| fn from(p: OracleContractParameters) -> Self { | ||
| OracleContractParametersSerde { | ||
| p2s: p.p2s.to_base58(), | ||
| p2s: AddressEncoder::new(NetworkPrefix::Mainnet).address_to_str(&p.p2s), |
There was a problem hiding this comment.
I think that eventually, we should switch to base16 serialized ErgoTree for storing contracts in the config files. I mean, the odds of someone setting the new contracts with a testnet prefix are super tiny but non-zero.
Of course, it's out of the scope of this PR.
|
I also found a hardcoded mainnet in |
|
I've addressed all your comments. |
Close #88