Contract 0xC5B3cfcC8aD60565997cAEed1Cce6CC915A08B90

Contract Overview

Balance:
0 Ether
Txn Hash
Method
Block
From
To
Value
0x39f76ab705929548d55eabe1e24f2f020ce528f703842514e8ef778798a114e2_set Pending Adm...85218872021-05-03 17:30:18427 days 6 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.00003031
0x988ffff8e59a67e7a04f5019658f08a6fcc5a6cdddf5f3369f619f04fda99868_set Pending Adm...85209532021-05-03 13:36:47427 days 10 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.00004741
0x7e50073fa6ed5f0eca16147bada433fc2d415b1dfe9db327dc87e3ab810981c1_set Pending Adm...85209422021-05-03 13:34:02427 days 10 hrs ago0x3d6fdba796859f04cf5446ae25b243b35a2e775b IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000025631
0x3154655151e6248e492ae1434ce55cdbf3937e654900e7d4b04d00cacb611ef0Set P Token Impl...82436572021-03-16 9:47:16475 days 13 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000031861
0xc84ae55536e516b0c6c2839f1dbc9366cf6fd41835dbbfc344712105b6e03942Remove P Token78247432021-01-02 14:43:11548 days 9 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000035541
0xa12f2dac5fead2f328d2dc7affb901c5133356b7313be30d5040aa9b001c5300Add P Token78244912021-01-02 13:40:10548 days 10 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000050671
0x320ee221cf7944824bb89f0694b1dc0c05c92ab2c35fb638bc48220b77b96c48Remove P Token78241422021-01-02 12:12:55548 days 11 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000035541
0x15c838d98a1ae87f508618b8c65dbd4e4997ec64d01cd62d7cc3a873df67417bSet Implementati...78240982021-01-02 12:01:55548 days 11 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000029761
0xb1ec3b7e83e09464c551881b58acce4ea71429a308edd08f7d88d788656f82d5Remove P Token78240282021-01-02 11:44:25548 days 12 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000053831
0xa37503b09ec44c26899dae1ce349f83d561c6bd8186528891b8d5772d96ef46cSet Implementati...78240012021-01-02 11:37:40548 days 12 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000029761
0x02a0252456675aefb30770874a6800705d0ef8d922d1da811e8b07ed7bb3d2fcSet P Token Impl...78097552020-12-31 0:15:33550 days 23 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000031831
0x973493eb7dd180cd5592fb6824b5d35bc0286364a31953fbb0ae189ebc6beec4Set P Token Impl...78097392020-12-31 0:11:33550 days 23 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000031831
0x6a9eaaf1aae9be8e04ed7e352c65832f73a8090ade8d699a045b0a3848ae4da2Set P Token Impl...78096382020-12-30 23:46:18550 days 23 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000031831
0x415009d8a4bfaa6907ccdf2fe7076795bd0e30aa5dc1394c50353ebd59638d5cSet P Token Impl...78095352020-12-30 23:20:33551 days 24 mins ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000031821
0xb9b45307c552179f99852163093f5154c7e2cf6ce8d413323443c8b0c5c3299eSet P Token Impl...78094152020-12-30 22:50:33551 days 54 mins ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000031831
0xbdb5872d868d75fb3ec8792b63c17992c85a5a2315af4cc1afb09d102f590dfaSet P Token Impl...78089222020-12-30 20:47:18551 days 2 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000031821
0xfdad0503b8470ca9adaff9ace8bf7be21b69705b159546b65667815d65030d5a_set Factory Con...78076652020-12-30 15:32:24551 days 8 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000027621
0x47473f881b34e485edadb07fa398c6344e85f90859056ffc2750bf6b2fc261aaSet Implementati...78076542020-12-30 15:29:39551 days 8 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000029761
0xbe13a9e6f23bb280f143da708cfc62b8843fef9cfbb842880f795db33c423009_set Factory Con...78076282020-12-30 15:23:09551 days 8 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000030481
0xad451c83f4b4d4fbaf514340e7fc86d576a41410af7f3f672988e7a6df47a76aSet P Token Impl...76714822020-12-06 8:55:25575 days 14 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000031821
0x6fe9dbe1afb9123184328baa53606900e0dfe261e72ffb7ed79500cb4a16f64bSet P Token Impl...76616282020-12-04 15:49:53577 days 7 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000031821
0xd57f1203845d01a26e4868f6a29aa6878779ed05f2731a8d2b42c1d972f38d71Set P Token Impl...76613962020-12-04 14:51:51577 days 8 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000031821
0x02d5cc8790aa4412f45f859dfcb3e83259e8c73553a942ceb5c5ba5e0189a099_set Factory Con...76611822020-12-04 13:58:17577 days 9 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether0.000045481
0x593073dbfdfbc831dedfaa20c23edd10457ee097060aba0a5ff0ccc9c3532c870x6080604076605022020-12-04 11:08:09577 days 12 hrs ago0x32b230795ab78ab51ea7b3f15a23a762aaecd3e0 IN  Create: RegistryProxy0 Ether0.000444911
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b90 0x28c430f1bd4b36706062136ce34655e5be6fd9df0 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0x155ae77115de61ae5755abd2c12cfd020eb9d37e 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b90 0x28c430f1bd4b36706062136ce34655e5be6fd9df0 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0x0254c2c1886d62cdb10ff8af1eb9a1e7096eb4d6 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b90 0x28c430f1bd4b36706062136ce34655e5be6fd9df0 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0x155ae77115de61ae5755abd2c12cfd020eb9d37e 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b90 0x28c430f1bd4b36706062136ce34655e5be6fd9df0 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0x0254c2c1886d62cdb10ff8af1eb9a1e7096eb4d6 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b90 0x28c430f1bd4b36706062136ce34655e5be6fd9df0 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0x155ae77115de61ae5755abd2c12cfd020eb9d37e 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b90 0x28c430f1bd4b36706062136ce34655e5be6fd9df0 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0x38d35a0ddc9ff9a526841ca3fd887f0db1f3d3b1 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b90 0x28c430f1bd4b36706062136ce34655e5be6fd9df0 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0x155ae77115de61ae5755abd2c12cfd020eb9d37e 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b90 0x28c430f1bd4b36706062136ce34655e5be6fd9df0 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0x38d35a0ddc9ff9a526841ca3fd887f0db1f3d3b1 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b90 0x28c430f1bd4b36706062136ce34655e5be6fd9df0 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0x155ae77115de61ae5755abd2c12cfd020eb9d37e 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b90 0x28c430f1bd4b36706062136ce34655e5be6fd9df0 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0x50fea718a4d400c8fc83b895edbe68fe5cbd3389 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b90 0x28c430f1bd4b36706062136ce34655e5be6fd9df0 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0x155ae77115de61ae5755abd2c12cfd020eb9d37e 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b90 0x28c430f1bd4b36706062136ce34655e5be6fd9df0 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0x50fea718a4d400c8fc83b895edbe68fe5cbd3389 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b900 Ether
0xb6b0fbe60765be14952c25d15696bd34aebe8875a0573d4b2d13eb1b50dcc33695398562021-10-27 18:07:17250 days 5 hrs ago 0xc5b3cfcc8ad60565997caeed1cce6cc915a08b90 0x28c430f1bd4b36706062136ce34655e5be6fd9df0 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RegistryProxy

