Add comments to interfaces, add ERC721, rename EIP to ERC
This commit is contained in:
parent
890ffec28b
commit
689ad18025
@ -4,11 +4,15 @@ pragma solidity >=0.6.12;
|
|||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
// File-version: 3
|
// File-version: 3
|
||||||
|
|
||||||
interface AccountsIndex {
|
interface AddressIndex {
|
||||||
event AccountAdded(address indexed addedAccount, uint256 indexed accountIndex); // AccountsIndex
|
event AddressAdded(address indexed addedAccount, uint256 indexed accountIndex); // AccountsIndex
|
||||||
|
|
||||||
|
// Return number of entries in index
|
||||||
function entryCount() external view returns (uint256);
|
function entryCount() external view returns (uint256);
|
||||||
|
// Return entry at the spceificed index
|
||||||
function entry(uint256) external view returns (address);
|
function entry(uint256) external view returns (address);
|
||||||
|
// Add an entry to the index
|
||||||
function add(address _account) external returns (bool);
|
function add(address _account) external returns (bool);
|
||||||
|
// Verify that the entry exists in the index
|
||||||
function have(address _account) external view returns (bool);
|
function have(address _account) external view returns (bool);
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,16 @@ pragma solidity >=0.6.12;
|
|||||||
interface Declarator {
|
interface Declarator {
|
||||||
event DeclarationAdded(address _declarator, address _subject, bytes32 _proof);
|
event DeclarationAdded(address _declarator, address _subject, bytes32 _proof);
|
||||||
|
|
||||||
|
// Get all declarations for a subject signed by a declarator
|
||||||
function declaration(address _declarator, address _subject) external view returns ( bytes32[] memory );
|
function declaration(address _declarator, address _subject) external view returns ( bytes32[] memory );
|
||||||
|
// Get number of declarations the declarator has ever signed
|
||||||
function declarationCount(address _declarator) external view returns ( uint256 );
|
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 );
|
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 );
|
function addDeclaration(address _subject, bytes32 _proof) 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 );
|
function declaratorAddressAt(address _subject, uint256 _idx) external view returns ( address );
|
||||||
|
// Get the number of declarators that have signed for a subject
|
||||||
function declaratorCount(address _subject) external view returns ( uint256 );
|
function declaratorCount(address _subject) external view returns ( uint256 );
|
||||||
}
|
}
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
pragma solidity ^0.8.0;
|
|
||||||
|
|
||||||
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
// File-version: 1
|
|
||||||
|
|
||||||
interface EIP165 {
|
|
||||||
function supportsInterface(bytes4 _sum) external pure returns (bool);
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
pragma solidity ^0.8.0;
|
|
||||||
|
|
||||||
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
// File-version: 1
|
|
||||||
|
|
||||||
interface EIP173 {
|
|
||||||
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); // EIP173
|
|
||||||
|
|
||||||
function owner() external view returns (address);
|
|
||||||
function transferOwnership(address _newOwner) external view returns (bool);
|
|
||||||
}
|
|
13
solidity/ERC165.sol
Normal file
13
solidity/ERC165.sol
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
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);
|
||||||
|
}
|
16
solidity/ERC173.sol
Normal file
16
solidity/ERC173.sol
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
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 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); // EIP173
|
||||||
|
|
||||||
|
function owner() external view returns (address);
|
||||||
|
function transferOwnership(address _newOwner) external view returns (bool);
|
||||||
|
}
|
@ -4,6 +4,10 @@ pragma solidity >=0.6.12;
|
|||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
// File-version: 1
|
// File-version: 1
|
||||||
|
|
||||||
|
// 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 {
|
interface ERC20 {
|
||||||
event Transfer(address indexed _from, address indexed _to, uint256 _value);
|
event Transfer(address indexed _from, address indexed _to, uint256 _value);
|
||||||
event TransferFrom(address indexed _from, address indexed _to, address indexed _spender, uint256 _value);
|
event TransferFrom(address indexed _from, address indexed _to, address indexed _spender, uint256 _value);
|
||||||
|
24
solidity/ERC721.sol
Normal file
24
solidity/ERC721.sol
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
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 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, 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);
|
||||||
|
}
|
15
solidity/ERC721Enumerable.sol
Normal file
15
solidity/ERC721Enumerable.sol
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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);
|
||||||
|
}
|
15
solidity/ERC721Metadata.sol
Normal file
15
solidity/ERC721Metadata.sol
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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);
|
||||||
|
}
|
13
solidity/ERC721Receiver.sol
Normal file
13
solidity/ERC721Receiver.sol
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
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);
|
||||||
|
}
|
@ -9,9 +9,15 @@ interface Faucet {
|
|||||||
event FaucetFail(address indexed _recipient, address indexed _token, uint256 _value);
|
event FaucetFail(address indexed _recipient, address indexed _token, uint256 _value);
|
||||||
event FaucetAmountChange(uint256 _value);
|
event FaucetAmountChange(uint256 _value);
|
||||||
|
|
||||||
|
// Address of token the faucet represents
|
||||||
function token() external returns (address);
|
function token() external returns (address);
|
||||||
|
// Amount of tokens the faucet gives out
|
||||||
function tokenAmount() external returns (uint256);
|
function tokenAmount() external returns (uint256);
|
||||||
|
// Set the amount of tokens that the faucet gives out
|
||||||
function setAmount(uint256 _amount) external returns (bool);
|
function setAmount(uint256 _amount) external returns (bool);
|
||||||
|
// Give tokens to the given recipient
|
||||||
function giveTo(address _recipient) external returns (bool);
|
function giveTo(address _recipient) external returns (bool);
|
||||||
|
// Number of blocks that must be mined until faucet can be used for the same address
|
||||||
|
// max uint (-1) can be used to indicate that faucet may not be reused
|
||||||
function cooldown(address _recipient) external returns (uint256);
|
function cooldown(address _recipient) external returns (uint256);
|
||||||
}
|
}
|
||||||
|
@ -7,5 +7,6 @@ pragma solidity >=0.6.12;
|
|||||||
interface Minter {
|
interface Minter {
|
||||||
event Mint(address indexed _minter, address indexed _beneficiary, uint256 value);
|
event Mint(address indexed _minter, address indexed _beneficiary, uint256 value);
|
||||||
|
|
||||||
|
// Mint the specified value of tokens to the specified recipient
|
||||||
function mintTo(address _beneficiary, uint256 value) external returns (bool);
|
function mintTo(address _beneficiary, uint256 value) external returns (bool);
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ pragma solidity >=0.6.12;
|
|||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
// File-version: 1
|
// File-version: 1
|
||||||
|
|
||||||
interface FungibleMinter {
|
interface Writer {
|
||||||
function mintedAt(uint256 _tokenId) external view returns (uint256);
|
function addWriter(address _writer) external returns (bool);
|
||||||
|
function deleteWriter(address _writer) external returns (bool);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user