• API
• FAQ
• Tools
• Archive
daily pastebin goal
72%
SHARE
TWEET

# Untitled

a guest Sep 20th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. pragma solidity ^0.4.24;
2.
3. library SafeMath {
4.
5.     function mul(uint256 a, uint256 b) internal pure returns (uint256) {
6.         if (a == 0) {
7.             return 0;
8.         }
9.         uint256 c = a * b;
10.         assert(c / a == b);
11.         return c;
12.     }
13.
14.     function div(uint256 a, uint256 b) internal pure returns (uint256) {
15.         return a / b;
16.     }
17.
18.     function sub(uint256 a, uint256 b) internal pure returns (uint256) {
19.         assert(b <= a);
20.         return a - b;
21.     }
22.
23.     function add(uint256 a, uint256 b) internal pure returns (uint256) {
24.         uint256 c = a + b;
25.         assert(c >= a);
26.         return c;
27.     }
28. }
29.
30. contract ERC20Basic {
31.     function totalSupply() public view returns (uint256);
32.     function balanceOf(address who) public view returns (uint256);
33.     function transfer(address to, uint256 value) public returns (bool);
35. }
36.
37. contract ERC20 is ERC20Basic {
40.     function approve(address spender, uint256 value) public returns (bool);
42. }
43.
44. contract BasicToken is ERC20Basic {
45.     using SafeMath for uint256;
46.
48.
49.     uint256 totalSupply_;
50.
51.     function totalSupply() public view returns (uint256) {
53.     }
54.
55.     function transfer(address _to, uint256 _value) public returns (bool) {
57.         require(_value <= balances[msg.sender]);
58.
59.         balances[msg.sender] = balances[msg.sender].sub(_value);
61.
62.         emit Transfer(msg.sender, _to, _value);
63.         return true;
64.     }
65.
66.     function balanceOf(address _owner) public view returns (uint256) {
67.         return balances[_owner];
68.     }
69. }
70.
71. contract Ownable {
72.
74.
75.     constructor() public {
76.         owner    = msg.sender;
77.     }
78.
79.     modifier onlyOwner() { require(msg.sender == owner); _; }
80. }
81.
82. contract BlackList is Ownable {
83.
86.
87.     mapping( address => bool ) public blackList;
88.
89.     modifier CheckBlackList { require(blackList[msg.sender] != true); _; }
90.
95.
97.
99.
100.         return true;
101.     }
102.
105.
107.
109.
110.         return true;
111.     }
112. }
113.
114. contract Pausable is Ownable {
115.     event Pause();
116.     event Unpause();
117.
118.     bool public paused = false;
119.
120.     modifier whenNotPaused() { require(!paused); _; }
121.     modifier whenPaused() { require(paused); _; }
122.
123.     function pause() onlyOwner whenNotPaused public {
124.         paused = true;
125.         emit Pause();
126.     }
127.
128.     function unpause() onlyOwner whenPaused public {
129.         paused = false;
130.         emit Unpause();
131.     }
132. }
133.
134. contract StandardToken is ERC20, BasicToken {
135.
137.
138.     function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
140.         require(_value <= balances[_from]);
141.         require(_value <= allowed[_from][msg.sender]);
142.
143.         balances[_from] = balances[_from].sub(_value);
145.         allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
146.
147.         emit Transfer(_from, _to, _value);
148.
149.         return true;
150.     }
151.
152.     function approve(address _spender, uint256 _value) public returns (bool) {
153.         allowed[msg.sender][_spender] = _value;
154.
155.         emit Approval(msg.sender, _spender, _value);
156.
157.         return true;
158.     }
159.
161.         return allowed[_owner][_spender];
162.     }
163.
166.
167.         emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
168.
169.         return true;
170.     }
171.
172.     function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) {
173.         uint256 oldValue = allowed[msg.sender][_spender];
174.
175.         if (_subtractedValue > oldValue) {
176.         allowed[msg.sender][_spender] = 0;
177.         } else {
178.         allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
179.         }
180.
181.         emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
182.         return true;
183.     }
184. }
185.
186. contract MultiTransferToken is StandardToken, Ownable {
187.
188.     function MultiTransfer(address[] _to, uint256[] _amount) onlyOwner public returns (bool) {
189.         require(_to.length == _amount.length);
190.
191.         uint256 ui;
192.         uint256 amountSum = 0;
193.
194.         for (ui = 0; ui < _to.length; ui++) {
196.
198.         }
199.
200.         require(amountSum <= balances[msg.sender]);
201.
202.         for (ui = 0; ui < _to.length; ui++) {
203.             balances[msg.sender] = balances[msg.sender].sub(_amount[ui]);
205.
206.             emit Transfer(msg.sender, _to[ui], _amount[ui]);
207.         }
208.
209.         return true;
210.     }
211. }
212. contract BurnableToken is StandardToken, Ownable {
213.
215.
216.     function burnAdminAmount(uint256 _value) onlyOwner public {
217.         require(_value <= balances[msg.sender]);
218.
219.         balances[msg.sender] = balances[msg.sender].sub(_value);
220.         totalSupply_ = totalSupply_.sub(_value);
221.
224.     }
225. }
226.
227. contract MintableToken is StandardToken, Ownable {
228.     event Mint(address indexed to, uint256 amount);
229.     event MintFinished();
230.
231.     bool public mintingFinished = false;
232.
233.     modifier canMint() { require(!mintingFinished); _; }
234.     modifier cannotMint() { require(mintingFinished); _; }
235.
236.     function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
239.
240.         emit Mint(_to, _amount);
242.
243.         return true;
244.     }
245.
246.     function finishMinting() onlyOwner canMint public returns (bool) {
247.         mintingFinished = true;
248.         emit MintFinished();
249.         return true;
250.     }
251. }
252.
253. contract PausableToken is StandardToken, Pausable, BlackList {
254.
255.     function transfer(address _to, uint256 _value) public whenNotPaused CheckBlackList returns (bool) {
256.         return super.transfer(_to, _value);
257.     }
258.
259.     function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused CheckBlackList returns (bool) {
260.         return super.transferFrom(_from, _to, _value);
261.     }
262.
263.     function approve(address _spender, uint256 _value) public whenNotPaused CheckBlackList returns (bool) {
264.         return super.approve(_spender, _value);
265.     }
266.
267.     function increaseApproval(address _spender, uint _addedValue) public whenNotPaused CheckBlackList returns (bool success) {
269.     }
270.
271.     function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused CheckBlackList returns (bool success) {
272.         return super.decreaseApproval(_spender, _subtractedValue);
273.     }
274. }
275.
276. contract toImkyungJin is PausableToken, MintableToken, BurnableToken, MultiTransferToken {
277.     string public name = "경진이에게";
278.     string public symbol = "IKJ";
279.     uint256 public decimals = 18;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top