Update declarator to include topic

This commit is contained in:
lash 2023-03-24 11:05:21 +00:00
parent 0f2cc2d232
commit 8507f202e7
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
11 changed files with 8 additions and 155 deletions

View File

@ -1 +1 @@
0.0.5
0.2.0

View File

@ -2,19 +2,23 @@ pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 2
// File-version: 3
interface Declarator {
event DeclarationAdded(address _declarator, address _subject, bytes32 _proof);
event DeclarationAdded(address indexed _declarator, address indexed _subject, bytes32 indexed _topic, bytes32 _proof);
// Get all declarations for a subject signed by a declarator
// Get all declarations for a subject (without topic) signed by a declarator
function declaration(address _declarator, address _subject) external view returns ( bytes32[] memory );
// Get all declarations for a subject for the given topic signed by a declarator
function declaration(address _declarator, address _subject, bytes32 _topic) external view returns ( bytes32[] memory );
// Get number of declarations the declarator has ever signed
function declarationCount(address _declarator) external view returns ( uint256 );
// Get the subject of a declarator's declarations at the specific index
function declarationAddressAt(address _declarator, uint256 _idx) external view returns ( address );
// Add a declaration for the subject
function addDeclaration(address _subject, bytes32 _proof) external returns ( bool );
// Add a declaration with topic for the subject
function addDeclaration(address _subject, bytes32 _proof, bytes32 _topic) external returns ( bool );
// Get the declarator that signed a declaration at the specificed index for a subject
function declaratorAddressAt(address _subject, uint256 _idx) external view returns ( address );
// Get the number of declarators that have signed for a subject

View File

@ -1,13 +0,0 @@
pragma solidity ^0.8.0;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 2
// This is a representation of an officially approved Ethereum Improvement Proposal, written by Christian Reitwießner chris@ethereum.org, Nick Johnson nick@ethereum.org, Fabian Vogelsteller fabian@lukso.network, Jordi Baylina jordi@baylina.cat, Konrad Feldmeier konrad.feldmeier@brainbot.com and William Entriken github.com@phor.net. It was released under the CC0 license.
// The proposal source used as reference was a Markdown file with the following digests:
// - sha256:2fc8534206e1e5b7abbb9db21fa5b83d39c51b2dabad441a356b7d18320bfc51
// - swarmhash:a1a2860be878a818a9207503fbbe49cdbd86c3e02a4fdac0a4faafa78f6bdd80
interface ERC165 {
function supportsInterface(bytes4 _sum) external pure returns (bool);
}

View File

@ -1,16 +0,0 @@
pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 2
// This is a representation of an officially approved Ethereum Improvement Proposal, written by Nick Mudge <nick@perfectabstractions.com> and Dan Finlay <dan@danfinlay.com> and released under the CC0 license.
// The proposal source used as reference was a Markdown file with the following digests:
// - sha256:45e14ac315e380b5372a5ffc6783ab11d7eafb7fa5a123e0b8e5fc8c6c527c4c
// - swarmhash:0cadf6a7122d2da20dbab0ef31c692b1b24cf49ae5c1c80f7ce6dbae8885ce01
interface ERC173 {
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function owner() external view returns (address);
function transferOwnership(address _newOwner) external view returns (bool);
}

View File

@ -1,24 +0,0 @@
pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 2
// This is a representation of an officially approved Ethereum Improvement Proposal, written by Fabian Vogelsteller fabian@ethereum.org, Vitalik Buterin vitalik.buterin@ethereum.org. It was released under the CC0 license.
// The proposal source used as reference was a Markdown file with the following digests:
// - sha256:d120f321f2bef19596a401fba86d13352693ccd39645c2bbc84ffb3ed551388f
// - swarmhash:598f13429ec42f50d7a6576ab20feffdaf2135a90805678d24e4ea297bf0e639
interface ERC20 {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function transfer(address _to, uint256 _value) external returns (bool);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool);
function approve(address _spender, uint256 _value) external returns (bool);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint256);
function totalSupply() external view returns (uint256);
function allowance(address _owner, address _spender) external view returns(uint256);
function balanceOf(address _holder) external view returns (uint256);
}

View File

@ -1,25 +0,0 @@
pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 2
// This is a representation of an officially approved Ethereum Improvement Proposal, William Entriken (@fulldecent), Dieter Shirley dete@axiomzen.co, Jacob Evans jacob@dekz.net, Nastassia Sachs nastassia.sachs@protonmail.com
// The proposal source used as reference was a Markdown file with the following digests:
// - sha256:f25b41ad1bff14ec57e8c247f2ecf372fd86245d08ba3cbd005c21a42744a7ca
// - swarmhash:cf43d96b21b0b017ae32fb2ac8df9268f13344d9fd20aa1d959453eaf379a51b
interface ERC721 {
event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);
event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);
event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);
function balanceOf(address _owner) external view returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory _data) external payable;
function transferFrom(address _from, address _to, uint256 _tokenId) external payable;
function approve(address _approved, uint256 _tokenId) external payable;
function setApprovalForAll(address _operator, bool _approved) external;
function getApproved(uint256 _tokenId) external view returns (address);
function isApprovedForAll(address _owner, address _operator) external view returns (bool);
}

View File

@ -1,15 +0,0 @@
pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 1
// This is a representation of an officially approved Ethereum Improvement Proposal, William Entriken (@fulldecent), Dieter Shirley dete@axiomzen.co, Jacob Evans jacob@dekz.net, Nastassia Sachs nastassia.sachs@protonmail.com
// The proposal source used as reference was a Markdown file with the following digests:
// - sha256:f25b41ad1bff14ec57e8c247f2ecf372fd86245d08ba3cbd005c21a42744a7ca
// - swarmhash:cf43d96b21b0b017ae32fb2ac8df9268f13344d9fd20aa1d959453eaf379a51b
interface ERC721Enumerable {
function totalSupply() external view returns (uint256);
function tokenByIndex(uint256 _index) external view returns (uint256);
function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256);
}

View File

@ -1,15 +0,0 @@
pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 1
// This is a representation of an officially approved Ethereum Improvement Proposal, William Entriken (@fulldecent), Dieter Shirley dete@axiomzen.co, Jacob Evans jacob@dekz.net, Nastassia Sachs nastassia.sachs@protonmail.com
// The proposal source used as reference was a Markdown file with the following digests:
// - sha256:f25b41ad1bff14ec57e8c247f2ecf372fd86245d08ba3cbd005c21a42744a7ca
// - swarmhash:cf43d96b21b0b017ae32fb2ac8df9268f13344d9fd20aa1d959453eaf379a51b
interface ERC721Metadata {
function name() external view returns (string memory _name);
function symbol() external view returns (string memory _symbol);
function tokenURI(uint256 _tokenId) external view returns (string memory);
}

View File

@ -1,13 +0,0 @@
pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 1
// This is a representation of an officially approved Ethereum Improvement Proposal, William Entriken (@fulldecent), Dieter Shirley dete@axiomzen.co, Jacob Evans jacob@dekz.net, Nastassia Sachs nastassia.sachs@protonmail.com
// The proposal source used as reference was a Markdown file with the following digests:
// - sha256:f25b41ad1bff14ec57e8c247f2ecf372fd86245d08ba3cbd005c21a42744a7ca
// - swarmhash:cf43d96b21b0b017ae32fb2ac8df9268f13344d9fd20aa1d959453eaf379a51b
interface ERC721Receiver {
function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes memory _data) external returns(bytes4);
}

View File

@ -1,13 +0,0 @@
pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 3
interface Locator {
// URI that may or may not point to a specific resource location
function toURI(bytes memory _data) external view returns (string memory);
// URL pointing to a specific resource location
function toURL(bytes memory _data) external view returns(string memory);
}

View File

@ -1,17 +0,0 @@
pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 1
interface Message {
// Emitted when a new message digest has been set
// Should not be emitted if the digest set is identical to the previous
event Msg(bytes _msgDigest);
// Set a new message content hash
function setMsg(bytes memory _digest) external;
// Get the current message content hash
function getMsg() external view returns(bytes memory);
}