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
Add a hook to Origami ERC-721 implementation to customize token_uri().
Proposed Solution
Create ERC721MetadataHooksTrait , containing a function custom_uri(), that can be implemented by the token contract.
This function will be called internally by called internally by erc721_metadata_component::token_uri() to customize its results.
The custom hook implementation is optional, and if not implemented, the token contract will have to import ERC721MetadataHooksEmptyImpl, an empty implementation that should not affect the standard uri.
Alternatives
Teh only way to customize the token uri is to clone erc721_metadata_component and use it on the token contract, instead of using Origami's own.
Related Code
OpenZeppelin has similar hooks at their ERC721 and ERC20 implementations
Additional context
This hook is required to allow fully on-chain metadata.
If the feature is accepted, would you be willing to contribute it?
Yes I would be willing to contribute
The text was updated successfully, but these errors were encountered:
Feature Request
Add a hook to Origami ERC-721 implementation to customize
token_uri()
.Proposed Solution
ERC721MetadataHooksTrait
, containing a functioncustom_uri()
, that can be implemented by the token contract.erc721_metadata_component::token_uri()
to customize its results.ERC721MetadataHooksEmptyImpl
, an empty implementation that should not affect the standard uri.Alternatives
Teh only way to customize the token uri is to clone
erc721_metadata_component
and use it on the token contract, instead of using Origami's own.Related Code
OpenZeppelin has similar hooks at their ERC721 and ERC20 implementations
Additional context
This hook is required to allow fully on-chain metadata.
If the feature is accepted, would you be willing to contribute it?
The text was updated successfully, but these errors were encountered: