* 4.6.0-rc.0 * Fix release script to only release @openzeppelin/contracts (cherry picked from commit2bd75a44bb) * make ERC2981:royaltyInfo public (#3305) (cherry picked from commitd2832ca7a9) Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com> * add transpilation guards to the crosschain mocks (#3306) (cherry picked from commit9af5af8fff) Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com> * Fix tests on upgradeable contracts after transpilation (cherry picked from commit0762479dd5) Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com> * Remove unused constructor argument (cherry picked from commit69c3781043) Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com> * Bump minimum Solidity version for Initializable.sol to 0.8.2 (#3328) (cherry picked from commitcb14ea3c5c) * Fix update-comment script to ignore invalid tags (cherry picked from commit848fef5b6c) Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com> * 4.6.0 Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
100 lines
3.9 KiB
Solidity
100 lines
3.9 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
// OpenZeppelin Contracts (last updated v4.6.0) (vendor/arbitrum/IArbSys.sol)
|
|
pragma solidity >=0.4.21 <0.9.0;
|
|
|
|
/**
|
|
* @title Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064. Exposes a variety of system-level functionality.
|
|
*/
|
|
interface IArbSys {
|
|
/**
|
|
* @notice Get internal version number identifying an ArbOS build
|
|
* @return version number as int
|
|
*/
|
|
function arbOSVersion() external pure returns (uint256);
|
|
|
|
function arbChainID() external view returns (uint256);
|
|
|
|
/**
|
|
* @notice Get Arbitrum block number (distinct from L1 block number; Arbitrum genesis block has block number 0)
|
|
* @return block number as int
|
|
*/
|
|
function arbBlockNumber() external view returns (uint256);
|
|
|
|
/**
|
|
* @notice Send given amount of Eth to dest from sender.
|
|
* This is a convenience function, which is equivalent to calling sendTxToL1 with empty calldataForL1.
|
|
* @param destination recipient address on L1
|
|
* @return unique identifier for this L2-to-L1 transaction.
|
|
*/
|
|
function withdrawEth(address destination) external payable returns (uint256);
|
|
|
|
/**
|
|
* @notice Send a transaction to L1
|
|
* @param destination recipient address on L1
|
|
* @param calldataForL1 (optional) calldata for L1 contract call
|
|
* @return a unique identifier for this L2-to-L1 transaction.
|
|
*/
|
|
function sendTxToL1(address destination, bytes calldata calldataForL1) external payable returns (uint256);
|
|
|
|
/**
|
|
* @notice get the number of transactions issued by the given external account or the account sequence number of the given contract
|
|
* @param account target account
|
|
* @return the number of transactions issued by the given external account or the account sequence number of the given contract
|
|
*/
|
|
function getTransactionCount(address account) external view returns (uint256);
|
|
|
|
/**
|
|
* @notice get the value of target L2 storage slot
|
|
* This function is only callable from address 0 to prevent contracts from being able to call it
|
|
* @param account target account
|
|
* @param index target index of storage slot
|
|
* @return stotage value for the given account at the given index
|
|
*/
|
|
function getStorageAt(address account, uint256 index) external view returns (uint256);
|
|
|
|
/**
|
|
* @notice check if current call is coming from l1
|
|
* @return true if the caller of this was called directly from L1
|
|
*/
|
|
function isTopLevelCall() external view returns (bool);
|
|
|
|
/**
|
|
* @notice check if the caller (of this caller of this) is an aliased L1 contract address
|
|
* @return true iff the caller's address is an alias for an L1 contract address
|
|
*/
|
|
function wasMyCallersAddressAliased() external view returns (bool);
|
|
|
|
/**
|
|
* @notice return the address of the caller (of this caller of this), without applying L1 contract address aliasing
|
|
* @return address of the caller's caller, without applying L1 contract address aliasing
|
|
*/
|
|
function myCallersAddressWithoutAliasing() external view returns (address);
|
|
|
|
/**
|
|
* @notice map L1 sender contract address to its L2 alias
|
|
* @param sender sender address
|
|
* @param dest destination address
|
|
* @return aliased sender address
|
|
*/
|
|
function mapL1SenderContractAddressToL2Alias(address sender, address dest) external pure returns (address);
|
|
|
|
/**
|
|
* @notice get the caller's amount of available storage gas
|
|
* @return amount of storage gas available to the caller
|
|
*/
|
|
function getStorageGasAvailable() external view returns (uint256);
|
|
|
|
event L2ToL1Transaction(
|
|
address caller,
|
|
address indexed destination,
|
|
uint256 indexed uniqueId,
|
|
uint256 indexed batchNumber,
|
|
uint256 indexInBatch,
|
|
uint256 arbBlockNum,
|
|
uint256 ethBlockNum,
|
|
uint256 timestamp,
|
|
uint256 callvalue,
|
|
bytes data
|
|
);
|
|
}
|