Compiler Version
v0.7.4+commit.3f05b770

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion, None license
File 1 of 4 : ErrorReporter.sol
pragma solidity ^0.7.4;

contract ControllerErrorReporter {
    enum Error {
        NO_ERROR,
        UNAUTHORIZED,
        CONTROLLER_MISMATCH,
        INSUFFICIENT_SHORTFALL,
        INSUFFICIENT_LIQUIDITY,
        INVALID_CLOSE_FACTOR,
        INVALID_COLLATERAL_FACTOR,
        INVALID_LIQUIDATION_INCENTIVE,
        MARKET_NOT_ENTERED, // no longer possible
        MARKET_NOT_LISTED,
        MARKET_ALREADY_LISTED,
        MATH_ERROR,
        NONZERO_BORROW_BALANCE,
        PRICE_ERROR,
        PRICE_UPDATE_ERROR,
        REJECTION,
        SNAPSHOT_ERROR,
        TOO_MANY_ASSETS,
        TOO_MUCH_REPAY
    }

    enum FailureInfo {
        ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
        ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,
        EXIT_MARKET_BALANCE_OWED,
        EXIT_MARKET_REJECTION,
        SET_CLOSE_FACTOR_OWNER_CHECK,
        SET_CLOSE_FACTOR_VALIDATION,
        SET_COLLATERAL_FACTOR_OWNER_CHECK,
        SET_COLLATERAL_FACTOR_NO_EXISTS,
        SET_COLLATERAL_FACTOR_VALIDATION,
        SET_COLLATERAL_FACTOR_WITHOUT_PRICE,
        SET_IMPLEMENTATION_OWNER_CHECK,
        SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,
        SET_LIQUIDATION_INCENTIVE_VALIDATION,
        SET_MAX_ASSETS_OWNER_CHECK,
        SET_PAUSE_GUARDIAN_OWNER_CHECK,
        SET_PENDING_ADMIN_OWNER_CHECK,
        SET_PENDING_IMPLEMENTATION_OWNER_CHECK,
        SET_PRICE_ORACLE_OWNER_CHECK,
        SUPPORT_MARKET_EXISTS,
        SUPPORT_MARKET_OWNER_CHECK
    }

    /**
      * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
      * contract-specific code that enables us to report opaque error codes from upgradeable contracts.
      **/
    event Failure(uint error, uint info, uint detail);

    /**
      * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
      */
    function fail(Error err, FailureInfo info) internal returns (uint) {
        emit Failure(uint(err), uint(info), 0);

        return uint(err);
    }

    /**
      * @dev use this when reporting an opaque error from an upgradeable collaborator contract
      */
    function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {
        emit Failure(uint(err), uint(info), opaqueError);

        return uint(err);
    }
}

