Contract Overview
My Name Tag:
Not Available, login to update
Txn Hash | Method |
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0xfbb932660dfd90901f3fe2e967a6d8a345ae7fb4fccf63491503568b99fbbca9 | Set Allow Ignore... | 1541801 | 180 days 3 hrs ago | 0xe395605bd95b3a641b9d1266cdb256176419161a | IN | 0x5138a161c1f9bc8e1b113431a08d3d0b9ed7993d | 0 CLV | 0.0023662275 | |
0x8ca94a83d71ea5d0bb9cab1f8a89007ceaf4d6e5df3fa7804316ee136f36809c | 0x60a06040 | 1529725 | 181 days 23 hrs ago | 0xe395605bd95b3a641b9d1266cdb256176419161a | IN | Create: FeeKafraV2 | 0 CLV | 0.090358275 |
[ Download CSV Export ]
Contract Name:
FeeKafraV2
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./interfaces/IFeeKafraV2.sol"; contract FeeKafraV2 is Ownable, IFeeKafraV2 { using SafeERC20 for IERC20; uint256 public constant override MAX_FEE = 10000; uint256 public constant MAX_WITHDRAW_FEE = 1000; // 10% uint256 public override treasuryFeeWithdraw = 5000; // 50% of total fee uint256 public override kswFeeWithdraw = 5000; // 50% of total fee uint256 public withdrawFeeSum = 10000; uint256 public override withdrawFee = 20; // 0.2 % uint256 public holdingKSWWithdrawFee = 10; // 0.1 % uint256 public holdingKSWGodWithdrawFee = 5; // 0.05 % uint256 public holdingKSW = 1500 ether; uint256 public holdingKSWGod = 10000 ether; address public immutable ksw; address public kswFeeRecipient; address public treasuryFeeRecipient; mapping(address => bool) public allowIgnoreFeeCaller; uint256 private ignoreFeeBlock; event SetWithdrawFee(uint256 fee); event SetTreasuryFeeWithdraw(uint256 fee); event SetKSWFeeWithdraw(uint256 fee); event SetKSWFeeRecipient(address to); event SetTreasuryFeeRecipient(address to); event SetHoldingKSW(uint256 amount); event SetHoldingKSWWithdrawFee(uint256 fee); event SetHoldingKSWGod(uint256 amount); event SetHoldingKSWGodWithdrawFee(uint256 fee); event SetAllowIgnoreFeeCaller(address addr, bool allow); constructor( address _ksw, address _kswFeeRecipient, address _treasuryFeeRecipient ) { ksw = _ksw; kswFeeRecipient = _kswFeeRecipient; treasuryFeeRecipient = _treasuryFeeRecipient; } function userBalance(address _user) public view returns (uint256) { uint256 bal = IERC20(ksw).balanceOf(_user); return bal; } function isHoldingKSW(address _user) public view returns (bool) { if (holdingKSW == 0) { return false; } uint256 bal = userBalance(_user); return bal >= holdingKSW; } function isGod(address _user) public view returns (bool) { if (holdingKSWGod == 0) { return false; } uint256 bal = userBalance(_user); return bal >= holdingKSWGod; } function setHoldingKSW(uint256 _amount) external onlyOwner { holdingKSW = _amount; emit SetHoldingKSW(_amount); } function setHoldingKSWGod(uint256 _amount) external onlyOwner { holdingKSWGod = _amount; emit SetHoldingKSWGod(_amount); } function userWithdrawFee(address _user) public view override returns (uint256) { if (isGod(_user)) { return holdingKSWGodWithdrawFee; } if (isHoldingKSW(_user)) { return holdingKSWWithdrawFee; } return withdrawFee; } function calculateWithdrawFee(uint256 _wantAmount, address _user) external view override returns (uint256) { if (ignoreFeeBlock == block.number) { return 0; } return (_wantAmount * userWithdrawFee(_user)) / MAX_FEE; } function setWithdrawFee(uint256 _fee) external onlyOwner { require(_fee <= MAX_WITHDRAW_FEE, "!cap"); withdrawFee = _fee; emit SetWithdrawFee(_fee); } function setHoldingKSWWithdrawFee(uint256 _fee) external onlyOwner { require(_fee <= MAX_WITHDRAW_FEE, "!cap"); holdingKSWWithdrawFee = _fee; emit SetHoldingKSWWithdrawFee(_fee); } function setHoldingKSWGodWithdrawFee(uint256 _fee) external onlyOwner { require(_fee <= MAX_WITHDRAW_FEE, "!cap"); holdingKSWGodWithdrawFee = _fee; emit SetHoldingKSWGodWithdrawFee(_fee); } function setTreasuryFeeWithdraw(uint256 _fee) external onlyOwner { treasuryFeeWithdraw = _fee; withdrawFeeSum = treasuryFeeWithdraw + kswFeeWithdraw; emit SetTreasuryFeeWithdraw(_fee); } function setKSWFeeWithdraw(uint256 _fee) external onlyOwner { kswFeeWithdraw = _fee; withdrawFeeSum = treasuryFeeWithdraw + kswFeeWithdraw; emit SetKSWFeeWithdraw(_fee); } function setKSWFeeRecipient(address _to) external onlyOwner { kswFeeRecipient = _to; emit SetKSWFeeRecipient(_to); } function setTreasuryFeeRecipient(address _to) external onlyOwner { treasuryFeeRecipient = _to; emit SetTreasuryFeeRecipient(_to); } function setAllowIgnoreFeeCaller(address _to, bool _allow) external onlyOwner { allowIgnoreFeeCaller[_to] = _allow; emit SetAllowIgnoreFeeCaller(_to, _allow); } // caller to ignoreFee *MUST* call ignoreFee(false) to reset state function ignoreFee(bool enable) external { require(allowIgnoreFeeCaller[msg.sender], "!allow"); if (enable) { // in-case caller forgot to reset state, we reduce impact to 1 block ignoreFeeBlock = block.number; return; } ignoreFeeBlock = 0; } function distributeWithdrawFee(IERC20 _token, address) external override { uint256 feeAmount = _token.balanceOf(address(this)); uint256 treasuryFeeAmount = (feeAmount * treasuryFeeWithdraw) / withdrawFeeSum; if (treasuryFeeAmount > 0) { _token.safeTransfer(treasuryFeeRecipient, treasuryFeeAmount); } uint256 kswFeeAmount = (feeAmount * kswFeeWithdraw) / withdrawFeeSum; if (kswFeeAmount > 0) { _token.safeTransfer(kswFeeRecipient, kswFeeAmount); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @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. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual 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 { _transferOwnership(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"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
//SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./IFeeKafra.sol"; interface IFeeKafraV2 is IFeeKafra { function MAX_FEE() external view returns (uint256); function withdrawFee() external view returns (uint256); function userWithdrawFee(address _user) external view returns (uint256); function holdingKSW() external view returns (uint256); function holdingKSWWithdrawFee() external view returns (uint256); function holdingKSWGodWithdrawFee() external view returns (uint256); function treasuryFeeWithdraw() external view returns (uint256); function kswFeeWithdraw() external view returns (uint256); function calculateWithdrawFee(uint256 _wantAmount, address _user) external view returns (uint256); function distributeWithdrawFee(IERC20 _token, address _fromUser) external; function ignoreFee(bool enable) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @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) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @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"); (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"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
//SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IFeeKafra { function MAX_FEE() external view returns (uint256); function withdrawFee() external view returns (uint256); function treasuryFeeWithdraw() external view returns (uint256); function kswFeeWithdraw() external view returns (uint256); function calculateWithdrawFee(uint256 _wantAmount, address _user) external view returns (uint256); function distributeWithdrawFee(IERC20 _token, address _fromUser) external; }
{ "optimizer": { "enabled": true, "runs": 1000000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
[{"inputs":[{"internalType":"address","name":"_ksw","type":"address"},{"internalType":"address","name":"_kswFeeRecipient","type":"address"},{"internalType":"address","name":"_treasuryFeeRecipient","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"bool","name":"allow","type":"bool"}],"name":"SetAllowIgnoreFeeCaller","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SetHoldingKSW","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SetHoldingKSWGod","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SetHoldingKSWGodWithdrawFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SetHoldingKSWWithdrawFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"}],"name":"SetKSWFeeRecipient","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SetKSWFeeWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"}],"name":"SetTreasuryFeeRecipient","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SetTreasuryFeeWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SetWithdrawFee","type":"event"},{"inputs":[],"name":"MAX_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WITHDRAW_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowIgnoreFeeCaller","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wantAmount","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"calculateWithdrawFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"distributeWithdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"holdingKSW","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"holdingKSWGod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"holdingKSWGodWithdrawFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"holdingKSWWithdrawFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"enable","type":"bool"}],"name":"ignoreFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"isGod","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"isHoldingKSW","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ksw","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kswFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kswFeeWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"bool","name":"_allow","type":"bool"}],"name":"setAllowIgnoreFeeCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setHoldingKSW","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setHoldingKSWGod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setHoldingKSWGodWithdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setHoldingKSWWithdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"setKSWFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setKSWFeeWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"setTreasuryFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setTreasuryFeeWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setWithdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryFeeWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"userBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"userWithdrawFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawFeeSum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a06040526113886001556113886002556127106003556014600455600a6005556005600655685150ae84a8cdf0000060075569021e19e0c9bab24000006008553480156200004d57600080fd5b5060405162001bbf38038062001bbf83398101604081905262000070916200011f565b6200007b33620000b2565b6001600160a01b03928316608052600980549284166001600160a01b0319938416179055600a805491909316911617905562000169565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200011a57600080fd5b919050565b6000806000606084860312156200013557600080fd5b620001408462000102565b9250620001506020850162000102565b9150620001606040850162000102565b90509250925092565b608051611a336200018c6000396000818161030a015261051f0152611a336000f3fe608060405234801561001057600080fd5b50600436106102265760003560e01c806389b1d4451161012a578063bc063e1a116100bd578063e86934f11161008c578063ea870e8311610071578063ea870e831461048f578063f2fde38b146104a2578063fcd36ec5146104b557600080fd5b8063e86934f114610473578063e941fa781461048657600080fd5b8063bc063e1a1461042b578063c3a44b0b14610434578063cb79c64a14610457578063d4b0de2f1461046a57600080fd5b80639a63b6d0116100f95780639a63b6d0146103e9578063ab62d1f5146103f2578063b53e28c214610405578063b6ac642a1461041857600080fd5b806389b1d4451461039c5780638cc38dc3146103a55780638da5cb5b146103b857806390d63c0a146103d657600080fd5b80633e70cc64116101bd578063543a61e11161018c578063623ac6a711610171578063623ac6a7146103515780636f3cf01e14610374578063715018a61461039457600080fd5b8063543a61e1146102f2578063615e59781461030557600080fd5b80633e70cc64146102ba578063405a1220146102c35780634b00d336146102d6578063535b5361146102e957600080fd5b80633143f9e5116101f95780633143f9e514610282578063379bb75c146102955780633d158a80146102a85780633d7f823b146102b157600080fd5b80630103c92b1461022b5780630813e63014610251578063224ba5f114610266578063305e3ddd1461026f575b600080fd5b61023e61023936600461177e565b6104d5565b6040519081526020015b60405180910390f35b61026461025f36600461179b565b6105a0565b005b61023e60085481565b61026461027d36600461179b565b610672565b6102646102903660046117c2565b610728565b6102646102a336600461179b565b610837565b61023e60055481565b61023e60035481565b61023e60025481565b6102646102d136600461179b565b61095b565b6102646102e436600461177e565b610a7f565b61023e60075481565b61026461030036600461179b565b610b73565b61032c7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610248565b61036461035f36600461177e565b610c3a565b6040519015158152602001610248565b600a5461032c9073ffffffffffffffffffffffffffffffffffffffff1681565b610264610c66565b61023e60015481565b6103646103b336600461177e565b610cf3565b60005473ffffffffffffffffffffffffffffffffffffffff1661032c565b6102646103e43660046117fb565b610d1f565b61023e60065481565b61026461040036600461179b565b610e60565b61023e61041336600461177e565b610f16565b61026461042636600461179b565b610f4c565b61023e61271081565b61036461044236600461177e565b600b6020526000908152604090205460ff1681565b61026461046536600461177e565b611070565b61023e6103e881565b61023e610481366004611829565b611164565b61023e60045481565b61026461049d36600461184e565b6111a1565b6102646104b036600461177e565b61122f565b60095461032c9073ffffffffffffffffffffffffffffffffffffffff1681565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff828116600483015260009182917f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561056157600080fd5b505afa158015610575573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610599919061186b565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610626576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600181905560025461063890826118b3565b6003556040518181527f23700790b29f8df19ec2c89312d824f69f958c6de1d4fe0ec607545e7f62f5c8906020015b60405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061d565b60088190556040518181527f666167929a31f2b47796e629889b6fbc56277ab11dfe0b1c339b3c3da11aca4790602001610667565b60005473ffffffffffffffffffffffffffffffffffffffff1633146107a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061d565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600b602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527f6553fe611b4ac34d09e13831580dfd706ced4bb39a01f0b9c86dacdd66917bc8910160405180910390a15050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061d565b6103e8811115610926576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161061d9060208082526004908201527f2163617000000000000000000000000000000000000000000000000000000000604082015260600190565b60058190556040518181527f551fb7df61a3821f0504e3c6fe825fe54805cd32c335a9598a63ab8c1a4eefa690602001610667565b60005473ffffffffffffffffffffffffffffffffffffffff1633146109dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061d565b6103e8811115610a4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161061d9060208082526004908201527f2163617000000000000000000000000000000000000000000000000000000000604082015260600190565b60068190556040518181527faa93d31a58803a0d4c3071e9b375ed1b5ec58828dfd1f72cbac03a500bdd7a4b90602001610667565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b00576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061d565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f82aae05d0165a3a8e62e9b3d5fa16f4143d3699f3fe531558fa55ab3a33fbafb90602001610667565b60005473ffffffffffffffffffffffffffffffffffffffff163314610bf4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061d565b6002819055600154610c079082906118b3565b6003556040518181527f0c4d729f66b84fe28e2f40a4bbce59bb7ea636874a14de41896caf25177c076590602001610667565b600060075460001415610c4f57506000919050565b6000610c5a836104d5565b60075411159392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ce7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061d565b610cf1600061135f565b565b600060085460001415610d0857506000919050565b6000610d13836104d5565b60085411159392505050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8416906370a082319060240160206040518083038186803b158015610d8757600080fd5b505afa158015610d9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbf919061186b565b9050600060035460015483610dd491906118cb565b610dde9190611908565b90508015610e0d57600a54610e0d9073ffffffffffffffffffffffffffffffffffffffff8681169116836113d4565b600060035460025484610e2091906118cb565b610e2a9190611908565b90508015610e5957600954610e599073ffffffffffffffffffffffffffffffffffffffff8781169116836113d4565b5050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ee1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061d565b60078190556040518181527fec299979f95baee4a74c685b633203b84cf45aead1fb296cd372c99d3fce8bd390602001610667565b6000610f2182610cf3565b15610f2e57505060065490565b610f3782610c3a565b15610f4457505060055490565b505060045490565b60005473ffffffffffffffffffffffffffffffffffffffff163314610fcd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061d565b6103e881111561103b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161061d9060208082526004908201527f2163617000000000000000000000000000000000000000000000000000000000604082015260600190565b60048190556040518181527f7be0a744e4d6f887e4fd578978ae62cb2568d860f0f2eb0a54fd0de804b1644090602001610667565b60005473ffffffffffffffffffffffffffffffffffffffff1633146110f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061d565b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f55f8d521990eeadeea30ccab30ae3ce5f9c5f44b5e7d6c75106a5bb3fe4ce66390602001610667565b600043600c5414156111785750600061119b565b61271061118483610f16565b61118e90856118cb565b6111989190611908565b90505b92915050565b336000908152600b602052604090205460ff1661121a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f21616c6c6f770000000000000000000000000000000000000000000000000000604482015260640161061d565b8015611227575043600c55565b506000600c55565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061d565b73ffffffffffffffffffffffffffffffffffffffff8116611353576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161061d565b61135c8161135f565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611461908490611466565b505050565b60006114c8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166115729092919063ffffffff16565b80519091501561146157808060200190518101906114e69190611943565b611461576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161061d565b60606115818484600085611589565b949350505050565b60608247101561161b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161061d565b843b611683576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061d565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516116ac9190611990565b60006040518083038185875af1925050503d80600081146116e9576040519150601f19603f3d011682016040523d82523d6000602084013e6116ee565b606091505b50915091506116fe828286611709565b979650505050505050565b60608315611718575081610599565b8251156117285782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161061d91906119ac565b73ffffffffffffffffffffffffffffffffffffffff8116811461135c57600080fd5b60006020828403121561179057600080fd5b81356105998161175c565b6000602082840312156117ad57600080fd5b5035919050565b801515811461135c57600080fd5b600080604083850312156117d557600080fd5b82356117e08161175c565b915060208301356117f0816117b4565b809150509250929050565b6000806040838503121561180e57600080fd5b82356118198161175c565b915060208301356117f08161175c565b6000806040838503121561183c57600080fd5b8235915060208301356117f08161175c565b60006020828403121561186057600080fd5b8135610599816117b4565b60006020828403121561187d57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156118c6576118c6611884565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561190357611903611884565b500290565b60008261193e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561195557600080fd5b8151610599816117b4565b60005b8381101561197b578181015183820152602001611963565b8381111561198a576000848401525b50505050565b600082516119a2818460208701611960565b9190910192915050565b60208152600082518060208401526119cb816040850160208701611960565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea264697066735822122077060dfb8af517011bf65b417f1fabc2c7bcddbcd96105e127760305fd7caaca64736f6c6343000809003300000000000000000000000034fa09534e411dee1967df183ddbd4f65c65fb46000000000000000000000000b6e581dadd3c6211828242dab1ef9fb3a343902c00000000000000000000000077adbd9410f7132a1c3bc84f9e0e6f5a4fc6c44b
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000034fa09534e411dee1967df183ddbd4f65c65fb46000000000000000000000000b6e581dadd3c6211828242dab1ef9fb3a343902c00000000000000000000000077adbd9410f7132a1c3bc84f9e0e6f5a4fc6c44b
-----Decoded View---------------
Arg [0] : _ksw (address): 0x34fa09534e411dee1967df183ddbd4f65c65fb46
Arg [1] : _kswFeeRecipient (address): 0xb6e581dadd3c6211828242dab1ef9fb3a343902c
Arg [2] : _treasuryFeeRecipient (address): 0x77adbd9410f7132a1c3bc84f9e0e6f5a4fc6c44b
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000034fa09534e411dee1967df183ddbd4f65c65fb46
Arg [1] : 000000000000000000000000b6e581dadd3c6211828242dab1ef9fb3a343902c
Arg [2] : 00000000000000000000000077adbd9410f7132a1c3bc84f9e0e6f5a4fc6c44b
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.