You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alters TablelandDeployments to use a wrapper/interface around the ITablelandTables and IERC721AUpgradeable contracts, enabling the same functionality while resolving potential dependency issues. Originally noted here and here (happened to at least two developers).
Details
Currently, the TablelandDeployments contract imports TablelandTables, which is an OpenZeppelin OwnableUpgradeable contract. This can cause issues because, for example, Remix installs dependencies but doesn't resolve peer-dependencies by grabbing the version the first library depends on—it just resolves to the latest version. With OZ's v5 release, the OwnableUpgradeable contract has breaking changes, as do some others like PausableUpgradeable that now exist in different package path.
Remix is still a highly used entrypoint for developers testing out smart contracts, so making things fully compatible here makes sense. Alternatively, we could change TablelandTables to use OZ v5 contracts, but the TablelandDeployments change seems easier.
How it was tested
Existing tests passed.
Tested out with example contract in Remix.
Checklist:
My code follows the style guidelines of this project
I have performed a self-review of my own code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation
My changes generate no new warnings
I have added tests that prove my fix is effective or that my feature works
New and existing unit tests pass locally with my changes
Any dependent changes have been merged and published in downstream modules
@joewagner it shouldn't have any impact! That branch was a feature that changed the TablelandDeployments behavior from using a registry interface to using the actual registry contract, which opened up methods that aren't explicitly part of the registry interface (like token transfers). However, that had side effects that this PR aims to address.
Wrt that commit--correct, the logic in this PR, effectively, reverts that commit. Initially, I had implemented the TablelandTablesImpl interface/wrapper in that PR but changed to directly importing the TablelandTables contract. This was purely a simplicity decision since importing TablelandTables was a single import, but the wrapper/interface setup accomplishes the same thing and avoids the dependency side effects.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Alters
TablelandDeploymentsto use a wrapper/interface around theITablelandTablesandIERC721AUpgradeablecontracts, enabling the same functionality while resolving potential dependency issues. Originally noted here and here (happened to at least two developers).Details
Currently, the
TablelandDeploymentscontract importsTablelandTables, which is an OpenZeppelinOwnableUpgradeablecontract. This can cause issues because, for example, Remix installs dependencies but doesn't resolve peer-dependencies by grabbing the version the first library depends on—it just resolves to the latest version. With OZ's v5 release, theOwnableUpgradeablecontract has breaking changes, as do some others likePausableUpgradeablethat now exist in different package path.Remix is still a highly used entrypoint for developers testing out smart contracts, so making things fully compatible here makes sense. Alternatively, we could change
TablelandTablesto use OZ v5 contracts, but theTablelandDeploymentschange seems easier.How it was tested
Checklist: