More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Grant Role | 14078373 | 797 days ago | IN | 0 BTT | 30.3567 |
Loading...
Loading
Contract Name:
Reservoir
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity)
/** *Submitted for verification at bttcscan.com on 2022-11-13 */ // SPDX-License-Identifier: BUSL-1.1 // This source code is licensed under the Business Source License // The Licensed Work is (c) 2022 ElkLabs // Full License Text available at https://github.com/elkfinance/elknet-core/blob/main/LICENSE // File: contracts/interfaces/IReservoir.sol pragma solidity >=0.8.0; interface IReservoir { function tokenAddress() external view returns (address); function available() external view returns (uint256); function deposit(address from, uint256 amount, bytes32 id) external; function withdraw(address to, uint256 amount, bytes32 id) external; function deposited(bytes32 id) external view returns (address from, uint256 amount); function withdrawn(bytes32 id) external view returns (address to, uint256 amount); } // File: @openzeppelin/[email protected]/security/ReentrancyGuard.sol // OpenZeppelin Contracts v4.4.1 (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() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } } // File: @openzeppelin/[email protected]/utils/Address.sol // OpenZeppelin Contracts (last updated v4.5.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 * ==== * * [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://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); } } } } // File: @openzeppelin/[email protected]/token/ERC20/IERC20.sol // OpenZeppelin Contracts (last updated v4.5.0) (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 `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); /** * @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); } // File: @openzeppelin/[email protected]/token/ERC20/utils/SafeERC20.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; /** * @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"); } } } // File: @openzeppelin/[email protected]/utils/math/SafeMath.sol // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } } // File: @openzeppelin/[email protected]/utils/math/Math.sol // OpenZeppelin Contracts (last updated v4.5.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a / b + (a % b == 0 ? 0 : 1); } } // File: @openzeppelin/[email protected]/utils/structs/EnumerableSet.sol // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) 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. * * ``` * 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. */ 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) { return _values(set._inner); } // 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; 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 on 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; assembly { result := store } return result; } } // File: @openzeppelin/[email protected]/utils/introspection/IERC165.sol // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File: @openzeppelin/[email protected]/utils/introspection/ERC165.sol // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } // File: @openzeppelin/[email protected]/utils/Strings.sol // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } } // File: @openzeppelin/[email protected]/utils/Context.sol // 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; } } // File: @openzeppelin/[email protected]/access/Ownable.sol // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; /** * @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); } } // File: @openzeppelin/[email protected]/access/IAccessControl.sol // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; } // File: @openzeppelin/[email protected]/access/AccessControl.sol // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol) pragma solidity ^0.8.0; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } } // File: @openzeppelin/[email protected]/access/IAccessControlEnumerable.sol // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); } // File: @openzeppelin/[email protected]/access/AccessControlEnumerable.sol // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } } // File: contracts/ReservoirNoUpgrade.sol pragma solidity >=0.8.0; contract Reservoir is Context, AccessControlEnumerable, ReentrancyGuard, IReservoir { using SafeMath for uint256; using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ address override public tokenAddress; IERC20 public token; uint256 public rate; uint256 public cap; uint256 public txLimit; uint256 private lastAvailable; uint256 private lastRelease; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); bytes32 public constant CONFIG_ROLE = keccak256("CONFIG_ROLE"); /* ========== CONSTRUCTOR ========== */ constructor(address _tokenAddress, uint256 _rate, uint256 _cap, uint256 _txLimit) { require(_txLimit <= _cap, "Reservoir::constructor: Limit cannot be larger than cap!"); tokenAddress = _tokenAddress; token = IERC20(_tokenAddress); rate = _rate; cap = _cap; txLimit = _txLimit; lastAvailable = 0; lastRelease = block.timestamp; _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); _setupRole(OPERATOR_ROLE, _msgSender()); _setupRole(CONFIG_ROLE, _msgSender()); } function available() override external view returns (uint256) { return _available(); } function deposited(bytes32) override external pure returns (address, uint256) { revert(); } function withdrawn(bytes32) override external pure returns (address, uint256) { revert(); } /* ========== RESTRICTED FUNCTIONS ========== */ function deposit(address _from, uint256 _amount, bytes32 _id) override external nonReentrant onlyRole(OPERATOR_ROLE) { require(_amount <= txLimit, "Reservoir::deposit: Cannot deposit amount larger than limit!"); require(_amount <= token.balanceOf(_from), "Reservoir::deposit: Not enough balance to deposit!"); token.safeTransferFrom(_from, address(this), _amount); emit Deposited(_from, _amount, _id); } function withdraw(address _to, uint256 _amount, bytes32 _id) override external nonReentrant onlyRole(OPERATOR_ROLE) { require(_amount <= txLimit, "Reservoir::withdraw: Cannot withdraw amount larger than limit!"); require(_amount <= token.balanceOf(address(this)), "Reservoir::withdraw: Not enough balance to withdraw!"); uint256 amountAvailable = _available(); require(_amount <= amountAvailable, "Reservoir::withdraw: Not enough available amount for withdrawal!"); lastAvailable = amountAvailable - _amount; lastRelease = block.timestamp; token.safeTransfer(_to, _amount); emit Withdrawn(_to, _amount, _id); } function setConfig(uint256 _rate, uint256 _cap, uint256 _txLimit) external nonReentrant onlyRole(CONFIG_ROLE) { require(_txLimit <= _cap, "Reservoir::setConfig: Limit cannot be larger than cap!"); rate = _rate; cap = _cap; txLimit = _txLimit; emit Configured(_rate, _cap, _txLimit); } /* ========== PRIVATE FUNCTIONS ========== */ function _available() private view returns (uint256) { return Math.min(lastAvailable + (block.timestamp - lastRelease) * rate, cap); } /* ========== EVENTS ========== */ event Deposited(address indexed from, uint256 amount, bytes32 id); event Withdrawn(address indexed to, uint256 amount, bytes32 id); event Configured(uint256 rate, uint256 cap, uint256 txLimit); }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_cap","type":"uint256"},{"internalType":"uint256","name":"_txLimit","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"txLimit","type":"uint256"}],"name":"Configured","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"CONFIG_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"deposited","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_cap","type":"uint256"},{"internalType":"uint256","name":"_txLimit","type":"uint256"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"txLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"withdrawn","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162001b3b38038062001b3b8339810160408190526200003491620002d3565b600160025581811115620000b45760405162461bcd60e51b815260206004820152603860248201527f5265736572766f69723a3a636f6e7374727563746f723a204c696d697420636160448201527f6e6e6f74206265206c6172676572207468616e20636170210000000000000000606482015260840160405180910390fd5b600380546001600160a01b0386166001600160a01b0319918216811790925560048054909116909117905560058390556006829055600781905560006008819055426009556200010c90620001063390565b6200016e565b620001387f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929336200016e565b620001647f82db594318110a04b6349ce48645aa69f0892751bc893d15e61d9e2b9c4630f5336200016e565b5050505062000320565b6200017a82826200017e565b5050565b620001958282620001c160201b62000b6b1760201c565b6000828152600160209081526040909120620001bc91839062000c0962000261821b17901c565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200017a576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200021d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000278836001600160a01b03841662000281565b90505b92915050565b6000818152600183016020526040812054620002ca575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200027b565b5060006200027b565b60008060008060808587031215620002ea57600080fd5b84516001600160a01b03811681146200030257600080fd5b60208601516040870151606090970151919890975090945092505050565b61180b80620003306000396000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c806348a0d754116100d8578063a217fddf1161008c578063d547741f11610066578063d547741f14610348578063f5b541a61461035b578063fc0c546a1461038257600080fd5b8063a217fddf14610306578063a4d19feb1461030e578063ca15c8731461033557600080fd5b80639010d07c116100bd5780639010d07c1461029157806391d14854146102bc5780639d76ea58146102f357600080fd5b806348a0d754146102805780636caae8321461028857600080fd5b806326b3293f1161013a578063355274ea11610114578063355274ea1461026457806336568abe1461026d5780633823d66c146101d757600080fd5b806326b3293f146102355780632c4e722e146102485780632f2ff15d1461025157600080fd5b8063129ee21a1161016b578063129ee21a146101c45780631f36edcd146101d7578063248a9ca31461020457600080fd5b806301ffc9a714610187578063106e6290146101af575b600080fd5b61019a6101953660046114ee565b610395565b60405190151581526020015b60405180910390f35b6101c26101bd366004611534565b6103d9565b005b6101c26101d2366004611567565b6106b4565b6101e5610182366004611593565b604080516001600160a01b0390931683526020830191909152016101a6565b610227610212366004611593565b60009081526020819052604090206001015490565b6040519081526020016101a6565b6101c2610243366004611534565b610805565b61022760055481565b6101c261025f3660046115ac565b610a49565b61022760065481565b6101c261027b3660046115ac565b610a74565b610227610b00565b61022760075481565b6102a461029f3660046115d8565b610b0f565b6040516001600160a01b0390911681526020016101a6565b61019a6102ca3660046115ac565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6003546102a4906001600160a01b031681565b610227600081565b6102277f82db594318110a04b6349ce48645aa69f0892751bc893d15e61d9e2b9c4630f581565b610227610343366004611593565b610b2e565b6101c26103563660046115ac565b610b45565b6102277f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b6004546102a4906001600160a01b031681565b60006001600160e01b031982167f5a05180f0000000000000000000000000000000000000000000000000000000014806103d357506103d382610c1e565b92915050565b600280540361042f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600280557f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92961045e8133610c85565b6007548311156104d65760405162461bcd60e51b815260206004820152603e60248201527f5265736572766f69723a3a77697468647261773a2043616e6e6f74207769746860448201527f6472617720616d6f756e74206c6172676572207468616e206c696d69742100006064820152608401610426565b600480546040516370a0823160e01b815230928101929092526001600160a01b0316906370a0823190602401602060405180830381865afa15801561051f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054391906115fa565b8311156105b85760405162461bcd60e51b815260206004820152603460248201527f5265736572766f69723a3a77697468647261773a204e6f7420656e6f7567682060448201527f62616c616e636520746f207769746864726177210000000000000000000000006064820152608401610426565b60006105c2610d03565b90508084111561063c576040805162461bcd60e51b81526020600482015260248101919091527f5265736572766f69723a3a77697468647261773a204e6f7420656e6f7567682060448201527f617661696c61626c6520616d6f756e7420666f72207769746864726177616c216064820152608401610426565b6106468482611629565b60085542600955600454610664906001600160a01b03168686610d38565b60408051858152602081018590526001600160a01b038716917f510b30a02fc9b7506980950b9c615af8c13e88658555c0ea22acffd73d9ea222910160405180910390a250506001600255505050565b60028054036107055760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610426565b600280557f82db594318110a04b6349ce48645aa69f0892751bc893d15e61d9e2b9c4630f56107348133610c85565b828211156107aa5760405162461bcd60e51b815260206004820152603660248201527f5265736572766f69723a3a736574436f6e6669673a204c696d69742063616e6e60448201527f6f74206265206c6172676572207468616e2063617021000000000000000000006064820152608401610426565b60058490556006839055600782905560408051858152602081018590529081018390527f0ba31b8aa01604da9e792013cbb790899e203d496cae57a3b0d224e26be452ae9060600160405180910390a1505060016002555050565b60028054036108565760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610426565b600280557f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9296108858133610c85565b6007548311156108fd5760405162461bcd60e51b815260206004820152603c60248201527f5265736572766f69723a3a6465706f7369743a2043616e6e6f74206465706f7360448201527f697420616d6f756e74206c6172676572207468616e206c696d697421000000006064820152608401610426565b600480546040516370a0823160e01b81526001600160a01b03878116938201939093529116906370a0823190602401602060405180830381865afa158015610949573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096d91906115fa565b8311156109e25760405162461bcd60e51b815260206004820152603260248201527f5265736572766f69723a3a6465706f7369743a204e6f7420656e6f756768206260448201527f616c616e636520746f206465706f7369742100000000000000000000000000006064820152608401610426565b6004546109fa906001600160a01b0316853086610dc9565b60408051848152602081018490526001600160a01b038616917fd7eda976cf4919f13172eb15bb39c64cecb7172258c741dab31d14c855eff402910160405180910390a2505060016002555050565b600082815260208190526040902060010154610a658133610c85565b610a6f8383610e20565b505050565b6001600160a01b0381163314610af25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610426565b610afc8282610e42565b5050565b6000610b0a610d03565b905090565b6000828152600160205260408120610b279083610e64565b9392505050565b60008181526001602052604081206103d390610e70565b600082815260208190526040902060010154610b618133610c85565b610a6f8383610e42565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610afc576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610bc53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610b27836001600160a01b038416610e7a565b60006001600160e01b031982167f7965db0b0000000000000000000000000000000000000000000000000000000014806103d357507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316146103d3565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610afc57610cc1816001600160a01b03166014610ec9565b610ccc836020610ec9565b604051602001610cdd929190611660565b60408051601f198184030181529082905262461bcd60e51b8252610426916004016116e1565b6000610b0a60055460095442610d199190611629565b610d239190611714565b600854610d30919061172b565b6006546110aa565b6040516001600160a01b038316602482015260448101829052610a6f9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b0319909316929092179091526110c0565b6040516001600160a01b0380851660248301528316604482015260648101829052610e1a9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401610d7d565b50505050565b610e2a8282610b6b565b6000828152600160205260409020610a6f9082610c09565b610e4c82826111a5565b6000828152600160205260409020610a6f9082611224565b6000610b278383611239565b60006103d3825490565b6000818152600183016020526040812054610ec1575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556103d3565b5060006103d3565b60606000610ed8836002611714565b610ee390600261172b565b67ffffffffffffffff811115610efb57610efb61173e565b6040519080825280601f01601f191660200182016040528015610f25576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110610f5c57610f5c611754565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110610fa757610fa7611754565b60200101906001600160f81b031916908160001a9053506000610fcb846002611714565b610fd690600161172b565b90505b600181111561105b577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061101757611017611754565b1a60f81b82828151811061102d5761102d611754565b60200101906001600160f81b031916908160001a90535060049490941c936110548161176a565b9050610fd9565b508315610b275760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610426565b60008183106110b95781610b27565b5090919050565b6000611115826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112639092919063ffffffff16565b805190915015610a6f57808060200190518101906111339190611781565b610a6f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610426565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610afc576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610b27836001600160a01b03841661127a565b600082600001828154811061125057611250611754565b9060005260206000200154905092915050565b6060611272848460008561136d565b949350505050565b6000818152600183016020526040812054801561136357600061129e600183611629565b85549091506000906112b290600190611629565b90508181146113175760008660000182815481106112d2576112d2611754565b90600052602060002001549050808760000184815481106112f5576112f5611754565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611328576113286117a3565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506103d3565b60009150506103d3565b6060824710156113e55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610426565b6001600160a01b0385163b61143c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610426565b600080866001600160a01b0316858760405161145891906117b9565b60006040518083038185875af1925050503d8060008114611495576040519150601f19603f3d011682016040523d82523d6000602084013e61149a565b606091505b50915091506114aa8282866114b5565b979650505050505050565b606083156114c4575081610b27565b8251156114d45782518084602001fd5b8160405162461bcd60e51b815260040161042691906116e1565b60006020828403121561150057600080fd5b81356001600160e01b031981168114610b2757600080fd5b80356001600160a01b038116811461152f57600080fd5b919050565b60008060006060848603121561154957600080fd5b61155284611518565b95602085013595506040909401359392505050565b60008060006060848603121561157c57600080fd5b505081359360208301359350604090920135919050565b6000602082840312156115a557600080fd5b5035919050565b600080604083850312156115bf57600080fd5b823591506115cf60208401611518565b90509250929050565b600080604083850312156115eb57600080fd5b50508035926020909101359150565b60006020828403121561160c57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156103d3576103d3611613565b60005b8381101561165757818101518382015260200161163f565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161169881601785016020880161163c565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516116d581602884016020880161163c565b01602801949350505050565b602081526000825180602084015261170081604085016020870161163c565b601f01601f19169190910160400192915050565b80820281158282048414176103d3576103d3611613565b808201808211156103d3576103d3611613565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008161177957611779611613565b506000190190565b60006020828403121561179357600080fd5b81518015158114610b2757600080fd5b634e487b7160e01b600052603160045260246000fd5b600082516117cb81846020870161163c565b919091019291505056fea2646970667358221220d0a1449cf983239e8ea9a427339c5933d331367d5c87b7509f49c10aad3acb5064736f6c63430008110033000000000000000000000000eeeeeb57642040be42185f49c52f7e9b38f8eeee0000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000002a5a058fc295ed00000000000000000000000000000000000000000000000000043c33c1937564800000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101825760003560e01c806348a0d754116100d8578063a217fddf1161008c578063d547741f11610066578063d547741f14610348578063f5b541a61461035b578063fc0c546a1461038257600080fd5b8063a217fddf14610306578063a4d19feb1461030e578063ca15c8731461033557600080fd5b80639010d07c116100bd5780639010d07c1461029157806391d14854146102bc5780639d76ea58146102f357600080fd5b806348a0d754146102805780636caae8321461028857600080fd5b806326b3293f1161013a578063355274ea11610114578063355274ea1461026457806336568abe1461026d5780633823d66c146101d757600080fd5b806326b3293f146102355780632c4e722e146102485780632f2ff15d1461025157600080fd5b8063129ee21a1161016b578063129ee21a146101c45780631f36edcd146101d7578063248a9ca31461020457600080fd5b806301ffc9a714610187578063106e6290146101af575b600080fd5b61019a6101953660046114ee565b610395565b60405190151581526020015b60405180910390f35b6101c26101bd366004611534565b6103d9565b005b6101c26101d2366004611567565b6106b4565b6101e5610182366004611593565b604080516001600160a01b0390931683526020830191909152016101a6565b610227610212366004611593565b60009081526020819052604090206001015490565b6040519081526020016101a6565b6101c2610243366004611534565b610805565b61022760055481565b6101c261025f3660046115ac565b610a49565b61022760065481565b6101c261027b3660046115ac565b610a74565b610227610b00565b61022760075481565b6102a461029f3660046115d8565b610b0f565b6040516001600160a01b0390911681526020016101a6565b61019a6102ca3660046115ac565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6003546102a4906001600160a01b031681565b610227600081565b6102277f82db594318110a04b6349ce48645aa69f0892751bc893d15e61d9e2b9c4630f581565b610227610343366004611593565b610b2e565b6101c26103563660046115ac565b610b45565b6102277f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b6004546102a4906001600160a01b031681565b60006001600160e01b031982167f5a05180f0000000000000000000000000000000000000000000000000000000014806103d357506103d382610c1e565b92915050565b600280540361042f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600280557f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92961045e8133610c85565b6007548311156104d65760405162461bcd60e51b815260206004820152603e60248201527f5265736572766f69723a3a77697468647261773a2043616e6e6f74207769746860448201527f6472617720616d6f756e74206c6172676572207468616e206c696d69742100006064820152608401610426565b600480546040516370a0823160e01b815230928101929092526001600160a01b0316906370a0823190602401602060405180830381865afa15801561051f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054391906115fa565b8311156105b85760405162461bcd60e51b815260206004820152603460248201527f5265736572766f69723a3a77697468647261773a204e6f7420656e6f7567682060448201527f62616c616e636520746f207769746864726177210000000000000000000000006064820152608401610426565b60006105c2610d03565b90508084111561063c576040805162461bcd60e51b81526020600482015260248101919091527f5265736572766f69723a3a77697468647261773a204e6f7420656e6f7567682060448201527f617661696c61626c6520616d6f756e7420666f72207769746864726177616c216064820152608401610426565b6106468482611629565b60085542600955600454610664906001600160a01b03168686610d38565b60408051858152602081018590526001600160a01b038716917f510b30a02fc9b7506980950b9c615af8c13e88658555c0ea22acffd73d9ea222910160405180910390a250506001600255505050565b60028054036107055760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610426565b600280557f82db594318110a04b6349ce48645aa69f0892751bc893d15e61d9e2b9c4630f56107348133610c85565b828211156107aa5760405162461bcd60e51b815260206004820152603660248201527f5265736572766f69723a3a736574436f6e6669673a204c696d69742063616e6e60448201527f6f74206265206c6172676572207468616e2063617021000000000000000000006064820152608401610426565b60058490556006839055600782905560408051858152602081018590529081018390527f0ba31b8aa01604da9e792013cbb790899e203d496cae57a3b0d224e26be452ae9060600160405180910390a1505060016002555050565b60028054036108565760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610426565b600280557f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9296108858133610c85565b6007548311156108fd5760405162461bcd60e51b815260206004820152603c60248201527f5265736572766f69723a3a6465706f7369743a2043616e6e6f74206465706f7360448201527f697420616d6f756e74206c6172676572207468616e206c696d697421000000006064820152608401610426565b600480546040516370a0823160e01b81526001600160a01b03878116938201939093529116906370a0823190602401602060405180830381865afa158015610949573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096d91906115fa565b8311156109e25760405162461bcd60e51b815260206004820152603260248201527f5265736572766f69723a3a6465706f7369743a204e6f7420656e6f756768206260448201527f616c616e636520746f206465706f7369742100000000000000000000000000006064820152608401610426565b6004546109fa906001600160a01b0316853086610dc9565b60408051848152602081018490526001600160a01b038616917fd7eda976cf4919f13172eb15bb39c64cecb7172258c741dab31d14c855eff402910160405180910390a2505060016002555050565b600082815260208190526040902060010154610a658133610c85565b610a6f8383610e20565b505050565b6001600160a01b0381163314610af25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610426565b610afc8282610e42565b5050565b6000610b0a610d03565b905090565b6000828152600160205260408120610b279083610e64565b9392505050565b60008181526001602052604081206103d390610e70565b600082815260208190526040902060010154610b618133610c85565b610a6f8383610e42565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610afc576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610bc53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610b27836001600160a01b038416610e7a565b60006001600160e01b031982167f7965db0b0000000000000000000000000000000000000000000000000000000014806103d357507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316146103d3565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610afc57610cc1816001600160a01b03166014610ec9565b610ccc836020610ec9565b604051602001610cdd929190611660565b60408051601f198184030181529082905262461bcd60e51b8252610426916004016116e1565b6000610b0a60055460095442610d199190611629565b610d239190611714565b600854610d30919061172b565b6006546110aa565b6040516001600160a01b038316602482015260448101829052610a6f9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b0319909316929092179091526110c0565b6040516001600160a01b0380851660248301528316604482015260648101829052610e1a9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401610d7d565b50505050565b610e2a8282610b6b565b6000828152600160205260409020610a6f9082610c09565b610e4c82826111a5565b6000828152600160205260409020610a6f9082611224565b6000610b278383611239565b60006103d3825490565b6000818152600183016020526040812054610ec1575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556103d3565b5060006103d3565b60606000610ed8836002611714565b610ee390600261172b565b67ffffffffffffffff811115610efb57610efb61173e565b6040519080825280601f01601f191660200182016040528015610f25576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110610f5c57610f5c611754565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110610fa757610fa7611754565b60200101906001600160f81b031916908160001a9053506000610fcb846002611714565b610fd690600161172b565b90505b600181111561105b577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061101757611017611754565b1a60f81b82828151811061102d5761102d611754565b60200101906001600160f81b031916908160001a90535060049490941c936110548161176a565b9050610fd9565b508315610b275760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610426565b60008183106110b95781610b27565b5090919050565b6000611115826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112639092919063ffffffff16565b805190915015610a6f57808060200190518101906111339190611781565b610a6f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610426565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610afc576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610b27836001600160a01b03841661127a565b600082600001828154811061125057611250611754565b9060005260206000200154905092915050565b6060611272848460008561136d565b949350505050565b6000818152600183016020526040812054801561136357600061129e600183611629565b85549091506000906112b290600190611629565b90508181146113175760008660000182815481106112d2576112d2611754565b90600052602060002001549050808760000184815481106112f5576112f5611754565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611328576113286117a3565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506103d3565b60009150506103d3565b6060824710156113e55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610426565b6001600160a01b0385163b61143c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610426565b600080866001600160a01b0316858760405161145891906117b9565b60006040518083038185875af1925050503d8060008114611495576040519150601f19603f3d011682016040523d82523d6000602084013e61149a565b606091505b50915091506114aa8282866114b5565b979650505050505050565b606083156114c4575081610b27565b8251156114d45782518084602001fd5b8160405162461bcd60e51b815260040161042691906116e1565b60006020828403121561150057600080fd5b81356001600160e01b031981168114610b2757600080fd5b80356001600160a01b038116811461152f57600080fd5b919050565b60008060006060848603121561154957600080fd5b61155284611518565b95602085013595506040909401359392505050565b60008060006060848603121561157c57600080fd5b505081359360208301359350604090920135919050565b6000602082840312156115a557600080fd5b5035919050565b600080604083850312156115bf57600080fd5b823591506115cf60208401611518565b90509250929050565b600080604083850312156115eb57600080fd5b50508035926020909101359150565b60006020828403121561160c57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156103d3576103d3611613565b60005b8381101561165757818101518382015260200161163f565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161169881601785016020880161163c565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516116d581602884016020880161163c565b01602801949350505050565b602081526000825180602084015261170081604085016020870161163c565b601f01601f19169190910160400192915050565b80820281158282048414176103d3576103d3611613565b808201808211156103d3576103d3611613565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008161177957611779611613565b506000190190565b60006020828403121561179357600080fd5b81518015158114610b2757600080fd5b634e487b7160e01b600052603160045260246000fd5b600082516117cb81846020870161163c565b919091019291505056fea2646970667358221220d0a1449cf983239e8ea9a427339c5933d331367d5c87b7509f49c10aad3acb5064736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000eeeeeb57642040be42185f49c52f7e9b38f8eeee0000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000002a5a058fc295ed00000000000000000000000000000000000000000000000000043c33c1937564800000
-----Decoded View---------------
Arg [0] : _tokenAddress (address): 0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE
Arg [1] : _rate (uint256): 10000000000000000000
Arg [2] : _cap (uint256): 200000000000000000000000
Arg [3] : _txLimit (uint256): 20000000000000000000000
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000eeeeeb57642040be42185f49c52f7e9b38f8eeee
Arg [1] : 0000000000000000000000000000000000000000000000008ac7230489e80000
Arg [2] : 000000000000000000000000000000000000000000002a5a058fc295ed000000
Arg [3] : 00000000000000000000000000000000000000000000043c33c1937564800000
Deployed Bytecode Sourcemap
61814:3551:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;59906:214;;;;;;:::i;:::-;;:::i;:::-;;;516:14:1;;509:22;491:41;;479:2;464:18;59906:214:0;;;;;;;;63855:691;;;;;;:::i;:::-;;:::i;:::-;;64554:336;;;;;;:::i;:::-;;:::i;63119:105::-;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;1769:55:1;;;1751:74;;1856:2;1841:18;;1834:34;;;;1724:18;63119:105:0;1577:297:1;54487:131:0;;;;;;:::i;:::-;54561:7;54588:12;;;;;;;;;;:22;;;;54487:131;;;;2025:25:1;;;2013:2;1998:18;54487:131:0;1879:177:1;63401:446:0;;;;;;:::i;:::-;;:::i;62095:19::-;;;;;;54880:147;;;;;;:::i;:::-;;:::i;62121:18::-;;;;;;55928:218;;;;;;:::i;:::-;;:::i;63011:100::-;;;:::i;62146:22::-;;;;;;60719:153;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;2919:55:1;;;2901:74;;2889:2;2874:18;60719:153:0;2755:226:1;53356:147:0;;;;;;:::i;:::-;53442:4;53466:12;;;;;;;;;;;-1:-1:-1;;;;;53466:29:0;;;;;;;;;;;;;;;53356:147;62024:36;;;;;-1:-1:-1;;;;;62024:36:0;;;52447:49;;52492:4;52447:49;;62322:62;;62360:24;62322:62;;61046:142;;;;;;:::i;:::-;;:::i;55272:149::-;;;;;;:::i;:::-;;:::i;62249:66::-;;62289:26;62249:66;;62067:19;;;;;-1:-1:-1;;;;;62067:19:0;;;59906:214;59991:4;-1:-1:-1;;;;;;60015:57:0;;60030:42;60015:57;;:97;;;60076:36;60100:11;60076:23;:36::i;:::-;60008:104;59906:214;-1:-1:-1;;59906:214:0:o;63855:691::-;2634:1;3232:7;;:19;3224:63;;;;-1:-1:-1;;;3224:63:0;;3433:2:1;3224:63:0;;;3415:21:1;3472:2;3452:18;;;3445:30;3511:33;3491:18;;;3484:61;3562:18;;3224:63:0;;;;;;;;;2634:1;3365:18;;62289:26:::1;52938:30;62289:26:::0;44746:10;52938::::1;:30::i;:::-;64001:7:::2;;63990;:18;;63982:93;;;::::0;-1:-1:-1;;;63982:93:0;;3793:2:1;63982:93:0::2;::::0;::::2;3775:21:1::0;3832:2;3812:18;;;3805:30;3871:34;3851:18;;;3844:62;3942:32;3922:18;;;3915:60;3992:19;;63982:93:0::2;3591:426:1::0;63982:93:0::2;64105:5;::::0;;:30:::2;::::0;-1:-1:-1;;;64105:30:0;;64129:4:::2;64105:30:::0;;::::2;2901:74:1::0;;;;-1:-1:-1;;;;;64105:5:0::2;::::0;:15:::2;::::0;2874:18:1;;64105:30:0::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;64094:7;:41;;64086:106;;;::::0;-1:-1:-1;;;64086:106:0;;4413:2:1;64086:106:0::2;::::0;::::2;4395:21:1::0;4452:2;4432:18;;;4425:30;4491:34;4471:18;;;4464:62;4562:22;4542:18;;;4535:50;4602:19;;64086:106:0::2;4211:416:1::0;64086:106:0::2;64203:23;64229:12;:10;:12::i;:::-;64203:38;;64271:15;64260:7;:26;;64252:103;;;::::0;;-1:-1:-1;;;64252:103:0;;4834:2:1;64252:103:0::2;::::0;::::2;4816:21:1::0;4853:18;;;4846:30;;;;4912:34;4892:18;;;4885:62;4983:34;4963:18;;;4956:62;5035:19;;64252:103:0::2;4632:428:1::0;64252:103:0::2;64384:25;64402:7:::0;64384:15;:25:::2;:::i;:::-;64368:13;:41:::0;64434:15:::2;64420:11;:29:::0;64462:5:::2;::::0;:32:::2;::::0;-1:-1:-1;;;;;64462:5:0::2;64481:3:::0;64486:7;64462:18:::2;:32::i;:::-;64510:28;::::0;;5561:25:1;;;5617:2;5602:18;;5595:34;;;-1:-1:-1;;;;;64510:28:0;::::2;::::0;::::2;::::0;5534:18:1;64510:28:0::2;;;;;;;-1:-1:-1::0;;2590:1:0;3544:7;:22;-1:-1:-1;;;63855:691:0:o;64554:336::-;2634:1;3232:7;;:19;3224:63;;;;-1:-1:-1;;;3224:63:0;;3433:2:1;3224:63:0;;;3415:21:1;3472:2;3452:18;;;3445:30;3511:33;3491:18;;;3484:61;3562:18;;3224:63:0;3231:355:1;3224:63:0;2634:1;3365:18;;62360:24:::1;52938:30;62360:24:::0;44746:10;52938::::1;:30::i;:::-;64695:4:::2;64683:8;:16;;64675:83;;;::::0;-1:-1:-1;;;64675:83:0;;5842:2:1;64675:83:0::2;::::0;::::2;5824:21:1::0;5881:2;5861:18;;;5854:30;5920:34;5900:18;;;5893:62;5991:24;5971:18;;;5964:52;6033:19;;64675:83:0::2;5640:418:1::0;64675:83:0::2;64769:4;:12:::0;;;64792:3:::2;:10:::0;;;64813:7:::2;:18:::0;;;64849:33:::2;::::0;;6265:25:1;;;6321:2;6306:18;;6299:34;;;6349:18;;;6342:34;;;64849:33:0::2;::::0;6253:2:1;6238:18;64849:33:0::2;;;;;;;-1:-1:-1::0;;2590:1:0;3544:7;:22;-1:-1:-1;;64554:336:0:o;63401:446::-;2634:1;3232:7;;:19;3224:63;;;;-1:-1:-1;;;3224:63:0;;3433:2:1;3224:63:0;;;3415:21:1;3472:2;3452:18;;;3445:30;3511:33;3491:18;;;3484:61;3562:18;;3224:63:0;3231:355:1;3224:63:0;2634:1;3365:18;;62289:26:::1;52938:30;62289:26:::0;44746:10;52938::::1;:30::i;:::-;63548:7:::2;;63537;:18;;63529:91;;;::::0;-1:-1:-1;;;63529:91:0;;6589:2:1;63529:91:0::2;::::0;::::2;6571:21:1::0;6628:2;6608:18;;;6601:30;6667:34;6647:18;;;6640:62;6738:30;6718:18;;;6711:58;6786:19;;63529:91:0::2;6387:424:1::0;63529:91:0::2;63650:5;::::0;;:22:::2;::::0;-1:-1:-1;;;63650:22:0;;-1:-1:-1;;;;;2919:55:1;;;63650:22:0;;::::2;2901:74:1::0;;;;63650:5:0;::::2;::::0;:15:::2;::::0;2874:18:1;;63650:22:0::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;63639:7;:33;;63631:96;;;::::0;-1:-1:-1;;;63631:96:0;;7018:2:1;63631:96:0::2;::::0;::::2;7000:21:1::0;7057:2;7037:18;;;7030:30;7096:34;7076:18;;;7069:62;7167:20;7147:18;;;7140:48;7205:19;;63631:96:0::2;6816:414:1::0;63631:96:0::2;63740:5;::::0;:53:::2;::::0;-1:-1:-1;;;;;63740:5:0::2;63763::::0;63778:4:::2;63785:7:::0;63740:22:::2;:53::i;:::-;63809:30;::::0;;5561:25:1;;;5617:2;5602:18;;5595:34;;;-1:-1:-1;;;;;63809:30:0;::::2;::::0;::::2;::::0;5534:18:1;63809:30:0::2;;;;;;;-1:-1:-1::0;;2590:1:0;3544:7;:22;-1:-1:-1;;63401:446:0:o;54880:147::-;54561:7;54588:12;;;;;;;;;;:22;;;52938:30;52949:4;44746:10;52938::::1;:30::i;:::-:0;54994:25:::1;55005:4;55011:7;54994:10;:25::i;:::-;54880:147:::0;;;:::o;55928:218::-;-1:-1:-1;;;;;56024:23:0;;44746:10;56024:23;56016:83;;;;-1:-1:-1;;;56016:83:0;;7437:2:1;56016:83:0;;;7419:21:1;7476:2;7456:18;;;7449:30;7515:34;7495:18;;;7488:62;7586:17;7566:18;;;7559:45;7621:19;;56016:83:0;7235:411:1;56016:83:0;56112:26;56124:4;56130:7;56112:11;:26::i;:::-;55928:218;;:::o;63011:100::-;63064:7;63091:12;:10;:12::i;:::-;63084:19;;63011:100;:::o;60719:153::-;60809:7;60836:18;;;:12;:18;;;;;:28;;60858:5;60836:21;:28::i;:::-;60829:35;60719:153;-1:-1:-1;;;60719:153:0:o;61046:142::-;61126:7;61153:18;;;:12;:18;;;;;:27;;:25;:27::i;55272:149::-;54561:7;54588:12;;;;;;;;;;:22;;;52938:30;52949:4;44746:10;52938::::1;:30::i;:::-:0;55387:26:::1;55399:4;55405:7;55387:11;:26::i;57429:238::-:0;53442:4;53466:12;;;;;;;;;;;-1:-1:-1;;;;;53466:29:0;;;;;;;;;;;;57508:152;;57552:6;:12;;;;;;;;;;;-1:-1:-1;;;;;57552:29:0;;;;;;;;;:36;;-1:-1:-1;;57552:36:0;57584:4;57552:36;;;57635:12;44746:10;;44666:98;57635:12;-1:-1:-1;;;;;57608:40:0;57626:7;-1:-1:-1;;;;;57608:40:0;57620:4;57608:40;;;;;;;;;;57429:238;;:::o;35188:152::-;35258:4;35282:50;35287:3;-1:-1:-1;;;;;35307:23:0;;35282:4;:50::i;53060:204::-;53145:4;-1:-1:-1;;;;;;53169:47:0;;53184:32;53169:47;;:87;;-1:-1:-1;41811:25:0;-1:-1:-1;;;;;;41796:40:0;;;53220:36;41687:157;53793:505;53442:4;53466:12;;;;;;;;;;;-1:-1:-1;;;;;53466:29:0;;;;;;;;;;;;53877:414;;54070:41;54098:7;-1:-1:-1;;;;;54070:41:0;54108:2;54070:19;:41::i;:::-;54184:38;54212:4;54219:2;54184:19;:38::i;:::-;53975:270;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;53975:270:0;;;;;;;;;;-1:-1:-1;;;53921:358:0;;;;;;;:::i;64959:148::-;65003:7;65030:69;65089:4;;65074:11;;65056:15;:29;;;;:::i;:::-;65055:38;;;;:::i;:::-;65039:13;;:54;;;;:::i;:::-;65095:3;;65030:8;:69::i;15678:211::-;15822:58;;-1:-1:-1;;;;;1769:55:1;;15822:58:0;;;1751:74:1;1841:18;;;1834:34;;;15795:86:0;;15815:5;;15845:23;;1724:18:1;;15822:58:0;;;;-1:-1:-1;;15822:58:0;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;15822:58:0;;;;;;;;;;15795:19;:86::i;15897:248::-;16068:68;;-1:-1:-1;;;;;9708:15:1;;;16068:68:0;;;9690:34:1;9760:15;;9740:18;;;9733:43;9792:18;;;9785:34;;;16041:96:0;;16061:5;;16091:27;;9602:18:1;;16068:68:0;9427:398:1;16041:96:0;15897:248;;;;:::o;61281:169::-;61369:31;61386:4;61392:7;61369:16;:31::i;:::-;61411:18;;;;:12;:18;;;;;:31;;61434:7;61411:22;:31::i;61544:174::-;61633:32;61651:4;61657:7;61633:17;:32::i;:::-;61676:18;;;;:12;:18;;;;;:34;;61702:7;61676:25;:34::i;36484:158::-;36558:7;36609:22;36613:3;36625:5;36609:3;:22::i;36013:117::-;36076:7;36103:19;36111:3;31497:18;;31414:109;29103:414;29166:4;31296:19;;;:12;;;:19;;;;;;29183:327;;-1:-1:-1;29226:23:0;;;;;;;;:11;:23;;;;;;;;;;;;;29409:18;;29387:19;;;:12;;;:19;;;;;;:40;;;;29442:11;;29183:327;-1:-1:-1;29493:5:0;29486:12;;43523:451;43598:13;43624:19;43656:10;43660:6;43656:1;:10;:::i;:::-;:14;;43669:1;43656:14;:::i;:::-;43646:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;43646:25:0;;43624:47;;43682:15;:6;43689:1;43682:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;43682:15:0;;;;;;;;;43708;:6;43715:1;43708:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;43708:15:0;;;;;;;;-1:-1:-1;43739:9:0;43751:10;43755:6;43751:1;:10;:::i;:::-;:14;;43764:1;43751:14;:::i;:::-;43739:26;;43734:135;43771:1;43767;:5;43734:135;;;43806:12;43819:5;43827:3;43819:11;43806:25;;;;;;;:::i;:::-;;;;43794:6;43801:1;43794:9;;;;;;;;:::i;:::-;;;;:37;-1:-1:-1;;;;;43794:37:0;;;;;;;;-1:-1:-1;43856:1:0;43846:11;;;;;43774:3;;;:::i;:::-;;;43734:135;;;-1:-1:-1;43887:10:0;;43879:55;;;;-1:-1:-1;;;43879:55:0;;10551:2:1;43879:55:0;;;10533:21:1;;;10570:18;;;10563:30;10629:34;10609:18;;;10602:62;10681:18;;43879:55:0;10349:356:1;26518:106:0;26576:7;26607:1;26603;:5;:13;;26615:1;26603:13;;;-1:-1:-1;26611:1:0;;26518:106;-1:-1:-1;26518:106:0:o;18251:716::-;18675:23;18701:69;18729:4;18701:69;;;;;;;;;;;;;;;;;18709:5;-1:-1:-1;;;;;18701:27:0;;;:69;;;;;:::i;:::-;18785:17;;18675:95;;-1:-1:-1;18785:21:0;18781:179;;18882:10;18871:30;;;;;;;;;;;;:::i;:::-;18863:85;;;;-1:-1:-1;;;18863:85:0;;11194:2:1;18863:85:0;;;11176:21:1;11233:2;11213:18;;;11206:30;11272:34;11252:18;;;11245:62;11343:12;11323:18;;;11316:40;11373:19;;18863:85:0;10992:406:1;57799:239:0;53442:4;53466:12;;;;;;;;;;;-1:-1:-1;;;;;53466:29:0;;;;;;;;;;;;57879:152;;;57954:5;57922:12;;;;;;;;;;;-1:-1:-1;;;;;57922:29:0;;;;;;;;;;:37;;-1:-1:-1;;57922:37:0;;;57979:40;44746:10;;57922:12;;57979:40;;57954:5;57979:40;57799:239;;:::o;35516:158::-;35589:4;35613:53;35621:3;-1:-1:-1;;;;;35641:23:0;;35613:7;:53::i;31877:120::-;31944:7;31971:3;:11;;31983:5;31971:18;;;;;;;;:::i;:::-;;;;;;;;;31964:25;;31877:120;;;;:::o;7565:229::-;7702:12;7734:52;7756:6;7764:4;7770:1;7773:12;7734:21;:52::i;:::-;7727:59;7565:229;-1:-1:-1;;;;7565:229:0:o;29693:1420::-;29759:4;29898:19;;;:12;;;:19;;;;;;29934:15;;29930:1176;;30309:21;30333:14;30346:1;30333:10;:14;:::i;:::-;30382:18;;30309:38;;-1:-1:-1;30362:17:0;;30382:22;;30403:1;;30382:22;:::i;:::-;30362:42;;30438:13;30425:9;:26;30421:405;;30472:17;30492:3;:11;;30504:9;30492:22;;;;;;;;:::i;:::-;;;;;;;;;30472:42;;30646:9;30617:3;:11;;30629:13;30617:26;;;;;;;;:::i;:::-;;;;;;;;;;;;:38;;;;30731:23;;;:12;;;:23;;;;;:36;;;30421:405;30907:17;;:3;;:17;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;31002:3;:12;;:19;31015:5;31002:19;;;;;;;;;;;30995:26;;;31045:4;31038:11;;;;;;;29930:1176;31089:5;31082:12;;;;;8685:510;8855:12;8913:5;8888:21;:30;;8880:81;;;;-1:-1:-1;;;8880:81:0;;11794:2:1;8880:81:0;;;11776:21:1;11833:2;11813:18;;;11806:30;11872:34;11852:18;;;11845:62;11943:8;11923:18;;;11916:36;11969:19;;8880:81:0;11592:402:1;8880:81:0;-1:-1:-1;;;;;5115:19:0;;;8972:60;;;;-1:-1:-1;;;8972:60:0;;12201:2:1;8972:60:0;;;12183:21:1;12240:2;12220:18;;;12213:30;12279:31;12259:18;;;12252:59;12328:18;;8972:60:0;11999:353:1;8972:60:0;9046:12;9060:23;9087:6;-1:-1:-1;;;;;9087:11:0;9106:5;9113:4;9087:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9045:73;;;;9136:51;9153:7;9162:10;9174:12;9136:16;:51::i;:::-;9129:58;8685:510;-1:-1:-1;;;;;;;8685:510:0:o;11371:712::-;11521:12;11550:7;11546:530;;;-1:-1:-1;11581:10:0;11574:17;;11546:530;11695:17;;:21;11691:374;;11893:10;11887:17;11954:15;11941:10;11937:2;11933:19;11926:44;11691:374;12036:12;12029:20;;-1:-1:-1;;;12029:20:0;;;;;;;;:::i;14:332:1:-;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;180:9;167:23;-1:-1:-1;;;;;;223:5:1;219:78;212:5;209:89;199:117;;312:1;309;302:12;543:196;611:20;;-1:-1:-1;;;;;660:54:1;;650:65;;640:93;;729:1;726;719:12;640:93;543:196;;;:::o;744:322::-;821:6;829;837;890:2;878:9;869:7;865:23;861:32;858:52;;;906:1;903;896:12;858:52;929:29;948:9;929:29;:::i;:::-;919:39;1005:2;990:18;;977:32;;-1:-1:-1;1056:2:1;1041:18;;;1028:32;;744:322;-1:-1:-1;;;744:322:1:o;1071:316::-;1148:6;1156;1164;1217:2;1205:9;1196:7;1192:23;1188:32;1185:52;;;1233:1;1230;1223:12;1185:52;-1:-1:-1;;1256:23:1;;;1326:2;1311:18;;1298:32;;-1:-1:-1;1377:2:1;1362:18;;;1349:32;;1071:316;-1:-1:-1;1071:316:1:o;1392:180::-;1451:6;1504:2;1492:9;1483:7;1479:23;1475:32;1472:52;;;1520:1;1517;1510:12;1472:52;-1:-1:-1;1543:23:1;;1392:180;-1:-1:-1;1392:180:1:o;2243:254::-;2311:6;2319;2372:2;2360:9;2351:7;2347:23;2343:32;2340:52;;;2388:1;2385;2378:12;2340:52;2424:9;2411:23;2401:33;;2453:38;2487:2;2476:9;2472:18;2453:38;:::i;:::-;2443:48;;2243:254;;;;;:::o;2502:248::-;2570:6;2578;2631:2;2619:9;2610:7;2606:23;2602:32;2599:52;;;2647:1;2644;2637:12;2599:52;-1:-1:-1;;2670:23:1;;;2740:2;2725:18;;;2712:32;;-1:-1:-1;2502:248:1:o;4022:184::-;4092:6;4145:2;4133:9;4124:7;4120:23;4116:32;4113:52;;;4161:1;4158;4151:12;4113:52;-1:-1:-1;4184:16:1;;4022:184;-1:-1:-1;4022:184:1:o;5065:::-;-1:-1:-1;;;5114:1:1;5107:88;5214:4;5211:1;5204:15;5238:4;5235:1;5228:15;5254:128;5321:9;;;5342:11;;;5339:37;;;5356:18;;:::i;7651:250::-;7736:1;7746:113;7760:6;7757:1;7754:13;7746:113;;;7836:11;;;7830:18;7817:11;;;7810:39;7782:2;7775:10;7746:113;;;-1:-1:-1;;7893:1:1;7875:16;;7868:27;7651:250::o;7906:812::-;8317:25;8312:3;8305:38;8287:3;8372:6;8366:13;8388:75;8456:6;8451:2;8446:3;8442:12;8435:4;8427:6;8423:17;8388:75;:::i;:::-;8527:19;8522:2;8482:16;;;8514:11;;;8507:40;8572:13;;8594:76;8572:13;8656:2;8648:11;;8641:4;8629:17;;8594:76;:::i;:::-;8690:17;8709:2;8686:26;;7906:812;-1:-1:-1;;;;7906:812:1:o;8723:396::-;8872:2;8861:9;8854:21;8835:4;8904:6;8898:13;8947:6;8942:2;8931:9;8927:18;8920:34;8963:79;9035:6;9030:2;9019:9;9015:18;9010:2;9002:6;8998:15;8963:79;:::i;:::-;9103:2;9082:15;-1:-1:-1;;9078:29:1;9063:45;;;;9110:2;9059:54;;8723:396;-1:-1:-1;;8723:396:1:o;9124:168::-;9197:9;;;9228;;9245:15;;;9239:22;;9225:37;9215:71;;9266:18;;:::i;9297:125::-;9362:9;;;9383:10;;;9380:36;;;9396:18;;:::i;9830:184::-;-1:-1:-1;;;9879:1:1;9872:88;9979:4;9976:1;9969:15;10003:4;10000:1;9993:15;10019:184;-1:-1:-1;;;10068:1:1;10061:88;10168:4;10165:1;10158:15;10192:4;10189:1;10182:15;10208:136;10247:3;10275:5;10265:39;;10284:18;;:::i;:::-;-1:-1:-1;;;10320:18:1;;10208:136::o;10710:277::-;10777:6;10830:2;10818:9;10809:7;10805:23;10801:32;10798:52;;;10846:1;10843;10836:12;10798:52;10878:9;10872:16;10931:5;10924:13;10917:21;10910:5;10907:32;10897:60;;10953:1;10950;10943:12;11403:184;-1:-1:-1;;;11452:1:1;11445:88;11552:4;11549:1;11542:15;11576:4;11573:1;11566:15;12357:287;12486:3;12524:6;12518:13;12540:66;12599:6;12594:3;12587:4;12579:6;12575:17;12540:66;:::i;:::-;12622:16;;;;;12357:287;-1:-1:-1;;12357:287:1:o
Swarm Source
ipfs://d0a1449cf983239e8ea9a427339c5933d331367d5c87b7509f49c10aad3acb50
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
MOVR | 16.17% | $0.078284 | 42,313,516.8659 | $3,312,471.35 | |
CRONOS | 16.04% | $0.078541 | 41,846,615.9054 | $3,286,675.06 | |
FTM | 16.03% | $0.078875 | 41,639,692.085 | $3,284,330.71 | |
GNO | 15.98% | $0.078875 | 41,510,015.4793 | $3,274,102.47 | |
ETH | 15.92% | $0.078689 | 41,456,504.1443 | $3,262,182.47 | |
POL | 15.34% | $0.078875 | 39,845,795.0006 | $3,142,837.08 | |
AVAX | 4.52% | $0.078541 | 11,779,160.0164 | $925,147.01 |
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.