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

Add "data" parameter to all mint/transfer methods #75

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

awrichar
Copy link
Contributor

When performing token transfers, it's often beneficial to include additional data alongside the transfer. This can be to indicate the reason for the transfer, to tie it to an off-chain transaction, or to provide special instructions to derived token variants without altering the original contract interface.

One way to achieve this is by adding a bytes data parameter to the method signature, which is common in the Ethereum community and was codified in ERC-5750. Many existing standards, including ERC-721, ERC-1155, and ERC-1400 (specifically the ERC-1594 component) all conform to this pattern.

I'd like to propose that Zeto also adopt this pattern and add bytes data to each of its mint/transfer methods and events. This does represent a change to the signatures.

Note: There are other ways to allow similar functionality without changing the existing signatures (such as with method overloading, or emitting multiple events instead of only one) - but in my opinion the proposed route would be the cleanest and most consistent with other current token standards.

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.

1 participant