-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Eip micropayments standard for nfts and multi tokens #4393
Eip micropayments standard for nfts and multi tokens #4393
Conversation
All tests passed; auto-merging...(pass) EIPS/eip-micropayments_standard_for_nfts_and_multi_tokens.md
|
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
EIP# will be provided by an EIP editor after review. |
Head branch was pushed to by a user without write access
@julesl23 |
Head branch was pushed to by a user without write access
@poojaranjan |
@julesl23 @alita-moore |
@poojaranjan this is intended behavior when a file is not named correctly. What behavior would you prefer? Also please open a issue in eth-bot 😊 |
@alita-moore |
@@ -0,0 +1,310 @@ | |||
--- | |||
eip: <to be assigned> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eip: <to be assigned> | |
eip: 4393 |
eip: <to be assigned> | ||
title: Micropayments Standard for NFTs and Multi Tokens | ||
description: A standard interface for tip tokens that allows tipping to holders of NFTs and multi tokens | ||
author: Jules Lai (@julesl23), aka Julian Bushell |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
author: Jules Lai (@julesl23), aka Julian Bushell | |
author: Jules Lai (@julesl23) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively you can do Julian Bushell (@jules123)
. It is the author's choice what name they wish to go by.
type: Standards Track | ||
category: ERC | ||
created: 2021-10-24 | ||
requires: 721, 1155, 165 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requires: 721, 1155, 165 | |
requires: 165, 721, 1155 |
|
||
## Abstract | ||
|
||
For the purpose of this proposal, a micropayment is termed as a financial transaction that involves usually a small sum of money, called "tips", that are sent for specific [ERC-721](https://eips.ethereum.org/EIPS/eip-721) NFTs and [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) multi tokens as rewards to their holders. A holder (also referred to as controller) is used here as a more generic term for owner in a semantic sense, as NFTs may represent non-digital assets, such as services etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use relative links of the form [EIP-X](./eip-X.md)
|
||
For the purpose of this proposal, a micropayment is termed as a financial transaction that involves usually a small sum of money, called "tips", that are sent for specific [ERC-721](https://eips.ethereum.org/EIPS/eip-721) NFTs and [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) multi tokens as rewards to their holders. A holder (also referred to as controller) is used here as a more generic term for owner in a semantic sense, as NFTs may represent non-digital assets, such as services etc. | ||
|
||
This standard proposal outlines a generalised way to allow tipping via implementation of an ITipToken interface. The interface is intentionally kept to a minimum in order to allow for maximum use cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This standard proposal outlines a generalised way to allow tipping via implementation of an ITipToken interface. The interface is intentionally kept to a minimum in order to allow for maximum use cases. | |
This standard proposal outlines a generalised way to allow tipping via implementation of an `ITipToken` interface. The interface is intentionally kept to a minimum in order to allow for maximum use cases. |
|
||
## Motivation | ||
|
||
A cheap way to send tips to any type of NFT or multi token. This can be achieved by gas optimising the tip token contract and sending the tips in batches using the tipBatch function from the interface. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A cheap way to send tips to any type of NFT or multi token. This can be achieved by gas optimising the tip token contract and sending the tips in batches using the tipBatch function from the interface. | |
A cheap way to send tips to any type of NFT or multi token. This can be achieved by gas optimising the tip token contract and sending the tips in batches using the `tipBatch` function from the interface. |
Please wrap code text in backticks.
|
||
### Tip Token transfer and value calculations | ||
|
||
Tip token values are exchanged with ERC20 deposits and vice-versa. It is left to the tip token implementer to decide on the price of a tip token and hence how much tip to mint in exchange for the ERC20 deposited. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip token values are exchanged with ERC20 deposits and vice-versa. It is left to the tip token implementer to decide on the price of a tip token and hence how much tip to mint in exchange for the ERC20 deposited. | |
Tip token values are exchanged with ERC-20 deposits and vice-versa. It is left to the tip token implementer to decide on the price of a tip token and hence how much tip to mint in exchange for the ERC-20 deposited. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update all occurrences of unhyphenated ERC/EIPs.
assets/eip-####/README.md
Outdated
@@ -0,0 +1,2 @@ | |||
EIP proposal "Micropayments Standard for NFTs and Multi Tokens" example implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this file.
assets/eip-####/README.md
Outdated
@@ -0,0 +1,2 @@ | |||
EIP proposal "Micropayments Standard for NFTs and Multi Tokens" example implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this file.
Head branch was pushed to by a user without write access
/// @author Jules Lai | ||
/// @notice An implementation for a standard interface for tip tokens that allows tipping to holders of NFTs and multi tokens | ||
/// @dev Allows tipping for ERC-721 and ERC-1155 multi tokens. Their holders receive the rewards of ERC20 compatible deposits | ||
contract TipToken is ITipToken, ERC20, Ownable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an implementation. Standards should not provide implementations, but interfaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an implementation. Standards should not provide implementations, but interfaces.
I removed the implementation and added in 'Reference Implementation' section of proposal a link to my public repo for example implementation and tests
## Reference Implementation | ||
|
||
A [reference/example implementation and tests](https://github.com/julesl23/eip_msnmt) in the GitHub repository that can use be used to assist in implementing this specification. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Reference Implementation | |
A [reference/example implementation and tests](https://github.com/julesl23/eip_msnmt) in the GitHub repository that can use be used to assist in implementing this specification. |
External links should not be included in EIPs. Either include an inline reference implementation, or files in ../assets/eip-4393/x.sol
. Alternatively, this is an optional section and can simply be left out if that makes the most sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
External links should not be included in EIPs. Either include an inline reference implementation, or files in
../assets/eip-4393/x.sol
. Alternatively, this is an optional section and can simply be left out if that makes the most sense.
All sorted in the latest commit. Let me know if there is anything else I need to do.
…xample implementation to help clarify Specification section in response to @MicahZoltu comment.
Hi, issue #4398 has been closed. Am I now waiting on editor approval for merge to move the PR to draft phase? Or is there anything else for me to do at this stage? |
@julesl23 you'll need to assign the eip an eip number which will be provided by the editors |
😑 |
Blocked by CI:
Once that is resolved you'll need to wait for an editor to approve it (lightclient or axic most likely). |
|
||
## Specification | ||
|
||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119. |
Implied via EIP-1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119. | ||
|
||
Smart contracts implementing the ERC-xxxx standard MUST implement all of the functions in the ERC-xxxx interface. MUST also emit the events specified in the interface so that a complete state of the tip token contract can be derived from the events emitted alone. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to replace EIP-xxxx -- usually prefer to not refer to the EIP itself by its own number. Instead say "this EIP" or a something similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Hi, please let me know if there is anything else before approval/review. Thanks |
"pull request not in correct state to enable automerge" from enable-auto-merge |
* New submission for EIP proposal Micropayments Standard for NFTs and Multi Tokens * Added github username to author * Corrected EIP md file name to eip-###.md * Tidied up; removed the ignore files * Made changes to conform to the eip-template.md * Added FEM link to the discussion-to section in the proposal * Made the changes suggested by @lightclient * Added support for shared holders of multi tokens * In assets folder, changed to include only .sol files * Added text to proposal to explain how tips help to create a level playing field * Removed implementation as requested by @axic * Removed optional Reference Implementation section and added snippet example implementation to help clarify Specification section in response to @MicahZoltu comment. * Corrected couple of typos as pointed out by @MicahZoltu * Made the changes requested by @lightclient, such as a more concise abstract
Hi,
Please find my new submission for an EIP. My email address is [email protected] if you wish to contact me via email.
Kind regards,
Jules Lai