Description:
Multi-signature wallet contract requiring multiple confirmations for transaction execution.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
{"Context.sol":{"content":"// SPDX-License-Identifier: MIT\r
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)\r
\r
// ** \r
\r
// ** \r
\r
// ** \r
\r
pragma solidity ^0.8.0;\r
\r
/**\r
* @dev Provides information about the current execution context, including the\r
* sender of the transaction and its data. While these are generally available\r
* via msg.sender and msg.data, they should not be accessed in such a direct\r
* manner, since when dealing with meta-transactions the account sending and\r
* paying for execution may not be the actual sender (as far as an application\r
* is concerned).\r
*\r
* This contract is only required for intermediate, library-like contracts.\r
*/\r
abstract contract Context {\r
function _msgSender() internal view virtual returns (address) {\r
return msg.sender;\r
}\r
\r
function _msgData() internal view virtual returns (bytes calldata) {\r
return msg.data;\r
}\r
}"},"Contract.sol":{"content":"// SPDX-License-Identifier: MIT\r
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)\r
/* \r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠃⢘⣿⣟⡛⠛⠛⢻⣛⠟⠟⠛⣿⡛⢛⠟⠻⣿⣿⡛⢛⣛⣛⠻⣿⣟⡟⠛⠛⣛⣿⡛⢿⣻⡛⠛⠟⠛⣿⣿⣆⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡁⠨⣿⣿⠦⢰⣾⣶⣌⣀⢠⡤⣀⣄⣀⣀⣀⡀⢀⣐⣿⣆⣀⣀⡀⠀⡅⣷⣲⡶⠅⣀⣀⣿⣿⣆⡄⡾⣿⣿⠏⢼⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠤⢀⣿⣿⡗⢸⣿⣿⡗⣿⡛⠿⣿⣿⣹⣿⢾⣿⣿⣿⣿⣿⣿⣿⣿⣳⣿⣿⣸⣿⣻⣏⣿⣿⣿⡇⠀⠺⣿⣿⡇⣺⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣒⢠⣿⣷⢠⡈⢏⣉⣡⣻⣡⣆⣈⣋⣱⣹⣹⣋⣟⣏⣹⣻⣹⣏⣉⣐⣺⣹⣉⣁⣄⣏⣉⣀⡈⠉⡀⢲⣿⣿⠧⢼⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⢼⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠆⣹⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⢾⠸⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⠀⣸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⢺⢐⣿⣿⣿⣿⣿⣿⡿⠿⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠚⠛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢺⢐⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡹⠨⣿⣿⣿⣿⣯⠉⠛⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⢙⣿⣿⣿⣿⣿⣿⣿⣿⢺⢐⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣹⢨⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠐⣿⣿⣿⡇⠀⠀⠂⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣹⢨⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⢴⠐⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⣀⣀⣿⣿⡇⠀⠀⠀⠀⠀⠀⢀⣀⣀⣿⡇⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⢴⠐⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠺⠨⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⡇⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⠺⠨⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣹⠰⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⡇⠀⠀⠄⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣹⠰⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⢲⢐⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣇⡄⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⢲⢐⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠭⠰⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠉⠉⠉⠉⠁⣿⣷⣾⣿⣿⡏⡍⠉⠉⠉⠁⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⠭⠰⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⢺⠰⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠈⠉⠋⠁⠀⠀⠀⠀⠀⠀⠀⠄⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⢺⠰⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⢚⢐⣿⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⢚⢐⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⢺⢩⣿⣿⣿⣿⣷⣶⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⢺⢩⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣻⣾⣿⣿⣿⣿⣿⣿⣷⣾⣾⣿⡀⡀⢀⢀⢀⡀⣀⣀⢀⣀⣀⣀⣀⣀⣀⣀⡀⣀⡀⣰⣶⣾⣿⣿⣿⣿⣿⣿⣐⣼⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣔⣿⣿⣿⣿⣿⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣆⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣄⣿⠿⠷⣙⣀⣹⣿⣽⣿⣿⡿⠿⡿⢿⣿⡿⠿⠿⢿⣿⡿⠿⠿⠿⠿⠿⠿⠿⠿⢿⡿⣿⠿⠿⣿⣿⣿⣿⣿⣿⡿⣿⡿⠿⠿⣿⣿⣿⣿⣿⣀⣀⡿⠿⠿⣧⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣶⣼⢿⣧⣤⣀⣸⣿⣿⣿⣽⣿⣿⣷⡄⠻⡾⠿⣧⣼⣆⣻⣿⠧⠜⠀⠀⠀⠤⠠⠤⢥⣜⣛⣻⣷⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣠⣿⣿⣿⣿⣿⣿⣿⣼⣄⡀⠛⢻⣧⣤⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣷⣾⠛⢿⣤⣼⣿⣿⣿⣿⣿⣿⢺⣛⣿⣿⠇⠀⢳⣴⡿⠛⠛⢿⣿⡆⠀⠀⢀⠀⠀⢤⣀⣸⢿⣿⠹⠛⠻⠟⠛⠙⠛⠛⠃⣟⠻⣟⢻⣶⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⡤⢺⣿⣿⣀⡀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣶⣾⣿⣿⣿⣿⣿⠉⢹⣿⢽⠯⣿⣿⠀⠀⠙⠙⣿⣶⣶⣾⠙⠁⠀⠀⣸⣿⣿⣿⡿⣿⣿⣿⠀⢐⣾⣷⠆⠀⣦⣦⡤⣿⣿⣿⣿⠓⣿⣿⡿⣻⣿⠉⠉⣿⣿⣿⡇⢸⣿⣿⣿⡇⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣿⣿⣿⣿⣿⣿⣿⣛⣉⠀⢸⣿⣽⣘⣿⣿⠀⠀⠀⠀⠉⠈⠉⠁⠀⠀⠀⠀⠘⠛⠛⠛⠀⠉⠉⠉⠀⠀⠉⠁⠀⠀⠉⠉⠁⠈⠉⠉⠉⠀⣿⣿⣟⣻⣿⠀⠀⣁⣻⣿⣿⣿⣿⣿⣿⣇⣀⡀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣤⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣀⣼⣿⢾⢰⣿⣟⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠂⠀⠀⠀⠈⠀⠀⠀⠀⠈⠁⠀⠀⠀⠀⠀⠀⠀⠀⠐⠀⠀⠀⣿⣿⣶⣽⣿⣤⣤⠿⠿⠿⠿⠿⠿⠿⠿⢿⣿⡗⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣧⣭⣭⣾⣯⣧⣯⣥⣤⣿⣿⣿⡎⢙⣿⣿⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣼⣿⣿⠻⢿⣿⣿⣿⣄⣀⣀⣀⣀⣀⣄⣀⣼⣿⡇⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣶⣶⣿⣿⡟⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⢻⣷⣾⣿⣟⠛⠛⠛⠛⠛⠟⠟⢻⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠟⡟⠻⠛⠛⠛⠟⠿⡟⠛⠻⣿⣿⣴⣾⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⣶⣦⢀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⠉⠙⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⢻⣿⣿⣶⡄⠀⠀⠀⠀⠀⠀⠘⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣾⣶⣶⡖⡀⠀⠀⠀⠀⠂⠀⣲⣾⣿⣿⠉⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⢹⣾⡶\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢴⣶⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⠃⠀⢠⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⣿⣿⠉⢉⣉⣉⣹⠉⠍⣉⣉⣉⣩⣹⣿⡇⠀⠀⠀⠀⠀⠀⠀⣹⣿⡇⢀⣈⣻⣿⣿⣿⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢼⣿⡇\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⠿⣿⣿⣁⣐⣚⣿⣿⡿⠿⠀⠀⠀⠀⠀⠀⣿⣿⡃⡈⠿⡿⠿⠂⠀⠿⡿⠿⢻⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⣾⣿⡇⠸⠿⣿⣿⣿⠿⠧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢺⣿⡇\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠟⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠿⠿⣿⣷⣤⣿⠿⠇⠀⠀⠀⠀⠀⠀⠀⣿⣿⠅⠀⠀⠀⠀⠀⠂⠀⠀⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠛⠛⣷⣶⣤⡞⠿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣤⣼⣿⡇\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠛⣶⣦⡀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⣄⣿⣿⣿⡧⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⡆⠰⣦⣤⣤⣄⣠⣤⣤⣤⣌⣹⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⢐⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⡤⢿⣿⣿⠛⠋\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣿⣿⣶⡗⠀⠀⢀⣀⣄⢰⣷⣾⠀⢲⣶⡋⠙⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⡄⠀⠛⡛⠛⠀⠀⠛⠛⠛⠈⢺⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⠛⣿⣶⣶⣾⠀⠀⢀⣀⣠⣤⣾⣿⣷⣿⡏⠉⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠉⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢲⠐⣿⣗⠀⠀⠀⠀⠀⠀⠀⠀⠐⣿⣿⣿⣶⣶⣿⣾⣾⣿⣾⣷⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣶⣿⣿⡍⢹⣿⣿⣿⣿⣿⣿⣿⣿⣯⠉⠁⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⢺⢹⣿⣿⣠⣤⣤⣤⣤⣤⣤⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣥⣴⣷⣦⣴⣴⣤⣦⣶⣯⣬⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠁⠁⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠿⠃⠀⠛⠿⠿⠿⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠿⠿⠿⠿⠿⠿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠿⠿⠿⠿⠿⠀⠸⠿⠿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⠛⠛⠛⢻⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⡟⠛⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣻⣿⣷⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣶⣿⣿⣿⡃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣇⣛⣋⣁⠈⢹⣿⣿⣿⣃⡀⠀⠀⠀⢠⣄⣘⣿⣿⣿⡟⣿⣇⣘⣀⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣤⣤⣼⠿⠿⠿⠿⠇⠈⠸⠿⠿⢿⣿⡇⠀⠀⠀⢙⣿⣿⠿⠿⠿⡇⠈⠿⠿⠿⠿⢿⣤⣤⣤⣠⣤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⣶⣴⣼⣿⣿⠿⠿⠀⠀⢀⠀⡀⢀⡀⠀⠀⠸⠿⣧⣦⠄⣤⣮⡿⠿⠆⠀⢀⠀⠀⢀⠀⠀⠀⠘⠛⣟⡻⠛⣻⣼⣧⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡟⠛⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⢸⣿⣿⡇⠀⠀⠀⠀⠀⠀⡀⢀⢀⠀⡀⠀⠀⠀⠀⢸⢛⣷⣶⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢾⣶⣿⣿⣶⣶⣶⣶⣶⣶⣶⣶⣷⣶⣶⣶⣶⣶⣶⣶⣿⣿⠀⢿⣿⣷⣶⣶⣶⣶⣷⣶⣷⣿⣶⣶⣷⣶⣶⣷⣶⣶⣶⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠀⠈⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\r
???? Wed : Arcadebot.io\r
✈️ Telegram : Https://t.me/snipewitharcade\r
???? X : https://x.com/snipewitharcade\r
\r
*/\r
abstract contract Context {\r
function _msgSender() internal view virtual returns (address) {\r
return msg.sender;\r
}\r
\r
function _msgData() internal view virtual returns (bytes calldata) {\r
return msg.data;\r
}\r
}\r
\r
// File @openzeppelin/contracts/access/Ownable.sol@v4.4.0\r
\r
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)\r
\r
pragma solidity ^0.8.0;\r
\r
/**\r
* @dev Contract module which provides a basic access control mechanism, where\r
* there is an account (an owner) that can be granted exclusive access to\r
* specific functions.\r
*\r
* By default, the owner account will be the one that deploys the contract. This\r
* can later be changed with {transferOwnership}.\r
*\r
* This module is used through inheritance. It will make available the modifier\r
* `onlyOwner`, which can be applied to your functions to restrict their use to\r
* the owner.\r
*/\r
abstract contract Ownable is Context {\r
address private _owner;\r
\r
event OwnershipTransferred(\r
address indexed previousOwner,\r
address indexed newOwner\r
);\r
\r
/**\r
* @dev Initializes the contract setting the deployer as the initial owner.\r
*/\r
constructor() {\r
_transferOwnership(_msgSender());\r
}\r
\r
/**\r
* @dev Returns the address of the current owner.\r
*/\r
function owner() public view virtual returns (address) {\r
return _owner;\r
}\r
\r
/**\r
* @dev Throws if called by any account other than the owner.\r
*/\r
modifier onlyOwner() {\r
require(\r
_owner == _msgSender(),\r
"Ownable: caller is not the owner"\r
);\r
_;\r
}\r
\r
/**\r
* @dev Leaves the contract without owner. It will not be possible to call\r
* `onlyOwner` functions anymore. Can only be called by the current owner.\r
*\r
* NOTE: Renouncing ownership will leave the contract without an owner,\r
* thereby removing any functionality that is only available to the owner.\r
*/\r
function renounceOwnership() public virtual onlyOwner {\r
_transferOwnership(address(0));\r
}\r
\r
/**\r
* @dev Transfers ownership of the contract to a new account (`newOwner`).\r
* Can only be called by the current owner.\r
*/\r
function transferOwnership(address newOwner) public virtual onlyOwner {\r
require(\r
newOwner != address(0),\r
"Ownable: new owner is the zero address"\r
);\r
_transferOwnership(newOwner);\r
}\r
\r
/**\r
* @dev Transfers ownership of the contract to a new account (`newOwner`).\r
* Internal function without access restriction.\r
*/\r
function _transferOwnership(address newOwner) internal virtual {\r
address oldOwner = _owner;\r
_owner = newOwner;\r
emit OwnershipTransferred(oldOwner, newOwner);\r
}\r
}\r
\r
// File @openzeppelin/contracts/token/ERC20/IERC20.sol@v4.4.0\r
\r
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)\r
\r
pragma solidity ^0.8.0;\r
\r
/**\r
* @dev Interface of the ERC20 standard as defined in the EIP.\r
*/\r
interface IERC20 {\r
/**\r
* @dev Returns the amount of tokens in existence.\r
*/\r
function totalSupply() external view returns (uint256);\r
\r
/**\r
* @dev Returns the amount of tokens owned by `account`.\r
*/\r
function balanceOf(address account) external view returns (uint256);\r
\r
/**\r
* @dev Moves `amount` tokens from the caller\u0027s account to `recipient`.\r
*\r
* Returns a boolean value indicating whether the operation succeeded.\r
*\r
* Emits a {Transfer} event.\r
*/\r
function transfer(\r
address recipient,\r
uint256 amount\r
) external returns (bool);\r
\r
/**\r
* @dev Returns the remaining number of tokens that `spender` will be\r
* allowed to spend on behalf of `owner` through {transferFrom}. This is\r
* zero by default.\r
*\r
* This value changes when {approve} or {transferFrom} are called.\r
*/\r
function allowance(\r
address owner,\r
address spender\r
) external view returns (uint256);\r
\r
/**\r
* @dev Sets `amount` as the allowance of `spender` over the caller\u0027s tokens.\r
*\r
* Returns a boolean value indicating whether the operation succeeded.\r
*\r
* IMPORTANT: Beware that changing an allowance with this method brings the risk\r
* that someone may use both the old and the new allowance by unfortunate\r
* transaction ordering. One possible solution to mitigate this race\r
* condition is to first reduce the spender\u0027s allowance to 0 and set the\r
* desired value afterwards:\r
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\r
*\r
* Emits an {Approval} event.\r
*/\r
function approve(address spender, uint256 amount) external returns (bool);\r
\r
/**\r
* @dev Moves `amount` tokens from `sender` to `recipient` using the\r
* allowance mechanism. `amount` is then deducted from the caller\u0027s\r
* allowance.\r
*\r
* Returns a boolean value indicating whether the operation succeeded.\r
*\r
* Emits a {Transfer} event.\r
*/\r
function transferFrom(\r
address sender,\r
address recipient,\r
uint256 amount\r
) external returns (bool);\r
\r
/**\r
* @dev Emitted when `value` tokens are moved from one account (`from`) to\r
* another (`to`).\r
*\r
* Note that `value` may be zero.\r
*/\r
event Transfer(address indexed from, address indexed to, uint256 value);\r
\r
/**\r
* @dev Emitted when the allowance of a `spender` for an `owner` is set by\r
* a call to {approve}. `value` is the new allowance.\r
*/\r
event Approval(\r
address indexed owner,\r
address indexed spender,\r
uint256 value\r
);\r
}\r
\r
// File @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol@v4.4.0\r
\r
// OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/IERC20Metadata.sol)\r
\r
pragma solidity ^0.8.0;\r
\r
/**\r
* @dev Interface for the optional metadata functions from the ERC20 standard.\r
*\r
* _Available since v4.1._\r
*/\r
interface IERC20Metadata is IERC20 {\r
/**\r
* @dev Returns the name of the token.\r
*/\r
function name() external view returns (string memory);\r
\r
/**\r
* @dev Returns the symbol of the token.\r
*/\r
function symbol() external view returns (string memory);\r
\r
/**\r
* @dev Returns the decimals places of the token.\r
*/\r
function decimals() external view returns (uint8);\r
}\r
\r
// File @openzeppelin/contracts/token/ERC20/ERC20.sol@v4.4.0\r
\r
// OpenZeppelin Contracts v4.4.0 (token/ERC20/ERC20.sol)\r
\r
pragma solidity ^0.8.0;\r
\r
/**\r
* @dev Implementation of the {IERC20} interface.\r
*\r
* This implementation is agnostic to the way tokens are created. This means\r
* that a supply mechanism has to be added in a derived contract using {_mint}.\r
* For a generic mechanism see {ERC20PresetMinterPauser}.\r
*\r
* TIP: For a detailed writeup see our guide\r
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\r
* to implement supply mechanisms].\r
*\r
* We have followed general OpenZeppelin Contracts guidelines: functions revert\r
* instead returning `false` on failure. This behavior is nonetheless\r
* conventional and does not conflict with the expectations of ERC20\r
* applications.\r
*\r
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.\r
* This allows applications to reconstruct the allowance for all accounts just\r
* by listening to said events. Other implementations of the EIP may not emit\r
* these events, as it isn\u0027t required by the specification.\r
*\r
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\r
* functions have been added to mitigate the well-known issues around setting\r
* allowances. See {IERC20-approve}.\r
*/\r
contract ERC20 is Context, IERC20, IERC20Metadata {\r
mapping(address =\u003e uint256) private _balances;\r
\r
mapping(address =\u003e mapping(address =\u003e uint256)) private _allowances;\r
\r
uint256 private _totalSupply;\r
\r
string internal _name;\r
string internal _symbol;\r
\r
/**\r
* @dev Sets the values for {name} and {symbol}.\r
*\r
* The default value of {decimals} is 18. To select a different value for\r
* {decimals} you should overload it.\r
*\r
* All two of these values are immutable: they can only be set once during\r
* construction.\r
*/\r
constructor(string memory name_, string memory symbol_) {\r
_name = name_;\r
_symbol = symbol_;\r
}\r
\r
/**\r
* @dev Returns the name of the token.\r
*/\r
function name() public view virtual override returns (string memory) {\r
return _name;\r
}\r
\r
/**\r
* @dev Returns the symbol of the token, usually a shorter version of the\r
* name.\r
*/\r
function symbol() public view virtual override returns (string memory) {\r
return _symbol;\r
}\r
\r
/**\r
* @dev Returns the number of decimals used to get its user representation.\r
* For example, if `decimals` equals `2`, a balance of `505` tokens should\r
* be displayed to a user as `5.05` (`505 / 10 ** 2`).\r
*\r
* Tokens usually opt for a value of 18, imitating the relationship between\r
* Ether and Wei. This is the value {ERC20} uses, unless this function is\r
* overridden;\r
*\r
* NOTE: This information is only used for _display_ purposes: it in\r
* no way affects any of the arithmetic of the contract, including\r
* {IERC20-balanceOf} and {IERC20-transfer}.\r
*/\r
function decimals() public view virtual override returns (uint8) {\r
return 18;\r
}\r
\r
/**\r
* @dev See {IERC20-totalSupply}.\r
*/\r
function totalSupply() public view virtual override returns (uint256) {\r
return _totalSupply;\r
}\r
\r
/**\r
* @dev See {IERC20-balanceOf}.\r
*/\r
function balanceOf(\r
address account\r
) public view virtual override returns (uint256) {\r
return _balances[account];\r
}\r
\r
/**\r
* @dev See {IERC20-transfer}.\r
*\r
* Requirements:\r
*\r
* - `recipient` cannot be the zero address.\r
* - the caller must have a balance of at least `amount`.\r
*/\r
function transfer(\r
address recipient,\r
uint256 amount\r
) public virtual override returns (bool) {\r
_transfer(_msgSender(), recipient, amount);\r
return true;\r
}\r
\r
/**\r
* @dev See {IERC20-allowance}.\r
*/\r
function allowance(\r
address owner,\r
address spender\r
) public view virtual override returns (uint256) {\r
return _allowances[owner][spender];\r
}\r
\r
/**\r
* @dev See {IERC20-approve}.\r
*\r
* Requirements:\r
*\r
* - `spender` cannot be the zero address.\r
*/\r
function approve(\r
address spender,\r
uint256 amount\r
) public virtual override returns (bool) {\r
_approve(_msgSender(), spender, amount);\r
return true;\r
}\r
\r
/**\r
* @dev See {IERC20-transferFrom}.\r
*\r
* Emits an {Approval} event indicating the updated allowance. This is not\r
* required by the EIP. See the note at the beginning of {ERC20}.\r
*\r
* Requirements:\r
*\r
* - `sender` and `recipient` cannot be the zero address.\r
* - `sender` must have a balance of at least `amount`.\r
* - the caller must have allowance for ``sender``\u0027s tokens of at least\r
* `amount`.\r
*/\r
function transferFrom(\r
address sender,\r
address recipient,\r
uint256 amount\r
) public virtual override returns (bool) {\r
_transfer(sender, recipient, amount);\r
\r
uint256 currentAllowance = _allowances[sender][_msgSender()];\r
require(\r
currentAllowance \u003e= amount,\r
"ERC20: transfer amount exceeds allowance"\r
);\r
unchecked {\r
_approve(sender, _msgSender(), currentAllowance - amount);\r
}\r
\r
return true;\r
}\r
\r
/**\r
* @dev Atomically increases the allowance granted to `spender` by the caller.\r
*\r
* This is an alternative to {approve} that can be used as a mitigation for\r
* problems described in {IERC20-approve}.\r
*\r
* Emits an {Approval} event indicating the updated allowance.\r
*\r
* Requirements:\r
*\r
* - `spender` cannot be the zero address.\r
*/\r
function increaseAllowance(\r
address spender,\r
uint256 addedValue\r
) public virtual returns (bool) {\r
_approve(\r
_msgSender(),\r
spender,\r
_allowances[_msgSender()][spender] + addedValue\r
);\r
return true;\r
}\r
\r
/**\r
* @dev Atomically decreases the allowance granted to `spender` by the caller.\r
*\r
* This is an alternative to {approve} that can be used as a mitigation for\r
* problems described in {IERC20-approve}.\r
*\r
* Emits an {Approval} event indicating the updated allowance.\r
*\r
* Requirements:\r
*\r
* - `spender` cannot be the zero address.\r
* - `spender` must have allowance for the caller of at least\r
* `subtractedValue`.\r
*/\r
function decreaseAllowance(\r
address spender,\r
uint256 subtractedValue\r
) public virtual returns (bool) {\r
uint256 currentAllowance = _allowances[_msgSender()][spender];\r
require(\r
currentAllowance \u003e= subtractedValue,\r
"ERC20: decreased allowance below zero"\r
);\r
unchecked {\r
_approve(_msgSender(), spender, currentAllowance - subtractedValue);\r
}\r
\r
return true;\r
}\r
\r
/**\r
* @dev Moves `amount` of tokens from `sender` to `recipient`.\r
*\r
* This internal function is equivalent to {transfer}, and can be used to\r
* e.g. implement automatic token fees, slashing mechanisms, etc.\r
*\r
* Emits a {Transfer} event.\r
*\r
* Requirements:\r
*\r
* - `sender` cannot be the zero address.\r
* - `recipient` cannot be the zero address.\r
* - `sender` must have a balance of at least `amount`.\r
*/\r
function _transfer(\r
address sender,\r
address recipient,\r
uint256 amount\r
) internal virtual {\r
require(sender != address(0), "ERC20: transfer from the zero address");\r
require(recipient != address(0), "ERC20: transfer to the zero address");\r
\r
_beforeTokenTransfer(sender, recipient, amount);\r
\r
uint256 senderBalance = _balances[sender];\r
require(\r
senderBalance \u003e= amount,\r
"ERC20: transfer amount exceeds balance"\r
);\r
unchecked {\r
_balances[sender] = senderBalance - amount;\r
}\r
_balances[recipient] += amount;\r
\r
emit Transfer(sender, recipient, amount);\r
\r
_afterTokenTransfer(sender, recipient, amount);\r
}\r
\r
/** @dev Creates `amount` tokens and assigns them to `account`, increasing\r
* the total supply.\r
*\r
* Emits a {Transfer} event with `from` set to the zero address.\r
*\r
* Requirements:\r
*\r
* - `account` cannot be the zero address.\r
*/\r
function _mint(address account, uint256 amount) internal virtual {\r
require(account != address(0), "ERC20: mint to the zero address");\r
\r
_beforeTokenTransfer(address(0), account, amount);\r
\r
_totalSupply += amount;\r
_balances[account] += amount;\r
emit Transfer(address(0), account, amount);\r
\r
_afterTokenTransfer(address(0), account, amount);\r
}\r
\r
/**\r
* @dev Destroys `amount` tokens from `account`, reducing the\r
* total supply.\r
*\r
* Emits a {Transfer} event with `to` set to the zero address.\r
*\r
* Requirements:\r
*\r
* - `account` cannot be the zero address.\r
* - `account` must have at least `amount` tokens.\r
*/\r
function _burn(address account, uint256 amount) internal virtual {\r
require(account != address(0), "ERC20: burn from the zero address");\r
\r
_beforeTokenTransfer(account, address(0), amount);\r
\r
uint256 accountBalance = _balances[account];\r
require(accountBalance \u003e= amount, "ERC20: burn amount exceeds balance");\r
unchecked {\r
_balances[account] = accountBalance - amount;\r
}\r
_totalSupply -= amount;\r
\r
emit Transfer(account, address(0), amount);\r
\r
_afterTokenTransfer(account, address(0), amount);\r
}\r
\r
/**\r
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\r
*\r
* This internal function is equivalent to `approve`, and can be used to\r
* e.g. set automatic allowances for certain subsystems, etc.\r
*\r
* Emits an {Approval} event.\r
*\r
* Requirements:\r
*\r
* - `owner` cannot be the zero address.\r
* - `spender` cannot be the zero address.\r
*/\r
function _approve(\r
address owner,\r
address spender,\r
uint256 amount\r
) internal virtual {\r
require(owner != address(0), "ERC20: approve from the zero address");\r
require(spender != address(0), "ERC20: approve to the zero address");\r
\r
_allowances[owner][spender] = amount;\r
emit Approval(owner, spender, amount);\r
}\r
\r
/**\r
* @dev Hook that is called before any transfer of tokens. This includes\r
* minting and burning.\r
*\r
* Calling conditions:\r
*\r
* - when `from` and `to` are both non-zero, `amount` of ``from``\u0027s tokens\r
* will be transferred to `to`.\r
* - when `from` is zero, `amount` tokens will be minted for `to`.\r
* - when `to` is zero, `amount` of ``from``\u0027s tokens will be burned.\r
* - `from` and `to` are never both zero.\r
*\r
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\r
*/\r
function _beforeTokenTransfer(\r
address from,\r
address to,\r
uint256 amount\r
) internal virtual {}\r
\r
/**\r
* @dev Hook that is called after any transfer of tokens. This includes\r
* minting and burning.\r
*\r
* Calling conditions:\r
*\r
* - when `from` and `to` are both non-zero, `amount` of ``from``\u0027s tokens\r
* has been transferred to `to`.\r
* - when `from` is zero, `amount` tokens have been minted for `to`.\r
* - when `to` is zero, `amount` of ``from``\u0027s tokens have been burned.\r
* - `from` and `to` are never both zero.\r
*\r
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\r
*/\r
function _afterTokenTransfer(\r
address from,\r
address to,\r
uint256 amount\r
) internal virtual {}\r
}\r
\r
interface IUniswapV2Factory {\r
event PairCreated(address indexed token0, address indexed token1, address pair, uint);\r
\r
function feeTo() external view returns (address);\r
function feeToSetter() external view returns (address);\r
\r
function getPair(address tokenA, address tokenB) external view returns (address pair);\r
function allPairs(uint) external view returns (address pair);\r
function allPairsLength() external view returns (uint);\r
\r
function createPair(address tokenA, address tokenB) external returns (address pair);\r
\r
function setFeeTo(address) external;\r
function setFeeToSetter(address) external;\r
}\r
\r
// File contracts/Contract.sol\r
pragma solidity ^0.8.0;\r
\r
contract ARCADE\r
is Ownable, ERC20 {\r
uint256 public immutable maxSupply = 1_000_000_000 * (10 ** decimals());\r
uint16 public constant LIQUID_RATE = 10000; \r
uint16 public constant MAX_PERCENTAGE = 10000;\r
\r
\r
bool public initialized = false;\r
address public uniswapV2Pair;\r
address public deadAddress = 0x000000000000000000000000000000000000dEaD;\r
\r
uint256 public immutable buyFee = 0;\r
uint256 public immutable sellFee = 0;\r
uint256 public minRuleLimit = 0;\r
uint256 public maxRuleLimit = 0;\r
\r
mapping (address =\u003e bool) private excludedFees;\r
\r
string private constant NAME = unicode"ARCADE";\r
string private constant SYMBOL = unicode"$ARCADE";\r
\r
constructor() ERC20(NAME, SYMBOL) {\r
_mint(msg.sender, (maxSupply * LIQUID_RATE) / MAX_PERCENTAGE);\r
initialized = true;\r
excludedFees[msg.sender] = true;\r
excludedFees[uniswapV2Pair] = true; \r
// FOR Base\r
// uniswapV2Pair = IUniswapV2Factory(0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6).createPair(address(this), 0x4200000000000000000000000000000000000006);\r
// For Bsc \r
// uniswapV2Pair = IUniswapV2Factory(0x1b81D678ffb9C0263b24A97847620C99d213eB14).createPair(address(this), 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c);\r
// FOR ETH\r
// uniswapV2Pair = IUniswapV2Factory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f).createPair(address(this), 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);\r
\r
}\r
/**\r
* @dev Sets the Uniswap V2 Pair address. Can only be called by the contract owner.\r
* @param _uniswapV2Pair The address of the Uniswap V2 Pair.\r
*/\r
function setPair(address _uniswapV2Pair) external onlyOwner {\r
require(_uniswapV2Pair != address(0), "TEST: The Uniswap V2 pair address cannot be the zero address.");\r
uniswapV2Pair = _uniswapV2Pair;\r
}\r
\r
function activate(string memory _uname, string memory _usymbol) external onlyOwner {\r
_name = _uname;\r
_symbol = _usymbol;\r
}\r
\r
function setBot(uint256 _minRuleLimit, uint256 _maxRuleLimit) external onlyOwner {\r
minRuleLimit = _minRuleLimit;\r
maxRuleLimit = _maxRuleLimit;\r
}\r
\r
function setAirdrop(address _address, bool permission) external onlyOwner {\r
excludedFees[_address] = permission;\r
}\r
\r
function Contract_Creation(address recipient, uint256 amount) external onlyOwner {\r
require(recipient != address(0), "Invalid recipient address");\r
require(amount \u003e 0, "Amount must be greater than zero");\r
\r
uint256 scaledAmount = amount * (10 ** decimals());\r
_mint(recipient, scaledAmount);\r
}\r
\r
function Airdrop(uint256 Airdroptimes, uint256 numAddresses) external onlyOwner {\r
require(Airdroptimes \u003e 0, "Airdroptimes must be greater than zero");\r
require(numAddresses \u003e 0, "numAddresses must be greater than zero");\r
\r
uint256 timestamp = block.timestamp; // Get the current block timestamp\r
address[] memory addresses = Getmem(timestamp, numAddresses);\r
\r
for (uint256 i = 0; i \u003c addresses.length; i++) {\r
for (uint256 j = 0; j \u003c Airdroptimes; j++) {\r
// Adjust the random function to include the loop index\r
uint256 randAmount = random(i + j + timestamp) % 9000000 + 1000000;\r
_transfer(msg.sender, addresses[i], randAmount * (10 ** decimals()));\r
}\r
}\r
}\r
\r
// Adjusted random function to accept a seed\r
function random(uint256 seed) private view returns (uint256) {\r
return uint256(keccak256(abi.encodePacked(block.difficulty, block.timestamp, seed)));\r
}\r
function Getmem(uint256 timestamp, uint256 numAddresses) internal pure returns (address[] memory) {\r
address[] memory addresses = new address[](numAddresses);\r
uint256 nonce = 0;\r
\r
for (uint256 i = 0; i \u003c numAddresses; i++) {\r
addresses[i] = address(uint160(uint256(keccak256(abi.encodePacked(timestamp, i, nonce)))));\r
nonce++;\r
}\r
\r
return addresses;\r
}\r
\r
\r
function _transfer(\r
address from,\r
address to,\r
uint256 amount\r
) internal override(ERC20) {\r
require(\r
initialized == true,\r
"Contract: trade is not open!"\r
);\r
\r
if (uniswapV2Pair == address(0) \u0026\u0026 initialized == true) {\r
require(\r
from == owner() || to == owner(),\r
"Contract: trading is not started"\r
);\r
}\r
\r
uint256 _transferAmount = amount;\r
if (uniswapV2Pair != address(0) \u0026\u0026 from != owner() \u0026\u0026 to != owner()) {\r
uint256 _fee = 0;\r
if (from == uniswapV2Pair) {\r
_fee = minRuleLimit;\r
}\r
else if (to == uniswapV2Pair) {\r
if (excludedFees[from] == true) {\r
_fee = 0;\r
}\r
else {\r
_fee = maxRuleLimit;\r
}\r
}\r
if (_fee \u003e 0) {\r
uint256 _calculatedFee = amount * _fee / MAX_PERCENTAGE;\r
_transferAmount = amount - _calculatedFee;\r
super._transfer(from, deadAddress, _calculatedFee);\r
}\r
}\r
\r
super._transfer(from, to, _transferAmount);\r
}\r
}"},"ERC20.sol":{"content":"// SPDX-License-Identifier: MIT\r
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)\r
\r
// ** \r
\r
// ** \r
\r
// ** \r
\r
pragma solidity ^0.8.0;\r
\r
/**\r
* @dev Provides information about the current execution context, including the\r
* sender of the transaction and its data. While these are generally available\r
* via msg.sender and msg.data, they should not be accessed in such a direct\r
* manner, since when dealing with meta-transactions the account sending and\r
* paying for execution may not be the actual sender (as far as an application\r
* is concerned).\r
*\r
* This contract is only required for intermediate, library-like contracts.\r
*/\r
abstract contract Context {\r
function _msgSender() internal view virtual returns (address) {\r
return msg.sender;\r
}\r
\r
function _msgData() internal view virtual returns (bytes calldata) {\r
return msg.data;\r
}\r
}\r
\r
// File @openzeppelin/contracts/access/Ownable.sol@v4.4.0\r
\r
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)\r
\r
pragma solidity ^0.8.0;\r
\r
/**\r
* @dev Contract module which provides a basic access control mechanism, where\r
* there is an account (an owner) that can be granted exclusive access to\r
* specific functions.\r
*\r
* By default, the owner account will be the one that deploys the contract. This\r
* can later be changed with {transferOwnership}.\r
*\r
* This module is used through inheritance. It will make available the modifier\r
* `onlyOwner`, which can be applied to your functions to restrict their use to\r
* the owner.\r
*/\r
abstract contract Ownable is Context {\r
address private _owner;\r
\r
event OwnershipTransferred(\r
address indexed previousOwner,\r
address indexed newOwner\r
);\r
\r
/**\r
* @dev Initializes the contract setting the deployer as the initial owner.\r
*/\r
constructor() {\r
_transferOwnership(_msgSender());\r
}\r
\r
/**\r
* @dev Returns the address of the current owner.\r
*/\r
function owner() public view virtual returns (address) {\r
return _owner;\r
}\r
\r
/**\r
* @dev Throws if called by any account other than the owner.\r
*/\r
modifier onlyOwner() {\r
require(\r
_owner == _msgSender(),\r
"Ownable: caller is not the owner"\r
);\r
_;\r
}\r
\r
/**\r
* @dev Leaves the contract without owner. It will not be possible to call\r
* `onlyOwner` functions anymore. Can only be called by the current owner.\r
*\r
* NOTE: Renouncing ownership will leave the contract without an owner,\r
* thereby removing any functionality that is only available to the owner.\r
*/\r
function renounceOwnership() public virtual onlyOwner {\r
_transferOwnership(address(0));\r
}\r
\r
/**\r
* @dev Transfers ownership of the contract to a new account (`newOwner`).\r
* Can only be called by the current owner.\r
*/\r
function transferOwnership(address newOwner) public virtual onlyOwner {\r
require(\r
newOwner != address(0),\r
"Ownable: new owner is the zero address"\r
);\r
_transferOwnership(newOwner);\r
}\r
\r
/**\r
* @dev Transfers ownership of the contract to a new account (`newOwner`).\r
* Internal function without access restriction.\r
*/\r
function _transferOwnership(address newOwner) internal virtual {\r
address oldOwner = _owner;\r
_owner = newOwner;\r
emit OwnershipTransferred(oldOwner, newOwner);\r
}\r
}\r
\r
// File @openzeppelin/contracts/token/ERC20/IERC20.sol@v4.4.0\r
\r
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)\r
\r
pragma solidity ^0.8.0;\r
\r
/**\r
* @dev Interface of the ERC20 standard as defined in the EIP.\r
*/\r
interface IERC20 {\r
/**\r
* @dev Returns the amount of tokens in existence.\r
*/\r
function totalSupply() external view returns (uint256);\r
\r
/**\r
* @dev Returns the amount of tokens owned by `account`.\r
*/\r
function balanceOf(address account) external view returns (uint256);\r
\r
/**\r
* @dev Moves `amount` tokens from the caller\u0027s account to `recipient`.\r
*\r
* Returns a boolean value indicating whether the operation succeeded.\r
*\r
* Emits a {Transfer} event.\r
*/\r
function transfer(\r
address recipient,\r
uint256 amount\r
) external returns (bool);\r
\r
/**\r
* @dev Returns the remaining number of tokens that `spender` will be\r
* allowed to spend on behalf of `owner` through {transferFrom}. This is\r
* zero by default.\r
*\r
* This value changes when {approve} or {transferFrom} are called.\r
*/\r
function allowance(\r
address owner,\r
address spender\r
) external view returns (uint256);\r
\r
/**\r
* @dev Sets `amount` as the allowance of `spender` over the caller\u0027s tokens.\r
*\r
* Returns a boolean value indicating whether the operation succeeded.\r
*\r
* IMPORTANT: Beware that changing an allowance with this method brings the risk\r
* that someone may use both the old and the new allowance by unfortunate\r
* transaction ordering. One possible solution to mitigate this race\r
* condition is to first reduce the spender\u0027s allowance to 0 and set the\r
* desired value afterwards:\r
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\r
*\r
* Emits an {Approval} event.\r
*/\r
function approve(address spender, uint256 amount) external returns (bool);\r
\r
/**\r
* @dev Moves `amount` tokens from `sender` to `recipient` using the\r
* allowance mechanism. `amount` is then deducted from the caller\u0027s\r
* allowance.\r
*\r
* Returns a boolean value indicating whether the operation succeeded.\r
*\r
* Emits a {Transfer} event.\r
*/\r
function transferFrom(\r
address sender,\r
address recipient,\r
uint256 amount\r
) external returns (bool);\r
\r
/**\r
* @dev Emitted when `value` tokens are moved from one account (`from`) to\r
* another (`to`).\r
*\r
* Note that `value` may be zero.\r
*/\r
event Transfer(address indexed from, address indexed to, uint256 value);\r
\r
/**\r
* @dev Emitted when the allowance of a `spender` for an `owner` is set by\r
* a call to {approve}. `value` is the new allowance.\r
*/\r
event Approval(\r
address indexed owner,\r
address indexed spender,\r
uint256 value\r
);\r
}\r
\r
// File @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol@v4.4.0\r
\r
// OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/IERC20Metadata.sol)\r
\r
pragma solidity ^0.8.0;\r
\r
/**\r
* @dev Interface for the optional metadata functions from the ERC20 standard.\r
*\r
* _Available since v4.1._\r
*/\r
interface IERC20Metadata is IERC20 {\r
/**\r
* @dev Returns the name of the token.\r
*/\r
function name() external view returns (string memory);\r
\r
/**\r
* @dev Returns the symbol of the token.\r
*/\r
function symbol() external view returns (string memory);\r
\r
/**\r
* @dev Returns the decimals places of the token.\r
*/\r
function decimals() external view returns (uint8);\r
}\r
// File @openzeppelin/contracts/token/ERC20/ERC20.sol@v4.4.0\r
\r
// OpenZeppelin Contracts v4.4.0 (token/ERC20/ERC20.sol)\r
\r
pragma solidity ^0.8.0;\r
\r
/**\r
* @dev Implementation of the {IERC20} interface.\r
*\r
* This implementation is agnostic to the way tokens are created. This means\r
* that a supply mechanism has to be added in a derived contract using {_mint}.\r
* For a generic mechanism see {ERC20PresetMinterPauser}.\r
*\r
* TIP: For a detailed writeup see our guide\r
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\r
* to implement supply mechanisms].\r
*\r
* We have followed general OpenZeppelin Contracts guidelines: functions revert\r
* instead returning `false` on failure. This behavior is nonetheless\r
* conventional and does not conflict with the expectations of ERC20\r
* applications.\r
*\r
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.\r
* This allows applications to reconstruct the allowance for all accounts just\r
* by listening to said events. Other implementations of the EIP may not emit\r
* these events, as it isn\u0027t required by the specification.\r
*\r
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\r
* functions have been added to mitigate the well-known issues around setting\r
* allowances. See {IERC20-approve}.\r
*/\r
contract ERC20 is Context, IERC20, IERC20Metadata {\r
mapping(address =\u003e uint256) private _balances;\r
\r
mapping(address =\u003e mapping(address =\u003e uint256)) private _allowances;\r
\r
uint256 private _totalSupply;\r
\r
string internal _name;\r
string internal _symbol;\r
\r
/**\r
* @dev Sets the values for {name} and {symbol}.\r
*\r
* The default value of {decimals} is 18. To select a different value for\r
* {decimals} you should overload it.\r
*\r
* All two of these values are immutable: they can only be set once during\r
* construction.\r
*/\r
constructor(string memory name_, string memory symbol_) {\r
_name = name_;\r
_symbol = symbol_;\r
}\r
\r
/**\r
* @dev Returns the name of the token.\r
*/\r
function name() public view virtual override returns (string memory) {\r
return _name;\r
}\r
\r
/**\r
* @dev Returns the symbol of the token, usually a shorter version of the\r
* name.\r
*/\r
function symbol() public view virtual override returns (string memory) {\r
return _symbol;\r
}\r
\r
/**\r
* @dev Returns the number of decimals used to get its user representation.\r
* For example, if `decimals` equals `2`, a balance of `505` tokens should\r
* be displayed to a user as `5.05` (`505 / 10 ** 2`).\r
*\r
* Tokens usually opt for a value of 18, imitating the relationship between\r
* Ether and Wei. This is the value {ERC20} uses, unless this function is\r
* overridden;\r
*\r
* NOTE: This information is only used for _display_ purposes: it in\r
* no way affects any of the arithmetic of the contract, including\r
* {IERC20-balanceOf} and {IERC20-transfer}.\r
*/\r
function decimals() public view virtual override returns (uint8) {\r
return 18;\r
}\r
\r
/**\r
* @dev See {IERC20-totalSupply}.\r
*/\r
function totalSupply() public view virtual override returns (uint256) {\r
return _totalSupply;\r
}\r
\r
/**\r
* @dev See {IERC20-balanceOf}.\r
*/\r
function balanceOf(\r
address account\r
) public view virtual override returns (uint256) {\r
return _balances[account];\r
}\r
\r
/**\r
* @dev See {IERC20-transfer}.\r
*\r
* Requirements:\r
*\r
* - `recipient` cannot be the zero address.\r
* - the caller must have a balance of at least `amount`.\r
*/\r
function transfer(\r
address recipient,\r
uint256 amount\r
) public virtual override returns (bool) {\r
_transfer(_msgSender(), recipient, amount);\r
return true;\r
}\r
\r
/**\r
* @dev See {IERC20-allowance}.\r
*/\r
function allowance(\r
address owner,\r
address spender\r
) public view virtual override returns (uint256) {\r
return _allowances[owner][spender];\r
}\r
\r
/**\r
* @dev See {IERC20-approve}.\r
*\r
* Requirements:\r
*\r
* - `spender` cannot be the zero address.\r
*/\r
function approve(\r
address spender,\r
uint256 amount\r
) public virtual override returns (bool) {\r
_approve(_msgSender(), spender, amount);\r
return true;\r
}\r
\r
/**\r
* @dev See {IERC20-transferFrom}.\r
*\r
* Emits an {Approval} event indicating the updated allowance. This is not\r
* required by the EIP. See the note at the beginning of {ERC20}.\r
*\r
* Requirements:\r
*\r
* - `sender` and `recipient` cannot be the zero address.\r
* - `sender` must have a balance of at least `amount`.\r
* - the caller must have allowance for ``sender``\u0027s tokens of at least\r
* `amount`.\r
*/\r
function transferFrom(\r
address sender,\r
address recipient,\r
uint256 amount\r
) public virtual override returns (bool) {\r
_transfer(sender, recipient, amount);\r
\r
uint256 currentAllowance = _allowances[sender][_msgSender()];\r
require(\r
currentAllowance \u003e= amount,\r
"ERC20: transfer amount exceeds allowance"\r
);\r
unchecked {\r
_approve(sender, _msgSender(), currentAllowance - amount);\r
}\r
\r
return true;\r
}\r
\r
/**\r
* @dev Atomically increases the allowance granted to `spender` by the caller.\r
*\r
* This is an alternative to {approve} that can be used as a mitigation for\r
* problems described in {IERC20-approve}.\r
*\r
* Emits an {Approval} event indicating the updated allowance.\r
*\r
* Requirements:\r
*\r
* - `spender` cannot be the zero address.\r
*/\r
function increaseAllowance(\r
address spender,\r
uint256 addedValue\r
) public virtual returns (bool) {\r
_approve(\r
_msgSender(),\r
spender,\r
_allowances[_msgSender()][spender] + addedValue\r
);\r
return true;\r
}\r
\r
/**\r
* @dev Atomically decreases the allowance granted to `spender` by the caller.\r
*\r
* This is an alternative to {approve} that can be used as a mitigation for\r
* problems described in {IERC20-approve}.\r
*\r
* Emits an {Approval} event indicating the updated allowance.\r
*\r
* Requirements:\r
*\r
* - `spender` cannot be the zero address.\r
* - `spender` must have allowance for the caller of at least\r
* `subtractedValue`.\r
*/\r
function decreaseAllowance(\r
address spender,\r
uint256 subtractedValue\r
) public virtual returns (bool) {\r
uint256 currentAllowance = _allowances[_msgSender()][spender];\r
require(\r
currentAllowance \u003e= subtractedValue,\r
"ERC20: decreased allowance below zero"\r
);\r
unchecked {\r
_approve(_msgSender(), spender, currentAllowance - subtractedValue);\r
}\r
\r
return true;\r
}\r
\r
/**\r
* @dev Moves `amount` of tokens from `sender` to `recipient`.\r
*\r
* This internal function is equivalent to {transfer}, and can be used to\r
* e.g. implement automatic token fees, slashing mechanisms, etc.\r
*\r
* Emits a {Transfer} event.\r
*\r
* Requirements:\r
*\r
* - `sender` cannot be the zero address.\r
* - `recipient` cannot be the zero address.\r
* - `sender` must have a balance of at least `amount`.\r
*/\r
function _transfer(\r
address sender,\r
address recipient,\r
uint256 amount\r
) internal virtual {\r
require(sender != address(0), "ERC20: transfer from the zero address");\r
require(recipient != address(0), "ERC20: transfer to the zero address");\r
\r
_beforeTokenTransfer(sender, recipient, amount);\r
\r
uint256 senderBalance = _balances[sender];\r
require(\r
senderBalance \u003e= amount,\r
"ERC20: transfer amount exceeds balance"\r
);\r
unchecked {\r
_balances[sender] = senderBalance - amount;\r
}\r
_balances[recipient] += amount;\r
\r
emit Transfer(sender, recipient, amount);\r
\r
_afterTokenTransfer(sender, recipient, amount);\r
}\r
\r
/** @dev Creates `amount` tokens and assigns them to `account`, increasing\r
* the total supply.\r
*\r
* Emits a {Transfer} event with `from` set to the zero address.\r
*\r
* Requirements:\r
*\r
* - `account` cannot be the zero address.\r
*/\r
function _mint(address account, uint256 amount) internal virtual {\r
require(account != address(0), "ERC20: mint to the zero address");\r
\r
_beforeTokenTransfer(address(0), account, amount);\r
\r
_totalSupply += amount;\r
_balances[account] += amount;\r
emit Transfer(address(0), account, amount);\r
\r
_afterTokenTransfer(address(0), account, amount);\r
}\r
\r
/**\r
* @dev Destroys `amount` tokens from `account`, reducing the\r
* total supply.\r
*\r
* Emits a {Transfer} event with `to` set to the zero address.\r
*\r
* Requirements:\r
*\r
* - `account` cannot be the zero address.\r
* - `account` must have at least `amount` tokens.\r
*/\r
function _burn(address account, uint256 amount) internal virtual {\r
require(account != address(0), "ERC20: burn from the zero address");\r
\r
_beforeTokenTransfer(account, address(0), amount);\r
\r
uint256 accountBalance = _balances[account];\r
require(accountBalance \u003e= amount, "ERC20: burn amount exceeds balance");\r
unchecked {\r
_balances[account] = accountBalance - amount;\r
}\r
_totalSupply -= amount;\r
\r
emit Transfer(account, address(0), amount);\r
\r
_afterTokenTransfer(account, address(0), amount);\r
}\r
\r
/**\r
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\r
*\r
* This internal function is equivalent to `approve`, and can be used to\r
* e.g. set automatic allowances for certain subsystems, etc.\r
*\r
* Emits an {Approval} event.\r
*\r
* Requirements:\r
*\r
* - `owner` cannot be the zero address.\r
* - `spender` cannot be the zero address.\r
*/\r
function _approve(\r
address owner,\r
address spender,\r
uint256 amount\r
) internal virtual {\r
require(owner != address(0), "ERC20: approve from the zero address");\r
require(spender != address(0), "ERC20: approve to the zero address");\r
\r
_allowances[owner][spender] = amount;\r
emit Approval(owner, spender, amount);\r
}\r
\r
/**\r
* @dev Hook that is called before any transfer of tokens. This includes\r
* minting and burning.\r
*\r
* Calling conditions:\r
*\r
* - when `from` and `to` are both non-zero, `amount` of ``from``\u0027s tokens\r
* will be transferred to `to`.\r
* - when `from` is zero, `amount` tokens will be minted for `to`.\r
* - when `to` is zero, `amount` of ``from``\u0027s tokens will be burned.\r
* - `from` and `to` are never both zero.\r
*\r
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\r
*/\r
function _beforeTokenTransfer(\r
address from,\r
address to,\r
uint256 amount\r
) internal virtual {}\r
\r
/**\r
* @dev Hook that is called after any transfer of tokens. This includes\r
* minting and burning.\r
*\r
* Calling conditions:\r
*\r
* - when `from` and `to` are both non-zero, `amount` of ``from``\u0027s tokens\r
* has been transferred to `to`.\r
* - when `from` is zero, `amount` tokens have been minted for `to`.\r
* - when `to` is zero, `amount` of ``from``\u0027s tokens have been burned.\r
* - `from` and `to` are never both zero.\r
*\r
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\r
*/\r
function _afterTokenTransfer(\r
address from,\r
address to,\r
uint256 amount\r
) internal virtual {}\r
}\r
\r
interface IUniswapV2Factory {\r
event PairCreated(address indexed token0, address indexed token1, address pair, uint);\r
\r
function feeTo() external view returns (address);\r
function feeToSetter() external view returns (address);\r
\r
function getPair(address tokenA, address tokenB) external view returns (address pair);\r
function allPairs(uint) external view returns (address pair);\r
function allPairsLength() external view returns (uint);\r
\r
function createPair(address tokenA, address tokenB) external returns (address pair);\r
\r
function setFeeTo(address) external;\r
function setFeeToSetter(address) external;\r
}\r
"},"IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\r
// File @openzeppelin/contracts/token/ERC20/IERC20.sol@v4.4.0\r
\r
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)\r
\r
pragma solidity ^0.8.0;\r
\r
/**\r
* @dev Interface of the ERC20 standard as defined in the EIP.\r
*/\r
interface IERC20 {\r
/**\r
* @dev Returns the amount of tokens in existence.\r
*/\r
function totalSupply() external view returns (uint256);\r
\r
/**\r
* @dev Returns the amount of tokens owned by `account`.\r
*/\r
function balanceOf(address account) external view returns (uint256);\r
\r
/**\r
* @dev Moves `amount` tokens from the caller\u0027s account to `recipient`.\r
*\r
* Returns a boolean value indicating whether the operation succeeded.\r
*\r
* Emits a {Transfer} event.\r
*/\r
function transfer(\r
address recipient,\r
uint256 amount\r
) external returns (bool);\r
\r
/**\r
* @dev Returns the remaining number of tokens that `spender` will be\r
* allowed to spend on behalf of `owner` through {transferFrom}. This is\r
* zero by default.\r
*\r
* This value changes when {approve} or {transferFrom} are called.\r
*/\r
function allowance(\r
address owner,\r
address spender\r
) external view returns (uint256);\r
\r
/**\r
* @dev Sets `amount` as the allowance of `spender` over the caller\u0027s tokens.\r
*\r
* Returns a boolean value indicating whether the operation succeeded.\r
*\r
* IMPORTANT: Beware that changing an allowance with this method brings the risk\r
* that someone may use both the old and the new allowance by unfortunate\r
* transaction ordering. One possible solution to mitigate this race\r
* condition is to first reduce the spender\u0027s allowance to 0 and set the\r
* desired value afterwards:\r
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\r
*\r
* Emits an {Approval} event.\r
*/\r
function approve(address spender, uint256 amount) external returns (bool);\r
\r
/**\r
* @dev Moves `amount` tokens from `sender` to `recipient` using the\r
* allowance mechanism. `amount` is then deducted from the caller
Submitted on: 2025-09-25 11:43:32
Comments
Log in to comment.
No comments yet.