mirror of
https://github.com/status-im/snt-gas-relay.git
synced 2025-01-30 16:15:55 +00:00
manager should call only by execute
This commit is contained in:
parent
310f4b8f5a
commit
bab9e88c1a
@ -31,11 +31,8 @@ contract Identity is ERC725, ERC735 {
|
|||||||
_;
|
_;
|
||||||
}
|
}
|
||||||
|
|
||||||
modifier managerOrSelf {
|
modifier selfOnly {
|
||||||
require(
|
require(msg.sender == address(this));
|
||||||
isKeyType(bytes32(msg.sender), MANAGEMENT_KEY) ||
|
|
||||||
msg.sender == address(this)
|
|
||||||
);
|
|
||||||
_;
|
_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +65,7 @@ contract Identity is ERC725, ERC735 {
|
|||||||
uint256 _type
|
uint256 _type
|
||||||
)
|
)
|
||||||
public
|
public
|
||||||
managerOrSelf
|
selfOnly
|
||||||
returns (bool success)
|
returns (bool success)
|
||||||
{
|
{
|
||||||
_addKey(_key, _purpose, _type);
|
_addKey(_key, _purpose, _type);
|
||||||
@ -80,7 +77,7 @@ contract Identity is ERC725, ERC735 {
|
|||||||
uint256 _purpose
|
uint256 _purpose
|
||||||
)
|
)
|
||||||
public
|
public
|
||||||
managerOrSelf
|
selfOnly
|
||||||
returns (bool success)
|
returns (bool success)
|
||||||
{
|
{
|
||||||
_removeKey(_key, _purpose);
|
_removeKey(_key, _purpose);
|
||||||
@ -140,7 +137,13 @@ contract Identity is ERC725, ERC735 {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setMiminumApprovalsByKeyType(uint256 _type, uint8 _minimumApprovals) public managerOrSelf {
|
function setMiminumApprovalsByKeyType(
|
||||||
|
uint256 _type,
|
||||||
|
uint8 _minimumApprovals
|
||||||
|
)
|
||||||
|
public
|
||||||
|
selfOnly
|
||||||
|
{
|
||||||
minimumApprovalsByKeyType[_type] = _minimumApprovals;
|
minimumApprovalsByKeyType[_type] = _minimumApprovals;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user