-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature/offerable identity #269
Conversation
26bb044
to
e47d167
Compare
44323de
to
30ec13b
Compare
Looks good to me so far 😃 |
a4426ba
to
5dd021b
Compare
5dd021b
to
2cf17f5
Compare
669c0b7
to
cb631cf
Compare
cb631cf
to
55e21e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few questions
offeredTo = address(0); | ||
} | ||
|
||
function sendTransaction(bytes memory _data, address to, uint256 value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this function need the isOwner
modifier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If tranasaction sent to ERC1056, then ownership will be checked by ERC1056, but someone who is not the owner might use this method to send tx from asset to some arbitrary contract what potentially could be dangerous. That is why I added this additional safe guarantee.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add isOwner
modifier
pragma solidity ^0.5.0; | ||
|
||
|
||
contract IdentityManager { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this contract is just doing the events, maybe it's more specific to call it IdentityEvents
or maybe IdentityNotifier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I plan to expand this contract in the future, such as adding methods to return a list of assets or may be batch asset creation
@@ -0,0 +1,45 @@ | |||
pragma solidity ^0.5.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use the 0.5
compiler instead of a higher version (for both this contract and OfferableIdentity
)?
I'm not saying it should be higher, I'm not too sure. But it maybe a higher version would mean a contract inheriting this contract could use new features?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Upgraded to 0.8.0
offeredTo = address(0); | ||
} | ||
|
||
function sendTransaction(bytes memory _data, address to, uint256 value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add isOwner
modifier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
@JGiter I was taking a look at ERC725X and wondering if maybe |
May be active assets should be able to do this. If so then it make sense to add such feature in separate ActiveIdentity contract, which extends OfferableIdentity |
6f5d78f
to
3826a35
Compare
| Jira issue | https://energyweb.atlassian.net/browse/MYEN-694 |
ProxyIdentity
redesigned asOfferableIdentity
, which allows to offer identity with possibility to accept or reject it. For use cases check tests in theproxyidentity
packageDesign decisions:
OfferableIdentity.offer
OfferableIdentityOperator
which extendsOperator
and therefore can be used in claims workflow. SomeOperator
s methods are excluded:changeOwner
- to prevent identity transfer without acknowledgmentrevokeDelegate
- notion of delegate is not defined on offerable identities