Skip to content

Conversation

jaydenwindle
Copy link
Contributor

No description provided.

function owner() public view virtual returns (address) {
(uint256 chainId, address tokenContract, uint256 tokenId) = token();
if (chainId != block.chainid) return address(0);
if (chainId != block.chainid && block.chainid == deploymentChainId) return address(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be chainId != block.chainid && chainid != deploymentChainId?

Copy link
Contributor

@Vectorized Vectorized left a comment

Choose a reason for hiding this comment

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

I think ERC6551AccountUpgradeable should also be updated with the hardfork support too.

…ded hardfork compatibility to upgradeable example
@jaydenwindle
Copy link
Contributor Author

jaydenwindle commented Apr 11, 2024

@Vectorized good catch, the logic here was a bit wonky. Was trying to ensure that accounts deployed on chains other than the NFT's home chain will still return a null owner post-hardfork. This can be accomplished in a simpler way by checking against deploymentChainId instead of the live block.chainid.

Added a test case to show the expected behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants