Overview
FRAX Balance | FXTL Balance
FRAX Value
$0.00Latest 8 from a total of 8 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Add Round Fallba... | 1475899 | 694 days ago | IN | 0 FRAX | 0.00016214 | ||||
| Add Round Data C... | 1470633 | 694 days ago | IN | 0 FRAX | 0.00521187 | ||||
| Add Round Data C... | 1441798 | 694 days ago | IN | 0 FRAX | 0.00331275 | ||||
| Add Round Data C... | 1441661 | 694 days ago | IN | 0 FRAX | 0.00486961 | ||||
| Add Round Data C... | 1431401 | 695 days ago | IN | 0 FRAX | 0.00865492 | ||||
| Add Round Data C... | 1431401 | 695 days ago | IN | 0 FRAX | 0.00865492 | ||||
| Update Aggregato... | 1429178 | 695 days ago | IN | 0 FRAX | 0.01178631 | ||||
| Add Oracle Pairs | 1428299 | 695 days ago | IN | 0 FRAX | 0.00023169 |
Latest 9 internal transactions
Cross-Chain Transactions
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: ISC
pragma solidity ^0.8.19;
// ====================================================================
// | ______ _______ |
// | / _____________ __ __ / ____(_____ ____ _____ ________ |
// | / /_ / ___/ __ `| |/_/ / /_ / / __ \/ __ `/ __ \/ ___/ _ \ |
// | / __/ / / / /_/ _> < / __/ / / / / / /_/ / / / / /__/ __/ |
// | /_/ /_/ \__,_/_/|_| /_/ /_/_/ /_/\__,_/_/ /_/\___/\___/ |
// | |
// ====================================================================
// ====================== MerkleProofChainlink ========================
// ====================================================================
// Frax Finance: https://github.com/FraxFinance
// ====================================================================
import { ERC165Storage } from "@openzeppelin/contracts/utils/introspection/ERC165Storage.sol";
import { Timelock2Step } from "frax-std/access-control/v1/Timelock2Step.sol";
import { ITimelock2Step } from "frax-std/access-control/v1/interfaces/ITimelock2Step.sol";
import { MerkleTreeProver } from "./lib/MerkleTreeProver.sol";
import { StateProofVerifier as Verifier } from "./lib/StateProofVerifier.sol";
import { IPriceSourceReceiver } from "./interfaces/IPriceSourceReceiver.sol";
import { IStateRootOracle } from "./interfaces/IStateRootOracle.sol";
/// @title MerkleProofPriceSource
/// @author Jon Walch (Frax Finance) https://github.com/jonwalch
/// @notice Proves price round data from an L1 Frax Oracle and pushes the price data to an L2 Frax Oracle
contract MerkleProofPriceSourceChainlink is ERC165Storage, Timelock2Step {
/// @notice The address of the StateRootOracle on Layer 2
IStateRootOracle public immutable STATE_ROOT_ORACLE;
uint256 public lastAggregatorBlock;
address public trustedCaller;
/// @notice Configuration linking Frax Oracles for the same asset on L1 / L2
mapping(address layer2FraxOracle => address layer1FraxOracle) public oracleLookup;
mapping(address layer2FraxOracle => address aggregator) public oracleToAggregator;
/// @notice The ```constructor``` function
/// @param _stateRootOracle Address of the L2 StateRootOracle
/// @param _timelockAddress Address of Timelock contract on L2
constructor(address _stateRootOracle, address _timelockAddress, address _trustedCaller) Timelock2Step() {
_setTimelock({ _newTimelock: _timelockAddress });
_registerInterface({ interfaceId: type(ITimelock2Step).interfaceId });
STATE_ROOT_ORACLE = IStateRootOracle(_stateRootOracle);
trustedCaller = _trustedCaller;
}
// ====================================================================
// Events
// ====================================================================
/// @notice The ```OraclePairAdded``` event is emitted when a new Frax Oracle pair is added
/// @param fraxOracleLayer1 The address of the layer 1 Frax Oracle
/// @param fraxOracleLayer2 The address of the layer 2 Frax Oracle
event OraclePairAdded(address indexed fraxOracleLayer1, address indexed fraxOracleLayer2);
// ====================================================================
// Configuration Setters
// ====================================================================
/// @dev A pair of addresses that are the Frax Oracles for the same asset on layer 1 and layer 2
struct OraclePair {
address layer1FraxOracle;
address layer2FraxOracle;
}
/// @notice The ```addOraclePairs``` function sets an L1/L2 pair if they haven't been set already
/// @param _oraclePairs List of OraclePairs representing the same oracle on L1 and L2
function addOraclePairs(OraclePair[] calldata _oraclePairs) external {
_requireTimelock();
for (uint256 i = 0; i < _oraclePairs.length; ++i) {
OraclePair memory _oraclePair = _oraclePairs[i];
if (oracleLookup[_oraclePair.layer2FraxOracle] != address(0)) {
revert OraclePairAlreadySet({
fraxOracleLayer1: oracleLookup[_oraclePair.layer2FraxOracle],
fraxOracleLayer2: _oraclePair.layer2FraxOracle
});
}
oracleLookup[_oraclePair.layer2FraxOracle] = _oraclePair.layer1FraxOracle;
emit OraclePairAdded({
fraxOracleLayer1: _oraclePair.layer1FraxOracle,
fraxOracleLayer2: _oraclePair.layer2FraxOracle
});
}
}
function updateAggregator(
uint256 blockNumber,
address _fraxOracleLayer2,
bytes[] calldata _accountProofOracle,
bytes[] calldata _storageProofOracle
) public {
address _proofAddress = oracleLookup[address(_fraxOracleLayer2)];
if (_proofAddress == address(0)) revert WrongOracleAddress();
if (blockNumber != 0) {
if (blockNumber <= lastAggregatorBlock) revert StaleUpdate();
}
IStateRootOracle.BlockInfo memory _blockInfo = STATE_ROOT_ORACLE.getBlockInfo(blockNumber);
Verifier.Account memory _accountPool = MerkleTreeProver.proveStorageRoot({
stateRootHash: _blockInfo.stateRootHash,
proofAddress: _proofAddress,
accountProof: _accountProofOracle
});
uint256 _aggregator = uint256(
MerkleTreeProver
.proveStorageSlotValue({
storageRootHash: _accountPool.storageRoot,
slot: bytes32(uint256(2)),
storageProof: _storageProofOracle
})
.value
);
address oldAggregator = oracleToAggregator[_fraxOracleLayer2];
oracleToAggregator[_fraxOracleLayer2] = address(uint160(uint256(_aggregator) >> 16));
lastAggregatorBlock = blockNumber;
emit AggregatorUpdated(_fraxOracleLayer2, _proofAddress, oracleToAggregator[_fraxOracleLayer2], oldAggregator);
}
// ====================================================================
// Proof / Add Price Function
// ====================================================================
/// @notice Proves CL Oracle<>Aggregator<>price relationship on L1 and pushed data to L2
/// @dev Proves the storage root using block info from the L2 StateRootOracle.
/// @dev Proof: Oracle ---> Aggregator ---> latestRoundId ---> Price
/// @dev L2 Frax Oracle. L2 Frax Oracle must be configured to accept price data from this contract.
/// @param _clAddress The address of the CL Oracle to check
/// @param _blockNumber The block number
/// @param _accountProofAggregator The accountProof for the oracle aggregator from eth_getProof
/// @param _storageProofAggregator The storageProof for `HotVars` slot oracle aggregator from eth_getProof
/// @param _storageProofAggregator The storageProof for calculated price slot oracle aggregator from eth_getProof
function _fetchAndProofChainlinkAnswer(
address _clAddress,
uint256 _blockNumber,
bytes[] calldata _accountProofAggregator,
bytes[] calldata _storageProofAggregator,
bytes[] calldata _storageProofAggregator1
) internal view returns (uint256, uint256) {
IStateRootOracle.BlockInfo memory _blockInfo = STATE_ROOT_ORACLE.getBlockInfo(_blockNumber);
Verifier.Account memory _accountPoolAggregator = MerkleTreeProver.proveStorageRoot({
stateRootHash: _blockInfo.stateRootHash,
proofAddress: _clAddress,
accountProof: _accountProofAggregator
});
uint256 roundId = uint256(
MerkleTreeProver
.proveStorageSlotValue({
storageRootHash: _accountPoolAggregator.storageRoot,
slot: bytes32(uint256(43)),
storageProof: _storageProofAggregator
})
.value
);
uint32 _roundId = uint32(uint256(roundId) >> ((16 + 5 + 1) * 8));
bytes32 priceSlot = keccak256(abi.encodePacked(uint256(_roundId), uint256(44)));
uint256 answer = uint256(
MerkleTreeProver
.proveStorageSlotValue({
storageRootHash: _accountPoolAggregator.storageRoot,
slot: priceSlot,
storageProof: _storageProofAggregator1
})
.value
);
uint256 timestamp = uint256(uint256(answer) >> 192);
return (answer, timestamp);
}
/// @notice Proves CL Oracle<>Aggregator<>price relationship on L1 and pushed data to L2
/// @dev Proves the storage root using block info from the L2 StateRootOracle.
/// @dev Proof: Oracle ---> Aggregator ---> latestRoundId ---> Price
/// @dev L2 Frax Oracle. L2 Frax Oracle must be configured to accept price data from this contract.
/// @param _fraxOracleLayer2 The Oracle Address on the L2 to push the data too
/// @param _blockNumber The block number
/// @param _accountProofAggregator The accountProof for the oracle aggregator from eth_getProof
/// @param _storageProofAggregator The storageProof for `HotVars` slot oracle aggregator from eth_getProof
/// @param _storageProofAggregator The storageProof for calculated price slot oracle aggregator from eth_getProof
function addRoundDataChainlink(
IPriceSourceReceiver _fraxOracleLayer2,
uint256 _blockNumber,
bytes[] calldata _accountProofAggregator,
bytes[] calldata _storageProofAggregator,
bytes[] calldata _storageProofAggregator1
) external {
// Address of the L1 oracle
address _proofAddress = oracleToAggregator[address(_fraxOracleLayer2)];
if (_proofAddress == address(0)) revert WrongOracleAddress();
(uint256 answer, uint256 timestamp) = _fetchAndProofChainlinkAnswer(
_proofAddress,
_blockNumber,
_accountProofAggregator,
_storageProofAggregator,
_storageProofAggregator1
);
// Push prices to Oracle, handle isBadData return there
_fraxOracleLayer2.addRoundData({
isBadData: false,
priceLow: uint104(answer),
priceHigh: uint104(answer),
timestamp: uint40(timestamp)
});
}
/// @notice Fallback function if layout changes
/// @param _fraxOracleLayer2 Oracle to push to
/// @param price The price to push
function addRoundFallback(IPriceSourceReceiver _fraxOracleLayer2, uint256 price) external {
if (msg.sender != trustedCaller) revert NotTrustedCaller();
_fraxOracleLayer2.addRoundData({
isBadData: false,
priceLow: uint104(price),
priceHigh: uint104(price),
timestamp: uint40(block.timestamp)
});
}
// ====================================================================
// Errors
// ====================================================================
error OraclePairAlreadySet(address fraxOracleLayer1, address fraxOracleLayer2);
error WrongOracleAddress();
error StaleUpdate();
error NotTrustedCaller();
// ====================================================================
// Events
// ====================================================================
event AggregatorUpdated(address l2Oracle, address l1Oracle, address newAggregator, address oldAggregator);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)
pragma solidity ^0.8.0;
import "./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: 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: ISC
pragma solidity ^0.8.19;
// ====================================================================
// | ______ _______ |
// | / _____________ __ __ / ____(_____ ____ _____ ________ |
// | / /_ / ___/ __ `| |/_/ / /_ / / __ \/ __ `/ __ \/ ___/ _ \ |
// | / __/ / / / /_/ _> < / __/ / / / / / /_/ / / / / /__/ __/ |
// | /_/ /_/ \__,_/_/|_| /_/ /_/_/ /_/\__,_/_/ /_/\___/\___/ |
// | |
// ====================================================================
// ========================= MerkleTreeProver =========================
// ====================================================================
// Frax Finance: https://github.com/FraxFinance
// Authors
// Jon Walch: https://github.com/jonwalch
// Dennis: https://github.com/denett
// Reviewers
// Drake Evans: https://github.com/DrakeEvans
// ====================================================================
import { RLPReader } from "rlp/RLPReader.sol";
import { StateProofVerifier as Verifier } from "./StateProofVerifier.sol";
/// @title MerkleTreeProver
/// @author Jon Walch (Frax Finance) https://github.com/jonwalch
/// @notice Helper function library for interacting with StateProofVerifier and RLPReader
library MerkleTreeProver {
using RLPReader for bytes;
using RLPReader for RLPReader.RLPItem;
/// @notice The ```proveStorageRoot``` function is a helper function for StateProofVerifier.extractAccountFromProof()
/// @param stateRootHash The hash of the state root
/// @param proofAddress The address of the contract we're proving
/// @param accountProof The accountProof retrieved from eth_getProof
function proveStorageRoot(
bytes32 stateRootHash,
address proofAddress,
bytes[] calldata accountProof
) internal view returns (Verifier.Account memory accountPool) {
RLPReader.RLPItem[] memory accountProofRlp = new RLPReader.RLPItem[](accountProof.length);
for (uint256 i = 0; i < accountProof.length; ++i) {
accountProofRlp[i] = accountProof[i].toRlpItem();
}
accountPool = Verifier.extractAccountFromProof({
_addressHash: keccak256(abi.encodePacked(proofAddress)),
_stateRootHash: stateRootHash,
_proof: accountProofRlp
});
}
/// @notice The ```proveStorageSlotValue``` function is a helper function for StateProofVerifier.extractSlotValueFromProof()
/// @param storageRootHash The hash of the storage root
/// @param slot The slot we want to prove for the contract
/// @param storageProof The storageProof.proof retrieved from eth_getProof
function proveStorageSlotValue(
bytes32 storageRootHash,
bytes32 slot,
bytes[] calldata storageProof
) internal view returns (Verifier.SlotValue memory slotValue) {
RLPReader.RLPItem[] memory storageProofRlp = new RLPReader.RLPItem[](storageProof.length);
for (uint256 i = 0; i < storageProof.length; ++i) {
storageProofRlp[i] = storageProof[i].toRlpItem();
}
slotValue = Verifier.extractSlotValueFromProof({
_slotHash: keccak256(abi.encodePacked(slot)),
_storageRootHash: storageRootHash,
_proof: storageProofRlp
});
}
}// SPDX-License-Identifier: MIT
// Copied from https://github.com/lidofinance/curve-merkle-oracle/blob/1033b3e84142317ffd8f366b52e489d5eb49c73f/contracts/StateProofVerifier.sol
pragma solidity ^0.8.19;
import { RLPReader } from "rlp/RLPReader.sol";
import { MerklePatriciaProofVerifier } from "./MerklePatriciaProofVerifier.sol";
/**
* @title A helper library for verification of Merkle Patricia account and state proofs.
*/
library StateProofVerifier {
using RLPReader for RLPReader.RLPItem;
using RLPReader for bytes;
uint256 constant HEADER_STATE_ROOT_INDEX = 3;
uint256 constant HEADER_NUMBER_INDEX = 8;
uint256 constant HEADER_TIMESTAMP_INDEX = 11;
struct BlockHeader {
bytes32 hash;
bytes32 stateRootHash;
uint256 number;
uint256 timestamp;
}
struct Account {
bool exists;
uint256 nonce;
uint256 balance;
bytes32 storageRoot;
bytes32 codeHash;
}
struct SlotValue {
bool exists;
uint256 value;
}
/**
* @notice Parses block header and verifies its presence onchain within the latest 256 blocks.
* @param _headerRlpBytes RLP-encoded block header.
*/
function verifyBlockHeader(bytes memory _headerRlpBytes) internal view returns (BlockHeader memory) {
BlockHeader memory header = parseBlockHeader(_headerRlpBytes);
// ensure that the block is actually in the blockchain
require(header.hash == blockhash(header.number), "blockhash mismatch");
return header;
}
/**
* @notice Parses RLP-encoded block header.
* @param _headerRlpBytes RLP-encoded block header.
*/
function parseBlockHeader(bytes memory _headerRlpBytes) internal pure returns (BlockHeader memory) {
BlockHeader memory result;
RLPReader.RLPItem[] memory headerFields = _headerRlpBytes.toRlpItem().toList();
require(headerFields.length > HEADER_TIMESTAMP_INDEX);
result.stateRootHash = bytes32(headerFields[HEADER_STATE_ROOT_INDEX].toUint());
result.number = headerFields[HEADER_NUMBER_INDEX].toUint();
result.timestamp = headerFields[HEADER_TIMESTAMP_INDEX].toUint();
result.hash = keccak256(_headerRlpBytes);
return result;
}
/**
* @notice Verifies Merkle Patricia proof of an account and extracts the account fields.
*
* @param _addressHash Keccak256 hash of the address corresponding to the account.
* @param _stateRootHash MPT root hash of the Ethereum state trie.
*/
function extractAccountFromProof(
bytes32 _addressHash, // keccak256(abi.encodePacked(address))
bytes32 _stateRootHash,
RLPReader.RLPItem[] memory _proof
) internal pure returns (Account memory) {
bytes memory acctRlpBytes = MerklePatriciaProofVerifier.extractProofValue(
_stateRootHash,
abi.encodePacked(_addressHash),
_proof
);
Account memory account;
if (acctRlpBytes.length == 0) {
return account;
}
RLPReader.RLPItem[] memory acctFields = acctRlpBytes.toRlpItem().toList();
require(acctFields.length == 4);
account.exists = true;
account.nonce = acctFields[0].toUint();
account.balance = acctFields[1].toUint();
account.storageRoot = bytes32(acctFields[2].toUint());
account.codeHash = bytes32(acctFields[3].toUint());
return account;
}
/**
* @notice Verifies Merkle Patricia proof of a slot and extracts the slot's value.
*
* @param _slotHash Keccak256 hash of the slot position.
* @param _storageRootHash MPT root hash of the account's storage trie.
*/
function extractSlotValueFromProof(
bytes32 _slotHash,
bytes32 _storageRootHash,
RLPReader.RLPItem[] memory _proof
) internal pure returns (SlotValue memory) {
bytes memory valueRlpBytes = MerklePatriciaProofVerifier.extractProofValue(
_storageRootHash,
abi.encodePacked(_slotHash),
_proof
);
SlotValue memory value;
if (valueRlpBytes.length != 0) {
value.exists = true;
value.value = valueRlpBytes.toRlpItem().toUint();
}
return value;
}
}// SPDX-License-Identifier: ISC
pragma solidity ^0.8.19;
interface IPriceSourceReceiver {
function addRoundData(bool isBadData, uint104 priceLow, uint104 priceHigh, uint40 timestamp) external;
function getPrices() external view returns (bool isBadData, uint256 priceLow, uint256 priceHigh);
}// SPDX-License-Identifier: ISC
pragma solidity ^0.8.19;
interface IStateRootOracle {
struct BlockInfo {
bytes32 stateRootHash;
uint40 timestamp;
}
function getBlockInfo(uint256 blockNumber) external view returns (BlockInfo memory _blockInfo);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./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);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: Apache-2.0 /* * @author Hamdi Allam [email protected] * Please reach out with any questions or concerns */ pragma solidity >=0.5.10 <0.9.0; library RLPReader { uint8 constant STRING_SHORT_START = 0x80; uint8 constant STRING_LONG_START = 0xb8; uint8 constant LIST_SHORT_START = 0xc0; uint8 constant LIST_LONG_START = 0xf8; uint8 constant WORD_SIZE = 32; struct RLPItem { uint256 len; uint256 memPtr; } struct Iterator { RLPItem item; // Item that's being iterated over. uint256 nextPtr; // Position of the next item in the list. } /* * @dev Returns the next element in the iteration. Reverts if it has not next element. * @param self The iterator. * @return The next element in the iteration. */ function next(Iterator memory self) internal pure returns (RLPItem memory) { require(hasNext(self)); uint256 ptr = self.nextPtr; uint256 itemLength = _itemLength(ptr); self.nextPtr = ptr + itemLength; return RLPItem(itemLength, ptr); } /* * @dev Returns true if the iteration has more elements. * @param self The iterator. * @return true if the iteration has more elements. */ function hasNext(Iterator memory self) internal pure returns (bool) { RLPItem memory item = self.item; return self.nextPtr < item.memPtr + item.len; } /* * @param item RLP encoded bytes */ function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) { uint256 memPtr; assembly { memPtr := add(item, 0x20) } return RLPItem(item.length, memPtr); } /* * @dev Create an iterator. Reverts if item is not a list. * @param self The RLP item. * @return An 'Iterator' over the item. */ function iterator(RLPItem memory self) internal pure returns (Iterator memory) { require(isList(self)); uint256 ptr = self.memPtr + _payloadOffset(self.memPtr); return Iterator(self, ptr); } /* * @param the RLP item. */ function rlpLen(RLPItem memory item) internal pure returns (uint256) { return item.len; } /* * @param the RLP item. * @return (memPtr, len) pair: location of the item's payload in memory. */ function payloadLocation(RLPItem memory item) internal pure returns (uint256, uint256) { uint256 offset = _payloadOffset(item.memPtr); uint256 memPtr = item.memPtr + offset; uint256 len = item.len - offset; // data length return (memPtr, len); } /* * @param the RLP item. */ function payloadLen(RLPItem memory item) internal pure returns (uint256) { (, uint256 len) = payloadLocation(item); return len; } /* * @param the RLP item containing the encoded list. */ function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) { require(isList(item)); uint256 items = numItems(item); RLPItem[] memory result = new RLPItem[](items); uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr); uint256 dataLen; for (uint256 i = 0; i < items; i++) { dataLen = _itemLength(memPtr); result[i] = RLPItem(dataLen, memPtr); memPtr = memPtr + dataLen; } return result; } // @return indicator whether encoded payload is a list. negate this function call for isData. function isList(RLPItem memory item) internal pure returns (bool) { if (item.len == 0) return false; uint8 byte0; uint256 memPtr = item.memPtr; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < LIST_SHORT_START) return false; return true; } /* * @dev A cheaper version of keccak256(toRlpBytes(item)) that avoids copying memory. * @return keccak256 hash of RLP encoded bytes. */ function rlpBytesKeccak256(RLPItem memory item) internal pure returns (bytes32) { uint256 ptr = item.memPtr; uint256 len = item.len; bytes32 result; assembly { result := keccak256(ptr, len) } return result; } /* * @dev A cheaper version of keccak256(toBytes(item)) that avoids copying memory. * @return keccak256 hash of the item payload. */ function payloadKeccak256(RLPItem memory item) internal pure returns (bytes32) { (uint256 memPtr, uint256 len) = payloadLocation(item); bytes32 result; assembly { result := keccak256(memPtr, len) } return result; } /** RLPItem conversions into data types **/ // @returns raw rlp encoding in bytes function toRlpBytes(RLPItem memory item) internal pure returns (bytes memory) { bytes memory result = new bytes(item.len); if (result.length == 0) return result; uint256 ptr; assembly { ptr := add(0x20, result) } copy(item.memPtr, ptr, item.len); return result; } // any non-zero byte except "0x80" is considered true function toBoolean(RLPItem memory item) internal pure returns (bool) { require(item.len == 1); uint256 result; uint256 memPtr = item.memPtr; assembly { result := byte(0, mload(memPtr)) } // SEE Github Issue #5. // Summary: Most commonly used RLP libraries (i.e Geth) will encode // "0" as "0x80" instead of as "0". We handle this edge case explicitly // here. if (result == 0 || result == STRING_SHORT_START) { return false; } else { return true; } } function toAddress(RLPItem memory item) internal pure returns (address) { // 1 byte for the length prefix require(item.len == 21); return address(uint160(toUint(item))); } function toUint(RLPItem memory item) internal pure returns (uint256) { require(item.len > 0 && item.len <= 33); (uint256 memPtr, uint256 len) = payloadLocation(item); uint256 result; assembly { result := mload(memPtr) // shift to the correct location if neccesary if lt(len, 32) { result := div(result, exp(256, sub(32, len))) } } return result; } // enforces 32 byte length function toUintStrict(RLPItem memory item) internal pure returns (uint256) { // one byte prefix require(item.len == 33); uint256 result; uint256 memPtr = item.memPtr + 1; assembly { result := mload(memPtr) } return result; } function toBytes(RLPItem memory item) internal pure returns (bytes memory) { require(item.len > 0); (uint256 memPtr, uint256 len) = payloadLocation(item); bytes memory result = new bytes(len); uint256 destPtr; assembly { destPtr := add(0x20, result) } copy(memPtr, destPtr, len); return result; } /* * Private Helpers */ // @return number of payload items inside an encoded list. function numItems(RLPItem memory item) private pure returns (uint256) { if (item.len == 0) return 0; uint256 count = 0; uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr); uint256 endPtr = item.memPtr + item.len; while (currPtr < endPtr) { currPtr = currPtr + _itemLength(currPtr); // skip over an item count++; } return count; } // @return entire rlp item byte length function _itemLength(uint256 memPtr) private pure returns (uint256) { uint256 itemLen; uint256 byte0; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < STRING_SHORT_START) { itemLen = 1; } else if (byte0 < STRING_LONG_START) { itemLen = byte0 - STRING_SHORT_START + 1; } else if (byte0 < LIST_SHORT_START) { assembly { let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is memPtr := add(memPtr, 1) // skip over the first byte /* 32 byte word size */ let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len itemLen := add(dataLen, add(byteLen, 1)) } } else if (byte0 < LIST_LONG_START) { itemLen = byte0 - LIST_SHORT_START + 1; } else { assembly { let byteLen := sub(byte0, 0xf7) memPtr := add(memPtr, 1) let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length itemLen := add(dataLen, add(byteLen, 1)) } } return itemLen; } // @return number of bytes until the data function _payloadOffset(uint256 memPtr) private pure returns (uint256) { uint256 byte0; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < STRING_SHORT_START) { return 0; } else if (byte0 < STRING_LONG_START || (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)) { return 1; } else if (byte0 < LIST_SHORT_START) { // being explicit return byte0 - (STRING_LONG_START - 1) + 1; } else { return byte0 - (LIST_LONG_START - 1) + 1; } } /* * @param src Pointer to source * @param dest Pointer to destination * @param len Amount of memory to copy from the source */ function copy(uint256 src, uint256 dest, uint256 len) private pure { if (len == 0) return; // copy as many word sizes as possible for (; len >= WORD_SIZE; len -= WORD_SIZE) { assembly { mstore(dest, mload(src)) } src += WORD_SIZE; dest += WORD_SIZE; } if (len > 0) { // left over bytes. Mask is used to remove unwanted bytes from the word uint256 mask = 256**(WORD_SIZE - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) // zero out src let destpart := and(mload(dest), mask) // retrieve the bytes mstore(dest, or(destpart, srcpart)) } } } }
// SPDX-License-Identifier: MIT
// Copied from https://github.com/lidofinance/curve-merkle-oracle/blob/1033b3e84142317ffd8f366b52e489d5eb49c73f/contracts/MerklePatriciaProofVerifier.sol
/**
* Copied from https://github.com/lorenzb/proveth/blob/c74b20e/onchain/ProvethVerifier.sol
* with minor performance and code style-related modifications.
*/
pragma solidity ^0.8.19;
import { RLPReader } from "rlp/RLPReader.sol";
library MerklePatriciaProofVerifier {
using RLPReader for RLPReader.RLPItem;
using RLPReader for bytes;
/// @dev Validates a Merkle-Patricia-Trie proof.
/// If the proof proves the inclusion of some key-value pair in the
/// trie, the value is returned. Otherwise, i.e. if the proof proves
/// the exclusion of a key from the trie, an empty byte array is
/// returned.
/// @param rootHash is the Keccak-256 hash of the root node of the MPT.
/// @param path is the key of the node whose inclusion/exclusion we are
/// proving.
/// @param stack is the stack of MPT nodes (starting with the root) that
/// need to be traversed during verification.
/// @return value whose inclusion is proved or an empty byte array for
/// a proof of exclusion
function extractProofValue(
bytes32 rootHash,
bytes memory path,
RLPReader.RLPItem[] memory stack
) internal pure returns (bytes memory value) {
bytes memory mptKey = _decodeNibbles(path, 0);
uint256 mptKeyOffset = 0;
bytes32 nodeHashHash;
RLPReader.RLPItem[] memory node;
RLPReader.RLPItem memory rlpValue;
if (stack.length == 0) {
// Root hash of empty Merkle-Patricia-Trie
require(rootHash == 0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421);
return new bytes(0);
}
// Traverse stack of nodes starting at root.
for (uint256 i = 0; i < stack.length; i++) {
// We use the fact that an rlp encoded list consists of some
// encoding of its length plus the concatenation of its
// *rlp-encoded* items.
// The root node is hashed with Keccak-256 ...
if (i == 0 && rootHash != stack[i].rlpBytesKeccak256()) {
revert();
}
// ... whereas all other nodes are hashed with the MPT
// hash function.
if (i != 0 && nodeHashHash != _mptHashHash(stack[i])) {
revert();
}
// We verified that stack[i] has the correct hash, so we
// may safely decode it.
node = stack[i].toList();
if (node.length == 2) {
// Extension or Leaf node
bool isLeaf;
bytes memory nodeKey;
(isLeaf, nodeKey) = _merklePatriciaCompactDecode(node[0].toBytes());
uint256 prefixLength = _sharedPrefixLength(mptKeyOffset, mptKey, nodeKey);
mptKeyOffset += prefixLength;
if (prefixLength < nodeKey.length) {
// Proof claims divergent extension or leaf. (Only
// relevant for proofs of exclusion.)
// An Extension/Leaf node is divergent iff it "skips" over
// the point at which a Branch node should have been had the
// excluded key been included in the trie.
// Example: Imagine a proof of exclusion for path [1, 4],
// where the current node is a Leaf node with
// path [1, 3, 3, 7]. For [1, 4] to be included, there
// should have been a Branch node at [1] with a child
// at 3 and a child at 4.
// Sanity check
if (i < stack.length - 1) {
// divergent node must come last in proof
revert();
}
return new bytes(0);
}
if (isLeaf) {
// Sanity check
if (i < stack.length - 1) {
// leaf node must come last in proof
revert();
}
if (mptKeyOffset < mptKey.length) {
return new bytes(0);
}
rlpValue = node[1];
return rlpValue.toBytes();
} else {
// extension
// Sanity check
if (i == stack.length - 1) {
// shouldn't be at last level
revert();
}
if (!node[1].isList()) {
// rlp(child) was at least 32 bytes. node[1] contains
// Keccak256(rlp(child)).
nodeHashHash = node[1].payloadKeccak256();
} else {
// rlp(child) was less than 32 bytes. node[1] contains
// rlp(child).
nodeHashHash = node[1].rlpBytesKeccak256();
}
}
} else if (node.length == 17) {
// Branch node
if (mptKeyOffset != mptKey.length) {
// we haven't consumed the entire path, so we need to look at a child
uint8 nibble = uint8(mptKey[mptKeyOffset]);
mptKeyOffset += 1;
if (nibble >= 16) {
// each element of the path has to be a nibble
revert();
}
if (_isEmptyBytesequence(node[nibble])) {
// Sanity
if (i != stack.length - 1) {
// leaf node should be at last level
revert();
}
return new bytes(0);
} else if (!node[nibble].isList()) {
nodeHashHash = node[nibble].payloadKeccak256();
} else {
nodeHashHash = node[nibble].rlpBytesKeccak256();
}
} else {
// we have consumed the entire mptKey, so we need to look at what's contained in this node.
// Sanity
if (i != stack.length - 1) {
// should be at last level
revert();
}
return node[16].toBytes();
}
}
}
}
/// @dev Computes the hash of the Merkle-Patricia-Trie hash of the RLP item.
/// Merkle-Patricia-Tries use a weird "hash function" that outputs
/// *variable-length* hashes: If the item is shorter than 32 bytes,
/// the MPT hash is the item. Otherwise, the MPT hash is the
/// Keccak-256 hash of the item.
/// The easiest way to compare variable-length byte sequences is
/// to compare their Keccak-256 hashes.
/// @param item The RLP item to be hashed.
/// @return Keccak-256(MPT-hash(item))
function _mptHashHash(RLPReader.RLPItem memory item) private pure returns (bytes32) {
if (item.len < 32) {
return item.rlpBytesKeccak256();
} else {
return keccak256(abi.encodePacked(item.rlpBytesKeccak256()));
}
}
function _isEmptyBytesequence(RLPReader.RLPItem memory item) private pure returns (bool) {
if (item.len != 1) {
return false;
}
uint8 b;
uint256 memPtr = item.memPtr;
assembly {
b := byte(0, mload(memPtr))
}
return b == 0x80; /* empty byte string */
}
function _merklePatriciaCompactDecode(
bytes memory compact
) private pure returns (bool isLeaf, bytes memory nibbles) {
require(compact.length > 0);
uint256 first_nibble = (uint8(compact[0]) >> 4) & 0xF;
uint256 skipNibbles;
if (first_nibble == 0) {
skipNibbles = 2;
isLeaf = false;
} else if (first_nibble == 1) {
skipNibbles = 1;
isLeaf = false;
} else if (first_nibble == 2) {
skipNibbles = 2;
isLeaf = true;
} else if (first_nibble == 3) {
skipNibbles = 1;
isLeaf = true;
} else {
// Not supposed to happen!
revert();
}
return (isLeaf, _decodeNibbles(compact, skipNibbles));
}
function _decodeNibbles(bytes memory compact, uint256 skipNibbles) private pure returns (bytes memory nibbles) {
require(compact.length > 0);
uint256 length = compact.length * 2;
require(skipNibbles <= length);
length -= skipNibbles;
nibbles = new bytes(length);
uint256 nibblesLength = 0;
for (uint256 i = skipNibbles; i < skipNibbles + length; i += 1) {
if (i % 2 == 0) {
nibbles[nibblesLength] = bytes1((uint8(compact[i / 2]) >> 4) & 0xF);
} else {
nibbles[nibblesLength] = bytes1((uint8(compact[i / 2]) >> 0) & 0xF);
}
nibblesLength += 1;
}
assert(nibblesLength == nibbles.length);
}
function _sharedPrefixLength(uint256 xsOffset, bytes memory xs, bytes memory ys) private pure returns (uint256) {
uint256 i;
for (i = 0; i + xsOffset < xs.length && i < ys.length; i++) {
if (xs[i + xsOffset] != ys[i]) {
return i;
}
}
return i;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @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/",
"@eth-optimism/=node_modules/@eth-optimism/",
"@mean-finance/=node_modules/@mean-finance/",
"@offchainlabs/=node_modules/@offchainlabs/",
"@openzeppelin/=node_modules/@openzeppelin/",
"@rari-capital/=node_modules/@rari-capital/",
"@uniswap/=node_modules/@uniswap/",
"base64-sol/=node_modules/base64-sol/",
"frax-standard-solidity/=node_modules/frax-standard-solidity/",
"hardhat/=node_modules/hardhat/",
"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": "paris",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_stateRootOracle","type":"address"},{"internalType":"address","name":"_timelockAddress","type":"address"},{"internalType":"address","name":"_trustedCaller","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NotTrustedCaller","type":"error"},{"inputs":[],"name":"OnlyPendingTimelock","type":"error"},{"inputs":[],"name":"OnlyTimelock","type":"error"},{"inputs":[{"internalType":"address","name":"fraxOracleLayer1","type":"address"},{"internalType":"address","name":"fraxOracleLayer2","type":"address"}],"name":"OraclePairAlreadySet","type":"error"},{"inputs":[],"name":"StaleUpdate","type":"error"},{"inputs":[],"name":"WrongOracleAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"l2Oracle","type":"address"},{"indexed":false,"internalType":"address","name":"l1Oracle","type":"address"},{"indexed":false,"internalType":"address","name":"newAggregator","type":"address"},{"indexed":false,"internalType":"address","name":"oldAggregator","type":"address"}],"name":"AggregatorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fraxOracleLayer1","type":"address"},{"indexed":true,"internalType":"address","name":"fraxOracleLayer2","type":"address"}],"name":"OraclePairAdded","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":"STATE_ROOT_ORACLE","outputs":[{"internalType":"contract IStateRootOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptTransferTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"layer1FraxOracle","type":"address"},{"internalType":"address","name":"layer2FraxOracle","type":"address"}],"internalType":"struct MerkleProofPriceSourceChainlink.OraclePair[]","name":"_oraclePairs","type":"tuple[]"}],"name":"addOraclePairs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPriceSourceReceiver","name":"_fraxOracleLayer2","type":"address"},{"internalType":"uint256","name":"_blockNumber","type":"uint256"},{"internalType":"bytes[]","name":"_accountProofAggregator","type":"bytes[]"},{"internalType":"bytes[]","name":"_storageProofAggregator","type":"bytes[]"},{"internalType":"bytes[]","name":"_storageProofAggregator1","type":"bytes[]"}],"name":"addRoundDataChainlink","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPriceSourceReceiver","name":"_fraxOracleLayer2","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"addRoundFallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastAggregatorBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"layer2FraxOracle","type":"address"}],"name":"oracleLookup","outputs":[{"internalType":"address","name":"layer1FraxOracle","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"layer2FraxOracle","type":"address"}],"name":"oracleToAggregator","outputs":[{"internalType":"address","name":"aggregator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingTimelockAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceTimelock","outputs":[],"stateMutability":"nonpayable","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":[],"name":"trustedCaller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"address","name":"_fraxOracleLayer2","type":"address"},{"internalType":"bytes[]","name":"_accountProofOracle","type":"bytes[]"},{"internalType":"bytes[]","name":"_storageProofOracle","type":"bytes[]"}],"name":"updateAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a06040523480156200001157600080fd5b50604051620026bc380380620026bc83398101604081905262000034916200018b565b600280546001600160a01b0319163317905562000051826200008e565b62000063632fa3fc3160e21b620000ea565b6001600160a01b03928316608052600480546001600160a01b031916919093161790915550620001d5565b6002546040516001600160a01b038084169216907f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc690600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160e01b03198082169003620001495760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015260640160405180910390fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b80516001600160a01b03811681146200018657600080fd5b919050565b600080600060608486031215620001a157600080fd5b620001ac846200016e565b9250620001bc602085016200016e565b9150620001cc604085016200016e565b90509250925092565b6080516124bd620001ff600039600081816102120152818161070e0152610b5d01526124bd6000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063520c4e7c11610097578063aa84a80e11610066578063aa84a80e1461025e578063bd27d15b14610271578063edb219c014610284578063f6ccaad4146102ba57600080fd5b8063520c4e7c146101fa5780639378ca561461020d5780639c6a05f814610234578063a6d7fdf21461024b57600080fd5b806330a2af42116100d357806330a2af421461018757806345014095146101bd5780634bc66f32146101d25780634f8b4ae7146101f257600080fd5b806301ffc9a7146100fa578063090f3f5014610122578063268f076014610167575b600080fd5b61010d610108366004611e07565b6102c2565b60405190151581526020015b60405180910390f35b6001546101429073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610119565b6004546101429073ffffffffffffffffffffffffffffffffffffffff1681565b610142610195366004611e6b565b60066020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6101d06101cb366004611e6b565b61034b565b005b6002546101429073ffffffffffffffffffffffffffffffffffffffff1681565b6101d061035f565b6101d0610208366004611ed4565b610385565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b61023d60035481565b604051908152602001610119565b6101d0610259366004611f8a565b6104b2565b6101d061026c366004611fff565b61063c565b6101d061027f36600461208b565b6108a1565b610142610292366004611e6b565b60056020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6101d061099f565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061034557507fffffffff00000000000000000000000000000000000000000000000000000000821660009081526020819052604090205460ff165b92915050565b6103536109af565b61035c81610a00565b50565b6103676109af565b61036f610a77565b6103796000610a00565b6103836000610ac8565b565b73ffffffffffffffffffffffffffffffffffffffff80891660009081526006602052604090205416806103e4576040517f17e740e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806103f7838b8b8b8b8b8b8b610b56565b6040517f45d9f582000000000000000000000000000000000000000000000000000000008152600060048201526cffffffffffffffffffffffffff831660248201819052604482015264ffffffffff82166064820152919350915073ffffffffffffffffffffffffffffffffffffffff8c16906345d9f58290608401600060405180830381600087803b15801561048d57600080fd5b505af11580156104a1573d6000803e3d6000fd5b505050505050505050505050505050565b6104ba6109af565b60005b818110156106375760008383838181106104d9576104d96120b7565b9050604002018036038101906104ef9190612165565b60208082015173ffffffffffffffffffffffffffffffffffffffff908116600090815260059092526040909120549192501615610597576020818101805173ffffffffffffffffffffffffffffffffffffffff9081166000908152600590935260409283902054915183517f729d6d9c000000000000000000000000000000000000000000000000000000008152928216600484015216602482015290519081900360440190fd5b80516020808301805173ffffffffffffffffffffffffffffffffffffffff90811660009081526005909352604080842080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169583169590951790945590518451935190821693909116917fc662d74d8469d456352095edb1ed6a69f64c66ace9fa3598de77edfccfad12a291a350610630816121d5565b90506104bd565b505050565b73ffffffffffffffffffffffffffffffffffffffff808616600090815260056020526040902054168061069b576040517f17e740e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b86156106dc5760035487116106dc576040517f666a281400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fbb141cf4000000000000000000000000000000000000000000000000000000008152600481018890526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063bb141cf4906024016040805180830381865afa158015610769573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078d919061220d565b905060006107a18260000151848989610ca0565b905060006107b98260600151600260001b8888610e24565b60209081015173ffffffffffffffffffffffffffffffffffffffff808c16600090815260069093526040928390208054601084901c83167fffffffffffffffffffffffff0000000000000000000000000000000000000000821617825560038f9055905493519294508116927f8fcbca8dd9c7ae0898fd687492234ae229f54731997d39c925e6949d25b2b1649261088c928e928a92911690869073ffffffffffffffffffffffffffffffffffffffff948516815292841660208401529083166040830152909116606082015260800190565b60405180910390a15050505050505050505050565b60045473ffffffffffffffffffffffffffffffffffffffff1633146108f2576040517f3550120700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f45d9f582000000000000000000000000000000000000000000000000000000008152600060048201526cffffffffffffffffffffffffff821660248201819052604482015264ffffffffff4216606482015273ffffffffffffffffffffffffffffffffffffffff8316906345d9f58290608401600060405180830381600087803b15801561098357600080fd5b505af1158015610997573d6000803e3d6000fd5b505050505050565b6109a7610a77565b610383610f1d565b60025473ffffffffffffffffffffffffffffffffffffffff163314610383576040517f1c0be90a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217909255600254604051919216907f162998b90abc2507f3953aa797827b03a14c42dbd9a35f09feaf02e0d592773a90600090a350565b60015473ffffffffffffffffffffffffffffffffffffffff163314610383576040517ff5c49e6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc690600090a3600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663bb141cf48b6040518263ffffffff1660e01b8152600401610bb691815260200190565b6040805180830381865afa158015610bd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf6919061220d565b90506000610c0a82600001518d8c8c610ca0565b90506000610c228260600151602b60001b8b8b610e24565b602001519050600060b082901c905060008163ffffffff16602c604051602001610c56929190918252602082015260400190565b6040516020818303038152906040528051906020012090506000610c808560600151838c8c610e24565b602001519750505060c086901c9450505050509850989650505050505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101829052908267ffffffffffffffff811115610ce457610ce46120e6565b604051908082528060200260200182016040528015610d2957816020015b6040805180820190915260008082526020820152815260200190600190039081610d025790505b50905060005b83811015610dc657610d98858583818110610d4c57610d4c6120b7565b9050602002810190610d5e9190612243565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f4e92505050565b828281518110610daa57610daa6120b7565b602002602001018190525080610dbf906121d5565b9050610d2f565b506040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b166020820152610e1a90603401604051602081830303815290604052805190602001208783610f7b565b9695505050505050565b604080518082019091526000808252602082015260008267ffffffffffffffff811115610e5357610e536120e6565b604051908082528060200260200182016040528015610e9857816020015b6040805180820190915260008082526020820152815260200190600190039081610e715790505b50905060005b83811015610ee957610ebb858583818110610d4c57610d4c6120b7565b828281518110610ecd57610ecd6120b7565b602002602001018190525080610ee2906121d5565b9050610e9e565b50610e1a85604051602001610f0091815260200190565b6040516020818303038152906040528051906020012087836110f2565b600180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905561038333610ac8565b60408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526000610fd48486604051602001610fbf91815260200190565b60405160208183030381529060405285611180565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290915081516000036110145791506110eb9050565b600061104f61104a8460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b6115bc565b9050805160041461105f57600080fd5b60018252805161108790829060009061107a5761107a6120b7565b60200260200101516116d2565b602083015280516110a5908290600190811061107a5761107a6120b7565b604083015280516110c3908290600290811061107a5761107a6120b7565b606083015280516110e1908290600390811061107a5761107a6120b7565b6080830152509150505b9392505050565b6040805180820190915260008082526020820152600061111f8486604051602001610fbf91815260200190565b60408051808201909152600080825260208201529091508151156111775760018152604080518082018252600080825260209182015281518083019092528351825280840190820152611171906116d2565b60208201525b95945050505050565b6060600061118f846000611720565b905060008060606111b3604051806040016040528060008152602001600081525090565b8651600003611204577f56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b42189146111e857600080fd5b505060408051600081526020810190915293506110eb92505050565b60005b87518110156115af5780158015611246575061124288828151811061122e5761122e6120b7565b602002602001015160208101519051902090565b8a14155b1561125057600080fd5b8015801590611280575061127c88828151811061126f5761126f6120b7565b60200260200101516118f6565b8414155b1561128a57600080fd5b6112ac88828151811061129f5761129f6120b7565b60200260200101516115bc565b9250825160020361145857600060606112e66112e1866000815181106112d4576112d46120b7565b602002602001015161194b565b6119c9565b909250905060006112f8888a84611a64565b905061130481896122a8565b975081518110156113675760018b5161131d91906122bb565b84101561132957600080fd5b60005b6040519080825280601f01601f191660200182016040528015611356576020820181803683370190505b5099505050505050505050506110eb565b82156113cd5760018b5161137b91906122bb565b84101561138757600080fd5b885188101561139757600061132c565b856001815181106113aa576113aa6120b7565b602002602001015194506113bd8561194b565b99505050505050505050506110eb565b60018b516113db91906122bb565b84036113e657600080fd5b611409866001815181106113fc576113fc6120b7565b6020026020010151611b1f565b6114375761143086600181518110611423576114236120b7565b6020026020010151611b5a565b9650611450565b61144d8660018151811061122e5761122e6120b7565b96505b50505061159d565b825160110361159d578551851461156157600086868151811061147d5761147d6120b7565b016020015160f81c90506114926001876122a8565b955060108160ff16106114a457600080fd5b6114c9848260ff16815181106114bc576114bc6120b7565b6020026020010151611b72565b1561150557600189516114dc91906122bb565b82146114e757600080fd5b505060408051600081526020810190915295506110eb945050505050565b61151d848260ff16815181106113fc576113fc6120b7565b61154057611539848260ff1681518110611423576114236120b7565b945061155b565b611558848260ff168151811061122e5761122e6120b7565b94505b5061159d565b6001885161156f91906122bb565b811461157a57600080fd5b611590836010815181106112d4576112d46120b7565b96505050505050506110eb565b806115a7816121d5565b915050611207565b5050505050509392505050565b60606115c782611b1f565b6115d057600080fd5b60006115db83611b95565b905060008167ffffffffffffffff8111156115f8576115f86120e6565b60405190808252806020026020018201604052801561163d57816020015b60408051808201909152600080825260208201528152602001906001900390816116165790505b509050600061164f8560200151611c1a565b856020015161165e91906122a8565b90506000805b848110156116c75761167583611c95565b915060405180604001604052808381526020018481525084828151811061169e5761169e6120b7565b60209081029190910101526116b382846122a8565b9250806116bf816121d5565b915050611664565b509195945050505050565b8051600090158015906116e757508151602110155b6116f057600080fd5b6000806116fc84611d3e565b8151919350915060208210156117185760208290036101000a90045b949350505050565b6060600083511161173057600080fd5b60008351600261174091906122ce565b90508083111561174f57600080fd5b61175983826122bb565b90508067ffffffffffffffff811115611774576117746120e6565b6040519080825280601f01601f19166020018201604052801561179e576020820181803683370190505b5091506000835b6117af83866122a8565b8110156118dd576117c1600282612314565b600003611845576004866117d6600284612328565b815181106117e6576117e66120b7565b602001015160f81c60f81b60f81c60ff16901c600f1660f81b848381518110611811576118116120b7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506118be565b600086611853600284612328565b81518110611863576118636120b7565b602001015160f81c60f81b60f81c60ff16901c600f1660f81b84838151811061188e5761188e6120b7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b6118c96001836122a8565b91506118d66001826122a8565b90506117a5565b50825181146118ee576118ee61233c565b505092915050565b600060208260000151101561191357602082015182519020610345565b60208201518251902060405160200161192e91815260200190565b604051602081830303815290604052805190602001209050919050565b805160609061195957600080fd5b60008061196584611d3e565b9150915060008167ffffffffffffffff811115611984576119846120e6565b6040519080825280601f01601f1916602001820160405280156119ae576020820181803683370190505b509050602081016119c0848285611d85565b50949350505050565b6000606060008351116119db57600080fd5b60006004846000815181106119f2576119f26120b7565b60209101015160f81c901c600f1690506000818103611a175750600092506002611a4e565b81600103611a2b5750600092506001611a4e565b81600203611a3f5750600192506002611a4e565b816003036100f5575060019250825b83611a598683611720565b935093505050915091565b6000805b8351611a7486836122a8565b108015611a815750825181105b1561171857828181518110611a9857611a986120b7565b01602001517fff000000000000000000000000000000000000000000000000000000000000001684611aca87846122a8565b81518110611ada57611ada6120b7565b01602001517fff000000000000000000000000000000000000000000000000000000000000001614611b0d5790506110eb565b80611b17816121d5565b915050611a68565b80516000908103611b3257506000919050565b6020820151805160001a9060c0821015611b50575060009392505050565b5060019392505050565b6000806000611b6884611d3e565b9020949350505050565b8051600090600114611b8657506000919050565b50602001515160001a60801490565b80516000908103611ba857506000919050565b600080611bb88460200151611c1a565b8460200151611bc791906122a8565b9050600084600001518560200151611bdf91906122a8565b90505b80821015611c1157611bf382611c95565b611bfd90836122a8565b915082611c09816121d5565b935050611be2565b50909392505050565b8051600090811a6080811015611c335750600092915050565b60b8811080611c4e575060c08110801590611c4e575060f881105b15611c5c5750600192915050565b60c0811015611c8957611c71600160b861236b565b611c7e9060ff16826122bb565b6110eb9060016122a8565b611c71600160f861236b565b80516000908190811a6080811015611cb05760019150611d37565b60b8811015611cd657611cc46080826122bb565b611ccf9060016122a8565b9150611d37565b60c0811015611d035760b78103600185019450806020036101000a85510460018201810193505050611d37565b60f8811015611d1757611cc460c0826122bb565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b6000806000611d508460200151611c1a565b90506000818560200151611d6491906122a8565b90506000828660000151611d7891906122bb565b9196919550909350505050565b80600003611d9257505050565b60208110611dca5782518252611da96020846122a8565b9250611db66020836122a8565b9150611dc36020826122bb565b9050611d92565b80156106375760006001611ddf8360206122bb565b611deb906101006124a4565b611df591906122bb565b84518451821691191617835250505050565b600060208284031215611e1957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146110eb57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461035c57600080fd5b600060208284031215611e7d57600080fd5b81356110eb81611e49565b60008083601f840112611e9a57600080fd5b50813567ffffffffffffffff811115611eb257600080fd5b6020830191508360208260051b8501011115611ecd57600080fd5b9250929050565b60008060008060008060008060a0898b031215611ef057600080fd5b8835611efb81611e49565b975060208901359650604089013567ffffffffffffffff80821115611f1f57600080fd5b611f2b8c838d01611e88565b909850965060608b0135915080821115611f4457600080fd5b611f508c838d01611e88565b909650945060808b0135915080821115611f6957600080fd5b50611f768b828c01611e88565b999c989b5096995094979396929594505050565b60008060208385031215611f9d57600080fd5b823567ffffffffffffffff80821115611fb557600080fd5b818501915085601f830112611fc957600080fd5b813581811115611fd857600080fd5b8660208260061b8501011115611fed57600080fd5b60209290920196919550909350505050565b6000806000806000806080878903121561201857600080fd5b86359550602087013561202a81611e49565b9450604087013567ffffffffffffffff8082111561204757600080fd5b6120538a838b01611e88565b9096509450606089013591508082111561206c57600080fd5b5061207989828a01611e88565b979a9699509497509295939492505050565b6000806040838503121561209e57600080fd5b82356120a981611e49565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561215f577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405290565b60006040828403121561217757600080fd5b61217f612115565b823561218a81611e49565b8152602083013561219a81611e49565b60208201529392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612206576122066121a6565b5060010190565b60006040828403121561221f57600080fd5b612227612115565b82518152602083015164ffffffffff8116811461219a57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261227857600080fd5b83018035915067ffffffffffffffff82111561229357600080fd5b602001915036819003821315611ecd57600080fd5b80820180821115610345576103456121a6565b81810381811115610345576103456121a6565b8082028115828204841417610345576103456121a6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612323576123236122e5565b500690565b600082612337576123376122e5565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b60ff8281168282160390811115610345576103456121a6565b600181815b808511156123dd57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156123c3576123c36121a6565b808516156123d057918102915b93841c9390800290612389565b509250929050565b6000826123f457506001610345565b8161240157506000610345565b816001811461241757600281146124215761243d565b6001915050610345565b60ff841115612432576124326121a6565b50506001821b610345565b5060208310610133831016604e8410600b8410161715612460575081810a610345565b61246a8383612384565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561249c5761249c6121a6565b029392505050565b60006110eb83836123e556fea164736f6c6343000813000a000000000000000000000000ed403d48e2bc946438b5686aa1ad65056ccf951200000000000000000000000031562ae726afebe25417df01bedc72ef489f45b300000000000000000000000031562ae726afebe25417df01bedc72ef489f45b3
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063520c4e7c11610097578063aa84a80e11610066578063aa84a80e1461025e578063bd27d15b14610271578063edb219c014610284578063f6ccaad4146102ba57600080fd5b8063520c4e7c146101fa5780639378ca561461020d5780639c6a05f814610234578063a6d7fdf21461024b57600080fd5b806330a2af42116100d357806330a2af421461018757806345014095146101bd5780634bc66f32146101d25780634f8b4ae7146101f257600080fd5b806301ffc9a7146100fa578063090f3f5014610122578063268f076014610167575b600080fd5b61010d610108366004611e07565b6102c2565b60405190151581526020015b60405180910390f35b6001546101429073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610119565b6004546101429073ffffffffffffffffffffffffffffffffffffffff1681565b610142610195366004611e6b565b60066020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6101d06101cb366004611e6b565b61034b565b005b6002546101429073ffffffffffffffffffffffffffffffffffffffff1681565b6101d061035f565b6101d0610208366004611ed4565b610385565b6101427f000000000000000000000000ed403d48e2bc946438b5686aa1ad65056ccf951281565b61023d60035481565b604051908152602001610119565b6101d0610259366004611f8a565b6104b2565b6101d061026c366004611fff565b61063c565b6101d061027f36600461208b565b6108a1565b610142610292366004611e6b565b60056020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6101d061099f565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061034557507fffffffff00000000000000000000000000000000000000000000000000000000821660009081526020819052604090205460ff165b92915050565b6103536109af565b61035c81610a00565b50565b6103676109af565b61036f610a77565b6103796000610a00565b6103836000610ac8565b565b73ffffffffffffffffffffffffffffffffffffffff80891660009081526006602052604090205416806103e4576040517f17e740e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806103f7838b8b8b8b8b8b8b610b56565b6040517f45d9f582000000000000000000000000000000000000000000000000000000008152600060048201526cffffffffffffffffffffffffff831660248201819052604482015264ffffffffff82166064820152919350915073ffffffffffffffffffffffffffffffffffffffff8c16906345d9f58290608401600060405180830381600087803b15801561048d57600080fd5b505af11580156104a1573d6000803e3d6000fd5b505050505050505050505050505050565b6104ba6109af565b60005b818110156106375760008383838181106104d9576104d96120b7565b9050604002018036038101906104ef9190612165565b60208082015173ffffffffffffffffffffffffffffffffffffffff908116600090815260059092526040909120549192501615610597576020818101805173ffffffffffffffffffffffffffffffffffffffff9081166000908152600590935260409283902054915183517f729d6d9c000000000000000000000000000000000000000000000000000000008152928216600484015216602482015290519081900360440190fd5b80516020808301805173ffffffffffffffffffffffffffffffffffffffff90811660009081526005909352604080842080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169583169590951790945590518451935190821693909116917fc662d74d8469d456352095edb1ed6a69f64c66ace9fa3598de77edfccfad12a291a350610630816121d5565b90506104bd565b505050565b73ffffffffffffffffffffffffffffffffffffffff808616600090815260056020526040902054168061069b576040517f17e740e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b86156106dc5760035487116106dc576040517f666a281400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fbb141cf4000000000000000000000000000000000000000000000000000000008152600481018890526000907f000000000000000000000000ed403d48e2bc946438b5686aa1ad65056ccf951273ffffffffffffffffffffffffffffffffffffffff169063bb141cf4906024016040805180830381865afa158015610769573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078d919061220d565b905060006107a18260000151848989610ca0565b905060006107b98260600151600260001b8888610e24565b60209081015173ffffffffffffffffffffffffffffffffffffffff808c16600090815260069093526040928390208054601084901c83167fffffffffffffffffffffffff0000000000000000000000000000000000000000821617825560038f9055905493519294508116927f8fcbca8dd9c7ae0898fd687492234ae229f54731997d39c925e6949d25b2b1649261088c928e928a92911690869073ffffffffffffffffffffffffffffffffffffffff948516815292841660208401529083166040830152909116606082015260800190565b60405180910390a15050505050505050505050565b60045473ffffffffffffffffffffffffffffffffffffffff1633146108f2576040517f3550120700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f45d9f582000000000000000000000000000000000000000000000000000000008152600060048201526cffffffffffffffffffffffffff821660248201819052604482015264ffffffffff4216606482015273ffffffffffffffffffffffffffffffffffffffff8316906345d9f58290608401600060405180830381600087803b15801561098357600080fd5b505af1158015610997573d6000803e3d6000fd5b505050505050565b6109a7610a77565b610383610f1d565b60025473ffffffffffffffffffffffffffffffffffffffff163314610383576040517f1c0be90a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217909255600254604051919216907f162998b90abc2507f3953aa797827b03a14c42dbd9a35f09feaf02e0d592773a90600090a350565b60015473ffffffffffffffffffffffffffffffffffffffff163314610383576040517ff5c49e6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc690600090a3600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60008060007f000000000000000000000000ed403d48e2bc946438b5686aa1ad65056ccf951273ffffffffffffffffffffffffffffffffffffffff1663bb141cf48b6040518263ffffffff1660e01b8152600401610bb691815260200190565b6040805180830381865afa158015610bd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf6919061220d565b90506000610c0a82600001518d8c8c610ca0565b90506000610c228260600151602b60001b8b8b610e24565b602001519050600060b082901c905060008163ffffffff16602c604051602001610c56929190918252602082015260400190565b6040516020818303038152906040528051906020012090506000610c808560600151838c8c610e24565b602001519750505060c086901c9450505050509850989650505050505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101829052908267ffffffffffffffff811115610ce457610ce46120e6565b604051908082528060200260200182016040528015610d2957816020015b6040805180820190915260008082526020820152815260200190600190039081610d025790505b50905060005b83811015610dc657610d98858583818110610d4c57610d4c6120b7565b9050602002810190610d5e9190612243565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f4e92505050565b828281518110610daa57610daa6120b7565b602002602001018190525080610dbf906121d5565b9050610d2f565b506040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b166020820152610e1a90603401604051602081830303815290604052805190602001208783610f7b565b9695505050505050565b604080518082019091526000808252602082015260008267ffffffffffffffff811115610e5357610e536120e6565b604051908082528060200260200182016040528015610e9857816020015b6040805180820190915260008082526020820152815260200190600190039081610e715790505b50905060005b83811015610ee957610ebb858583818110610d4c57610d4c6120b7565b828281518110610ecd57610ecd6120b7565b602002602001018190525080610ee2906121d5565b9050610e9e565b50610e1a85604051602001610f0091815260200190565b6040516020818303038152906040528051906020012087836110f2565b600180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905561038333610ac8565b60408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526000610fd48486604051602001610fbf91815260200190565b60405160208183030381529060405285611180565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290915081516000036110145791506110eb9050565b600061104f61104a8460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b6115bc565b9050805160041461105f57600080fd5b60018252805161108790829060009061107a5761107a6120b7565b60200260200101516116d2565b602083015280516110a5908290600190811061107a5761107a6120b7565b604083015280516110c3908290600290811061107a5761107a6120b7565b606083015280516110e1908290600390811061107a5761107a6120b7565b6080830152509150505b9392505050565b6040805180820190915260008082526020820152600061111f8486604051602001610fbf91815260200190565b60408051808201909152600080825260208201529091508151156111775760018152604080518082018252600080825260209182015281518083019092528351825280840190820152611171906116d2565b60208201525b95945050505050565b6060600061118f846000611720565b905060008060606111b3604051806040016040528060008152602001600081525090565b8651600003611204577f56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b42189146111e857600080fd5b505060408051600081526020810190915293506110eb92505050565b60005b87518110156115af5780158015611246575061124288828151811061122e5761122e6120b7565b602002602001015160208101519051902090565b8a14155b1561125057600080fd5b8015801590611280575061127c88828151811061126f5761126f6120b7565b60200260200101516118f6565b8414155b1561128a57600080fd5b6112ac88828151811061129f5761129f6120b7565b60200260200101516115bc565b9250825160020361145857600060606112e66112e1866000815181106112d4576112d46120b7565b602002602001015161194b565b6119c9565b909250905060006112f8888a84611a64565b905061130481896122a8565b975081518110156113675760018b5161131d91906122bb565b84101561132957600080fd5b60005b6040519080825280601f01601f191660200182016040528015611356576020820181803683370190505b5099505050505050505050506110eb565b82156113cd5760018b5161137b91906122bb565b84101561138757600080fd5b885188101561139757600061132c565b856001815181106113aa576113aa6120b7565b602002602001015194506113bd8561194b565b99505050505050505050506110eb565b60018b516113db91906122bb565b84036113e657600080fd5b611409866001815181106113fc576113fc6120b7565b6020026020010151611b1f565b6114375761143086600181518110611423576114236120b7565b6020026020010151611b5a565b9650611450565b61144d8660018151811061122e5761122e6120b7565b96505b50505061159d565b825160110361159d578551851461156157600086868151811061147d5761147d6120b7565b016020015160f81c90506114926001876122a8565b955060108160ff16106114a457600080fd5b6114c9848260ff16815181106114bc576114bc6120b7565b6020026020010151611b72565b1561150557600189516114dc91906122bb565b82146114e757600080fd5b505060408051600081526020810190915295506110eb945050505050565b61151d848260ff16815181106113fc576113fc6120b7565b61154057611539848260ff1681518110611423576114236120b7565b945061155b565b611558848260ff168151811061122e5761122e6120b7565b94505b5061159d565b6001885161156f91906122bb565b811461157a57600080fd5b611590836010815181106112d4576112d46120b7565b96505050505050506110eb565b806115a7816121d5565b915050611207565b5050505050509392505050565b60606115c782611b1f565b6115d057600080fd5b60006115db83611b95565b905060008167ffffffffffffffff8111156115f8576115f86120e6565b60405190808252806020026020018201604052801561163d57816020015b60408051808201909152600080825260208201528152602001906001900390816116165790505b509050600061164f8560200151611c1a565b856020015161165e91906122a8565b90506000805b848110156116c75761167583611c95565b915060405180604001604052808381526020018481525084828151811061169e5761169e6120b7565b60209081029190910101526116b382846122a8565b9250806116bf816121d5565b915050611664565b509195945050505050565b8051600090158015906116e757508151602110155b6116f057600080fd5b6000806116fc84611d3e565b8151919350915060208210156117185760208290036101000a90045b949350505050565b6060600083511161173057600080fd5b60008351600261174091906122ce565b90508083111561174f57600080fd5b61175983826122bb565b90508067ffffffffffffffff811115611774576117746120e6565b6040519080825280601f01601f19166020018201604052801561179e576020820181803683370190505b5091506000835b6117af83866122a8565b8110156118dd576117c1600282612314565b600003611845576004866117d6600284612328565b815181106117e6576117e66120b7565b602001015160f81c60f81b60f81c60ff16901c600f1660f81b848381518110611811576118116120b7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506118be565b600086611853600284612328565b81518110611863576118636120b7565b602001015160f81c60f81b60f81c60ff16901c600f1660f81b84838151811061188e5761188e6120b7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b6118c96001836122a8565b91506118d66001826122a8565b90506117a5565b50825181146118ee576118ee61233c565b505092915050565b600060208260000151101561191357602082015182519020610345565b60208201518251902060405160200161192e91815260200190565b604051602081830303815290604052805190602001209050919050565b805160609061195957600080fd5b60008061196584611d3e565b9150915060008167ffffffffffffffff811115611984576119846120e6565b6040519080825280601f01601f1916602001820160405280156119ae576020820181803683370190505b509050602081016119c0848285611d85565b50949350505050565b6000606060008351116119db57600080fd5b60006004846000815181106119f2576119f26120b7565b60209101015160f81c901c600f1690506000818103611a175750600092506002611a4e565b81600103611a2b5750600092506001611a4e565b81600203611a3f5750600192506002611a4e565b816003036100f5575060019250825b83611a598683611720565b935093505050915091565b6000805b8351611a7486836122a8565b108015611a815750825181105b1561171857828181518110611a9857611a986120b7565b01602001517fff000000000000000000000000000000000000000000000000000000000000001684611aca87846122a8565b81518110611ada57611ada6120b7565b01602001517fff000000000000000000000000000000000000000000000000000000000000001614611b0d5790506110eb565b80611b17816121d5565b915050611a68565b80516000908103611b3257506000919050565b6020820151805160001a9060c0821015611b50575060009392505050565b5060019392505050565b6000806000611b6884611d3e565b9020949350505050565b8051600090600114611b8657506000919050565b50602001515160001a60801490565b80516000908103611ba857506000919050565b600080611bb88460200151611c1a565b8460200151611bc791906122a8565b9050600084600001518560200151611bdf91906122a8565b90505b80821015611c1157611bf382611c95565b611bfd90836122a8565b915082611c09816121d5565b935050611be2565b50909392505050565b8051600090811a6080811015611c335750600092915050565b60b8811080611c4e575060c08110801590611c4e575060f881105b15611c5c5750600192915050565b60c0811015611c8957611c71600160b861236b565b611c7e9060ff16826122bb565b6110eb9060016122a8565b611c71600160f861236b565b80516000908190811a6080811015611cb05760019150611d37565b60b8811015611cd657611cc46080826122bb565b611ccf9060016122a8565b9150611d37565b60c0811015611d035760b78103600185019450806020036101000a85510460018201810193505050611d37565b60f8811015611d1757611cc460c0826122bb565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b6000806000611d508460200151611c1a565b90506000818560200151611d6491906122a8565b90506000828660000151611d7891906122bb565b9196919550909350505050565b80600003611d9257505050565b60208110611dca5782518252611da96020846122a8565b9250611db66020836122a8565b9150611dc36020826122bb565b9050611d92565b80156106375760006001611ddf8360206122bb565b611deb906101006124a4565b611df591906122bb565b84518451821691191617835250505050565b600060208284031215611e1957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146110eb57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461035c57600080fd5b600060208284031215611e7d57600080fd5b81356110eb81611e49565b60008083601f840112611e9a57600080fd5b50813567ffffffffffffffff811115611eb257600080fd5b6020830191508360208260051b8501011115611ecd57600080fd5b9250929050565b60008060008060008060008060a0898b031215611ef057600080fd5b8835611efb81611e49565b975060208901359650604089013567ffffffffffffffff80821115611f1f57600080fd5b611f2b8c838d01611e88565b909850965060608b0135915080821115611f4457600080fd5b611f508c838d01611e88565b909650945060808b0135915080821115611f6957600080fd5b50611f768b828c01611e88565b999c989b5096995094979396929594505050565b60008060208385031215611f9d57600080fd5b823567ffffffffffffffff80821115611fb557600080fd5b818501915085601f830112611fc957600080fd5b813581811115611fd857600080fd5b8660208260061b8501011115611fed57600080fd5b60209290920196919550909350505050565b6000806000806000806080878903121561201857600080fd5b86359550602087013561202a81611e49565b9450604087013567ffffffffffffffff8082111561204757600080fd5b6120538a838b01611e88565b9096509450606089013591508082111561206c57600080fd5b5061207989828a01611e88565b979a9699509497509295939492505050565b6000806040838503121561209e57600080fd5b82356120a981611e49565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561215f577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405290565b60006040828403121561217757600080fd5b61217f612115565b823561218a81611e49565b8152602083013561219a81611e49565b60208201529392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612206576122066121a6565b5060010190565b60006040828403121561221f57600080fd5b612227612115565b82518152602083015164ffffffffff8116811461219a57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261227857600080fd5b83018035915067ffffffffffffffff82111561229357600080fd5b602001915036819003821315611ecd57600080fd5b80820180821115610345576103456121a6565b81810381811115610345576103456121a6565b8082028115828204841417610345576103456121a6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612323576123236122e5565b500690565b600082612337576123376122e5565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b60ff8281168282160390811115610345576103456121a6565b600181815b808511156123dd57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156123c3576123c36121a6565b808516156123d057918102915b93841c9390800290612389565b509250929050565b6000826123f457506001610345565b8161240157506000610345565b816001811461241757600281146124215761243d565b6001915050610345565b60ff841115612432576124326121a6565b50506001821b610345565b5060208310610133831016604e8410600b8410161715612460575081810a610345565b61246a8383612384565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561249c5761249c6121a6565b029392505050565b60006110eb83836123e556fea164736f6c6343000813000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ed403d48e2bc946438b5686aa1ad65056ccf951200000000000000000000000031562ae726afebe25417df01bedc72ef489f45b300000000000000000000000031562ae726afebe25417df01bedc72ef489f45b3
-----Decoded View---------------
Arg [0] : _stateRootOracle (address): 0xeD403d48e2bC946438B5686AA1AD65056Ccf9512
Arg [1] : _timelockAddress (address): 0x31562ae726AFEBe25417df01bEdC72EF489F45b3
Arg [2] : _trustedCaller (address): 0x31562ae726AFEBe25417df01bEdC72EF489F45b3
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000ed403d48e2bc946438b5686aa1ad65056ccf9512
Arg [1] : 00000000000000000000000031562ae726afebe25417df01bedc72ef489f45b3
Arg [2] : 00000000000000000000000031562ae726afebe25417df01bedc72ef489f45b3
Net Worth in USD
Net Worth in FRAX
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.