Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
_set Controller | 12817475 | 1199 days ago | IN | 0 ETH | 0.00125355 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
12815735 | 1200 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x9E5B9F92...330a63705 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
PErc20Delegator
Compiler Version
v0.7.6+commit.7338295f
Contract Source Code (Solidity Multiple files format)
pragma solidity ^0.7.6; import "./ProxyWithRegistry.sol"; import "./RegistryInterface.sol"; /** * @title DeFiPie's PErc20Delegator Contract * @notice PTokens which wrap an EIP-20 underlying and delegate to an implementation * @author DeFiPie */ contract PErc20Delegator is ProxyWithRegistry { /** * @notice Construct a new money market * @param underlying_ The address of the underlying asset * @param controller_ The address of the Controller * @param interestRateModel_ The address of the interest rate model * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18 * @param initialReserveFactorMantissa_ The initial reserve factor, scaled by 1e18 * @param name_ ERC-20 name of this token * @param symbol_ ERC-20 symbol of this token * @param decimals_ ERC-20 decimal precision of this token * @param registry_ The address of the registry contract */ constructor( address underlying_, address controller_, address interestRateModel_, uint initialExchangeRateMantissa_, uint initialReserveFactorMantissa_, string memory name_, string memory symbol_, uint8 decimals_, address registry_ ) { // Set registry _setRegistry(registry_); // First delegate gets to initialize the delegator (i.e. storage contract) delegateTo(_pTokenImplementation(), abi.encodeWithSignature("initialize(address,address,address,address,uint256,uint256,string,string,uint8)", underlying_, registry_, controller_, interestRateModel_, initialExchangeRateMantissa_, initialReserveFactorMantissa_, name_, symbol_, decimals_)); } /** * @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, ) = _pTokenImplementation().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 { // delegate all other functions to current implementation delegateAndReturn(); } }
pragma solidity ^0.7.6; import "./RegistryInterface.sol"; contract ProxyWithRegistryStorage { /** * @notice Address of the registry contract */ address public registry; } abstract contract ProxyWithRegistryInterface is ProxyWithRegistryStorage { function _setRegistry(address _registry) internal virtual; function _pTokenImplementation() internal view virtual returns (address); } contract ProxyWithRegistry is ProxyWithRegistryInterface { /** * Returns actual address of the implementation contract from current registry * @return registry Address of the registry */ function _pTokenImplementation() internal view override returns (address) { return RegistryInterface(registry).pTokenImplementation(); } function _setRegistry(address _registry) internal override { registry = _registry; } } contract ImplementationStorage { address public implementation; function _setImplementation(address implementation_) internal { implementation = implementation_; } }
pragma solidity ^0.7.6; 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); }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"underlying_","type":"address"},{"internalType":"address","name":"controller_","type":"address"},{"internalType":"address","name":"interestRateModel_","type":"address"},{"internalType":"uint256","name":"initialExchangeRateMantissa_","type":"uint256"},{"internalType":"uint256","name":"initialReserveFactorMantissa_","type":"uint256"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"address","name":"registry_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"registry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80637b10399914610036575b61003361005a565b50005b61003e6100e1565b604080516001600160a01b039092168252519081900360200190f35b606060006100666100f0565b6001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146100c1576040519150601f19603f3d011682016040523d82523d6000602084013e6100c6565b606091505b505090506040513d6000823e8180156100dd573d82f35b3d82fd5b6000546001600160a01b031681565b60008060009054906101000a90046001600160a01b03166001600160a01b03166382466ff66040518163ffffffff1660e01b815260040160206040518083038186803b15801561013f57600080fd5b505afa158015610153573d6000803e3d6000fd5b505050506040513d602081101561016957600080fd5b505190509056fea264697066735822122021678440ec8ef4fb1f1cf85d2a016440b895bcc4be5ad69047bfbbf21d1df92064736f6c63430007060033
Deployed Bytecode Sourcemap
251:3431:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;3654:19;:17;:19::i;:::-;;251:3431;165:23:1;;;:::i;:::-;;;;-1:-1:-1;;;;;165:23:1;;;;;;;;;;;;;;2937:432:0;2984:12;3009;3027:23;:21;:23::i;:::-;-1:-1:-1;;;;;3027:36:0;3064:8;;3027:46;;;;;;;;;;;;;;-1:-1:-1;3027:46:0;;-1:-1:-1;3027:46:0;;-1:-1:-1;;3027:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3008:65;;;3133:4;3127:11;3183:16;3180:1;3166:12;3151:49;3221:7;3241:49;;;;3334:16;3320:12;3313:38;3241:49;3271:16;3257:12;3250:38;165:23:1;;;-1:-1:-1;;;;;165:23:1;;:::o;624:148::-;689:7;733:8;;;;;;;;;-1:-1:-1;;;;;733:8:1;-1:-1:-1;;;;;715:48:1;;:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;715:50:1;;-1:-1:-1;624:148:1;:::o
Swarm Source
ipfs://21678440ec8ef4fb1f1cf85d2a016440b895bcc4be5ad69047bfbbf21d1df920
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.