contract TokenErrorReporter {
    enum Error {
        NO_ERROR,
        UNAUTHORIZED,
        BAD_INPUT,
        CONTROLLER_REJECTION,
        CONTROLLER_CALCULATION_ERROR,
        INTEREST_RATE_MODEL_ERROR,
        INVALID_ACCOUNT_PAIR,
        INVALID_CLOSE_AMOUNT_REQUESTED,
        INVALID_COLLATERAL_FACTOR,
        MATH_ERROR,
        MARKET_NOT_FRESH,
        MARKET_NOT_LISTED,
        TOKEN_INSUFFICIENT_ALLOWANCE,
        TOKEN_INSUFFICIENT_BALANCE,
        TOKEN_INSUFFICIENT_CASH,
        TOKEN_TRANSFER_IN_FAILED,
        TOKEN_TRANSFER_OUT_FAILED
    }

    /*
     * Note: FailureInfo (but not Error) is kept in alphabetical order
     *       This is because FailureInfo grows significantly faster, and
     *       the order of Error has some meaning, while the order of FailureInfo
     *       is entirely arbitrary.
     */
    enum FailureInfo {
        ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
        ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,
        ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,
        ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,
        ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,
        ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,
        ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,
        BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,
        BORROW_ACCRUE_INTEREST_FAILED,
        BORROW_CASH_NOT_AVAILABLE,
        BORROW_FRESHNESS_CHECK,
        BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,
        BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,
        BORROW_MARKET_NOT_LISTED,
        BORROW_CONTROLLER_REJECTION,
        LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,
        LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,
        LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,
        LIQUIDATE_CONTROLLER_REJECTION,
        LIQUIDATE_CONTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,
        LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,
        LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,
        LIQUIDATE_FRESHNESS_CHECK,
        LIQUIDATE_LIQUIDATOR_IS_BORROWER,
        LIQUIDATE_REPAY_BORROW_FRESH_FAILED,
        LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,
        LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,
        LIQUIDATE_SEIZE_CONTROLLER_REJECTION,
        LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,
        LIQUIDATE_SEIZE_TOO_MUCH,
        MINT_ACCRUE_INTEREST_FAILED,
        MINT_CONTROLLER_REJECTION,
        MINT_EXCHANGE_CALCULATION_FAILED,
        MINT_EXCHANGE_RATE_READ_FAILED,
        MINT_FRESHNESS_CHECK,
        MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,
        MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,
        MINT_TRANSFER_IN_FAILED,
        MINT_TRANSFER_IN_NOT_POSSIBLE,
        REDEEM_ACCRUE_INTEREST_FAILED,
        REDEEM_CONTROLLER_REJECTION,
        REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,
        REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,
        REDEEM_EXCHANGE_RATE_READ_FAILED,
        REDEEM_FRESHNESS_CHECK,
        REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,
        REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,
        REDEEM_TRANSFER_OUT_NOT_POSSIBLE,
        REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,
        REDUCE_RESERVES_ADMIN_CHECK,
        REDUCE_RESERVES_CASH_NOT_AVAILABLE,
        REDUCE_RESERVES_FRESH_CHECK,
        REDUCE_RESERVES_VALIDATION,
        REPAY_BEHALF_ACCRUE_INTEREST_FAILED,
        REPAY_BORROW_ACCRUE_INTEREST_FAILED,
        REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,
        REPAY_BORROW_CONTROLLER_REJECTION,
        REPAY_BORROW_FRESHNESS_CHECK,
        REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,
        REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,
        REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,
        SET_COLLATERAL_FACTOR_OWNER_CHECK,
        SET_COLLATERAL_FACTOR_VALIDATION,
        SET_CONTROLLER_OWNER_CHECK,
        SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,
        SET_INTEREST_RATE_MODEL_FRESH_CHECK,
        SET_INTEREST_RATE_MODEL_OWNER_CHECK,
        SET_MAX_ASSETS_OWNER_CHECK,
        SET_ORACLE_MARKET_NOT_LISTED,
        SET_PENDING_ADMIN_OWNER_CHECK,
        SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,
        SET_RESERVE_FACTOR_ADMIN_CHECK,
        SET_RESERVE_FACTOR_FRESH_CHECK,
        SET_RESERVE_FACTOR_BOUNDS_CHECK,
        TRANSFER_CONTROLLER_REJECTION,
        TRANSFER_NOT_ALLOWED,
        TRANSFER_NOT_ENOUGH,
        TRANSFER_TOO_MUCH,
        ADD_RESERVES_ACCRUE_INTEREST_FAILED,
        ADD_RESERVES_FRESH_CHECK,
        ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,
        SET_NEW_IMPLEMENTATION
    }

    /**
      * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
      * contract-specific code that enables us to report opaque error codes from upgradeable contracts.
      **/
    event Failure(uint error, uint info, uint detail);

    /**
      * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
      */
    function fail(Error err, FailureInfo info) internal returns (uint) {
        emit Failure(uint(err), uint(info), 0);

        return uint(err);
    }

    /**
      * @dev use this when reporting an opaque error from an upgradeable collaborator contract
      */
    function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {
        emit Failure(uint(err), uint(info), opaqueError);

        return uint(err);
    }
}

