-
Notifications
You must be signed in to change notification settings - Fork 241
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
Support ibc to crc20 #55
Conversation
3c23ac6
to
b37a3b9
Compare
Codecov Report
@@ Coverage Diff @@
## main #55 +/- ##
==========================================
+ Coverage 21.51% 26.69% +5.17%
==========================================
Files 27 29 +2
Lines 1729 1862 +133
==========================================
+ Hits 372 497 +125
- Misses 1324 1331 +7
- Partials 33 34 +1
Continue to review full report at Codecov.
|
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.
I haven't kept up with previous PRs. This PR seems more manageable I can help to review, but I don't have the full context for review 😔 -- what's autoDeploy
? do we have some design doc in the repo I can read to get more context?
do contributions to this repo follow C4: https://rfc.zeromq.org/spec/42/#23-patch-requirements ? I can't get much context from the git commit log messages either😔 /~https://github.com/crypto-org-chain/cronos/commits/main |
The best doc for this probably is here: #24 (comment), we should put it into the repo somewhere I think. |
Currently, only some commits followed, let's enforce that from now on. 😄 |
if autoDeploy is false, how can it be activated? |
A gov module managed contract map. |
Yeah sorry for that, I havent been following the C4 standard. Will add a better message on squash merge |
807b4ec
to
6672a17
Compare
6672a17
to
df387c3
Compare
df387c3
to
6656fdd
Compare
982bd28
to
57b4638
Compare
57b4638
to
ffd2369
Compare
I've opened this issue: #64 I've read through that comment and still a bit unclear -- it says:
so, from that I'd assume "autoDeploy" should always be true -- so I'm not sure why that parameter is there? is it that for testing it's needed to be set to false? |
yes it is correct. In mainnet, we will not allow autodeployement. CRC20 tokens will be onboarded one by one following the steps:
The reason we don't want autodeployement is to have more control on the onboarding and also some contracts needs to implement additional logic than what the autodeployed contract provide. The autodeploiement is mostly used for testing now. |
There were discussions on slack that the business side might don't want this auto-deploy feature, thus will need a parameter for convenience. When disable auto-deploy feature, we only have the gov managed external contract mapping, when the user sends un-mapped tokens from ethereum, it'll end up in native tokens (not wrapped automatically). |
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.
ok, thanks for the context! in general, it'd be good to have this basic rationale documented: #64 given Slack conversations are detached from this codebase and harder to search.
for autoDeploy
, if it's indeed only for testing, I'd suggest pulling that code out into a private function instead of having it on a public API. If you foresee there may later be a need to flip it, then perhaps making it a network parameter makes sense -- just bear in mind x/params module is to be deprecated in the future SDK version (so that's something to possible list in ADR consequences).
overall, this looks ok -- public contracts aren't broken (2.6 in C4) as this wasn't released / isn't used externally yet, so one small nit would be to put a bit more helpful squashed commit message to document what problem this solved and how (instead of what changed)
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.
LGTM
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
TODO
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)