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
Almost every asset created by Ethereum smart contracts has owners. Owners can lose their keys, but not only. We believe that by having a way to re-assign inactive assets, new owners can continue creating value from them. With this proposal, we want to standardize a ping mechanism for Ethereum smart contracts that can be used for all sorts of assets.
Motivation
This EIP is motivated by the need to reduce the impact of having inactive assets. There are a lot of crypto-collectibles/games with tokens that can interact together increasing the user experience.
For example:
Decentraland is a virtual world divided by parcels (ERC-721), each parcel can have content. If for some reason, a parcel owner lost his keys, the parcel can not be updated anymore. In case it has never had content, as a Decentraland's user you will see an empty parcel.
Other games like CryptoKitties, MyCryptoHeroes, etc have assets that can interact together. In case of a loss, the experience could be limited.
No existing EIPs for ping assets found.
This EIP proposes a light-weight interface for keeping active assets and reassigning inactive ones. This abstraction layer can sit on top of standards like ERC-721 or others where an inactive asset can diminish and limit the user experience.
Specification
The interface will expose two simple methods to be implemented as desired to include the mechanism on an Ethereum smart contract.
pragma solidity>=0.4.22<0.6.0;
/** * @title Ping interface. EIP-2227 */interfaceIPing {
/** * @dev Ping your account. */function ping() external;
/** * @dev Check if a token is active or not. * @param _tokenId - token id to check. * @return Whether the token is active or not. */function isActive(uint256_tokenId) externalreturns (bool);
event Ping(addressindexed_owner);
}
This is a possible and super simple implementation of each method. They should have the desired business logic.
Ping
Address level methods used to set sort kind of last active timestamp.
function ping() public {
lastActive[_owner] =block.timestamp;
emitPing(_owner);
}
isActive
Check if a token is active. For existing assets, a grace period can be used to do the math. Disclaimer: The block.timestamp is used knowing that miners could manipulate it. Moreover, as it is in seconds and refers to dates, I do not imagine a real case where an arithmetic overflow occurs.
This interface can be extended to manage how inactive assets will behave.
Ping another account
Ping someone else's account. It can be used within a role system.
/** * @dev Ping someone else's account. * @param _owner - desired account to ping. */function ping(address_owner) public {
require(hasAccess(_owner), "The sender does not have access");
ping(_owner);
}
reActivate
Assign a new owner to an inactive token.
/** * @dev Assign a new owner for an inactive token. * @param _newOwner - new owner for the token. * @param _tokenId - token id. */function reActivate(address_newOwner, uint256_tokenId) public {
require(!isActive(_tokenId), "The token is active");
ownerOf[_tokenId] = _newOwner;
lastActive[_newOwner] =block.timestamp;
}
There has been no activity on this issue for two months. It will be closed in a week if no further activity occurs. If you would like to move this EIP forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review.
This issue was closed due to inactivity. If you are still pursuing it, feel free to reopen it and respond to any feedback or request a review in a comment.
Abstract
Almost every asset created by Ethereum smart contracts has owners. Owners can lose their keys, but not only. We believe that by having a way to re-assign inactive assets, new owners can continue creating value from them. With this proposal, we want to standardize a ping mechanism for Ethereum smart contracts that can be used for all sorts of assets.
Motivation
This EIP is motivated by the need to reduce the impact of having inactive assets. There are a lot of crypto-collectibles/games with tokens that can interact together increasing the user experience.
For example:
Decentraland is a virtual world divided by parcels (ERC-721), each parcel can have content. If for some reason, a parcel owner lost his keys, the parcel can not be updated anymore. In case it has never had content, as a Decentraland's user you will see an empty parcel.
Other games like CryptoKitties, MyCryptoHeroes, etc have assets that can interact together. In case of a loss, the experience could be limited.
No existing EIPs for ping assets found.
This EIP proposes a light-weight interface for keeping active assets and reassigning inactive ones. This abstraction layer can sit on top of standards like ERC-721 or others where an inactive asset can diminish and limit the user experience.
Specification
The interface will expose two simple methods to be implemented as desired to include the mechanism on an Ethereum smart contract.
Interface ID
Possible usage
This is a possible and super simple implementation of each method. They should have the desired business logic.
Ping
Address level methods used to set sort kind of last active timestamp.
isActive
Check if a token is active. For existing assets, a grace period can be used to do the math.
Disclaimer: The
block.timestamp
is used knowing that miners could manipulate it. Moreover, as it is in seconds and refers to dates, I do not imagine a real case where an arithmetic overflow occurs.Optional Extension
This interface can be extended to manage how inactive assets will behave.
Ping another account
Ping someone else's account. It can be used within a role system.
reActivate
Assign a new owner to an inactive token.
@nachomazzara, @eordano and @decentraland team
The text was updated successfully, but these errors were encountered: