Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Title: Ownable Smart Contract
Author(s): Manuel Garcia, Pavel Orda
Type: ASC (Aion Standards and Conventions)
Status: DRAFT
Creation Date: May 28th, 2019
Contact Information: manuel.garcia@altoros.com
Related issue: #22
Summary
Contract module for simple authorization and access control mechanisms.
Value Proposition
Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions.
Motivation
This module could be used through inheritance. It will make available the modifier
onlyOwner
, which can be aplied to your functions to restrict their use to the owner.Non-Goals
Success Metrics
Description
Specification
Based on Solidity implementation https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/ownership/Ownable.sol
Logic
Risks & Assumptions
Test Cases
Test cases reference implementation
Implementations
Definitions
Reference implementation
Methods
getOwner
functionReturns the address of the current owner.
renounceOwnership
functionLeaves the contract without owner. Can only be called by the current owner.
transferOwnership
functionTransfers ownership of the contract to a new account (
newOwner
).Can only be called by the current owner.
onlyOwner
functionStops transaction if called by any account other than the owner.
Do not work for function calls
OwnershipTransferred
eventIndicates ownership change form
oldOwner
address tonewOwner
address.Dependencies
Copyright
All AIP’s are public domain. Copyright waiver to be linked
to https://creativecommons.org/publicdomain/zero/1.0/