Update interfaces to current implenentations

This commit is contained in:
lash 2023-03-21 20:46:08 +00:00
parent 99dce60a97
commit 0f2cc2d232
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
13 changed files with 94 additions and 27 deletions

1
python/MANIFEST.in Normal file
View File

@ -0,0 +1 @@
include *requirements*

View File

@ -2,7 +2,7 @@ pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746 // Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 3 // File-version: 4
interface AddressIndex { interface AddressIndex {
event AddressAdded(address indexed addedAccount, uint256 indexed accountIndex); // AccountsIndex event AddressAdded(address indexed addedAccount, uint256 indexed accountIndex); // AccountsIndex
@ -10,9 +10,20 @@ interface AddressIndex {
// Return number of entries in index // Return number of entries in index
function entryCount() external view returns (uint256); function entryCount() external view returns (uint256);
// Return entry at the spceificed index // Return entry at the spceificed index
// Will revert if index is beyond array length.
function entry(uint256) external view returns (address); function entry(uint256) external view returns (address);
// Add an entry to the index // Add an entry to the index. Incresases the entry count.
function add(address _account) external returns (bool); function add(address) external returns (bool);
// Remove an entry from the index. Reduces the entry count.
function remove(address) external returns (bool);
// Verify that the entry exists in the index // Verify that the entry exists in the index
function have(address _account) external view returns (bool); function have(address) external view returns (bool);
// Deactivate account but keep in index. Does not affect entry count.
function deactivate(address) external returns (bool);
// Activate previously deactivated account. Does not affect entry count.
function activate(address) external returns (bool);
// Check if account exists and is active;
function isActive(address) external view returns (bool);
// Retrieve the timestamp when account was added
function time(address) external view returns (uint256);
} }

14
solidity/Burner.sol Normal file
View File

@ -0,0 +1,14 @@
pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 2
interface Burner {
event Burn(uint256 _burned);
function burn(uint256 _burn) external returns (bool);
function totalBurned() external returns (uint256);
function totalMinted() external returns (uint256);
}

View File

@ -1,4 +1,4 @@
pragma solidity ^0.8.0; pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746 // Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
@ -9,7 +9,7 @@ pragma solidity ^0.8.0;
// - sha256:45e14ac315e380b5372a5ffc6783ab11d7eafb7fa5a123e0b8e5fc8c6c527c4c // - sha256:45e14ac315e380b5372a5ffc6783ab11d7eafb7fa5a123e0b8e5fc8c6c527c4c
// - swarmhash:0cadf6a7122d2da20dbab0ef31c692b1b24cf49ae5c1c80f7ce6dbae8885ce01 // - swarmhash:0cadf6a7122d2da20dbab0ef31c692b1b24cf49ae5c1c80f7ce6dbae8885ce01
interface ERC173 { interface ERC173 {
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); // EIP173 event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function owner() external view returns (address); function owner() external view returns (address);
function transferOwnership(address _newOwner) external view returns (bool); function transferOwnership(address _newOwner) external view returns (bool);

View File

@ -2,7 +2,7 @@ pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746 // Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 1 // 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. // 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: // The proposal source used as reference was a Markdown file with the following digests:
@ -10,7 +10,6 @@ pragma solidity >=0.6.12;
// - swarmhash:598f13429ec42f50d7a6576ab20feffdaf2135a90805678d24e4ea297bf0e639 // - 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 Approval(address indexed _owner, address indexed _spender, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function transfer(address _to, uint256 _value) external returns (bool); function transfer(address _to, uint256 _value) external returns (bool);

View File

@ -2,7 +2,7 @@ pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746 // Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 1 // 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 // 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: // The proposal source used as reference was a Markdown file with the following digests:
@ -15,7 +15,8 @@ interface ERC721 {
function balanceOf(address _owner) external view returns (uint256); function balanceOf(address _owner) external view returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address); function ownerOf(uint256 _tokenId) external view returns (address);
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; 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 transferFrom(address _from, address _to, uint256 _tokenId) external payable;
function approve(address _approved, uint256 _tokenId) external payable; function approve(address _approved, uint256 _tokenId) external payable;
function setApprovalForAll(address _operator, bool _approved) external; function setApprovalForAll(address _operator, bool _approved) external;

11
solidity/Expire.sol Normal file
View File

@ -0,0 +1,11 @@
pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 2
interface Expire {
event Expired(uint256 _timestamp);
function expires() external returns (uint256);
}

View File

@ -2,22 +2,23 @@ pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746 // Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 5 // File-version: 6
interface Faucet { interface Faucet {
event FaucetUsed(address indexed _recipient, address indexed _token, uint256 _value); event Give(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 // Address of token the faucet represents
// The faucet will return gas tokens with the zero-address is returned.
function token() external returns (address); function token() external returns (address);
// Amount of tokens the faucet gives out // 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 // Give tokens to the given recipient. Returns amount of tokens given.
function setAmount(uint256 _amount) external returns (bool); function giveTo(address _recipient) external returns (uint256);
// Give tokens to the given recipient // Give tokens to yourself. Returns amount of tokens given.
function giveTo(address _recipient) external returns (bool); function gimme() external returns (uint256);
// Number of blocks that must be mined until faucet can be used for the same address // Returns timestamp when faucet may be used again by _recipient
// max uint (-1) can be used to indicate that faucet may not be reused // If 0 is returned, the address has not yet been used.
function cooldown(address _recipient) external returns (uint256); // A return value of max(uint256) indicates that the faucet may not be used again.
function nextTime(address _recipient) external returns (uint256);
} }

13
solidity/Locator.sol Normal file
View 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: 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);
}

17
solidity/Msg.sol Normal file
View File

@ -0,0 +1,17 @@
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);
}

View File

@ -2,10 +2,9 @@ pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746 // Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 1 // File-version: 2
interface Registry { interface Registry {
function set(bytes32, address) external returns (bool); function set(bytes32, address) external returns (bool);
function bind(bytes32, bytes32) external returns (bool); function bind(bytes32, bytes32) external returns (bool);
function identifiers(uint256) external view returns (bytes32);
} }

View File

@ -2,8 +2,9 @@ pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746 // Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 3 // File-version: 2
interface RegistryClient { interface RegistryClient {
function addressOf(bytes32) external view returns (address); function addressOf(bytes32) external view returns (address);
function identifiers(uint256) external view returns (bytes32);
} }

View File

@ -2,14 +2,13 @@ pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746 // Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
// File-version: 1 // File-version: 2
interface Writer { interface Writer {
event WriterAdded(address _writer); event WriterAdded(address indexed _executor, address _writer);
event WriterRemoved(address _writer); event WriterDeleted(address indexed _executor, address _writer);
function addWriter(address _writer) external returns (bool); function addWriter(address _writer) external returns (bool);
function deleteWriter(address _writer) external returns (bool); function deleteWriter(address _writer) external returns (bool);
function isWriter(address _writer) external returns (bool); function isWriter(address _writer) external returns (bool);
function writers(uint256 _idx) external view returns (address);
} }