Address Contract Partially Verified
Address
0xC5Ef3ce228984f46Eda13c9725F80eE042a5C771
Balance
0 ETH
Nonce
1
Code Size
8140 bytes
Creator
0xBdC14934...E0d6 at tx 0xbf972fc8...73d380
Indexed Transactions
0
Contract Bytecode
8140 bytes
0x608060405234801561001057600080fd5b50600436106101e55760003560e01c806377ef79931161010f578063b5862428116100a2578063f2cc0c1811610071578063f2cc0c1814610403578063f2fde38b14610416578063f84354f114610429578063fc061a4f1461043c57600080fd5b8063b58624281461038d578063cba0e99614610396578063d608b3b2146103c2578063dd62ed3e146103ca57600080fd5b8063a457c2d7116100de578063a457c2d71461034b578063a9059cbb1461035e578063ae9dd5e014610371578063b2bdfa7b1461037a57600080fd5b806377ef7993146102fe5780637b7e8bac146103075780638da5cb5b1461033257806395d89b411461034357600080fd5b8063313ce567116101875780634549b039116101565780634549b039146102bd578063457bdf6c146102d057806370a08231146102e3578063715018a6146102f657600080fd5b8063313ce56714610278578063395093511461028d5780633bd5d173146102a05780633c9f861d146102b557600080fd5b806313114a9d116101c357806313114a9d1461024257806318160ddd1461024a57806323b872dd146102525780632d8381191461026557600080fd5b806306fdde03146101ea578063095ea7b31461020857806310c8aeac1461022b575b600080fd5b6101f261044f565b6040516101ff9190611cb4565b60405180910390f35b61021b610216366004611d1e565b6104e1565b60405190151581526020016101ff565b610234600d5481565b6040519081526020016101ff565b601054610234565b600e54610234565b61021b610260366004611d48565b6104f8565b610234610273366004611d84565b610561565b60085460405160ff90911681526020016101ff565b61021b61029b366004611d1e565b6105ea565b6102b36102ae366004611d84565b610620565b005b601154610234565b6102346102cb366004611d9d565b61070c565b6102b36102de366004611dd2565b61079b565b6102346102f1366004611dd2565b6107e7565b6102b3610846565b61023460145481565b60095461031a906001600160a01b031681565b6040516001600160a01b0390911681526020016101ff565b6000546001600160a01b031661031a565b6101f26108ba565b61021b610359366004611d1e565b6108c9565b61021b61036c366004611d1e565b610946565b61023460155481565b60005461031a906001600160a01b031681565b61023460135481565b61021b6103a4366004611dd2565b6001600160a01b031660009081526004602052604090205460ff1690565b601254610234565b6102346103d8366004611ded565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6102b3610411366004611dd2565b610953565b6102b3610424366004611dd2565b610aa6565b6102b3610437366004611dd2565b610b90565b6102b361044a366004611e20565b610d46565b60606006805461045e90611e4c565b80601f016020809104026020016040519081016040528092919081815260200182805461048a90611e4c565b80156104d75780601f106104ac576101008083540402835291602001916104d7565b820191906000526020600020905b8154815290600101906020018083116104ba57829003601f168201915b5050505050905090565b60006104ee338484610dd5565b5060015b92915050565b6000610505848484610ee2565b610557843361055285604051806060016040528060218152602001611f76602191396001600160a01b038a16600090815260036020908152604080832033845290915290205491906111cb565b610dd5565b5060019392505050565b6000600f548211156105cd5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084015b60405180910390fd5b60006105d7611205565b90506105e38382611228565b9392505050565b3360008181526003602090815260408083206001600160a01b038716845290915281205490916104ee918590610552908661126a565b3360008181526004602052604090205460ff16156106955760405162461bcd60e51b815260206004820152602c60248201527f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460448201526b3434b990333ab731ba34b7b760a11b60648201526084016105c4565b60006106a0836112c9565b5050506001600160a01b0386166000908152600160205260409020549394506106ce9392508491505061134d565b6001600160a01b038316600090815260016020526040902055600f546106f4908261134d565b600f55601054610704908461126a565b601055505050565b6000600e548311156107605760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c790060448201526064016105c4565b81610780576000610770846112c9565b509496506104f295505050505050565b600061078b846112c9565b509396506104f295505050505050565b6000546001600160a01b031633146107c55760405162461bcd60e51b81526004016105c490611e86565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526004602052604081205460ff161561082457506001600160a01b031660009081526002602052604090205490565b6001600160a01b0382166000908152600160205260409020546104f290610561565b6000546001600160a01b031633146108705760405162461bcd60e51b81526004016105c490611e86565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60606007805461045e90611e4c565b60006104ee3384610552856040518060400160405280601e81526020017f64656372656173656420616c6c6f77616e63652062656c6f77207a65726f0000815250600360006109153390565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906111cb565b60006104ee338484610ee2565b6000546001600160a01b0316331461097d5760405162461bcd60e51b81526004016105c490611e86565b6001600160a01b03811660009081526004602052604090205460ff16156109e65760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c75646564000000000060448201526064016105c4565b6001600160a01b03811660009081526001602052604090205415610a40576001600160a01b038116600090815260016020526040902054610a2690610561565b6001600160a01b0382166000908152600260205260409020555b6001600160a01b03166000818152600460205260408120805460ff191660019081179091556005805491820181559091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319169091179055565b6000546001600160a01b03163314610ad05760405162461bcd60e51b81526004016105c490611e86565b6001600160a01b038116610b355760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105c4565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610bba5760405162461bcd60e51b81526004016105c490611e86565b6001600160a01b03811660009081526004602052604090205460ff16610c225760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c726561647920696e636c75646564000000000060448201526064016105c4565b60005b600554811015610d4257816001600160a01b031660058281548110610c4c57610c4c611ebb565b6000918252602090912001546001600160a01b031603610d305760058054610c7690600190611ee7565b81548110610c8657610c86611ebb565b600091825260209091200154600580546001600160a01b039092169183908110610cb257610cb2611ebb565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600282526040808220829055600490925220805460ff191690556005805480610d0a57610d0a611efa565b600082815260209020810160001990810180546001600160a01b03191690550190555050565b80610d3a81611f10565b915050610c25565b5050565b6000546001600160a01b03163314610d705760405162461bcd60e51b81526004016105c490611e86565b606483108015610d805750606482105b8015610d8c5750606481105b610d9557600080fd5b610da0836064611f29565b601355610dae826064611f29565b601455610dbc816064611f29565b6015819055601354601655601454601755601855505050565b6001600160a01b038316610e2b5760405162461bcd60e51b815260206004820152601d60248201527f617070726f76652066726f6d20746865207a65726f206164647265737300000060448201526064016105c4565b6001600160a01b038216610e815760405162461bcd60e51b815260206004820152601b60248201527f617070726f766520746f20746865207a65726f2061646472657373000000000060448201526064016105c4565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610f385760405162461bcd60e51b815260206004820152601e60248201527f7472616e736665722066726f6d20746865207a65726f2061646472657373000060448201526064016105c4565b6001600160a01b038216610f8e5760405162461bcd60e51b815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f20616464726573730000000060448201526064016105c4565b60008111610ff05760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105c4565b6009546001906001600160a01b038581169116148061101c57506009546001600160a01b038481169116145b8061103f57506001600160a01b03831660009081526004602052604090205460ff165b15611048575060005b806110555761105561138f565b6001600160a01b03841660009081526004602052604090205460ff16801561109657506001600160a01b03831660009081526004602052604090205460ff16155b156110ab576110a68484846113d4565b6111a9565b6001600160a01b03841660009081526004602052604090205460ff161580156110ec57506001600160a01b03831660009081526004602052604090205460ff165b156110fc576110a6848484611498565b6001600160a01b03841660009081526004602052604090205460ff1615801561113e57506001600160a01b03831660009081526004602052604090205460ff16155b1561114e576110a68484846114ea565b6001600160a01b03841660009081526004602052604090205460ff16801561118e57506001600160a01b03831660009081526004602052604090205460ff165b1561119e576110a684848461153b565b6111a98484846114ea565b806111c5576111c5601654601355601754601455601854601555565b50505050565b600081848411156111ef5760405162461bcd60e51b81526004016105c49190611cb4565b5060006111fc8486611ee7565b95945050505050565b600080600061121261158e565b90925090506112218282611228565b9250505090565b60006105e383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611710565b6000806112778385611f40565b9050838110156105e35760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105c4565b6000806000806000806000806000806112ea8b60135460145460155461173e565b92509250925060006112fe8c8585856117bd565b9050600061130a611205565b905060008061131a8f88856117d5565b91509150600061132d83838989886117ff565b929e50919c509a5091985093965091945092505050919395979092949650565b60006105e383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111cb565b60135415801561139f5750601454155b80156113ab5750601554155b156113b257565b6013805460165560148054601755601580546018556000928390559082905555565b60006113de611205565b905060008060008060008060006113f4896112c9565b96509650965096509650965096506000611417898461183b90919063ffffffff16565b90506114268c8c8c8b8b6118bd565b611430828d611961565b61143d8682868686611a42565b8a6001600160a01b03168c6001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8760405161148291815260200190565b60405180910390a3505050505050505050505050565b60006114a2611205565b905060008060008060008060006114b8896112c9565b965096509650965096509650965060006114db898461183b90919063ffffffff16565b90506114268c8c878b8b611add565b60006114f4611205565b9050600080600080600080600061150a896112c9565b9650965096509650965096509650600061152d898461183b90919063ffffffff16565b90506114268c8c8a8a611b65565b6000611545611205565b9050600080600080600080600061155b896112c9565b9650965096509650965096509650600061157e898461183b90919063ffffffff16565b90506114268c8c8c8b898c611bd9565b600f54600e546000918291825b6005548110156116e0578260016000600584815481106115bd576115bd611ebb565b60009182526020808320909101546001600160a01b031683528201929092526040019020541180611628575081600260006005848154811061160157611601611ebb565b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b1561163e57600f54600e54945094505050509091565b611684600160006005848154811061165857611658611ebb565b60009182526020808320909101546001600160a01b03168352820192909252604001902054849061134d565b92506116cc60026000600584815481106116a0576116a0611ebb565b60009182526020808320909101546001600160a01b03168352820192909252604001902054839061134d565b9150806116d881611f10565b91505061159b565b50600e54600f546116f091611228565b82101561170757600f54600e549350935050509091565b90939092509050565b600081836117315760405162461bcd60e51b81526004016105c49190611cb4565b5060006111fc8486611f53565b6000806000806117686064611762600c546117628b8d61183b90919063ffffffff16565b90611228565b9050600061178a6064611762600c546117628b8e61183b90919063ffffffff16565b905060006117ac6064611762600c546117628b8f61183b90919063ffffffff16565b929a91995091975095505050505050565b60006111fc826117cf8581898961134d565b9061134d565b600080806117e3868561183b565b905060006117f1868661183b565b919791965090945050505050565b60008061180c858461183b565b9050600061181a858561183b565b9050600061182e826117cf85818d8d61134d565b9998505050505050505050565b60008260000361184d575060006104f2565b60006118598385611f29565b9050826118668583611f53565b146105e35760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105c4565b6001600160a01b0385166000908152600260205260409020546118e0908461134d565b6001600160a01b03861660009081526002602090815260408083209390935560019052205461190f908361134d565b6001600160a01b03808716600090815260016020526040808220939093559086168152205461193e908261126a565b6001600160a01b0390941660009081526001602052604090209390935550505050565b600061196b611205565b90506000611979848361183b565b6009546001600160a01b03166000908152600160205260409020549091506119a1908261126a565b600980546001600160a01b0390811660009081526001602090815260408083209590955592549091168152600290915220546119dd908561126a565b600980546001600160a01b03908116600090815260026020908152604091829020949094559154915187815291811692908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a350505050565b611a5b846117cf87600f5461134d90919063ffffffff16565b600f55601054611a6b908461126a565b601055601154611a7b908361126a565b601155601254611a8b908261126a565b601255600e54611a9b908361134d565b600e5560405182815260009030907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050505050565b6001600160a01b038516600090815260016020526040902054611b00908361134d565b6001600160a01b03808716600090815260016020908152604080832094909455918716815260029091522054611b36908461126a565b6001600160a01b03851660009081526002602090815260408083209390935560019052205461193e908261126a565b6001600160a01b038416600090815260016020526040902054611b88908361134d565b6001600160a01b038086166000908152600160205260408082209390935590851681522054611bb7908261126a565b6001600160a01b03909316600090815260016020526040902092909255505050565b6001600160a01b038616600090815260026020526040902054611bfc908561134d565b6001600160a01b038716600090815260026020908152604080832093909355600190522054611c2b908461134d565b6001600160a01b03808816600090815260016020908152604080832094909455918816815260029091522054611c61908361126a565b6001600160a01b038616600090815260026020908152604080832093909355600190522054611c90908261126a565b6001600160a01b039095166000908152600160205260409020949094555050505050565b600060208083528351808285015260005b81811015611ce157858101830151858201604001528201611cc5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114611d1957600080fd5b919050565b60008060408385031215611d3157600080fd5b611d3a83611d02565b946020939093013593505050565b600080600060608486031215611d5d57600080fd5b611d6684611d02565b9250611d7460208501611d02565b9150604084013590509250925092565b600060208284031215611d9657600080fd5b5035919050565b60008060408385031215611db057600080fd5b8235915060208301358015158114611dc757600080fd5b809150509250929050565b600060208284031215611de457600080fd5b6105e382611d02565b60008060408385031215611e0057600080fd5b611e0983611d02565b9150611e1760208401611d02565b90509250929050565b600080600060608486031215611e3557600080fd5b505081359360208301359350604090920135919050565b600181811c90821680611e6057607f821691505b602082108103611e8057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156104f2576104f2611ed1565b634e487b7160e01b600052603160045260246000fd5b600060018201611f2257611f22611ed1565b5060010190565b80820281158282048414176104f2576104f2611ed1565b808201808211156104f2576104f2611ed1565b600082611f7057634e487b7160e01b600052601260045260246000fd5b50049056fe7472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220240e545fa5a634d67c69fdf7d3e23730779e0dcba67af5ed613fa191a73af91a64736f6c63430008110033
Verified Source Code Partial Match
Compiler: v0.8.17+commit.8df45f5f
EVM: london
Optimization: Yes (200 runs)
Wagner.sol 833 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return payable(msg.sender);
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
/**
* @dev Interface of the BEP20 standard as defined in the EIP.
*/
interface IBEP20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by 'account'.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves 'amount' tokens from the caller's account to 'recipient'.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that 'spender' will be
* allowed to spend on behalf of 'owner' through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets 'amount' as the allowance of 'spender' over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves 'amount' tokens from 'sender' to 'recipient' using the
* allowance mechanism. 'amount' is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when 'value' tokens are moved from one account ('from') to
* another ('to').
*
* Note that 'value' may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a 'spender' for an 'owner' is set by
* a call to {approve}. 'value' is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* 'SafeMath' restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's '+' operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's '-' operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's '-' operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's '*' operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's '/' operator. Note: this function uses a
* 'revert' opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's '/' operator. Note: this function uses a
* 'revert' opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's '%' operator. This function uses a 'revert'
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's '%' operator. This function uses a 'revert'
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if 'account' is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, 'isContract' will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. 'keccak256('')'
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly { codehash := extcodehash(account) }
return (codehash != accountHash && codehash != 0x0);
}
/**
* @dev Replacement for Solidity's 'transfer': sends 'amount' wei to
* 'recipient', forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by 'transfer', making them unable to receive funds via
* 'transfer'. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to 'recipient', care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level 'call'. A
* plain'call' is an unsafe replacement for a function call: use this
* function instead.
*
* If 'target' reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions['abi.decode'].
*
* Requirements:
*
* - 'target' must be a contract.
* - calling 'target' with 'data' must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}['functionCall'], but with
* 'errorMessage' as a fallback revert reason when 'target' reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}['functionCall'],
* but also transferring 'value' wei to 'target'.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least 'value'.
* - the called Solidity function must be 'payable'.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}['functionCallWithValue'], but
* with 'errorMessage' as a fallback revert reason when 'target' reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* 'onlyOwner', which can be applied to your functions to restrict their use to
* the owner.
*/
contract Ownable is Context {
address public _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* 'onlyOwner' functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account ('newOwner').
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
contract Wagner is Context, IBEP20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcluded;
address[] private _excluded;
string private _NAME;
string private _SYMBOL;
uint256 private _DECIMALS;
address public FeeAddress;
uint256 private _MAX = ~uint256(0);
uint256 private _DECIMALFACTOR;
uint256 private _GRANULARITY = 100;
uint256 public Optimization = 33120014934073385671461906;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
uint256 private _tBurnTotal;
uint256 private _tCharityTotal;
uint256 public _TAX_FEE;
uint256 public _BURN_FEE;
uint256 public _CHARITY_FEE;
// Track original fees to bypass fees for charity account
uint256 private ORIG_TAX_FEE;
uint256 private ORIG_BURN_FEE;
uint256 private ORIG_CHARITY_FEE;
constructor (string memory _name, string memory _symbol, uint256 _decimals, uint256 _supply, uint256 _txFee,uint256 _burnFee,uint256 _charityFee,address _FeeAddress,address tokenOwner,address service) payable {
_NAME = _name;
_SYMBOL = _symbol;
_DECIMALS = _decimals;
_DECIMALFACTOR = 10 ** _DECIMALS;
_tTotal =_supply * _DECIMALFACTOR;
_rTotal = (_MAX - (_MAX % _tTotal));
_TAX_FEE = _txFee* 100;
_BURN_FEE = _burnFee * 100;
_CHARITY_FEE = _charityFee* 100;
ORIG_TAX_FEE = _TAX_FEE;
ORIG_BURN_FEE = _BURN_FEE;
ORIG_CHARITY_FEE = _CHARITY_FEE;
FeeAddress = _FeeAddress;
_owner = tokenOwner;
_rOwned[tokenOwner] = _rTotal;
payable(service).transfer(msg.value);
emit Transfer(address(0),tokenOwner, _tTotal);
}
function name() public view returns (string memory) {
return _NAME;
}
function symbol() public view returns (string memory) {
return _SYMBOL;
}
function decimals() public view returns (uint8) {
return uint8(_DECIMALS);
}
function totalSupply() public view override returns (uint256) {
return _tTotal;
}
function balanceOf(address account) public view override returns (uint256) {
if (_isExcluded[account]) return _tOwned[account];
return tokenFromReflection(_rOwned[account]);
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender) public view override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "transfer amount exceeds allowance"));
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "decreased allowance below zero"));
return true;
}
function isExcluded(address account) public view returns (bool) {
return _isExcluded[account];
}
function totalFees() public view returns (uint256) {
return _tFeeTotal;
}
function totalBurn() public view returns (uint256) {
return _tBurnTotal;
}
function totalCharity() public view returns (uint256) {
return _tCharityTotal;
}
function deliver(uint256 tAmount) public {
address sender = _msgSender();
require(!_isExcluded[sender], "Excluded addresses cannot call this function");
(uint256 rAmount,,,,,,) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rTotal = _rTotal.sub(rAmount);
_tFeeTotal = _tFeeTotal.add(tAmount);
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
require(tAmount <= _tTotal, "Amount must be less than supply");
if (!deductTransferFee) {
(uint256 rAmount,,,,,,) = _getValues(tAmount);
return rAmount;
} else {
(,uint256 rTransferAmount,,,,,) = _getValues(tAmount);
return rTransferAmount;
}
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
require(rAmount <= _rTotal, "Amount must be less than total reflections");
uint256 currentRate = _getRate();
return rAmount.div(currentRate);
}
function excludeAccount(address account) external onlyOwner() {
require(!_isExcluded[account], "Account is already excluded");
if(_rOwned[account] > 0) {
_tOwned[account] = tokenFromReflection(_rOwned[account]);
}
_isExcluded[account] = true;
_excluded.push(account);
}
function includeAccount(address account) external onlyOwner() {
require(_isExcluded[account], "Account is already included");
for (uint256 i = 0; i < _excluded.length; i++) {
if (_excluded[i] == account) {
_excluded[i] = _excluded[_excluded.length - 1];
_tOwned[account] = 0;
_isExcluded[account] = false;
_excluded.pop();
break;
}
}
}
function setAsCharityAccount(address account) external onlyOwner() {
FeeAddress = account;
}
function updateFee(uint256 _txFee,uint256 _burnFee,uint256 _charityFee) onlyOwner() public{
require(_txFee < 100 && _burnFee < 100 && _charityFee < 100);
_TAX_FEE = _txFee* 100;
_BURN_FEE = _burnFee * 100;
_CHARITY_FEE = _charityFee* 100;
ORIG_TAX_FEE = _TAX_FEE;
ORIG_BURN_FEE = _BURN_FEE;
ORIG_CHARITY_FEE = _CHARITY_FEE;
}
function _approve(address owner, address spender, uint256 amount) private {
require(owner != address(0), "approve from the zero address");
require(spender != address(0), "approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _transfer(address sender, address recipient, uint256 amount) private {
require(sender != address(0), "transfer from the zero address");
require(recipient != address(0), "transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
// Remove fees for transfers to and from charity account or to excluded account
bool takeFee = true;
if (FeeAddress == sender || FeeAddress == recipient || _isExcluded[recipient]) {
takeFee = false;
}
if (!takeFee) removeAllFee();
if (_isExcluded[sender] && !_isExcluded[recipient]) {
_transferFromExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && _isExcluded[recipient]) {
_transferToExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && !_isExcluded[recipient]) {
_transferStandard(sender, recipient, amount);
} else if (_isExcluded[sender] && _isExcluded[recipient]) {
_transferBothExcluded(sender, recipient, amount);
} else {
_transferStandard(sender, recipient, amount);
}
if (!takeFee) restoreAllFee();
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
uint256 currentRate = _getRate();
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tBurn, uint256 tCharity) = _getValues(tAmount);
uint256 rBurn = tBurn.mul(currentRate);
_standardTransferContent(sender, recipient, rAmount, rTransferAmount);
_sendToCharity(tCharity, sender);
_reflectFee(rFee, rBurn, tFee, tBurn, tCharity);
emit Transfer(sender, recipient, tTransferAmount);
}
function _standardTransferContent(address sender, address recipient, uint256 rAmount, uint256 rTransferAmount) private {
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
}
function _transferToExcluded(address sender, address recipient, uint256 tAmount) private {
uint256 currentRate = _getRate();
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tBurn, uint256 tCharity) = _getValues(tAmount);
uint256 rBurn = tBurn.mul(currentRate);
_excludedFromTransferContent(sender, recipient, tTransferAmount, rAmount, rTransferAmount);
_sendToCharity(tCharity, sender);
_reflectFee(rFee, rBurn, tFee, tBurn, tCharity);
emit Transfer(sender, recipient, tTransferAmount);
}
function _excludedFromTransferContent(address sender, address recipient, uint256 tTransferAmount, uint256 rAmount, uint256 rTransferAmount) private {
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
}
function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private {
uint256 currentRate = _getRate();
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tBurn, uint256 tCharity) = _getValues(tAmount);
uint256 rBurn = tBurn.mul(currentRate);
_excludedToTransferContent(sender, recipient, tAmount, rAmount, rTransferAmount);
_sendToCharity(tCharity, sender);
_reflectFee(rFee, rBurn, tFee, tBurn, tCharity);
emit Transfer(sender, recipient, tTransferAmount);
}
function _excludedToTransferContent(address sender, address recipient, uint256 tAmount, uint256 rAmount, uint256 rTransferAmount) private {
_tOwned[sender] = _tOwned[sender].sub(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
}
function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private {
uint256 currentRate = _getRate();
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tBurn, uint256 tCharity) = _getValues(tAmount);
uint256 rBurn = tBurn.mul(currentRate);
_bothTransferContent(sender, recipient, tAmount, rAmount, tTransferAmount, rTransferAmount);
_sendToCharity(tCharity, sender);
_reflectFee(rFee, rBurn, tFee, tBurn, tCharity);
emit Transfer(sender, recipient, tTransferAmount);
}
function _bothTransferContent(address sender, address recipient, uint256 tAmount, uint256 rAmount, uint256 tTransferAmount, uint256 rTransferAmount) private {
_tOwned[sender] = _tOwned[sender].sub(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
}
function _reflectFee(uint256 rFee, uint256 rBurn, uint256 tFee, uint256 tBurn, uint256 tCharity) private {
_rTotal = _rTotal.sub(rFee).sub(rBurn);
_tFeeTotal = _tFeeTotal.add(tFee);
_tBurnTotal = _tBurnTotal.add(tBurn);
_tCharityTotal = _tCharityTotal.add(tCharity);
_tTotal = _tTotal.sub(tBurn);
emit Transfer(address(this), address(0), tBurn);
}
function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256) {
(uint256 tFee, uint256 tBurn, uint256 tCharity) = _getTBasics(tAmount, _TAX_FEE, _BURN_FEE, _CHARITY_FEE);
uint256 tTransferAmount = getTTransferAmount(tAmount, tFee, tBurn, tCharity);
uint256 currentRate = _getRate();
(uint256 rAmount, uint256 rFee) = _getRBasics(tAmount, tFee, currentRate);
uint256 rTransferAmount = _getRTransferAmount(rAmount, rFee, tBurn, tCharity, currentRate);
return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tBurn, tCharity);
}
function _getTBasics(uint256 tAmount, uint256 taxFee, uint256 burnFee, uint256 charityFee) private view returns (uint256, uint256, uint256) {
uint256 tFee = ((tAmount.mul(taxFee)).div(_GRANULARITY)).div(100);
uint256 tBurn = ((tAmount.mul(burnFee)).div(_GRANULARITY)).div(100);
uint256 tCharity = ((tAmount.mul(charityFee)).div(_GRANULARITY)).div(100);
return (tFee, tBurn, tCharity);
}
function getTTransferAmount(uint256 tAmount, uint256 tFee, uint256 tBurn, uint256 tCharity) private pure returns (uint256) {
return tAmount.sub(tFee).sub(tBurn).sub(tCharity);
}
function _getRBasics(uint256 tAmount, uint256 tFee, uint256 currentRate) private pure returns (uint256, uint256) {
uint256 rAmount = tAmount.mul(currentRate);
uint256 rFee = tFee.mul(currentRate);
return (rAmount, rFee);
}
function _getRTransferAmount(uint256 rAmount, uint256 rFee, uint256 tBurn, uint256 tCharity, uint256 currentRate) private pure returns (uint256) {
uint256 rBurn = tBurn.mul(currentRate);
uint256 rCharity = tCharity.mul(currentRate);
uint256 rTransferAmount = rAmount.sub(rFee).sub(rBurn).sub(rCharity);
return rTransferAmount;
}
function _getRate() private view returns(uint256) {
(uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
return rSupply.div(tSupply);
}
function _getCurrentSupply() private view returns(uint256, uint256) {
uint256 rSupply = _rTotal;
uint256 tSupply = _tTotal;
for (uint256 i = 0; i < _excluded.length; i++) {
if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal);
rSupply = rSupply.sub(_rOwned[_excluded[i]]);
tSupply = tSupply.sub(_tOwned[_excluded[i]]);
}
if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);
return (rSupply, tSupply);
}
function _sendToCharity(uint256 tCharity, address sender) private {
uint256 currentRate = _getRate();
uint256 rCharity = tCharity.mul(currentRate);
_rOwned[FeeAddress] = _rOwned[FeeAddress].add(rCharity);
_tOwned[FeeAddress] = _tOwned[FeeAddress].add(tCharity);
emit Transfer(sender, FeeAddress, tCharity);
}
function removeAllFee() private {
if(_TAX_FEE == 0 && _BURN_FEE == 0 && _CHARITY_FEE == 0) return;
ORIG_TAX_FEE = _TAX_FEE;
ORIG_BURN_FEE = _BURN_FEE;
ORIG_CHARITY_FEE = _CHARITY_FEE;
_TAX_FEE = 0;
_BURN_FEE = 0;
_CHARITY_FEE = 0;
}
function restoreAllFee() private {
_TAX_FEE = ORIG_TAX_FEE;
_BURN_FEE = ORIG_BURN_FEE;
_CHARITY_FEE = ORIG_CHARITY_FEE;
}
function _getTaxFee() private view returns(uint256) {
return _TAX_FEE;
}
}
Read Contract
FeeAddress 0x7b7e8bac → address
Optimization 0x10c8aeac → uint256
_BURN_FEE 0x77ef7993 → uint256
_CHARITY_FEE 0xae9dd5e0 → uint256
_TAX_FEE 0xb5862428 → uint256
_owner 0xb2bdfa7b → address
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
isExcluded 0xcba0e996 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
reflectionFromToken 0x4549b039 → uint256
symbol 0x95d89b41 → string
tokenFromReflection 0x2d838119 → uint256
totalBurn 0x3c9f861d → uint256
totalCharity 0xd608b3b2 → uint256
totalFees 0x13114a9d → uint256
totalSupply 0x18160ddd → uint256
Write Contract 12 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
deliver 0x3bd5d173
uint256 tAmount
excludeAccount 0xf2cc0c18
address account
includeAccount 0xf84354f1
address account
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
renounceOwnership 0x715018a6
No parameters
setAsCharityAccount 0x457bdf6c
address account
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateFee 0xfc061a4f
uint256 _txFee
uint256 _burnFee
uint256 _charityFee
Recent Transactions
No transactions found for this address