@proofofplay/erc721-extensions
v0.0.3
Published
Extensions for ERC721
Downloads
93
Keywords
Readme
Proof of Play ERC721 Extensions
A collection of extensions for ERC721 that add functionality for multi-chain gaming and marketplace tools.
Using this!
If you would like to use this in your application you can install in one of the following methods:
Foundry
forge install proofofplay/erc721-extensions
Npm
npm install @proof-of-play/erc721-extensions
Yarn
yarn add @proof-of-play/erc721-extesnions
Contracts
ERC721Claimable
Allows an L1 Token to be 'claimable' by an oracle on L2. The design is such that an oracle with appropriate permissions can bulk mint any number of tokens. This allows gameplay to mint items on L2 and then bulk claim on L1. The claim can be used a number of ways
- A cron job that claims all unclaimed at a cadence
- A user initiated action on L2 that triggers a claim
ERC721OperatorFilter
An adapter pattern that allows you to customize your transfer hooks at any time. In this repo we have an example of using OpenSea's beforeTransferHook, but you can add your own logic, such as your own custom allowlist or use blur's registry.
ERC721MirroredL2
Extension to ERC721 that allows an oracle to update ownership of the token. We use this in multi-chain setups to mirror the ownership of the L1, allowing ownership on the L1 and gameplay on the L2.
ERC721ContractURI
Extension that adds a settable contractURI for marketplaces.
Testing
We use Foundry to test. Simply run forge test -vvv
to test all contracts or forge coverage
fo the coverage.
Publishing
npm publish --access public