generated from howeecross/vision.com
-
Notifications
You must be signed in to change notification settings - Fork 1
/
hcoinx.txt
95 lines (94 loc) · 3.56 KB
/
hcoinx.txt
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<div class="device-mockup" data-device="iphone5" data-orientation="portrait" data-color="black">
<div class="device">
<div class="screen">
<!-- Enter Hcoinx-->
</div>
<div class="Log in">
<!-- You can hook the "home button" to some JavaScript events or just remove it -->
</div>
</div>
</div>POST /repos/:owner/:repo/git/trees
version: 2.1
jobs:
build:
docker:
- image: cimg/node:14.10.1 # the primary container, where your job's commands are run
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
steps:
- checkout # check out the code in the project directory
- run: echo "hello world" function totalSupply() public view returns (uint256);
function balanceOf(address tokenOwner) public view returns (uint);
function allowance(address tokenOwner, address spender)
public view returns (uint);
function transfer(address to, uint tokens) public returns (bool);
function approve(address spender, uint tokens) public returns (bool);
function transferFrom(address from, address to, uint tokens) public returns (bool);
event Approval(address indexed tokenOwner, address indexed spender,
uint tokens);
event Transfer(address indexed from, address indexed to,
uint tokens);
string public constant name;
string public constant symbol;
uint8 public constant decimals;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
uint256 totalSupply_;
constructor(uint256 total) public {
totalSupply_ = total;
balances[msg.sender] = _totalSupply;
}
<div class="device-mockup" data-device="iphone5" data-orientation="portrait"
data-color="black">
<div class="device">
<div class="screen">
<!-- PUT CONTENTS HERE → function totalSupply() public view returns (uint256) {
return totalSupply_;
}
</div>
<div class="button">
<!-- You can hook the "home button" to some JavaScript events or just remove it -->
</div>function balanceOf(address tokenOwner) public view returns (uint) {
return balances[tokenOwner];
}
function transfer(address receiver,
uint numTokens) public returns (bool) {
require(numTokens <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender] — numTokens;
balances[receiver] = balances[receiver] + numTokens;
emit Transfer(msg.sender, receiver, numTokens);
return true;
}function approve(address delegate,uint numTokens) public returns (bool) {
allowed[msg.sender][delegate] = numTokens;
emit Approval(msg.sender, delegate, numTokens);
return true;
}
</div>function allowance(address owner,
address delegate) public view returns (uint) {
return allowed[owner][delegate];
}function transferFrom(address owner, address buyer,
uint numTokens) public returns (bool) {
require(numTokens <= balances[owner]);
require(numTokens <= allowed[owner][msg.sender]);
balances[owner] = balances[owner] — numTokens;
allowed[owner][msg.sender] =
allowed[from][msg.sender] — numTokens;
balances[buyer] = balances[buyer] + numTokens;
Transfer(owner, buyer, numTokens);
return true;
}library SafeMath { // Only relevant functions
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a — b;
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
}balances[msg.sender] = balances[msg.sender].sub(numTokens);
balances[receiver] = balances[receiver].add(numTokens);
balances[buyer] = balances[buyer].add(numTokens);
balances[owner] = balances[owner].sub(numTokens);
</div>channels:history