-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathProvider.sol
59 lines (48 loc) · 2.17 KB
/
Provider.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
pragma solidity ^0.5.0;
import "../interfaces/IdentityRegistryInterface.sol";
contract Provider {
IdentityRegistryInterface identityRegistry;
constructor (address identityRegistryAddress) public {
identityRegistry = IdentityRegistryInterface(identityRegistryAddress);
}
function createIdentityDelegated(
address recoveryAddress, address associatedAddress, address[] memory resolvers,
uint8 v, bytes32 r, bytes32 s, uint timestamp
)
public returns (uint ein)
{
address[] memory providers = new address[](1);
providers[0] = address(this);
return identityRegistry.createIdentityDelegated(
recoveryAddress, associatedAddress, providers, resolvers, v, r, s, timestamp
);
}
function addAssociatedAddressDelegated(
address approvingAddress, address addressToAdd,
uint8[2] memory v, bytes32[2] memory r, bytes32[2] memory s, uint[2] memory timestamp
)
public
{
identityRegistry.addAssociatedAddressDelegated(approvingAddress, addressToAdd, v, r, s, timestamp);
}
function removeAssociatedAddressDelegated(address addressToRemove, uint8 v, bytes32 r, bytes32 s, uint timestamp)
public
{
identityRegistry.removeAssociatedAddressDelegated(addressToRemove, v, r, s, timestamp);
}
function addProvidersFor(address[] memory providers) public {
identityRegistry.addProvidersFor(identityRegistry.getEIN(msg.sender), providers);
}
function removeProvidersFor(address[] memory providers) public {
identityRegistry.removeProvidersFor(identityRegistry.getEIN(msg.sender), providers);
}
function addResolversFor(address[] memory resolvers) public {
identityRegistry.addResolversFor(identityRegistry.getEIN(msg.sender), resolvers);
}
function removeResolversFor(address[] memory resolvers) public {
identityRegistry.removeResolversFor(identityRegistry.getEIN(msg.sender), resolvers);
}
function triggerRecoveryAddressChangeFor(address newRecoveryAddress) public {
identityRegistry.triggerRecoveryAddressChangeFor(identityRegistry.getEIN(msg.sender), newRecoveryAddress);
}
}