contract OracleErrorReporter {
    enum Error {
        NO_ERROR,
        UNAUTHORIZED,
        UPDATE_PRICE
    }

    enum FailureInfo {
        ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
        NO_RESERVES,
        PERIOD_NOT_ELAPSED,
        SET_NEW_ADDRESSES,
        SET_NEW_IMPLEMENTATION,
        SET_PENDING_ADMIN_OWNER_CHECK
    }

    /**
      * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
      * contract-specific code that enables us to report opaque error codes from upgradeable contracts.
      **/
    event Failure(uint error, uint info, uint detail);

    /**
      * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
      */
    function fail(Error err, FailureInfo info) internal returns (uint) {
        emit Failure(uint(err), uint(info), 0);

        return uint(err);
    }
}

contract FactoryErrorReporter {
    enum Error {
        NO_ERROR,
        INVALID_POOL,
        MARKET_NOT_LISTED,
        UNAUTHORIZED
    }

    //TODO: Add more cases
    enum FailureInfo {
        ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
        CREATE_PETH_POOL,
        CREATE_PPIE_POOL,
        DEFICIENCY_ETH_LIQUIDITY_IN_POOL,
        PAIR_IS_NOT_EXIST,
        SET_MIN_LIQUIDITY_OWNER_CHECK,
        SET_NEW_CONTROLLER,
        SET_NEW_EXCHANGE_RATE,
        SET_NEW_IMPLEMENTATION,
        SET_NEW_INTEREST_RATE_MODEL,
        SET_NEW_ORACLE,
        SET_NEW_RESERVE_FACTOR,
        SET_PENDING_ADMIN_OWNER_CHECK,
        SUPPORT_MARKET_BAD_RESULT
    }

    /**
      * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
      * contract-specific code that enables us to report opaque error codes from upgradeable contracts.
      **/
    event Failure(uint error, uint info, uint detail);

    /**
      * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
      */
    function fail(Error err, FailureInfo info) internal returns (uint) {
        emit Failure(uint(err), uint(info), 0);

        return uint(err);
    }
}

