-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathIERC735.sol
26 lines (22 loc) · 1.94 KB
/
IERC735.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// https://github.com/ethereum/eips/issues/735
pragma solidity ^0.8.1;
interface IERC735 {
event ClaimRequested(uint256 indexed claimRequestId, uint256 indexed topic, uint256 scheme, address indexed issuer, bytes signature, bytes data, string uri);
event ClaimAdded(bytes32 indexed claimId, uint256 indexed topic, uint256 scheme, address indexed issuer, bytes signature, bytes data, string uri);
event ClaimRemoved(bytes32 indexed claimId, uint256 indexed topic, uint256 scheme, address indexed issuer, bytes signature, bytes data, string uri);
event ClaimChanged(bytes32 indexed claimId, uint256 indexed topic, uint256 scheme, address indexed issuer, bytes signature, bytes data, string uri);
struct Claim {
uint256 topic;
uint256 scheme;
address issuer; // msg.sender
bytes signature; // this.address + topic + data
bytes data;
string uri;
}
function getClaim(uint256 _claimId) external view returns(uint256 topic, uint256 scheme, address issuer, bytes memory signature, bytes memory data, string memory uri); // For some reason, this is bytes32 in the standard. Corrected because that doesn't make any sense.
function getClaimIdsByTopic(uint256 _topic) external view returns(uint256[] memory claimIds); // For some reason, this is bytes32[] in the standard. Corrected because that doesn't make any sense.
function addClaim(uint256 _topic, uint256 _scheme, address _issuer, bytes calldata _signature, bytes calldata _data, string calldata _uri) external returns (uint256 claimRequestId);
// function changeClaim(bytes32 _claimId, uint256 _topic, uint256 _scheme, address _issuer, bytes calldata _signature, bytes calldata _data, string calldata _uri) external returns (bool success);
function removeClaim(uint256 _claimId) external returns (bool success); // For some reason, this is bytes32 in the standard. Corrected because that doesn't make any sense.
}