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

Query owner on ERC-721 and ERC-1155 pointers #2043

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jewei1997
Copy link
Contributor

@jewei1997 jewei1997 commented Jan 16, 2025

Describe your changes and provide context

Add an owner() function that adheres to the Ownable interface. Note: we are only adding the ability to query the owner, not the ability to change the owner. CW721_ownable has the concept of the new owner accepting the new ownership for the ownership transfer to go through which ERC Ownable does not have which makes it tricky to do the write functions of actually updating ownership.

Testing performed to validate your change

integration test

@jewei1997 jewei1997 changed the title Add ability to query owner to erc721 pointer Add ability to query owner on ERC-721 pointer Jan 16, 2025
@jewei1997 jewei1997 changed the title Add ability to query owner on ERC-721 pointer Query owner on ERC-721 pointer Jan 16, 2025
Copy link
Collaborator

@codchen codchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to add migration handler to update existing deployed pointers to use this new code?

@dvli2007
Copy link
Contributor

The CW1155 contract follows the same ownership pattern as CW721s. We should add that functionality into the CW1155ERC1155Pointer.sol as well

Copy link

codecov bot commented Jan 18, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 61.27%. Comparing base (41433a8) to head (b9b6cda).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
x/evm/module.go 25.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2043      +/-   ##
==========================================
+ Coverage   61.16%   61.27%   +0.10%     
==========================================
  Files         264      264              
  Lines       24566    24569       +3     
==========================================
+ Hits        15026    15054      +28     
+ Misses       8415     8386      -29     
- Partials     1125     1129       +4     
Files with missing lines Coverage Δ
x/evm/module.go 37.98% <25.00%> (-0.56%) ⬇️

... and 3 files with indirect coverage changes

@jewei1997 jewei1997 changed the title Query owner on ERC-721 pointer Query owner on ERC-721 and ERC-1155 pointers Jan 18, 2025
@@ -270,7 +277,7 @@ func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-
}

// ConsensusVersion implements ConsensusVersion.
func (AppModule) ConsensusVersion() uint64 { return 16 }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was previously off by one

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.

4 participants