Source Code
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
FraxtalFpiTrackerTransportOracle
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: ISC
pragma solidity ^0.8.19;
// ====================================================================
// | ______ _______ |
// | / _____________ __ __ / ____(_____ ____ _____ ________ |
// | / /_ / ___/ __ `| |/_/ / /_ / / __ \/ __ `/ __ \/ ___/ _ \ |
// | / __/ / / / /_/ _> < / __/ / / / / / /_/ / / / / /__/ __/ |
// | /_/ /_/ \__,_/_/|_| /_/ /_/_/ /_/\__,_/_/ /_/\___/\___/ |
// | |
// ====================================================================
// =================== FraxtalFPITransportOracle ======================
// ====================================================================
// Frax Finance: https://github.com/FraxFinance
// ====================================================================
import { Timelock2Step } from "frax-std/access-control/v1/Timelock2Step.sol";
import { ITimelock2Step } from "frax-std/access-control/v1/interfaces/ITimelock2Step.sol";
import { ERC165Storage } from "src/contracts/utils/ERC165Storage.sol";
import { FixedPointMathLib } from "@solmate/utils/FixedPointMathLib.sol";
import { IStateRootOracle } from "src/contracts/frax-oracle/interfaces/IStateRootOracle.sol";
/// @title FraxtalERC4626TransportOracle
contract FraxtalFpiTrackerTransportOracle is Timelock2Step, ERC165Storage {
address public priceSource;
/// @notice the last L1 block for which the values were synced
uint96 public lastL1Block;
uint256 public updatedAt;
uint256 public ramp_period;
uint256 public lastUpdateTime;
uint256 public peg_price_target;
uint256 public peg_price_last;
IStateRootOracle public immutable stateRootOracle;
constructor(address _timelock, address _priceSource, address _stateRootOracle) {
_setTimelock({ _newTimelock: _timelock });
_registerInterface({ interfaceId: type(ITimelock2Step).interfaceId });
priceSource = _priceSource;
stateRootOracle = IStateRootOracle(_stateRootOracle);
}
// ====================================================================
// Internal Configuration Setters
// ====================================================================
/// @notice The ```_setPriceSource``` function sets the price source
/// @param _newPriceSource The new price source
function _setPriceSource(address _newPriceSource) internal {
address _priceSource = priceSource;
if (_priceSource == _newPriceSource) revert SamePriceSource();
emit SetPriceSource({ oldPriceSource: _priceSource, newPriceSource: _newPriceSource });
priceSource = _newPriceSource;
}
// ====================================================================
// Configuration Setters
// ====================================================================
/// @notice The ```setPriceSource``` function sets the price source
/// @dev Requires msg.sender to be the timelock address
/// @param _newPriceSource The new price source address
function setPriceSource(address _newPriceSource) external {
_requireTimelock();
_setPriceSource({ _newPriceSource: _newPriceSource });
}
// ====================================================================
// View Helpers
// ====================================================================
/// @notice The ```description``` function returns the description of the contract
/// @return _description The description of the contract
function description() external pure returns (string memory _description) {
_description = "FPI Oracle Transport";
}
function name() external pure returns (string memory _name) {
_name = "FPI Oracle Transport";
}
/// @notice The ```decimals``` function returns the decimals for the oracle
/// @return _decimals The decimals corresponding to the answer being transported to the L2
function decimals() external pure returns (uint8 _decimals) {
_decimals = 18;
}
/// @notice Conforms to the ERC4626 Interface
function pricePerShare() public view returns (uint256) {
return currPegPrice();
}
function _getPrices() internal view returns (bool isBadData, uint256 _priceLow, uint256 _priceHigh) {
_priceLow = _priceHigh = pricePerShare();
isBadData = false;
}
/// @notice The ```getPrices``` function is intended to return two prices from different oracles
/// @return isBadData is true when data is stale or otherwise bad
/// @return _priceLow is the lower of the two prices
/// @return _priceHigh is the higher of the two prices
function getPrices() external view returns (bool isBadData, uint256 _priceLow, uint256 _priceHigh) {
(isBadData, _priceLow, _priceHigh) = _getPrices();
}
/// @dev Adheres to chainlink's AggregatorV3Interface
/// @return _roundId The l1Block corresponding to the last time the oracle was proofed
/// @return _answer The price of sDai in dai
/// @return _startedAt The current timestamp
/// @return _updatedAt The current timestamp
/// @return _answeredInRound The l1Block corresponding to the last time the oracle was proofed
function latestRoundData()
external
view
returns (uint80 _roundId, int256 _answer, uint256 _startedAt, uint256 _updatedAt, uint80 _answeredInRound)
{
_answeredInRound = _roundId = uint80(lastL1Block);
_startedAt = _updatedAt = updatedAt;
_answer = int256(pricePerShare());
if (_answer < 0) revert CastError();
if (_roundId < 0) revert CastError();
}
// ====================================================================
// Relay functions from merkle prover
// ====================================================================
function updateFpiOracleData(
uint96 _l1BlockNumber,
uint256 _rampPeriod,
uint256 _lastUpdateTime,
uint256 _peg_price_target,
uint256 _peg_price_last
) external {
if (msg.sender != priceSource) revert OnlyPriceSource();
if (_l1BlockNumber < lastL1Block) revert StalePush();
ramp_period = _rampPeriod;
lastUpdateTime = _lastUpdateTime;
peg_price_target = _peg_price_target;
peg_price_last = _peg_price_last;
lastL1Block = _l1BlockNumber;
updatedAt = stateRootOracle.getBlockInfo(_l1BlockNumber).timestamp;
emit FPIDataUpdated(_l1BlockNumber, _lastUpdateTime, _peg_price_target, _peg_price_last);
}
// ====================================================================
// Events
// ====================================================================
/// @notice The ```SetPriceSource``` event is emitted when the price source is set
/// @param oldPriceSource The old price source address
/// @param newPriceSource The new price source address
event SetPriceSource(address oldPriceSource, address newPriceSource);
/// @notice The ```FPIDataUpdated``` event is emitted when the price data is updated
/// @param l1Block The l1Block corresponding to the 1l blocknumber at which the info was pushed
/// @param lastUpdate The timestamp at which the data was last updated on mainnet
/// @param pegPriceTarget The current peg target
/// @param pegPriceLast The old peg target
event FPIDataUpdated(uint96 l1Block, uint256 lastUpdate, uint256 pegPriceTarget, uint256 pegPriceLast);
// ====================================================================
// Errors
// ====================================================================
error OnlyPriceSource();
error SamePriceSource();
error StalePush();
error CastError();
// ====================================================================
// Math
// ====================================================================
// Current peg price in E18, accounting for the ramping
function currPegPrice() public view returns (uint256) {
uint256 elapsed_time = block.timestamp - lastUpdateTime;
if (elapsed_time >= ramp_period) {
return peg_price_target;
} else {
// Calculate the fraction of the delta to use, based on the elapsed time
// Can be negative in case of deflation (that never happens right :])
int256 fractional_price_delta = ((int256(peg_price_target) - int256(peg_price_last)) *
int256(elapsed_time)) / int256(ramp_period);
return uint256(int256(peg_price_last) + int256(fractional_price_delta));
}
}
}// SPDX-License-Identifier: ISC
pragma solidity >=0.8.0;
// ====================================================================
// | ______ _______ |
// | / _____________ __ __ / ____(_____ ____ _____ ________ |
// | / /_ / ___/ __ `| |/_/ / /_ / / __ \/ __ `/ __ \/ ___/ _ \ |
// | / __/ / / / /_/ _> < / __/ / / / / / /_/ / / / / /__/ __/ |
// | /_/ /_/ \__,_/_/|_| /_/ /_/_/ /_/\__,_/_/ /_/\___/\___/ |
// | |
// ====================================================================
// ========================== Timelock2Step ===========================
// ====================================================================
// Frax Finance: https://github.com/FraxFinance
// Primary Author
// Drake Evans: https://github.com/DrakeEvans
// Reviewers
// Dennis: https://github.com/denett
// ====================================================================
/// @title Timelock2Step
/// @author Drake Evans (Frax Finance) https://github.com/drakeevans
/// @dev Inspired by the OpenZeppelin's Ownable2Step contract
/// @notice An abstract contract which contains 2-step transfer and renounce logic for a timelock address
abstract contract Timelock2Step {
/// @notice The pending timelock address
address public pendingTimelockAddress;
/// @notice The current timelock address
address public timelockAddress;
constructor() {
timelockAddress = msg.sender;
}
/// @notice Emitted when timelock is transferred
error OnlyTimelock();
/// @notice Emitted when pending timelock is transferred
error OnlyPendingTimelock();
/// @notice The ```TimelockTransferStarted``` event is emitted when the timelock transfer is initiated
/// @param previousTimelock The address of the previous timelock
/// @param newTimelock The address of the new timelock
event TimelockTransferStarted(address indexed previousTimelock, address indexed newTimelock);
/// @notice The ```TimelockTransferred``` event is emitted when the timelock transfer is completed
/// @param previousTimelock The address of the previous timelock
/// @param newTimelock The address of the new timelock
event TimelockTransferred(address indexed previousTimelock, address indexed newTimelock);
/// @notice The ```_isSenderTimelock``` function checks if msg.sender is current timelock address
/// @return Whether or not msg.sender is current timelock address
function _isSenderTimelock() internal view returns (bool) {
return msg.sender == timelockAddress;
}
/// @notice The ```_requireTimelock``` function reverts if msg.sender is not current timelock address
function _requireTimelock() internal view {
if (msg.sender != timelockAddress) revert OnlyTimelock();
}
/// @notice The ```_isSenderPendingTimelock``` function checks if msg.sender is pending timelock address
/// @return Whether or not msg.sender is pending timelock address
function _isSenderPendingTimelock() internal view returns (bool) {
return msg.sender == pendingTimelockAddress;
}
/// @notice The ```_requirePendingTimelock``` function reverts if msg.sender is not pending timelock address
function _requirePendingTimelock() internal view {
if (msg.sender != pendingTimelockAddress) revert OnlyPendingTimelock();
}
/// @notice The ```_transferTimelock``` function initiates the timelock transfer
/// @dev This function is to be implemented by a public function
/// @param _newTimelock The address of the nominated (pending) timelock
function _transferTimelock(address _newTimelock) internal {
pendingTimelockAddress = _newTimelock;
emit TimelockTransferStarted(timelockAddress, _newTimelock);
}
/// @notice The ```_acceptTransferTimelock``` function completes the timelock transfer
/// @dev This function is to be implemented by a public function
function _acceptTransferTimelock() internal {
pendingTimelockAddress = address(0);
_setTimelock(msg.sender);
}
/// @notice The ```_setTimelock``` function sets the timelock address
/// @dev This function is to be implemented by a public function
/// @param _newTimelock The address of the new timelock
function _setTimelock(address _newTimelock) internal {
emit TimelockTransferred(timelockAddress, _newTimelock);
timelockAddress = _newTimelock;
}
/// @notice The ```transferTimelock``` function initiates the timelock transfer
/// @dev Must be called by the current timelock
/// @param _newTimelock The address of the nominated (pending) timelock
function transferTimelock(address _newTimelock) external virtual {
_requireTimelock();
_transferTimelock(_newTimelock);
}
/// @notice The ```acceptTransferTimelock``` function completes the timelock transfer
/// @dev Must be called by the pending timelock
function acceptTransferTimelock() external virtual {
_requirePendingTimelock();
_acceptTransferTimelock();
}
/// @notice The ```renounceTimelock``` function renounces the timelock after setting pending timelock to current timelock
/// @dev Pending timelock must be set to current timelock before renouncing, creating a 2-step renounce process
function renounceTimelock() external virtual {
_requireTimelock();
_requirePendingTimelock();
_transferTimelock(address(0));
_setTimelock(address(0));
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.0;
interface ITimelock2Step {
event TimelockTransferStarted(address indexed previousTimelock, address indexed newTimelock);
event TimelockTransferred(address indexed previousTimelock, address indexed newTimelock);
function acceptTransferTimelock() external;
function pendingTimelockAddress() external view returns (address);
function renounceTimelock() external;
function timelockAddress() external view returns (address);
function transferTimelock(address _newTimelock) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)
pragma solidity ^0.8.0;
import { ERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
/**
* @dev Storage based implementation of the {IERC165} interface.
*
* Contracts may inherit from this and call {_registerInterface} to declare
* their support of an interface.
*/
abstract contract ERC165Storage is ERC165 {
/**
* @dev Mapping of interface ids to whether or not it's supported.
*/
mapping(bytes4 => bool) private _supportedInterfaces;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId];
}
/**
* @dev Registers the contract as an implementer of the interface defined by
* `interfaceId`. Support of the actual ERC165 interface is automatic and
* registering its interface id is not required.
*
* See {IERC165-supportsInterface}.
*
* Requirements:
*
* - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
*/
function _registerInterface(bytes4 interfaceId) internal virtual {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
}// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
/// @notice Arithmetic library with operations for fixed-point numbers.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol)
/// @author Inspired by USM (https://github.com/usmfum/USM/blob/master/contracts/WadMath.sol)
library FixedPointMathLib {
/*//////////////////////////////////////////////////////////////
SIMPLIFIED FIXED POINT OPERATIONS
//////////////////////////////////////////////////////////////*/
uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.
function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {
return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.
}
function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {
return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.
}
function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {
return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.
}
function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {
return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.
}
/*//////////////////////////////////////////////////////////////
LOW LEVEL FIXED POINT OPERATIONS
//////////////////////////////////////////////////////////////*/
function mulDivDown(
uint256 x,
uint256 y,
uint256 denominator
) internal pure returns (uint256 z) {
assembly {
// Store x * y in z for now.
z := mul(x, y)
// Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))
if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {
revert(0, 0)
}
// Divide z by the denominator.
z := div(z, denominator)
}
}
function mulDivUp(
uint256 x,
uint256 y,
uint256 denominator
) internal pure returns (uint256 z) {
assembly {
// Store x * y in z for now.
z := mul(x, y)
// Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))
if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {
revert(0, 0)
}
// First, divide z - 1 by the denominator and add 1.
// We allow z - 1 to underflow if z is 0, because we multiply the
// end result by 0 if z is zero, ensuring we return 0 if z is zero.
z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1))
}
}
function rpow(
uint256 x,
uint256 n,
uint256 scalar
) internal pure returns (uint256 z) {
assembly {
switch x
case 0 {
switch n
case 0 {
// 0 ** 0 = 1
z := scalar
}
default {
// 0 ** n = 0
z := 0
}
}
default {
switch mod(n, 2)
case 0 {
// If n is even, store scalar in z for now.
z := scalar
}
default {
// If n is odd, store x in z for now.
z := x
}
// Shifting right by 1 is like dividing by 2.
let half := shr(1, scalar)
for {
// Shift n right by 1 before looping to halve it.
n := shr(1, n)
} n {
// Shift n right by 1 each iteration to halve it.
n := shr(1, n)
} {
// Revert immediately if x ** 2 would overflow.
// Equivalent to iszero(eq(div(xx, x), x)) here.
if shr(128, x) {
revert(0, 0)
}
// Store x squared.
let xx := mul(x, x)
// Round to the nearest number.
let xxRound := add(xx, half)
// Revert if xx + half overflowed.
if lt(xxRound, xx) {
revert(0, 0)
}
// Set x to scaled xxRound.
x := div(xxRound, scalar)
// If n is even:
if mod(n, 2) {
// Compute z * x.
let zx := mul(z, x)
// If z * x overflowed:
if iszero(eq(div(zx, x), z)) {
// Revert if x is non-zero.
if iszero(iszero(x)) {
revert(0, 0)
}
}
// Round to the nearest number.
let zxRound := add(zx, half)
// Revert if zx + half overflowed.
if lt(zxRound, zx) {
revert(0, 0)
}
// Return properly scaled zxRound.
z := div(zxRound, scalar)
}
}
}
}
}
/*//////////////////////////////////////////////////////////////
GENERAL NUMBER UTILITIES
//////////////////////////////////////////////////////////////*/
function sqrt(uint256 x) internal pure returns (uint256 z) {
assembly {
// Start off with z at 1.
z := 1
// Used below to help find a nearby power of 2.
let y := x
// Find the lowest power of 2 that is at least sqrt(x).
if iszero(lt(y, 0x100000000000000000000000000000000)) {
y := shr(128, y) // Like dividing by 2 ** 128.
z := shl(64, z) // Like multiplying by 2 ** 64.
}
if iszero(lt(y, 0x10000000000000000)) {
y := shr(64, y) // Like dividing by 2 ** 64.
z := shl(32, z) // Like multiplying by 2 ** 32.
}
if iszero(lt(y, 0x100000000)) {
y := shr(32, y) // Like dividing by 2 ** 32.
z := shl(16, z) // Like multiplying by 2 ** 16.
}
if iszero(lt(y, 0x10000)) {
y := shr(16, y) // Like dividing by 2 ** 16.
z := shl(8, z) // Like multiplying by 2 ** 8.
}
if iszero(lt(y, 0x100)) {
y := shr(8, y) // Like dividing by 2 ** 8.
z := shl(4, z) // Like multiplying by 2 ** 4.
}
if iszero(lt(y, 0x10)) {
y := shr(4, y) // Like dividing by 2 ** 4.
z := shl(2, z) // Like multiplying by 2 ** 2.
}
if iszero(lt(y, 0x8)) {
// Equivalent to 2 ** z.
z := shl(1, z)
}
// Shifting right by 1 is like dividing by 2.
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
// Compute a rounded down version of z.
let zRoundDown := div(x, z)
// If zRoundDown is smaller, use it.
if lt(zRoundDown, z) {
z := zRoundDown
}
}
}
}// SPDX-License-Identifier: ISC
pragma solidity ^0.8.20;
interface IStateRootOracle {
struct BlockInfo {
bytes32 stateRootHash;
uint40 timestamp;
}
function getBlockInfo(uint256 blockNumber) external view returns (BlockInfo memory _blockInfo);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}{
"remappings": [
"ds-test/=node_modules/ds-test/src/",
"forge-std/=node_modules/forge-std/src/",
"frax-std/=node_modules/frax-standard-solidity/src/",
"script/=src/script/",
"src/=src/",
"test/=src/test/",
"interfaces/=src/contracts/interfaces/",
"arbitrum/=node_modules/@arbitrum/",
"rlp/=node_modules/solidity-rlp/contracts/",
"@solmate/=node_modules/@rari-capital/solmate/src/",
"@arbitrum/=node_modules/@arbitrum/",
"@chainlink/=node_modules/@chainlink/",
"@mean-finance/=node_modules/@mean-finance/",
"@openzeppelin/=node_modules/@openzeppelin/",
"@rari-capital/=node_modules/@rari-capital/",
"@uniswap/=node_modules/@uniswap/",
"dev-fraxswap/=node_modules/dev-fraxswap/",
"frax-standard-solidity/=node_modules/frax-standard-solidity/",
"prb-math/=node_modules/prb-math/",
"solidity-bytes-utils/=node_modules/solidity-bytes-utils/",
"solidity-rlp/=node_modules/solidity-rlp/"
],
"optimizer": {
"enabled": true,
"runs": 1000000
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "none",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "shanghai",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_timelock","type":"address"},{"internalType":"address","name":"_priceSource","type":"address"},{"internalType":"address","name":"_stateRootOracle","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CastError","type":"error"},{"inputs":[],"name":"OnlyPendingTimelock","type":"error"},{"inputs":[],"name":"OnlyPriceSource","type":"error"},{"inputs":[],"name":"OnlyTimelock","type":"error"},{"inputs":[],"name":"SamePriceSource","type":"error"},{"inputs":[],"name":"StalePush","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint96","name":"l1Block","type":"uint96"},{"indexed":false,"internalType":"uint256","name":"lastUpdate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pegPriceTarget","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pegPriceLast","type":"uint256"}],"name":"FPIDataUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldPriceSource","type":"address"},{"indexed":false,"internalType":"address","name":"newPriceSource","type":"address"}],"name":"SetPriceSource","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousTimelock","type":"address"},{"indexed":true,"internalType":"address","name":"newTimelock","type":"address"}],"name":"TimelockTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousTimelock","type":"address"},{"indexed":true,"internalType":"address","name":"newTimelock","type":"address"}],"name":"TimelockTransferred","type":"event"},{"inputs":[],"name":"acceptTransferTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currPegPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"_decimals","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"_description","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getPrices","outputs":[{"internalType":"bool","name":"isBadData","type":"bool"},{"internalType":"uint256","name":"_priceLow","type":"uint256"},{"internalType":"uint256","name":"_priceHigh","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastL1Block","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"},{"internalType":"int256","name":"_answer","type":"int256"},{"internalType":"uint256","name":"_startedAt","type":"uint256"},{"internalType":"uint256","name":"_updatedAt","type":"uint256"},{"internalType":"uint80","name":"_answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"_name","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"peg_price_last","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"peg_price_target","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingTimelockAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceSource","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ramp_period","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newPriceSource","type":"address"}],"name":"setPriceSource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stateRootOracle","outputs":[{"internalType":"contract IStateRootOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timelockAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newTimelock","type":"address"}],"name":"transferTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint96","name":"_l1BlockNumber","type":"uint96"},{"internalType":"uint256","name":"_rampPeriod","type":"uint256"},{"internalType":"uint256","name":"_lastUpdateTime","type":"uint256"},{"internalType":"uint256","name":"_peg_price_target","type":"uint256"},{"internalType":"uint256","name":"_peg_price_last","type":"uint256"}],"name":"updateFpiOracleData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updatedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60a060405234801561000f575f80fd5b5060405162000fbf38038062000fbf83398101604081905261003091610179565b600180546001600160a01b0319163317905561004b83610081565b61005b632fa3fc3160e21b6100dc565b600380546001600160a01b0319166001600160a01b0393841617905516608052506101b9565b6001546040516001600160a01b038084169216907f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc6905f90a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160e01b0319808216900361013a5760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015260640160405180910390fd5b6001600160e01b0319165f908152600260205260409020805460ff19166001179055565b80516001600160a01b0381168114610174575f80fd5b919050565b5f805f6060848603121561018b575f80fd5b6101948461015e565b92506101a26020850161015e565b91506101b06040850161015e565b90509250925092565b608051610de6620001d95f395f818161033d01526105b90152610de65ff3fe608060405234801561000f575f80fd5b5060043610610184575f3560e01c80637284e416116100dd578063bd9a548b11610088578063c8f33c9111610063578063c8f33c91146103a0578063f6ccaad4146103a9578063feaf968c146103b1575f80fd5b8063bd9a548b1461035f578063bda5310714610384578063c0e3e6cd14610397575f80fd5b806382583a6a116100b857806382583a6a1461032757806399530b0614610330578063b20346ac14610338575f80fd5b80637284e416146101b05780637519ab50146102d1578063770b1c8f146102da575f80fd5b8063313ce5671161013d5780634bc66f32116101185780634bc66f32146102a05780634dc70f74146102c05780634f8b4ae7146102c9575f80fd5b8063313ce567146102685780633c09868e14610277578063450140951461028d575f80fd5b8063090f3f501161016d578063090f3f50146101ef5780631dd728cf1461023357806320531bc914610248575f80fd5b806301ffc9a71461018857806306fdde03146101b0575b5f80fd5b61019b610196366004610ac1565b6103f0565b60405190151581526020015b60405180910390f35b604080518082018252601481527f465049204f7261636c65205472616e73706f7274000000000000000000000000602082015290516101a79190610b07565b5f5461020e9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a7565b610246610241366004610b70565b610477565b005b60035461020e9073ffffffffffffffffffffffffffffffffffffffff1681565b604051601281526020016101a7565b61027f61068c565b6040519081526020016101a7565b61024661029b366004610bc0565b6106ef565b60015461020e9073ffffffffffffffffffffffffffffffffffffffff1681565b61027f60075481565b610246610703565b61027f60045481565b60035461030a907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1681565b6040516bffffffffffffffffffffffff90911681526020016101a7565b61027f60055481565b61027f610727565b61020e7f000000000000000000000000000000000000000000000000000000000000000081565b610367610735565b6040805193151584526020840192909252908201526060016101a7565b610246610392366004610bc0565b61074c565b61027f60085481565b61027f60065481565b61024661075d565b6103b961076d565b6040805169ffffffffffffffffffff968716815260208101959095528401929092526060830152909116608082015260a0016101a7565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061047157507fffffffff0000000000000000000000000000000000000000000000000000000082165f9081526002602052604090205460ff165b92915050565b60035473ffffffffffffffffffffffffffffffffffffffff1633146104c8576040517f2937b3e300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003546bffffffffffffffffffffffff740100000000000000000000000000000000000000009091048116908616101561052e576040517f011d308100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005849055600683905560078290556008819055600380546bffffffffffffffffffffffff871674010000000000000000000000000000000000000000810273ffffffffffffffffffffffffffffffffffffffff928316179092556040517fbb141cf400000000000000000000000000000000000000000000000000000000815260048101929092527f0000000000000000000000000000000000000000000000000000000000000000169063bb141cf4906024016040805180830381865afa1580156105fd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106219190610bf3565b60209081015164ffffffffff16600455604080516bffffffffffffffffffffffff881681529182018590528101839052606081018290527f8e69bd28505bd3fe03c2edb18ef2fed10ac5133fdf8dff5486b8d8eb772864109060800160405180910390a15050505050565b5f806006544261069c9190610ca2565b905060055481106106af57505060075490565b5f600554826008546007546106c49190610cb5565b6106ce9190610cdb565b6106d89190610d26565b9050806008546106e89190610db2565b9250505090565b6106f76107ea565b6107008161083b565b50565b61070b6107ea565b6107136108af565b61071c5f61083b565b6107255f6108ff565b565b5f61073061068c565b905090565b5f805f61074061098c565b91959094509092509050565b6107546107ea565b610700816109a3565b6107656108af565b610725610a91565b600354600454740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16905f9080836107a7610727565b93505f8412156107e3576040517f811752de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9091929394565b60015473ffffffffffffffffffffffffffffffffffffffff163314610725576040517f1c0be90a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217835560015460405192939116917f162998b90abc2507f3953aa797827b03a14c42dbd9a35f09feaf02e0d592773a9190a350565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610725576040517ff5c49e6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc6905f90a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b5f805f610997610727565b5f949093508392509050565b60035473ffffffffffffffffffffffffffffffffffffffff90811690821681036109f9576040517f22ba75b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8084168252841660208201527f964298b435edfc268e11aa89b342ef1ddac566da6759b6dd15d7aad58a1dc935910160405180910390a150600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b5f80547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610725336108ff565b5f60208284031215610ad1575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610b00575f80fd5b9392505050565b5f6020808352835180828501525f5b81811015610b3257858101830151858201604001528201610b16565b505f6040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b5f805f805f60a08688031215610b84575f80fd5b85356bffffffffffffffffffffffff81168114610b9f575f80fd5b97602087013597506040870135966060810135965060800135945092505050565b5f60208284031215610bd0575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610b00575f80fd5b5f60408284031215610c03575f80fd5b6040516040810181811067ffffffffffffffff82111715610c4b577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405282518152602083015164ffffffffff81168114610c69575f80fd5b60208201529392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8181038181111561047157610471610c75565b8181035f831280158383131683831282161715610cd457610cd4610c75565b5092915050565b8082025f82127f800000000000000000000000000000000000000000000000000000000000000084141615610d1257610d12610c75565b818105831482151761047157610471610c75565b5f82610d59577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f800000000000000000000000000000000000000000000000000000000000000083141615610dad57610dad610c75565b500590565b8082018281125f831280158216821582161715610dd157610dd1610c75565b50509291505056fea164736f6c6343000814000a000000000000000000000000c16068d1ca7e24e20e56bb70af4d00d92aa4f0b20000000000000000000000008fc7425cd36d7e4605650198099e4539238e9c37000000000000000000000000ed403d48e2bc946438b5686aa1ad65056ccf9512
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610184575f3560e01c80637284e416116100dd578063bd9a548b11610088578063c8f33c9111610063578063c8f33c91146103a0578063f6ccaad4146103a9578063feaf968c146103b1575f80fd5b8063bd9a548b1461035f578063bda5310714610384578063c0e3e6cd14610397575f80fd5b806382583a6a116100b857806382583a6a1461032757806399530b0614610330578063b20346ac14610338575f80fd5b80637284e416146101b05780637519ab50146102d1578063770b1c8f146102da575f80fd5b8063313ce5671161013d5780634bc66f32116101185780634bc66f32146102a05780634dc70f74146102c05780634f8b4ae7146102c9575f80fd5b8063313ce567146102685780633c09868e14610277578063450140951461028d575f80fd5b8063090f3f501161016d578063090f3f50146101ef5780631dd728cf1461023357806320531bc914610248575f80fd5b806301ffc9a71461018857806306fdde03146101b0575b5f80fd5b61019b610196366004610ac1565b6103f0565b60405190151581526020015b60405180910390f35b604080518082018252601481527f465049204f7261636c65205472616e73706f7274000000000000000000000000602082015290516101a79190610b07565b5f5461020e9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a7565b610246610241366004610b70565b610477565b005b60035461020e9073ffffffffffffffffffffffffffffffffffffffff1681565b604051601281526020016101a7565b61027f61068c565b6040519081526020016101a7565b61024661029b366004610bc0565b6106ef565b60015461020e9073ffffffffffffffffffffffffffffffffffffffff1681565b61027f60075481565b610246610703565b61027f60045481565b60035461030a907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1681565b6040516bffffffffffffffffffffffff90911681526020016101a7565b61027f60055481565b61027f610727565b61020e7f000000000000000000000000ed403d48e2bc946438b5686aa1ad65056ccf951281565b610367610735565b6040805193151584526020840192909252908201526060016101a7565b610246610392366004610bc0565b61074c565b61027f60085481565b61027f60065481565b61024661075d565b6103b961076d565b6040805169ffffffffffffffffffff968716815260208101959095528401929092526060830152909116608082015260a0016101a7565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061047157507fffffffff0000000000000000000000000000000000000000000000000000000082165f9081526002602052604090205460ff165b92915050565b60035473ffffffffffffffffffffffffffffffffffffffff1633146104c8576040517f2937b3e300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003546bffffffffffffffffffffffff740100000000000000000000000000000000000000009091048116908616101561052e576040517f011d308100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005849055600683905560078290556008819055600380546bffffffffffffffffffffffff871674010000000000000000000000000000000000000000810273ffffffffffffffffffffffffffffffffffffffff928316179092556040517fbb141cf400000000000000000000000000000000000000000000000000000000815260048101929092527f000000000000000000000000ed403d48e2bc946438b5686aa1ad65056ccf9512169063bb141cf4906024016040805180830381865afa1580156105fd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106219190610bf3565b60209081015164ffffffffff16600455604080516bffffffffffffffffffffffff881681529182018590528101839052606081018290527f8e69bd28505bd3fe03c2edb18ef2fed10ac5133fdf8dff5486b8d8eb772864109060800160405180910390a15050505050565b5f806006544261069c9190610ca2565b905060055481106106af57505060075490565b5f600554826008546007546106c49190610cb5565b6106ce9190610cdb565b6106d89190610d26565b9050806008546106e89190610db2565b9250505090565b6106f76107ea565b6107008161083b565b50565b61070b6107ea565b6107136108af565b61071c5f61083b565b6107255f6108ff565b565b5f61073061068c565b905090565b5f805f61074061098c565b91959094509092509050565b6107546107ea565b610700816109a3565b6107656108af565b610725610a91565b600354600454740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16905f9080836107a7610727565b93505f8412156107e3576040517f811752de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9091929394565b60015473ffffffffffffffffffffffffffffffffffffffff163314610725576040517f1c0be90a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217835560015460405192939116917f162998b90abc2507f3953aa797827b03a14c42dbd9a35f09feaf02e0d592773a9190a350565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610725576040517ff5c49e6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc6905f90a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b5f805f610997610727565b5f949093508392509050565b60035473ffffffffffffffffffffffffffffffffffffffff90811690821681036109f9576040517f22ba75b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8084168252841660208201527f964298b435edfc268e11aa89b342ef1ddac566da6759b6dd15d7aad58a1dc935910160405180910390a150600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b5f80547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610725336108ff565b5f60208284031215610ad1575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610b00575f80fd5b9392505050565b5f6020808352835180828501525f5b81811015610b3257858101830151858201604001528201610b16565b505f6040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b5f805f805f60a08688031215610b84575f80fd5b85356bffffffffffffffffffffffff81168114610b9f575f80fd5b97602087013597506040870135966060810135965060800135945092505050565b5f60208284031215610bd0575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610b00575f80fd5b5f60408284031215610c03575f80fd5b6040516040810181811067ffffffffffffffff82111715610c4b577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405282518152602083015164ffffffffff81168114610c69575f80fd5b60208201529392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8181038181111561047157610471610c75565b8181035f831280158383131683831282161715610cd457610cd4610c75565b5092915050565b8082025f82127f800000000000000000000000000000000000000000000000000000000000000084141615610d1257610d12610c75565b818105831482151761047157610471610c75565b5f82610d59577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f800000000000000000000000000000000000000000000000000000000000000083141615610dad57610dad610c75565b500590565b8082018281125f831280158216821582161715610dd157610dd1610c75565b50509291505056fea164736f6c6343000814000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c16068d1ca7e24e20e56bb70af4d00d92aa4f0b20000000000000000000000008fc7425cd36d7e4605650198099e4539238e9c37000000000000000000000000ed403d48e2bc946438b5686aa1ad65056ccf9512
-----Decoded View---------------
Arg [0] : _timelock (address): 0xc16068d1ca7E24E20e56bB70af4D00D92AA4f0b2
Arg [1] : _priceSource (address): 0x8fc7425Cd36D7e4605650198099e4539238e9c37
Arg [2] : _stateRootOracle (address): 0xeD403d48e2bC946438B5686AA1AD65056Ccf9512
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000c16068d1ca7e24e20e56bb70af4d00d92aa4f0b2
Arg [1] : 0000000000000000000000008fc7425cd36d7e4605650198099e4539238e9c37
Arg [2] : 000000000000000000000000ed403d48e2bc946438b5686aa1ad65056ccf9512
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in FRAX
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.