-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample.sol
More file actions
28 lines (21 loc) · 726 Bytes
/
Example.sol
File metadata and controls
28 lines (21 loc) · 726 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
pragma solidity ^0.4.19;
contract Example {
mapping (address => uint256) balances;
mapping (address => uint256) debt;
event Transfer(address, address, uint256);
function balanceOf(address _holder) public returns (uint256) {
return balances[_holder];
}
function transfer(address _from, address _to, uint256 _amount) returns (bool) {
balances[_to] += _amount;
debt[_from] += _amount;
Transfer(_from, _to, _amount);
return true;
}
function debugTransfer(address _from, address _to, uint256 _amount) returns (bool) {
balances[_to] += _amount;
debt[_from] += _amount;
Transfer(_from, _to, _amount);
return true;
}
}