Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 237 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Add To L2With Pe... | 21636180 | 5 days ago | IN | 0.00006516 ETH | 0.00102356 | ||||
Add To L2With Pe... | 21625011 | 7 days ago | IN | 0.000134 ETH | 0.00196308 | ||||
Add To L2With Pe... | 21622260 | 7 days ago | IN | 0.00005754 ETH | 0.00083194 | ||||
Add To L2With Pe... | 21546521 | 17 days ago | IN | 0.00018322 ETH | 0.00280754 | ||||
Add To L2With Pe... | 21508016 | 23 days ago | IN | 0.00006804 ETH | 0.00107696 | ||||
Add To L2With Pe... | 21506775 | 23 days ago | IN | 0.00004999 ETH | 0.00065989 | ||||
Add To L2With Pe... | 21496662 | 24 days ago | IN | 0.00008729 ETH | 0.00122168 | ||||
Add To L2With Pe... | 21494024 | 25 days ago | IN | 0.00009847 ETH | 0.00148424 | ||||
Add To L2With Pe... | 21486281 | 26 days ago | IN | 0.00007576 ETH | 0.00103849 | ||||
Add To L2With Pe... | 21458321 | 30 days ago | IN | 0.00010817 ETH | 0.00177611 | ||||
Add To L2With Pe... | 21458307 | 30 days ago | IN | 0.00009679 ETH | 0.00015736 | ||||
Add To L2With Pe... | 21336215 | 47 days ago | IN | 0.00028701 ETH | 0.0042273 | ||||
Add To L2With Pe... | 21333560 | 47 days ago | IN | 0.00099969 ETH | 0.00652448 | ||||
Add To L2With Pe... | 21324073 | 49 days ago | IN | 0.00048091 ETH | 0.00746694 | ||||
Add To L2With Pe... | 21324033 | 49 days ago | IN | 0.00048384 ETH | 0.0079711 | ||||
Add To L2With Pe... | 21292455 | 53 days ago | IN | 0.00011207 ETH | 0.00161527 | ||||
Add To L2With Pe... | 21290325 | 53 days ago | IN | 0.00008571 ETH | 0.00126864 | ||||
Add To L2With Pe... | 21285063 | 54 days ago | IN | 0.00012134 ETH | 0.00187015 | ||||
Add To L2With Pe... | 21271224 | 56 days ago | IN | 0.00012532 ETH | 0.00156387 | ||||
Add To L2With Pe... | 21254132 | 58 days ago | IN | 0.00015534 ETH | 0.00209771 | ||||
Add To L2With Pe... | 21244935 | 60 days ago | IN | 0.00018117 ETH | 0.00287698 | ||||
Add To L2With Pe... | 21243866 | 60 days ago | IN | 0.00023818 ETH | 0.00357059 | ||||
Add To L2With Pe... | 21228033 | 62 days ago | IN | 0.00016693 ETH | 0.00248424 | ||||
Add To L2With Pe... | 21228019 | 62 days ago | IN | 0.00015678 ETH | 0.00246513 | ||||
Add To L2With Pe... | 21221254 | 63 days ago | IN | 0.0001604 ETH | 0.00252638 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
21636180 | 5 days ago | 0.00006516 ETH | ||||
21625011 | 7 days ago | 0.000134 ETH | ||||
21622260 | 7 days ago | 0.00005754 ETH | ||||
21546521 | 17 days ago | 0.00018322 ETH | ||||
21508016 | 23 days ago | 0.00006804 ETH | ||||
21506775 | 23 days ago | 0.00004999 ETH | ||||
21496662 | 24 days ago | 0.00008729 ETH | ||||
21494024 | 25 days ago | 0.00009847 ETH | ||||
21486281 | 26 days ago | 0.00007576 ETH | ||||
21458321 | 30 days ago | 0.00010817 ETH | ||||
21336215 | 47 days ago | 0.00028701 ETH | ||||
21333560 | 47 days ago | 0.00099969 ETH | ||||
21324073 | 49 days ago | 0.00048091 ETH | ||||
21324033 | 49 days ago | 0.00048384 ETH | ||||
21292455 | 53 days ago | 0.00011207 ETH | ||||
21290325 | 53 days ago | 0.00008571 ETH | ||||
21285063 | 54 days ago | 0.00012134 ETH | ||||
21271224 | 56 days ago | 0.00012532 ETH | ||||
21254132 | 58 days ago | 0.00015534 ETH | ||||
21244935 | 60 days ago | 0.00018117 ETH | ||||
21243866 | 60 days ago | 0.00023818 ETH | ||||
21228033 | 62 days ago | 0.00016693 ETH | ||||
21228019 | 62 days ago | 0.00015678 ETH | ||||
21221254 | 63 days ago | 0.0001604 ETH | ||||
21219760 | 63 days ago | 0.00012329 ETH |
Loading...
Loading
Contract Name:
BillingConnector
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { IBilling } from "./IBilling.sol"; import { IBillingConnector } from "./IBillingConnector.sol"; import { Governed } from "./Governed.sol"; import { ITokenGateway } from "arb-bridge-peripherals/contracts/tokenbridge/libraries/gateway/ITokenGateway.sol"; import { Rescuable } from "./Rescuable.sol"; import { IERC20WithPermit } from "./IERC20WithPermit.sol"; import { L1ArbitrumMessenger } from "./arbitrum/L1ArbitrumMessenger.sol"; /** * @title Billing Connector Contract * @dev The billing contract allows for Graph Tokens to be added by a user. The * tokens are immediately sent to the Billing contract on L2 (Arbitrum) * through the GRT token bridge. */ contract BillingConnector is IBillingConnector, Governed, Rescuable, L1ArbitrumMessenger { // -- State -- // The contract for interacting with The Graph Token IERC20 private immutable graphToken; // The L1 Token Gateway through which tokens are sent to L2 ITokenGateway public l1TokenGateway; // The Billing contract in L2 to which we send tokens address public l2Billing; // The Arbitrum Delayed Inbox address address public inbox; /** * @dev Address of the L1 token gateway was updated */ event L1TokenGatewayUpdated(address l1TokenGateway); /** * @dev Address of the L2 Billing contract was updated */ event L2BillingUpdated(address l2Billing); /** * @dev Address of the Arbitrum Inbox contract was updated */ event ArbitrumInboxUpdated(address inbox); /** * @dev Tokens sent to the Billing contract on L2 */ event TokensSentToL2(address indexed _from, address indexed _to, uint256 _amount); /** * @dev Request sent to the Billing contract on L2 to remove tokens from the balance */ event RemovalRequestSentToL2(address indexed _from, address indexed _to, uint256 _amount); /** * @notice Constructor function for BillingConnector * @param _l1TokenGateway L1GraphTokenGateway address * @param _l2Billing Address of the Billing contract on L2 * @param _token Graph Token address * @param _governor Governor address * @param _inbox Arbitrum Delayed Inbox address */ constructor( address _l1TokenGateway, address _l2Billing, IERC20 _token, address _governor, address _inbox ) Governed(_governor) { _setL1TokenGateway(_l1TokenGateway); _setL2Billing(_l2Billing); _setArbitrumInbox(_inbox); graphToken = _token; } /** * @notice Sets the L1 token gateway address * @param _l1TokenGateway New address for the L1 token gateway */ function setL1TokenGateway(address _l1TokenGateway) external override onlyGovernor { _setL1TokenGateway(_l1TokenGateway); } /** * @notice Sets the L2 Billing address * @param _l2Billing New address for the L2 Billing contract */ function setL2Billing(address _l2Billing) external override onlyGovernor { _setL2Billing(_l2Billing); } /** * @notice Sets the Arbitrum Delayed Inbox address * @param _inbox New address for the Arbitrum Delayed Inbox */ function setArbitrumInbox(address _inbox) external override onlyGovernor { _setArbitrumInbox(_inbox); } /** * @notice Add tokens into the billing contract on L2, for any user * @dev Ensure graphToken.approve() is called for the BillingConnector contract first * @param _to Address that tokens are being added to * @param _amount Amount of tokens to add * @param _maxGas Max gas for the L2 retryable ticket execution * @param _gasPriceBid Gas price for the L2 retryable ticket execution * @param _maxSubmissionCost Max submission price for the L2 retryable ticket */ function addToL2( address _to, uint256 _amount, uint256 _maxGas, uint256 _gasPriceBid, uint256 _maxSubmissionCost ) external payable override { require(_amount != 0, "Must add more than 0"); require(_to != address(0), "destination != 0"); _addToL2(msg.sender, _to, _amount, _maxGas, _gasPriceBid, _maxSubmissionCost); } /** * @notice Remove tokens from the billing contract on L2, sending the tokens * to an L2 address * @dev Useful when the tokens are in the balance for an address * that doesn't exist in L2. * Keep in mind there's no guarantee that the transaction will succeed in L2, * e.g. if the sender doesn't actually have enough balance there. * @param _to L2 address to which the tokens (and any surplus ETH) will be sent * @param _amount Amount of tokens to remove * @param _maxGas Max gas for the L2 retryable ticket execution * @param _gasPriceBid Gas price for the L2 retryable ticket execution * @param _maxSubmissionCost Max submission price for the L2 retryable ticket */ function removeOnL2( address _to, uint256 _amount, uint256 _maxGas, uint256 _gasPriceBid, uint256 _maxSubmissionCost ) external payable override { require(_amount != 0, "Must remove more than 0"); require(_to != address(0), "destination != 0"); // Callers of this function should generally be L1 contracts // (e.g. multisigs) that don't exist in L2, so the destination // must be some other address. require(_to != msg.sender, "destination != sender"); bytes memory l2Calldata = abi.encodeWithSelector(IBilling.removeFromL1.selector, msg.sender, _to, _amount); // The bridge will validate msg.value and submission cost later, but at least fail early // if no submission cost is supplied. require(_maxSubmissionCost != 0, "Submission cost must be > 0"); L2GasParams memory gasParams = L2GasParams(_maxSubmissionCost, _maxGas, _gasPriceBid); sendTxToL2(inbox, l2Billing, _to, msg.value, 0, gasParams, l2Calldata); emit RemovalRequestSentToL2(msg.sender, _to, _amount); } /** * @notice Add tokens into the billing contract on L2 using a signed permit * @dev _user must be the msg.sender * @param _user Address of the current owner of the tokens, that will also be the destination in L2 * @param _amount Amount of tokens to add * @param _maxGas Max gas for the L2 retryable ticket execution * @param _gasPriceBid Gas price for the L2 retryable ticket execution * @param _maxSubmissionCost Max submission price for the L2 retryable ticket * @param _deadline Expiration time of the signed permit * @param _v Signature recovery id * @param _r Signature r value * @param _s Signature s value */ function addToL2WithPermit( address _user, uint256 _amount, uint256 _maxGas, uint256 _gasPriceBid, uint256 _maxSubmissionCost, uint256 _deadline, uint8 _v, bytes32 _r, bytes32 _s ) external payable override { require(_amount != 0, "Must add more than 0"); require(_user != address(0), "destination != 0"); require(_user == msg.sender, "Only tokens owner can call"); _permit(_user, address(this), _amount, _deadline, _v, _r, _s); _addToL2(_user, _user, _amount, _maxGas, _gasPriceBid, _maxSubmissionCost); } /** * @notice Allows the Governor to rescue any ERC20 tokens sent to this contract by accident * @param _to Destination address to send the tokens * @param _token Token address of the token that was accidentally sent to the contract * @param _amount Amount of tokens to pull */ function rescueTokens( address _to, address _token, uint256 _amount ) external override onlyGovernor { _rescueTokens(_to, _token, _amount); } /** * @dev Add tokens into the billing contract on L2, for any user * Ensure graphToken.approve() or graphToken.permit() is called for the BillingConnector contract first * @param _owner Address of the current owner of the tokens * @param _to Address that tokens are being added to * @param _amount Amount of tokens to add * @param _maxGas Max gas for the L2 retryable ticket execution * @param _gasPriceBid Gas price for the L2 retryable ticket execution * @param _maxSubmissionCost Max submission price for the L2 retryable ticket */ function _addToL2( address _owner, address _to, uint256 _amount, uint256 _maxGas, uint256 _gasPriceBid, uint256 _maxSubmissionCost ) internal { graphToken.transferFrom(_owner, address(this), _amount); bytes memory extraData = abi.encode(_to); bytes memory data = abi.encode(_maxSubmissionCost, extraData); graphToken.approve(address(l1TokenGateway), _amount); l1TokenGateway.outboundTransfer{ value: msg.value }( address(graphToken), l2Billing, _amount, _maxGas, _gasPriceBid, data ); emit TokensSentToL2(_owner, _to, _amount); } /** * @dev Sets the L1 token gateway address * @param _l1TokenGateway New address for the L1 token gateway */ function _setL1TokenGateway(address _l1TokenGateway) internal { require(_l1TokenGateway != address(0), "L1 Token Gateway cannot be 0"); l1TokenGateway = ITokenGateway(_l1TokenGateway); emit L1TokenGatewayUpdated(_l1TokenGateway); } /** * @dev Sets the L2 Billing address * @param _l2Billing New address for the L2 Billing contract */ function _setL2Billing(address _l2Billing) internal { require(_l2Billing != address(0), "L2 Billing cannot be zero"); l2Billing = _l2Billing; emit L2BillingUpdated(_l2Billing); } /** * @dev Sets the Arbitrum Delayed Inbox address * @param _inbox New address for the Arbitrum Delayed Inbox */ function _setArbitrumInbox(address _inbox) internal { require(_inbox != address(0), "Arbitrum Inbox cannot be zero"); inbox = _inbox; emit ArbitrumInboxUpdated(_inbox); } /** * @dev Approve token allowance by validating a message signed by the holder, if permit * fails check for existing allowance before reverting transaction. * @param _owner Address of the token holder * @param _spender Address of the approved spender * @param _value Amount of tokens to approve the spender * @param _deadline Expiration time of the signed permit (if zero, the permit will never expire, so use with caution) * @param _v Signature recovery id * @param _r Signature r value * @param _s Signature s value */ function _permit( address _owner, address _spender, uint256 _value, uint256 _deadline, uint8 _v, bytes32 _r, bytes32 _s ) internal { IERC20WithPermit token = IERC20WithPermit(address(graphToken)); // Try permit() before allowance check to advance nonce if possible try token.permit(_owner, _spender, _value, _deadline, _v, _r, _s) { return; } catch Error(string memory reason) { // Check for existing allowance before reverting if (token.allowance(_owner, _spender) >= _value) { return; } revert(reason); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; interface IBilling { /** * @dev Set or unset an address as an allowed Collector * @param _collector Collector address * @param _enabled True to set the _collector address as a Collector, false to remove it */ function setCollector(address _collector, bool _enabled) external; // onlyGovernor /** * @dev Sets the L2 token gateway address * @param _l2TokenGateway New address for the L2 token gateway */ function setL2TokenGateway(address _l2TokenGateway) external; /** * @dev Sets the L1 Billing Connector address * @param _l1BillingConnector New address for the L1 BillingConnector (without any aliasing!) */ function setL1BillingConnector(address _l1BillingConnector) external; /** * @dev Add tokens into the billing contract * @param _amount Amount of tokens to add */ function add(uint256 _amount) external; /** * @dev Add tokens into the billing contract for any user * @param _to Address that tokens are being added to * @param _amount Amount of tokens to add */ function addTo(address _to, uint256 _amount) external; /** * @dev Receive tokens with a callhook from the Arbitrum GRT bridge * Expects an `address user` in the encoded _data. * @param _from Token sender in L1 * @param _amount Amount of tokens that were transferred * @param _data ABI-encoded callhook data: contains address that tokens are being added to */ function onTokenTransfer( address _from, uint256 _amount, bytes calldata _data ) external; /** * @dev Remove tokens from the billing contract, from L1 * This can only be called from the BillingConnector on L1. * @param _from Address from which the tokens are removed * @param _to Address to send the tokens * @param _amount Amount of tokens to remove */ function removeFromL1( address _from, address _to, uint256 _amount ) external; /** * @dev Add tokens into the billing contract in bulk * Ensure graphToken.approve() is called on the billing contract first * @param _to Array of addresses where to add tokens * @param _amount Array of amount of tokens to add to each account */ function addToMany(address[] calldata _to, uint256[] calldata _amount) external; /** * @dev Remove tokens from the billing contract * Tokens will be removed from the sender's balance * @param _to Address that tokens are being moved to * @param _amount Amount of tokens to remove */ function remove(address _to, uint256 _amount) external; /** * @dev Collector pulls tokens from the billing contract * @param _user Address that tokens are being pulled from * @param _amount Amount of tokens to pull * @param _to Destination to send pulled tokens */ function pull( address _user, uint256 _amount, address _to ) external; /** * @dev Collector pulls tokens from many users in the billing contract * @param _users Addresses that tokens are being pulled from * @param _amounts Amounts of tokens to pull from each user * @param _to Destination to send pulled tokens */ function pullMany( address[] calldata _users, uint256[] calldata _amounts, address _to ) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.16; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /** * @title ERC20 with Permit interface * @dev This is an ERC20 interface with an additional permit() function * that allows approving a user to move tokens using a signed permit. * The GraphToken contract implements this function. */ interface IERC20WithPermit is IERC20 { /** * @dev Approve token allowance by validating a message signed by the holder. * @param _owner Address of the token holder * @param _spender Address of the approved spender * @param _value Amount of tokens to approve the spender * @param _deadline Expiration time of the signed permit (if zero, the permit will never expire, so use with caution) * @param _v Signature recovery id * @param _r Signature r value * @param _s Signature s value */ function permit( address _owner, address _spender, uint256 _value, uint256 _deadline, uint8 _v, bytes32 _r, bytes32 _s ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /** * @title Rescuable contract * @dev Allows a contract to have a function to rescue tokens sent by mistake. * The contract must implement the external rescueTokens function or similar, * that calls this contract's _rescueTokens. */ contract Rescuable { /** * @dev Tokens rescued by the permissioned user */ event TokensRescued(address indexed to, address indexed token, uint256 amount); /** * @dev Allows a permissioned user to rescue any ERC20 tokens sent to this contract by accident * @param _to Destination address to send the tokens * @param _token Token address of the token that was accidentally sent to the contract * @param _amount Amount of tokens to pull */ function _rescueTokens( address _to, address _token, uint256 _amount ) internal { require(_to != address(0), "Cannot send to address(0)"); require(_amount != 0, "Cannot rescue 0 tokens"); IERC20 token = IERC20(_token); require(token.transfer(_to, _amount), "Rescue tokens failed"); emit TokensRescued(_to, _token, _amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; /** * @title Graph Governance contract * @dev Allows a contract to be owned and controlled by the 'governor' */ contract Governed { // -- State -- // The address of the governor address public governor; // The address of the pending governor address public pendingGovernor; // -- Events -- // Emit when the pendingGovernor state variable is updated event NewPendingOwnership(address indexed from, address indexed to); // Emit when the governor state variable is updated event NewOwnership(address indexed from, address indexed to); /** * @dev Check if the caller is the governor. */ modifier onlyGovernor() { require(msg.sender == governor, "Only Governor can call"); _; } /** * @dev Initialize the governor with the _initGovernor param. * @param _initGovernor Governor address */ constructor(address _initGovernor) { require(_initGovernor != address(0), "Governor must not be 0"); governor = _initGovernor; } /** * @dev Admin function to begin change of governor. The `_newGovernor` must call * `acceptOwnership` to finalize the transfer. * @param _newGovernor Address of new `governor` */ function transferOwnership(address _newGovernor) external onlyGovernor { require(_newGovernor != address(0), "Governor must be set"); address oldPendingGovernor = pendingGovernor; pendingGovernor = _newGovernor; emit NewPendingOwnership(oldPendingGovernor, pendingGovernor); } /** * @dev Admin function for pending governor to accept role and update governor. * This function must called by the pending governor. */ function acceptOwnership() external { require(pendingGovernor != address(0) && msg.sender == pendingGovernor, "Caller must be pending governor"); address oldGovernor = governor; address oldPendingGovernor = pendingGovernor; governor = pendingGovernor; pendingGovernor = address(0); emit NewOwnership(oldGovernor, governor); emit NewPendingOwnership(oldPendingGovernor, pendingGovernor); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; interface IBillingConnector { /** * @dev Sets the L1 token gateway address * @param _l1TokenGateway New address for the L1 token gateway */ function setL1TokenGateway(address _l1TokenGateway) external; /** * @dev Sets the L2 Billing address * @param _l2Billing New address for the L2 Billing contract */ function setL2Billing(address _l2Billing) external; /** * @dev Sets the Arbitrum Delayed Inbox address * @param _inbox New address for the L2 Billing contract */ function setArbitrumInbox(address _inbox) external; /** * @dev Add tokens into the billing contract on L2, for any user * Ensure graphToken.approve() is called for the BillingConnector contract first * @param _to Address that tokens are being added to * @param _amount Amount of tokens to add * @param _maxGas Max gas for the L2 retryable ticket execution * @param _gasPriceBid Gas price for the L2 retryable ticket execution * @param _maxSubmissionCost Max submission price for the L2 retryable ticket */ function addToL2( address _to, uint256 _amount, uint256 _maxGas, uint256 _gasPriceBid, uint256 _maxSubmissionCost ) external payable; /** * @dev Remove tokens from the billing contract on L2, sending the tokens * to an L2 address. Useful when the tokens are in the balance for an address * that doesn't exist in L2. * @param _to L2 address to which the tokens will be sent * @param _amount Amount of tokens to remove * @param _maxGas Max gas for the L2 retryable ticket execution * @param _gasPriceBid Gas price for the L2 retryable ticket execution * @param _maxSubmissionCost Max submission price for the L2 retryable ticket */ function removeOnL2( address _to, uint256 _amount, uint256 _maxGas, uint256 _gasPriceBid, uint256 _maxSubmissionCost ) external payable; /** * @dev Add tokens into the billing contract on L2, for any user, using a signed permit * @param _user Address of the current owner of the tokens, that will also be the destination in L2 * @param _amount Amount of tokens to add * @param _maxGas Max gas for the L2 retryable ticket execution * @param _gasPriceBid Gas price for the L2 retryable ticket execution * @param _maxSubmissionCost Max submission price for the L2 retryable ticket * @param _deadline Expiration time of the signed permit * @param _v Signature recovery id * @param _r Signature r value * @param _s Signature s value */ function addToL2WithPermit( address _user, uint256 _amount, uint256 _maxGas, uint256 _gasPriceBid, uint256 _maxSubmissionCost, uint256 _deadline, uint8 _v, bytes32 _r, bytes32 _s ) external payable; /** * @dev Allows the Governor to rescue any ERC20 tokens sent to this contract by accident * @param _to Destination address to send the tokens * @param _token Token address of the token that was accidentally sent to the contract * @param _amount Amount of tokens to pull */ function rescueTokens( address _to, address _token, uint256 _amount ) external; }
// SPDX-License-Identifier: Apache-2.0 /* * Copyright 2020, Offchain Labs, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Originally copied from: * https://github.com/OffchainLabs/arbitrum/tree/e3a6307ad8a2dc2cad35728a2a9908cfd8dd8ef9/packages/arb-bridge-peripherals * * MODIFIED from Offchain Labs' implementation: * - Changed solidity version to 0.8.16 ([email protected]) * */ pragma solidity ^0.8.16; import "./IInbox.sol"; import "./IOutbox.sol"; /// @notice L1 utility contract to assist with L1 <=> L2 interactions /// @dev this is an abstract contract instead of library so the functions can be easily overriden when testing abstract contract L1ArbitrumMessenger { event TxToL2(address indexed _from, address indexed _to, uint256 indexed _seqNum, bytes _data); struct L2GasParams { uint256 _maxSubmissionCost; uint256 _maxGas; uint256 _gasPriceBid; } function sendTxToL2( address _inbox, address _to, address _user, uint256 _l1CallValue, uint256 _l2CallValue, L2GasParams memory _l2GasParams, bytes memory _data ) internal virtual returns (uint256) { // alternative function entry point when struggling with the stack size return sendTxToL2( _inbox, _to, _user, _l1CallValue, _l2CallValue, _l2GasParams._maxSubmissionCost, _l2GasParams._maxGas, _l2GasParams._gasPriceBid, _data ); } function sendTxToL2( address _inbox, address _to, address _user, uint256 _l1CallValue, uint256 _l2CallValue, uint256 _maxSubmissionCost, uint256 _maxGas, uint256 _gasPriceBid, bytes memory _data ) internal virtual returns (uint256) { uint256 seqNum = IInbox(_inbox).createRetryableTicket{ value: _l1CallValue }( _to, _l2CallValue, _maxSubmissionCost, _user, _user, _maxGas, _gasPriceBid, _data ); emit TxToL2(_user, _to, seqNum, _data); return seqNum; } function getBridge(address _inbox) internal view virtual returns (IBridge) { return IInbox(_inbox).bridge(); } /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies function getL2ToL1Sender(address _inbox) internal view virtual returns (address) { IOutbox outbox = IOutbox(getBridge(_inbox).activeOutbox()); address l2ToL1Sender = outbox.l2ToL1Sender(); require(l2ToL1Sender != address(0), "NO_SENDER"); return l2ToL1Sender; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: Apache-2.0 /* * Copyright 2020, Offchain Labs, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // solhint-disable-next-line compiler-version pragma solidity >=0.6.9 <0.9.0; interface ITokenGateway { /// @notice event deprecated in favor of DepositInitiated and WithdrawalInitiated // event OutboundTransferInitiated( // address token, // address indexed _from, // address indexed _to, // uint256 indexed _transferId, // uint256 _amount, // bytes _data // ); /// @notice event deprecated in favor of DepositFinalized and WithdrawalFinalized // event InboundTransferFinalized( // address token, // address indexed _from, // address indexed _to, // uint256 indexed _transferId, // uint256 _amount, // bytes _data // ); function outboundTransfer( address _token, address _to, uint256 _amount, uint256 _maxGas, uint256 _gasPriceBid, bytes calldata _data ) external payable returns (bytes memory); function finalizeInboundTransfer( address _token, address _from, address _to, uint256 _amount, bytes calldata _data ) external payable; /** * @notice Calculate the address used when bridging an ERC20 token * @dev the L1 and L2 address oracles may not always be in sync. * For example, a custom token may have been registered but not deploy or the contract self destructed. * @param l1ERC20 address of L1 token * @return L2 address of a bridged ERC20 token */ function calculateL2TokenAddress(address l1ERC20) external view returns (address); }
// SPDX-License-Identifier: Apache-2.0 /* * Copyright 2021, Offchain Labs, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Originally copied from: * https://github.com/OffchainLabs/arbitrum/tree/e3a6307ad8a2dc2cad35728a2a9908cfd8dd8ef9/packages/arb-bridge-eth * * MODIFIED from Offchain Labs' implementation: * - Changed solidity version to 0.8.16 ([email protected]) * */ pragma solidity ^0.8.16; import "./IBridge.sol"; import "./IMessageProvider.sol"; interface IInbox is IMessageProvider { function sendL2Message(bytes calldata messageData) external returns (uint256); function sendUnsignedTransaction( uint256 maxGas, uint256 gasPriceBid, uint256 nonce, address destAddr, uint256 amount, bytes calldata data ) external returns (uint256); function sendContractTransaction( uint256 maxGas, uint256 gasPriceBid, address destAddr, uint256 amount, bytes calldata data ) external returns (uint256); function sendL1FundedUnsignedTransaction( uint256 maxGas, uint256 gasPriceBid, uint256 nonce, address destAddr, bytes calldata data ) external payable returns (uint256); function sendL1FundedContractTransaction( uint256 maxGas, uint256 gasPriceBid, address destAddr, bytes calldata data ) external payable returns (uint256); function createRetryableTicket( address destAddr, uint256 arbTxCallValue, uint256 maxSubmissionCost, address submissionRefundAddress, address valueRefundAddress, uint256 maxGas, uint256 gasPriceBid, bytes calldata data ) external payable returns (uint256); function depositEth(uint256 maxSubmissionCost) external payable returns (uint256); function bridge() external view returns (IBridge); function pauseCreateRetryables() external; function unpauseCreateRetryables() external; function startRewriteAddress() external; function stopRewriteAddress() external; }
// SPDX-License-Identifier: Apache-2.0 /* * Copyright 2021, Offchain Labs, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Originally copied from: * https://github.com/OffchainLabs/arbitrum/tree/e3a6307ad8a2dc2cad35728a2a9908cfd8dd8ef9/packages/arb-bridge-eth * * MODIFIED from Offchain Labs' implementation: * - Changed solidity version to 0.8.16 ([email protected]) * */ pragma solidity ^0.8.16; interface IOutbox { event OutboxEntryCreated( uint256 indexed batchNum, uint256 outboxEntryIndex, bytes32 outputRoot, uint256 numInBatch ); event OutBoxTransactionExecuted( address indexed destAddr, address indexed l2Sender, uint256 indexed outboxEntryIndex, uint256 transactionIndex ); function l2ToL1Sender() external view returns (address); function l2ToL1Block() external view returns (uint256); function l2ToL1EthBlock() external view returns (uint256); function l2ToL1Timestamp() external view returns (uint256); function l2ToL1BatchNum() external view returns (uint256); function l2ToL1OutputId() external view returns (bytes32); function processOutgoingMessages(bytes calldata sendsData, uint256[] calldata sendLengths) external; function outboxEntryExists(uint256 batchNum) external view returns (bool); }
// SPDX-License-Identifier: Apache-2.0 /* * Copyright 2021, Offchain Labs, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Originally copied from: * https://github.com/OffchainLabs/arbitrum/tree/e3a6307ad8a2dc2cad35728a2a9908cfd8dd8ef9/packages/arb-bridge-eth * * MODIFIED from Offchain Labs' implementation: * - Changed solidity version to 0.8.16 ([email protected]) * */ pragma solidity ^0.8.16; interface IMessageProvider { event InboxMessageDelivered(uint256 indexed messageNum, bytes data); event InboxMessageDeliveredFromOrigin(uint256 indexed messageNum); }
// SPDX-License-Identifier: Apache-2.0 /* * Copyright 2021, Offchain Labs, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Originally copied from: * https://github.com/OffchainLabs/arbitrum/tree/e3a6307ad8a2dc2cad35728a2a9908cfd8dd8ef9/packages/arb-bridge-eth * * MODIFIED from Offchain Labs' implementation: * - Changed solidity version to 0.8.16 ([email protected]) * */ pragma solidity ^0.8.16; interface IBridge { event MessageDelivered( uint256 indexed messageIndex, bytes32 indexed beforeInboxAcc, address inbox, uint8 kind, address sender, bytes32 messageDataHash ); event BridgeCallTriggered(address indexed outbox, address indexed destAddr, uint256 amount, bytes data); event InboxToggle(address indexed inbox, bool enabled); event OutboxToggle(address indexed outbox, bool enabled); function deliverMessageToInbox( uint8 kind, address sender, bytes32 messageDataHash ) external payable returns (uint256); function executeCall( address destAddr, uint256 amount, bytes calldata data ) external returns (bool success, bytes memory returnData); // These are only callable by the admin function setInbox(address inbox, bool enabled) external; function setOutbox(address inbox, bool enabled) external; // View functions function activeOutbox() external view returns (address); function allowedInboxes(address inbox) external view returns (bool); function allowedOutboxes(address outbox) external view returns (bool); function inboxAccs(uint256 index) external view returns (bytes32); function messageCount() external view returns (uint256); }
{ "optimizer": { "enabled": true, "runs": 200 }, "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":"_l1TokenGateway","type":"address"},{"internalType":"address","name":"_l2Billing","type":"address"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"address","name":"_governor","type":"address"},{"internalType":"address","name":"_inbox","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"inbox","type":"address"}],"name":"ArbitrumInboxUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"l1TokenGateway","type":"address"}],"name":"L1TokenGatewayUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"l2Billing","type":"address"}],"name":"L2BillingUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"NewOwnership","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"NewPendingOwnership","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"RemovalRequestSentToL2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensRescued","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"TokensSentToL2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_seqNum","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"_data","type":"bytes"}],"name":"TxToL2","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_maxGas","type":"uint256"},{"internalType":"uint256","name":"_gasPriceBid","type":"uint256"},{"internalType":"uint256","name":"_maxSubmissionCost","type":"uint256"}],"name":"addToL2","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_maxGas","type":"uint256"},{"internalType":"uint256","name":"_gasPriceBid","type":"uint256"},{"internalType":"uint256","name":"_maxSubmissionCost","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"addToL2WithPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"governor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"inbox","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1TokenGateway","outputs":[{"internalType":"contract ITokenGateway","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l2Billing","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingGovernor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_maxGas","type":"uint256"},{"internalType":"uint256","name":"_gasPriceBid","type":"uint256"},{"internalType":"uint256","name":"_maxSubmissionCost","type":"uint256"}],"name":"removeOnL2","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"rescueTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_inbox","type":"address"}],"name":"setArbitrumInbox","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_l1TokenGateway","type":"address"}],"name":"setL1TokenGateway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_l2Billing","type":"address"}],"name":"setL2Billing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newGovernor","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b506040516200198d3803806200198d8339810160408190526200003491620002fd565b816001600160a01b038116620000915760405162461bcd60e51b815260206004820152601660248201527f476f7665726e6f72206d757374206e6f7420626520300000000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055620000bc85620000e9565b620000c78462000196565b620000d2816200023d565b50506001600160a01b0316608052506200037d9050565b6001600160a01b038116620001415760405162461bcd60e51b815260206004820152601c60248201527f4c3120546f6b656e20476174657761792063616e6e6f74206265203000000000604482015260640162000088565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fbe3a9b49d9937fc888cad6d83a72afda07361ab8410f77399742192bdca700b8906020015b60405180910390a150565b6001600160a01b038116620001ee5760405162461bcd60e51b815260206004820152601960248201527f4c322042696c6c696e672063616e6e6f74206265207a65726f00000000000000604482015260640162000088565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fb2a92a51a1545e6e9a12017a0fb3247a80d940bc6893199d406de4fd25471c93906020016200018b565b6001600160a01b038116620002955760405162461bcd60e51b815260206004820152601d60248201527f417262697472756d20496e626f782063616e6e6f74206265207a65726f000000604482015260640162000088565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f3f4c461dbcecb7ee7efeccbaba3afde0d787d77bcd9de5bcd3e2923ab3db1143906020016200018b565b6001600160a01b0381168114620002fa57600080fd5b50565b600080600080600060a086880312156200031657600080fd5b85516200032381620002e4565b60208701519095506200033681620002e4565b60408701519094506200034981620002e4565b60608701519093506200035c81620002e4565b60808701519092506200036f81620002e4565b809150509295509295909350565b6080516115df620003ae60003960008181610ab501528181610b9a01528181610c350152610d5201526115df6000f3fe6080604052600436106100dd5760003560e01c8063b58a9b481161007f578063de0ab13611610059578063de0ab1361461021b578063e3056a341461022e578063f2fde38b1461024e578063fb0e722b1461026e57600080fd5b8063b58a9b48146101d5578063cd232158146101e8578063cea9d26f146101fb57600080fd5b806368f333ab116100bb57806368f333ab1461016057806375d2bc491461018057806379ba5097146101a0578063a84ce98c146101b557600080fd5b80630c340a24146100e25780632d49266b1461011e5780634269f81714610140575b600080fd5b3480156100ee57600080fd5b50600054610102906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b34801561012a57600080fd5b5061013e610139366004611156565b61028e565b005b34801561014c57600080fd5b50600354610102906001600160a01b031681565b34801561016c57600080fd5b5061013e61017b366004611156565b6102cd565b34801561018c57600080fd5b5061013e61019b366004611156565b610300565b3480156101ac57600080fd5b5061013e610333565b3480156101c157600080fd5b50600254610102906001600160a01b031681565b61013e6101e3366004611178565b61043a565b61013e6101f63660046111ba565b6104bc565b34801561020757600080fd5b5061013e61021636600461123b565b6105a9565b61013e610229366004611178565b6105e3565b34801561023a57600080fd5b50600154610102906001600160a01b031681565b34801561025a57600080fd5b5061013e610269366004611156565b6107cd565b34801561027a57600080fd5b50600454610102906001600160a01b031681565b6000546001600160a01b031633146102c15760405162461bcd60e51b81526004016102b890611277565b60405180910390fd5b6102ca81610896565b50565b6000546001600160a01b031633146102f75760405162461bcd60e51b81526004016102b890611277565b6102ca81610941565b6000546001600160a01b0316331461032a5760405162461bcd60e51b81526004016102b890611277565b6102ca816109e5565b6001546001600160a01b03161580159061035757506001546001600160a01b031633145b6103a35760405162461bcd60e51b815260206004820152601f60248201527f43616c6c6572206d7573742062652070656e64696e6720676f7665726e6f720060448201526064016102b8565b60008054600180546001600160a01b038082166001600160a01b0319808616821787559092169092556040519190921692829184917f0ac6deed30eef60090c749850e10f2fa469e3e25fec1d1bef2853003f6e6f18f91a36001546040516001600160a01b03918216918316907f76563ad561b7036ae716b9b25cb521b21463240f104c97e12f25877f2235f33d90600090a35050565b836000036104815760405162461bcd60e51b815260206004820152601460248201527304d75737420616464206d6f7265207468616e20360641b60448201526064016102b8565b6001600160a01b0385166104a75760405162461bcd60e51b81526004016102b8906112a7565b6104b5338686868686610a89565b5050505050565b876000036105035760405162461bcd60e51b815260206004820152601460248201527304d75737420616464206d6f7265207468616e20360641b60448201526064016102b8565b6001600160a01b0389166105295760405162461bcd60e51b81526004016102b8906112a7565b6001600160a01b03891633146105815760405162461bcd60e51b815260206004820152601a60248201527f4f6e6c7920746f6b656e73206f776e65722063616e2063616c6c00000000000060448201526064016102b8565b61059089308a87878787610d06565b61059e898a8a8a8a8a610a89565b505050505050505050565b6000546001600160a01b031633146105d35760405162461bcd60e51b81526004016102b890611277565b6105de838383610e87565b505050565b836000036106335760405162461bcd60e51b815260206004820152601760248201527f4d7573742072656d6f7665206d6f7265207468616e203000000000000000000060448201526064016102b8565b6001600160a01b0385166106595760405162461bcd60e51b81526004016102b8906112a7565b336001600160a01b038616036106a95760405162461bcd60e51b81526020600482015260156024820152743232b9ba34b730ba34b7b710109e9039b2b73232b960591b60448201526064016102b8565b604080513360248201526001600160a01b038716604482015260648082018790528251808303909101815260849091019091526020810180516001600160e01b03166323d7fab960e01b17905260008290036107475760405162461bcd60e51b815260206004820152601b60248201527f5375626d697373696f6e20636f7374206d757374206265203e2030000000000060448201526064016102b8565b6040805160608101825283815260208101869052908101849052600454600354610783916001600160a01b039081169116893460008688611032565b506040518681526001600160a01b0388169033907f6784bfe2c1ede7056abac08b6c387cfb91bdd22c2536b1f96eea73533bcd50fd9060200160405180910390a350505050505050565b6000546001600160a01b031633146107f75760405162461bcd60e51b81526004016102b890611277565b6001600160a01b0381166108445760405162461bcd60e51b815260206004820152601460248201527311dbdd995c9b9bdc881b5d5cdd081899481cd95d60621b60448201526064016102b8565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f76563ad561b7036ae716b9b25cb521b21463240f104c97e12f25877f2235f33d90600090a35050565b6001600160a01b0381166108ec5760405162461bcd60e51b815260206004820152601960248201527f4c322042696c6c696e672063616e6e6f74206265207a65726f0000000000000060448201526064016102b8565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fb2a92a51a1545e6e9a12017a0fb3247a80d940bc6893199d406de4fd25471c93906020015b60405180910390a150565b6001600160a01b0381166109975760405162461bcd60e51b815260206004820152601c60248201527f4c3120546f6b656e20476174657761792063616e6e6f7420626520300000000060448201526064016102b8565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fbe3a9b49d9937fc888cad6d83a72afda07361ab8410f77399742192bdca700b890602001610936565b6001600160a01b038116610a3b5760405162461bcd60e51b815260206004820152601d60248201527f417262697472756d20496e626f782063616e6e6f74206265207a65726f00000060448201526064016102b8565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f3f4c461dbcecb7ee7efeccbaba3afde0d787d77bcd9de5bcd3e2923ab3db114390602001610936565b6040516323b872dd60e01b81526001600160a01b038781166004830152306024830152604482018690527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af1158015610afe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2291906112d1565b50604080516001600160a01b038716602082015260009101604051602081830303815290604052905060008282604051602001610b60929190611343565b60408051808303601f190181529082905260025463095ea7b360e01b83526001600160a01b039081166004840152602483018990529092507f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906044016020604051808303816000875af1158015610be3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0791906112d1565b5060025460035460405163d2ce7d6560e01b81526001600160a01b039283169263d2ce7d65923492610c67927f00000000000000000000000000000000000000000000000000000000000000009216908c908c908c908a90600401611364565b60006040518083038185885af1158015610c85573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052610cae91908101906113e4565b50866001600160a01b0316886001600160a01b03167f92cccee5b7ea5d151ce671f56503713c0bcd59050858f49c8db6fc7913b4b73888604051610cf491815260200190565b60405180910390a35050505050505050565b60405163d505accf60e01b81526001600160a01b0388811660048301528781166024830152604482018790526064820186905260ff8516608483015260a4820184905260c482018390527f0000000000000000000000000000000000000000000000000000000000000000919082169063d505accf9060e401600060405180830381600087803b158015610d9957600080fd5b505af1925050508015610daa575060015b610e7c57610db661147c565b806308c379a003610e705750610dca611498565b80610dd55750610e72565b604051636eb1769f60e11b81526001600160a01b038a81166004830152898116602483015288919084169063dd62ed3e90604401602060405180830381865afa158015610e26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4a9190611522565b10610e56575050610e7e565b8060405162461bcd60e51b81526004016102b8919061153b565b505b3d6000803e3d6000fd5b505b50505050505050565b6001600160a01b038316610edd5760405162461bcd60e51b815260206004820152601960248201527f43616e6e6f742073656e6420746f20616464726573732830290000000000000060448201526064016102b8565b80600003610f265760405162461bcd60e51b815260206004820152601660248201527543616e6e6f7420726573637565203020746f6b656e7360501b60448201526064016102b8565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526024820183905283919082169063a9059cbb906044016020604051808303816000875af1158015610f78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9c91906112d1565b610fdf5760405162461bcd60e51b815260206004820152601460248201527314995cd8dd59481d1bdad95b9cc819985a5b195960621b60448201526064016102b8565b826001600160a01b0316846001600160a01b03167f77023e19c7343ad491fd706c36335ca0e738340a91f29b1fd81e2673d44896c48460405161102491815260200190565b60405180910390a350505050565b60006110518888888888886000015189602001518a604001518a61105d565b98975050505050505050565b6000808a6001600160a01b031663679b6ded898c8a8a8e8f8c8c8c6040518a63ffffffff1660e01b815260040161109b98979695949392919061154e565b60206040518083038185885af11580156110b9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110de9190611522565b9050808a6001600160a01b03168a6001600160a01b03167fc1d1490cf25c3b40d600dfb27c7680340ed1ab901b7e8f3551280968a3b372b086604051611124919061153b565b60405180910390a49a9950505050505050505050565b80356001600160a01b038116811461115157600080fd5b919050565b60006020828403121561116857600080fd5b6111718261113a565b9392505050565b600080600080600060a0868803121561119057600080fd5b6111998661113a565b97602087013597506040870135966060810135965060800135945092505050565b60008060008060008060008060006101208a8c0312156111d957600080fd5b6111e28a61113a565b985060208a0135975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a013560ff8116811461121b57600080fd5b8093505060e08a013591506101008a013590509295985092959850929598565b60008060006060848603121561125057600080fd5b6112598461113a565b92506112676020850161113a565b9150604084013590509250925092565b60208082526016908201527513db9b1e4811dbdd995c9b9bdc8818d85b8818d85b1b60521b604082015260600190565b60208082526010908201526f064657374696e6174696f6e20213d20360841b604082015260600190565b6000602082840312156112e357600080fd5b8151801515811461117157600080fd5b60005b8381101561130e5781810151838201526020016112f6565b50506000910152565b6000815180845261132f8160208601602086016112f3565b601f01601f19169290920160200192915050565b82815260406020820152600061135c6040830184611317565b949350505050565b600060018060a01b03808916835280881660208401525085604083015284606083015283608083015260c060a083015261105160c0830184611317565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff811182821017156113dd576113dd6113a1565b6040525050565b6000602082840312156113f657600080fd5b815167ffffffffffffffff8082111561140e57600080fd5b818401915084601f83011261142257600080fd5b815181811115611434576114346113a1565b604051915061144d601f8201601f1916602001836113b7565b80825285602082850101111561146257600080fd5b6114738160208401602086016112f3565b50949350505050565b600060033d11156114955760046000803e5060005160e01c5b90565b600060443d10156114a65790565b6040516003193d81016004833e81513d67ffffffffffffffff81602484011181841117156114d657505050505090565b82850191508151818111156114ee5750505050505090565b843d87010160208285010111156115085750505050505090565b611517602082860101876113b7565b509095945050505050565b60006020828403121561153457600080fd5b5051919050565b6020815260006111716020830184611317565b600061010060018060a01b03808c1684528a602085015289604085015280891660608501528088166080850152508560a08401528460c08401528060e084015261159a81840185611317565b9b9a505050505050505050505056fea2646970667358221220abb7e53d45d43f822ea7d7c66384466044e5423732754908967b62060b4c1cc364736f6c6343000810003300000000000000000000000001cdc91b0a9ba741903aa3699bf4ce31d6c5cc060000000000000000000000001b07d3344188908fb6deceac381f3ee63c48477a000000000000000000000000c944e90c64b2c07662a292be6244bdf05cda44a700000000000000000000000074db79268e63302d3fc69fb5a7627f7454a417320000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f
Deployed Bytecode
0x6080604052600436106100dd5760003560e01c8063b58a9b481161007f578063de0ab13611610059578063de0ab1361461021b578063e3056a341461022e578063f2fde38b1461024e578063fb0e722b1461026e57600080fd5b8063b58a9b48146101d5578063cd232158146101e8578063cea9d26f146101fb57600080fd5b806368f333ab116100bb57806368f333ab1461016057806375d2bc491461018057806379ba5097146101a0578063a84ce98c146101b557600080fd5b80630c340a24146100e25780632d49266b1461011e5780634269f81714610140575b600080fd5b3480156100ee57600080fd5b50600054610102906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b34801561012a57600080fd5b5061013e610139366004611156565b61028e565b005b34801561014c57600080fd5b50600354610102906001600160a01b031681565b34801561016c57600080fd5b5061013e61017b366004611156565b6102cd565b34801561018c57600080fd5b5061013e61019b366004611156565b610300565b3480156101ac57600080fd5b5061013e610333565b3480156101c157600080fd5b50600254610102906001600160a01b031681565b61013e6101e3366004611178565b61043a565b61013e6101f63660046111ba565b6104bc565b34801561020757600080fd5b5061013e61021636600461123b565b6105a9565b61013e610229366004611178565b6105e3565b34801561023a57600080fd5b50600154610102906001600160a01b031681565b34801561025a57600080fd5b5061013e610269366004611156565b6107cd565b34801561027a57600080fd5b50600454610102906001600160a01b031681565b6000546001600160a01b031633146102c15760405162461bcd60e51b81526004016102b890611277565b60405180910390fd5b6102ca81610896565b50565b6000546001600160a01b031633146102f75760405162461bcd60e51b81526004016102b890611277565b6102ca81610941565b6000546001600160a01b0316331461032a5760405162461bcd60e51b81526004016102b890611277565b6102ca816109e5565b6001546001600160a01b03161580159061035757506001546001600160a01b031633145b6103a35760405162461bcd60e51b815260206004820152601f60248201527f43616c6c6572206d7573742062652070656e64696e6720676f7665726e6f720060448201526064016102b8565b60008054600180546001600160a01b038082166001600160a01b0319808616821787559092169092556040519190921692829184917f0ac6deed30eef60090c749850e10f2fa469e3e25fec1d1bef2853003f6e6f18f91a36001546040516001600160a01b03918216918316907f76563ad561b7036ae716b9b25cb521b21463240f104c97e12f25877f2235f33d90600090a35050565b836000036104815760405162461bcd60e51b815260206004820152601460248201527304d75737420616464206d6f7265207468616e20360641b60448201526064016102b8565b6001600160a01b0385166104a75760405162461bcd60e51b81526004016102b8906112a7565b6104b5338686868686610a89565b5050505050565b876000036105035760405162461bcd60e51b815260206004820152601460248201527304d75737420616464206d6f7265207468616e20360641b60448201526064016102b8565b6001600160a01b0389166105295760405162461bcd60e51b81526004016102b8906112a7565b6001600160a01b03891633146105815760405162461bcd60e51b815260206004820152601a60248201527f4f6e6c7920746f6b656e73206f776e65722063616e2063616c6c00000000000060448201526064016102b8565b61059089308a87878787610d06565b61059e898a8a8a8a8a610a89565b505050505050505050565b6000546001600160a01b031633146105d35760405162461bcd60e51b81526004016102b890611277565b6105de838383610e87565b505050565b836000036106335760405162461bcd60e51b815260206004820152601760248201527f4d7573742072656d6f7665206d6f7265207468616e203000000000000000000060448201526064016102b8565b6001600160a01b0385166106595760405162461bcd60e51b81526004016102b8906112a7565b336001600160a01b038616036106a95760405162461bcd60e51b81526020600482015260156024820152743232b9ba34b730ba34b7b710109e9039b2b73232b960591b60448201526064016102b8565b604080513360248201526001600160a01b038716604482015260648082018790528251808303909101815260849091019091526020810180516001600160e01b03166323d7fab960e01b17905260008290036107475760405162461bcd60e51b815260206004820152601b60248201527f5375626d697373696f6e20636f7374206d757374206265203e2030000000000060448201526064016102b8565b6040805160608101825283815260208101869052908101849052600454600354610783916001600160a01b039081169116893460008688611032565b506040518681526001600160a01b0388169033907f6784bfe2c1ede7056abac08b6c387cfb91bdd22c2536b1f96eea73533bcd50fd9060200160405180910390a350505050505050565b6000546001600160a01b031633146107f75760405162461bcd60e51b81526004016102b890611277565b6001600160a01b0381166108445760405162461bcd60e51b815260206004820152601460248201527311dbdd995c9b9bdc881b5d5cdd081899481cd95d60621b60448201526064016102b8565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f76563ad561b7036ae716b9b25cb521b21463240f104c97e12f25877f2235f33d90600090a35050565b6001600160a01b0381166108ec5760405162461bcd60e51b815260206004820152601960248201527f4c322042696c6c696e672063616e6e6f74206265207a65726f0000000000000060448201526064016102b8565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fb2a92a51a1545e6e9a12017a0fb3247a80d940bc6893199d406de4fd25471c93906020015b60405180910390a150565b6001600160a01b0381166109975760405162461bcd60e51b815260206004820152601c60248201527f4c3120546f6b656e20476174657761792063616e6e6f7420626520300000000060448201526064016102b8565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fbe3a9b49d9937fc888cad6d83a72afda07361ab8410f77399742192bdca700b890602001610936565b6001600160a01b038116610a3b5760405162461bcd60e51b815260206004820152601d60248201527f417262697472756d20496e626f782063616e6e6f74206265207a65726f00000060448201526064016102b8565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f3f4c461dbcecb7ee7efeccbaba3afde0d787d77bcd9de5bcd3e2923ab3db114390602001610936565b6040516323b872dd60e01b81526001600160a01b038781166004830152306024830152604482018690527f000000000000000000000000c944e90c64b2c07662a292be6244bdf05cda44a716906323b872dd906064016020604051808303816000875af1158015610afe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2291906112d1565b50604080516001600160a01b038716602082015260009101604051602081830303815290604052905060008282604051602001610b60929190611343565b60408051808303601f190181529082905260025463095ea7b360e01b83526001600160a01b039081166004840152602483018990529092507f000000000000000000000000c944e90c64b2c07662a292be6244bdf05cda44a7169063095ea7b3906044016020604051808303816000875af1158015610be3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0791906112d1565b5060025460035460405163d2ce7d6560e01b81526001600160a01b039283169263d2ce7d65923492610c67927f000000000000000000000000c944e90c64b2c07662a292be6244bdf05cda44a79216908c908c908c908a90600401611364565b60006040518083038185885af1158015610c85573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052610cae91908101906113e4565b50866001600160a01b0316886001600160a01b03167f92cccee5b7ea5d151ce671f56503713c0bcd59050858f49c8db6fc7913b4b73888604051610cf491815260200190565b60405180910390a35050505050505050565b60405163d505accf60e01b81526001600160a01b0388811660048301528781166024830152604482018790526064820186905260ff8516608483015260a4820184905260c482018390527f000000000000000000000000c944e90c64b2c07662a292be6244bdf05cda44a7919082169063d505accf9060e401600060405180830381600087803b158015610d9957600080fd5b505af1925050508015610daa575060015b610e7c57610db661147c565b806308c379a003610e705750610dca611498565b80610dd55750610e72565b604051636eb1769f60e11b81526001600160a01b038a81166004830152898116602483015288919084169063dd62ed3e90604401602060405180830381865afa158015610e26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4a9190611522565b10610e56575050610e7e565b8060405162461bcd60e51b81526004016102b8919061153b565b505b3d6000803e3d6000fd5b505b50505050505050565b6001600160a01b038316610edd5760405162461bcd60e51b815260206004820152601960248201527f43616e6e6f742073656e6420746f20616464726573732830290000000000000060448201526064016102b8565b80600003610f265760405162461bcd60e51b815260206004820152601660248201527543616e6e6f7420726573637565203020746f6b656e7360501b60448201526064016102b8565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526024820183905283919082169063a9059cbb906044016020604051808303816000875af1158015610f78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9c91906112d1565b610fdf5760405162461bcd60e51b815260206004820152601460248201527314995cd8dd59481d1bdad95b9cc819985a5b195960621b60448201526064016102b8565b826001600160a01b0316846001600160a01b03167f77023e19c7343ad491fd706c36335ca0e738340a91f29b1fd81e2673d44896c48460405161102491815260200190565b60405180910390a350505050565b60006110518888888888886000015189602001518a604001518a61105d565b98975050505050505050565b6000808a6001600160a01b031663679b6ded898c8a8a8e8f8c8c8c6040518a63ffffffff1660e01b815260040161109b98979695949392919061154e565b60206040518083038185885af11580156110b9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110de9190611522565b9050808a6001600160a01b03168a6001600160a01b03167fc1d1490cf25c3b40d600dfb27c7680340ed1ab901b7e8f3551280968a3b372b086604051611124919061153b565b60405180910390a49a9950505050505050505050565b80356001600160a01b038116811461115157600080fd5b919050565b60006020828403121561116857600080fd5b6111718261113a565b9392505050565b600080600080600060a0868803121561119057600080fd5b6111998661113a565b97602087013597506040870135966060810135965060800135945092505050565b60008060008060008060008060006101208a8c0312156111d957600080fd5b6111e28a61113a565b985060208a0135975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a013560ff8116811461121b57600080fd5b8093505060e08a013591506101008a013590509295985092959850929598565b60008060006060848603121561125057600080fd5b6112598461113a565b92506112676020850161113a565b9150604084013590509250925092565b60208082526016908201527513db9b1e4811dbdd995c9b9bdc8818d85b8818d85b1b60521b604082015260600190565b60208082526010908201526f064657374696e6174696f6e20213d20360841b604082015260600190565b6000602082840312156112e357600080fd5b8151801515811461117157600080fd5b60005b8381101561130e5781810151838201526020016112f6565b50506000910152565b6000815180845261132f8160208601602086016112f3565b601f01601f19169290920160200192915050565b82815260406020820152600061135c6040830184611317565b949350505050565b600060018060a01b03808916835280881660208401525085604083015284606083015283608083015260c060a083015261105160c0830184611317565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff811182821017156113dd576113dd6113a1565b6040525050565b6000602082840312156113f657600080fd5b815167ffffffffffffffff8082111561140e57600080fd5b818401915084601f83011261142257600080fd5b815181811115611434576114346113a1565b604051915061144d601f8201601f1916602001836113b7565b80825285602082850101111561146257600080fd5b6114738160208401602086016112f3565b50949350505050565b600060033d11156114955760046000803e5060005160e01c5b90565b600060443d10156114a65790565b6040516003193d81016004833e81513d67ffffffffffffffff81602484011181841117156114d657505050505090565b82850191508151818111156114ee5750505050505090565b843d87010160208285010111156115085750505050505090565b611517602082860101876113b7565b509095945050505050565b60006020828403121561153457600080fd5b5051919050565b6020815260006111716020830184611317565b600061010060018060a01b03808c1684528a602085015289604085015280891660608501528088166080850152508560a08401528460c08401528060e084015261159a81840185611317565b9b9a505050505050505050505056fea2646970667358221220abb7e53d45d43f822ea7d7c66384466044e5423732754908967b62060b4c1cc364736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000001cdc91b0a9ba741903aa3699bf4ce31d6c5cc060000000000000000000000001b07d3344188908fb6deceac381f3ee63c48477a000000000000000000000000c944e90c64b2c07662a292be6244bdf05cda44a700000000000000000000000074db79268e63302d3fc69fb5a7627f7454a417320000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f
-----Decoded View---------------
Arg [0] : _l1TokenGateway (address): 0x01cDC91B0A9bA741903aA3699BF4CE31d6C5cC06
Arg [1] : _l2Billing (address): 0x1B07D3344188908Fb6DEcEac381f3eE63C48477a
Arg [2] : _token (address): 0xc944E90C64B2c07662A292be6244BDf05Cda44a7
Arg [3] : _governor (address): 0x74Db79268e63302d3FC69FB5a7627F7454a41732
Arg [4] : _inbox (address): 0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000001cdc91b0a9ba741903aa3699bf4ce31d6c5cc06
Arg [1] : 0000000000000000000000001b07d3344188908fb6deceac381f3ee63c48477a
Arg [2] : 000000000000000000000000c944e90c64b2c07662a292be6244bdf05cda44a7
Arg [3] : 00000000000000000000000074db79268e63302d3fc69fb5a7627f7454a41732
Arg [4] : 0000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f
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.