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

feat(world-modules): add ERC721 module #1844

Merged
merged 27 commits into from Nov 1, 2023
Merged

feat(world-modules): add ERC721 module #1844

merged 27 commits into from Nov 1, 2023

Conversation

alvrs
Copy link
Member

@alvrs alvrs commented Oct 30, 2023

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Oct 30, 2023

🦋 Changeset detected

Latest commit: 65a8802

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
@latticexyz/world-modules Major
@latticexyz/cli Major
@latticexyz/abi-ts Major
@latticexyz/block-logs-stream Major
@latticexyz/common Major
@latticexyz/config Major
create-mud Major
@latticexyz/dev-tools Major
@latticexyz/ecs-browser Major
@latticexyz/faucet Major
@latticexyz/gas-report Major
@latticexyz/network Major
@latticexyz/noise Major
@latticexyz/phaserx Major
@latticexyz/protocol-parser Major
@latticexyz/react Major
@latticexyz/recs Major
@latticexyz/schema-type Major
@latticexyz/services Major
@latticexyz/solecs Major
solhint-config-mud Major
solhint-plugin-mud Major
@latticexyz/std-client Major
@latticexyz/std-contracts Major
@latticexyz/store-cache Major
@latticexyz/store-indexer Major
@latticexyz/store-sync Major
@latticexyz/store Major
@latticexyz/utils Major
@latticexyz/world Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@alvrs alvrs changed the base branch from main to alvrs/erc20 October 30, 2023 20:13
@alvrs alvrs force-pushed the alvrs/erc721-puppet branch 2 times, most recently from 6de0e3c to b57cf25 Compare October 30, 2023 20:22
@alvrs alvrs marked this pull request as ready for review October 30, 2023 20:53
@alvrs alvrs requested a review from holic as a code owner October 30, 2023 20:53
// (https://github.com/Vectorized/solady/blob/main/test/ERC721.t.sol)
/////////////////////////////////////////////////

function testMint(uint256 id, address owner) public {
Copy link
Member

@holic holic Oct 31, 2023

Choose a reason for hiding this comment

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

gas reports please! would love to see the gas of this vs solady

holic
holic previously approved these changes Oct 31, 2023
@@ -52,7 +51,7 @@ contract ERC20System is System, IERC20Mintable, PuppetMaster {
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual returns (uint8) {
return Metadata.getDecimals(_metadataTableId(_namespace()));
return ERC20Metadata.getDecimals(_metadataTableId(_namespace()));
Copy link
Member

Choose a reason for hiding this comment

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

I don't feel strongly but wondering if these changes get moved to the ERC20 PR

Copy link
Member Author

Choose a reason for hiding this comment

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

I generally agree, but in this case i'd prefer to not do the refactor for time reasons. We could merge the erc721 PR into the erc20 PR instead of merging both into main individually

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.21;

/* Autogenerated file. Do not edit manually. */
Copy link
Member

Choose a reason for hiding this comment

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

aw man, I thought we had moved these to a codegen dir


contract WrongReturnDataERC721Recipient is ERC721TokenReceiver {
function onERC721Received(address, address, uint256, bytes calldata) public virtual override returns (bytes4) {
return 0xCAFEBEEF;
Copy link
Member

Choose a reason for hiding this comment

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

image

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.

None yet

2 participants