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 EIP-5773: Multi-Resource Token standard #5773

Merged
merged 21 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ee0025a
Propose Multi-Resource Token standard
ThunderDeliverer Oct 10, 2022
758ecdc
Address issues reported by EIP repository's CI
ThunderDeliverer Oct 10, 2022
e3a880b
Fix styling discrepancies in section titles
ThunderDeliverer Oct 10, 2022
365eb1c
Address CI's issues in the preabmle
ThunderDeliverer Oct 10, 2022
69b2ffd
Add discussion URL
ThunderDeliverer Oct 15, 2022
08c0038
Fix discussion URL formatting
ThunderDeliverer Oct 15, 2022
f192cbc
Add the EIP number
ThunderDeliverer Oct 18, 2022
d8622f5
Fix getResourceMeta specification
ThunderDeliverer Oct 21, 2022
897561a
Apply changes based on PR comments
ThunderDeliverer Oct 26, 2022
674cf11
Replace "primitive" with a clearer explanation
ThunderDeliverer Oct 27, 2022
e2bee24
Apply changes based on ECH call #5
ThunderDeliverer Nov 15, 2022
fabcd1b
Address the stylistic issues reported by the CI
ThunderDeliverer Nov 15, 2022
67718ce
Fix a reference to EIP-712
ThunderDeliverer Nov 15, 2022
a9543d8
Minor typo fixes
ThunderDeliverer Nov 15, 2022
1eecc07
Updates `getResourceMetadata` description
steven2308 Nov 15, 2022
4522c8d
Rename MultiResource -> MultiAsset and relicense
ThunderDeliverer Nov 16, 2022
0530684
Fix license identifier & Specification contract title
ThunderDeliverer Nov 18, 2022
b2d3efa
Fix indexes of Rationale questions
ThunderDeliverer Nov 20, 2022
b0f75d9
Minor polishing of the rationale
ThunderDeliverer Nov 21, 2022
3d6c7ec
Update references to assets to use an istead of a in Rationale
ThunderDeliverer Nov 21, 2022
554ceed
Final polishes
ThunderDeliverer Nov 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
510 changes: 510 additions & 0 deletions EIPS/eip-5773.md

Large diffs are not rendered by default.

92 changes: 92 additions & 0 deletions assets/eip-5773/contracts/IMultiAsset.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// SPDX-License-Identifier: CC0-1.0

pragma solidity ^0.8.0;

interface IMultiAsset {
event AssetSet(uint64 assetId);

event AssetAddedToToken(
uint256 indexed tokenId,
uint64 indexed assetId,
uint64 indexed replacesId
);

event AssetAccepted(
uint256 indexed tokenId,
uint64 indexed assetId,
uint64 indexed replacesId
);

event AssetRejected(uint256 indexed tokenId, uint64 indexed assetId);

event AssetPrioritySet(uint256 indexed tokenId);

event ApprovalForAssets(
address indexed owner,
address indexed approved,
uint256 indexed tokenId
);

event ApprovalForAllForAssets(
address indexed owner,
address indexed operator,
bool approved
);

function acceptAsset(
uint256 tokenId,
uint256 index,
uint64 assetId
) external;

function rejectAsset(
uint256 tokenId,
uint256 index,
uint64 assetId
) external;

function rejectAllAssets(uint256 tokenId, uint256 maxRejections) external;

function setPriority(uint256 tokenId, uint16[] calldata priorities)
external;

function getActiveAssets(uint256 tokenId)
external
view
returns (uint64[] memory);

function getPendingAssets(uint256 tokenId)
external
view
returns (uint64[] memory);

function getActiveAssetPriorities(uint256 tokenId)
external
view
returns (uint16[] memory);

function getAssetReplacements(uint256 tokenId, uint64 newAssetId)
external
view
returns (uint64);

function getAssetMetadata(uint256 tokenId, uint64 assetId)
external
view
returns (string memory);

function approveForAssets(address to, uint256 tokenId) external;

function getApprovedForAssets(uint256 tokenId)
external
view
returns (address);

function setApprovalForAllForAssets(address operator, bool approved)
external;

function isApprovedForAllForAssets(address owner, address operator)
external
view
returns (bool);
}
Loading