Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
ProviderIronBank
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.4.25 <0.7.5; import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; import { UniERC20 } from "../Libraries/LibUniERC20.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { IProvider } from "./IProvider.sol"; interface IGenCyToken is IERC20 { function redeem(uint256) external returns (uint256); function redeemUnderlying(uint256) external returns (uint256); function borrow(uint256 borrowAmount) external returns (uint256); function exchangeRateCurrent() external returns (uint256); function exchangeRateStored() external view returns (uint256); function borrowRatePerBlock() external view returns (uint256); function balanceOfUnderlying(address owner) external returns (uint256); function getAccountSnapshot(address account) external view returns ( uint256, uint256, uint256, uint256 ); function totalBorrowsCurrent() external returns (uint256); function borrowBalanceCurrent(address account) external returns (uint256); function borrowBalanceStored(address account) external view returns (uint256); function getCash() external view returns (uint256); } interface IWeth is IERC20 { function deposit() external payable; function withdraw(uint256 wad) external; } interface ICyErc20 is IGenCyToken { function mint(uint256) external returns (uint256); function repayBorrow(uint256 repayAmount) external returns (uint256); function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256); } interface IComptroller { function markets(address) external returns (bool, uint256); function enterMarkets(address[] calldata) external returns (uint256[] memory); function exitMarket(address cyTokenAddress) external returns (uint256); function getAccountLiquidity(address) external view returns ( uint256, uint256, uint256 ); } interface IFujiMappings { function addressMapping(address) external view returns (address); } contract HelperFunct { function _isETH(address token) internal pure returns (bool) { return (token == address(0) || token == address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)); } function _getMappingAddr() internal pure returns (address) { return 0x17525aFdb24D24ABfF18108E7319b93012f3AD24; } function _getComptrollerAddress() internal pure returns (address) { return 0xAB1c342C7bf5Ec5F02ADEA1c2270670bCa144CbB; } //IronBank functions /** * @dev Approves vault's assets as collateral for IronBank Protocol. * @param _cyTokenAddress: asset type to be approved as collateral. */ function _enterCollatMarket(address _cyTokenAddress) internal { // Create a reference to the corresponding network Comptroller IComptroller comptroller = IComptroller(_getComptrollerAddress()); address[] memory cyTokenMarkets = new address[](1); cyTokenMarkets[0] = _cyTokenAddress; comptroller.enterMarkets(cyTokenMarkets); } /** * @dev Removes vault's assets as collateral for IronBank Protocol. * @param _cyTokenAddress: asset type to be removed as collateral. */ function _exitCollatMarket(address _cyTokenAddress) internal { // Create a reference to the corresponding network Comptroller IComptroller comptroller = IComptroller(_getComptrollerAddress()); comptroller.exitMarket(_cyTokenAddress); } } contract ProviderIronBank is IProvider, HelperFunct { using SafeMath for uint256; using UniERC20 for IERC20; //Provider Core Functions /** * @dev Deposit ETH/ERC20_Token. * @param _asset: token address to deposit. (For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) * @param _amount: token amount to deposit. */ function deposit(address _asset, uint256 _amount) external payable override { //Get cyToken address from mapping address cyTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset); //Enter and/or ensure collateral market is enacted _enterCollatMarket(cyTokenAddr); if (_isETH(_asset)) { // Transform ETH to WETH IWeth(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2).deposit{ value: _amount }(); _asset = address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2); } // Create reference to the ERC20 contract IERC20 erc20token = IERC20(_asset); // Create a reference to the cyToken contract ICyErc20 cyToken = ICyErc20(cyTokenAddr); //Checks, Vault balance of ERC20 to make deposit require(erc20token.balanceOf(address(this)) >= _amount, "Not enough Balance"); //Approve to move ERC20tokens erc20token.uniApprove(address(cyTokenAddr), _amount); // IronBank Protocol mints cyTokens, trhow error if not require(cyToken.mint(_amount) == 0, "Deposit-failed"); } /** * @dev Withdraw ETH/ERC20_Token. * @param _asset: token address to withdraw. (For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) * @param _amount: token amount to withdraw. */ function withdraw(address _asset, uint256 _amount) external payable override { //Get cyToken address from mapping address cyTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset); // Create a reference to the corresponding cyToken contract IGenCyToken cyToken = IGenCyToken(cyTokenAddr); //IronBank Protocol Redeem Process, throw errow if not. require(cyToken.redeemUnderlying(_amount) == 0, "Withdraw-failed"); if (_isETH(_asset)) { // Transform ETH to WETH IWeth(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2).withdraw(_amount); } } /** * @dev Borrow ETH/ERC20_Token. * @param _asset token address to borrow.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) * @param _amount: token amount to borrow. */ function borrow(address _asset, uint256 _amount) external payable override { //Get cyToken address from mapping address cyTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset); // Create a reference to the corresponding cyToken contract IGenCyToken cyToken = IGenCyToken(cyTokenAddr); //Enter and/or ensure collateral market is enacted //_enterCollatMarket(cyTokenAddr); //IronBank Protocol Borrow Process, throw errow if not. require(cyToken.borrow(_amount) == 0, "borrow-failed"); } /** * @dev Payback borrowed ETH/ERC20_Token. * @param _asset token address to payback.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) * @param _amount: token amount to payback. */ function payback(address _asset, uint256 _amount) external payable override { //Get cyToken address from mapping address cyTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset); if (_isETH(_asset)) { // Transform ETH to WETH IWeth(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2).deposit{ value: _amount }(); _asset = address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2); } // Create reference to the ERC20 contract IERC20 erc20token = IERC20(_asset); // Create a reference to the corresponding cyToken contract ICyErc20 cyToken = ICyErc20(cyTokenAddr); // Check there is enough balance to pay require(erc20token.balanceOf(address(this)) >= _amount, "Not-enough-token"); erc20token.uniApprove(address(cyTokenAddr), _amount); cyToken.repayBorrow(_amount); } /** * @dev Returns the current borrowing rate (APR) of a ETH/ERC20_Token, in ray(1e27). * @param _asset: token address to query the current borrowing rate. */ function getBorrowRateFor(address _asset) external view override returns (uint256) { address cyTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset); //Block Rate transformed for common mantissa for Fuji in ray (1e27), Note: IronBank uses base 1e18 uint256 bRateperBlock = (IGenCyToken(cyTokenAddr).borrowRatePerBlock()).mul(10**9); // The approximate number of blocks per year that is assumed by the IronBank interest rate model uint256 blocksperYear = 2102400; return bRateperBlock.mul(blocksperYear); } /** * @dev Returns the borrow balance of a ETH/ERC20_Token. * @param _asset: token address to query the balance. */ function getBorrowBalance(address _asset) external view override returns (uint256) { address cyTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset); return IGenCyToken(cyTokenAddr).borrowBalanceStored(msg.sender); } /** * @dev Return borrow balance of ETH/ERC20_Token. * This function is the accurate way to get IronBank borrow balance. * It costs ~84K gas and is not a view function. * @param _asset token address to query the balance. * @param _who address of the account. */ function getBorrowBalanceOf(address _asset, address _who) external override returns (uint256) { address cyTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset); return IGenCyToken(cyTokenAddr).borrowBalanceCurrent(_who); } /** * @dev Returns the deposit balance of a ETH/ERC20_Token. * @param _asset: token address to query the balance. */ function getDepositBalance(address _asset) external view override returns (uint256) { address cyTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset); uint256 cyTokenBal = IGenCyToken(cyTokenAddr).balanceOf(msg.sender); uint256 exRate = IGenCyToken(cyTokenAddr).exchangeRateStored(); return exRate.mul(cyTokenBal).div(1e18); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; library UniERC20 { using SafeERC20 for IERC20; IERC20 private constant _ETH_ADDRESS = IERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE); IERC20 private constant _ZERO_ADDRESS = IERC20(0); function isETH(IERC20 token) internal pure returns (bool) { return (token == _ZERO_ADDRESS || token == _ETH_ADDRESS); } function uniBalanceOf(IERC20 token, address account) internal view returns (uint256) { if (isETH(token)) { return account.balance; } else { return token.balanceOf(account); } } function uniTransfer( IERC20 token, address payable to, uint256 amount ) internal { if (amount > 0) { if (isETH(token)) { to.transfer(amount); } else { token.safeTransfer(to, amount); } } } function uniApprove( IERC20 token, address to, uint256 amount ) internal { require(!isETH(token), "Approve called on ETH"); if (amount == 0) { token.safeApprove(to, 0); } else { uint256 allowance = token.allowance(address(this), to); if (allowance < amount) { if (allowance > 0) { token.safeApprove(to, 0); } token.safeApprove(to, amount); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.25 <0.7.0; interface IProvider { //Basic Core Functions function deposit(address _collateralAsset, uint256 _collateralAmount) external payable; function borrow(address _borrowAsset, uint256 _borrowAmount) external payable; function withdraw(address _collateralAsset, uint256 _collateralAmount) external payable; function payback(address _borrowAsset, uint256 _borrowAmount) external payable; // returns the borrow annualized rate for an asset in ray (1e27) //Example 8.5% annual interest = 0.085 x 10^27 = 85000000000000000000000000 or 85*(10**24) function getBorrowRateFor(address _asset) external view returns (uint256); function getBorrowBalance(address _asset) external view returns (uint256); function getDepositBalance(address _asset) external view returns (uint256); function getBorrowBalanceOf(address _asset, address _who) external returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; 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).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _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: MIT pragma solidity >=0.6.2 <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; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"borrow","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"getBorrowBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"address","name":"_who","type":"address"}],"name":"getBorrowBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"getBorrowRateFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"getDepositBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"payback","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506118c2806100206000396000f3fe60806040526004361061007b5760003560e01c80637d6af0791161004e5780637d6af07914610153578063ed05ae7814610186578063f17cca4a146101b9578063f3fef3a3146101ec5761007b565b806335ed8ab81461008057806347e7ef24146100ae5780634b8a3529146100da5780635172437714610106575b600080fd5b6100ac6004803603604081101561009657600080fd5b506001600160a01b038135169060200135610218565b005b6100ac600480360360408110156100c457600080fd5b506001600160a01b038135169060200135610483565b6100ac600480360360408110156100f057600080fd5b506001600160a01b038135169060200135610749565b34801561011257600080fd5b506101416004803603604081101561012957600080fd5b506001600160a01b03813581169160200135166108b6565b60408051918252519081900360200190f35b34801561015f57600080fd5b506101416004803603602081101561017657600080fd5b50356001600160a01b03166109d7565b34801561019257600080fd5b50610141600480360360208110156101a957600080fd5b50356001600160a01b0316610af0565b3480156101c557600080fd5b50610141600480360360208110156101dc57600080fd5b50356001600160a01b0316610c9d565b6100ac6004803603604081101561020257600080fd5b506001600160a01b038135169060200135610dcb565b6000610222610fb8565b6001600160a01b0316630494cd9a846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561026e57600080fd5b505afa158015610282573d6000803e3d6000fd5b505050506040513d602081101561029857600080fd5b505190506102a583610fd0565b1561032a5773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156102f957600080fd5b505af115801561030d573d6000803e3d6000fd5b505050505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc292505b604080516370a0823160e01b815230600482015290518491839185916001600160a01b038516916370a0823191602480820192602092909190829003018186803b15801561037757600080fd5b505afa15801561038b573d6000803e3d6000fd5b505050506040513d60208110156103a157600080fd5b505110156103f6576040805162461bcd60e51b815260206004820152601060248201527f4e6f742d656e6f7567682d746f6b656e00000000000000000000000000000000604482015290519081900360640190fd5b61040a6001600160a01b0383168486611009565b806001600160a01b0316630e752702856040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561045057600080fd5b505af1158015610464573d6000803e3d6000fd5b505050506040513d602081101561047a57600080fd5b50505050505050565b600061048d610fb8565b6001600160a01b0316630494cd9a846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156104d957600080fd5b505afa1580156104ed573d6000803e3d6000fd5b505050506040513d602081101561050357600080fd5b505190506105108161113e565b61051983610fd0565b1561059e5773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561056d57600080fd5b505af1158015610581573d6000803e3d6000fd5b505050505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc292505b604080516370a0823160e01b815230600482015290518491839185916001600160a01b038516916370a0823191602480820192602092909190829003018186803b1580156105eb57600080fd5b505afa1580156105ff573d6000803e3d6000fd5b505050506040513d602081101561061557600080fd5b5051101561066a576040805162461bcd60e51b815260206004820152601260248201527f4e6f7420656e6f7567682042616c616e63650000000000000000000000000000604482015290519081900360640190fd5b61067e6001600160a01b0383168486611009565b806001600160a01b031663a0712d68856040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b1580156106c457600080fd5b505af11580156106d8573d6000803e3d6000fd5b505050506040513d60208110156106ee57600080fd5b505115610742576040805162461bcd60e51b815260206004820152600e60248201527f4465706f7369742d6661696c6564000000000000000000000000000000000000604482015290519081900360640190fd5b5050505050565b6000610753610fb8565b6001600160a01b0316630494cd9a846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561079f57600080fd5b505afa1580156107b3573d6000803e3d6000fd5b505050506040513d60208110156107c957600080fd5b5051604080517fc5ebeaec00000000000000000000000000000000000000000000000000000000815260048101859052905191925082916001600160a01b0383169163c5ebeaec9160248083019260209291908290030181600087803b15801561083257600080fd5b505af1158015610846573d6000803e3d6000fd5b505050506040513d602081101561085c57600080fd5b5051156108b0576040805162461bcd60e51b815260206004820152600d60248201527f626f72726f772d6661696c656400000000000000000000000000000000000000604482015290519081900360640190fd5b50505050565b6000806108c1610fb8565b6001600160a01b0316630494cd9a856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561090d57600080fd5b505afa158015610921573d6000803e3d6000fd5b505050506040513d602081101561093757600080fd5b5051604080517f17bfdfbc0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301529151929350908316916317bfdfbc916024808201926020929091908290030181600087803b1580156109a157600080fd5b505af11580156109b5573d6000803e3d6000fd5b505050506040513d60208110156109cb57600080fd5b50519150505b92915050565b6000806109e2610fb8565b6001600160a01b0316630494cd9a846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610a2e57600080fd5b505afa158015610a42573d6000803e3d6000fd5b505050506040513d6020811015610a5857600080fd5b5051604080517f95dd919300000000000000000000000000000000000000000000000000000000815233600482015290519192506001600160a01b038316916395dd919391602480820192602092909190829003018186803b158015610abd57600080fd5b505afa158015610ad1573d6000803e3d6000fd5b505050506040513d6020811015610ae757600080fd5b50519392505050565b600080610afb610fb8565b6001600160a01b0316630494cd9a846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610b4757600080fd5b505afa158015610b5b573d6000803e3d6000fd5b505050506040513d6020811015610b7157600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b038416916370a08231916024808301926020929190829003018186803b158015610bbf57600080fd5b505afa158015610bd3573d6000803e3d6000fd5b505050506040513d6020811015610be957600080fd5b5051604080517f182df0f500000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0385169163182df0f5916004808301926020929190829003018186803b158015610c4a57600080fd5b505afa158015610c5e573d6000803e3d6000fd5b505050506040513d6020811015610c7457600080fd5b50519050610c94670de0b6b3a7640000610c8e83856112f7565b90611357565b95945050505050565b600080610ca8610fb8565b6001600160a01b0316630494cd9a846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610cf457600080fd5b505afa158015610d08573d6000803e3d6000fd5b505050506040513d6020811015610d1e57600080fd5b5051604080517ff8f9da280000000000000000000000000000000000000000000000000000000081529051919250600091610dbb91633b9aca00916001600160a01b0386169163f8f9da28916004808301926020929190829003018186803b158015610d8957600080fd5b505afa158015610d9d573d6000803e3d6000fd5b505050506040513d6020811015610db357600080fd5b5051906112f7565b905062201480610c9482826112f7565b6000610dd5610fb8565b6001600160a01b0316630494cd9a846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b5051604080517f852a12e300000000000000000000000000000000000000000000000000000000815260048101859052905191925082916001600160a01b0383169163852a12e39160248083019260209291908290030181600087803b158015610eb457600080fd5b505af1158015610ec8573d6000803e3d6000fd5b505050506040513d6020811015610ede57600080fd5b505115610f32576040805162461bcd60e51b815260206004820152600f60248201527f57697468647261772d6661696c65640000000000000000000000000000000000604482015290519081900360640190fd5b610f3b84610fd0565b156108b05773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316632e1a7d4d846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610f9a57600080fd5b505af1158015610fae573d6000803e3d6000fd5b5050505050505050565b7317525afdb24d24abff18108e7319b93012f3ad2490565b60006001600160a01b03821615806109d157506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1492915050565b61101283610fd0565b15611064576040805162461bcd60e51b815260206004820152601560248201527f417070726f76652063616c6c6564206f6e204554480000000000000000000000604482015290519081900360640190fd5b806110835761107e6001600160a01b0384168360006113be565b611139565b60408051636eb1769f60e11b81523060048201526001600160a01b038481166024830152915160009286169163dd62ed3e916044808301926020929190829003018186803b1580156110d457600080fd5b505afa1580156110e8573d6000803e3d6000fd5b505050506040513d60208110156110fe57600080fd5b50519050818110156108b0578015611125576111256001600160a01b0385168460006113be565b6108b06001600160a01b03851684846113be565b505050565b60006111486114ff565b6040805160018082528183019092529192506060919060208083019080368337019050509050828160008151811061117c57fe5b6001600160a01b039283166020918202929092018101919091526040517fc2998238000000000000000000000000000000000000000000000000000000008152600481018281528451602483015284519386169363c29982389386938392604490910191858101910280838360005b838110156112035781810151838201526020016111eb565b5050505090500192505050600060405180830381600087803b15801561122857600080fd5b505af115801561123c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561126557600080fd5b810190808051604051939291908464010000000082111561128557600080fd5b90830190602082018581111561129a57600080fd5b82518660208202830111640100000000821117156112b757600080fd5b82525081516020918201928201910280838360005b838110156112e45781810151838201526020016112cc565b5050505090500160405250505050505050565b600082611306575060006109d1565b8282028284828161131357fe5b04146113505760405162461bcd60e51b815260040180806020018281038252602181526020018061180c6021913960400191505060405180910390fd5b9392505050565b60008082116113ad576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816113b657fe5b049392505050565b801580611444575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561141657600080fd5b505afa15801561142a573d6000803e3d6000fd5b505050506040513d602081101561144057600080fd5b5051155b61147f5760405162461bcd60e51b81526004018080602001828103825260368152602001806118576036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052611139908490611517565b73ab1c342c7bf5ec5f02adea1c2270670bca144cbb90565b606061156c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115c89092919063ffffffff16565b8051909150156111395780806020019051602081101561158b57600080fd5b50516111395760405162461bcd60e51b815260040180806020018281038252602a81526020018061182d602a913960400191505060405180910390fd5b60606115d784846000856115df565b949350505050565b6060824710156116205760405162461bcd60e51b81526004018080602001828103825260268152602001806117e66026913960400191505060405180910390fd5b6116298561173b565b61167a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106116b95780518252601f19909201916020918201910161169a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461171b576040519150601f19603f3d011682016040523d82523d6000602084013e611720565b606091505b5091509150611730828286611741565b979650505050505050565b3b151590565b60608315611750575081611350565b8251156117605782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156117aa578181015183820152602001611792565b50505050905090810190601f1680156117d75780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a2646970667358221220493a5ad2a80372096db842a18077507721e13af1edb229bf926e7e8e346f5f5364736f6c634300060c0033
Deployed Bytecode
0x60806040526004361061007b5760003560e01c80637d6af0791161004e5780637d6af07914610153578063ed05ae7814610186578063f17cca4a146101b9578063f3fef3a3146101ec5761007b565b806335ed8ab81461008057806347e7ef24146100ae5780634b8a3529146100da5780635172437714610106575b600080fd5b6100ac6004803603604081101561009657600080fd5b506001600160a01b038135169060200135610218565b005b6100ac600480360360408110156100c457600080fd5b506001600160a01b038135169060200135610483565b6100ac600480360360408110156100f057600080fd5b506001600160a01b038135169060200135610749565b34801561011257600080fd5b506101416004803603604081101561012957600080fd5b506001600160a01b03813581169160200135166108b6565b60408051918252519081900360200190f35b34801561015f57600080fd5b506101416004803603602081101561017657600080fd5b50356001600160a01b03166109d7565b34801561019257600080fd5b50610141600480360360208110156101a957600080fd5b50356001600160a01b0316610af0565b3480156101c557600080fd5b50610141600480360360208110156101dc57600080fd5b50356001600160a01b0316610c9d565b6100ac6004803603604081101561020257600080fd5b506001600160a01b038135169060200135610dcb565b6000610222610fb8565b6001600160a01b0316630494cd9a846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561026e57600080fd5b505afa158015610282573d6000803e3d6000fd5b505050506040513d602081101561029857600080fd5b505190506102a583610fd0565b1561032a5773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156102f957600080fd5b505af115801561030d573d6000803e3d6000fd5b505050505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc292505b604080516370a0823160e01b815230600482015290518491839185916001600160a01b038516916370a0823191602480820192602092909190829003018186803b15801561037757600080fd5b505afa15801561038b573d6000803e3d6000fd5b505050506040513d60208110156103a157600080fd5b505110156103f6576040805162461bcd60e51b815260206004820152601060248201527f4e6f742d656e6f7567682d746f6b656e00000000000000000000000000000000604482015290519081900360640190fd5b61040a6001600160a01b0383168486611009565b806001600160a01b0316630e752702856040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561045057600080fd5b505af1158015610464573d6000803e3d6000fd5b505050506040513d602081101561047a57600080fd5b50505050505050565b600061048d610fb8565b6001600160a01b0316630494cd9a846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156104d957600080fd5b505afa1580156104ed573d6000803e3d6000fd5b505050506040513d602081101561050357600080fd5b505190506105108161113e565b61051983610fd0565b1561059e5773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561056d57600080fd5b505af1158015610581573d6000803e3d6000fd5b505050505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc292505b604080516370a0823160e01b815230600482015290518491839185916001600160a01b038516916370a0823191602480820192602092909190829003018186803b1580156105eb57600080fd5b505afa1580156105ff573d6000803e3d6000fd5b505050506040513d602081101561061557600080fd5b5051101561066a576040805162461bcd60e51b815260206004820152601260248201527f4e6f7420656e6f7567682042616c616e63650000000000000000000000000000604482015290519081900360640190fd5b61067e6001600160a01b0383168486611009565b806001600160a01b031663a0712d68856040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b1580156106c457600080fd5b505af11580156106d8573d6000803e3d6000fd5b505050506040513d60208110156106ee57600080fd5b505115610742576040805162461bcd60e51b815260206004820152600e60248201527f4465706f7369742d6661696c6564000000000000000000000000000000000000604482015290519081900360640190fd5b5050505050565b6000610753610fb8565b6001600160a01b0316630494cd9a846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561079f57600080fd5b505afa1580156107b3573d6000803e3d6000fd5b505050506040513d60208110156107c957600080fd5b5051604080517fc5ebeaec00000000000000000000000000000000000000000000000000000000815260048101859052905191925082916001600160a01b0383169163c5ebeaec9160248083019260209291908290030181600087803b15801561083257600080fd5b505af1158015610846573d6000803e3d6000fd5b505050506040513d602081101561085c57600080fd5b5051156108b0576040805162461bcd60e51b815260206004820152600d60248201527f626f72726f772d6661696c656400000000000000000000000000000000000000604482015290519081900360640190fd5b50505050565b6000806108c1610fb8565b6001600160a01b0316630494cd9a856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561090d57600080fd5b505afa158015610921573d6000803e3d6000fd5b505050506040513d602081101561093757600080fd5b5051604080517f17bfdfbc0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301529151929350908316916317bfdfbc916024808201926020929091908290030181600087803b1580156109a157600080fd5b505af11580156109b5573d6000803e3d6000fd5b505050506040513d60208110156109cb57600080fd5b50519150505b92915050565b6000806109e2610fb8565b6001600160a01b0316630494cd9a846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610a2e57600080fd5b505afa158015610a42573d6000803e3d6000fd5b505050506040513d6020811015610a5857600080fd5b5051604080517f95dd919300000000000000000000000000000000000000000000000000000000815233600482015290519192506001600160a01b038316916395dd919391602480820192602092909190829003018186803b158015610abd57600080fd5b505afa158015610ad1573d6000803e3d6000fd5b505050506040513d6020811015610ae757600080fd5b50519392505050565b600080610afb610fb8565b6001600160a01b0316630494cd9a846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610b4757600080fd5b505afa158015610b5b573d6000803e3d6000fd5b505050506040513d6020811015610b7157600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b038416916370a08231916024808301926020929190829003018186803b158015610bbf57600080fd5b505afa158015610bd3573d6000803e3d6000fd5b505050506040513d6020811015610be957600080fd5b5051604080517f182df0f500000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0385169163182df0f5916004808301926020929190829003018186803b158015610c4a57600080fd5b505afa158015610c5e573d6000803e3d6000fd5b505050506040513d6020811015610c7457600080fd5b50519050610c94670de0b6b3a7640000610c8e83856112f7565b90611357565b95945050505050565b600080610ca8610fb8565b6001600160a01b0316630494cd9a846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610cf457600080fd5b505afa158015610d08573d6000803e3d6000fd5b505050506040513d6020811015610d1e57600080fd5b5051604080517ff8f9da280000000000000000000000000000000000000000000000000000000081529051919250600091610dbb91633b9aca00916001600160a01b0386169163f8f9da28916004808301926020929190829003018186803b158015610d8957600080fd5b505afa158015610d9d573d6000803e3d6000fd5b505050506040513d6020811015610db357600080fd5b5051906112f7565b905062201480610c9482826112f7565b6000610dd5610fb8565b6001600160a01b0316630494cd9a846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b5051604080517f852a12e300000000000000000000000000000000000000000000000000000000815260048101859052905191925082916001600160a01b0383169163852a12e39160248083019260209291908290030181600087803b158015610eb457600080fd5b505af1158015610ec8573d6000803e3d6000fd5b505050506040513d6020811015610ede57600080fd5b505115610f32576040805162461bcd60e51b815260206004820152600f60248201527f57697468647261772d6661696c65640000000000000000000000000000000000604482015290519081900360640190fd5b610f3b84610fd0565b156108b05773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316632e1a7d4d846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610f9a57600080fd5b505af1158015610fae573d6000803e3d6000fd5b5050505050505050565b7317525afdb24d24abff18108e7319b93012f3ad2490565b60006001600160a01b03821615806109d157506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1492915050565b61101283610fd0565b15611064576040805162461bcd60e51b815260206004820152601560248201527f417070726f76652063616c6c6564206f6e204554480000000000000000000000604482015290519081900360640190fd5b806110835761107e6001600160a01b0384168360006113be565b611139565b60408051636eb1769f60e11b81523060048201526001600160a01b038481166024830152915160009286169163dd62ed3e916044808301926020929190829003018186803b1580156110d457600080fd5b505afa1580156110e8573d6000803e3d6000fd5b505050506040513d60208110156110fe57600080fd5b50519050818110156108b0578015611125576111256001600160a01b0385168460006113be565b6108b06001600160a01b03851684846113be565b505050565b60006111486114ff565b6040805160018082528183019092529192506060919060208083019080368337019050509050828160008151811061117c57fe5b6001600160a01b039283166020918202929092018101919091526040517fc2998238000000000000000000000000000000000000000000000000000000008152600481018281528451602483015284519386169363c29982389386938392604490910191858101910280838360005b838110156112035781810151838201526020016111eb565b5050505090500192505050600060405180830381600087803b15801561122857600080fd5b505af115801561123c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561126557600080fd5b810190808051604051939291908464010000000082111561128557600080fd5b90830190602082018581111561129a57600080fd5b82518660208202830111640100000000821117156112b757600080fd5b82525081516020918201928201910280838360005b838110156112e45781810151838201526020016112cc565b5050505090500160405250505050505050565b600082611306575060006109d1565b8282028284828161131357fe5b04146113505760405162461bcd60e51b815260040180806020018281038252602181526020018061180c6021913960400191505060405180910390fd5b9392505050565b60008082116113ad576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816113b657fe5b049392505050565b801580611444575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561141657600080fd5b505afa15801561142a573d6000803e3d6000fd5b505050506040513d602081101561144057600080fd5b5051155b61147f5760405162461bcd60e51b81526004018080602001828103825260368152602001806118576036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052611139908490611517565b73ab1c342c7bf5ec5f02adea1c2270670bca144cbb90565b606061156c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115c89092919063ffffffff16565b8051909150156111395780806020019051602081101561158b57600080fd5b50516111395760405162461bcd60e51b815260040180806020018281038252602a81526020018061182d602a913960400191505060405180910390fd5b60606115d784846000856115df565b949350505050565b6060824710156116205760405162461bcd60e51b81526004018080602001828103825260268152602001806117e66026913960400191505060405180910390fd5b6116298561173b565b61167a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106116b95780518252601f19909201916020918201910161169a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461171b576040519150601f19603f3d011682016040523d82523d6000602084013e611720565b606091505b5091509150611730828286611741565b979650505050505050565b3b151590565b60608315611750575081611350565b8251156117605782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156117aa578181015183820152602001611792565b50505050905090810190601f1680156117d75780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a2646970667358221220493a5ad2a80372096db842a18077507721e13af1edb229bf926e7e8e346f5f5364736f6c634300060c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.