Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
18670340 | 419 days ago | 0.0007 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x36DfF305...1dc576606 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
ConnextHeaderReporter
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.17; import { HeaderReporter } from "../HeaderReporter.sol"; import { ConnextReporter } from "./ConnextReporter.sol"; contract ConnextHeaderReporter is HeaderReporter, ConnextReporter { constructor( address headerStorage, uint256 adapterChain, address connext, uint32 connextAdapterChain ) HeaderReporter(headerStorage, adapterChain) ConnextReporter(connext, connextAdapterChain) {} // solhint-disable no-empty-blocks function _sendPayload(bytes memory payload, address adapter) internal override { _connextSend(payload, adapter); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import {ExecuteArgs, TransferInfo, DestinationTransferStatus} from "../libraries/LibConnextStorage.sol"; import {TokenId} from "../libraries/TokenId.sol"; interface IConnext { // ============ BRIDGE ============== function xcall( uint32 _destination, address _to, address _asset, address _delegate, uint256 _amount, uint256 _slippage, bytes calldata _callData ) external payable returns (bytes32); function xcallIntoLocal( uint32 _destination, address _to, address _asset, address _delegate, uint256 _amount, uint256 _slippage, bytes calldata _callData ) external payable returns (bytes32); function execute(ExecuteArgs calldata _args) external returns (bytes32 transferId); function forceUpdateSlippage(TransferInfo calldata _params, uint256 _slippage) external; function forceReceiveLocal(TransferInfo calldata _params) external; function bumpTransfer(bytes32 _transferId) external payable; function routedTransfers(bytes32 _transferId) external view returns (address[] memory); function transferStatus(bytes32 _transferId) external view returns (DestinationTransferStatus); function remote(uint32 _domain) external view returns (address); function domain() external view returns (uint256); function nonce() external view returns (uint256); function approvedSequencers(address _sequencer) external view returns (bool); function xAppConnectionManager() external view returns (address); // ============ ROUTERS ============== function LIQUIDITY_FEE_NUMERATOR() external view returns (uint256); function LIQUIDITY_FEE_DENOMINATOR() external view returns (uint256); function getRouterApproval(address _router) external view returns (bool); function getRouterRecipient(address _router) external view returns (address); function getRouterOwner(address _router) external view returns (address); function getProposedRouterOwner(address _router) external view returns (address); function getProposedRouterOwnerTimestamp(address _router) external view returns (uint256); function maxRoutersPerTransfer() external view returns (uint256); function routerBalances(address _router, address _asset) external view returns (uint256); function getRouterApprovalForPortal(address _router) external view returns (bool); function initializeRouter(address _owner, address _recipient) external; function setRouterRecipient(address _router, address _recipient) external; function proposeRouterOwner(address _router, address _proposed) external; function acceptProposedRouterOwner(address _router) external; function addRouterLiquidityFor( uint256 _amount, address _local, address _router ) external payable; function addRouterLiquidity(uint256 _amount, address _local) external payable; function removeRouterLiquidityFor( TokenId memory _canonical, uint256 _amount, address payable _to, address _router ) external; function removeRouterLiquidity(TokenId memory _canonical, uint256 _amount, address payable _to) external; // ============ TOKEN_FACET ============== function adoptedToCanonical(address _adopted) external view returns (TokenId memory); function approvedAssets(TokenId calldata _canonical) external view returns (bool); }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; /** * @notice Enum representing status of destination transfer * @dev Status is only assigned on the destination domain, will always be "none" for the * origin domains * @return uint - Index of value in enum */ enum DestinationTransferStatus { None, // 0 Reconciled, // 1 Executed, // 2 Completed // 3 - executed + reconciled } /** * @notice These are the parameters that will remain constant between the * two chains. They are supplied on `xcall` and should be asserted on `execute` * @property to - The account that receives funds, in the event of a crosschain call, * will receive funds if the call fails. * * @param originDomain - The originating domain (i.e. where `xcall` is called) * @param destinationDomain - The final domain (i.e. where `execute` / `reconcile` are called)\ * @param canonicalDomain - The canonical domain of the asset you are bridging * @param to - The address you are sending funds (and potentially data) to * @param delegate - An address who can execute txs on behalf of `to`, in addition to allowing relayers * @param receiveLocal - If true, will use the local asset on the destination instead of adopted. * @param callData - The data to execute on the receiving chain. If no crosschain call is needed, then leave empty. * @param slippage - Slippage user is willing to accept from original amount in expressed in BPS (i.e. if * a user takes 1% slippage, this is expressed as 1_000) * @param originSender - The msg.sender of the xcall * @param bridgedAmt - The amount sent over the bridge (after potential AMM on xcall) * @param normalizedIn - The amount sent to `xcall`, normalized to 18 decimals * @param nonce - The nonce on the origin domain used to ensure the transferIds are unique * @param canonicalId - The unique identifier of the canonical token corresponding to bridge assets */ struct TransferInfo { uint32 originDomain; uint32 destinationDomain; uint32 canonicalDomain; address to; address delegate; bool receiveLocal; bytes callData; uint256 slippage; address originSender; uint256 bridgedAmt; uint256 normalizedIn; uint256 nonce; bytes32 canonicalId; } /** * @notice * @param params - The TransferInfo. These are consistent across sending and receiving chains. * @param routers - The routers who you are sending the funds on behalf of. * @param routerSignatures - Signatures belonging to the routers indicating permission to use funds * for the signed transfer ID. * @param sequencer - The sequencer who assigned the router path to this transfer. * @param sequencerSignature - Signature produced by the sequencer for path assignment accountability * for the path that was signed. */ struct ExecuteArgs { TransferInfo params; address[] routers; bytes[] routerSignatures; address sequencer; bytes sequencerSignature; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.0; // ============= Structs ============= // Tokens are identified by a TokenId: // domain - 4 byte chain ID of the chain from which the token originates // id - 32 byte identifier of the token address on the origin chain, in that chain's address format struct TokenId { uint32 domain; bytes32 id; }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.17; import { IConnext } from "@connext/interfaces/core/IConnext.sol"; abstract contract ConnextReporter { string public constant PROVIDER = "connext"; IConnext public immutable CONNEXT; uint32 public immutable CONNEXT_ADAPTER_CHAIN; event ConnextTransfer(bytes32 transferId); constructor(address connext, uint32 connextAdapterChain) { CONNEXT = IConnext(connext); CONNEXT_ADAPTER_CHAIN = connextAdapterChain; } function _connextSend(bytes memory payload, address adapter) internal { bytes32 transferId = CONNEXT.xcall{ value: msg.value }( CONNEXT_ADAPTER_CHAIN, // _destination: Domain ID of the destination chain adapter, // _to: address of the target contract address(0), // _asset: use address zero for 0-value transfers msg.sender, // _delegate: address that can revert or forceLocal on destination 0, // _amount: 0 because no funds are being transferred 0, // _slippage: can be anything between 0-10000 because no funds are being transferred payload // _callData: the encoded calldata to send ); emit ConnextTransfer(transferId); } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.17; import { IHeaderReporter } from "../interfaces/IHeaderReporter.sol"; import { HeaderStorage } from "../utils/HeaderStorage.sol"; abstract contract HeaderReporter is IHeaderReporter { HeaderStorage public immutable HEADER_STORAGE; uint256 public immutable ADAPTER_CHAIN; event HeaderReported(address indexed emitter, uint256 indexed blockNumber, bytes32 indexed blockHeader); /// @dev Constructs base reporter abstracted from specific message transport /// @param headerStorage HeaderStorage contract on this chain to use for block hash obtaining /// @param adapterChain Chain ID of the adapter that is served by this reporter constructor(address headerStorage, uint256 adapterChain) { HEADER_STORAGE = HeaderStorage(headerStorage); ADAPTER_CHAIN = adapterChain; } function reportHeaders(uint256[] memory blockNumbers, address adapter) external payable { bytes32[] memory blockHeaders = HEADER_STORAGE.storeBlockHeaders(blockNumbers); bytes memory payload = abi.encode(blockNumbers, blockHeaders); _sendPayload(payload, adapter); for (uint i = 0; i < blockNumbers.length; i++) { emit HeaderReported(address(this), blockNumbers[i], blockHeaders[i]); } } function _sendPayload(bytes memory payload, address adapter) internal virtual; }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.17; interface IHeaderReporter { /// @dev Reports the given block hash to a different chain according to the reporter configuration. /// @param blockNumbers Block numbers to report hashes for. /// @param adapter Adapter contract address to report hashes for. function reportHeaders(uint256[] memory blockNumbers, address adapter) external payable; }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.17; contract HeaderStorage { mapping(uint256 => bytes32) public headers; event HeaderStored(uint256 indexed blockNumber, bytes32 indexed blockHeader); error HeaderOutOfRange(address emitter, uint256 blockNumber); /// @dev Stores and returns the header for the given block. /// @param blockNumber Block number. /// @return blockHeader Block header stored. /// @notice Reverts if the given block header was not previously stored and is now out of range. function storeBlockHeader(uint256 blockNumber) public returns (bytes32 blockHeader) { blockHeader = headers[blockNumber]; if (blockHeader == 0) { blockHeader = blockhash(blockNumber); if (blockHeader == 0) revert HeaderOutOfRange(address(this), blockNumber); headers[blockNumber] = blockHeader; emit HeaderStored(blockNumber, blockHeader); } } /// @dev Stores and returns the header for an array of given blocks. /// @param blockNumbers Array of block numbers. /// @return Array of block headers. /// @notice Reverts if the given block header was not previously stored and is now out of range. function storeBlockHeaders(uint256[] memory blockNumbers) public returns (bytes32[] memory) { bytes32[] memory blockHeaders = new bytes32[](blockNumbers.length); for (uint256 i = 0; i < blockNumbers.length; i++) { blockHeaders[i] = storeBlockHeader(blockNumbers[i]); } return blockHeaders; } }
{ "viaIR": true, "metadata": { "bytecodeHash": "none" }, "optimizer": { "enabled": true, "runs": 800 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"headerStorage","type":"address"},{"internalType":"uint256","name":"adapterChain","type":"uint256"},{"internalType":"address","name":"connext","type":"address"},{"internalType":"uint32","name":"connextAdapterChain","type":"uint32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"transferId","type":"bytes32"}],"name":"ConnextTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"emitter","type":"address"},{"indexed":true,"internalType":"uint256","name":"blockNumber","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"blockHeader","type":"bytes32"}],"name":"HeaderReported","type":"event"},{"inputs":[],"name":"ADAPTER_CHAIN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONNEXT","outputs":[{"internalType":"contract IConnext","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONNEXT_ADAPTER_CHAIN","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HEADER_STORAGE","outputs":[{"internalType":"contract HeaderStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROVIDER","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"blockNumbers","type":"uint256[]"},{"internalType":"address","name":"adapter","type":"address"}],"name":"reportHeaders","outputs":[],"stateMutability":"payable","type":"function"}]
Deployed Bytecode
0x608060408181526004918236101561001657600080fd5b600092833560e01c918262d344111461052e5750816308ff5fad146104ed5781631073f93d1461049c5781636b29e048146100f35750806392f75cb2146100a35763f8f3a8bc1461006657600080fd5b3461009f578160031936011261009f57602090517f00000000000000000000000000000000000000000000000000000000000000648152f35b5080fd5b503461009f578160031936011261009f576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000008898b472c54c31894e3b9bb83cea802a5d0e63c6168152f35b8284816003193601126104995782359267ffffffffffffffff808511610495573660238601121561049557848201359461012c8661062a565b94610139815196876105b2565b8686526020918287016024809960051b8301019136831161046f5789859101915b8383106104855750505050863573ffffffffffffffffffffffffffffffffffffffff80821680920361048157825163ceee6e5560e01b81528681018590528781806101a78d82018d610642565b038183867f00000000000000000000000022f1fc71a505c0b2bf4d5075801cc5e0ec84b09e165af19586156104775788966103e0575b505082519183858401526101f4606084018a610642565b601f1990818582030186860152868851918281520190878901908b5b8181106103cc57505050916102368796959392846102a2999694039081018552846105b2565b8b8551978894859384936345560b5d60e11b85528d63ffffffff7f0000000000000000000000000000000000000000000000000000000000676e6f16908601528401528c60448401523360648401528c60848401528c60a484015260e060c484015260e48301906105ea565b039134907f0000000000000000000000008898b472c54c31894e3b9bb83cea802a5d0e63c6165af19081156103c357869161036e575b7f3f9ce6dbca7939d12ecdcc7dbc191459e6751ae66216e0683da19024499580cc935051908152a1825b845181101561036a576103158186610676565b516103208284610676565b5190307f91d88cce380da58b1f18fc437a4a6342ddea08c9a496e31ae03e16c08fc4fce18780a4600019811461035857600101610302565b634e487b7160e01b8452601183528584fd5b8380f35b918381809593503d83116103bc575b61038781836105b2565b810103126103b857517f3f9ce6dbca7939d12ecdcc7dbc191459e6751ae66216e0683da19024499580cc92916102d8565b8580fd5b503d61037d565b513d87823e3d90fd5b825184529289019291890191600101610210565b909195503d8089843e6103f381846105b2565b820191858184031261047357805191821161047357019080601f8301121561046f5781516104208161062a565b9261042d865194856105b2565b818452868085019260051b82010192831161046b5786809101915b83831061045b57505050509389806101dd565b8251815291810191879101610448565b8980fd5b8780fd5b8880fd5b84513d8a823e3d90fd5b8680fd5b823581529181019185910161015a565b8280fd5b80fd5b50503461009f578160031936011261009f576020905173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000022f1fc71a505c0b2bf4d5075801cc5e0ec84b09e168152f35b50503461009f578160031936011261009f576020905163ffffffff7f0000000000000000000000000000000000000000000000000000000000676e6f168152f35b8385346104995780600319360112610499578183019083821067ffffffffffffffff83111761059f575061059b93508152600782527f636f6e6e657874000000000000000000000000000000000000000000000000006020830152519182916020835260208301906105ea565b0390f35b634e487b7160e01b815260418552602490fd5b90601f8019910116810190811067ffffffffffffffff8211176105d457604052565b634e487b7160e01b600052604160045260246000fd5b919082519283825260005b848110610616575050826000602080949584010152601f8019910116010190565b6020818301810151848301820152016105f5565b67ffffffffffffffff81116105d45760051b60200190565b90815180825260208080930193019160005b828110610662575050505090565b835185529381019392810192600101610654565b805182101561068a5760209160051b010190565b634e487b7160e01b600052603260045260246000fdfea164736f6c6343000811000a
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.