Skip to content
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

Add CW->ERC pointer registry #1499

Merged
merged 2 commits into from
Apr 3, 2024
Merged

Add CW->ERC pointer registry #1499

merged 2 commits into from
Apr 3, 2024

Conversation

codchen
Copy link
Collaborator

@codchen codchen commented Apr 2, 2024

Describe your changes and provide context

Add pointer registry and new transaction types for CosmWasm pointer over ERC20/721 contracts. The pointer code is only stored once (either during genesis or migration) and reinstantiated whenever a RegisterPointer transaction is processed.
The versioning logic is the same as ERC->CW pointers. Note that there is no governance proposal needed for CW->ERC pointers because there is no metadata like decimals and symbols that need to be supplied (and agreed upon) at pointer creation.

Testing performed to validate your change

unit tests

@@ -51,7 +52,7 @@

func MockEVMKeeper() (*evmkeeper.Keeper, sdk.Context) {
testApp := app.Setup(false, false)
ctx := testApp.GetContextForDeliverTx([]byte{}).WithBlockHeight(8)
ctx := testApp.GetContextForDeliverTx([]byte{}).WithBlockHeight(8).WithBlockTime(time.Now())

Check warning

Code scanning / CodeQL

Calling the system time Warning test

Calling the system time may be a possible source of non-determinism
@codecov-commenter
Copy link

codecov-commenter commented Apr 2, 2024

Codecov Report

Attention: Patch coverage is 45.50898% with 91 lines in your changes are missing coverage. Please review.

Project coverage is 60.95%. Comparing base (4c225f4) to head (3d73b1d).
Report is 1 commits behind head on seiv2.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##            seiv2    #1499      +/-   ##
==========================================
- Coverage   61.32%   60.95%   -0.38%     
==========================================
  Files         361      363       +2     
  Lines       25332    25506     +174     
==========================================
+ Hits        15535    15546      +11     
- Misses       8885     9047     +162     
- Partials      912      913       +1     
Files Coverage Δ
app/app.go 65.72% <100.00%> (ø)
x/evm/types/codec.go 9.09% <0.00%> (-0.14%) ⬇️
x/evm/keeper/keeper.go 48.20% <50.00%> (-1.23%) ⬇️
x/evm/module.go 54.54% <25.00%> (-1.53%) ⬇️
x/evm/keeper/genesis.go 29.16% <75.00%> (+13.09%) ⬆️
x/evm/types/keys.go 0.00% <0.00%> (ø)
x/evm/keeper/msg_server.go 77.31% <74.46%> (-0.70%) ⬇️
x/evm/migrations/store_cw_pointer_code.go 0.00% <0.00%> (ø)
x/evm/keeper/pointer.go 55.12% <57.14%> (+1.12%) ⬆️
x/evm/types/message_register_pointer.go 0.00% <0.00%> (ø)

... and 6 files with indirect coverage changes

@codchen codchen force-pushed the cw-erc-pointer-registry branch 4 times, most recently from 85acc22 to fd1dec3 Compare April 2, 2024 04:31
@codchen codchen merged commit 1f3798c into seiv2 Apr 3, 2024
44 checks passed
@codchen codchen deleted the cw-erc-pointer-registry branch April 3, 2024 03:04
udpatil pushed a commit that referenced this pull request Apr 17, 2024
* Add CW->ERC pointer registry

* fix tests
udpatil pushed a commit that referenced this pull request Apr 17, 2024
* Add CW->ERC pointer registry

* fix tests
udpatil pushed a commit that referenced this pull request Apr 17, 2024
* Add CW->ERC pointer registry

* fix tests
udpatil pushed a commit that referenced this pull request Apr 18, 2024
* Add CW->ERC pointer registry

* fix tests
udpatil pushed a commit that referenced this pull request Apr 19, 2024
* Add CW->ERC pointer registry

* fix tests
udpatil pushed a commit that referenced this pull request Apr 19, 2024
* Add CW->ERC pointer registry

* fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants