ERC-20
Overview
Max Total Supply
540.492105897242931135 AP3
Holders
32
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
AP3
Compiler Version
v0.5.13+commit.5b0b510c
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-11-25 */ pragma solidity 0.5.13; contract AP3 { uint256 constant private TOKEN_PRECISION = 1e18; uint256 constant private initial_supply = 777 * TOKEN_PRECISION; string constant public name = "AP3 M4DN3SS"; string constant public symbol = "AP3"; uint8 constant public decimals = 18; uint8 constant public burn_rate = 7; struct User { uint256 balance; mapping(address => uint256) allowance; } struct Info { uint256 totalSupply; mapping(address => User) users; address admin; bool maddness; } Info private info; event Transfer(address indexed from, address indexed to, uint256 tokens); event Approval(address indexed owner, address indexed spender, uint256 tokens); constructor() public { info.maddness = false; info.admin = msg.sender; info.totalSupply = initial_supply; info.users[msg.sender].balance = initial_supply; emit Transfer(address(0x0), msg.sender, initial_supply); } function start_maddness () public { require(msg.sender == info.admin); require(!info.maddness); info.maddness = true; } function transfer(address _to, uint256 _tokens) external returns (bool) { _transfer(msg.sender, _to, _tokens); return true; } function balanceOf(address _user) public view returns (uint256) { return info.users[_user].balance; } function approve(address _spender, uint256 _tokens) external returns (bool) { info.users[msg.sender].allowance[_spender] = _tokens; emit Approval(msg.sender, _spender, _tokens); return true; } function transferFrom(address _from, address _to, uint256 _tokens) external returns (bool) { require(info.users[_from].allowance[msg.sender] >= _tokens); info.users[_from].allowance[msg.sender] -= _tokens; _transfer(_from, _to, _tokens); return true; } function totalSupply() public view returns (uint256) { return info.totalSupply; } function allowance(address _user, address _spender) public view returns (uint256) { return info.users[_user].allowance[_spender]; } function _transfer(address _from, address _to, uint256 _tokens) internal returns (uint256) { require(balanceOf(_from) >= _tokens); info.users[_from].balance -= _tokens; uint256 _transferred = 0; if(info.maddness){ uint256 _burnedAmount = _tokens * burn_rate / 100; _transferred = _tokens - _burnedAmount; info.users[_to].balance += _transferred; info.totalSupply -= _burnedAmount; emit Transfer(_from, address(0x0), _burnedAmount); } else { _transferred = _tokens; info.users[_to].balance += _transferred; } emit Transfer(_from, _to, _transferred); return _transferred; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"address","name":"_spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_tokens","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"burn_rate","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"start_maddness","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokens","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokens","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50600280546001600160a81b03191633908117909155682a1f0a87470e840000600081815582815260016020908152604080832084905580519384525191927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a36105ac806100896000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633aec3108116100715780633aec3108146101d95780634d85fbb9146101e357806370a08231146101eb57806395d89b4114610211578063a9059cbb14610219578063dd62ed3e14610245576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b6610273565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561029a565b604080519115158252519081900360200190f35b610173610302565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b03813581169160208101359091169060400135610308565b6101c361037c565b6040805160ff9092168252519081900360200190f35b6101e1610381565b005b6101c36103c4565b6101736004803603602081101561020157600080fd5b50356001600160a01b03166103c9565b6100b66103e4565b6101576004803603604081101561022f57600080fd5b506001600160a01b038135169060200135610403565b6101736004803603604081101561025b57600080fd5b506001600160a01b038135811691602001351661041a565b6040518060400160405280600b81526020016a415033204d34444e33535360a81b81525081565b3360008181526001602081815260408084206001600160a01b0388168086529301825280842086905580518681529051939492937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60005490565b6001600160a01b0383166000908152600160208181526040808420338552909201905281205482111561033a57600080fd5b6001600160a01b03841660009081526001602081815260408084203385529092019052902080548390039055610371848484610446565b506001949350505050565b601281565b6002546001600160a01b0316331461039857600080fd5b600254600160a01b900460ff16156103af57600080fd5b6002805460ff60a01b1916600160a01b179055565b600781565b6001600160a01b031660009081526001602052604090205490565b6040518060400160405280600381526020016241503360e81b81525081565b6000610410338484610446565b5060019392505050565b6001600160a01b0391821660009081526001602081815260408084209490951683529201909152205490565b600081610452856103c9565b101561045d57600080fd5b6001600160a01b038416600090815260016020526040812080548490039055600254600160a01b900460ff161561050357506001600160a01b03838116600090815260016020908152604080832080546064600789020480890391820190925584548290038555825182815292519095919493918a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92908290030190a350610524565b506001600160a01b0383166000908152600160205260409020805483019055815b836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a394935050505056fea265627a7a72315820080c171fb5c2e9275f25b81f5727ac79a13a0fc22dacebbe1766d5da5348142f64736f6c634300050d0032
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633aec3108116100715780633aec3108146101d95780634d85fbb9146101e357806370a08231146101eb57806395d89b4114610211578063a9059cbb14610219578063dd62ed3e14610245576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b6610273565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561029a565b604080519115158252519081900360200190f35b610173610302565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b03813581169160208101359091169060400135610308565b6101c361037c565b6040805160ff9092168252519081900360200190f35b6101e1610381565b005b6101c36103c4565b6101736004803603602081101561020157600080fd5b50356001600160a01b03166103c9565b6100b66103e4565b6101576004803603604081101561022f57600080fd5b506001600160a01b038135169060200135610403565b6101736004803603604081101561025b57600080fd5b506001600160a01b038135811691602001351661041a565b6040518060400160405280600b81526020016a415033204d34444e33535360a81b81525081565b3360008181526001602081815260408084206001600160a01b0388168086529301825280842086905580518681529051939492937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60005490565b6001600160a01b0383166000908152600160208181526040808420338552909201905281205482111561033a57600080fd5b6001600160a01b03841660009081526001602081815260408084203385529092019052902080548390039055610371848484610446565b506001949350505050565b601281565b6002546001600160a01b0316331461039857600080fd5b600254600160a01b900460ff16156103af57600080fd5b6002805460ff60a01b1916600160a01b179055565b600781565b6001600160a01b031660009081526001602052604090205490565b6040518060400160405280600381526020016241503360e81b81525081565b6000610410338484610446565b5060019392505050565b6001600160a01b0391821660009081526001602081815260408084209490951683529201909152205490565b600081610452856103c9565b101561045d57600080fd5b6001600160a01b038416600090815260016020526040812080548490039055600254600160a01b900460ff161561050357506001600160a01b03838116600090815260016020908152604080832080546064600789020480890391820190925584548290038555825182815292519095919493918a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92908290030190a350610524565b506001600160a01b0383166000908152600160205260409020805483019055815b836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a394935050505056fea265627a7a72315820080c171fb5c2e9275f25b81f5727ac79a13a0fc22dacebbe1766d5da5348142f64736f6c634300050d0032
Deployed Bytecode Sourcemap
27:2745:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;27:2745:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;169:43;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;169:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1380:203;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1380:203:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1859:86;;;:::i;:::-;;;;;;;;;;;;;;;;1588:266;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1588:266:0;;;;;;;;;;;;;;;;;:::i;257:35::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;970:151;;;:::i;:::-;;298:35;;;:::i;1269:106::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1269:106:0;-1:-1:-1;;;;;1269:106:0;;:::i;216:37::-;;;:::i;1130:133::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1130:133:0;;;;;;;;:::i;1950:136::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1950:136:0;;;;;;;;;;:::i;169:43::-;;;;;;;;;;;;;;-1:-1:-1;;;169:43:0;;;;:::o;1380:203::-;1472:10;1450:4;1461:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;1461:42:0;;;;;:32;;:42;;;;;:52;;;1523:39;;;;;;;1450:4;;1461:42;;1523:39;;;;;;;;;;;-1:-1:-1;1574:4:0;1380:203;;;;:::o;1859:86::-;1903:7;1924:16;1859:86;:::o;1588:266::-;-1:-1:-1;;;;;1692:17:0;;1673:4;1692:17;;;:10;:17;;;;;;;;1720:10;1692:39;;:27;;;:39;;;;;:50;-1:-1:-1;1692:50:0;1684:59;;;;;;-1:-1:-1;;;;;1748:17:0;;:4;:17;;;:10;:17;;;;;;;;1776:10;1748:39;;:27;;;:39;;;;:50;;;;;;;1803:30;1759:5;1820:3;1791:7;1803:9;:30::i;:::-;-1:-1:-1;1845:4:0;;1588:266;-1:-1:-1;;;;1588:266:0:o;257:35::-;290:2;257:35;:::o;970:151::-;1037:10;;-1:-1:-1;;;;;1037:10:0;1023;:24;1015:33;;;;;;1068:13;;-1:-1:-1;;;1068:13:0;;;;1067:14;1059:23;;;;;;1093:13;:20;;-1:-1:-1;;;;1093:20:0;-1:-1:-1;;;1093:20:0;;;970:151::o;298:35::-;332:1;298:35;:::o;1269:106::-;-1:-1:-1;;;;;1345:17:0;1324:7;1345:17;;;:10;:17;;;;;:25;;1269:106::o;216:37::-;;;;;;;;;;;;;;-1:-1:-1;;;216:37:0;;;;:::o;1130:133::-;1196:4;1207:35;1217:10;1229:3;1234:7;1207:9;:35::i;:::-;-1:-1:-1;1254:4:0;;1130:133;-1:-1:-1;;;1130:133:0:o;1950:136::-;-1:-1:-1;;;;;2044:17:0;;;2023:7;2044:17;;;:10;:17;;;;;;;;:37;;;;;;:27;;:37;;;;;;1950:136::o;2091:678::-;2173:7;2215;2195:16;2205:5;2195:9;:16::i;:::-;:27;;2187:36;;;;;;-1:-1:-1;;;;;2232:17:0;;:4;:17;;;:10;:17;;;;;:36;;;;;;;2309:13;;-1:-1:-1;;;2309:13:0;;;;2306:379;;;-1:-1:-1;;;;;;2437:15:0;;;2332:21;2437:15;;;:10;:15;;;;;;;;:39;;2378:3;332:1;2356:19;;:25;2405:23;;;2437:39;;;;;;2485:33;;;;;;;2538:44;;;;;;;2405:23;;2356:25;;2332:21;2538:44;;;;;;;;;;;;;2306:379;;;;-1:-1:-1;;;;;;2640:15:0;;:4;:15;;;:10;:15;;;;;:39;;;;;;2624:7;2306:379;2720:3;-1:-1:-1;;;;;2704:34:0;2713:5;-1:-1:-1;;;;;2704:34:0;;2725:12;2704:34;;;;;;;;;;;;;;;;;;2752:12;2091:678;-1:-1:-1;;;;2091:678:0:o
Swarm Source
bzzr://080c171fb5c2e9275f25b81f5727ac79a13a0fc22dacebbe1766d5da5348142f
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.