-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathTrustable.sol
More file actions
42 lines (33 loc) · 905 Bytes
/
Copy pathTrustable.sol
File metadata and controls
42 lines (33 loc) · 905 Bytes
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
pragma solidity ^0.4.16;
import "./Ownable.sol";
/*
Trustable saves trusted addresses
*/
contract Trustable is Ownable {
//Only trusted addresses are able to transfer tokens during the Crowdsale
mapping (address => bool) trusted;
event AddTrusted (address indexed _trustable);
event RemoveTrusted (address indexed _trustable);
function Trustable() {
trusted[msg.sender] = true;
AddTrusted(msg.sender);
}
//Add new trusted address
function addTrusted(address _address)
external
onlyOwner
notZeroAddress(_address)
{
trusted[_address] = true;
AddTrusted(_address);
}
//Remove address from a trusted list
function removeTrusted(address _address)
external
onlyOwner
notZeroAddress(_address)
{
trusted[_address] = false;
RemoveTrusted(_address);
}
}