Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- DataFeedProxyWithOev
- Optimization enabled
- true
- Compiler version
- v0.8.17+commit.8df45f5f
- Optimization runs
- 1000
- EVM Version
- default
- Verified at
- 2024-05-03T11:05:03.948212Z
Constructor Arguments
0x000000000000000000000000709944a48caf83535e43471680fda4905fb3920a4385954e058fbe6b6a744f32a4f89d67aad099f8fb8b23e7ea8dd366ae88151d00000000000000000000000007b589f06bd0a5324c4e2376d66d2f4f25921de1
Arg [0] (address) : 0x709944a48caf83535e43471680fda4905fb3920a
Arg [1] (bytes32) : 4385954e058fbe6b6a744f32a4f89d67aad099f8fb8b23e7ea8dd366ae88151d
Arg [2] (address) : 0x07b589f06bd0a5324c4e2376d66d2f4f25921de1
contracts/api3-server-v1/proxies/DataFeedProxyWithOev.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./DataFeedProxy.sol"; import "./interfaces/IOevProxy.sol"; /// @title An immutable proxy contract that is used to read a specific data /// feed (Beacon or Beacon set) of a specific Api3ServerV1 contract and inform /// Api3ServerV1 about the beneficiary of the respective OEV proceeds /// @notice In an effort to reduce the bytecode of this contract, its /// constructor arguments are validated by ProxyFactory, rather than /// internally. If you intend to deploy this contract without using /// ProxyFactory, you are recommended to implement an equivalent validation. /// @dev See DapiProxy.sol for comments about usage contract DataFeedProxyWithOev is DataFeedProxy, IOevProxy { /// @notice OEV beneficiary address address public immutable override oevBeneficiary; /// @param _api3ServerV1 Api3ServerV1 address /// @param _dataFeedId Data feed (Beacon or Beacon set) ID /// @param _oevBeneficiary OEV beneficiary constructor( address _api3ServerV1, bytes32 _dataFeedId, address _oevBeneficiary ) DataFeedProxy(_api3ServerV1, _dataFeedId) { oevBeneficiary = _oevBeneficiary; } /// @notice Reads the data feed that this proxy maps to /// @return value Data feed value /// @return timestamp Data feed timestamp function read() external view virtual override returns (int224 value, uint32 timestamp) { (value, timestamp) = IApi3ServerV1(api3ServerV1) .readDataFeedWithIdAsOevProxy(dataFeedId); } }
contracts/access/interfaces/IAccessControlRegistryAdminned.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/interfaces/ISelfMulticall.sol"; interface IAccessControlRegistryAdminned is ISelfMulticall { function accessControlRegistry() external view returns (address); function adminRoleDescription() external view returns (string memory); }
contracts/access/interfaces/IAccessControlRegistryAdminnedWithManager.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IAccessControlRegistryAdminned.sol"; interface IAccessControlRegistryAdminnedWithManager is IAccessControlRegistryAdminned { function manager() external view returns (address); function adminRole() external view returns (bytes32); }
contracts/api3-server-v1/interfaces/IApi3ServerV1.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IOevDapiServer.sol"; import "./IBeaconUpdatesWithSignedData.sol"; interface IApi3ServerV1 is IOevDapiServer, IBeaconUpdatesWithSignedData { function readDataFeedWithId( bytes32 dataFeedId ) external view returns (int224 value, uint32 timestamp); function readDataFeedWithDapiNameHash( bytes32 dapiNameHash ) external view returns (int224 value, uint32 timestamp); function readDataFeedWithIdAsOevProxy( bytes32 dataFeedId ) external view returns (int224 value, uint32 timestamp); function readDataFeedWithDapiNameHashAsOevProxy( bytes32 dapiNameHash ) external view returns (int224 value, uint32 timestamp); function dataFeeds( bytes32 dataFeedId ) external view returns (int224 value, uint32 timestamp); function oevProxyToIdToDataFeed( address proxy, bytes32 dataFeedId ) external view returns (int224 value, uint32 timestamp); }
contracts/api3-server-v1/interfaces/IBeaconUpdatesWithSignedData.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IDataFeedServer.sol"; interface IBeaconUpdatesWithSignedData is IDataFeedServer { function updateBeaconWithSignedData( address airnode, bytes32 templateId, uint256 timestamp, bytes calldata data, bytes calldata signature ) external returns (bytes32 beaconId); }
contracts/api3-server-v1/interfaces/IDapiServer.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../access/interfaces/IAccessControlRegistryAdminnedWithManager.sol"; import "./IDataFeedServer.sol"; interface IDapiServer is IAccessControlRegistryAdminnedWithManager, IDataFeedServer { event SetDapiName( bytes32 indexed dataFeedId, bytes32 indexed dapiName, address sender ); function setDapiName(bytes32 dapiName, bytes32 dataFeedId) external; function dapiNameToDataFeedId( bytes32 dapiName ) external view returns (bytes32); // solhint-disable-next-line func-name-mixedcase function DAPI_NAME_SETTER_ROLE_DESCRIPTION() external view returns (string memory); function dapiNameSetterRole() external view returns (bytes32); function dapiNameHashToDataFeedId( bytes32 dapiNameHash ) external view returns (bytes32 dataFeedId); }
contracts/api3-server-v1/interfaces/IDataFeedServer.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/interfaces/IExtendedSelfMulticall.sol"; interface IDataFeedServer is IExtendedSelfMulticall { event UpdatedBeaconWithSignedData( bytes32 indexed beaconId, int224 value, uint32 timestamp ); event UpdatedBeaconSetWithBeacons( bytes32 indexed beaconSetId, int224 value, uint32 timestamp ); function updateBeaconSetWithBeacons( bytes32[] memory beaconIds ) external returns (bytes32 beaconSetId); }
contracts/api3-server-v1/interfaces/IOevDapiServer.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IOevDataFeedServer.sol"; import "./IDapiServer.sol"; interface IOevDapiServer is IOevDataFeedServer, IDapiServer {}
contracts/api3-server-v1/interfaces/IOevDataFeedServer.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IDataFeedServer.sol"; interface IOevDataFeedServer is IDataFeedServer { event UpdatedOevProxyBeaconWithSignedData( bytes32 indexed beaconId, address indexed proxy, bytes32 indexed updateId, int224 value, uint32 timestamp ); event UpdatedOevProxyBeaconSetWithSignedData( bytes32 indexed beaconSetId, address indexed proxy, bytes32 indexed updateId, int224 value, uint32 timestamp ); event Withdrew( address indexed oevProxy, address oevBeneficiary, uint256 amount ); function updateOevProxyDataFeedWithSignedData( address oevProxy, bytes32 dataFeedId, bytes32 updateId, uint256 timestamp, bytes calldata data, bytes[] calldata packedOevUpdateSignatures ) external payable; function withdraw(address oevProxy) external; function oevProxyToBalance( address oevProxy ) external view returns (uint256 balance); }
contracts/api3-server-v1/proxies/DataFeedProxy.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./interfaces/IDataFeedProxy.sol"; import "../interfaces/IApi3ServerV1.sol"; /// @title An immutable proxy contract that is used to read a specific data /// feed (Beacon or Beacon set) of a specific Api3ServerV1 contract /// @notice In an effort to reduce the bytecode of this contract, its /// constructor arguments are validated by ProxyFactory, rather than /// internally. If you intend to deploy this contract without using /// ProxyFactory, you are recommended to implement an equivalent validation. /// @dev See DapiProxy.sol for comments about usage contract DataFeedProxy is IDataFeedProxy { /// @notice Api3ServerV1 address address public immutable override api3ServerV1; /// @notice Data feed ID bytes32 public immutable override dataFeedId; /// @param _api3ServerV1 Api3ServerV1 address /// @param _dataFeedId Data feed (Beacon or Beacon set) ID constructor(address _api3ServerV1, bytes32 _dataFeedId) { api3ServerV1 = _api3ServerV1; dataFeedId = _dataFeedId; } /// @notice Reads the data feed that this proxy maps to /// @return value Data feed value /// @return timestamp Data feed timestamp function read() external view virtual override returns (int224 value, uint32 timestamp) { (value, timestamp) = IApi3ServerV1(api3ServerV1).readDataFeedWithId( dataFeedId ); } }
contracts/api3-server-v1/proxies/interfaces/IDataFeedProxy.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IProxy.sol"; interface IDataFeedProxy is IProxy { function dataFeedId() external view returns (bytes32); }
contracts/api3-server-v1/proxies/interfaces/IOevProxy.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IOevProxy { function oevBeneficiary() external view returns (address); }
contracts/api3-server-v1/proxies/interfaces/IProxy.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @dev See DapiProxy.sol for comments about usage interface IProxy { function read() external view returns (int224 value, uint32 timestamp); function api3ServerV1() external view returns (address); }
contracts/utils/interfaces/IExtendedSelfMulticall.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ISelfMulticall.sol"; interface IExtendedSelfMulticall is ISelfMulticall { function getChainId() external view returns (uint256); function getBalance(address account) external view returns (uint256); function containsBytecode(address account) external view returns (bool); function getBlockNumber() external view returns (uint256); function getBlockTimestamp() external view returns (uint256); function getBlockBasefee() external view returns (uint256); }
contracts/utils/interfaces/ISelfMulticall.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ISelfMulticall { function multicall( bytes[] calldata data ) external returns (bytes[] memory returndata); function tryMulticall( bytes[] calldata data ) external returns (bool[] memory successes, bytes[] memory returndata); }
Compiler Settings
{"outputSelection":{"*":{"*":["*"],"":["*"]}},"optimizer":{"runs":1000,"enabled":true},"metadata":{"useLiteralContent":true},"libraries":{}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_api3ServerV1","internalType":"address"},{"type":"bytes32","name":"_dataFeedId","internalType":"bytes32"},{"type":"address","name":"_oevBeneficiary","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"api3ServerV1","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"dataFeedId","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"oevBeneficiary","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"int224","name":"value","internalType":"int224"},{"type":"uint32","name":"timestamp","internalType":"uint32"}],"name":"read","inputs":[]}]
Contract Creation Code
0x60e060405234801561001057600080fd5b5060405161035d38038061035d83398101604081905261002f91610068565b6001600160a01b0392831660805260a0919091521660c0526100a4565b80516001600160a01b038116811461006357600080fd5b919050565b60008060006060848603121561007d57600080fd5b6100868461004c565b92506020840151915061009b6040850161004c565b90509250925092565b60805160a05160c05161027f6100de6000396000605601526000818160ce015261014d01526000818160a7015261018d015261027f6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630e15999d146100515780632d6a744e146100a2578063370c826b146100c957806357de26a4146100fe575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6100f07f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610099565b610106610125565b60408051601b9390930b835263ffffffff909116602083015201610099565b6040517fcfaf49710000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063cfaf4971906024016040805180830381865afa1580156101d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101f79190610200565b90939092509050565b6000806040838503121561021357600080fd5b825180601b0b811461022457600080fd5b602084015190925063ffffffff8116811461023e57600080fd5b80915050925092905056fea2646970667358221220491c4b81100c410951a4eacc896ef33bf2f2865d87768147c4ca7217d63d79c864736f6c63430008110033000000000000000000000000709944a48caf83535e43471680fda4905fb3920a4385954e058fbe6b6a744f32a4f89d67aad099f8fb8b23e7ea8dd366ae88151d00000000000000000000000007b589f06bd0a5324c4e2376d66d2f4f25921de1
Deployed ByteCode
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630e15999d146100515780632d6a744e146100a2578063370c826b146100c957806357de26a4146100fe575b600080fd5b6100787f00000000000000000000000007b589f06bd0a5324c4e2376d66d2f4f25921de181565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100787f000000000000000000000000709944a48caf83535e43471680fda4905fb3920a81565b6100f07f4385954e058fbe6b6a744f32a4f89d67aad099f8fb8b23e7ea8dd366ae88151d81565b604051908152602001610099565b610106610125565b60408051601b9390930b835263ffffffff909116602083015201610099565b6040517fcfaf49710000000000000000000000000000000000000000000000000000000081527f4385954e058fbe6b6a744f32a4f89d67aad099f8fb8b23e7ea8dd366ae88151d6004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000709944a48caf83535e43471680fda4905fb3920a169063cfaf4971906024016040805180830381865afa1580156101d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101f79190610200565b90939092509050565b6000806040838503121561021357600080fd5b825180601b0b811461022457600080fd5b602084015190925063ffffffff8116811461023e57600080fd5b80915050925092905056fea2646970667358221220491c4b81100c410951a4eacc896ef33bf2f2865d87768147c4ca7217d63d79c864736f6c63430008110033