Address Details
contract

0xa13cB5C44832Df0F6939e8b1f4B685659Bc10F1e

Creator
0xac4b96–fcb761 at 0x4518fe–7f317c
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
Fetching transactions...
Transfers
Fetching transfers...
Gas Used
Fetching gas used...
Last Balance Update
11024281
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
CREALConfigurator




Optimization enabled
true
Compiler version
v0.6.12+commit.27d51765




Optimization runs
200
EVM Version
istanbul




Verified at
2022-01-10T03:06:21.157842Z

contracts/CREALConfigurator.sol

pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;

import {ERC20} from './dependencies/openzeppelin/contracts/ERC20.sol';
import {Ownable} from './dependencies/openzeppelin/contracts/Ownable.sol';
import './protocol/lendingpool/LendingPoolConfigurator.sol';
import './interfaces/ILendingPoolConfigurator.sol';

contract CREALConfigurator is Ownable {
  address constant lendingPoolConfiguratorAddress = 0x928F63a83217e427A84504950206834CBDa4Aa65;

  LendingPoolConfigurator public lendingPoolConfigurator =
    LendingPoolConfigurator(lendingPoolConfiguratorAddress);

  bytes constant params = '0x10';
  bool constant stableBorrowRateEnabled = true;
  uint8 constant underlyingAssetDecimals = 18;
  address constant cREALAddress = 0xe8537a3d056DA446677B9E9d6c5dB704EaAb4787;
  address constant aTokenImpl = 0x55bFCED2451b2154e06604D4269c9349F31141e6;
  address constant stableDebtTokenImpl = 0xaCdb7B3e2b0a038F1f4eF04736728E0065b689DA;
  address constant variableDebtTokenImpl = 0x0301Cf8F1FCD9255BD32FB7e0fE5B3494f445C2C;
  address constant interestRateStrategyAddress = 0xb3072f5F0d5e8B9036aEC29F37baB70E86EA0018;
  address constant treasury = 0x313bc86D3D6e86ba164B2B451cB0D9CfA7943e5c;
  address constant incentivesController = 0x0000000000000000000000000000000000000000;
  string constant underlyingAssetName = 'Celo Brazilian Real';
  string constant aTokenName = 'Moola interest bearing CREAL';
  string constant aTokenSymbol = 'mCREAL';
  string constant variableDebtTokenName = 'Moola variable debt bearing mCREAL';
  string constant variableDebtTokenSymbol = 'variableDebtmCREAL';
  string constant stableDebtTokenName = 'Moola stable debt bearing CREAL';
  string constant stableDebtTokenSymbol = 'stableDebtmCREAL';
  uint256 constant baseLTV = 7500;
  uint256 constant liquidationThreshold = 8000;
  uint256 constant liquidationBonus = 10500;
  uint256 constant reserveFactor = 1000;

  function execute() external onlyOwner {
    createReserve();
    enableCollateral();
    enableBorrowing();
    setReserveFactor();

    selfdestruct(payable(treasury));
  }

  function destruct() external onlyOwner {
    selfdestruct(payable(treasury));
  }

  function createReserve() internal {
    ILendingPoolConfigurator.InitReserveInput[]
      memory inputs = new ILendingPoolConfigurator.InitReserveInput[](1);
    ILendingPoolConfigurator.InitReserveInput memory input = ILendingPoolConfigurator
      .InitReserveInput({
        aTokenImpl: aTokenImpl,
        stableDebtTokenImpl: stableDebtTokenImpl,
        variableDebtTokenImpl: variableDebtTokenImpl,
        underlyingAssetDecimals: underlyingAssetDecimals,
        interestRateStrategyAddress: interestRateStrategyAddress,
        underlyingAsset: cREALAddress,
        treasury: treasury,
        incentivesController: incentivesController,
        underlyingAssetName: underlyingAssetName,
        aTokenName: aTokenName,
        aTokenSymbol: aTokenSymbol,
        variableDebtTokenName: variableDebtTokenName,
        variableDebtTokenSymbol: variableDebtTokenSymbol,
        stableDebtTokenName: stableDebtTokenName,
        stableDebtTokenSymbol: stableDebtTokenSymbol,
        params: params
      });
    inputs[0] = input;

    lendingPoolConfigurator.batchInitReserve(inputs);
  }

  function enableCollateral() internal {
    lendingPoolConfigurator.configureReserveAsCollateral(
      cREALAddress,
      baseLTV,
      liquidationThreshold,
      liquidationBonus
    );
  }

  function enableBorrowing() internal {
    lendingPoolConfigurator.enableBorrowingOnReserve(cREALAddress, stableBorrowRateEnabled);
  }

  function setReserveFactor() internal {
    lendingPoolConfigurator.setReserveFactor(cREALAddress, reserveFactor);
  }
}
        

Contract ABI

[{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"destruct","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"execute","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract LendingPoolConfigurator"}],"name":"lendingPoolConfigurator","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]}]
              

Contract Creation Code

