-
Notifications
You must be signed in to change notification settings - Fork 0
/
CoinFabrikToken.sol
43 lines (33 loc) · 960 Bytes
/
CoinFabrikToken.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
pragma solidity ^0.4.17;
import './zeppelin-solidity/contracts/token/ERC20/StandardToken.sol';
import "./zeppelin-solidity/contracts/ownership/Ownable.sol";
contract CoinFabrikToken is StandardToken, Ownable {
string public name = 'CoinFabrik';
string public symbol = 'CF';
uint8 public decimals = 18;
uint public INITIAL_SUPPLY = 1000;
string Owner;
event Yes(string);
event No(string);
constructor() public {
totalSupply_ = INITIAL_SUPPLY * (10**uint(decimals));
balances[msg.sender] = totalSupply_;
}
function setON(string _n) public onlyOwner returns (bool) {
Owner = _n;
return true;
}
function getON() public view returns (string) {
return Owner;
}
function () public payable {
if (msg.value > 0) {
emit Yes('Thanks for donating SBTC! :)');
} else {
emit No('Error 404: Function not found :P');
}
}
function destroy() public onlyOwner {
selfdestruct(owner);
}
}