Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 13 from a total of 13 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Approve | 18855235 | 388 days ago | IN | 0 ETH | 0.00094273 | ||||
Approve | 16368680 | 737 days ago | IN | 0 ETH | 0.00069455 | ||||
Transfer | 15645234 | 838 days ago | IN | 0 ETH | 0.00057122 | ||||
Approve | 13447943 | 1184 days ago | IN | 0 ETH | 0.00265785 | ||||
Approve | 13290515 | 1209 days ago | IN | 0 ETH | 0.00342932 | ||||
Approve | 12760226 | 1291 days ago | IN | 0 ETH | 0.00046288 | ||||
Approve | 12754168 | 1292 days ago | IN | 0 ETH | 0.00046288 | ||||
Approve | 12667907 | 1306 days ago | IN | 0 ETH | 0.00046288 | ||||
Approve | 12660994 | 1307 days ago | IN | 0 ETH | 0.00066191 | ||||
Approve | 12627099 | 1312 days ago | IN | 0 ETH | 0.00029026 | ||||
Approve | 12627099 | 1312 days ago | IN | 0 ETH | 0.00050916 | ||||
Approve | 12528004 | 1327 days ago | IN | 0 ETH | 0.00092576 | ||||
Approve | 12470949 | 1336 days ago | IN | 0 ETH | 0.0026847 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
12458326 | 1338 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xf73183AC...5a859cEd0 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
JTrancheBToken
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-11-01 */ // SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * ////IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * SourceUnit: /home/fabio/Jibrel/tranche-compound-protocol/contracts/JTrancheBToken.sol */ ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [////IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * ////IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * SourceUnit: /home/fabio/Jibrel/tranche-compound-protocol/contracts/JTrancheBToken.sol */ ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT // solhint-disable-next-line compiler-version pragma solidity >=0.4.24 <0.8.0; ////import "../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } } /** * SourceUnit: /home/fabio/Jibrel/tranche-compound-protocol/contracts/JTrancheBToken.sol */ ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT pragma solidity >=0.6.0 <0.8.0; ////import "../proxy/Initializable.sol"; /* * @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 GSN 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 ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } uint256[50] private __gap; } /** * SourceUnit: /home/fabio/Jibrel/tranche-compound-protocol/contracts/JTrancheBToken.sol */ ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT pragma solidity >=0.6.0 <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 EnumerableSetUpgradeable { // 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; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. 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] = toDeleteIndex + 1; // All indexes are 1-based // 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) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // 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); } // 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)))); } // 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)); } } /** * SourceUnit: /home/fabio/Jibrel/tranche-compound-protocol/contracts/JTrancheBToken.sol */ ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMathUpgradeable { /** * @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) { 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) { 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) { // 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) { 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) { 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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); 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) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); 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) { require(b > 0, "SafeMath: modulo by zero"); 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) { 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. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); 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) { require(b > 0, errorMessage); return a % b; } } /** * SourceUnit: /home/fabio/Jibrel/tranche-compound-protocol/contracts/JTrancheBToken.sol */ ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT pragma solidity 0.6.12; ////import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; contract JTrancheBTokenStorage { /* WARNING: NEVER RE-ORDER VARIABLES! Always double-check that new variables are added APPEND-ONLY. Re-ordering variables can permanently BREAK the deployed proxy contract.*/ // optimize, see https://github.com/ethereum/EIPs/issues/1726#issuecomment-472352728 uint256 constant public pointsMultiplier = 2**128; // Create a new role identifier for the minter role bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); uint256 public pointsPerShare; mapping(address => int256) public pointsCorrection; mapping(address => uint256) public withdrawnFunds; // token in which the funds can be sent to the FundsDistributionToken IERC20Upgradeable public rewardsToken; // balance of rewardsToken that the FundsDistributionToken currently holds uint256 public rewardsTokenBalance; } /** * SourceUnit: /home/fabio/Jibrel/tranche-compound-protocol/contracts/JTrancheBToken.sol */ ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT pragma solidity 0.6.12; interface IFDTBasic { /** * @dev Returns the total amount of funds a given address is able to withdraw currently. * @param owner Address of FundsDistributionToken holder * @return A uint256 representing the available funds for a given account */ function withdrawableFundsOf(address owner) external view returns (uint256); /** * @dev This event emits when new funds are distributed * @param by the address of the sender who distributed funds * @param fundsDistributed the amount of funds received for distribution */ event FundsDistributed(address indexed by, uint256 fundsDistributed); /** * @dev This event emits when distributed funds are withdrawn by a token holder. * @param by the address of the receiver of funds * @param fundsWithdrawn the amount of funds that were withdrawn */ event FundsWithdrawn(address indexed by, uint256 fundsWithdrawn); } /** * SourceUnit: /home/fabio/Jibrel/tranche-compound-protocol/contracts/JTrancheBToken.sol */ ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT pragma solidity 0.6.12; /** * @title SafeMathInt * @dev Math operations with safety checks that revert on error * @dev SafeMath adapted for int256 * Based on code of https://github.com/RequestNetwork/requestNetwork/blob/master/packages/requestNetworkSmartContracts/contracts/base/math/SafeMathInt.sol */ library SafeMathInt { function mul(int256 a, int256 b) internal pure returns (int256) { // Prevent overflow when multiplying INT256_MIN with -1 // https://github.com/RequestNetwork/requestNetwork/issues/43 require(!(a == - 2**255 && b == -1) && !(b == - 2**255 && a == -1)); int256 c = a * b; require((b == 0) || (c / b == a)); return c; } function div(int256 a, int256 b) internal pure returns (int256) { // Prevent overflow when dividing INT256_MIN by -1 // https://github.com/RequestNetwork/requestNetwork/issues/43 require(!(a == - 2**255 && b == -1) && (b > 0)); return a / b; } function sub(int256 a, int256 b) internal pure returns (int256) { require((b >= 0 && a - b <= a) || (b < 0 && a - b > a)); return a - b; } function add(int256 a, int256 b) internal pure returns (int256) { int256 c = a + b; require((b >= 0 && c >= a) || (b < 0 && c < a)); return c; } function toUint256Safe(int256 a) internal pure returns (uint256) { require(a >= 0); return uint256(a); } } /** * SourceUnit: /home/fabio/Jibrel/tranche-compound-protocol/contracts/JTrancheBToken.sol */ ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT pragma solidity 0.6.12; /** * @title SafeMathUint * @dev Math operations with safety checks that revert on error */ library SafeMathUint { function toInt256Safe(uint256 a) internal pure returns (int256) { int256 b = int256(a); require(b >= 0); return b; } } /** * SourceUnit: /home/fabio/Jibrel/tranche-compound-protocol/contracts/JTrancheBToken.sol */ ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT /** * Created on 2021-01-16 * @summary: JTranches Interface * @author: Jibrel Team */ pragma solidity 0.6.12; interface IJTrancheTokens { function mint(address account, uint256 value) external; function burn(uint256 value) external; function updateFundsReceived() external; function emergencyTokenTransfer(address _token, address _to, uint256 _amount) external; function setRewardTokenAddress(address _token) external; } /** * SourceUnit: /home/fabio/Jibrel/tranche-compound-protocol/contracts/JTrancheBToken.sol */ ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT pragma solidity >=0.6.0 <0.8.0; ////import "../utils/EnumerableSetUpgradeable.sol"; ////import "../utils/AddressUpgradeable.sol"; ////import "../utils/ContextUpgradeable.sol"; ////import "../proxy/Initializable.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * 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 AccessControlUpgradeable is Initializable, ContextUpgradeable { function __AccessControl_init() internal initializer { __Context_init_unchained(); __AccessControl_init_unchained(); } function __AccessControl_init_unchained() internal initializer { } using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; using AddressUpgradeable for address; struct RoleData { EnumerableSetUpgradeable.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @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 {_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) public view returns (bool) { return _roles[role].members.contains(account); } /** * @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 returns (uint256) { return _roles[role].members.length(); } /** * @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 returns (address) { return _roles[role].members.at(index); } /** * @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 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 { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant"); _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 { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke"); _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 granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual { 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}. * ==== */ 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 { emit RoleAdminChanged(role, _roles[role].adminRole, adminRole); _roles[role].adminRole = adminRole; } function _grantRole(bytes32 role, address account) private { if (_roles[role].members.add(account)) { emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) private { if (_roles[role].members.remove(account)) { emit RoleRevoked(role, account, _msgSender()); } } uint256[49] private __gap; } /** * SourceUnit: /home/fabio/Jibrel/tranche-compound-protocol/contracts/JTrancheBToken.sol */ ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT pragma solidity >=0.6.0 <0.8.0; ////import "../utils/ContextUpgradeable.sol"; ////import "../proxy/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), 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 { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } uint256[49] private __gap; } /** * SourceUnit: /home/fabio/Jibrel/tranche-compound-protocol/contracts/JTrancheBToken.sol */ ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT pragma solidity >=0.6.0 <0.8.0; ////import "../../utils/ContextUpgradeable.sol"; ////import "./IERC20Upgradeable.sol"; ////import "../../math/SafeMathUpgradeable.sol"; ////import "../../proxy/Initializable.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable { using SafeMathUpgradeable for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ function __ERC20_init(string memory name_, string memory symbol_) internal initializer { __Context_init_unchained(); __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal virtual { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } uint256[44] private __gap; } /** * SourceUnit: /home/fabio/Jibrel/tranche-compound-protocol/contracts/JTrancheBToken.sol */ ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT pragma solidity 0.6.12; ////import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; ////import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; ////import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; ////import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; ////import "./interfaces/IJTrancheTokens.sol"; ////import "./math/SafeMathUint.sol"; ////import "./math/SafeMathInt.sol"; ////import "./interfaces/IFDTBasic.sol"; ////import "./JTrancheBTokenStorage.sol"; contract JTrancheBToken is IFDTBasic, OwnableUpgradeable, ERC20Upgradeable, AccessControlUpgradeable, JTrancheBTokenStorage, IJTrancheTokens { using SafeMathUpgradeable for uint256; using SafeMathUint for uint256; using SafeMathInt for int256; function initialize(string memory name, string memory symbol) external initializer() { OwnableUpgradeable.__Ownable_init(); __ERC20_init(name, symbol); // Grant the minter role to a specified account _setupRole(MINTER_ROLE, msg.sender); } function setJCompoundMinter(address _jCompound) external onlyOwner { // Grant the minter role to a specified account _setupRole(MINTER_ROLE, _jCompound); } function setRewardTokenAddress(address _token) external override onlyOwner { //rewardsTokenAddress = _token; rewardsToken = IERC20Upgradeable(_token); } /** * prev. distributeDividends * @notice Distributes funds to token holders. * @dev It reverts if the total supply of tokens is 0. * It emits the `FundsDistributed` event if the amount of received ether is greater than 0. * About undistributed funds: * In each distribution, there is a small amount of funds which does not get distributed, * which is `(msg.value * pointsMultiplier) % totalSupply()`. * With a well-chosen `pointsMultiplier`, the amount funds that are not getting distributed * in a distribution can be less than 1 (base unit). * We can actually keep track of the undistributed ether in a distribution * and try to distribute it in the next distribution ....... todo implement */ function _distributeFunds(uint256 value) internal { require(totalSupply() > 0, "JTrancheB: supply is zero"); if (value > 0) { pointsPerShare = pointsPerShare.add(value.mul(pointsMultiplier) / totalSupply()); emit FundsDistributed(msg.sender, value); } } /** * prev. withdrawDividend * @notice Prepares funds withdrawal * @dev It emits a `FundsWithdrawn` event if the amount of withdrawn ether is greater than 0. */ function _prepareWithdraw() internal returns (uint256) { uint256 _withdrawableDividend = withdrawableFundsOf(msg.sender); withdrawnFunds[msg.sender] = withdrawnFunds[msg.sender].add(_withdrawableDividend); emit FundsWithdrawn(msg.sender, _withdrawableDividend); return _withdrawableDividend; } /** * prev. withdrawableDividendOf * @notice View the amount of funds that an address can withdraw. * @param _owner The address of a token holder. * @return The amount funds that `_owner` can withdraw. */ function withdrawableFundsOf(address _owner) public view override returns(uint256) { return accumulativeFundsOf(_owner).sub(withdrawnFunds[_owner]); } /** * prev. withdrawnDividendOf * @notice View the amount of funds that an address has withdrawn. * @param _owner The address of a token holder. * @return The amount of funds that `_owner` has withdrawn. */ function withdrawnFundsOf(address _owner) public view returns(uint256) { return withdrawnFunds[_owner]; } /** * prev. accumulativeDividendOf * @notice View the amount of funds that an address has earned in total. * @dev accumulativeFundsOf(_owner) = withdrawableFundsOf(_owner) + withdrawnFundsOf(_owner) * = (pointsPerShare * balanceOf(_owner) + pointsCorrection[_owner]) / pointsMultiplier * @param _owner The address of a token holder. * @return The amount of funds that `_owner` has earned in total. */ function accumulativeFundsOf(address _owner) public view returns(uint256) { return pointsPerShare.mul(balanceOf(_owner)).toInt256Safe().add(pointsCorrection[_owner]).toUint256Safe() / pointsMultiplier; } /** * @dev Internal function that transfer tokens from one address to another. * Update pointsCorrection to keep funds unchanged. * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal override { super._transfer(from, to, value); int256 _magCorrection = pointsPerShare.mul(value).toInt256Safe(); pointsCorrection[from] = pointsCorrection[from].add(_magCorrection); pointsCorrection[to] = pointsCorrection[to].sub(_magCorrection); } /** * @dev mints tokens to an account. * Update pointsCorrection to keep funds unchanged. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function mint(address account, uint256 value) external override { require(hasRole(MINTER_ROLE, msg.sender), "JTrancheB: caller is not a minter"); require(value > 0, "JTrancheB: value is zero"); super._mint(account, value); pointsCorrection[account] = pointsCorrection[account].sub((pointsPerShare.mul(value)).toInt256Safe()); } /** * @dev Internal function that burns an amount of the token of a given account. * Update pointsCorrection to keep funds unchanged. * @param value The amount that will be burnt. */ function burn(uint256 value) external override { require(value > 0, "JTrancheB: value is zero"); super._burn(msg.sender, value); pointsCorrection[msg.sender] = pointsCorrection[msg.sender].add( (pointsPerShare.mul(value)).toInt256Safe() ); } /** * @notice Withdraws all available funds for a token holder */ function withdrawFunds() external { uint256 withdrawableFunds = _prepareWithdraw(); require(rewardsToken.transfer(msg.sender, withdrawableFunds), "JTrancheB: withdraw funds transfer failed"); _updateFundsTokenBalance(); } /** * @dev Updates the current funds token balance * and returns the difference of new and previous funds token balances * @return A int256 representing the difference of the new and previous funds token balance */ function _updateFundsTokenBalance() internal returns (int256) { uint256 prevFundsTokenBalance = rewardsTokenBalance; rewardsTokenBalance = rewardsToken.balanceOf(address(this)); return int256(rewardsTokenBalance).sub(int256(prevFundsTokenBalance)); } /** * @notice Register a payment of funds in tokens. May be called directly after a deposit is made. * @dev Calls _updateFundsTokenBalance(), whereby the contract computes the delta of the previous and the new * funds token balance and increments the total received funds (cumulative) by delta by calling _registerFunds() */ function updateFundsReceived() external override { int256 newFunds = _updateFundsTokenBalance(); if (newFunds > 0) { _distributeFunds(newFunds.toUint256Safe()); } } /** * @notice Emergency function to withdraw stuck tokens. It should be callable only by protocol * @param _token token address * @param _to receiver address * @param _amount token amount */ function emergencyTokenTransfer(address _token, address _to, uint256 _amount) public override { require(hasRole(MINTER_ROLE, msg.sender), "JTrancheB: Caller is not protocol"); if(_token != address(0)) IERC20Upgradeable(_token).transfer(_to, _amount); else { bool sent = payable(_to).send(_amount); require(sent, "Failed to send Ether"); } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"by","type":"address"},{"indexed":false,"internalType":"uint256","name":"fundsDistributed","type":"uint256"}],"name":"FundsDistributed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"by","type":"address"},{"indexed":false,"internalType":"uint256","name":"fundsWithdrawn","type":"uint256"}],"name":"FundsWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"accumulativeFundsOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyTokenTransfer","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"pointsCorrection","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pointsMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pointsPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_jCompound","type":"address"}],"name":"setJCompoundMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"setRewardTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateFundsReceived","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"withdrawableFundsOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"withdrawnFunds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"withdrawnFundsOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102475760003560e01c80637e245d791161013b578063a9059cbb116100b8578063d2fe0c111161007c578063d2fe0c1114610800578063d539139314610826578063d547741f1461082e578063dd62ed3e1461085a578063f2fde38b1461088857610247565b8063a9059cbb14610781578063b182eb91146107ad578063b8b57376146107d3578063ca15c873146107db578063d1af0c7d146107f857610247565b806395d89b41116100ff57806395d89b41146106e95780639a6acf20146106f1578063a217fddf14610717578063a3d5b2551461071f578063a457c2d71461075557610247565b80637e245d791461066657806386cdb33d1461066e5780638da5cb5b146106765780639010d07c1461069a57806391d14854146106bd57610247565b806336568abe116101c957806346c162de1161018d57806346c162de146104dd5780634cd88b76146104e55780634e97415f1461061257806370a0823114610638578063715018a61461065e57610247565b806336568abe14610416578063395093511461044257806340c10f191461046e57806342966c681461049a578063443bb293146104b757610247565b806323b872dd1161021057806323b872dd1461036f57806324600fc3146103a5578063248a9ca3146103af5780632f2ff15d146103cc578063313ce567146103f857610247565b806241c52c1461024c57806306fdde0314610284578063095ea7b3146103015780630d6b85ae1461034157806318160ddd14610367575b600080fd5b6102726004803603602081101561026257600080fd5b50356001600160a01b03166108ae565b60408051918252519081900360200190f35b61028c6108c9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102c65781810151838201526020016102ae565b50505050905090810190601f1680156102f35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61032d6004803603604081101561031757600080fd5b506001600160a01b03813516906020013561095f565b604080519115158252519081900360200190f35b6102726004803603602081101561035757600080fd5b50356001600160a01b031661097d565b61027261098f565b61032d6004803603606081101561038557600080fd5b506001600160a01b03813581169160208101359091169060400135610995565b6103ad610a1c565b005b610272600480360360208110156103c557600080fd5b5035610af0565b6103ad600480360360408110156103e257600080fd5b50803590602001356001600160a01b0316610b05565b610400610b6d565b6040805160ff9092168252519081900360200190f35b6103ad6004803603604081101561042c57600080fd5b50803590602001356001600160a01b0316610b76565b61032d6004803603604081101561045857600080fd5b506001600160a01b038135169060200135610bd7565b6103ad6004803603604081101561048457600080fd5b506001600160a01b038135169060200135610c25565b6103ad600480360360208110156104b057600080fd5b5035610d31565b610272600480360360208110156104cd57600080fd5b50356001600160a01b0316610dcf565b6103ad610dfb565b6103ad600480360360408110156104fb57600080fd5b81019060208101813564010000000081111561051657600080fd5b82018360208201111561052857600080fd5b8035906020019184600183028401116401000000008311171561054a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561059d57600080fd5b8201836020820111156105af57600080fd5b803590602001918460018302840111640100000000831117156105d157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610e24945050505050565b6102726004803603602081101561062857600080fd5b50356001600160a01b0316610ef2565b6102726004803603602081101561064e57600080fd5b50356001600160a01b0316610f4a565b6103ad610f65565b610272611011565b610272611017565b61067e61101f565b604080516001600160a01b039092168252519081900360200190f35b61067e600480360360408110156106b057600080fd5b508035906020013561102e565b61032d600480360360408110156106d357600080fd5b50803590602001356001600160a01b031661104d565b61028c611065565b6103ad6004803603602081101561070757600080fd5b50356001600160a01b03166110c6565b61027261114a565b6103ad6004803603606081101561073557600080fd5b506001600160a01b0381358116916020810135909116906040013561114f565b61032d6004803603604081101561076b57600080fd5b506001600160a01b0381351690602001356112b2565b61032d6004803603604081101561079757600080fd5b506001600160a01b03813516906020013561131a565b610272600480360360208110156107c357600080fd5b50356001600160a01b031661132e565b610272611340565b610272600480360360208110156107f157600080fd5b5035611346565b61067e61135d565b6103ad6004803603602081101561081657600080fd5b50356001600160a01b031661136c565b6102726113e6565b6103ad6004803603604081101561084457600080fd5b50803590602001356001600160a01b03166113f8565b6102726004803603604081101561087057600080fd5b506001600160a01b0381358116916020013516611451565b6103ad6004803603602081101561089e57600080fd5b50356001600160a01b031661147c565b6001600160a01b0316600090815260cb602052604090205490565b60688054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109555780601f1061092a57610100808354040283529160200191610955565b820191906000526020600020905b81548152906001019060200180831161093857829003601f168201915b5050505050905090565b600061097361096c61157f565b8484611583565b5060015b92915050565b60cb6020526000908152604090205481565b60675490565b60006109a284848461166f565b610a12846109ae61157f565b610a0d8560405180606001604052806028815260200161271e602891396001600160a01b038a166000908152606660205260408120906109ec61157f565b6001600160a01b03168152602081019190915260400160002054919061170b565b611583565b5060019392505050565b6000610a266117a2565b60cc546040805163a9059cbb60e01b81523360048201526024810184905290519293506001600160a01b039091169163a9059cbb916044808201926020929091908290030181600087803b158015610a7d57600080fd5b505af1158015610a91573d6000803e3d6000fd5b505050506040513d6020811015610aa757600080fd5b5051610ae45760405162461bcd60e51b81526004018080602001828103825260298152602001806126a66029913960400191505060405180910390fd5b610aec611819565b5050565b60009081526097602052604090206002015490565b600082815260976020526040902060020154610b2890610b2361157f565b61104d565b610b635760405162461bcd60e51b815260040180806020018281038252602f8152602001806125b7602f913960400191505060405180910390fd5b610aec82826118a9565b606a5460ff1690565b610b7e61157f565b6001600160a01b0316816001600160a01b031614610bcd5760405162461bcd60e51b815260040180806020018281038252602f815260200180612858602f913960400191505060405180910390fd5b610aec8282611912565b6000610973610be461157f565b84610a0d8560666000610bf561157f565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549061197b565b610c3d6000805160206127668339815191523361104d565b610c785760405162461bcd60e51b81526004018080602001828103825260218152602001806128126021913960400191505060405180910390fd5b60008111610cc8576040805162461bcd60e51b81526020600482015260186024820152774a5472616e636865423a2076616c7565206973207a65726f60401b604482015290519081900360640190fd5b610cd282826119d5565b610d11610cf2610ced8360c954611ac790919063ffffffff16565b611b20565b6001600160a01b038416600090815260ca602052604090205490611b30565b6001600160a01b03909216600090815260ca602052604090209190915550565b60008111610d81576040805162461bcd60e51b81526020600482015260186024820152774a5472616e636865423a2076616c7565206973207a65726f60401b604482015290519081900360640190fd5b610d8b3382611b6a565b610dbc610da6610ced8360c954611ac790919063ffffffff16565b33600090815260ca602052604090205490611c66565b33600090815260ca602052604090205550565b6001600160a01b038116600090815260cb602052604081205461097790610df584610ef2565b90611c99565b6000610e05611819565b90506000811315610e2157610e21610e1c82611cf0565b611d03565b50565b600054610100900460ff1680610e3d5750610e3d611dcc565b80610e4b575060005460ff16155b610e865760405162461bcd60e51b815260040180806020018281038252602e8152602001806126cf602e913960400191505060405180910390fd5b600054610100900460ff16158015610eb1576000805460ff1961ff0019909116610100171660011790555b610eb9611ddd565b610ec38383611e8e565b610edb60008051602061276683398151915233610b63565b8015610eed576000805461ff00191690555b505050565b6001600160a01b038116600090815260ca6020526040812054600160801b90610f3c90610f3790610f31610ced610f2888610f4a565b60c95490611ac7565b90611c66565b611cf0565b81610f4357fe5b0492915050565b6001600160a01b031660009081526065602052604090205490565b610f6d61157f565b6001600160a01b0316610f7e61101f565b6001600160a01b031614610fc7576040805162461bcd60e51b81526020600482018190526024820152600080516020612746833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b60c95481565b600160801b81565b6033546001600160a01b031690565b60008281526097602052604081206110469083611f2d565b9392505050565b60008281526097602052604081206110469083611f39565b60698054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109555780601f1061092a57610100808354040283529160200191610955565b6110ce61157f565b6001600160a01b03166110df61101f565b6001600160a01b031614611128576040805162461bcd60e51b81526020600482018190526024820152600080516020612746833981519152604482015290519081900360640190fd5b60cc80546001600160a01b0319166001600160a01b0392909216919091179055565b600081565b6111676000805160206127668339815191523361104d565b6111a25760405162461bcd60e51b81526004018080602001828103825260228152602001806127866022913960400191505060405180910390fd5b6001600160a01b0383161561123a57826001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561120857600080fd5b505af115801561121c573d6000803e3d6000fd5b505050506040513d602081101561123257600080fd5b50610eed9050565b6040516000906001600160a01b0384169083156108fc0290849084818181858888f193505050509050806112ac576040805162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b604482015290519081900360640190fd5b50505050565b60006109736112bf61157f565b84610a0d8560405180606001604052806025815260200161283360259139606660006112e961157f565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919061170b565b600061097361132761157f565b848461166f565b60ca6020526000908152604090205481565b60cd5481565b600081815260976020526040812061097790611f4e565b60cc546001600160a01b031681565b61137461157f565b6001600160a01b031661138561101f565b6001600160a01b0316146113ce576040805162461bcd60e51b81526020600482018190526024820152600080516020612746833981519152604482015290519081900360640190fd5b610e2160008051602061276683398151915282610b63565b60008051602061276683398151915281565b60008281526097602052604090206002015461141690610b2361157f565b610bcd5760405162461bcd60e51b81526004018080602001828103825260308152602001806126766030913960400191505060405180910390fd5b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205490565b61148461157f565b6001600160a01b031661149561101f565b6001600160a01b0316146114de576040805162461bcd60e51b81526020600482018190526024820152600080516020612746833981519152604482015290519081900360640190fd5b6001600160a01b0381166115235760405162461bcd60e51b81526004018080602001828103825260268152602001806126086026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6001600160a01b0383166115c85760405162461bcd60e51b81526004018080602001828103825260248152602001806127ee6024913960400191505060405180910390fd5b6001600160a01b03821661160d5760405162461bcd60e51b815260040180806020018281038252602281526020018061262e6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260666020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b61167a838383611f59565b6000611694610ced8360c954611ac790919063ffffffff16565b6001600160a01b038516600090815260ca60205260409020549091506116ba9082611c66565b6001600160a01b03808616600090815260ca602052604080822093909355908516815220546116e99082611b30565b6001600160a01b03909316600090815260ca6020526040902092909255505050565b6000818484111561179a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561175f578181015183820152602001611747565b50505050905090810190601f16801561178c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000806117ae33610dcf565b33600090815260cb60205260409020549091506117cb908261197b565b33600081815260cb6020908152604091829020939093558051848152905191927feaff4b37086828766ad3268786972c0cd24259d4c87a80f9d3963a3c3d999b0d92918290030190a2905090565b60cd5460cc54604080516370a0823160e01b81523060048201529051600093926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561186857600080fd5b505afa15801561187c573d6000803e3d6000fd5b505050506040513d602081101561189257600080fd5b505160cd8190556118a39082611b30565b91505090565b60008281526097602052604090206118c190826120b6565b15610aec576118ce61157f565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082815260976020526040902061192a90826120cb565b15610aec5761193761157f565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600082820183811015611046576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b038216611a30576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611a3c60008383610eed565b606754611a49908261197b565b6067556001600160a01b038216600090815260656020526040902054611a6f908261197b565b6001600160a01b03831660008181526065602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600082611ad657506000610977565b82820282848281611ae357fe5b04146110465760405162461bcd60e51b81526004018080602001828103825260218152602001806126fd6021913960400191505060405180910390fd5b6000818181121561097757600080fd5b6000808212158015611b4457508282840313155b80611b5b5750600082128015611b5b575082828403135b611b6457600080fd5b50900390565b6001600160a01b038216611baf5760405162461bcd60e51b81526004018080602001828103825260218152602001806127a86021913960400191505060405180910390fd5b611bbb82600083610eed565b611bf8816040518060600160405280602281526020016125e6602291396001600160a01b038516600090815260656020526040902054919061170b565b6001600160a01b038316600090815260656020526040902055606754611c1e9082611c99565b6067556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6000828201818312801590611c7b5750838112155b80611c905750600083128015611c9057508381125b61104657600080fd5b600082821115611b64576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b600080821215611cff57600080fd5b5090565b6000611d0d61098f565b11611d5f576040805162461bcd60e51b815260206004820152601960248201527f4a5472616e636865423a20737570706c79206973207a65726f00000000000000604482015290519081900360640190fd5b8015610e2157611d90611d7061098f565b611d7e83600160801b611ac7565b81611d8557fe5b60c95491900461197b565b60c95560408051828152905133917f26536799ace2c3dbe12e638ec3ade6b4173dcf1289be0a58d51a5003015649bd919081900360200190a250565b6000611dd7306120e0565b15905090565b600054610100900460ff1680611df65750611df6611dcc565b80611e04575060005460ff16155b611e3f5760405162461bcd60e51b815260040180806020018281038252602e8152602001806126cf602e913960400191505060405180910390fd5b600054610100900460ff16158015611e6a576000805460ff1961ff0019909116610100171660011790555b611e726120e6565b611e7a612186565b8015610e21576000805461ff001916905550565b600054610100900460ff1680611ea75750611ea7611dcc565b80611eb5575060005460ff16155b611ef05760405162461bcd60e51b815260040180806020018281038252602e8152602001806126cf602e913960400191505060405180910390fd5b600054610100900460ff16158015611f1b576000805460ff1961ff0019909116610100171660011790555b611f236120e6565b610edb838361227f565b60006110468383612357565b6000611046836001600160a01b0384166123bb565b6000610977826123d3565b6001600160a01b038316611f9e5760405162461bcd60e51b81526004018080602001828103825260258152602001806127c96025913960400191505060405180910390fd5b6001600160a01b038216611fe35760405162461bcd60e51b81526004018080602001828103825260238152602001806125946023913960400191505060405180910390fd5b611fee838383610eed565b61202b81604051806060016040528060268152602001612650602691396001600160a01b038616600090815260656020526040902054919061170b565b6001600160a01b03808516600090815260656020526040808220939093559084168152205461205a908261197b565b6001600160a01b0380841660008181526065602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000611046836001600160a01b0384166123d7565b6000611046836001600160a01b038416612421565b3b151590565b600054610100900460ff16806120ff57506120ff611dcc565b8061210d575060005460ff16155b6121485760405162461bcd60e51b815260040180806020018281038252602e8152602001806126cf602e913960400191505060405180910390fd5b600054610100900460ff16158015611e7a576000805460ff1961ff0019909116610100171660011790558015610e21576000805461ff001916905550565b600054610100900460ff168061219f575061219f611dcc565b806121ad575060005460ff16155b6121e85760405162461bcd60e51b815260040180806020018281038252602e8152602001806126cf602e913960400191505060405180910390fd5b600054610100900460ff16158015612213576000805460ff1961ff0019909116610100171660011790555b600061221d61157f565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015610e21576000805461ff001916905550565b600054610100900460ff16806122985750612298611dcc565b806122a6575060005460ff16155b6122e15760405162461bcd60e51b815260040180806020018281038252602e8152602001806126cf602e913960400191505060405180910390fd5b600054610100900460ff1615801561230c576000805460ff1961ff0019909116610100171660011790555b825161231f9060689060208601906124e7565b5081516123339060699060208501906124e7565b50606a805460ff191660121790558015610eed576000805461ff0019169055505050565b815460009082106123995760405162461bcd60e51b81526004018080602001828103825260228152602001806125726022913960400191505060405180910390fd5b8260000182815481106123a857fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60006123e383836123bb565b61241957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610977565b506000610977565b600081815260018301602052604081205480156124dd578354600019808301919081019060009087908390811061245457fe5b906000526020600020015490508087600001848154811061247157fe5b6000918252602080832090910192909255828152600189810190925260409020908401905586548790806124a157fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610977565b6000915050610977565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061252857805160ff1916838001178555612555565b82800160010185558215612555579182015b8281111561255557825182559160200191906001019061253a565b50611cff9291505b80821115611cff576000815560010161255d56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e647345524332303a207472616e7366657220746f20746865207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7445524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b654a5472616e636865423a2077697468647261772066756e6473207472616e73666572206661696c6564496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65729f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a64a5472616e636865423a202043616c6c6572206973206e6f742070726f746f636f6c45524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573734a5472616e636865423a2063616c6c6572206973206e6f742061206d696e74657245524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220d88634c1d959b9a4599350ffa201b389eca50679e104e3725c27cdb9817b254064736f6c634300060c0033
Deployed Bytecode Sourcemap
59473:7321:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;62466:110;;;;;;;;;;;;;;;;-1:-1:-1;62466:110:0;-1:-1:-1;;;;;62466:110:0;;:::i;:::-;;;;;;;;;;;;;;;;49830:91;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;51976:169;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;51976:169:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;31969:49;;;;;;;;;;;;;;;;-1:-1:-1;31969:49:0;-1:-1:-1;;;;;31969:49:0;;:::i;50929:108::-;;;:::i;52627:321::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;52627:321:0;;;;;;;;;;;;;;;;;:::i;64950:232::-;;;:::i;:::-;;41053:114;;;;;;;;;;;;;;;;-1:-1:-1;41053:114:0;;:::i;41429:227::-;;;;;;;;;;;;;;;;-1:-1:-1;41429:227:0;;;;;;-1:-1:-1;;;;;41429:227:0;;:::i;50773:91::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;42638:209;;;;;;;;;;;;;;;;-1:-1:-1;42638:209:0;;;;;;-1:-1:-1;;;;;42638:209:0;;:::i;53357:218::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;53357:218:0;;;;;;;;:::i;64059:356::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;64059:356:0;;;;;;;;:::i;64619:252::-;;;;;;;;;;;;;;;;-1:-1:-1;64619:252:0;;:::i;62081:155::-;;;;;;;;;;;;;;;;-1:-1:-1;62081:155:0;-1:-1:-1;;;;;62081:155:0;;:::i;66023:179::-;;;:::i;59727:264::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;59727:264:0;;;;;;;;-1:-1:-1;59727:264:0;;-1:-1:-1;;59727:264:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;59727:264:0;;-1:-1:-1;59727:264:0;;-1:-1:-1;;;;;59727:264:0:i;63005:208::-;;;;;;;;;;;;;;;;-1:-1:-1;63005:208:0;-1:-1:-1;;;;;63005:208:0;;:::i;51100:127::-;;;;;;;;;;;;;;;;-1:-1:-1;51100:127:0;-1:-1:-1;;;;;51100:127:0;;:::i;46492:148::-;;;:::i;31880:29::-;;;:::i;31702:49::-;;;:::i;45841:87::-;;;:::i;:::-;;;;-1:-1:-1;;;;;45841:87:0;;;;;;;;;;;;;;40726:138;;;;;;;;;;;;;;;;-1:-1:-1;40726:138:0;;;;;;;:::i;39687:139::-;;;;;;;;;;;;;;;;-1:-1:-1;39687:139:0;;;;;;-1:-1:-1;;;;;39687:139:0;;:::i;50040:95::-;;;:::i;60173:160::-;;;;;;;;;;;;;;;;-1:-1:-1;60173:160:0;-1:-1:-1;;;;;60173:160:0;;:::i;38432:49::-;;;:::i;66415:376::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;66415:376:0;;;;;;;;;;;;;;;;;:::i;54078:269::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;54078:269:0;;;;;;;;:::i;51440:175::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;51440:175:0;;;;;;;;:::i;31915:50::-;;;;;;;;;;;;;;;;-1:-1:-1;31915:50:0;-1:-1:-1;;;;;31915:50:0;;:::i;32217:34::-;;;:::i;40000:127::-;;;;;;;;;;;;;;;;-1:-1:-1;40000:127:0;;:::i;32096:37::-;;;:::i;59999:169::-;;;;;;;;;;;;;;;;-1:-1:-1;59999:169:0;-1:-1:-1;;;;;59999:169:0;;:::i;31812:62::-;;;:::i;41901:230::-;;;;;;;;;;;;;;;;-1:-1:-1;41901:230:0;;;;;;-1:-1:-1;;;;;41901:230:0;;:::i;51678:151::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;51678:151:0;;;;;;;;;;:::i;46795:244::-;;;;;;;;;;;;;;;;-1:-1:-1;46795:244:0;-1:-1:-1;;;;;46795:244:0;;:::i;62466:110::-;-1:-1:-1;;;;;62549:22:0;62528:7;62549:22;;;:14;:22;;;;;;;62466:110::o;49830:91::-;49908:5;49901:12;;;;;;;;-1:-1:-1;;49901:12:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49875:13;;49901:12;;49908:5;;49901:12;;49908:5;49901:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49830:91;:::o;51976:169::-;52059:4;52076:39;52085:12;:10;:12::i;:::-;52099:7;52108:6;52076:8;:39::i;:::-;-1:-1:-1;52133:4:0;51976:169;;;;;:::o;31969:49::-;;;;;;;;;;;;;:::o;50929:108::-;51017:12;;50929:108;:::o;52627:321::-;52733:4;52750:36;52760:6;52768:9;52779:6;52750:9;:36::i;:::-;52797:121;52806:6;52814:12;:10;:12::i;:::-;52828:89;52866:6;52828:89;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;52828:19:0;;;;;;:11;:19;;;;;;52848:12;:10;:12::i;:::-;-1:-1:-1;;;;;52828:33:0;;;;;;;;;;;;-1:-1:-1;52828:33:0;;;:89;:37;:89::i;:::-;52797:8;:121::i;:::-;-1:-1:-1;52936:4:0;52627:321;;;;;:::o;64950:232::-;64989:25;65017:18;:16;:18::i;:::-;65048:12;;:52;;;-1:-1:-1;;;65048:52:0;;65070:10;65048:52;;;;;;;;;;;;64989:46;;-1:-1:-1;;;;;;65048:12:0;;;;:21;;:52;;;;;;;;;;;;;;;:12;;:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;65048:52:0;65040:106;;;;-1:-1:-1;;;65040:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;65151:26;:24;:26::i;:::-;;64950:232;:::o;41053:114::-;41110:7;41137:12;;;:6;:12;;;;;:22;;;;41053:114::o;41429:227::-;41521:12;;;;:6;:12;;;;;:22;;;41513:45;;41545:12;:10;:12::i;:::-;41513:7;:45::i;:::-;41505:105;;;;-1:-1:-1;;;41505:105:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41623:25;41634:4;41640:7;41623:10;:25::i;50773:91::-;50847:9;;;;50773:91;:::o;42638:209::-;42736:12;:10;:12::i;:::-;-1:-1:-1;;;;;42725:23:0;:7;-1:-1:-1;;;;;42725:23:0;;42717:83;;;;-1:-1:-1;;;42717:83:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;42813:26;42825:4;42831:7;42813:11;:26::i;53357:218::-;53445:4;53462:83;53471:12;:10;:12::i;:::-;53485:7;53494:50;53533:10;53494:11;:25;53506:12;:10;:12::i;:::-;-1:-1:-1;;;;;53494:25:0;;;;;;;;;;;;;;;;;-1:-1:-1;53494:25:0;;;:34;;;;;;;;;;;:38;:50::i;64059:356::-;64136:32;-1:-1:-1;;;;;;;;;;;64157:10:0;64136:7;:32::i;:::-;64128:78;;;;-1:-1:-1;;;64128:78:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;64227:1;64219:5;:9;64211:46;;;;;-1:-1:-1;;;64211:46:0;;;;;;;;;;;;-1:-1:-1;;;64211:46:0;;;;;;;;;;;;;;;64268:27;64280:7;64289:5;64268:11;:27::i;:::-;64334:73;64364:42;64365:25;64384:5;64365:14;;:18;;:25;;;;:::i;:::-;64364:40;:42::i;:::-;-1:-1:-1;;;;;64334:25:0;;;;;;:16;:25;;;;;;;:29;:73::i;:::-;-1:-1:-1;;;;;64306:25:0;;;;;;;:16;:25;;;;;:101;;;;-1:-1:-1;64059:356:0:o;64619:252::-;64687:1;64679:5;:9;64671:46;;;;;-1:-1:-1;;;64671:46:0;;;;;;;;;;;;-1:-1:-1;;;64671:46:0;;;;;;;;;;;;;;;64722:30;64734:10;64746:5;64722:11;:30::i;:::-;64788:78;64822:42;64823:25;64842:5;64823:14;;:18;;:25;;;;:::i;64822:42::-;64805:10;64788:28;;;;:16;:28;;;;;;;:32;:78::i;:::-;64774:10;64757:28;;;;:16;:28;;;;;:109;-1:-1:-1;64619:252:0:o;62081:155::-;-1:-1:-1;;;;;62208:22:0;;62155:7;62208:22;;;:14;:22;;;;;;62176:55;;:27;62223:6;62176:19;:27::i;:::-;:31;;:55::i;66023:179::-;66077:15;66095:26;:24;:26::i;:::-;66077:44;;66141:1;66130:8;:12;66126:72;;;66150:42;66167:24;:8;:22;:24::i;:::-;66150:16;:42::i;:::-;66023:179;:::o;59727:264::-;11674:13;;;;;;;;:33;;;11691:16;:14;:16::i;:::-;11674:50;;;-1:-1:-1;11712:12:0;;;;11711:13;11674:50;11666:109;;;;-1:-1:-1;;;11666:109:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11788:19;11811:13;;;;;;11810:14;11835:101;;;;11870:13;:20;;-1:-1:-1;;;;11870:20:0;;;;;11905:19;11886:4;11905:19;;;11835:101;59817:35:::1;:33;:35::i;:::-;59863:26;59876:4;59882:6;59863:12;:26::i;:::-;59951:35;-1:-1:-1::0;;;;;;;;;;;59975:10:0::1;59951;:35::i;:::-;11966:14:::0;11962:68;;;12013:5;11997:21;;-1:-1:-1;;11997:21:0;;;11962:68;59727:264;;;:::o;63005:208::-;-1:-1:-1;;;;;63148:24:0;;63070:7;63148:24;;;:16;:24;;;;;;-1:-1:-1;;;31745:6:0;63091:98;;:82;;:52;:37;63110:17;63165:6;63110:9;:17::i;:::-;63091:14;;;:18;:37::i;:52::-;:56;;:82::i;:::-;:96;:98::i;:::-;:117;;;;;;;63005:208;-1:-1:-1;;63005:208:0:o;51100:127::-;-1:-1:-1;;;;;51201:18:0;51174:7;51201:18;;;:9;:18;;;;;;;51100:127::o;46492:148::-;46072:12;:10;:12::i;:::-;-1:-1:-1;;;;;46061:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;46061:23:0;;46053:68;;;;;-1:-1:-1;;;46053:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;46053:68:0;;;;;;;;;;;;;;;46583:6:::1;::::0;46562:40:::1;::::0;46599:1:::1;::::0;-1:-1:-1;;;;;46583:6:0::1;::::0;46562:40:::1;::::0;46599:1;;46562:40:::1;46613:6;:19:::0;;-1:-1:-1;;;;;;46613:19:0::1;::::0;;46492:148::o;31880:29::-;;;;:::o;31702:49::-;-1:-1:-1;;;31702:49:0;:::o;45841:87::-;45914:6;;-1:-1:-1;;;;;45914:6:0;45841:87;:::o;40726:138::-;40799:7;40826:12;;;:6;:12;;;;;:30;;40850:5;40826:23;:30::i;:::-;40819:37;40726:138;-1:-1:-1;;;40726:138:0:o;39687:139::-;39756:4;39780:12;;;:6;:12;;;;;:38;;39810:7;39780:29;:38::i;50040:95::-;50120:7;50113:14;;;;;;;;-1:-1:-1;;50113:14:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50087:13;;50113:14;;50120:7;;50113:14;;50120:7;50113:14;;;;;;;;;;;;;;;;;;;;;;;;60173:160;46072:12;:10;:12::i;:::-;-1:-1:-1;;;;;46061:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;46061:23:0;;46053:68;;;;;-1:-1:-1;;;46053:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;46053:68:0;;;;;;;;;;;;;;;60288:12:::1;:40:::0;;-1:-1:-1;;;;;;60288:40:0::1;-1:-1:-1::0;;;;;60288:40:0;;;::::1;::::0;;;::::1;::::0;;60173:160::o;38432:49::-;38477:4;38432:49;:::o;66415:376::-;66522:32;-1:-1:-1;;;;;;;;;;;66543:10:0;66522:7;:32::i;:::-;66514:79;;;;-1:-1:-1;;;66514:79:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;66607:20:0;;;66604:180;;66651:6;-1:-1:-1;;;;;66633:34:0;;66668:3;66673:7;66633:48;;;;;;;;;;;;;-1:-1:-1;;;;;66633:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;66604:180:0;;-1:-1:-1;66604:180:0;;66709:26;;66697:9;;-1:-1:-1;;;;;66709:17:0;;;:26;;;;;66727:7;;66697:9;66709:26;66697:9;66709:26;66727:7;66709:17;:26;;;;;;;66697:38;;66749:4;66741:37;;;;;-1:-1:-1;;;66741:37:0;;;;;;;;;;;;-1:-1:-1;;;66741:37:0;;;;;;;;;;;;;;;66604:180;66415:376;;;:::o;54078:269::-;54171:4;54188:129;54197:12;:10;:12::i;:::-;54211:7;54220:96;54259:15;54220:96;;;;;;;;;;;;;;;;;:11;:25;54232:12;:10;:12::i;:::-;-1:-1:-1;;;;;54220:25:0;;;;;;;;;;;;;;;;;-1:-1:-1;54220:25:0;;;:34;;;;;;;;;;;:96;:38;:96::i;51440:175::-;51526:4;51543:42;51553:12;:10;:12::i;:::-;51567:9;51578:6;51543:9;:42::i;31915:50::-;;;;;;;;;;;;;:::o;32217:34::-;;;;:::o;40000:127::-;40063:7;40090:12;;;:6;:12;;;;;:29;;:27;:29::i;32096:37::-;;;-1:-1:-1;;;;;32096:37:0;;:::o;59999:169::-;46072:12;:10;:12::i;:::-;-1:-1:-1;;;;;46061:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;46061:23:0;;46053:68;;;;;-1:-1:-1;;;46053:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;46053:68:0;;;;;;;;;;;;;;;60128:35:::1;-1:-1:-1::0;;;;;;;;;;;60152:10:0::1;60128;:35::i;31812:62::-:0;-1:-1:-1;;;;;;;;;;;31812:62:0;:::o;41901:230::-;41994:12;;;;:6;:12;;;;;:22;;;41986:45;;42018:12;:10;:12::i;41986:45::-;41978:106;;;;-1:-1:-1;;;41978:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;51678:151;-1:-1:-1;;;;;51794:18:0;;;51767:7;51794:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;51678:151::o;46795:244::-;46072:12;:10;:12::i;:::-;-1:-1:-1;;;;;46061:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;46061:23:0;;46053:68;;;;;-1:-1:-1;;;46053:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;46053:68:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;46884:22:0;::::1;46876:73;;;;-1:-1:-1::0;;;46876:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46986:6;::::0;46965:38:::1;::::0;-1:-1:-1;;;;;46965:38:0;;::::1;::::0;46986:6:::1;::::0;46965:38:::1;::::0;46986:6:::1;::::0;46965:38:::1;47014:6;:17:::0;;-1:-1:-1;;;;;;47014:17:0::1;-1:-1:-1::0;;;;;47014:17:0;;;::::1;::::0;;;::::1;::::0;;46795:244::o;13266:106::-;13354:10;13266:106;:::o;57225:346::-;-1:-1:-1;;;;;57327:19:0;;57319:68;;;;-1:-1:-1;;;57319:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;57406:21:0;;57398:68;;;;-1:-1:-1;;;57398:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;57479:18:0;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;57531:32;;;;;;;;;;;;;;;;;57225:346;;;:::o;63500:329::-;63583:32;63599:4;63605:2;63609:5;63583:15;:32::i;:::-;63620:21;63644:40;:25;63663:5;63644:14;;:18;;:25;;;;:::i;:40::-;-1:-1:-1;;;;;63714:22:0;;;;;;:16;:22;;;;;;63620:64;;-1:-1:-1;63714:42:0;;63620:64;63714:26;:42::i;:::-;-1:-1:-1;;;;;63689:22:0;;;;;;;:16;:22;;;;;;:67;;;;63784:20;;;;;;;:40;;63809:14;63784:24;:40::i;:::-;-1:-1:-1;;;;;63761:20:0;;;;;;;:16;:20;;;;;:63;;;;-1:-1:-1;;;63500:329:0:o;29262:166::-;29348:7;29384:12;29376:6;;;;29368:29;;;;-1:-1:-1;;;29368:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;29415:5:0;;;29262:166::o;61546:307::-;61592:7;61606:29;61638:31;61658:10;61638:19;:31::i;:::-;61718:10;61703:26;;;;:14;:26;;;;;;61606:63;;-1:-1:-1;61703:53:0;;61606:63;61703:30;:53::i;:::-;61689:10;61674:26;;;;:14;:26;;;;;;;;;:82;;;;61766:49;;;;;;;61689:10;;61766:49;;;;;;;;;61827:21;-1:-1:-1;61546:307:0;:::o;65417:261::-;65516:19;;65562:12;;:37;;;-1:-1:-1;;;65562:37:0;;65593:4;65562:37;;;;;;65471:6;;65516:19;-1:-1:-1;;;;;65562:12:0;;:22;;:37;;;;;;;;;;;;;;:12;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;65562:37:0;65540:19;:59;;;65611:62;;65650:21;65611:31;:62::i;:::-;65604:69;;;65417:261;:::o;43881:188::-;43955:12;;;;:6;:12;;;;;:33;;43980:7;43955:24;:33::i;:::-;43951:111;;;44037:12;:10;:12::i;:::-;-1:-1:-1;;;;;44010:40:0;44028:7;-1:-1:-1;;;;;44010:40:0;44022:4;44010:40;;;;;;;;;;43881:188;;:::o;44077:192::-;44152:12;;;;:6;:12;;;;;:36;;44180:7;44152:27;:36::i;:::-;44148:114;;;44237:12;:10;:12::i;:::-;-1:-1:-1;;;;;44210:40:0;44228:7;-1:-1:-1;;;;;44210:40:0;44222:4;44210:40;;;;;;;;;;44077:192;;:::o;26435:179::-;26493:7;26525:5;;;26549:6;;;;26541:46;;;;;-1:-1:-1;;;26541:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;55658:378;-1:-1:-1;;;;;55742:21:0;;55734:65;;;;;-1:-1:-1;;;55734:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;55812:49;55841:1;55845:7;55854:6;55812:20;:49::i;:::-;55889:12;;:24;;55906:6;55889:16;:24::i;:::-;55874:12;:39;-1:-1:-1;;;;;55945:18:0;;;;;;:9;:18;;;;;;:30;;55968:6;55945:22;:30::i;:::-;-1:-1:-1;;;;;55924:18:0;;;;;;:9;:18;;;;;;;;:51;;;;55991:37;;;;;;;55924:18;;;;55991:37;;;;;;;;;;55658:378;;:::o;27314:220::-;27372:7;27396:6;27392:20;;-1:-1:-1;27411:1:0;27404:8;;27392:20;27435:5;;;27439:1;27435;:5;:1;27459:5;;;;;:10;27451:56;;;;-1:-1:-1;;;27451:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35323:134;35379:6;35412:1;35429:6;;;;35421:15;;;;;34537:153;34593:6;34622:1;34617;:6;;:20;;;;;34636:1;34631;34627;:5;:10;;34617:20;34616:46;;;;34647:1;34643;:5;:18;;;;;34660:1;34656;34652;:5;:9;34643:18;34608:55;;;;;;-1:-1:-1;34679:5:0;;;34537:153::o;56369:418::-;-1:-1:-1;;;;;56453:21:0;;56445:67;;;;-1:-1:-1;;;56445:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;56525:49;56546:7;56563:1;56567:6;56525:20;:49::i;:::-;56608:68;56631:6;56608:68;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;56608:18:0;;;;;;:9;:18;;;;;;;:68;:22;:68::i;:::-;-1:-1:-1;;;;;56587:18:0;;;;;;:9;:18;;;;;:89;56702:12;;:24;;56719:6;56702:16;:24::i;:::-;56687:12;:39;56742:37;;;;;;;;56768:1;;-1:-1:-1;;;;;56742:37:0;;;;;;;;;;;;56369:418;;:::o;34696:162::-;34752:6;34778:5;;;34799:6;;;;;;:16;;;34814:1;34809;:6;;34799:16;34798:38;;;;34825:1;34821;:5;:14;;;;;34834:1;34830;:5;34821:14;34790:47;;;;;26897:158;26955:7;26988:1;26983;:6;;26975:49;;;;;-1:-1:-1;;;26975:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;34864:117;34920:7;34949:1;34944;:6;;34936:15;;;;;;-1:-1:-1;34973:1:0;34864:117::o;61094:272::-;61173:1;61157:13;:11;:13::i;:::-;:17;61149:55;;;;;-1:-1:-1;;;61149:55:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;61213:9;;61209:153;;61247:63;61296:13;:11;:13::i;:::-;61266:27;:5;-1:-1:-1;;;61266:9:0;:27::i;:::-;:43;;;;;61247:14;;;61266:43;;61247:18;:63::i;:::-;61230:14;:80;61321:35;;;;;;;;61338:10;;61321:35;;;;;;;;;;61094:272;:::o;12130:125::-;12178:4;12203:44;12241:4;12203:29;:44::i;:::-;12202:45;12195:52;;12130:125;:::o;45427:129::-;11674:13;;;;;;;;:33;;;11691:16;:14;:16::i;:::-;11674:50;;;-1:-1:-1;11712:12:0;;;;11711:13;11674:50;11666:109;;;;-1:-1:-1;;;11666:109:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11788:19;11811:13;;;;;;11810:14;11835:101;;;;11870:13;:20;;-1:-1:-1;;;;11870:20:0;;;;;11905:19;11886:4;11905:19;;;11835:101;45485:26:::1;:24;:26::i;:::-;45522;:24;:26::i;:::-;11966:14:::0;11962:68;;;12013:5;11997:21;;-1:-1:-1;;11997:21:0;;;45427:129;:::o;49389:181::-;11674:13;;;;;;;;:33;;;11691:16;:14;:16::i;:::-;11674:50;;;-1:-1:-1;11712:12:0;;;;11711:13;11674:50;11666:109;;;;-1:-1:-1;;;11666:109:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11788:19;11811:13;;;;;;11810:14;11835:101;;;;11870:13;:20;;-1:-1:-1;;;;11870:20:0;;;;;11905:19;11886:4;11905:19;;;11835:101;49487:26:::1;:24;:26::i;:::-;49524:38;49547:5;49554:7;49524:22;:38::i;21728:158::-:0;21802:7;21853:22;21857:3;21869:5;21853:3;:22::i;21014:167::-;21094:4;21118:55;21128:3;-1:-1:-1;;;;;21148:23:0;;21118:9;:55::i;21267:117::-;21330:7;21357:19;21365:3;21357:7;:19::i;54837:539::-;-1:-1:-1;;;;;54943:20:0;;54935:70;;;;-1:-1:-1;;;54935:70:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;55024:23:0;;55016:71;;;;-1:-1:-1;;;55016:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55100:47;55121:6;55129:9;55140:6;55100:20;:47::i;:::-;55180:71;55202:6;55180:71;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;55180:17:0;;;;;;:9;:17;;;;;;;:71;:21;:71::i;:::-;-1:-1:-1;;;;;55160:17:0;;;;;;;:9;:17;;;;;;:91;;;;55285:20;;;;;;;:32;;55310:6;55285:24;:32::i;:::-;-1:-1:-1;;;;;55262:20:0;;;;;;;:9;:20;;;;;;;;;:55;;;;55333:35;;;;;;;55262:20;;55333:35;;;;;;;;;;;;;54837:539;;;:::o;20442:152::-;20512:4;20536:50;20541:3;-1:-1:-1;;;;;20561:23:0;;20536:4;:50::i;20770:158::-;20843:4;20867:53;20875:3;-1:-1:-1;;;;;20895:23:0;;20867:7;:53::i;3714:422::-;4081:20;4120:8;;;3714:422::o;13195:65::-;11674:13;;;;;;;;:33;;;11691:16;:14;:16::i;:::-;11674:50;;;-1:-1:-1;11712:12:0;;;;11711:13;11674:50;11666:109;;;;-1:-1:-1;;;11666:109:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11788:19;11811:13;;;;;;11810:14;11835:101;;;;11870:13;:20;;-1:-1:-1;;;;11870:20:0;;;;;11905:19;11886:4;11905:19;;;11966:14;11962:68;;;12013:5;11997:21;;-1:-1:-1;;11997:21:0;;;13195:65;:::o;45564:196::-;11674:13;;;;;;;;:33;;;11691:16;:14;:16::i;:::-;11674:50;;;-1:-1:-1;11712:12:0;;;;11711:13;11674:50;11666:109;;;;-1:-1:-1;;;11666:109:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11788:19;11811:13;;;;;;11810:14;11835:101;;;;11870:13;:20;;-1:-1:-1;;;;11870:20:0;;;;;11905:19;11886:4;11905:19;;;11835:101;45632:17:::1;45652:12;:10;:12::i;:::-;45675:6;:18:::0;;-1:-1:-1;;;;;;45675:18:0::1;-1:-1:-1::0;;;;;45675:18:0;::::1;::::0;;::::1;::::0;;;45709:43:::1;::::0;45675:18;;-1:-1:-1;45675:18:0;-1:-1:-1;;45709:43:0::1;::::0;-1:-1:-1;;45709:43:0::1;11948:1;11966:14:::0;11962:68;;;12013:5;11997:21;;-1:-1:-1;;11997:21:0;;;45564:196;:::o;49578:182::-;11674:13;;;;;;;;:33;;;11691:16;:14;:16::i;:::-;11674:50;;;-1:-1:-1;11712:12:0;;;;11711:13;11674:50;11666:109;;;;-1:-1:-1;;;11666:109:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11788:19;11811:13;;;;;;11810:14;11835:101;;;;11870:13;:20;;-1:-1:-1;;;;11870:20:0;;;;;11905:19;11886:4;11905:19;;;11835:101;49686:13;;::::1;::::0;:5:::1;::::0;:13:::1;::::0;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;49710:17:0;;::::1;::::0;:7:::1;::::0;:17:::1;::::0;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;49738:9:0::1;:14:::0;;-1:-1:-1;;49738:14:0::1;49750:2;49738:14;::::0;;11962:68;;;;12013:5;11997:21;;-1:-1:-1;;11997:21:0;;;49578:182;;;:::o;18394:204::-;18489:18;;18461:7;;18489:26;-1:-1:-1;18481:73:0;;;;-1:-1:-1;;;18481:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18572:3;:11;;18584:5;18572:18;;;;;;;;;;;;;;;;18565:25;;18394:204;;;;:::o;17726:129::-;17799:4;17823:19;;;:12;;;;;:19;;;;;;:24;;;17726:129::o;17941:109::-;18024:18;;17941:109::o;15506:414::-;15569:4;15591:21;15601:3;15606:5;15591:9;:21::i;:::-;15586:327;;-1:-1:-1;15629:23:0;;;;;;;;:11;:23;;;;;;;;;;;;;15812:18;;15790:19;;;:12;;;:19;;;;;;:40;;;;15845:11;;15586:327;-1:-1:-1;15896:5:0;15889:12;;16096:1544;16162:4;16301:19;;;:12;;;:19;;;;;;16337:15;;16333:1300;;16772:18;;-1:-1:-1;;16723:14:0;;;;16772:22;;;;16699:21;;16772:3;;:22;;17059;;;;;;;;;;;;;;17039:42;;17205:9;17176:3;:11;;17188:13;17176:26;;;;;;;;;;;;;;;;;;;:38;;;;17282:23;;;17324:1;17282:12;;;:23;;;;;;17308:17;;;17282:43;;17434:17;;17282:3;;17434:17;;;;;;;;;;;;;;;;;;;;;;17529:3;:12;;:19;17542:5;17529:19;;;;;;;;;;;17522:26;;;17572:4;17565:11;;;;;;;;16333:1300;17616:5;17609:12;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Swarm Source
ipfs://d88634c1d959b9a4599350ffa201b389eca50679e104e3725c27cdb9817b2540
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ 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.