0x6080604052600180546001600160a01b03191673928f63a83217e427a84504950206834cbda4aa6517905534801561003657600080fd5b506000610041610090565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350610094565b3390565b610af8806100a36000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80632b68b9c6146100675780636146195414610071578063715018a6146100795780638da5cb5b14610081578063ab5b1dbc1461009f578063f2fde38b146100a7575b600080fd5b61006f6100ba565b005b61006f61010f565b61006f610164565b6100896101e3565b60405161009691906107eb565b60405180910390f35b6100896101f2565b61006f6100b536600461075e565b610201565b6100c26102b7565b6000546001600160a01b039081169116146100f85760405162461bcd60e51b81526004016100ef90610a6b565b60405180910390fd5b73313bc86d3d6e86ba164b2b451cb0d9cfa7943e5cff5b6101176102b7565b6000546001600160a01b039081169116146101445760405162461bcd60e51b81526004016100ef90610a6b565b61014c6102bb565b61015461058e565b61015c610612565b6100f8610657565b61016c6102b7565b6000546001600160a01b039081169116146101995760405162461bcd60e51b81526004016100ef90610a6b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6001546001600160a01b031681565b6102096102b7565b6000546001600160a01b039081169116146102365760405162461bcd60e51b81526004016100ef90610a6b565b6001600160a01b03811661025c5760405162461bcd60e51b81526004016100ef90610a25565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b604080516001808252818301909252606091816020015b6102da61069f565b8152602001906001900390816102d25790505090506102f761069f565b60408051610200810182527355bfced2451b2154e06604d4269c9349f31141e6815273acdb7b3e2b0a038f1f4ef04736728e0065b689da602080830191909152730301cf8f1fcd9255bd32fb7e0fe5b3494f445c2c82840152601260608084019190915273b3072f5f0d5e8b9036aec29f37bab70e86ea0018608084015273e8537a3d056da446677b9e9d6c5db704eaab478760a084015273313bc86d3d6e86ba164b2b451cb0d9cfa7943e5c60c0840152600060e084015283518085018552601381527210d95b1bc8109c985e9a5b1a585b881499585b606a1b8184015261010084015283518085018552601c81527f4d6f6f6c6120696e7465726573742062656172696e6720435245414c00000000818401526101208401528351808501855260068152651b50d491505360d21b818401526101408401528351908101909352602280845291926101608401929091610aa1908301398152602001604051806040016040528060128152602001711d985c9a58589b195119589d1b50d491505360721b81525081526020016040518060400160405280601f81526020017f4d6f6f6c6120737461626c6520646562742062656172696e6720435245414c0081525081526020016040518060400160405280601081526020016f1cdd18589b195119589d1b50d491505360821b8152508152602001604051806040016040528060048152602001630307831360e41b8152508152509050808260008151811061051d57fe5b602090810291909101015260015460405163cef84c5160e01b81526001600160a01b039091169063cef84c5190610558908590600401610859565b600060405180830381600087803b15801561057257600080fd5b505af1158015610586573d6000803e3d6000fd5b505050505050565b600154604051637c4e560b60e01b81526001600160a01b0390911690637c4e560b906105de9073e8537a3d056da446677b9e9d6c5db704eaab478790611d4c90611f409061290490600401610833565b600060405180830381600087803b1580156105f857600080fd5b505af115801561060c573d6000803e3d6000fd5b50505050565b6001805460405163eede87c160e01b81526001600160a01b039091169163eede87c1916105de9173e8537a3d056da446677b9e9d6c5db704eaab4787916004016107ff565b600154604051634b4e675360e01b81526001600160a01b0390911690634b4e6753906105de9073e8537a3d056da446677b9e9d6c5db704eaab4787906103e89060040161081a565b60405180610200016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600060ff16815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b60006020828403121561076f578081fd5b81356001600160a01b0381168114610785578182fd5b9392505050565b6001600160a01b03169052565b60008151808452815b818110156107be576020818501810151868301820152016107a2565b818111156107cf5782602083870101525b50601f01601f19169290920160200192915050565b60ff169052565b6001600160a01b0391909116815260200190565b6001600160a01b039290921682521515602082015260400190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b60208082528251828201819052600091906040908185019080840286018301878501865b83811015610a1757603f19898403018552815161020061089e85835161078c565b888201516108ae8a87018261078c565b50878201516108bf8987018261078c565b506060808301516108d2828801826107e4565b50506080808301516108e68288018261078c565b505060a0808301516108fa8288018261078c565b505060c08083015161090e8288018261078c565b505060e0808301516109228288018261078c565b505061010080830151828288015261093c83880182610799565b9250505061012080830151868303828801526109588382610799565b9250505061014080830151868303828801526109748382610799565b9250505061016080830151868303828801526109908382610799565b9250505061018080830151868303828801526109ac8382610799565b925050506101a080830151868303828801526109c88382610799565b925050506101c080830151868303828801526109e48382610799565b925050506101e08083015192508582038187015250610a038183610799565b96890196945050509086019060010161087d565b509098975050505050505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fe4d6f6f6c61207661726961626c6520646562742062656172696e67206d435245414ca264697066735822122042f1391a3f5ca17e0440a9487985b4bab795a070d51300d5732349ff8139df7764736f6c634300060c0033

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c80632b68b9c6146100675780636146195414610071578063715018a6146100795780638da5cb5b14610081578063ab5b1dbc1461009f578063f2fde38b146100a7575b600080fd5b61006f6100ba565b005b61006f61010f565b61006f610164565b6100896101e3565b60405161009691906107eb565b60405180910390f35b6100896101f2565b61006f6100b536600461075e565b610201565b6100c26102b7565b6000546001600160a01b039081169116146100f85760405162461bcd60e51b81526004016100ef90610a6b565b60405180910390fd5b73313bc86d3d6e86ba164b2b451cb0d9cfa7943e5cff5b6101176102b7565b6000546001600160a01b039081169116146101445760405162461bcd60e51b81526004016100ef90610a6b565b61014c6102bb565b61015461058e565b61015c610612565b6100f8610657565b61016c6102b7565b6000546001600160a01b039081169116146101995760405162461bcd60e51b81526004016100ef90610a6b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6001546001600160a01b031681565b6102096102b7565b6000546001600160a01b039081169116146102365760405162461bcd60e51b81526004016100ef90610a6b565b6001600160a01b03811661025c5760405162461bcd60e51b81526004016100ef90610a25565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b604080516001808252818301909252606091816020015b6102da61069f565b8152602001906001900390816102d25790505090506102f761069f565b60408051610200810182527355bfced2451b2154e06604d4269c9349f31141e6815273acdb7b3e2b0a038f1f4ef04736728e0065b689da602080830191909152730301cf8f1fcd9255bd32fb7e0fe5b3494f445c2c82840152601260608084019190915273b3072f5f0d5e8b9036aec29f37bab70e86ea0018608084015273e8537a3d056da446677b9e9d6c5db704eaab478760a084015273313bc86d3d6e86ba164b2b451cb0d9cfa7943e5c60c0840152600060e084015283518085018552601381527210d95b1bc8109c985e9a5b1a585b881499585b606a1b8184015261010084015283518085018552601c81527f4d6f6f6c6120696e7465726573742062656172696e6720435245414c00000000818401526101208401528351808501855260068152651b50d491505360d21b818401526101408401528351908101909352602280845291926101608401929091610aa1908301398152602001604051806040016040528060128152602001711d985c9a58589b195119589d1b50d491505360721b81525081526020016040518060400160405280601f81526020017f4d6f6f6c6120737461626c6520646562742062656172696e6720435245414c0081525081526020016040518060400160405280601081526020016f1cdd18589b195119589d1b50d491505360821b8152508152602001604051806040016040528060048152602001630307831360e41b8152508152509050808260008151811061051d57fe5b602090810291909101015260015460405163cef84c5160e01b81526001600160a01b039091169063cef84c5190610558908590600401610859565b600060405180830381600087803b15801561057257600080fd5b505af1158015610586573d6000803e3d6000fd5b505050505050565b600154604051637c4e560b60e01b81526001600160a01b0390911690637c4e560b906105de9073e8537a3d056da446677b9e9d6c5db704eaab478790611d4c90611f409061290490600401610833565b600060405180830381600087803b1580156105f857600080fd5b505af115801561060c573d6000803e3d6000fd5b50505050565b6001805460405163eede87c160e01b81526001600160a01b039091169163eede87c1916105de9173e8537a3d056da446677b9e9d6c5db704eaab4787916004016107ff565b600154604051634b4e675360e01b81526001600160a01b0390911690634b4e6753906105de9073e8537a3d056da446677b9e9d6c5db704eaab4787906103e89060040161081a565b60405180610200016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600060ff16815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b60006020828403121561076f578081fd5b81356001600160a01b0381168114610785578182fd5b9392505050565b6001600160a01b03169052565b60008151808452815b818110156107be576020818501810151868301820152016107a2565b818111156107cf5782602083870101525b50601f01601f19169290920160200192915050565b60ff169052565b6001600160a01b0391909116815260200190565b6001600160a01b039290921682521515602082015260400190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b60208082528251828201819052600091906040908185019080840286018301878501865b83811015610a1757603f19898403018552815161020061089e85835161078c565b888201516108ae8a87018261078c565b50878201516108bf8987018261078c565b506060808301516108d2828801826107e4565b50506080808301516108e68288018261078c565b505060a0808301516108fa8288018261078c565b505060c08083015161090e8288018261078c565b505060e0808301516109228288018261078c565b505061010080830151828288015261093c83880182610799565b9250505061012080830151868303828801526109588382610799565b9250505061014080830151868303828801526109748382610799565b9250505061016080830151868303828801526109908382610799565b9250505061018080830151868303828801526109ac8382610799565b925050506101a080830151868303828801526109c88382610799565b925050506101c080830151868303828801526109e48382610799565b925050506101e08083015192508582038187015250610a038183610799565b96890196945050509086019060010161087d565b509098975050505050505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fe4d6f6f6c61207661726961626c6520646562742062656172696e67206d435245414ca264697066735822122042f1391a3f5ca17e0440a9487985b4bab795a070d51300d5732349ff8139df7764736f6c634300060c0033