contract RegistryErrorReporter {
    enum Error {
        NO_ERROR,
        UNAUTHORIZED
    }

    //TODO: Add more cases
    enum FailureInfo {
        ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
        SET_NEW_IMPLEMENTATION,
        SET_PENDING_ADMIN_OWNER_CHECK,
        SET_NEW_FACTORY
    }

    /**
      * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
      * contract-specific code that enables us to report opaque error codes from upgradeable contracts.
      **/
    event Failure(uint error, uint info, uint detail);

    /**
      * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
      */
    function fail(Error err, FailureInfo info) internal returns (uint) {
        emit Failure(uint(err), uint(info), 0);

        return uint(err);
    }
}

File 2 of 4 : RegistryInterface.sol
pragma solidity ^0.7.4;

interface RegistryInterface {

    /**
     *  Returns admin address for cToken contracts
     *  @return admin address
     */
    function admin() external view returns (address payable);

    /**
     *  Returns address of actual PToken implementation contract
     *  @return Address of contract
     */
    function pTokenImplementation() external view returns (address);

    function addPToken(address underlying, address pToken) external returns(uint);
    function addPETH(address pETH_) external returns(uint);
    function addPPIE(address pPIE_) external returns(uint);
}

File 3 of 4 : RegistryProxy.sol
pragma solidity ^0.7.4;

import './RegistryStorage.sol';
import "./ErrorReporter.sol";
import './RegistryInterface.sol';

