Linting to reduce problems in IDE

This commit is contained in:
Richard Ramos 2018-02-28 14:52:32 -04:00
parent e9b9963153
commit 3c4f2ab7d1
3 changed files with 31 additions and 30 deletions

View File

@ -3,6 +3,7 @@ pragma solidity ^0.4.17;
import "./ERC725.sol"; import "./ERC725.sol";
import "./ERC735.sol"; import "./ERC735.sol";
contract Identity is ERC725, ERC735 { contract Identity is ERC725, ERC735 {
mapping (bytes32 => Key) keys; mapping (bytes32 => Key) keys;
@ -105,7 +106,7 @@ contract Identity is ERC725, ERC735 {
managerOrActor(bytes32(msg.sender)) managerOrActor(bytes32(msg.sender))
returns (bool success) returns (bool success)
{ {
approveExecution(bytes32(msg.sender), _id, _approve); return approveExecution(bytes32(msg.sender), _id, _approve);
} }
function approveExecution(bytes32 _key, uint256 _id, bool _approve) internal returns(bool success) { function approveExecution(bytes32 _key, uint256 _id, bool _approve) internal returns(bool success) {
@ -137,7 +138,7 @@ contract Identity is ERC725, ERC735 {
} }
} }
function setMiminumApprovalsByKeyType( function setMininumApprovalsByKeyType(
uint256 _type, uint256 _type,
uint8 _minimumApprovals uint8 _minimumApprovals
) )
@ -290,25 +291,23 @@ contract Identity is ERC725, ERC735 {
private private
{ {
require(msg.sender == _issuer); require(msg.sender == _issuer);
ClaimChanged( ClaimChanged(
_claimHash, _claimHash,
_claimType, _claimType,
_scheme, _scheme,
_issuer, _issuer,
_signature, _signature,
_data, _data,
_uri _uri
); );
claims[_claimHash] = Claim( claims[_claimHash] = Claim({
{ claimType: _claimType,
claimType: _claimType, scheme: _scheme,
scheme: _scheme, issuer: _issuer,
issuer: _issuer, signature: _signature,
signature: _signature, data: _data,
data: _data, uri: _uri
uri: _uri });
}
);
} }
function _addKey(bytes32 _key, uint256 _purpose, uint256 _type) internal { function _addKey(bytes32 _key, uint256 _purpose, uint256 _type) internal {
@ -439,14 +438,15 @@ contract Identity is ERC725, ERC735 {
_; _;
} }
function approveECDSA(uint256 _id, bool _approve, function approveECDSA(uint256 _id, bool _approve,
bytes32 _key, bytes32 _key,
uint8 v, uint8 v,
bytes32 r, bytes32 r,
bytes32 s) bytes32 s)
public public
validECDSAKey(_key, keccak256(address(this), bytes4(keccak256("approve(uint256,bool)")), _id, _approve), v, r, s) validECDSAKey(_key, keccak256(address(this),
bytes4(keccak256("approve(uint256,bool)")), _id, _approve),
v, r, s)
managerOrActor(_key) managerOrActor(_key)
returns (bool success) returns (bool success)
{ {
@ -464,7 +464,9 @@ contract Identity is ERC725, ERC735 {
bytes32 s bytes32 s
) )
public public
validECDSAKey(_key, keccak256(address(this), bytes4(keccak256("execute(address,uint256,bytes)")), _to, _value, _data, _nonce), v, r, s) validECDSAKey(_key, keccak256(address(this),
bytes4(keccak256("execute(address,uint256,bytes)")),
_to, _value, _data, _nonce), v, r, s)
managerOrActor(_key) managerOrActor(_key)
returns (uint256 executionId) returns (uint256 executionId)
{ {

View File

@ -4,15 +4,15 @@ import "../deploy/Factory.sol";
import "../deploy/UpdatableInstance.sol"; import "../deploy/UpdatableInstance.sol";
import "./IdentityKernel.sol"; import "./IdentityKernel.sol";
contract IdentityFactory is Factory { contract IdentityFactory is Factory {
event IdentityCreated(address instance); event IdentityCreated(address instance);
function IdentityFactory(bytes _infohash) function IdentityFactory(bytes _infohash)
Factory(new IdentityKernel(), _infohash)
public public
Factory(new IdentityKernel(), _infohash)
{ {
} }
function createIdentity() function createIdentity()

View File

@ -2,6 +2,7 @@ pragma solidity ^0.4.17;
import "../identity/IdentityKernel.sol"; import "../identity/IdentityKernel.sol";
contract UpdatedIdentityKernel is IdentityKernel { contract UpdatedIdentityKernel is IdentityKernel {
event TestFunctionExecuted(uint8 minApprovalsByManagementKeys); event TestFunctionExecuted(uint8 minApprovalsByManagementKeys);
@ -9,6 +10,4 @@ contract UpdatedIdentityKernel is IdentityKernel {
function test() public { function test() public {
TestFunctionExecuted(minimumApprovalsByKeyType[MANAGEMENT_KEY]); TestFunctionExecuted(minimumApprovalsByKeyType[MANAGEMENT_KEY]);
} }
} }