From 707ec1cce247124dcba270e3f82f27544f302e5d Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Wed, 6 Feb 2019 09:55:14 +1000 Subject: [PATCH 01/25] First draft --- EIPS/eip-x.md | 166 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 EIPS/eip-x.md diff --git a/EIPS/eip-x.md b/EIPS/eip-x.md new file mode 100644 index 0000000000000..ccfe051f6954f --- /dev/null +++ b/EIPS/eip-x.md @@ -0,0 +1,166 @@ +--- +eip: +title: Smart Contract Interface for Licences +author: , FirstName (@GitHubUsername) and GitHubUsername (@GitHubUsername)> +discussions-to: +status: Draft +type: +category (*only required for Standard Track): +created: +requires (*optional): +replaces (*optional): +--- + +# Abstract + +This Etherium Improvement Proposal (EIP) proposes an Ethereum standard for the issuance of licences, permits and grants (Licences). + +A Licence is a limited and temporary authority, granted to a natural (e.g. you) or legal person (e.g. a corporation), to do something that would otherwise be unlawful pursuant to a legal framework. A public Licence is granted by the government, directly (e.g. by the NSW Department of Primary Industries) or indirectly (e.g. by an agent operating under the government’s authority), and derives its authority from legislation, though this is often practically achieved via delegated legislation such as regulations. This can be contrasted to a private licence – for example, the licence you grant to a visitor who comes onto your property. + +A Licence has the following properties: + +* granted personally to the licencee (Licencee), though it may be transferrable to another person or company; + +* conferring a temporary right to the Licencee to own, use or do something that would otherwise be prohibited, without conferring any property interest in the underlying thing. For example, you may be granted a licence to visit a national park without acquiring any ownership in or over the park itself; + +* allowing the government authority responsible for the Licence to amend, revoke, renew, suspend or deny the issuance of the Licence, or to impose conditions or penalties for non-compliance; and + +* usually issued only after the payment of a fee or the meeting of some criteria. + +Additionally, a Licence may be granted in respect of certain information. For example, a Licence may be issued in respect of a vehicle registration number and attaching to that specific registered vehicle. + +## Motivation + +Governments are responsible for the issuance and management of Licences. However, maintaining and sharing this data can be complicated and inefficient. The granting of Licences usually requires the filing of paper-based application forms, manual oversight of applicable legislation and data entry into registries, as well as the issuance of paper based Licences. If individuals wish to sight information on Licence registries, they often need to be present at the government office and complete further paper-based enquiry forms in order to access that data (if available publicly). + +This EIP seeks to define a standard that will allow for the granting and/or management of Licences via Etherium smart contracts. The motivation is, in essence, to address the inefficiencies inherent in current licencing systems. + +## Licences + +This EIP will define the smart contract interface for Licences. + +## Rationale + +The use of smart contracts to apply for, renew, suspend and revoke Licences will free up much needed government resources and allow for the more efficient management of Licences. The EIP also seeks to improve the end user experience of the Licence system. In an era of open government, there is also an increased expectation that individuals will be able to easily access Licence registries, and that the process will be transparent and fair. + +By creating an EIP, we hope to increase the use of Ethereum based and issued Licences, which will address these issues. + +The Ethereum blockchain is adaptable to various Licences and government authorities. It will also be easily translatable into other languages and can be used by other governmental authorities across the world. Moreover, a blockchain will more effectively protect the privacy of Licence-holders’ data, particularly at a time of an ever-increasing volume of government data breaches. + +The EIP has been developed following the review of a number of licensing regulations at the national and state level in Australia. The review allowed the identification of the common licence requirements and criteria for incorporation into the EIP. We have included these in the proposed standard but seek feedback on whether these criteria are sufficient and universal. + +## Test Case + +A real world example of a Licence is a permit required to camp in a national park in Australia (e.g. Kakadu national park in the Northern Territory of Australia) under the Environment Protection and Biodiversity Conservation Regulations 2000 (Cth) (EPBC Act) and the Environment Protection and Biodiversity Conservation Regulations 2000 (the Regulations). Pursuant to the EPBC Act and the Regulations, the Director of National Parks oversees a camping permit system, which is intended to help regulate certain activities in National Parks. Permits allowing access to National Parks can be issued to legal or natural persons if the applicant has met certain conditions. + +The current digital portal and application form to camp at Kakadu National Park (the Application) can be accessed at: http://www.environment.gov.au/system/files/resources/b3481ed3-164b-4e72-a9f8-91fc987d90e7/files/kakadu-camping-permit-form-19jan2015-pdf.pdf + +The user must provide the following details when making an Application: + +* The full name and contact details of each person to whom the permit is to be issued; + +* If the applicant is a company or other incorporated body: + +o the name, business address and postal address of the company or incorporated body; + +o if the applicant is a company— + +* the full name of each of the directors of the company; + +* the full name and contact details of the person completing the application form; + +* the ACN or ABN of the company or other incorporated body (if applicable); + +* Details of the proposed camping purpose (e.g. private camping, school group, etc.); + +* A start date and duration for the camping (up to the maximum duration allowed by law); + +* Number of campers (up to the maximum allowed by law); + +* All other required information not essential to the issuance of the Licence (e.g. any particular medical needs of the campers); and + +* Fees payable depending on the site, duration and number of campers. + +The Regulations also set out a number of conditions that must be met by licensees when the permit has been issued. The Regulations allow the Director of National Parks to cancel, renew or transfer the licence. The above workflow could be better performed by way of a smart contract. + +The key criteria required as part of this process form part of the proposed Ethereum standard. We have checked this approach by also considering the issuance of a Commercial Fishing Licence under Part 8 “Licensing and other commercial fisheries management” of the Fisheries Management (General) Regulation 2010 (NSW) (Fisheries Regulations) made pursuant to the Fisheries Management Act 1994 (NSW) (Fisheries Act). + +## Implementation + +The issuance and ownership of a Licence can be digitally represented on the Ethereum blockchain. + +Smart contracts can be used to embed regulatory requirements with respect to the relevant Licence in the blockchain. The Licence would be available electronically in the form of a token. This might be practically represented by a QR code, for example, displaying the current Licence information. The digital representation of the Licence would be stored in a digital wallet, typically an application on a smartphone or tablet computer. The proposed standard allows issuing authorities or regulators to amend, revoke or deny Licences from time to time, with the result of their determinations reflected in the Licence token in near real-time. Licence holders will therefore be notified almost instantly of any amendments, revocations or issues involving their Licence. + +## Interface + +### Solidity Example +``` +interface EIP-x { + string public name; + uint256 public totalSupply; + + function grantAuthority(address who); + function revokeAuthority(address who); + function hasAuthority(address who) pure public returns (bool); + + function issue(address who, uint256 from, uint256 to) public; + function revoke(address who) public; + + function hasValid(address who) public view returns (boolean); + function purchase(uint256 from, uint256 to) public payable; +} + +contract Permit is EIP-x { + + string public name = "Fraser Island Camping Area"; + uint256 public totalSupply; + + address private _owner; + mapping(address => address) private _authorities; + mapping(addrress => Permit) private _holders; + + struct Permit { + address issuer; + uint256 start; + uint256 end; + } + + constructor() public { + _owner = msg.sender; + } + + function grantAuthority(address who) public onlyOwner() { + _authorities[who] = who; + } + + function revokeAuthority(address who) public onlyOwner() { + delete _authorities[who]; + } + + function hasAuthority(address who) pure public returns (bool) { + return _authorities[msg.sender] != address(0); + } + + function issue(address who, uint256 from, uint256 to) public onlyAuthority() { + + } + + function revoke(address who) public onlyAuthority() { + delete _holders[who]; + } + + function hasValid(address who) public view returns (boolean) { + return _holders[who] != address(0); + } + + function purchase(uint256 from, uint256 to) public payable; + + modifier onlyOwner() { + require(msg.sender == _owner, "Only owner can perform this function"); + } + + modifier onlyAuthority() { + require(hasAuthority(msg.sender), "Only an authority can perform this function"); + } +} +``` \ No newline at end of file From 14ca2b5fc039df4a95da26ede8bedfc350cb6f17 Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Wed, 6 Feb 2019 10:07:52 +1000 Subject: [PATCH 02/25] Update eip-x.md --- EIPS/eip-x.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/EIPS/eip-x.md b/EIPS/eip-x.md index ccfe051f6954f..0730513e5af74 100644 --- a/EIPS/eip-x.md +++ b/EIPS/eip-x.md @@ -13,18 +13,15 @@ replaces (*optional): # Abstract -This Etherium Improvement Proposal (EIP) proposes an Ethereum standard for the issuance of licences, permits and grants (Licences). +This Ethereum Improvement Proposal (EIP) proposes an Ethereum standard for the issuance of licences, permits and grants (Licences). A Licence is a limited and temporary authority, granted to a natural (e.g. you) or legal person (e.g. a corporation), to do something that would otherwise be unlawful pursuant to a legal framework. A public Licence is granted by the government, directly (e.g. by the NSW Department of Primary Industries) or indirectly (e.g. by an agent operating under the government’s authority), and derives its authority from legislation, though this is often practically achieved via delegated legislation such as regulations. This can be contrasted to a private licence – for example, the licence you grant to a visitor who comes onto your property. A Licence has the following properties: * granted personally to the licencee (Licencee), though it may be transferrable to another person or company; - * conferring a temporary right to the Licencee to own, use or do something that would otherwise be prohibited, without conferring any property interest in the underlying thing. For example, you may be granted a licence to visit a national park without acquiring any ownership in or over the park itself; - * allowing the government authority responsible for the Licence to amend, revoke, renew, suspend or deny the issuance of the Licence, or to impose conditions or penalties for non-compliance; and - * usually issued only after the payment of a fee or the meeting of some criteria. Additionally, a Licence may be granted in respect of certain information. For example, a Licence may be issued in respect of a vehicle registration number and attaching to that specific registered vehicle. @@ -163,4 +160,4 @@ contract Permit is EIP-x { require(hasAuthority(msg.sender), "Only an authority can perform this function"); } } -``` \ No newline at end of file +``` From b2634b29ec06497e6b5df25b85a7cc3d4bbf033f Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Wed, 6 Feb 2019 10:14:17 +1000 Subject: [PATCH 03/25] Update eip-x.md --- EIPS/eip-x.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/EIPS/eip-x.md b/EIPS/eip-x.md index 0730513e5af74..cc181472ff120 100644 --- a/EIPS/eip-x.md +++ b/EIPS/eip-x.md @@ -1,14 +1,12 @@ --- eip: title: Smart Contract Interface for Licences -author: , FirstName (@GitHubUsername) and GitHubUsername (@GitHubUsername)> +author: Lucas Cullen @BitcoinBrisbane, , FirstName (@GitHubUsername) and GitHubUsername (@GitHubUsername)> discussions-to: status: Draft -type: +type: Interface category (*only required for Standard Track): -created: -requires (*optional): -replaces (*optional): +created: 2019-02-06 --- # Abstract From 9083c0f6607505d86dc8f6541b7bc6d0c1d8ad69 Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Wed, 6 Feb 2019 10:14:46 +1000 Subject: [PATCH 04/25] Update eip-x.md --- EIPS/eip-x.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-x.md b/EIPS/eip-x.md index cc181472ff120..42667c55892ab 100644 --- a/EIPS/eip-x.md +++ b/EIPS/eip-x.md @@ -5,7 +5,7 @@ author: Lucas Cullen @BitcoinBrisbane, status: Draft type: Interface -category (*only required for Standard Track): +category ERC created: 2019-02-06 --- From 9be2f921341be490ebc34c32936d369a5e5670a0 Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Wed, 6 Feb 2019 10:15:43 +1000 Subject: [PATCH 05/25] Update eip-x.md --- EIPS/eip-x.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-x.md b/EIPS/eip-x.md index 42667c55892ab..d37e917499df8 100644 --- a/EIPS/eip-x.md +++ b/EIPS/eip-x.md @@ -4,7 +4,7 @@ title: Smart Contract Interface for Licences author: Lucas Cullen @BitcoinBrisbane, , FirstName (@GitHubUsername) and GitHubUsername (@GitHubUsername)> discussions-to: status: Draft -type: Interface +type: Standards Track category ERC created: 2019-02-06 --- From 0714ac768a593fb0930f311357833a66588d37dd Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Wed, 6 Feb 2019 10:18:44 +1000 Subject: [PATCH 06/25] Update eip-x.md --- EIPS/eip-x.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-x.md b/EIPS/eip-x.md index d37e917499df8..bcc9f786be4c7 100644 --- a/EIPS/eip-x.md +++ b/EIPS/eip-x.md @@ -1,7 +1,7 @@ --- eip: title: Smart Contract Interface for Licences -author: Lucas Cullen @BitcoinBrisbane, , FirstName (@GitHubUsername) and GitHubUsername (@GitHubUsername)> +author: Lucas Cullen @BitcoinBrisbane, Kai Yeung (@CivicKai), Katrina Donaghy, katrina@civicledger.com discussions-to: status: Draft type: Standards Track From 02c07d657594a35254acbe6508b54ccc23e56ed3 Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Wed, 6 Feb 2019 13:06:16 +1000 Subject: [PATCH 07/25] Update eip-x.md --- EIPS/eip-x.md | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/EIPS/eip-x.md b/EIPS/eip-x.md index bcc9f786be4c7..190b1525e13a1 100644 --- a/EIPS/eip-x.md +++ b/EIPS/eip-x.md @@ -1,7 +1,7 @@ --- eip: title: Smart Contract Interface for Licences -author: Lucas Cullen @BitcoinBrisbane, Kai Yeung (@CivicKai), Katrina Donaghy, katrina@civicledger.com +author: Lucas Cullen @BitcoinBrisbane, Kai Yeung @CivicKai, Katrina Donaghy, katrina@civicledger.com discussions-to: status: Draft type: Standards Track @@ -90,7 +90,7 @@ Smart contracts can be used to embed regulatory requirements with respect to the ### Solidity Example ``` -interface EIP-x { +interface EIPx { string public name; uint256 public totalSupply; @@ -105,14 +105,16 @@ interface EIP-x { function purchase(uint256 from, uint256 to) public payable; } -contract Permit is EIP-x { +pragma solidity ^0.5.3; + +contract EIP is EIPx { string public name = "Fraser Island Camping Area"; uint256 public totalSupply; address private _owner; - mapping(address => address) private _authorities; - mapping(addrress => Permit) private _holders; + mapping(address => bool) private _authorities; + mapping(address => Permit) private _holders; struct Permit { address issuer; @@ -125,37 +127,43 @@ contract Permit is EIP-x { } function grantAuthority(address who) public onlyOwner() { - _authorities[who] = who; + _authorities[who] = true; } function revokeAuthority(address who) public onlyOwner() { delete _authorities[who]; } - function hasAuthority(address who) pure public returns (bool) { - return _authorities[msg.sender] != address(0); + function hasAuthority(address who) public view returns (bool) { + return _authorities[who] == true; } - function issue(address who, uint256 from, uint256 to) public onlyAuthority() { - + function issue(address who, uint256 start, uint256 end) public onlyAuthority() { + _holders[who] = Permit(_owner, start, end); + totalSupply += 1; } function revoke(address who) public onlyAuthority() { delete _holders[who]; } - function hasValid(address who) public view returns (boolean) { - return _holders[who] != address(0); + function hasValid(address who) public view returns (bool) { + return _holders[who].start > now && _holders[who].end < now; } - function purchase(uint256 from, uint256 to) public payable; + function purchase(uint256 from, uint256 to) public payable { + require(msg.value == 1 ether, "Incorrect fee"); + issue(msg.sender, from, to); + } modifier onlyOwner() { require(msg.sender == _owner, "Only owner can perform this function"); + _; } modifier onlyAuthority() { - require(hasAuthority(msg.sender), "Only an authority can perform this function"); + require(hasAuthority(msg.sender) == true, "Only an authority can perform this function"); + _; } } ``` From 108d11824e61db905486e702b6dd0bcf5c522408 Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Wed, 6 Feb 2019 13:07:38 +1000 Subject: [PATCH 08/25] Update eip-x.md --- EIPS/eip-x.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/EIPS/eip-x.md b/EIPS/eip-x.md index 190b1525e13a1..25ec9654450db 100644 --- a/EIPS/eip-x.md +++ b/EIPS/eip-x.md @@ -2,7 +2,6 @@ eip: title: Smart Contract Interface for Licences author: Lucas Cullen @BitcoinBrisbane, Kai Yeung @CivicKai, Katrina Donaghy, katrina@civicledger.com -discussions-to: status: Draft type: Standards Track category ERC @@ -109,7 +108,7 @@ pragma solidity ^0.5.3; contract EIP is EIPx { - string public name = "Fraser Island Camping Area"; + string public name = "Kakadu National Park Camping Permit"; uint256 public totalSupply; address private _owner; From 87faf5dec1106414b72d07a63a01de8d9a607198 Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Wed, 6 Feb 2019 13:09:25 +1000 Subject: [PATCH 09/25] Update eip-x.md --- EIPS/eip-x.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-x.md b/EIPS/eip-x.md index 25ec9654450db..1dad6bc79554c 100644 --- a/EIPS/eip-x.md +++ b/EIPS/eip-x.md @@ -4,7 +4,7 @@ title: Smart Contract Interface for Licences author: Lucas Cullen @BitcoinBrisbane, Kai Yeung @CivicKai, Katrina Donaghy, katrina@civicledger.com status: Draft type: Standards Track -category ERC +category: ERC created: 2019-02-06 --- From 67596c317451ed28d2ebdcfccde9c27dc507db8f Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Fri, 8 Feb 2019 09:04:04 +1000 Subject: [PATCH 10/25] Update authors --- EIPS/eip-x.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-x.md b/EIPS/eip-x.md index 1dad6bc79554c..bff2c1bcc288f 100644 --- a/EIPS/eip-x.md +++ b/EIPS/eip-x.md @@ -1,7 +1,7 @@ --- eip: title: Smart Contract Interface for Licences -author: Lucas Cullen @BitcoinBrisbane, Kai Yeung @CivicKai, Katrina Donaghy, katrina@civicledger.com +author: Lucas Cullen @BitcoinBrisbane, Kai Yeung @CivicKai, Anna Crowley annaelizabethcrowley@gmail.com, Caroline Marshall caroline.marshall888@gmail.com, Katrina Donaghy, katrina@civicledger.com status: Draft type: Standards Track category: ERC From acaa0c8cf16b391729458263cff43ff422f258a3 Mon Sep 17 00:00:00 2001 From: KDTwentyTwenty Date: Mon, 11 Feb 2019 14:41:24 +1000 Subject: [PATCH 11/25] Update eip-x.md --- EIPS/eip-x.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EIPS/eip-x.md b/EIPS/eip-x.md index bff2c1bcc288f..9079759336bf8 100644 --- a/EIPS/eip-x.md +++ b/EIPS/eip-x.md @@ -12,7 +12,7 @@ created: 2019-02-06 This Ethereum Improvement Proposal (EIP) proposes an Ethereum standard for the issuance of licences, permits and grants (Licences). -A Licence is a limited and temporary authority, granted to a natural (e.g. you) or legal person (e.g. a corporation), to do something that would otherwise be unlawful pursuant to a legal framework. A public Licence is granted by the government, directly (e.g. by the NSW Department of Primary Industries) or indirectly (e.g. by an agent operating under the government’s authority), and derives its authority from legislation, though this is often practically achieved via delegated legislation such as regulations. This can be contrasted to a private licence – for example, the licence you grant to a visitor who comes onto your property. +A Licence is a limited and temporary authority, granted to a natural (e.g. you) or legal person (e.g. a corporation), to do something that would otherwise be unlawful pursuant to a legal framework. A public Licence is granted by the government, directly (e.g. by the New South Wales Department of Primary Industries, Australia) or indirectly (e.g. by an agent operating under the government’s authority), and derives its authority from legislation, though this is often practically achieved via delegated legislation such as regulations. This can be contrasted to a private licence – for example, the licence you grant to a visitor who comes onto your property. A Licence has the following properties: @@ -27,7 +27,7 @@ Additionally, a Licence may be granted in respect of certain information. For ex Governments are responsible for the issuance and management of Licences. However, maintaining and sharing this data can be complicated and inefficient. The granting of Licences usually requires the filing of paper-based application forms, manual oversight of applicable legislation and data entry into registries, as well as the issuance of paper based Licences. If individuals wish to sight information on Licence registries, they often need to be present at the government office and complete further paper-based enquiry forms in order to access that data (if available publicly). -This EIP seeks to define a standard that will allow for the granting and/or management of Licences via Etherium smart contracts. The motivation is, in essence, to address the inefficiencies inherent in current licencing systems. +This EIP seeks to define a standard that will allow for the granting and/or management of Licences via Ethereum smart contracts. The motivation is, in essence, to address the inefficiencies inherent in current licencing systems. ## Licences From 7e625e0c6fc1fa6adf6c9e3993af9cd437d0f5d3 Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Tue, 2 Jul 2019 13:08:13 +1000 Subject: [PATCH 12/25] Rename eip md --- eip-X.md => eip-1753.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename eip-X.md => eip-1753.md (100%) diff --git a/eip-X.md b/eip-1753.md similarity index 100% rename from eip-X.md rename to eip-1753.md From 7a3fe49cb55be6d78e2bf18d711d256e309029f5 Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Tue, 2 Jul 2019 13:10:54 +1000 Subject: [PATCH 13/25] Rollback --- eip-1753.md => eip-x.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename eip-1753.md => eip-x.md (99%) diff --git a/eip-1753.md b/eip-x.md similarity index 99% rename from eip-1753.md rename to eip-x.md index 66dd31b69e70f..0d005470bc123 100644 --- a/eip-1753.md +++ b/eip-x.md @@ -51,4 +51,4 @@ Test cases for an implementation are mandatory for EIPs that are affecting conse The implementations must be completed before any EIP is given status "Final", but it need not be completed before the EIP is accepted. While there is merit to the approach of reaching consensus on the specification and rationale before writing code, the principle of "rough consensus and running code" is still useful when it comes to resolving many discussions of API details. ## Copyright -Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). \ No newline at end of file From 9750fd6eacfe66a5e8856a97990f937eaa238e6c Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Tue, 2 Jul 2019 13:11:21 +1000 Subject: [PATCH 14/25] Rename md --- EIPS/{eip-x.md => eip-1753.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename EIPS/{eip-x.md => eip-1753.md} (100%) diff --git a/EIPS/eip-x.md b/EIPS/eip-1753.md similarity index 100% rename from EIPS/eip-x.md rename to EIPS/eip-1753.md From a0df9fce525584721cf3da0df23a4f8e089b7c1d Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Tue, 2 Jul 2019 13:12:00 +1000 Subject: [PATCH 15/25] Add copyright --- EIPS/eip-1753.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/EIPS/eip-1753.md b/EIPS/eip-1753.md index 9079759336bf8..b7e3360d435eb 100644 --- a/EIPS/eip-1753.md +++ b/EIPS/eip-1753.md @@ -166,3 +166,6 @@ contract EIP is EIPx { } } ``` + +## Copyright +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). From f4cf23d4126f7191afada22221c49f45e3f494be Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Tue, 2 Jul 2019 13:14:55 +1000 Subject: [PATCH 16/25] WIP: Re adding specificaiton --- EIPS/eip-1753.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/EIPS/eip-1753.md b/EIPS/eip-1753.md index b7e3360d435eb..8293bb4ebfde9 100644 --- a/EIPS/eip-1753.md +++ b/EIPS/eip-1753.md @@ -29,9 +29,31 @@ Governments are responsible for the issuance and management of Licences. However This EIP seeks to define a standard that will allow for the granting and/or management of Licences via Ethereum smart contracts. The motivation is, in essence, to address the inefficiencies inherent in current licencing systems. -## Licences +## Specification -This EIP will define the smart contract interface for Licences. +## Token +### Methods + +**NOTES**: + - The following specifications use syntax from Solidity `0.4.17` (or above) + - Callers MUST handle `false` from `returns (bool success)`. Callers MUST NOT assume that `false` is never returned! + + +#### name + +Returns the name of the permit - e.g. `"MyPermit"`. + +``` js +function name() public view returns (string) +``` + +#### totalSupply + +Returns the total permit supply. + +``` js +function totalSupply() public view returns (uint256) +``` ## Rationale From 1d0cb17cb35b202153fd4cf1e7327a390a964cc9 Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Tue, 2 Jul 2019 13:15:45 +1000 Subject: [PATCH 17/25] Update example solidity --- EIPS/eip-1753.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EIPS/eip-1753.md b/EIPS/eip-1753.md index 8293bb4ebfde9..c90cc4ed8a394 100644 --- a/EIPS/eip-1753.md +++ b/EIPS/eip-1753.md @@ -111,7 +111,7 @@ Smart contracts can be used to embed regulatory requirements with respect to the ### Solidity Example ``` -interface EIPx { +interface EIP1753 { string public name; uint256 public totalSupply; @@ -128,7 +128,7 @@ interface EIPx { pragma solidity ^0.5.3; -contract EIP is EIPx { +contract EIP is EIP1753 { string public name = "Kakadu National Park Camping Permit"; uint256 public totalSupply; From db8f5b23d81099ee2bf16e8156053dd99221a0de Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Tue, 2 Jul 2019 15:11:33 +1000 Subject: [PATCH 18/25] Update eip-1753.md --- EIPS/eip-1753.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-1753.md b/EIPS/eip-1753.md index c90cc4ed8a394..b7dffa7a186e7 100644 --- a/EIPS/eip-1753.md +++ b/EIPS/eip-1753.md @@ -1,5 +1,5 @@ --- -eip: +eip: 1753 title: Smart Contract Interface for Licences author: Lucas Cullen @BitcoinBrisbane, Kai Yeung @CivicKai, Anna Crowley annaelizabethcrowley@gmail.com, Caroline Marshall caroline.marshall888@gmail.com, Katrina Donaghy, katrina@civicledger.com status: Draft From dce84e06881a39518e5126a0d205b3e759072d0c Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Tue, 2 Jul 2019 15:14:07 +1000 Subject: [PATCH 19/25] Update eip-1753.md --- EIPS/eip-1753.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-1753.md b/EIPS/eip-1753.md index b7dffa7a186e7..53a2e763f66e6 100644 --- a/EIPS/eip-1753.md +++ b/EIPS/eip-1753.md @@ -1,7 +1,7 @@ --- eip: 1753 title: Smart Contract Interface for Licences -author: Lucas Cullen @BitcoinBrisbane, Kai Yeung @CivicKai, Anna Crowley annaelizabethcrowley@gmail.com, Caroline Marshall caroline.marshall888@gmail.com, Katrina Donaghy, katrina@civicledger.com +author: Lucas Cullen (@BitcoinBrisbane), Kai Yeung (@CivicKai), Anna Crowley , Caroline Marshall , Katrina Donaghy, status: Draft type: Standards Track category: ERC From 4fd8c6fa2a39d0c33c8d941bd3696f17557a4242 Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Tue, 2 Jul 2019 15:43:23 +1000 Subject: [PATCH 20/25] Update eip-1753.md --- EIPS/eip-1753.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/EIPS/eip-1753.md b/EIPS/eip-1753.md index 53a2e763f66e6..774d5d48bf725 100644 --- a/EIPS/eip-1753.md +++ b/EIPS/eip-1753.md @@ -55,6 +55,62 @@ Returns the total permit supply. function totalSupply() public view returns (uint256) ``` +#### grantAuthority + +Adds an ethereum address to a white list of addresses that have authority to modify a permit. + +``` js +function grantAuthority(address who) +``` + +#### revokeAuthority + +Removes an ethereum address from a white list of addresses that have authority to modify a permit. + +``` js +function revokeAuthority(address who) +``` + +#### hasAuthority + +Checks to see if the address has authority to grant or revoke permits. + +``` js +function hasAuthority(address who) +``` + +#### issue + +Issues an ethereum address a permit between the specified date range. + +``` js +function issue(address who, uint256 from, uint256 to) public; +``` + +#### revoke + +Revokes a permit from an ethereum address. + +``` js +function revoke(address who) public; +``` + +#### hasValid + +Checks to see if an ethereum address has a valid permit. + +``` js +function hasValid(address who) public view returns (boolean); +``` + +#### purchase + +Allows a user to self procure a licence. + +``` js +function purchase(uint256 from, uint256 to) public payable; +``` + ## Rationale The use of smart contracts to apply for, renew, suspend and revoke Licences will free up much needed government resources and allow for the more efficient management of Licences. The EIP also seeks to improve the end user experience of the Licence system. In an era of open government, there is also an increased expectation that individuals will be able to easily access Licence registries, and that the process will be transparent and fair. From 58bfd0a141162588864694aba46bcfa247c59c98 Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Tue, 2 Jul 2019 21:05:19 +1000 Subject: [PATCH 21/25] Update eip-1753.md --- EIPS/eip-1753.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-1753.md b/EIPS/eip-1753.md index 774d5d48bf725..a1693b074fe08 100644 --- a/EIPS/eip-1753.md +++ b/EIPS/eip-1753.md @@ -1,7 +1,7 @@ --- eip: 1753 title: Smart Contract Interface for Licences -author: Lucas Cullen (@BitcoinBrisbane), Kai Yeung (@CivicKai), Anna Crowley , Caroline Marshall , Katrina Donaghy, +author: Lucas Cullen (@BitcoinBrisbane), Kai Yeung (@CivicKai), Anna Crowley , Caroline Marshall , Katrina Donaghy status: Draft type: Standards Track category: ERC From 107b447a4e47616416777dd264c1fa2dfcd8ba5e Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Tue, 2 Jul 2019 21:06:06 +1000 Subject: [PATCH 22/25] Update eip-1753.md --- EIPS/eip-1753.md | 1 - 1 file changed, 1 deletion(-) diff --git a/EIPS/eip-1753.md b/EIPS/eip-1753.md index a1693b074fe08..b6f12a5f82ca6 100644 --- a/EIPS/eip-1753.md +++ b/EIPS/eip-1753.md @@ -31,7 +31,6 @@ This EIP seeks to define a standard that will allow for the granting and/or mana ## Specification -## Token ### Methods **NOTES**: From 91c706a70de60aafb4edc94a57a50907bb33ac78 Mon Sep 17 00:00:00 2001 From: Lucas Cullen Date: Tue, 2 Jul 2019 21:07:10 +1000 Subject: [PATCH 23/25] Update eip-1753.md --- EIPS/eip-1753.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-1753.md b/EIPS/eip-1753.md index b6f12a5f82ca6..25127ffca2446 100644 --- a/EIPS/eip-1753.md +++ b/EIPS/eip-1753.md @@ -8,7 +8,7 @@ category: ERC created: 2019-02-06 --- -# Abstract +## Abstract This Ethereum Improvement Proposal (EIP) proposes an Ethereum standard for the issuance of licences, permits and grants (Licences). From 6c69d7d3c49e1d03326024f417c267b6a80f3d5e Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 2 Jul 2019 12:49:53 +0100 Subject: [PATCH 24/25] Do not touch eip-X --- eip-x.md => eip-X.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename eip-x.md => eip-X.md (99%) diff --git a/eip-x.md b/eip-X.md similarity index 99% rename from eip-x.md rename to eip-X.md index 0d005470bc123..66dd31b69e70f 100644 --- a/eip-x.md +++ b/eip-X.md @@ -51,4 +51,4 @@ Test cases for an implementation are mandatory for EIPs that are affecting conse The implementations must be completed before any EIP is given status "Final", but it need not be completed before the EIP is accepted. While there is merit to the approach of reaching consensus on the specification and rationale before writing code, the principle of "rough consensus and running code" is still useful when it comes to resolving many discussions of API details. ## Copyright -Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). \ No newline at end of file +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). From 965fa50358b0b4f059f0de944af2243779cb1ae1 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 2 Jul 2019 12:51:01 +0100 Subject: [PATCH 25/25] Fix typo --- EIPS/eip-1753.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-1753.md b/EIPS/eip-1753.md index 25127ffca2446..16e20a1031624 100644 --- a/EIPS/eip-1753.md +++ b/EIPS/eip-1753.md @@ -120,7 +120,7 @@ The Ethereum blockchain is adaptable to various Licences and government authorit The EIP has been developed following the review of a number of licensing regulations at the national and state level in Australia. The review allowed the identification of the common licence requirements and criteria for incorporation into the EIP. We have included these in the proposed standard but seek feedback on whether these criteria are sufficient and universal. -## Test Case +## Test Cases A real world example of a Licence is a permit required to camp in a national park in Australia (e.g. Kakadu national park in the Northern Territory of Australia) under the Environment Protection and Biodiversity Conservation Regulations 2000 (Cth) (EPBC Act) and the Environment Protection and Biodiversity Conservation Regulations 2000 (the Regulations). Pursuant to the EPBC Act and the Regulations, the Director of National Parks oversees a camping permit system, which is intended to help regulate certain activities in National Parks. Permits allowing access to National Parks can be issued to legal or natural persons if the applicant has met certain conditions.