contract RegistryProxy is RegistryStorage, RegistryErrorReporter {
    /*** Admin Events ***/

    /**
     * @notice Event emitted when pendingAdmin is changed
     */
    event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);

    /**
     * @notice Event emitted when pendingAdmin is accepted, which means admin is updated
     */
    event NewAdmin(address oldAdmin, address newAdmin);

    /**
      * @notice Emitted when implementation is changed
      */
    event NewImplementation(address oldImplementation, address newImplementation);

    constructor(address _implementation, address pTokenImplementation) {
        admin = msg.sender;
        implementation = _implementation;

        delegateTo(implementation, abi.encodeWithSignature("initialize(address)", pTokenImplementation));
    }

    function setImplementation(address newImplementation) external returns(uint) {
        if (msg.sender != admin) {
            return fail(Error.UNAUTHORIZED, FailureInfo.SET_NEW_IMPLEMENTATION);
        }

        address oldImplementation = implementation;
        implementation = newImplementation;

        emit NewImplementation(oldImplementation, implementation);

        return(uint(Error.NO_ERROR));
    }

    /**
      * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.
      * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.
      * @param newPendingAdmin New pending admin.
      * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
      */
    function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {
        // Check caller = admin
        if (msg.sender != admin) {
            return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);
        }

        // Save current value, if any, for inclusion in log
        address oldPendingAdmin = pendingAdmin;

        // Store pendingAdmin with value newPendingAdmin
        pendingAdmin = newPendingAdmin;

        // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)
        emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);

        return uint(Error.NO_ERROR);
    }

    /**
      * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin
      * @dev Admin function for pending admin to accept role and update admin
      * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
      */
    function _acceptAdmin() external returns (uint) {
        // Check caller is pendingAdmin and pendingAdmin ≠ address(0)
        if (msg.sender != pendingAdmin || msg.sender == address(0)) {
            return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);
        }

        // Save current values for inclusion in log
        address oldAdmin = admin;
        address oldPendingAdmin = pendingAdmin;

        // Store admin with value pendingAdmin
        admin = pendingAdmin;

        // Clear the pending value
        pendingAdmin = address(0);

        emit NewAdmin(oldAdmin, admin);
        emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);

        return uint(Error.NO_ERROR);
    }

    /**
     * @notice Internal method to delegate execution to another contract
     * @dev It returns to the external caller whatever the implementation returns or forwards reverts
     * @param callee The contract to delegatecall
     * @param data The raw data to delegatecall
     * @return The returned bytes from the delegatecall
     */
    function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returnData) = callee.delegatecall(data);
        assembly {
            if eq(success, 0) {
                revert(add(returnData, 0x20), returndatasize())
            }
        }
        return returnData;
    }

    function delegateAndReturn() internal returns (bytes memory) {
        (bool success, ) = implementation.delegatecall(msg.data);

        assembly {
            let free_mem_ptr := mload(0x40)
            returndatacopy(free_mem_ptr, 0, returndatasize())

            switch success
            case 0 { revert(free_mem_ptr, returndatasize()) }
            default { return(free_mem_ptr, returndatasize()) }
        }
    }

    /**
     * @notice Delegates execution to an implementation contract
     * @dev It returns to the external caller whatever the implementation returns or forwards reverts
     */
    fallback() external payable {
        require(msg.value == 0, "RegistryProxy:fallback: cannot send value to fallback");

        // delegate all other functions to current implementation
        delegateAndReturn();
    }

    receive() external payable {
        require(msg.value == 0, "RegistryProxy:receive: cannot send value to receive");
    }
}

File 4 of 4 : RegistryStorage.sol
pragma solidity ^0.7.4;

