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 "./ERC735.sol";
contract Identity is ERC725, ERC735 {
mapping (bytes32 => Key) keys;
@ -105,7 +106,7 @@ contract Identity is ERC725, ERC735 {
managerOrActor(bytes32(msg.sender))
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) {
@ -137,7 +138,7 @@ contract Identity is ERC725, ERC735 {
}
}
function setMiminumApprovalsByKeyType(
function setMininumApprovalsByKeyType(
uint256 _type,
uint8 _minimumApprovals
)
@ -290,25 +291,23 @@ contract Identity is ERC725, ERC735 {
private
{
require(msg.sender == _issuer);
ClaimChanged(
_claimHash,
_claimType,
_scheme,
_issuer,
_signature,
_data,
_uri
);
claims[_claimHash] = Claim(
{
claimType: _claimType,
scheme: _scheme,
issuer: _issuer,
signature: _signature,
data: _data,
uri: _uri
}
);
ClaimChanged(
_claimHash,
_claimType,
_scheme,
_issuer,
_signature,
_data,
_uri
);
claims[_claimHash] = Claim({
claimType: _claimType,
scheme: _scheme,
issuer: _issuer,
signature: _signature,
data: _data,
uri: _uri
});
}
function _addKey(bytes32 _key, uint256 _purpose, uint256 _type) internal {
@ -439,14 +438,15 @@ contract Identity is ERC725, ERC735 {
_;
}
function approveECDSA(uint256 _id, bool _approve,
bytes32 _key,
uint8 v,
bytes32 r,
bytes32 s)
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)
returns (bool success)
{
@ -464,7 +464,9 @@ contract Identity is ERC725, ERC735 {
bytes32 s
)
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)
returns (uint256 executionId)
{

View File

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

View File

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