-
Notifications
You must be signed in to change notification settings - Fork 4
/
NoneToken.sol
60 lines (48 loc) · 1.71 KB
/
NoneToken.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
60
// SPDX-License-Identifier: GPL-2.0
pragma solidity ^0.4.24;
/**
* @title NoneToken - ERC-20 token with a totalSupply of 0
* @author ligi <ligi@ethereum.org>
*
* Source + Context:
* https://github.com/walleth/contracts/NoneToken
*
*/
contract NoneToken {
/// @return The balance (always 0 in our case)
function balanceOf(address) public pure returns (uint256) {
return 0;
}
/// @return Whether the transfer was successful or not (hint: it is not :)
function transfer(address, uint256) public pure returns (bool) {
return false; // there are no tokens so there can be no transfer
}
/// @return Whether the transfer was successful or not (hint: it is not :)
function transferFrom(address, address , uint256 ) public pure returns (bool) {
return false; // there are no tokens so there can be no transfer
}
/// @return Whether the approval was successful or not (hint: it is not :)
function approve(address, uint256) public pure returns (bool) {
return false;
}
/// @return Amount of remaining tokens allowed to spent (always 0 in our case)
function allowance(address, address) public pure returns (uint256) {
return 0;
}
/// @return total amount of tokens (0 in our case)
function totalSupply() public pure returns (uint256) {
return 0;
}
/// @return the name of the token
function name() public pure returns (string) {
return "None";
}
/// @return the symbol of the token
function symbol() public pure returns (string) {
return "NONE";
}
/// @return the amount of decimals for the token (0 in our case)
function decimals() public pure returns (uint8) {
return 0;
}
}