Polygon Sponsored slots available. Book your slot here!
More Info
Private Name Tags
ContractCreator:
Sponsored
Loading...
Loading
Contract Name:
NexenFarming
Compiler Version
v0.8.11+commit.d7f03943
Contract Source Code (Solidity Multiple files format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "./ILendingPool.sol"; import "./WadRayMath.sol"; import "./ERC20.sol"; import "./SafeERC20.sol"; import "./Ownable.sol"; contract NexenFarming is Ownable { ILendingPool lendingPool = ILendingPool(0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf); address daiToken = 0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063; address usdtToken = 0xc2132D05D31c914a87C6611C10748AEb04B58e8F; address nexenToken = 0xb32e335B798A1Ac07007390683A128f134aa6e25; using WadRayMath for uint256; uint256 public daiFees; uint256 public usdtFees; mapping(address => uint256) public DAISupplies; mapping(address => uint256) public USDTSupplies; function depositDAI(uint256 _amount) public { _deposit(_amount, daiToken); DAISupplies[msg.sender] += _amount; } function depositUSDT(uint256 _amount) public { _deposit(_amount, usdtToken); USDTSupplies[msg.sender] += _amount; } function redeemDAI() public { uint256 deposited = DAISupplies[msg.sender]; require(deposited > 0, 'Nothing to redeem'); DAISupplies[msg.sender] = 0; uint256 totalToRecover = getUserDAIBalance(msg.sender); uint256 recovered = lendingPool.withdraw(daiToken, totalToRecover, address(this)); uint256 interests = recovered - deposited; uint256 halfInterests = 0; uint256 nexenTokensToReturn = 0; if (interests > 0) { halfInterests = interests / 2; uint256 keep = interests - halfInterests; daiFees += keep; //14 DAI = 100 NXN nexenTokensToReturn = interests * 100 / 14; } require(IERC20(daiToken).transfer(msg.sender, halfInterests + deposited), 'Could not transfer tokens'); if (nexenTokensToReturn > 0) { require(IERC20(nexenToken).transfer(msg.sender, nexenTokensToReturn), 'Could not transfer tokens'); } } function redeemUSDT() public { uint256 deposited = USDTSupplies[msg.sender]; require(deposited > 0, 'Nothing to redeem'); USDTSupplies[msg.sender] = 0; uint256 totalToRecover = getUserUSDTBalance(msg.sender); uint256 recovered = lendingPool.withdraw(usdtToken, totalToRecover, address(this)); uint256 interests = recovered - deposited; uint256 halfInterests = 0; uint256 nexenTokensToReturn = 0; if (interests > 0) { halfInterests = interests / 2; uint256 keep = interests - halfInterests; usdtFees += keep; //14 USDT = 100 NXN nexenTokensToReturn = interests * 100 / 14; } require(IERC20(usdtToken).transfer(msg.sender, halfInterests + deposited), 'Could not transfer tokens'); if (nexenTokensToReturn > 0) { require(IERC20(nexenToken).transfer(msg.sender, nexenTokensToReturn), 'Could not transfer tokens'); } } function _deposit(uint256 _amount, address _token) internal { require(IERC20(_token).transferFrom(msg.sender, address(this), _amount), 'Could not transfer tokens'); lendingPool.deposit(_token, _amount, address(this), 0); } function getUserDAIBalance(address _user) public view returns(uint256) { uint256 initial = DAISupplies[_user]; return initial.rayMul(lendingPool.getReserveNormalizedIncome(daiToken)); } function getUserUSDTBalance(address _user) public view returns(uint256) { uint256 initial = USDTSupplies[_user]; return initial.rayMul(lendingPool.getReserveNormalizedIncome(usdtToken)); } function _withdrawFees() public onlyOwner { uint256 totalDaiFees = daiFees; if (totalDaiFees > 0) { daiFees = 0; IERC20(daiToken).transferFrom(address(this), msg.sender, totalDaiFees); } uint256 totalUsdtFees = usdtFees; if (totalUsdtFees > 0) { usdtFees = 0; SafeERC20.safeTransfer(ERC20(usdtToken), msg.sender, totalUsdtFees); } } function _approve(address _token, uint256 _amount) public onlyOwner { IERC20(_token).approve(address(lendingPool), _amount); } function _recoverNexenTokens(uint256 _amount) public onlyOwner { require(IERC20(nexenToken).transfer(msg.sender, _amount), 'Could not transfer tokens'); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.8.11; library DataTypes { // refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties. struct ReserveData { //stores the reserve configuration ReserveConfigurationMap configuration; //the liquidity index. Expressed in ray uint128 liquidityIndex; //variable borrow index. Expressed in ray uint128 variableBorrowIndex; //the current supply rate. Expressed in ray uint128 currentLiquidityRate; //the current variable borrow rate. Expressed in ray uint128 currentVariableBorrowRate; //the current stable borrow rate. Expressed in ray uint128 currentStableBorrowRate; uint40 lastUpdateTimestamp; //tokens addresses address aTokenAddress; address stableDebtTokenAddress; address variableDebtTokenAddress; //address of the interest rate strategy address interestRateStrategyAddress; //the id of the reserve. Represents the position in the list of the active reserves uint8 id; } struct ReserveConfigurationMap { //bit 0-15: LTV //bit 16-31: Liq. threshold //bit 32-47: Liq. bonus //bit 48-55: Decimals //bit 56: Reserve is active //bit 57: reserve is frozen //bit 58: borrowing is enabled //bit 59: stable rate borrowing enabled //bit 60-63: reserved //bit 64-79: reserve factor uint256 data; } struct UserConfigurationMap { uint256 data; } enum InterestRateMode {NONE, STABLE, VARIABLE} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20.sol"; import "./Context.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 ERC20 is Context, IERC20 { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The defaut value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @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 this function is * overloaded; * * 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 18; } /** * @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); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); 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] + 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) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); 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); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _balances[recipient] += 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 += amount; _balances[account] += 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); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= 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 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 { } }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.8.11; /** * @title Errors library * @author Aave * @notice Defines the error messages emitted by the different contracts of the Aave protocol * @dev Error messages prefix glossary: * - VL = ValidationLogic * - MATH = Math libraries * - CT = Common errors between tokens (AToken, VariableDebtToken and StableDebtToken) * - AT = AToken * - SDT = StableDebtToken * - VDT = VariableDebtToken * - LP = LendingPool * - LPAPR = LendingPoolAddressesProviderRegistry * - LPC = LendingPoolConfiguration * - RL = ReserveLogic * - LPCM = LendingPoolCollateralManager * - P = Pausable */ library Errors { //common errors string public constant CALLER_NOT_POOL_ADMIN = '33'; // 'The caller must be the pool admin' string public constant BORROW_ALLOWANCE_NOT_ENOUGH = '59'; // User borrows on behalf, but allowance are too small //contract specific errors string public constant VL_INVALID_AMOUNT = '1'; // 'Amount must be greater than 0' string public constant VL_NO_ACTIVE_RESERVE = '2'; // 'Action requires an active reserve' string public constant VL_RESERVE_FROZEN = '3'; // 'Action cannot be performed because the reserve is frozen' string public constant VL_CURRENT_AVAILABLE_LIQUIDITY_NOT_ENOUGH = '4'; // 'The current liquidity is not enough' string public constant VL_NOT_ENOUGH_AVAILABLE_USER_BALANCE = '5'; // 'User cannot withdraw more than the available balance' string public constant VL_TRANSFER_NOT_ALLOWED = '6'; // 'Transfer cannot be allowed.' string public constant VL_BORROWING_NOT_ENABLED = '7'; // 'Borrowing is not enabled' string public constant VL_INVALID_INTEREST_RATE_MODE_SELECTED = '8'; // 'Invalid interest rate mode selected' string public constant VL_COLLATERAL_BALANCE_IS_0 = '9'; // 'The collateral balance is 0' string public constant VL_HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD = '10'; // 'Health factor is lesser than the liquidation threshold' string public constant VL_COLLATERAL_CANNOT_COVER_NEW_BORROW = '11'; // 'There is not enough collateral to cover a new borrow' string public constant VL_STABLE_BORROWING_NOT_ENABLED = '12'; // stable borrowing not enabled string public constant VL_COLLATERAL_SAME_AS_BORROWING_CURRENCY = '13'; // collateral is (mostly) the same currency that is being borrowed string public constant VL_AMOUNT_BIGGER_THAN_MAX_LOAN_SIZE_STABLE = '14'; // 'The requested amount is greater than the max loan size in stable rate mode string public constant VL_NO_DEBT_OF_SELECTED_TYPE = '15'; // 'for repayment of stable debt, the user needs to have stable debt, otherwise, he needs to have variable debt' string public constant VL_NO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF = '16'; // 'To repay on behalf of an user an explicit amount to repay is needed' string public constant VL_NO_STABLE_RATE_LOAN_IN_RESERVE = '17'; // 'User does not have a stable rate loan in progress on this reserve' string public constant VL_NO_VARIABLE_RATE_LOAN_IN_RESERVE = '18'; // 'User does not have a variable rate loan in progress on this reserve' string public constant VL_UNDERLYING_BALANCE_NOT_GREATER_THAN_0 = '19'; // 'The underlying balance needs to be greater than 0' string public constant VL_DEPOSIT_ALREADY_IN_USE = '20'; // 'User deposit is already being used as collateral' string public constant LP_NOT_ENOUGH_STABLE_BORROW_BALANCE = '21'; // 'User does not have any stable rate loan for this reserve' string public constant LP_INTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET = '22'; // 'Interest rate rebalance conditions were not met' string public constant LP_LIQUIDATION_CALL_FAILED = '23'; // 'Liquidation call failed' string public constant LP_NOT_ENOUGH_LIQUIDITY_TO_BORROW = '24'; // 'There is not enough liquidity available to borrow' string public constant LP_REQUESTED_AMOUNT_TOO_SMALL = '25'; // 'The requested amount is too small for a FlashLoan.' string public constant LP_INCONSISTENT_PROTOCOL_ACTUAL_BALANCE = '26'; // 'The actual balance of the protocol is inconsistent' string public constant LP_CALLER_NOT_LENDING_POOL_CONFIGURATOR = '27'; // 'The caller of the function is not the lending pool configurator' string public constant LP_INCONSISTENT_FLASHLOAN_PARAMS = '28'; string public constant CT_CALLER_MUST_BE_LENDING_POOL = '29'; // 'The caller of this function must be a lending pool' string public constant CT_CANNOT_GIVE_ALLOWANCE_TO_HIMSELF = '30'; // 'User cannot give allowance to himself' string public constant CT_TRANSFER_AMOUNT_NOT_GT_0 = '31'; // 'Transferred amount needs to be greater than zero' string public constant RL_RESERVE_ALREADY_INITIALIZED = '32'; // 'Reserve has already been initialized' string public constant LPC_RESERVE_LIQUIDITY_NOT_0 = '34'; // 'The liquidity of the reserve needs to be 0' string public constant LPC_INVALID_ATOKEN_POOL_ADDRESS = '35'; // 'The liquidity of the reserve needs to be 0' string public constant LPC_INVALID_STABLE_DEBT_TOKEN_POOL_ADDRESS = '36'; // 'The liquidity of the reserve needs to be 0' string public constant LPC_INVALID_VARIABLE_DEBT_TOKEN_POOL_ADDRESS = '37'; // 'The liquidity of the reserve needs to be 0' string public constant LPC_INVALID_STABLE_DEBT_TOKEN_UNDERLYING_ADDRESS = '38'; // 'The liquidity of the reserve needs to be 0' string public constant LPC_INVALID_VARIABLE_DEBT_TOKEN_UNDERLYING_ADDRESS = '39'; // 'The liquidity of the reserve needs to be 0' string public constant LPC_INVALID_ADDRESSES_PROVIDER_ID = '40'; // 'The liquidity of the reserve needs to be 0' string public constant LPC_INVALID_CONFIGURATION = '75'; // 'Invalid risk parameters for the reserve' string public constant LPC_CALLER_NOT_EMERGENCY_ADMIN = '76'; // 'The caller must be the emergency admin' string public constant LPAPR_PROVIDER_NOT_REGISTERED = '41'; // 'Provider is not registered' string public constant LPCM_HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '42'; // 'Health factor is not below the threshold' string public constant LPCM_COLLATERAL_CANNOT_BE_LIQUIDATED = '43'; // 'The collateral chosen cannot be liquidated' string public constant LPCM_SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = '44'; // 'User did not borrow the specified currency' string public constant LPCM_NOT_ENOUGH_LIQUIDITY_TO_LIQUIDATE = '45'; // "There isn't enough liquidity available to liquidate" string public constant LPCM_NO_ERRORS = '46'; // 'No errors' string public constant LP_INVALID_FLASHLOAN_MODE = '47'; //Invalid flashloan mode selected string public constant MATH_MULTIPLICATION_OVERFLOW = '48'; string public constant MATH_ADDITION_OVERFLOW = '49'; string public constant MATH_DIVISION_BY_ZERO = '50'; string public constant RL_LIQUIDITY_INDEX_OVERFLOW = '51'; // Liquidity index overflows uint128 string public constant RL_VARIABLE_BORROW_INDEX_OVERFLOW = '52'; // Variable borrow index overflows uint128 string public constant RL_LIQUIDITY_RATE_OVERFLOW = '53'; // Liquidity rate overflows uint128 string public constant RL_VARIABLE_BORROW_RATE_OVERFLOW = '54'; // Variable borrow rate overflows uint128 string public constant RL_STABLE_BORROW_RATE_OVERFLOW = '55'; // Stable borrow rate overflows uint128 string public constant CT_INVALID_MINT_AMOUNT = '56'; //invalid amount to mint string public constant LP_FAILED_REPAY_WITH_COLLATERAL = '57'; string public constant CT_INVALID_BURN_AMOUNT = '58'; //invalid amount to burn string public constant LP_FAILED_COLLATERAL_SWAP = '60'; string public constant LP_INVALID_EQUAL_ASSETS_TO_SWAP = '61'; string public constant LP_REENTRANCY_NOT_ALLOWED = '62'; string public constant LP_CALLER_MUST_BE_AN_ATOKEN = '63'; string public constant LP_IS_PAUSED = '64'; // 'Pool is paused' string public constant LP_NO_MORE_RESERVES_ALLOWED = '65'; string public constant LP_INVALID_FLASH_LOAN_EXECUTOR_RETURN = '66'; string public constant RC_INVALID_LTV = '67'; string public constant RC_INVALID_LIQ_THRESHOLD = '68'; string public constant RC_INVALID_LIQ_BONUS = '69'; string public constant RC_INVALID_DECIMALS = '70'; string public constant RC_INVALID_RESERVE_FACTOR = '71'; string public constant LPAPR_INVALID_ADDRESSES_PROVIDER_ID = '72'; string public constant VL_INCONSISTENT_FLASHLOAN_PARAMS = '73'; string public constant LP_INCONSISTENT_PARAMS_LENGTH = '74'; string public constant UL_INVALID_INDEX = '77'; string public constant LP_NOT_CONTRACT = '78'; string public constant SDT_STABLE_DEBT_OVERFLOW = '79'; string public constant SDT_BURN_EXCEEDS_BALANCE = '80'; enum CollateralManagerErrors { NO_ERROR, NO_COLLATERAL_AVAILABLE, COLLATERAL_CANNOT_BE_LIQUIDATED, CURRRENCY_NOT_BORROWED, HEALTH_FACTOR_ABOVE_THRESHOLD, NOT_ENOUGH_LIQUIDITY, NO_ACTIVE_RESERVE, HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD, INVALID_EQUAL_ASSETS_TO_SWAP, FROZEN_RESERVE } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.8.11; pragma experimental ABIEncoderV2; import {ILendingPoolAddressesProvider} from './ILendingPoolAddressesProvider.sol'; import {DataTypes} from './DataTypes.sol'; interface ILendingPool { /** * @dev Emitted on deposit() * @param reserve The address of the underlying asset of the reserve * @param user The address initiating the deposit * @param onBehalfOf The beneficiary of the deposit, receiving the aTokens * @param amount The amount deposited * @param referral The referral code used **/ event Deposit( address indexed reserve, address user, address indexed onBehalfOf, uint256 amount, uint16 indexed referral ); /** * @dev Emitted on withdraw() * @param reserve The address of the underlyng asset being withdrawn * @param user The address initiating the withdrawal, owner of aTokens * @param to Address that will receive the underlying * @param amount The amount to be withdrawn **/ event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount); /** * @dev Emitted on borrow() and flashLoan() when debt needs to be opened * @param reserve The address of the underlying asset being borrowed * @param user The address of the user initiating the borrow(), receiving the funds on borrow() or just * initiator of the transaction on flashLoan() * @param onBehalfOf The address that will be getting the debt * @param amount The amount borrowed out * @param borrowRateMode The rate mode: 1 for Stable, 2 for Variable * @param borrowRate The numeric rate at which the user has borrowed * @param referral The referral code used **/ event Borrow( address indexed reserve, address user, address indexed onBehalfOf, uint256 amount, uint256 borrowRateMode, uint256 borrowRate, uint16 indexed referral ); /** * @dev Emitted on repay() * @param reserve The address of the underlying asset of the reserve * @param user The beneficiary of the repayment, getting his debt reduced * @param repayer The address of the user initiating the repay(), providing the funds * @param amount The amount repaid **/ event Repay( address indexed reserve, address indexed user, address indexed repayer, uint256 amount ); /** * @dev Emitted on swapBorrowRateMode() * @param reserve The address of the underlying asset of the reserve * @param user The address of the user swapping his rate mode * @param rateMode The rate mode that the user wants to swap to **/ event Swap(address indexed reserve, address indexed user, uint256 rateMode); /** * @dev Emitted on setUserUseReserveAsCollateral() * @param reserve The address of the underlying asset of the reserve * @param user The address of the user enabling the usage as collateral **/ event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user); /** * @dev Emitted on setUserUseReserveAsCollateral() * @param reserve The address of the underlying asset of the reserve * @param user The address of the user enabling the usage as collateral **/ event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user); /** * @dev Emitted on rebalanceStableBorrowRate() * @param reserve The address of the underlying asset of the reserve * @param user The address of the user for which the rebalance has been executed **/ event RebalanceStableBorrowRate(address indexed reserve, address indexed user); /** * @dev Emitted on flashLoan() * @param target The address of the flash loan receiver contract * @param initiator The address initiating the flash loan * @param asset The address of the asset being flash borrowed * @param amount The amount flash borrowed * @param premium The fee flash borrowed * @param referralCode The referral code used **/ event FlashLoan( address indexed target, address indexed initiator, address indexed asset, uint256 amount, uint256 premium, uint16 referralCode ); /** * @dev Emitted when the pause is triggered. */ event Paused(); /** * @dev Emitted when the pause is lifted. */ event Unpaused(); /** * @dev Emitted when a borrower is liquidated. This event is emitted by the LendingPool via * LendingPoolCollateral manager using a DELEGATECALL * This allows to have the events in the generated ABI for LendingPool. * @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation * @param user The address of the borrower getting liquidated * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover * @param liquidatedCollateralAmount The amount of collateral received by the liiquidator * @param liquidator The address of the liquidator * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants * to receive the underlying collateral asset directly **/ event LiquidationCall( address indexed collateralAsset, address indexed debtAsset, address indexed user, uint256 debtToCover, uint256 liquidatedCollateralAmount, address liquidator, bool receiveAToken ); /** * @dev Emitted when the state of a reserve is updated. NOTE: This event is actually declared * in the ReserveLogic library and emitted in the updateInterestRates() function. Since the function is internal, * the event will actually be fired by the LendingPool contract. The event is therefore replicated here so it * gets added to the LendingPool ABI * @param reserve The address of the underlying asset of the reserve * @param liquidityRate The new liquidity rate * @param stableBorrowRate The new stable borrow rate * @param variableBorrowRate The new variable borrow rate * @param liquidityIndex The new liquidity index * @param variableBorrowIndex The new variable borrow index **/ event ReserveDataUpdated( address indexed reserve, uint256 liquidityRate, uint256 stableBorrowRate, uint256 variableBorrowRate, uint256 liquidityIndex, uint256 variableBorrowIndex ); /** * @dev Deposits an `amount` of underlying asset into the reserve, receiving in return overlying aTokens. * - E.g. User deposits 100 USDC and gets in return 100 aUSDC * @param asset The address of the underlying asset to deposit * @param amount The amount to be deposited * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user * wants to receive them on his own wallet, or a different address if the beneficiary of aTokens * is a different wallet * @param referralCode Code used to register the integrator originating the operation, for potential rewards. * 0 if the action is executed directly by the user, without any middle-man **/ function deposit( address asset, uint256 amount, address onBehalfOf, uint16 referralCode ) external; /** * @dev Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC * @param asset The address of the underlying asset to withdraw * @param amount The underlying amount to be withdrawn * - Send the value type(uint256).max in order to withdraw the whole aToken balance * @param to Address that will receive the underlying, same as msg.sender if the user * wants to receive it on his own wallet, or a different address if the beneficiary is a * different wallet * @return The final amount withdrawn **/ function withdraw( address asset, uint256 amount, address to ) external returns (uint256); /** * @dev Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower * already deposited enough collateral, or he was given enough allowance by a credit delegator on the * corresponding debt token (StableDebtToken or VariableDebtToken) * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet * and 100 stable/variable debt tokens, depending on the `interestRateMode` * @param asset The address of the underlying asset to borrow * @param amount The amount to be borrowed * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable * @param referralCode Code used to register the integrator originating the operation, for potential rewards. * 0 if the action is executed directly by the user, without any middle-man * @param onBehalfOf Address of the user who will receive the debt. Should be the address of the borrower itself * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator * if he has been given credit delegation allowance **/ function borrow( address asset, uint256 amount, uint256 interestRateMode, uint16 referralCode, address onBehalfOf ) external; /** * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address * @param asset The address of the borrowed underlying asset previously borrowed * @param amount The amount to repay * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` * @param rateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the * user calling the function if he wants to reduce/remove his own debt, or the address of any other * other borrower whose debt should be removed * @return The final amount repaid **/ function repay( address asset, uint256 amount, uint256 rateMode, address onBehalfOf ) external returns (uint256); /** * @dev Allows a borrower to swap his debt between stable and variable mode, or viceversa * @param asset The address of the underlying asset borrowed * @param rateMode The rate mode that the user wants to swap to **/ function swapBorrowRateMode(address asset, uint256 rateMode) external; /** * @dev Rebalances the stable interest rate of a user to the current stable rate defined on the reserve. * - Users can be rebalanced if the following conditions are satisfied: * 1. Usage ratio is above 95% * 2. the current deposit APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate, which means that too much has been * borrowed at a stable rate and depositors are not earning enough * @param asset The address of the underlying asset borrowed * @param user The address of the user to be rebalanced **/ function rebalanceStableBorrowRate(address asset, address user) external; /** * @dev Allows depositors to enable/disable a specific deposited asset as collateral * @param asset The address of the underlying asset deposited * @param useAsCollateral `true` if the user wants to use the deposit as collateral, `false` otherwise **/ function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external; /** * @dev Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1 * - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives * a proportionally amount of the `collateralAsset` plus a bonus to cover market risk * @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation * @param user The address of the borrower getting liquidated * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants * to receive the underlying collateral asset directly **/ function liquidationCall( address collateralAsset, address debtAsset, address user, uint256 debtToCover, bool receiveAToken ) external; /** * @dev Allows smartcontracts to access the liquidity of the pool within one transaction, * as long as the amount taken plus a fee is returned. * IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept into consideration. * For further details please visit https://developers.aave.com * @param receiverAddress The address of the contract receiving the funds, implementing the IFlashLoanReceiver interface * @param assets The addresses of the assets being flash-borrowed * @param amounts The amounts amounts being flash-borrowed * @param modes Types of the debt to open if the flash loan is not returned: * 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2 * @param params Variadic packed params to pass to the receiver as extra information * @param referralCode Code used to register the integrator originating the operation, for potential rewards. * 0 if the action is executed directly by the user, without any middle-man **/ function flashLoan( address receiverAddress, address[] calldata assets, uint256[] calldata amounts, uint256[] calldata modes, address onBehalfOf, bytes calldata params, uint16 referralCode ) external; /** * @dev Returns the user account data across all the reserves * @param user The address of the user * @return totalCollateralETH the total collateral in ETH of the user * @return totalDebtETH the total debt in ETH of the user * @return availableBorrowsETH the borrowing power left of the user * @return currentLiquidationThreshold the liquidation threshold of the user * @return ltv the loan to value of the user * @return healthFactor the current health factor of the user **/ function getUserAccountData(address user) external view returns ( uint256 totalCollateralETH, uint256 totalDebtETH, uint256 availableBorrowsETH, uint256 currentLiquidationThreshold, uint256 ltv, uint256 healthFactor ); function initReserve( address reserve, address aTokenAddress, address stableDebtAddress, address variableDebtAddress, address interestRateStrategyAddress ) external; function setReserveInterestRateStrategyAddress(address reserve, address rateStrategyAddress) external; function setConfiguration(address reserve, uint256 configuration) external; /** * @dev Returns the configuration of the reserve * @param asset The address of the underlying asset of the reserve * @return The configuration of the reserve **/ function getConfiguration(address asset) external view returns (DataTypes.ReserveConfigurationMap memory); /** * @dev Returns the configuration of the user across all the reserves * @param user The user address * @return The configuration of the user **/ function getUserConfiguration(address user) external view returns (DataTypes.UserConfigurationMap memory); /** * @dev Returns the normalized income normalized income of the reserve * @param asset The address of the underlying asset of the reserve * @return The reserve's normalized income */ function getReserveNormalizedIncome(address asset) external view returns (uint256); /** * @dev Returns the normalized variable debt per unit of asset * @param asset The address of the underlying asset of the reserve * @return The reserve normalized variable debt */ function getReserveNormalizedVariableDebt(address asset) external view returns (uint256); /** * @dev Returns the state and configuration of the reserve * @param asset The address of the underlying asset of the reserve * @return The state of the reserve **/ function getReserveData(address asset) external view returns (DataTypes.ReserveData memory); function finalizeTransfer( address asset, address from, address to, uint256 amount, uint256 balanceFromAfter, uint256 balanceToBefore ) external; function getReservesList() external view returns (address[] memory); function getAddressesProvider() external view returns (ILendingPoolAddressesProvider); function setPause(bool val) external; function paused() external view returns (bool); }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.8.11; /** * @title LendingPoolAddressesProvider contract * @dev Main registry of addresses part of or connected to the protocol, including permissioned roles * - Acting also as factory of proxies and admin of those, so with right to change its implementations * - Owned by the Aave Governance * @author Aave **/ interface ILendingPoolAddressesProvider { event MarketIdSet(string newMarketId); event LendingPoolUpdated(address indexed newAddress); event ConfigurationAdminUpdated(address indexed newAddress); event EmergencyAdminUpdated(address indexed newAddress); event LendingPoolConfiguratorUpdated(address indexed newAddress); event LendingPoolCollateralManagerUpdated(address indexed newAddress); event PriceOracleUpdated(address indexed newAddress); event LendingRateOracleUpdated(address indexed newAddress); event ProxyCreated(bytes32 id, address indexed newAddress); event AddressSet(bytes32 id, address indexed newAddress, bool hasProxy); function getMarketId() external view returns (string memory); function setMarketId(string calldata marketId) external; function setAddress(bytes32 id, address newAddress) external; function setAddressAsProxy(bytes32 id, address impl) external; function getAddress(bytes32 id) external view returns (address); function getLendingPool() external view returns (address); function setLendingPoolImpl(address pool) external; function getLendingPoolConfigurator() external view returns (address); function setLendingPoolConfiguratorImpl(address configurator) external; function getLendingPoolCollateralManager() external view returns (address); function setLendingPoolCollateralManager(address manager) external; function getPoolAdmin() external view returns (address); function setPoolAdmin(address admin) external; function getEmergencyAdmin() external view returns (address); function setEmergencyAdmin(address admin) external; function getPriceOracle() external view returns (address); function setPriceOracle(address priceOracle) external; function getLendingRateOracle() external view returns (address); function setLendingRateOracle(address lendingRateOracle) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "./Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20.sol"; import "./Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.8.11; import {Errors} from './Errors.sol'; /** * @title WadRayMath library * @author Aave * @dev Provides mul and div function for wads (decimal numbers with 18 digits precision) and rays (decimals with 27 digits) **/ library WadRayMath { uint256 internal constant WAD = 1e18; uint256 internal constant halfWAD = WAD / 2; uint256 internal constant RAY = 1e27; uint256 internal constant halfRAY = RAY / 2; uint256 internal constant WAD_RAY_RATIO = 1e9; /** * @return One ray, 1e27 **/ function ray() internal pure returns (uint256) { return RAY; } /** * @return One wad, 1e18 **/ function wad() internal pure returns (uint256) { return WAD; } /** * @return Half ray, 1e27/2 **/ function halfRay() internal pure returns (uint256) { return halfRAY; } /** * @return Half ray, 1e18/2 **/ function halfWad() internal pure returns (uint256) { return halfWAD; } /** * @dev Multiplies two wad, rounding half up to the nearest wad * @param a Wad * @param b Wad * @return The result of a*b, in wad **/ function wadMul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0 || b == 0) { return 0; } require(a <= (type(uint256).max - halfWAD) / b, Errors.MATH_MULTIPLICATION_OVERFLOW); return (a * b + halfWAD) / WAD; } /** * @dev Divides two wad, rounding half up to the nearest wad * @param a Wad * @param b Wad * @return The result of a/b, in wad **/ function wadDiv(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, Errors.MATH_DIVISION_BY_ZERO); uint256 halfB = b / 2; require(a <= (type(uint256).max - halfB) / WAD, Errors.MATH_MULTIPLICATION_OVERFLOW); return (a * WAD + halfB) / b; } /** * @dev Multiplies two ray, rounding half up to the nearest ray * @param a Ray * @param b Ray * @return The result of a*b, in ray **/ function rayMul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0 || b == 0) { return 0; } require(a <= (type(uint256).max - halfRAY) / b, Errors.MATH_MULTIPLICATION_OVERFLOW); return (a * b + halfRAY) / RAY; } /** * @dev Divides two ray, rounding half up to the nearest ray * @param a Ray * @param b Ray * @return The result of a/b, in ray **/ function rayDiv(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, Errors.MATH_DIVISION_BY_ZERO); uint256 halfB = b / 2; require(a <= (type(uint256).max - halfB) / RAY, Errors.MATH_MULTIPLICATION_OVERFLOW); return (a * RAY + halfB) / b; } /** * @dev Casts ray down to wad * @param a Ray * @return a casted to wad, rounded half up to the nearest wad **/ function rayToWad(uint256 a) internal pure returns (uint256) { uint256 halfRatio = WAD_RAY_RATIO / 2; uint256 result = halfRatio + a; require(result >= halfRatio, Errors.MATH_ADDITION_OVERFLOW); return result / WAD_RAY_RATIO; } /** * @dev Converts wad up to ray * @param a Wad * @return a converted in ray **/ function wadToRay(uint256 a) internal pure returns (uint256) { uint256 result = a * WAD_RAY_RATIO; require(result / WAD_RAY_RATIO == a, Errors.MATH_MULTIPLICATION_OVERFLOW); return result; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"DAISupplies","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"USDTSupplies","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"_approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"_recoverNexenTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"_withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"daiFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositDAI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositUSDT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserDAIBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserUSDTBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redeemDAI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemUSDT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdtFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052600180546001600160a01b0319908116738dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf17909155600280548216738f3cf7ad23cd3cadbd9735aff958023239c6a06317905560038054821673c2132d05d31c914a87c6611c10748aeb04b58e8f1790556004805490911673b32e335b798a1ac07007390683a128f134aa6e2517905534801561009457600080fd5b5061009e336100a3565b6100f3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6111a9806101026000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063bc2409ed11610066578063bc2409ed146101eb578063c9fd3e96146101f3578063e7c80f1714610206578063f2fde38b1461021957600080fd5b80638da5cb5b146101a257806393362eee146101bd5780639b6e57e1146101d0578063a330530a146101d857600080fd5b8063715018a6116100d3578063715018a6146101475780637b7d72251461014f57806386f462161461016257806387c064e31461018257600080fd5b80632c02060214610105578063365833e1146101215780634dac985e146101365780635d94be981461013f575b600080fd5b61010e60065481565b6040519081526020015b60405180910390f35b61013461012f366004610f4d565b61022c565b005b61010e60055481565b61013461026a565b61013461050f565b61013461015d366004610f82565b610545565b61010e610170366004610fac565b60076020526000908152604090205481565b61010e610190366004610fac565b60086020526000908152604090205481565b6000546040516001600160a01b039091168152602001610118565b61010e6101cb366004610fac565b6105eb565b610134610684565b61010e6101e6366004610fac565b6107f9565b610134610847565b610134610201366004610f4d565b610925565b610134610214366004610f4d565b6109e4565b610134610227366004610fac565b610a1a565b6002546102439082906001600160a01b0316610ab2565b3360009081526007602052604081208054839290610262908490610fdd565b909155505050565b33600090815260086020526040902054806102c05760405162461bcd60e51b81526020600482015260116024820152704e6f7468696e6720746f2072656465656d60781b60448201526064015b60405180910390fd5b336000818152600860205260408120819055906102dc906107f9565b600154600354604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018490523060448201529293506000929116906369328dec906064016020604051808303816000875af115801561033d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103619190610ff5565b9050600061036f848361100e565b905060008082156103c857610385600284611025565b91506000610393838561100e565b905080600660008282546103a79190610fdd565b90915550600e90506103ba856064611047565b6103c49190611025565b9150505b6003546001600160a01b031663a9059cbb336103e48986610fdd565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561042f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104539190611066565b61046f5760405162461bcd60e51b81526004016102b790611088565b8015610507576004805460405163a9059cbb60e01b81523392810192909252602482018390526001600160a01b03169063a9059cbb906044016020604051808303816000875af11580156104c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104eb9190611066565b6105075760405162461bcd60e51b81526004016102b790611088565b505050505050565b6000546001600160a01b031633146105395760405162461bcd60e51b81526004016102b7906110bf565b6105436000610bb4565b565b6000546001600160a01b0316331461056f5760405162461bcd60e51b81526004016102b7906110bf565b60015460405163095ea7b360e01b81526001600160a01b039182166004820152602481018390529083169063095ea7b3906044016020604051808303816000875af11580156105c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e69190611066565b505050565b6001600160a01b0381811660009081526007602052604080822054600154600254925163d15e005360e01b815292851660048401529293909261067d9291169063d15e0053906024015b602060405180830381865afa158015610652573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106769190610ff5565b8290610c04565b9392505050565b33600090815260076020526040902054806106d55760405162461bcd60e51b81526020600482015260116024820152704e6f7468696e6720746f2072656465656d60781b60448201526064016102b7565b336000818152600760205260408120819055906106f1906105eb565b600154600254604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018490523060448201529293506000929116906369328dec906064016020604051808303816000875af1158015610752573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107769190610ff5565b90506000610784848361100e565b905060008082156107dd5761079a600284611025565b915060006107a8838561100e565b905080600560008282546107bc9190610fdd565b90915550600e90506107cf856064611047565b6107d99190611025565b9150505b6002546001600160a01b031663a9059cbb336103e48986610fdd565b6001600160a01b0381811660009081526008602052604080822054600154600354925163d15e005360e01b815292851660048401529293909261067d9291169063d15e005390602401610635565b6000546001600160a01b031633146108715760405162461bcd60e51b81526004016102b7906110bf565b60055480156108fc5760006005556002546040516323b872dd60e01b8152306004820152336024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af11580156108d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fa9190611066565b505b6006548015610921576000600655600354610921906001600160a01b03163383610cc8565b5050565b6000546001600160a01b0316331461094f5760405162461bcd60e51b81526004016102b7906110bf565b6004805460405163a9059cbb60e01b81523392810192909252602482018390526001600160a01b03169063a9059cbb906044016020604051808303816000875af11580156109a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c59190611066565b6109e15760405162461bcd60e51b81526004016102b790611088565b50565b6003546109fb9082906001600160a01b0316610ab2565b3360009081526008602052604081208054839290610262908490610fdd565b6000546001600160a01b03163314610a445760405162461bcd60e51b81526004016102b7906110bf565b6001600160a01b038116610aa95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102b7565b6109e181610bb4565b6040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b038216906323b872dd906064016020604051808303816000875af1158015610b05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b299190611066565b610b455760405162461bcd60e51b81526004016102b790611088565b60015460405163e8eda9df60e01b81526001600160a01b03838116600483015260248201859052306044830152600060648301529091169063e8eda9df90608401600060405180830381600087803b158015610ba057600080fd5b505af1158015610507573d6000803e3d6000fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000821580610c11575081155b15610c1e57506000610cc2565b81610c3660026b033b2e3c9fd0803ce8000000611025565b610c429060001961100e565b610c4c9190611025565b83111560405180604001604052806002815260200161068760f31b81525090610c885760405162461bcd60e51b81526004016102b79190611124565b506b033b2e3c9fd0803ce8000000610ca1600282611025565b610cab8486611047565b610cb59190610fdd565b610cbf9190611025565b90505b92915050565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908401526105e692869291600091610d58918516908490610dd5565b8051909150156105e65780806020019051810190610d769190611066565b6105e65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102b7565b6060610de48484600085610dec565b949350505050565b606082471015610e4d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102b7565b843b610e9b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102b7565b600080866001600160a01b03168587604051610eb79190611157565b60006040518083038185875af1925050503d8060008114610ef4576040519150601f19603f3d011682016040523d82523d6000602084013e610ef9565b606091505b5091509150610f09828286610f14565b979650505050505050565b60608315610f2357508161067d565b825115610f335782518084602001fd5b8160405162461bcd60e51b81526004016102b79190611124565b600060208284031215610f5f57600080fd5b5035919050565b80356001600160a01b0381168114610f7d57600080fd5b919050565b60008060408385031215610f9557600080fd5b610f9e83610f66565b946020939093013593505050565b600060208284031215610fbe57600080fd5b610cbf82610f66565b634e487b7160e01b600052601160045260246000fd5b60008219821115610ff057610ff0610fc7565b500190565b60006020828403121561100757600080fd5b5051919050565b60008282101561102057611020610fc7565b500390565b60008261104257634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561106157611061610fc7565b500290565b60006020828403121561107857600080fd5b8151801515811461067d57600080fd5b60208082526019908201527f436f756c64206e6f74207472616e7366657220746f6b656e7300000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60005b8381101561110f5781810151838201526020016110f7565b8381111561111e576000848401525b50505050565b60208152600082518060208401526111438160408501602087016110f4565b601f01601f19169190910160400192915050565b600082516111698184602087016110f4565b919091019291505056fea2646970667358221220a8aa84ad8ca72084922f92eb9849a6f6905eed87d2401db9ce2512e095d9858a64736f6c634300080b0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063bc2409ed11610066578063bc2409ed146101eb578063c9fd3e96146101f3578063e7c80f1714610206578063f2fde38b1461021957600080fd5b80638da5cb5b146101a257806393362eee146101bd5780639b6e57e1146101d0578063a330530a146101d857600080fd5b8063715018a6116100d3578063715018a6146101475780637b7d72251461014f57806386f462161461016257806387c064e31461018257600080fd5b80632c02060214610105578063365833e1146101215780634dac985e146101365780635d94be981461013f575b600080fd5b61010e60065481565b6040519081526020015b60405180910390f35b61013461012f366004610f4d565b61022c565b005b61010e60055481565b61013461026a565b61013461050f565b61013461015d366004610f82565b610545565b61010e610170366004610fac565b60076020526000908152604090205481565b61010e610190366004610fac565b60086020526000908152604090205481565b6000546040516001600160a01b039091168152602001610118565b61010e6101cb366004610fac565b6105eb565b610134610684565b61010e6101e6366004610fac565b6107f9565b610134610847565b610134610201366004610f4d565b610925565b610134610214366004610f4d565b6109e4565b610134610227366004610fac565b610a1a565b6002546102439082906001600160a01b0316610ab2565b3360009081526007602052604081208054839290610262908490610fdd565b909155505050565b33600090815260086020526040902054806102c05760405162461bcd60e51b81526020600482015260116024820152704e6f7468696e6720746f2072656465656d60781b60448201526064015b60405180910390fd5b336000818152600860205260408120819055906102dc906107f9565b600154600354604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018490523060448201529293506000929116906369328dec906064016020604051808303816000875af115801561033d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103619190610ff5565b9050600061036f848361100e565b905060008082156103c857610385600284611025565b91506000610393838561100e565b905080600660008282546103a79190610fdd565b90915550600e90506103ba856064611047565b6103c49190611025565b9150505b6003546001600160a01b031663a9059cbb336103e48986610fdd565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561042f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104539190611066565b61046f5760405162461bcd60e51b81526004016102b790611088565b8015610507576004805460405163a9059cbb60e01b81523392810192909252602482018390526001600160a01b03169063a9059cbb906044016020604051808303816000875af11580156104c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104eb9190611066565b6105075760405162461bcd60e51b81526004016102b790611088565b505050505050565b6000546001600160a01b031633146105395760405162461bcd60e51b81526004016102b7906110bf565b6105436000610bb4565b565b6000546001600160a01b0316331461056f5760405162461bcd60e51b81526004016102b7906110bf565b60015460405163095ea7b360e01b81526001600160a01b039182166004820152602481018390529083169063095ea7b3906044016020604051808303816000875af11580156105c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e69190611066565b505050565b6001600160a01b0381811660009081526007602052604080822054600154600254925163d15e005360e01b815292851660048401529293909261067d9291169063d15e0053906024015b602060405180830381865afa158015610652573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106769190610ff5565b8290610c04565b9392505050565b33600090815260076020526040902054806106d55760405162461bcd60e51b81526020600482015260116024820152704e6f7468696e6720746f2072656465656d60781b60448201526064016102b7565b336000818152600760205260408120819055906106f1906105eb565b600154600254604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018490523060448201529293506000929116906369328dec906064016020604051808303816000875af1158015610752573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107769190610ff5565b90506000610784848361100e565b905060008082156107dd5761079a600284611025565b915060006107a8838561100e565b905080600560008282546107bc9190610fdd565b90915550600e90506107cf856064611047565b6107d99190611025565b9150505b6002546001600160a01b031663a9059cbb336103e48986610fdd565b6001600160a01b0381811660009081526008602052604080822054600154600354925163d15e005360e01b815292851660048401529293909261067d9291169063d15e005390602401610635565b6000546001600160a01b031633146108715760405162461bcd60e51b81526004016102b7906110bf565b60055480156108fc5760006005556002546040516323b872dd60e01b8152306004820152336024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af11580156108d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fa9190611066565b505b6006548015610921576000600655600354610921906001600160a01b03163383610cc8565b5050565b6000546001600160a01b0316331461094f5760405162461bcd60e51b81526004016102b7906110bf565b6004805460405163a9059cbb60e01b81523392810192909252602482018390526001600160a01b03169063a9059cbb906044016020604051808303816000875af11580156109a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c59190611066565b6109e15760405162461bcd60e51b81526004016102b790611088565b50565b6003546109fb9082906001600160a01b0316610ab2565b3360009081526008602052604081208054839290610262908490610fdd565b6000546001600160a01b03163314610a445760405162461bcd60e51b81526004016102b7906110bf565b6001600160a01b038116610aa95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102b7565b6109e181610bb4565b6040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b038216906323b872dd906064016020604051808303816000875af1158015610b05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b299190611066565b610b455760405162461bcd60e51b81526004016102b790611088565b60015460405163e8eda9df60e01b81526001600160a01b03838116600483015260248201859052306044830152600060648301529091169063e8eda9df90608401600060405180830381600087803b158015610ba057600080fd5b505af1158015610507573d6000803e3d6000fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000821580610c11575081155b15610c1e57506000610cc2565b81610c3660026b033b2e3c9fd0803ce8000000611025565b610c429060001961100e565b610c4c9190611025565b83111560405180604001604052806002815260200161068760f31b81525090610c885760405162461bcd60e51b81526004016102b79190611124565b506b033b2e3c9fd0803ce8000000610ca1600282611025565b610cab8486611047565b610cb59190610fdd565b610cbf9190611025565b90505b92915050565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908401526105e692869291600091610d58918516908490610dd5565b8051909150156105e65780806020019051810190610d769190611066565b6105e65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102b7565b6060610de48484600085610dec565b949350505050565b606082471015610e4d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102b7565b843b610e9b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102b7565b600080866001600160a01b03168587604051610eb79190611157565b60006040518083038185875af1925050503d8060008114610ef4576040519150601f19603f3d011682016040523d82523d6000602084013e610ef9565b606091505b5091509150610f09828286610f14565b979650505050505050565b60608315610f2357508161067d565b825115610f335782518084602001fd5b8160405162461bcd60e51b81526004016102b79190611124565b600060208284031215610f5f57600080fd5b5035919050565b80356001600160a01b0381168114610f7d57600080fd5b919050565b60008060408385031215610f9557600080fd5b610f9e83610f66565b946020939093013593505050565b600060208284031215610fbe57600080fd5b610cbf82610f66565b634e487b7160e01b600052601160045260246000fd5b60008219821115610ff057610ff0610fc7565b500190565b60006020828403121561100757600080fd5b5051919050565b60008282101561102057611020610fc7565b500390565b60008261104257634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561106157611061610fc7565b500290565b60006020828403121561107857600080fd5b8151801515811461067d57600080fd5b60208082526019908201527f436f756c64206e6f74207472616e7366657220746f6b656e7300000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60005b8381101561110f5781810151838201526020016110f7565b8381111561111e576000848401525b50505050565b60208152600082518060208401526111438160408501602087016110f4565b601f01601f19169190910160400192915050565b600082516111698184602087016110f4565b919091019291505056fea2646970667358221220a8aa84ad8ca72084922f92eb9849a6f6905eed87d2401db9ce2512e095d9858a64736f6c634300080b0033
Deployed Bytecode Sourcemap
189:4278:8:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;584:23;;;;;;;;;160:25:12;;;148:2;133:18;584:23:8;;;;;;;;720:132;;;;;;:::i;:::-;;:::i;:::-;;556:22;;;;;;2015:1018;;;:::i;1661:101:9:-;;;:::i;4151:138:8:-;;;;;;:::i;:::-;;:::i;614:46::-;;;;;;:::i;:::-;;;;;;;;;;;;;;666:47;;;;;;:::i;:::-;;;;;;;;;;;;;;1029:85:9;1075:7;1101:6;1029:85;;-1:-1:-1;;;;;1101:6:9;;;1155:51:12;;1143:2;1128:18;1029:85:9;1009:203:12;3287:205:8;;;;;;:::i;:::-;;:::i;999:1010::-;;;:::i;3498:208::-;;;;;;:::i;:::-;;:::i;3712:433::-;;;:::i;4299:166::-;;;;;;:::i;:::-;;:::i;858:135::-;;;;;;:::i;:::-;;:::i;1911:198:9:-;;;;;;:::i;:::-;;:::i;720:132:8:-;792:8;;774:27;;783:7;;-1:-1:-1;;;;;792:8:8;774;:27::i;:::-;823:10;811:23;;;;:11;:23;;;;;:34;;838:7;;811:23;:34;;838:7;;811:34;:::i;:::-;;;;-1:-1:-1;;;720:132:8:o;2015:1018::-;2087:10;2054:17;2074:24;;;:12;:24;;;;;;2116:13;2108:43;;;;-1:-1:-1;;;2108:43:8;;1684:2:12;2108:43:8;;;1666:21:12;1723:2;1703:18;;;1696:30;-1:-1:-1;;;1742:18:12;;;1735:47;1799:18;;2108:43:8;;;;;;;;;2174:10;2188:1;2161:24;;;:12;:24;;;;;:28;;;2188:1;2225:30;;:18;:30::i;:::-;2285:11;;2306:9;;2285:62;;-1:-1:-1;;;2285:62:8;;-1:-1:-1;;;;;2306:9:8;;;2285:62;;;2068:34:12;2118:18;;;2111:34;;;2341:4:8;2161:18:12;;;2154:43;2200:55:8;;-1:-1:-1;2265:17:8;;2285:11;;;:20;;2003:18:12;;2285:62:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2265:82;-1:-1:-1;2357:17:8;2377:21;2389:9;2265:82;2377:21;:::i;:::-;2357:41;-1:-1:-1;2408:21:8;;2489:13;;2485:258;;2534:13;2546:1;2534:9;:13;:::i;:::-;2518:29;-1:-1:-1;2561:12:8;2576:25;2518:29;2576:9;:25;:::i;:::-;2561:40;;2627:4;2615:8;;:16;;;;;;;:::i;:::-;;;;-1:-1:-1;2730:2:8;;-1:-1:-1;2712:15:8;:9;2724:3;2712:15;:::i;:::-;:20;;;;:::i;:::-;2690:42;;2504:239;2485:258;2768:9;;-1:-1:-1;;;;;2768:9:8;2761:26;2788:10;2800:25;2816:9;2800:13;:25;:::i;:::-;2761:65;;-1:-1:-1;;;;;;2761:65:8;;;;;;;-1:-1:-1;;;;;3114:32:12;;;2761:65:8;;;3096:51:12;3163:18;;;3156:34;3069:18;;2761:65:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2753:103;;;;-1:-1:-1;;;2753:103:8;;;;;;;:::i;:::-;2879:23;;2875:152;;2933:10;;;2926:60;;-1:-1:-1;;;2926:60:8;;2954:10;2926:60;;;3096:51:12;;;;3163:18;;;3156:34;;;-1:-1:-1;;;;;2933:10:8;;2926:27;;3069:18:12;;2926:60:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2918:98;;;;-1:-1:-1;;;2918:98:8;;;;;;;:::i;:::-;2044:989;;;;;;2015:1018::o;1661:101:9:-;1075:7;1101:6;-1:-1:-1;;;;;1101:6:9;719:10:1;1241:23:9;1233:68;;;;-1:-1:-1;;;1233:68:9;;;;;;;:::i;:::-;1725:30:::1;1752:1;1725:18;:30::i;:::-;1661:101::o:0;4151:138:8:-;1075:7:9;1101:6;-1:-1:-1;;;;;1101:6:9;719:10:1;1241:23:9;1233:68;;;;-1:-1:-1;;;1233:68:9;;;;;;;:::i;:::-;4260:11:8::1;::::0;4229:53:::1;::::0;-1:-1:-1;;;4229:53:8;;-1:-1:-1;;;;;4260:11:8;;::::1;4229:53;::::0;::::1;3096:51:12::0;3163:18;;;3156:34;;;4229:22:8;;::::1;::::0;::::1;::::0;3069:18:12;;4229:53:8::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;4151:138:::0;;:::o;3287:205::-;-1:-1:-1;;;;;3386:18:8;;;3349:7;3386:18;;;:11;:18;;;;;;;3436:11;;3475:8;;3436:48;;-1:-1:-1;;;3436:48:8;;3475:8;;;3436:48;;;1155:51:12;3349:7:8;;3386:18;;3421:64;;3436:11;;;:38;;1128:18:12;;3436:48:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3421:7;;:14;:64::i;:::-;3414:71;3287:205;-1:-1:-1;;;3287:205:8:o;999:1010::-;1069:10;1037:17;1057:23;;;:11;:23;;;;;;1098:13;1090:43;;;;-1:-1:-1;;;1090:43:8;;1684:2:12;1090:43:8;;;1666:21:12;1723:2;1703:18;;;1696:30;-1:-1:-1;;;1742:18:12;;;1735:47;1799:18;;1090:43:8;1482:341:12;1090:43:8;1155:10;1169:1;1143:23;;;:11;:23;;;;;:27;;;1169:1;1206:29;;:17;:29::i;:::-;1265:11;;1286:8;;1265:61;;-1:-1:-1;;;1265:61:8;;-1:-1:-1;;;;;1286:8:8;;;1265:61;;;2068:34:12;2118:18;;;2111:34;;;1320:4:8;2161:18:12;;;2154:43;1181:54:8;;-1:-1:-1;1245:17:8;;1265:11;;;:20;;2003:18:12;;1265:61:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1245:81;-1:-1:-1;1336:17:8;1356:21;1368:9;1245:81;1356:21;:::i;:::-;1336:41;-1:-1:-1;1387:21:8;;1468:13;;1464:256;;1513:13;1525:1;1513:9;:13;:::i;:::-;1497:29;-1:-1:-1;1540:12:8;1555:25;1497:29;1555:9;:25;:::i;:::-;1540:40;;1605:4;1594:7;;:15;;;;;;;:::i;:::-;;;;-1:-1:-1;1707:2:8;;-1:-1:-1;1689:15:8;:9;1701:3;1689:15;:::i;:::-;:20;;;;:::i;:::-;1667:42;;1483:237;1464:256;1745:8;;-1:-1:-1;;;;;1745:8:8;1738:25;1764:10;1776:25;1792:9;1776:13;:25;:::i;3498:208::-;-1:-1:-1;;;;;3598:19:8;;;3561:7;3598:19;;;:12;:19;;;;;;;3649:11;;3688:9;;3649:49;;-1:-1:-1;;;3649:49:8;;3688:9;;;3649:49;;;1155:51:12;3561:7:8;;3598:19;;3634:65;;3649:11;;;:38;;1128:18:12;;3649:49:8;1009:203:12;3712:433:8;1075:7:9;1101:6;-1:-1:-1;;;;;1101:6:9;719:10:1;1241:23:9;1233:68;;;;-1:-1:-1;;;1233:68:9;;;;;;;:::i;:::-;3787:7:8::1;::::0;3808:16;;3804:142:::1;;3850:1;3840:7;:11:::0;3872:8:::1;::::0;3865:70:::1;::::0;-1:-1:-1;;;3865:70:8;;3903:4:::1;3865:70;::::0;::::1;4438:34:12::0;3910:10:8::1;4488:18:12::0;;;4481:43;4540:18;;;4533:34;;;-1:-1:-1;;;;;3872:8:8;;::::1;::::0;3865:29:::1;::::0;4373:18:12;;3865:70:8::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3804:142;3980:8;::::0;4002:17;;3998:141:::1;;4046:1;4035:8;:12:::0;4090:9:::1;::::0;4061:67:::1;::::0;-1:-1:-1;;;;;4090:9:8::1;4102:10;4114:13:::0;4061:22:::1;:67::i;:::-;3754:391;;3712:433::o:0;4299:166::-;1075:7:9;1101:6;-1:-1:-1;;;;;1101:6:9;719:10:1;1241:23:9;1233:68;;;;-1:-1:-1;;;1233:68:9;;;;;;;:::i;:::-;4387:10:8::1;::::0;;4380:48:::1;::::0;-1:-1:-1;;;4380:48:8;;4408:10:::1;4380:48:::0;;::::1;3096:51:12::0;;;;3163:18;;;3156:34;;;-1:-1:-1;;;;;4387:10:8::1;::::0;4380:27:::1;::::0;3069:18:12;;4380:48:8::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4372:86;;;;-1:-1:-1::0;;;4372:86:8::1;;;;;;;:::i;:::-;4299:166:::0;:::o;858:135::-;931:9;;913:28;;922:7;;-1:-1:-1;;;;;931:9:8;913:8;:28::i;:::-;964:10;951:24;;;;:12;:24;;;;;:35;;979:7;;951:24;:35;;979:7;;951:35;:::i;1911:198:9:-;1075:7;1101:6;-1:-1:-1;;;;;1101:6:9;719:10:1;1241:23:9;1233:68;;;;-1:-1:-1;;;1233:68:9;;;;;;;:::i;:::-;-1:-1:-1;;;;;1999:22:9;::::1;1991:73;;;::::0;-1:-1:-1;;;1991:73:9;;4780:2:12;1991:73:9::1;::::0;::::1;4762:21:12::0;4819:2;4799:18;;;4792:30;4858:34;4838:18;;;4831:62;-1:-1:-1;;;4909:18:12;;;4902:36;4955:19;;1991:73:9::1;4578:402:12::0;1991:73:9::1;2074:28;2093:8;2074:18;:28::i;3039:242:8:-:0;3117:63;;-1:-1:-1;;;3117:63:8;;3145:10;3117:63;;;4438:34:12;3165:4:8;4488:18:12;;;4481:43;4540:18;;;4533:34;;;-1:-1:-1;;;;;3117:27:8;;;;;4373:18:12;;3117:63:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3109:101;;;;-1:-1:-1;;;3109:101:8;;;;;;;:::i;:::-;3220:11;;:54;;-1:-1:-1;;;3220:54:8;;-1:-1:-1;;;;;5279:15:12;;;3220:54:8;;;5261:34:12;5311:18;;;5304:34;;;3265:4:8;5354:18:12;;;5347:43;3220:11:8;5406:18:12;;;5399:47;3220:11:8;;;;:19;;5195::12;;3220:54:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2263:187:9;2336:16;2355:6;;-1:-1:-1;;;;;2371:17:9;;;-1:-1:-1;;;;;;2371:17:9;;;;;;2403:40;;2355:6;;;;;;;2403:40;;2336:16;2403:40;2326:124;2263:187;:::o;1999:253:11:-;2060:7;2079:6;;;:16;;-1:-1:-1;2089:6:11;;2079:16;2075:45;;;-1:-1:-1;2112:1:11;2105:8;;2075:45;2171:1;467:7;473:1;423:4;467:7;:::i;:::-;2140:27;;-1:-1:-1;;2140:27:11;:::i;:::-;2139:33;;;;:::i;:::-;2134:1;:38;;2174:35;;;;;;;;;;;;;-1:-1:-1;;;2174:35:11;;;2126:84;;;;;-1:-1:-1;;;2126:84:11;;;;;;;;:::i;:::-;-1:-1:-1;423:4:11;467:7;473:1;423:4;467:7;:::i;:::-;2225:5;2229:1;2225;:5;:::i;:::-;:15;;;;:::i;:::-;2224:23;;;;:::i;:::-;2217:30;;1999:253;;;;;:::o;620:175:10:-;729:58;;;-1:-1:-1;;;;;3114:32:12;;;729:58:10;;;3096:51:12;3163:18;;;;3156:34;;;729:58:10;;;;;;;;;;3069:18:12;;;;729:58:10;;;;;;;;-1:-1:-1;;;;;729:58:10;-1:-1:-1;;;729:58:10;;;3453:69;;;;;;;;;;;;;;;;702:86;;722:5;;729:58;-1:-1:-1;;3453:69:10;;:27;;;729:58;;3453:27;:69::i;:::-;3536:17;;3427:95;;-1:-1:-1;3536:21:10;3532:221;;3676:10;3665:30;;;;;;;;;;;;:::i;:::-;3657:85;;;;-1:-1:-1;;;3657:85:10;;6310:2:12;3657:85:10;;;6292:21:12;6349:2;6329:18;;;6322:30;6388:34;6368:18;;;6361:62;-1:-1:-1;;;6439:18:12;;;6432:40;6489:19;;3657:85:10;6108:406:12;3514:223:0;3647:12;3678:52;3700:6;3708:4;3714:1;3717:12;3678:21;:52::i;:::-;3671:59;3514:223;-1:-1:-1;;;;3514:223:0:o;4601:499::-;4766:12;4823:5;4798:21;:30;;4790:81;;;;-1:-1:-1;;;4790:81:0;;6721:2:12;4790:81:0;;;6703:21:12;6760:2;6740:18;;;6733:30;6799:34;6779:18;;;6772:62;-1:-1:-1;;;6850:18:12;;;6843:36;6896:19;;4790:81:0;6519:402:12;4790:81:0;1087:20;;4881:60;;;;-1:-1:-1;;;4881:60:0;;7128:2:12;4881:60:0;;;7110:21:12;7167:2;7147:18;;;7140:30;7206:31;7186:18;;;7179:59;7255:18;;4881:60:0;6926:353:12;4881:60:0;4953:12;4967:23;4994:6;-1:-1:-1;;;;;4994:11:0;5013:5;5020:4;4994:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4952:73;;;;5042:51;5059:7;5068:10;5080:12;5042:16;:51::i;:::-;5035:58;4601:499;-1:-1:-1;;;;;;;4601:499:0:o;7214:692::-;7360:12;7388:7;7384:516;;;-1:-1:-1;7418:10:0;7411:17;;7384:516;7529:17;;:21;7525:365;;7723:10;7717:17;7783:15;7770:10;7766:2;7762:19;7755:44;7525:365;7862:12;7855:20;;-1:-1:-1;;;7855:20:0;;;;;;;;:::i;196:180:12:-;255:6;308:2;296:9;287:7;283:23;279:32;276:52;;;324:1;321;314:12;276:52;-1:-1:-1;347:23:12;;196:180;-1:-1:-1;196:180:12:o;381:173::-;449:20;;-1:-1:-1;;;;;498:31:12;;488:42;;478:70;;544:1;541;534:12;478:70;381:173;;;:::o;559:254::-;627:6;635;688:2;676:9;667:7;663:23;659:32;656:52;;;704:1;701;694:12;656:52;727:29;746:9;727:29;:::i;:::-;717:39;803:2;788:18;;;;775:32;;-1:-1:-1;;;559:254:12:o;818:186::-;877:6;930:2;918:9;909:7;905:23;901:32;898:52;;;946:1;943;936:12;898:52;969:29;988:9;969:29;:::i;1217:127::-;1278:10;1273:3;1269:20;1266:1;1259:31;1309:4;1306:1;1299:15;1333:4;1330:1;1323:15;1349:128;1389:3;1420:1;1416:6;1413:1;1410:13;1407:39;;;1426:18;;:::i;:::-;-1:-1:-1;1462:9:12;;1349:128::o;2208:184::-;2278:6;2331:2;2319:9;2310:7;2306:23;2302:32;2299:52;;;2347:1;2344;2337:12;2299:52;-1:-1:-1;2370:16:12;;2208:184;-1:-1:-1;2208:184:12:o;2397:125::-;2437:4;2465:1;2462;2459:8;2456:34;;;2470:18;;:::i;:::-;-1:-1:-1;2507:9:12;;2397:125::o;2527:217::-;2567:1;2593;2583:132;;2637:10;2632:3;2628:20;2625:1;2618:31;2672:4;2669:1;2662:15;2700:4;2697:1;2690:15;2583:132;-1:-1:-1;2729:9:12;;2527:217::o;2749:168::-;2789:7;2855:1;2851;2847:6;2843:14;2840:1;2837:21;2832:1;2825:9;2818:17;2814:45;2811:71;;;2862:18;;:::i;:::-;-1:-1:-1;2902:9:12;;2749:168::o;3201:277::-;3268:6;3321:2;3309:9;3300:7;3296:23;3292:32;3289:52;;;3337:1;3334;3327:12;3289:52;3369:9;3363:16;3422:5;3415:13;3408:21;3401:5;3398:32;3388:60;;3444:1;3441;3434:12;3483:349;3685:2;3667:21;;;3724:2;3704:18;;;3697:30;3763:27;3758:2;3743:18;;3736:55;3823:2;3808:18;;3483:349::o;3837:356::-;4039:2;4021:21;;;4058:18;;;4051:30;4117:34;4112:2;4097:18;;4090:62;4184:2;4169:18;;3837:356::o;5457:258::-;5529:1;5539:113;5553:6;5550:1;5547:13;5539:113;;;5629:11;;;5623:18;5610:11;;;5603:39;5575:2;5568:10;5539:113;;;5670:6;5667:1;5664:13;5661:48;;;5705:1;5696:6;5691:3;5687:16;5680:27;5661:48;;5457:258;;;:::o;5720:383::-;5869:2;5858:9;5851:21;5832:4;5901:6;5895:13;5944:6;5939:2;5928:9;5924:18;5917:34;5960:66;6019:6;6014:2;6003:9;5999:18;5994:2;5986:6;5982:15;5960:66;:::i;:::-;6087:2;6066:15;-1:-1:-1;;6062:29:12;6047:45;;;;6094:2;6043:54;;5720:383;-1:-1:-1;;5720:383:12:o;7284:274::-;7413:3;7451:6;7445:13;7467:53;7513:6;7508:3;7501:4;7493:6;7489:17;7467:53;:::i;:::-;7536:16;;;;;7284:274;-1:-1:-1;;7284:274:12:o
Swarm Source
ipfs://a8aa84ad8ca72084922f92eb9849a6f6905eed87d2401db9ce2512e095d9858a
Loading...
Loading
Loading...
Loading
[ 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.