Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Contract Name:
DexFiTreasury
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 100 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (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 Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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 (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.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; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ 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)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ 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"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @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"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @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). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // 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 cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// 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 (last updated v4.9.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.21; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; contract DexFiTreasury is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; struct FeeReceiverData { address receiver; uint256 percent; } uint256 public constant DIVIDER = 1e18; EnumerableSet.AddressSet private _receivers; mapping(address => uint256) private _percents; function receivers(uint256 index) external view returns (address) { return _receivers.at(index); } function receiversCount() external view returns (uint256) { return _receivers.length(); } function receiversContains(address receiver) external view returns (bool) { return _receivers.contains(receiver); } function receiversPercent(address receiver) external view returns (uint256) { return _percents[receiver]; } event FeeReceiversUpdated(FeeReceiverData[] receivers); event TreasuryClaimed(address indexed token, address indexed receiver, uint256 amount); error UpdateFeeReceiversReceiverZero(); error UpdateFeeReceiversPercentSumDiffers(uint256 sum, uint256 target); error UpdateFeeReceiversDuplicatedData(); error ClaimTreasuryTokenBalanceZero(address token); constructor(FeeReceiverData[] memory data) { _updateFeeReceivers(data); } receive() external payable {} function claimTreasury(address[] memory tokens) external nonReentrant returns (bool) { for (uint256 j = 0; j < tokens.length; j++) { address token = tokens[j]; uint256 balance = token == address(0) ? address(this).balance : IERC20(token).balanceOf(address(this)); if (balance == 0) revert ClaimTreasuryTokenBalanceZero(token); uint256 amountSum = 0; uint256 receiversLength = _receivers.length(); for (uint256 i = 0; i < receiversLength; i++) { address receiver = _receivers.at(i); uint256 amount = i != receiversLength - 1 ? (balance * _percents[receiver]) / DIVIDER : balance - amountSum; amountSum += amount; if (token == address(0)) Address.sendValue(payable(receiver), amount); else IERC20(token).safeTransfer(receiver, amount); emit TreasuryClaimed(token, receiver, amount); } } return true; } function updateFeeReceivers(FeeReceiverData[] memory data) external onlyOwner returns (bool) { _updateFeeReceivers(data); return true; } function _updateFeeReceivers(FeeReceiverData[] memory data) private { if (_receivers.length() > 0) { for (uint256 i = _receivers.length() - 1; i >= 0; i--) { _receivers.remove(_receivers.at(i)); if (i == 0) break; } } uint256 percentSum = 0; for (uint256 i = 0; i < data.length; i++) { FeeReceiverData memory receiverData = data[i]; if (receiverData.receiver == address(0)) revert UpdateFeeReceiversReceiverZero(); _receivers.add(receiverData.receiver); _percents[receiverData.receiver] = receiverData.percent; percentSum += receiverData.percent; } if (percentSum != DIVIDER) revert UpdateFeeReceiversPercentSumDiffers(percentSum, DIVIDER); if (_receivers.length() != data.length) revert UpdateFeeReceiversDuplicatedData(); emit FeeReceiversUpdated(data); } }
{ "viaIR": true, "optimizer": { "enabled": true, "runs": 100 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"percent","type":"uint256"}],"internalType":"struct DexFiTreasury.FeeReceiverData[]","name":"data","type":"tuple[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"ClaimTreasuryTokenBalanceZero","type":"error"},{"inputs":[],"name":"UpdateFeeReceiversDuplicatedData","type":"error"},{"inputs":[{"internalType":"uint256","name":"sum","type":"uint256"},{"internalType":"uint256","name":"target","type":"uint256"}],"name":"UpdateFeeReceiversPercentSumDiffers","type":"error"},{"inputs":[],"name":"UpdateFeeReceiversReceiverZero","type":"error"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"percent","type":"uint256"}],"indexed":false,"internalType":"struct DexFiTreasury.FeeReceiverData[]","name":"receivers","type":"tuple[]"}],"name":"FeeReceiversUpdated","type":"event"},{"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":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TreasuryClaimed","type":"event"},{"inputs":[],"name":"DIVIDER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"claimTreasury","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"receivers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"receiversContains","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"receiversCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"receiversPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"percent","type":"uint256"}],"internalType":"struct DexFiTreasury.FeeReceiverData[]","name":"data","type":"tuple[]"}],"name":"updateFeeReceivers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
604060808152346200031f5762001318803803806200001e816200034f565b928339810160209182818303126200031f5780516001600160401b03918282116200031f57019082601f830112156200031f5781519281841162000339576005926200006e8686861b016200034f565b928684878152019187839760061b820101938085116200031f5792908801925b848410620002d557505060008054336001600160a01b03198216811783556001600160a01b0399955091935090915087167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a360019384805560029081548062000266575b5085839184915b620001c4575b5050670de0b6b3a7640000808203620001a757505054835103620001965792919086519581870192828852518093528787019594905b8884831062000175577fa220fc1ab8a6f8eb5d2507e43b3703a77d58ebc26bf635082c29c20906d9bd878989038aa151610e069081620005128239f35b86518051831689528401518489015290960195948201949084019062000138565b8651636ae8991560e11b8152600490fd5b60449250895191635f22daad60e01b835260048301526024820152fd5b909186518310156200025f578583831b880101518a815116156200024e57620001f08b825116620003a7565b508681018b815192511687526004918289528d8820555182018092116200023b5750916000198114620002275787019087620000fc565b634e487b7160e01b85526011600452602485fd5b634e487b7160e01b865260119052602485fd5b8b516319598b0360e31b8152600490fd5b9162000102565b600019908082019081116200022757875b62000284575b50620000f5565b8354811015620002c157838552620002a38a828888200154166200042e565b508015620002bb578015620002275781018762000277565b6200027d565b634e487b7160e01b85526032600452602485fd5b89848203126200031f5789518a81018181108582111762000324578b5284516001600160a01b03811681036200031f578152848a01518a820152825292890192908801906200008e565b600080fd5b60246000634e487b7160e01b81526041600452fd5b634e487b7160e01b600052604160045260246000fd5b6040519190601f01601f191682016001600160401b038111838210176200033957604052565b6002548110156200039157600260005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b6000818152600360205260408120546200042957600254680100000000000000008110156200041557908262000401620003ea8460016040960160025562000375565b819391549060031b91821b91600019901b19161790565b905560025492815260036020522055600190565b634e487b7160e01b82526041600452602482fd5b905090565b60008181526003602052604081205490919080156200050c5760001990808201818111620002275760025490838201918211620004f857808203620004be575b5050506002548015620004aa57810190620004898262000375565b909182549160031b1b19169055600255815260036020526040812055600190565b634e487b7160e01b84526031600452602484fd5b620004e1620004d1620003ea9362000375565b90549060031b1c92839262000375565b90558452600360205260408420553880806200046e565b634e487b7160e01b86526011600452602486fd5b50509056fe608080604052600436101561001d575b50361561001b57600080fd5b005b60003560e01c908163360ed9c214610a205750806362043bd8146109fd578063715018a6146109a457806372c0783f146104c75780638da5cb5b1461049e5780639fe9415014610464578063bfd772fc1461042d578063ef0181bb1461019a578063f2fde38b146100d95763f9316b0c14610098573861000f565b346100d45760203660031901126100d4576001600160a01b036100b9610a73565b16600052600360205260206040600020541515604051908152f35b600080fd5b346100d45760203660031901126100d4576100f2610a73565b6100fa610a9d565b6001600160a01b03908116908115610146576000548260018060a01b0319821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b346100d4576020806003193601126100d4576004356001600160401b03918282116100d457366023830112156100d4578160040135926024926101dc85610a5c565b916101ea6040519384610a3b565b8583528383019085829760061b840101923684116100d4578601915b8383106103d65750505050610219610a9d565b6002548061036b575b50600093845b825186101561029f5761023b8684610b35565b5180516001600160a01b03929083161561028d57828261026361028795610281955116610c69565b50878101918251915116600052600488526040600020555190610b49565b95610b26565b94610228565b6040516319598b0360e31b8152600490fd5b670de0b6b3a764000085670de0b6b3a763ffff19830161034f5750505060025482510361033d5760405191838301908484525180915260408301919060005b85828210610315577fa220fc1ab8a6f8eb5d2507e43b3703a77d58ebc26bf635082c29c20906d9bd8786860387a160405160018152f35b835180516001600160a01b0316865281015181860152604090940193909201916001016102de565b604051636ae8991560e11b8152600490fd5b6044935060405192635f22daad60e01b84526004840152820152fd5b60001994919392908581019081116103b5575b6103a161038a82610af5565b905460039190911b1c6001600160a01b0316610ce6565b5080156103ca5780156103b557850161037e565b83634e487b7160e01b60005260116004526000fd5b50919290935084610222565b6040833603126100d457604051604081018181108482111761041857918791604093845261040386610a89565b81528286013583820152815201920191610206565b88634e487b7160e01b60005260416004526000fd5b346100d45760203660031901126100d457602061044b600435610af5565b905460405160039290921b1c6001600160a01b03168152f35b346100d45760203660031901126100d4576001600160a01b03610485610a73565b1660005260046020526020604060002054604051908152f35b346100d45760003660031901126100d4576000546040516001600160a01b039091168152602090f35b346100d45760203660031901126100d4576004356001600160401b0381116100d457366023820112156100d45780600401359061050382610a5c565b916105116040519384610a3b565b8083526024602084019160051b830101913683116100d457602401905b82821061098c578360026001541461094757600260015560005b8151811015610938576001600160a01b036105638284610b35565b5116806108c957475b80156108b057600254600092835b82851061059457505050505061058f90610b26565b610548565b61059d85610af5565b905460039190911b1c6001600160a01b03169460001984018410610884576000198401811461089a578560005260046020526040600020548581810204810361088457670de0b6b3a76400006105f7918702048093610b49565b9583610706578247106106c157600080808086855af1610615610b56565b501561065657837f6458407f0340d4c9ab27e2a8e4cc46dc2773a24dca8086eef793c12bb811a29a6020610650955b604051908152a3610b26565b9361057a565b60405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608490fd5b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606490fd5b60405163a9059cbb60e01b6020820152816024820152836044820152604481528060808101106001600160401b0360808301111761086e576080810160c08201106001600160401b0360c08301111761086e578060c06107b29201604052602060808201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460a08201526080600080835160208501828b5af19101906107ab610b56565b9087610b95565b805190811591821561084b575b5050156107f357837f6458407f0340d4c9ab27e2a8e4cc46dc2773a24dca8086eef793c12bb811a29a602061065095610644565b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b81925090602091810103126100d4576020015180151581036100d4578a806107bf565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8482810311610884576105f78286038093610b49565b60405163113904c160e21b815260048101839052602490fd5b6040516370a0823160e01b8152306004820152602081602481855afa90811561092c576000916108fa575b5061056c565b90506020813d602011610924575b8161091560209383610a3b565b810103126100d45751846108f4565b3d9150610908565b6040513d6000823e3d90fd5b60018055602060405160018152f35b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b6020809161099984610a89565b81520191019061052e565b346100d45760003660031901126100d4576109bd610a9d565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346100d45760003660031901126100d4576020604051670de0b6b3a76400008152f35b346100d45760003660031901126100d4576020906002548152f35b90601f801991011681019081106001600160401b0382111761086e57604052565b6001600160401b03811161086e5760051b60200190565b600435906001600160a01b03821682036100d457565b35906001600160a01b03821682036100d457565b6000546001600160a01b03163303610ab157565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b600254811015610b1057600260005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b60001981146108845760010190565b8051821015610b105760209160051b010190565b9190820180921161088457565b3d15610b90573d906001600160401b03821161086e5760405191610b84601f8201601f191660200184610a3b565b82523d6000602084013e565b606090565b91929015610bf75750815115610ba9575090565b3b15610bb25790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015610c0a5750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510610c50575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350610c2d565b600081815260036020526040812054610ce157600254600160401b811015610ccd579082610cb9610ca284600160409601600255610af5565b819391549060031b91821b91600019901b19161790565b905560025492815260036020522055600190565b634e487b7160e01b82526041600452602482fd5b905090565b6000818152600360205260408120549091908015610dcb5760001990808201818111610db75760025490838201918211610da357808203610d6f575b5050506002548015610d5b57810190610d3a82610af5565b909182549160031b1b19169055600255815260036020526040812055600190565b634e487b7160e01b84526031600452602484fd5b610d8d610d7e610ca293610af5565b90549060031b1c928392610af5565b9055845260036020526040842055388080610d22565b634e487b7160e01b86526011600452602486fd5b634e487b7160e01b85526011600452602485fd5b50509056fea264697066735822122051f0484c95aafeadb5ed963a1a9c6411ac64e0c919bbbccc3424e155a4fdf89664736f6c634300081500330000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000300000000000000000000000075c4506d354f1e9b7cea0392db12a297df19011a00000000000000000000000000000000000000000000000000b1a2bc2ec5000000000000000000000000000045d0ffeee3e1905c6aa8c3dab41c8670ad6e45ab000000000000000000000000000000000000000000000000063eb89da4ed0000000000000000000000000000cb80a294ac6285f6b3f1f21ebb2806d6703953f800000000000000000000000000000000000000000000000006f05b59d3b20000
Deployed Bytecode
0x608080604052600436101561001d575b50361561001b57600080fd5b005b60003560e01c908163360ed9c214610a205750806362043bd8146109fd578063715018a6146109a457806372c0783f146104c75780638da5cb5b1461049e5780639fe9415014610464578063bfd772fc1461042d578063ef0181bb1461019a578063f2fde38b146100d95763f9316b0c14610098573861000f565b346100d45760203660031901126100d4576001600160a01b036100b9610a73565b16600052600360205260206040600020541515604051908152f35b600080fd5b346100d45760203660031901126100d4576100f2610a73565b6100fa610a9d565b6001600160a01b03908116908115610146576000548260018060a01b0319821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b346100d4576020806003193601126100d4576004356001600160401b03918282116100d457366023830112156100d4578160040135926024926101dc85610a5c565b916101ea6040519384610a3b565b8583528383019085829760061b840101923684116100d4578601915b8383106103d65750505050610219610a9d565b6002548061036b575b50600093845b825186101561029f5761023b8684610b35565b5180516001600160a01b03929083161561028d57828261026361028795610281955116610c69565b50878101918251915116600052600488526040600020555190610b49565b95610b26565b94610228565b6040516319598b0360e31b8152600490fd5b670de0b6b3a764000085670de0b6b3a763ffff19830161034f5750505060025482510361033d5760405191838301908484525180915260408301919060005b85828210610315577fa220fc1ab8a6f8eb5d2507e43b3703a77d58ebc26bf635082c29c20906d9bd8786860387a160405160018152f35b835180516001600160a01b0316865281015181860152604090940193909201916001016102de565b604051636ae8991560e11b8152600490fd5b6044935060405192635f22daad60e01b84526004840152820152fd5b60001994919392908581019081116103b5575b6103a161038a82610af5565b905460039190911b1c6001600160a01b0316610ce6565b5080156103ca5780156103b557850161037e565b83634e487b7160e01b60005260116004526000fd5b50919290935084610222565b6040833603126100d457604051604081018181108482111761041857918791604093845261040386610a89565b81528286013583820152815201920191610206565b88634e487b7160e01b60005260416004526000fd5b346100d45760203660031901126100d457602061044b600435610af5565b905460405160039290921b1c6001600160a01b03168152f35b346100d45760203660031901126100d4576001600160a01b03610485610a73565b1660005260046020526020604060002054604051908152f35b346100d45760003660031901126100d4576000546040516001600160a01b039091168152602090f35b346100d45760203660031901126100d4576004356001600160401b0381116100d457366023820112156100d45780600401359061050382610a5c565b916105116040519384610a3b565b8083526024602084019160051b830101913683116100d457602401905b82821061098c578360026001541461094757600260015560005b8151811015610938576001600160a01b036105638284610b35565b5116806108c957475b80156108b057600254600092835b82851061059457505050505061058f90610b26565b610548565b61059d85610af5565b905460039190911b1c6001600160a01b03169460001984018410610884576000198401811461089a578560005260046020526040600020548581810204810361088457670de0b6b3a76400006105f7918702048093610b49565b9583610706578247106106c157600080808086855af1610615610b56565b501561065657837f6458407f0340d4c9ab27e2a8e4cc46dc2773a24dca8086eef793c12bb811a29a6020610650955b604051908152a3610b26565b9361057a565b60405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608490fd5b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606490fd5b60405163a9059cbb60e01b6020820152816024820152836044820152604481528060808101106001600160401b0360808301111761086e576080810160c08201106001600160401b0360c08301111761086e578060c06107b29201604052602060808201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460a08201526080600080835160208501828b5af19101906107ab610b56565b9087610b95565b805190811591821561084b575b5050156107f357837f6458407f0340d4c9ab27e2a8e4cc46dc2773a24dca8086eef793c12bb811a29a602061065095610644565b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b81925090602091810103126100d4576020015180151581036100d4578a806107bf565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8482810311610884576105f78286038093610b49565b60405163113904c160e21b815260048101839052602490fd5b6040516370a0823160e01b8152306004820152602081602481855afa90811561092c576000916108fa575b5061056c565b90506020813d602011610924575b8161091560209383610a3b565b810103126100d45751846108f4565b3d9150610908565b6040513d6000823e3d90fd5b60018055602060405160018152f35b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b6020809161099984610a89565b81520191019061052e565b346100d45760003660031901126100d4576109bd610a9d565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346100d45760003660031901126100d4576020604051670de0b6b3a76400008152f35b346100d45760003660031901126100d4576020906002548152f35b90601f801991011681019081106001600160401b0382111761086e57604052565b6001600160401b03811161086e5760051b60200190565b600435906001600160a01b03821682036100d457565b35906001600160a01b03821682036100d457565b6000546001600160a01b03163303610ab157565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b600254811015610b1057600260005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b60001981146108845760010190565b8051821015610b105760209160051b010190565b9190820180921161088457565b3d15610b90573d906001600160401b03821161086e5760405191610b84601f8201601f191660200184610a3b565b82523d6000602084013e565b606090565b91929015610bf75750815115610ba9575090565b3b15610bb25790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015610c0a5750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510610c50575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350610c2d565b600081815260036020526040812054610ce157600254600160401b811015610ccd579082610cb9610ca284600160409601600255610af5565b819391549060031b91821b91600019901b19161790565b905560025492815260036020522055600190565b634e487b7160e01b82526041600452602482fd5b905090565b6000818152600360205260408120549091908015610dcb5760001990808201818111610db75760025490838201918211610da357808203610d6f575b5050506002548015610d5b57810190610d3a82610af5565b909182549160031b1b19169055600255815260036020526040812055600190565b634e487b7160e01b84526031600452602484fd5b610d8d610d7e610ca293610af5565b90549060031b1c928392610af5565b9055845260036020526040842055388080610d22565b634e487b7160e01b86526011600452602486fd5b634e487b7160e01b85526011600452602485fd5b50509056fea264697066735822122051f0484c95aafeadb5ed963a1a9c6411ac64e0c919bbbccc3424e155a4fdf89664736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000300000000000000000000000075c4506d354f1e9b7cea0392db12a297df19011a00000000000000000000000000000000000000000000000000b1a2bc2ec5000000000000000000000000000045d0ffeee3e1905c6aa8c3dab41c8670ad6e45ab000000000000000000000000000000000000000000000000063eb89da4ed0000000000000000000000000000cb80a294ac6285f6b3f1f21ebb2806d6703953f800000000000000000000000000000000000000000000000006f05b59d3b20000
-----Decoded View---------------
Arg [0] : data (tuple[]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [2] : 00000000000000000000000075c4506d354f1e9b7cea0392db12a297df19011a
Arg [3] : 00000000000000000000000000000000000000000000000000b1a2bc2ec50000
Arg [4] : 00000000000000000000000045d0ffeee3e1905c6aa8c3dab41c8670ad6e45ab
Arg [5] : 000000000000000000000000000000000000000000000000063eb89da4ed0000
Arg [6] : 000000000000000000000000cb80a294ac6285f6b3f1f21ebb2806d6703953f8
Arg [7] : 00000000000000000000000000000000000000000000000006f05b59d3b20000
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.