contract RegistryStorage {
    address public implementation;
    address public admin;
    address public pendingAdmin;
}

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_implementation","type":"address"},{"internalType":"address","name":"pTokenImplementation","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"error","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"info","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"detail","type":"uint256"}],"name":"Failure","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"NewAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldImplementation","type":"address"},{"indexed":false,"internalType":"address","name":"newImplementation","type":"address"}],"name":"NewImplementation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldPendingAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newPendingAdmin","type":"address"}],"name":"NewPendingAdmin","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"_acceptAdmin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newPendingAdmin","type":"address"}],"name":"_setPendingAdmin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"setImplementation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b5060405161075c38038061075c8339818101604052604081101561003357600080fd5b508051602091820151600180546001600160a01b03199081163317909155600080546001600160a01b038086169190931617908190556040805183851660248083019190915282518083039091018152604490910190915294850180516001600160e01b0390811663189acdbd60e31b17909152939492936100ba9391909216916100c216565b505050610184565b606060006060846001600160a01b0316846040518082805190602001908083835b602083106101025780518252601f1990920191602091820191016100e3565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610162576040519150601f19603f3d011682016040523d82523d6000602084013e610167565b606091505b5091509150600082141561017c573d60208201fd5b949350505050565b6105c9806101936000396000f3fe6080604052600436106100695760003560e01c8063d784d42611610043578063d784d42614610180578063e9c714f2146101b3578063f851a440146101c8576100ad565b806326782247146100f55780635c60da1b14610126578063b71d1a0c1461013b576100ad565b366100ad5734156100ab5760405162461bcd60e51b815260040180806020018281038252603381526020018061052c6033913960400191505060405180910390fd5b005b34156100ea5760405162461bcd60e51b815260040180806020018281038252603581526020018061055f6035913960400191505060405180910390fd5b6100f26101dd565b50005b34801561010157600080fd5b5061010a610262565b604080516001600160a01b039092168252519081900360200190f35b34801561013257600080fd5b5061010a610271565b34801561014757600080fd5b5061016e6004803603602081101561015e57600080fd5b50356001600160a01b0316610280565b60408051918252519081900360200190f35b34801561018c57600080fd5b5061016e600480360360208110156101a357600080fd5b50356001600160a01b0316610320565b3480156101bf57600080fd5b5061016e6103b2565b3480156101d457600080fd5b5061010a6104af565b60008054604051606092916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d8060008114610242576040519150601f19603f3d011682016040523d82523d6000602084013e610247565b606091505b505090506040513d6000823e81801561025e573d82f35b3d82fd5b6002546001600160a01b031681565b6000546001600160a01b031681565b6001546000906001600160a01b031633146102a8576102a1600160026104be565b905061031b565b600280546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040805191909216808252602082019390935281517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9929181900390910190a160005b9150505b919050565b6001546000906001600160a01b03163314610340576102a16001806104be565b600080546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff19831617928390556040805192821680845293909116602083015280517fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a9281900390910190a16000610317565b6002546000906001600160a01b0316331415806103cd575033155b156103e5576103de600160006104be565b90506104ac565b60018054600280546001600160a01b0380821673ffffffffffffffffffffffffffffffffffffffff1980861682179687905590921690925560408051938316808552949092166020840152815190927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92908290030190a1600254604080516001600160a01b038085168252909216602083015280517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a99281900390910190a16000925050505b90565b6001546001600160a01b031681565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa08360018111156104ed57fe5b8360038111156104f957fe5b604080519283526020830191909152600082820152519081900360600190a182600181111561052457fe5b939250505056fe526567697374727950726f78793a726563656976653a2063616e6e6f742073656e642076616c756520746f2072656365697665526567697374727950726f78793a66616c6c6261636b3a2063616e6e6f742073656e642076616c756520746f2066616c6c6261636ba2646970667358221220444999b422c804052f0da6fc123874ee73e642fc371180b7b90d247adc2a774864736f6c63430007040033000000000000000000000000641ec5b05649a39c66392de4905d427d5da9a91f0000000000000000000000003d2d271cb002e6d2022e43549540047202bd76fe

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000641ec5b05649a39c66392de4905d427d5da9a91f0000000000000000000000003d2d271cb002e6d2022e43549540047202bd76fe

-----Decoded View---------------
Arg [0] : _implementation (address): 0x641ec5b05649a39c66392de4905d427d5da9a91f
Arg [1] : pTokenImplementation (address): 0x3d2d271cb002e6d2022e43549540047202bd76fe

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000641ec5b05649a39c66392de4905d427d5da9a91f
Arg [1] : 0000000000000000000000003d2d271cb002e6d2022e43549540047202bd76fe


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
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.