Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
5068252 | 21 days ago | Contract Creation | 0 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
BridgedStandardERC20
Compiler Version
v0.8.24-1.0.1
ZkSolc Version
v1.5.7
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol"; import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; import {ERC1967Upgrade} from "@openzeppelin/contracts-v4/proxy/ERC1967/ERC1967Upgrade.sol"; import {IBridgedStandardToken} from "./interfaces/IBridgedStandardToken.sol"; import {Unauthorized, NonSequentialVersion, ZeroAddress} from "../common/L1ContractErrors.sol"; import {L2_NATIVE_TOKEN_VAULT_ADDR} from "../common/L2ContractAddresses.sol"; import {DataEncoding} from "../common/libraries/DataEncoding.sol"; import {INativeTokenVault} from "../bridge/ntv/INativeTokenVault.sol"; /// @author Matter Labs /// @custom:security-contact [email protected] /// @notice The ERC20 token implementation, that is used in the "default" ERC20 bridge. Note, that it does not /// support any custom token logic, i.e. rebase tokens' functionality is not supported. contract BridgedStandardERC20 is ERC20PermitUpgradeable, IBridgedStandardToken, ERC1967Upgrade { /// @dev Describes whether there is a specific getter in the token. /// @notice Used to explicitly separate which getters the token has and which it does not. /// @notice Different tokens in L1 can implement or not implement getter function as `name`/`symbol`/`decimals`, /// @notice Our goal is to store all the getters that L1 token implements, and for others, we keep it as an unimplemented method. struct ERC20Getters { bool ignoreName; bool ignoreSymbol; bool ignoreDecimals; } ERC20Getters private availableGetters; /// @dev The decimals of the token, that are used as a value for `decimals` getter function. /// @notice A private variable is used only for decimals, but not for `name` and `symbol`, because standard /// @notice OpenZeppelin token represents `name` and `symbol` as storage variables and `decimals` as constant. uint8 private decimals_; /// @notice The l2Bridge now is deprecated, use the L2AssetRouter and L2NativeTokenVault instead. /// @dev Address of the L2 bridge that is used as trustee who can mint/burn tokens address public override l2Bridge; /// @dev Address of the token on its origin chain that can be deposited to mint this bridged token address public override originToken; /// @dev Address of the native token vault that is used as trustee who can mint/burn tokens address public nativeTokenVault; /// @dev The assetId of the token. bytes32 public assetId; /// @dev This also sets the native token vault to the default value if it is not set. /// It is not set only on the L2s for legacy tokens. modifier onlyNTV() { address ntv = nativeTokenVault; if (ntv == address(0)) { ntv = L2_NATIVE_TOKEN_VAULT_ADDR; nativeTokenVault = L2_NATIVE_TOKEN_VAULT_ADDR; assetId = DataEncoding.encodeNTVAssetId( INativeTokenVault(L2_NATIVE_TOKEN_VAULT_ADDR).L1_CHAIN_ID(), originToken ); } if (msg.sender != ntv) { revert Unauthorized(msg.sender); } _; } modifier onlyNextVersion(uint8 _version) { // The version should be incremented by 1. Otherwise, the governor risks disabling // future reinitialization of the token by providing too large a version. if (_version != _getInitializedVersion() + 1) { revert NonSequentialVersion(); } _; } /// @dev Contract is expected to be used as proxy implementation. constructor() { // Disable initialization to prevent Parity hack. _disableInitializers(); } /// @notice Initializes a contract token for later use. Expected to be used in the proxy. /// @dev Stores the L1 address of the bridge and set `name`/`symbol`/`decimals` getters that L1 token has. /// @param _assetId The assetId of the token. /// @param _originToken Address of the origin token that can be deposited to mint this bridged token /// @param _data The additional data that the L1 bridge provide for initialization. /// In this case, it is packed `name`/`symbol`/`decimals` of the L1 token. function bridgeInitialize(bytes32 _assetId, address _originToken, bytes calldata _data) external initializer { if (_originToken == address(0)) { revert ZeroAddress(); } originToken = _originToken; assetId = _assetId; nativeTokenVault = msg.sender; bytes memory nameBytes; bytes memory symbolBytes; bytes memory decimalsBytes; // We parse the data exactly as they were created on the L1 bridge // slither-disable-next-line unused-return (, nameBytes, symbolBytes, decimalsBytes) = DataEncoding.decodeTokenData(_data); ERC20Getters memory getters; string memory decodedName; string memory decodedSymbol; // L1 bridge didn't check if the L1 token return values with proper types for `name`/`symbol`/`decimals` // That's why we need to try to decode them, and if it works out, set the values as getters. // NOTE: Solidity doesn't have a convenient way to try to decode a value: // - Decode them manually, i.e. write a function that will validate that data in the correct format // and return decoded value and a boolean value - whether it was possible to decode. // - Use the standard abi.decode method, but wrap it into an external call in which error can be handled. // We use the second option here. try this.decodeString(nameBytes) returns (string memory nameString) { decodedName = nameString; } catch { getters.ignoreName = true; } try this.decodeString(symbolBytes) returns (string memory symbolString) { decodedSymbol = symbolString; } catch { getters.ignoreSymbol = true; } // Set decoded values for name and symbol. __ERC20_init_unchained(decodedName, decodedSymbol); // Set the name for EIP-712 signature. __ERC20Permit_init(decodedName); try this.decodeUint8(decimalsBytes) returns (uint8 decimalsUint8) { // Set decoded value for decimals. decimals_ = decimalsUint8; } catch { getters.ignoreDecimals = true; } availableGetters = getters; emit BridgeInitialize(_originToken, decodedName, decodedSymbol, decimals_); } /// @notice A method to be called by the governor to update the token's metadata. /// @param _availableGetters The getters that the token has. /// @param _newName The new name of the token. /// @param _newSymbol The new symbol of the token. /// @param _version The version of the token that will be initialized. /// @dev The _version must be exactly the version higher by 1 than the current version. This is needed /// to ensure that the governor can not accidentally disable future reinitialization of the token. function reinitializeToken( ERC20Getters calldata _availableGetters, string calldata _newName, string calldata _newSymbol, uint8 _version ) external onlyNextVersion(_version) reinitializer(_version) { // It is expected that this token is deployed as a beacon proxy, so we'll // allow the governor of the beacon to reinitialize the token. address beaconAddress = _getBeacon(); if (msg.sender != UpgradeableBeacon(beaconAddress).owner()) { revert Unauthorized(msg.sender); } __ERC20_init_unchained(_newName, _newSymbol); __ERC20Permit_init(_newName); availableGetters = _availableGetters; emit BridgeInitialize(originToken, _newName, _newSymbol, decimals_); } /// @dev Mint tokens to a given account. /// @param _to The account that will receive the created tokens. /// @param _amount The amount that will be created. /// @notice Should be called by bridge after depositing tokens from L1. function bridgeMint(address _to, uint256 _amount) external override onlyNTV { _mint(_to, _amount); emit BridgeMint(_to, _amount); } /// @dev Burn tokens from a given account. /// @param _from The account from which tokens will be burned. /// @param _amount The amount that will be burned. /// @notice Should be called by bridge before withdrawing tokens to L1. function bridgeBurn(address _from, uint256 _amount) external override onlyNTV { _burn(_from, _amount); emit BridgeBurn(_from, _amount); } /// @dev External function to decode a string from bytes. function decodeString(bytes calldata _input) external pure returns (string memory result) { (result) = abi.decode(_input, (string)); } /// @dev External function to decode a uint8 from bytes. function decodeUint8(bytes calldata _input) external pure returns (uint8 result) { (result) = abi.decode(_input, (uint8)); } function name() public view override returns (string memory) { // If method is not available, behave like a token that does not implement this method - revert on call. // solhint-disable-next-line reason-string, gas-custom-errors if (availableGetters.ignoreName) revert(); return super.name(); } function symbol() public view override returns (string memory) { // If method is not available, behave like a token that does not implement this method - revert on call. // solhint-disable-next-line reason-string, gas-custom-errors if (availableGetters.ignoreSymbol) revert(); return super.symbol(); } function decimals() public view override returns (uint8) { // If method is not available, behave like a token that does not implement this method - revert on call. // solhint-disable-next-line reason-string, gas-custom-errors if (availableGetters.ignoreDecimals) revert(); return decimals_; } /*////////////////////////////////////////////////////////////// LEGACY FUNCTIONS //////////////////////////////////////////////////////////////*/ /// @notice Returns the address of the token on its native chain. /// Legacy for the l2 bridge. function l1Address() public view override returns (address) { return originToken; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/draft-ERC20Permit.sol) pragma solidity ^0.8.0; // EIP-2612 is Final as of 2022-11-01. This file is deprecated. import "./ERC20PermitUpgradeable.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol) pragma solidity ^0.8.0; import "./IBeacon.sol"; import "../../access/Ownable.sol"; import "../../utils/Address.sol"; /** * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their * implementation contract, which is where they will delegate all function calls. * * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon. */ contract UpgradeableBeacon is IBeacon, Ownable { address private _implementation; /** * @dev Emitted when the implementation returned by the beacon is changed. */ event Upgraded(address indexed implementation); /** * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the * beacon. */ constructor(address implementation_) { _setImplementation(implementation_); } /** * @dev Returns the current implementation address. */ function implementation() public view virtual override returns (address) { return _implementation; } /** * @dev Upgrades the beacon to a new implementation. * * Emits an {Upgraded} event. * * Requirements: * * - msg.sender must be the owner of the contract. * - `newImplementation` must be a contract. */ function upgradeTo(address newImplementation) public virtual onlyOwner { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation contract address for this beacon * * Requirements: * * - `newImplementation` must be a contract. */ function _setImplementation(address newImplementation) private { require(Address.isContract(newImplementation), "UpgradeableBeacon: implementation is not a contract"); _implementation = newImplementation; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeacon.sol"; import "../../interfaces/IERC1967.sol"; import "../../interfaces/draft-IERC1822.sol"; import "../../utils/Address.sol"; import "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ */ abstract contract ERC1967Upgrade is IERC1967 { // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( Address.isContract(IBeacon(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } } }
// SPDX-License-Identifier: MIT // We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. pragma solidity ^0.8.20; interface IBridgedStandardToken { event BridgeInitialize(address indexed l1Token, string name, string symbol, uint8 decimals); event BridgeMint(address indexed account, uint256 amount); event BridgeBurn(address indexed account, uint256 amount); function bridgeMint(address _account, uint256 _amount) external; function bridgeBurn(address _account, uint256 _amount) external; function l1Address() external view returns (address); function originToken() external view returns (address); function l2Bridge() external view returns (address); function assetId() external view returns (bytes32); function nativeTokenVault() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; // 0x5ecf2d7a error AccessToFallbackDenied(address target, address invoker); // 0x3995f750 error AccessToFunctionDenied(address target, bytes4 selector, address invoker); // 0x6c167909 error OnlySelfAllowed(); // 0x52e22c98 error RestrictionWasNotPresent(address restriction); // 0xf126e113 error RestrictionWasAlreadyPresent(address restriction); // 0x3331e9c0 error CallNotAllowed(bytes call); // 0xf6fd7071 error RemovingPermanentRestriction(); // 0xfcb9b2e1 error UnallowedImplementation(bytes32 implementationHash); // 0x1ff9d522 error AddressAlreadyUsed(address addr); // 0x0dfb42bf error AddressAlreadySet(address addr); // 0x86bb51b8 error AddressHasNoCode(address); // 0x1f73225f error AddressMismatch(address expected, address supplied); // 0x5e85ae73 error AmountMustBeGreaterThanZero(); // 0xfde974f4 error AssetHandlerDoesNotExist(bytes32 assetId); // 0x1294e9e1 error AssetIdMismatch(bytes32 expected, bytes32 supplied); // 0xfe919e28 error AssetIdAlreadyRegistered(); // 0x0bfcef28 error AlreadyWhitelisted(address); // 0x04a0b7e9 error AssetIdNotSupported(bytes32 assetId); // 0x6ef9a972 error BaseTokenGasPriceDenominatorNotSet(); // 0x55ad3fd3 error BatchHashMismatch(bytes32 expected, bytes32 actual); // 0x2078a6a0 error BatchNotExecuted(uint256 batchNumber); // 0xbd4455ff error BatchNumberMismatch(uint256 expectedBatchNumber, uint256 providedBatchNumber); // 0x6cf12312 error BridgeHubAlreadyRegistered(); // 0xdb538614 error BridgeMintNotImplemented(); // 0xe85392f9 error CanOnlyProcessOneBatch(); // 0x00c6ead2 error CantExecuteUnprovenBatches(); // 0xe18cb383 error CantRevertExecutedBatch(); // 0x24591d89 error ChainIdAlreadyExists(); // 0x717a1656 error ChainIdCantBeCurrentChain(); // 0xa179f8c9 error ChainIdMismatch(); // 0x23f3c357 error ChainIdNotRegistered(uint256 chainId); // 0x8f620a06 error ChainIdTooBig(); // 0xf7a01e4d error DelegateCallFailed(bytes returnData); // 0x0a8ed92c error DenominatorIsZero(); // 0xb4f54111 error DeployFailed(); // 0x138ee1a3 error DeployingBridgedTokenForNativeToken(); // 0xc7c9660f error DepositDoesNotExist(); // 0xad2fa98e error DepositExists(); // 0x0e7ee319 error DiamondAlreadyFrozen(); // 0xa7151b9a error DiamondNotFrozen(); // 0x7138356f error EmptyAddress(); // 0x2d4d012f error EmptyAssetId(); // 0x1c25715b error EmptyBytes32(); // 0x95b66fe9 error EmptyDeposit(); // 0x627e0872 error ETHDepositNotSupported(); // 0xac4a3f98 error FacetExists(bytes4 selector, address); // 0xc91cf3b1 error GasPerPubdataMismatch(); // 0x6d4a7df8 error GenesisBatchCommitmentZero(); // 0x7940c83f error GenesisBatchHashZero(); // 0xb4fc6835 error GenesisIndexStorageZero(); // 0x3a1a8589 error GenesisUpgradeZero(); // 0xd356e6ba error HashedLogIsDefault(); // 0x0b08d5be error HashMismatch(bytes32 expected, bytes32 actual); // 0x601b6882 error ZKChainLimitReached(); // 0xdd381a4c error IncorrectBridgeHubAddress(address bridgehub); // 0x826fb11e error InsufficientChainBalance(); // 0xcbd9d2e0 error InvalidCaller(address); // 0x4fbe5dba error InvalidDelay(); // 0xc1780bd6 error InvalidLogSender(address sender, uint256 logKey); // 0xd8e9405c error InvalidNumberOfBlobs(uint256 expected, uint256 numCommitments, uint256 numHashes); // 0x09bde339 error InvalidProof(); // 0x5428eae7 error InvalidProtocolVersion(); // 0x5513177c error InvalidPubdataHash(bytes32 expectedHash, bytes32 provided); // 0x6f1cf752 error InvalidPubdataPricingMode(); // 0x12ba286f error InvalidSelector(bytes4 func); // 0x5cb29523 error InvalidTxType(uint256 txType); // 0x0214acb6 error InvalidUpgradeTxn(UpgradeTxVerifyParam); // 0xfb5c22e6 error L2TimestampTooBig(); // 0xd2c011d6 error L2UpgradeNonceNotEqualToNewProtocolVersion(uint256 nonce, uint256 protocolVersion); // 0x97e1359e error L2WithdrawalMessageWrongLength(uint256 messageLen); // 0xe37d2c02 error LengthIsNotDivisibleBy32(uint256 length); // 0x1b6825bb error LogAlreadyProcessed(uint8); // 0xcea34703 error MalformedBytecode(BytecodeError); // 0x9bb54c35 error MerkleIndexOutOfBounds(); // 0x8e23ac1a error MerklePathEmpty(); // 0x1c500385 error MerklePathOutOfBounds(); // 0x3312a450 error MigrationPaused(); // 0xfa44b527 error MissingSystemLogs(uint256 expected, uint256 actual); // 0x4a094431 error MsgValueMismatch(uint256 expectedMsgValue, uint256 providedMsgValue); // 0xb385a3da error MsgValueTooLow(uint256 required, uint256 provided); // 0x72ea85ad error NewProtocolMajorVersionNotZero(); // 0x79cc2d22 error NoCallsProvided(); // 0xa6fef710 error NoFunctionsForDiamondCut(); // 0xcab098d8 error NoFundsTransferred(); // 0xc21b1ab7 error NonEmptyCalldata(); // 0x536ec84b error NonEmptyMsgValue(); // 0xd018e08e error NonIncreasingTimestamp(); // 0x0105f9c0 error NonSequentialBatch(); // 0x0ac76f01 error NonSequentialVersion(); // 0xdd629f86 error NotEnoughGas(); // 0xdd7e3621 error NotInitializedReentrancyGuard(); // 0xdf17e316 error NotWhitelisted(address); // 0xf3ed9dfa error OnlyEraSupported(); // 0x1a21feed error OperationExists(); // 0xeda2fbb1 error OperationMustBePending(); // 0xe1c1ff37 error OperationMustBeReady(); // 0xb926450e error OriginChainIdNotFound(); // 0xd7f50a9d error PatchCantSetUpgradeTxn(); // 0x962fd7d0 error PatchUpgradeCantSetBootloader(); // 0x559cc34e error PatchUpgradeCantSetDefaultAccount(); // 0x9b48e060 error PreviousOperationNotExecuted(); // 0x5c598b60 error PreviousProtocolMajorVersionNotZero(); // 0xa0f47245 error PreviousUpgradeNotCleaned(); // 0x101ba748 error PreviousUpgradeNotFinalized(bytes32 txHash); // 0xd5a99014 error PriorityOperationsRollingHashMismatch(); // 0x1a4d284a error PriorityTxPubdataExceedsMaxPubDataPerBatch(); // 0xa461f651 error ProtocolIdMismatch(uint256 expectedProtocolVersion, uint256 providedProtocolId); // 0x64f94ec2 error ProtocolIdNotGreater(); // 0xd328c12a error ProtocolVersionMinorDeltaTooBig(uint256 limit, uint256 proposed); // 0x88d7b498 error ProtocolVersionTooSmall(); // 0x53dee67b error PubdataCommitmentsEmpty(); // 0x959f26fb error PubdataGreaterThanLimit(uint256 limit, uint256 length); // 0x63c36549 error QueueIsEmpty(); // 0xab143c06 error Reentrancy(); // 0x667d17de error RemoveFunctionFacetAddressNotZero(address facet); // 0xa2d4b16c error RemoveFunctionFacetAddressZero(); // 0x3580370c error ReplaceFunctionFacetAddressZero(); // 0x9a67c1cb error RevertedBatchNotAfterNewLastBatch(); // 0xd3b6535b error SelectorsMustAllHaveSameFreezability(); // 0xd7a6b5e6 error SharedBridgeValueNotSet(SharedBridgeKey); // 0x856d5b77 error SharedBridgeNotSet(); // 0xdf3a8fdd error SlotOccupied(); // 0xec273439 error CTMAlreadyRegistered(); // 0xc630ef3c error CTMNotRegistered(); // 0xae43b424 error SystemLogsSizeTooBig(); // 0x08753982 error TimeNotReached(uint256 expectedTimestamp, uint256 actualTimestamp); // 0x2d50c33b error TimestampError(); // 0x06439c6b error TokenNotSupported(address token); // 0x23830e28 error TokensWithFeesNotSupported(); // 0x76da24b9 error TooManyFactoryDeps(); // 0xf0b4e88f error TooMuchGas(); // 0x00c5a6a9 error TransactionNotAllowed(); // 0x4c991078 error TxHashMismatch(); // 0x2e311df8 error TxnBodyGasLimitNotEnoughGas(); // 0x8e4a23d6 error Unauthorized(address caller); // 0xe52478c7 error UndefinedDiamondCutAction(); // 0x6aa39880 error UnexpectedSystemLog(uint256 logKey); // 0xf093c2e5 error UpgradeBatchNumberIsNotZero(); // 0x084a1449 error UnsupportedEncodingVersion(); // 0x47b3b145 error ValidateTxnNotEnoughGas(); // 0x626ade30 error ValueMismatch(uint256 expected, uint256 actual); // 0xe1022469 error VerifiedBatchesExceedsCommittedBatches(); // 0xae899454 error WithdrawalAlreadyFinalized(); // 0x750b219c error WithdrawFailed(); // 0x15e8e429 error WrongMagicValue(uint256 expectedMagicValue, uint256 providedMagicValue); // 0xd92e233d error ZeroAddress(); // 0xc84885d4 error ZeroChainId(); // 0x99d8fec9 error EmptyData(); // 0xf3dd1b9c error UnsupportedCommitBatchEncoding(uint8 version); // 0xf338f830 error UnsupportedProofBatchEncoding(uint8 version); // 0x14d2ed8a error UnsupportedExecuteBatchEncoding(uint8 version); // 0xd7d93e1f error IncorrectBatchBounds( uint256 processFromExpected, uint256 processToExpected, uint256 processFromProvided, uint256 processToProvided ); // 0x64107968 error AssetHandlerNotRegistered(bytes32 assetId); // 0x64846fe4 error NotARestriction(address addr); // 0xfa5cd00f error NotAllowed(address addr); // 0xccdd18d2 error BytecodeAlreadyPublished(bytes32 bytecodeHash); // 0x25d8333c error CallerNotTimerAdmin(); // 0x907f8e51 error DeadlineNotYetPassed(); // 0x6eef58d1 error NewDeadlineNotGreaterThanCurrent(); // 0x8b7e144a error NewDeadlineExceedsMaxDeadline(); // 0x2a5989a0 error AlreadyPermanentRollup(); // 0x92daded2 error InvalidDAForPermanentRollup(); // 0xd0266e26 error NotSettlementLayer(); // 0x7a4902ad error TimerAlreadyStarted(); // 0x09aa9830 error MerklePathLengthMismatch(uint256 pathLength, uint256 expectedLength); // 0xc33e6128 error MerkleNothingToProve(); // 0xafbb7a4e error MerkleIndexOrHeightMismatch(); // 0x1b582fcf error MerkleWrongIndex(uint256 index, uint256 maxNodeNumber); // 0x485cfcaa error MerkleWrongLength(uint256 newLeavesLength, uint256 leafNumber); // 0xce63ce17 error NoCTMForAssetId(bytes32 assetId); // 0x02181a13 error SettlementLayersMustSettleOnL1(); // 0x1850b46b error TokenNotLegacy(); // 0x1929b7de error IncorrectTokenAddressFromNTV(bytes32 assetId, address tokenAddress); // 0x48c5fa28 error InvalidProofLengthForFinalNode(); // 0x7acd7817 error TokenIsNotLegacy(); // 0xfade089a error LegacyEncodingUsedForNonL1Token(); // 0xa51fa558 error TokenIsLegacy(); // 0x29963361 error LegacyBridgeUsesNonNativeToken(); // 0x11832de8 error AssetRouterAllowanceNotZero(); // 0xaa5f6180 error BurningNativeWETHNotSupported(); // 0xb20b58ce error NoLegacySharedBridge(); // 0x8e3ce3cb error TooHighDeploymentNonce(); // 0x78d2ed02 error ChainAlreadyLive(); // 0x4e98b356 error MigrationsNotPaused(); // 0xf20c5c2a error WrappedBaseTokenAlreadyRegistered(); // 0xde4c0b96 error InvalidNTVBurnData(); // 0xbe7193d4 error InvalidSystemLogsLength(); // 0x8efef97a error LegacyBridgeNotSet(); // 0x767eed08 error LegacyMethodForNonL1Token(); enum SharedBridgeKey { PostUpgradeFirstBatch, LegacyBridgeFirstBatch, LegacyBridgeLastDepositBatch, LegacyBridgeLastDepositTxn } enum BytecodeError { Version, NumberOfWords, Length, WordsMustBeOdd } enum UpgradeTxVerifyParam { From, To, Paymaster, Value, MaxFeePerGas, MaxPriorityFeePerGas, Reserved0, Reserved1, Reserved2, Reserved3, Signature, PaymasterInput, ReservedDynamic }
// SPDX-License-Identifier: MIT // We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. pragma solidity ^0.8.21; /// @dev The formal address of the initial program of the system: the bootloader address constant L2_BOOTLOADER_ADDRESS = address(0x8001); /// @dev The address of the known code storage system contract address constant L2_KNOWN_CODE_STORAGE_SYSTEM_CONTRACT_ADDR = address(0x8004); /// @dev The address of the L2 deployer system contract. address constant L2_DEPLOYER_SYSTEM_CONTRACT_ADDR = address(0x8006); /// @dev The special reserved L2 address. It is located in the system contracts space but doesn't have deployed /// bytecode. /// @dev The L2 deployer system contract allows changing bytecodes on any address if the `msg.sender` is this address. /// @dev So, whenever the governor wants to redeploy system contracts, it just initiates the L1 upgrade call deployer /// system contract /// via the L1 -> L2 transaction with `sender == L2_FORCE_DEPLOYER_ADDR`. For more details see the /// `diamond-initializers` contracts. address constant L2_FORCE_DEPLOYER_ADDR = address(0x8007); /// @dev The address of the special smart contract that can send arbitrary length message as an L2 log address constant L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR = address(0x8008); /// @dev The address of the eth token system contract address constant L2_BASE_TOKEN_SYSTEM_CONTRACT_ADDR = address(0x800a); /// @dev The address of the context system contract address constant L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR = address(0x800b); /// @dev The address of the pubdata chunk publisher contract address constant L2_PUBDATA_CHUNK_PUBLISHER_ADDR = address(0x8011); /// @dev The address used to execute complex upgragedes, also used for the genesis upgrade address constant L2_COMPLEX_UPGRADER_ADDR = address(0x800f); /// @dev The address used to execute the genesis upgrade address constant L2_GENESIS_UPGRADE_ADDR = address(0x10001); /// @dev The address of the L2 bridge hub system contract, used to start L1->L2 transactions address constant L2_BRIDGEHUB_ADDR = address(0x10002); /// @dev the address of the l2 asset router. address constant L2_ASSET_ROUTER_ADDR = address(0x10003); /** * @author Matter Labs * @custom:security-contact [email protected] * @notice Smart contract for sending arbitrary length messages to L1 * @dev by default ZkSync can send fixed-length messages on L1. * A fixed length message has 4 parameters `senderAddress`, `isService`, `key`, `value`, * the first one is taken from the context, the other three are chosen by the sender. * @dev To send a variable-length message we use this trick: * - This system contract accepts an arbitrary length message and sends a fixed length message with * parameters `senderAddress == this`, `isService == true`, `key == msg.sender`, `value == keccak256(message)`. * - The contract on L1 accepts all sent messages and if the message came from this system contract * it requires that the preimage of `value` be provided. */ interface IL2Messenger { /// @notice Sends an arbitrary length message to L1. /// @param _message The variable length message to be sent to L1. /// @return Returns the keccak256 hashed value of the message. function sendToL1(bytes calldata _message) external returns (bytes32); } /// @dev An l2 system contract address, used in the assetId calculation for native assets. /// This is needed for automatic bridging, i.e. without deploying the AssetHandler contract, /// if the assetId can be calculated with this address then it is in fact an NTV asset address constant L2_NATIVE_TOKEN_VAULT_ADDR = address(0x10004); /// @dev the address of the l2 asset router. address constant L2_MESSAGE_ROOT_ADDR = address(0x10005); /// @dev the offset for the system contracts uint160 constant SYSTEM_CONTRACTS_OFFSET = 0x8000; // 2^15 /// @dev the address of the l2 messenger system contract IL2Messenger constant L2_MESSENGER = IL2Messenger(address(SYSTEM_CONTRACTS_OFFSET + 0x08)); /// @dev the address of the msg value system contract address constant MSG_VALUE_SYSTEM_CONTRACT = address(SYSTEM_CONTRACTS_OFFSET + 0x09);
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; import {L2_NATIVE_TOKEN_VAULT_ADDR} from "../L2ContractAddresses.sol"; import {LEGACY_ENCODING_VERSION, NEW_ENCODING_VERSION} from "../../bridge/asset-router/IAssetRouterBase.sol"; import {INativeTokenVault} from "../../bridge/ntv/INativeTokenVault.sol"; import {IncorrectTokenAddressFromNTV, UnsupportedEncodingVersion, InvalidNTVBurnData} from "../L1ContractErrors.sol"; /** * @author Matter Labs * @custom:security-contact [email protected] * @notice Helper library for transfer data encoding and decoding to reduce possibility of errors. */ library DataEncoding { /// @notice Abi.encodes the data required for bridgeBurn for NativeTokenVault. /// @param _amount The amount of token to be transferred. /// @param _remoteReceiver The address which to receive tokens on remote chain. /// @param _maybeTokenAddress The helper field that should be either equal to 0 (in this case /// it is assumed that the token has been registered within NativeTokenVault already) or it /// can be equal to the address of the token on the current chain. Providing non-zero address /// allows it to be automatically registered in case it is not yet a part of NativeTokenVault. /// @return The encoded bridgeBurn data function encodeBridgeBurnData( uint256 _amount, address _remoteReceiver, address _maybeTokenAddress ) internal pure returns (bytes memory) { return abi.encode(_amount, _remoteReceiver, _maybeTokenAddress); } /// @notice Function decoding bridgeBurn data previously encoded with this library. /// @param _data The encoded data for bridgeBurn /// @return amount The amount of token to be transferred. /// @return receiver The address which to receive tokens on remote chain. /// @return maybeTokenAddress The helper field that should be either equal to 0 (in this case /// it is assumed that the token has been registered within NativeTokenVault already) or it /// can be equal to the address of the token on the current chain. Providing non-zero address /// allows it to be automatically registered in case it is not yet a part of NativeTokenVault. function decodeBridgeBurnData( bytes memory _data ) internal pure returns (uint256 amount, address receiver, address maybeTokenAddress) { if (_data.length != 96) { // For better error handling revert InvalidNTVBurnData(); } (amount, receiver, maybeTokenAddress) = abi.decode(_data, (uint256, address, address)); } /// @notice Abi.encodes the data required for bridgeMint on remote chain. /// @param _originalCaller The address which initiated the transfer. /// @param _remoteReceiver The address which to receive tokens on remote chain. /// @param _originToken The transferred token address. /// @param _amount The amount of token to be transferred. /// @param _erc20Metadata The transferred token metadata. /// @return The encoded bridgeMint data function encodeBridgeMintData( address _originalCaller, address _remoteReceiver, address _originToken, uint256 _amount, bytes memory _erc20Metadata ) internal pure returns (bytes memory) { // solhint-disable-next-line func-named-parameters return abi.encode(_originalCaller, _remoteReceiver, _originToken, _amount, _erc20Metadata); } /// @notice Function decoding transfer data previously encoded with this library. /// @param _bridgeMintData The encoded bridgeMint data /// @return _originalCaller The address which initiated the transfer. /// @return _remoteReceiver The address which to receive tokens on remote chain. /// @return _parsedOriginToken The transferred token address. /// @return _amount The amount of token to be transferred. /// @return _erc20Metadata The transferred token metadata. function decodeBridgeMintData( bytes memory _bridgeMintData ) internal pure returns ( address _originalCaller, address _remoteReceiver, address _parsedOriginToken, uint256 _amount, bytes memory _erc20Metadata ) { (_originalCaller, _remoteReceiver, _parsedOriginToken, _amount, _erc20Metadata) = abi.decode( _bridgeMintData, (address, address, address, uint256, bytes) ); } /// @notice Encodes the asset data by combining chain id, asset deployment tracker and asset data. /// @param _chainId The id of the chain token is native to. /// @param _assetData The asset data that has to be encoded. /// @param _sender The asset deployment tracker address. /// @return The encoded asset data. function encodeAssetId(uint256 _chainId, bytes32 _assetData, address _sender) internal pure returns (bytes32) { return keccak256(abi.encode(_chainId, _sender, _assetData)); } /// @notice Encodes the asset data by combining chain id, asset deployment tracker and asset data. /// @param _chainId The id of the chain token is native to. /// @param _tokenAddress The address of token that has to be encoded (asset data is the address itself). /// @param _sender The asset deployment tracker address. /// @return The encoded asset data. function encodeAssetId(uint256 _chainId, address _tokenAddress, address _sender) internal pure returns (bytes32) { return keccak256(abi.encode(_chainId, _sender, _tokenAddress)); } /// @notice Encodes the asset data by combining chain id, NTV as asset deployment tracker and asset data. /// @param _chainId The id of the chain token is native to. /// @param _assetData The asset data that has to be encoded. /// @return The encoded asset data. function encodeNTVAssetId(uint256 _chainId, bytes32 _assetData) internal pure returns (bytes32) { return keccak256(abi.encode(_chainId, L2_NATIVE_TOKEN_VAULT_ADDR, _assetData)); } /// @notice Encodes the asset data by combining chain id, NTV as asset deployment tracker and token address. /// @param _chainId The id of the chain token is native to. /// @param _tokenAddress The address of token that has to be encoded (asset data is the address itself). /// @return The encoded asset data. function encodeNTVAssetId(uint256 _chainId, address _tokenAddress) internal pure returns (bytes32) { return keccak256(abi.encode(_chainId, L2_NATIVE_TOKEN_VAULT_ADDR, _tokenAddress)); } /// @dev Encodes the transaction data hash using either the latest encoding standard or the legacy standard. /// @param _encodingVersion EncodingVersion. /// @param _originalCaller The address of the entity that initiated the deposit. /// @param _assetId The unique identifier of the deposited L1 token. /// @param _nativeTokenVault The address of the token, only used if the encoding version is legacy. /// @param _transferData The encoded transfer data, which includes both the deposit amount and the address of the L2 receiver. /// @return txDataHash The resulting encoded transaction data hash. function encodeTxDataHash( bytes1 _encodingVersion, address _originalCaller, bytes32 _assetId, address _nativeTokenVault, bytes memory _transferData ) internal view returns (bytes32 txDataHash) { if (_encodingVersion == LEGACY_ENCODING_VERSION) { address tokenAddress = INativeTokenVault(_nativeTokenVault).tokenAddress(_assetId); // This is a double check to ensure that the used token for the legacy encoding is correct. // This revert should never be emitted and in real life and should only serve as a guard in // case of inconsistent state of Native Token Vault. bytes32 expectedAssetId = encodeNTVAssetId(block.chainid, tokenAddress); if (_assetId != expectedAssetId) { revert IncorrectTokenAddressFromNTV(_assetId, tokenAddress); } (uint256 depositAmount, , ) = decodeBridgeBurnData(_transferData); txDataHash = keccak256(abi.encode(_originalCaller, tokenAddress, depositAmount)); } else if (_encodingVersion == NEW_ENCODING_VERSION) { // Similarly to calldata, the txDataHash is collision-resistant. // In the legacy data hash, the first encoded variable was the address, which is padded with zeros during `abi.encode`. txDataHash = keccak256( bytes.concat(_encodingVersion, abi.encode(_originalCaller, _assetId, _transferData)) ); } else { revert UnsupportedEncodingVersion(); } } /// @notice Decodes the token data by combining chain id, asset deployment tracker and asset data. function decodeTokenData( bytes calldata _tokenData ) internal pure returns (uint256 chainId, bytes memory name, bytes memory symbol, bytes memory decimals) { bytes1 encodingVersion = _tokenData[0]; if (encodingVersion == LEGACY_ENCODING_VERSION) { (name, symbol, decimals) = abi.decode(_tokenData, (bytes, bytes, bytes)); } else if (encodingVersion == NEW_ENCODING_VERSION) { return abi.decode(_tokenData[1:], (uint256, bytes, bytes, bytes)); } else { revert UnsupportedEncodingVersion(); } } /// @notice Encodes the token data by combining chain id, and its metadata. /// @dev Note that all the metadata of the token is expected to be ABI encoded. /// @param _chainId The id of the chain token is native to. /// @param _name The name of the token. /// @param _symbol The symbol of the token. /// @param _decimals The decimals of the token. /// @return The encoded token data. function encodeTokenData( uint256 _chainId, bytes memory _name, bytes memory _symbol, bytes memory _decimals ) internal pure returns (bytes memory) { return bytes.concat(NEW_ENCODING_VERSION, abi.encode(_chainId, _name, _symbol, _decimals)); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; import {IAssetRouterBase} from "../asset-router/IAssetRouterBase.sol"; /// @title Base Native token vault contract interface /// @author Matter Labs /// @custom:security-contact [email protected] /// @notice The NTV is an Asset Handler for the L1AssetRouter to handle native tokens interface INativeTokenVault { event BridgedTokenBeaconUpdated(address bridgedTokenBeacon, bytes32 bridgedTokenProxyBytecodeHash); /// @notice The Weth token address function WETH_TOKEN() external view returns (address); /// @notice The AssetRouter contract function ASSET_ROUTER() external view returns (IAssetRouterBase); /// @notice The chain ID of the L1 chain function L1_CHAIN_ID() external view returns (uint256); /// @notice Returns the chain ID of the origin chain for a given asset ID function originChainId(bytes32 assetId) external view returns (uint256); /// @notice Registers tokens within the NTV. /// @dev The goal is to allow bridging native tokens automatically, by registering them on the fly. /// @notice Allows the bridge to register a token address for the vault. /// @notice No access control is ok, since the bridging of tokens should be permissionless. This requires permissionless registration. function registerToken(address _l1Token) external; /// @notice Ensures that the native token is registered with the NTV. /// @dev This function is used to ensure that the token is registered with the NTV. function ensureTokenIsRegistered(address _nativeToken) external; /// @notice Used to get the the ERC20 data for a token function getERC20Getters(address _token, uint256 _originChainId) external view returns (bytes memory); /// @notice Used to get the token address of an assetId function tokenAddress(bytes32 assetId) external view returns (address); /// @notice Used to get the assetId of a token function assetId(address token) external view returns (bytes32); /// @notice Used to get the expected bridged token address corresponding to its native counterpart function calculateCreate2TokenAddress(uint256 _originChainId, address _originToken) external view returns (address); /// @notice Tries to register a token from the provided `_burnData` and reverts if it is not possible. function tryRegisterTokenFromBurnData(bytes calldata _burnData, bytes32 _expectedAssetId) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/ERC20Permit.sol) pragma solidity ^0.8.0; import "./IERC20PermitUpgradeable.sol"; import "../ERC20Upgradeable.sol"; import "../../../utils/cryptography/ECDSAUpgradeable.sol"; import "../../../utils/cryptography/EIP712Upgradeable.sol"; import "../../../utils/CountersUpgradeable.sol"; import {Initializable} from "../../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * _Available since v3.4._ * * @custom:storage-size 51 */ abstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable { using CountersUpgradeable for CountersUpgradeable.Counter; mapping(address => CountersUpgradeable.Counter) private _nonces; // solhint-disable-next-line var-name-mixedcase bytes32 private constant _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); /** * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`. * However, to ensure consistency with the upgradeable transpiler, we will continue * to reserve a slot. * @custom:oz-renamed-from _PERMIT_TYPEHASH */ // solhint-disable-next-line var-name-mixedcase bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT; /** * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. * * It's a good idea to use the same `name` that is defined as the ERC20 token name. */ function __ERC20Permit_init(string memory name) internal onlyInitializing { __EIP712_init_unchained(name, "1"); } function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {} /** * @inheritdoc IERC20PermitUpgradeable */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual override { require(block.timestamp <= deadline, "ERC20Permit: expired deadline"); bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); bytes32 hash = _hashTypedDataV4(structHash); address signer = ECDSAUpgradeable.recover(hash, v, r, s); require(signer == owner, "ERC20Permit: invalid signature"); _approve(owner, spender, value); } /** * @inheritdoc IERC20PermitUpgradeable */ function nonces(address owner) public view virtual override returns (uint256) { return _nonces[owner].current(); } /** * @inheritdoc IERC20PermitUpgradeable */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view override returns (bytes32) { return _domainSeparatorV4(); } /** * @dev "Consume a nonce": return the current value and increment. * * _Available since v4.1._ */ function _useNonce(address owner) internal virtual returns (uint256 current) { CountersUpgradeable.Counter storage nonce = _nonces[owner]; current = nonce.current(); nonce.increment(); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol) pragma solidity ^0.8.0; /** * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC. * * _Available since v4.8.3._ */ interface IERC1967 { /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Emitted when the beacon is changed. */ event BeaconUpgraded(address indexed beacon); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822Proxiable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; import {IBridgehub} from "../../bridgehub/IBridgehub.sol"; /// @dev The encoding version used for legacy txs. bytes1 constant LEGACY_ENCODING_VERSION = 0x00; /// @dev The encoding version used for new txs. bytes1 constant NEW_ENCODING_VERSION = 0x01; /// @dev The encoding version used for txs that set the asset handler on the counterpart contract. bytes1 constant SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION = 0x02; /// @title L1 Bridge contract interface /// @author Matter Labs /// @custom:security-contact [email protected] interface IAssetRouterBase { event BridgehubDepositBaseTokenInitiated( uint256 indexed chainId, address indexed from, bytes32 assetId, uint256 amount ); event BridgehubDepositInitiated( uint256 indexed chainId, bytes32 indexed txDataHash, address indexed from, bytes32 assetId, bytes bridgeMintCalldata ); event BridgehubWithdrawalInitiated( uint256 chainId, address indexed sender, bytes32 indexed assetId, bytes32 assetDataHash // Todo: What's the point of emitting hash? ); event AssetDeploymentTrackerRegistered( bytes32 indexed assetId, bytes32 indexed additionalData, address assetDeploymentTracker ); event AssetHandlerRegistered(bytes32 indexed assetId, address indexed _assetHandlerAddress); event DepositFinalizedAssetRouter(uint256 indexed chainId, bytes32 indexed assetId, bytes assetData); function BRIDGE_HUB() external view returns (IBridgehub); /// @notice Sets the asset handler address for a specified asset ID on the chain of the asset deployment tracker. /// @dev The caller of this function is encoded within the `assetId`, therefore, it should be invoked by the asset deployment tracker contract. /// @dev No access control on the caller, as msg.sender is encoded in the assetId. /// @dev Typically, for most tokens, ADT is the native token vault. However, custom tokens may have their own specific asset deployment trackers. /// @dev `setAssetHandlerAddressOnCounterpart` should be called on L1 to set asset handlers on L2 chains for a specific asset ID. /// @param _assetRegistrationData The asset data which may include the asset address and any additional required data or encodings. /// @param _assetHandlerAddress The address of the asset handler to be set for the provided asset. function setAssetHandlerAddressThisChain(bytes32 _assetRegistrationData, address _assetHandlerAddress) external; function assetHandlerAddress(bytes32 _assetId) external view returns (address); /// @notice Finalize the withdrawal and release funds. /// @param _chainId The chain ID of the transaction to check. /// @param _assetId The bridged asset ID. /// @param _transferData The position in the L2 logs Merkle tree of the l2Log that was sent with the message. /// @dev We have both the legacy finalizeWithdrawal and the new finalizeDeposit functions, /// finalizeDeposit uses the new format. On the L2 we have finalizeDeposit with new and old formats both. function finalizeDeposit(uint256 _chainId, bytes32 _assetId, bytes memory _transferData) external payable; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20PermitUpgradeable { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20Upgradeable.sol"; import "./extensions/IERC20MetadataUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import {Initializable} from "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer(address from, address to, uint256 amount) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[45] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../StringsUpgradeable.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSAUpgradeable { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { // 32 is the length in bytes of hash, // enforced by the type signature above /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") mstore(0x1c, hash) message := keccak256(0x00, 0x3c) } } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", StringsUpgradeable.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, "\x19\x01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) data := keccak256(ptr, 0x42) } } /** * @dev Returns an Ethereum Signed Data with intended validator, created from a * `validator` and `data` according to the version 0 of EIP-191. * * See {recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x00", validator, data)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.8; import "./ECDSAUpgradeable.sol"; import "../../interfaces/IERC5267Upgradeable.sol"; import {Initializable} from "../../proxy/utils/Initializable.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. * * _Available since v3.4._ * * @custom:storage-size 52 */ abstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable { bytes32 private constant _TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); /// @custom:oz-renamed-from _HASHED_NAME bytes32 private _hashedName; /// @custom:oz-renamed-from _HASHED_VERSION bytes32 private _hashedVersion; string private _name; string private _version; /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ function __EIP712_init(string memory name, string memory version) internal onlyInitializing { __EIP712_init_unchained(name, version); } function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing { _name = name; _version = version; // Reset prior values in storage if upgrading _hashedName = 0; _hashedVersion = 0; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { return _buildDomainSeparator(); } function _buildDomainSeparator() private view returns (bytes32) { return keccak256(abi.encode(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev See {EIP-5267}. * * _Available since v4.9._ */ function eip712Domain() public view virtual override returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ) { // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized // and the EIP712 domain is not reliable, as it will be missing name and version. require(_hashedName == 0 && _hashedVersion == 0, "EIP712: Uninitialized"); return ( hex"0f", // 01111 _EIP712Name(), _EIP712Version(), block.chainid, address(this), bytes32(0), new uint256[](0) ); } /** * @dev The name parameter for the EIP712 domain. * * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ function _EIP712Name() internal virtual view returns (string memory) { return _name; } /** * @dev The version parameter for the EIP712 domain. * * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ function _EIP712Version() internal virtual view returns (string memory) { return _version; } /** * @dev The hash of the name parameter for the EIP712 domain. * * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead. */ function _EIP712NameHash() internal view returns (bytes32) { string memory name = _EIP712Name(); if (bytes(name).length > 0) { return keccak256(bytes(name)); } else { // If the name is empty, the contract may have been upgraded without initializing the new storage. // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design. bytes32 hashedName = _hashedName; if (hashedName != 0) { return hashedName; } else { return keccak256(""); } } } /** * @dev The hash of the version parameter for the EIP712 domain. * * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead. */ function _EIP712VersionHash() internal view returns (bytes32) { string memory version = _EIP712Version(); if (bytes(version).length > 0) { return keccak256(bytes(version)); } else { // If the version is empty, the contract may have been upgraded without initializing the new storage. // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design. bytes32 hashedVersion = _hashedVersion; if (hashedVersion != 0) { return hashedVersion; } else { return keccak256(""); } } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[48] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library CountersUpgradeable { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized != type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. pragma solidity ^0.8.21; import {L2Message, L2Log, TxStatus} from "../common/Messaging.sol"; import {IL1AssetHandler} from "../bridge/interfaces/IL1AssetHandler.sol"; import {ICTMDeploymentTracker} from "./ICTMDeploymentTracker.sol"; import {IMessageRoot} from "./IMessageRoot.sol"; import {IAssetHandler} from "../bridge/interfaces/IAssetHandler.sol"; struct L2TransactionRequestDirect { uint256 chainId; uint256 mintValue; address l2Contract; uint256 l2Value; bytes l2Calldata; uint256 l2GasLimit; uint256 l2GasPerPubdataByteLimit; bytes[] factoryDeps; address refundRecipient; } struct L2TransactionRequestTwoBridgesOuter { uint256 chainId; uint256 mintValue; uint256 l2Value; uint256 l2GasLimit; uint256 l2GasPerPubdataByteLimit; address refundRecipient; address secondBridgeAddress; uint256 secondBridgeValue; bytes secondBridgeCalldata; } struct L2TransactionRequestTwoBridgesInner { bytes32 magicValue; address l2Contract; bytes l2Calldata; bytes[] factoryDeps; bytes32 txDataHash; } struct BridgehubMintCTMAssetData { uint256 chainId; bytes32 baseTokenAssetId; bytes ctmData; bytes chainData; } struct BridgehubBurnCTMAssetData { uint256 chainId; bytes ctmData; bytes chainData; } /// @author Matter Labs /// @custom:security-contact [email protected] interface IBridgehub is IAssetHandler, IL1AssetHandler { /// @notice pendingAdmin is changed /// @dev Also emitted when new admin is accepted and in this case, `newPendingAdmin` would be zero address event NewPendingAdmin(address indexed oldPendingAdmin, address indexed newPendingAdmin); /// @notice Admin changed event NewAdmin(address indexed oldAdmin, address indexed newAdmin); /// @notice CTM asset registered event AssetRegistered( bytes32 indexed assetInfo, address indexed _assetAddress, bytes32 indexed additionalData, address sender ); event SettlementLayerRegistered(uint256 indexed chainId, bool indexed isWhitelisted); /// @notice Emitted when the bridging to the chain is started. /// @param chainId Chain ID of the ZK chain /// @param assetId Asset ID of the token for the zkChain's CTM /// @param settlementLayerChainId The chain id of the settlement layer the chain migrates to. event MigrationStarted(uint256 indexed chainId, bytes32 indexed assetId, uint256 indexed settlementLayerChainId); /// @notice Emitted when the bridging to the chain is complete. /// @param chainId Chain ID of the ZK chain /// @param assetId Asset ID of the token for the zkChain's CTM /// @param zkChain The address of the ZK chain on the chain where it is migrated to. event MigrationFinalized(uint256 indexed chainId, bytes32 indexed assetId, address indexed zkChain); /// @notice Starts the transfer of admin rights. Only the current admin or owner can propose a new pending one. /// @notice New admin can accept admin rights by calling `acceptAdmin` function. /// @param _newPendingAdmin Address of the new admin function setPendingAdmin(address _newPendingAdmin) external; /// @notice Accepts transfer of admin rights. Only pending admin can accept the role. function acceptAdmin() external; /// Getters function chainTypeManagerIsRegistered(address _chainTypeManager) external view returns (bool); function chainTypeManager(uint256 _chainId) external view returns (address); function assetIdIsRegistered(bytes32 _baseTokenAssetId) external view returns (bool); function baseToken(uint256 _chainId) external view returns (address); function baseTokenAssetId(uint256 _chainId) external view returns (bytes32); function sharedBridge() external view returns (address); function messageRoot() external view returns (IMessageRoot); function getZKChain(uint256 _chainId) external view returns (address); function getAllZKChains() external view returns (address[] memory); function getAllZKChainChainIDs() external view returns (uint256[] memory); function migrationPaused() external view returns (bool); function admin() external view returns (address); function assetRouter() external view returns (address); /// Mailbox forwarder function proveL2MessageInclusion( uint256 _chainId, uint256 _batchNumber, uint256 _index, L2Message calldata _message, bytes32[] calldata _proof ) external view returns (bool); function proveL2LogInclusion( uint256 _chainId, uint256 _batchNumber, uint256 _index, L2Log memory _log, bytes32[] calldata _proof ) external view returns (bool); function proveL1ToL2TransactionStatus( uint256 _chainId, bytes32 _l2TxHash, uint256 _l2BatchNumber, uint256 _l2MessageIndex, uint16 _l2TxNumberInBatch, bytes32[] calldata _merkleProof, TxStatus _status ) external view returns (bool); function requestL2TransactionDirect( L2TransactionRequestDirect calldata _request ) external payable returns (bytes32 canonicalTxHash); function requestL2TransactionTwoBridges( L2TransactionRequestTwoBridgesOuter calldata _request ) external payable returns (bytes32 canonicalTxHash); function l2TransactionBaseCost( uint256 _chainId, uint256 _gasPrice, uint256 _l2GasLimit, uint256 _l2GasPerPubdataByteLimit ) external view returns (uint256); //// Registry function createNewChain( uint256 _chainId, address _chainTypeManager, bytes32 _baseTokenAssetId, uint256 _salt, address _admin, bytes calldata _initData, bytes[] calldata _factoryDeps ) external returns (uint256 chainId); function addChainTypeManager(address _chainTypeManager) external; function removeChainTypeManager(address _chainTypeManager) external; function addTokenAssetId(bytes32 _baseTokenAssetId) external; function setAddresses( address _sharedBridge, ICTMDeploymentTracker _l1CtmDeployer, IMessageRoot _messageRoot ) external; event NewChain(uint256 indexed chainId, address chainTypeManager, address indexed chainGovernance); event ChainTypeManagerAdded(address indexed chainTypeManager); event ChainTypeManagerRemoved(address indexed chainTypeManager); event BaseTokenAssetIdRegistered(bytes32 indexed assetId); function whitelistedSettlementLayers(uint256 _chainId) external view returns (bool); function registerSettlementLayer(uint256 _newSettlementLayerChainId, bool _isWhitelisted) external; function settlementLayer(uint256 _chainId) external view returns (uint256); // function finalizeMigrationToGateway( // uint256 _chainId, // address _baseToken, // address _sharedBridge, // address _admin, // uint256 _expectedProtocolVersion, // ZKChainCommitment calldata _commitment, // bytes calldata _diamondCut // ) external; function forwardTransactionOnGateway( uint256 _chainId, bytes32 _canonicalTxHash, uint64 _expirationTimestamp ) external; function ctmAssetIdFromChainId(uint256 _chainId) external view returns (bytes32); function ctmAssetIdFromAddress(address _ctmAddress) external view returns (bytes32); function l1CtmDeployer() external view returns (ICTMDeploymentTracker); function ctmAssetIdToAddress(bytes32 _assetInfo) external view returns (address); function setCTMAssetAddress(bytes32 _additionalData, address _assetAddress) external; function L1_CHAIN_ID() external view returns (uint256); function registerAlreadyDeployedZKChain(uint256 _chainId, address _hyperchain) external; /// @notice return the ZK chain contract for a chainId /// @dev It is a legacy method. Do not use! function getHyperchain(uint256 _chainId) external view returns (address); function registerLegacyChain(uint256 _chainId) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20MetadataUpgradeable is IERC20Upgradeable { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/MathUpgradeable.sol"; import "./math/SignedMathUpgradeable.sol"; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = MathUpgradeable.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMathUpgradeable.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, MathUpgradeable.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol) pragma solidity ^0.8.0; interface IERC5267Upgradeable { /** * @dev MAY be emitted to signal that the domain could have changed. */ event EIP712DomainChanged(); /** * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 * signature. */ function eip712Domain() external view returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. pragma solidity ^0.8.21; /// @dev The enum that represents the transaction execution status /// @param Failure The transaction execution failed /// @param Success The transaction execution succeeded enum TxStatus { Failure, Success } /// @dev The log passed from L2 /// @param l2ShardId The shard identifier, 0 - rollup, 1 - porter /// All other values are not used but are reserved for the future /// @param isService A boolean flag that is part of the log along with `key`, `value`, and `sender` address. /// This field is required formally but does not have any special meaning /// @param txNumberInBatch The L2 transaction number in a Batch, in which the log was sent /// @param sender The L2 address which sent the log /// @param key The 32 bytes of information that was sent in the log /// @param value The 32 bytes of information that was sent in the log // Both `key` and `value` are arbitrary 32-bytes selected by the log sender struct L2Log { uint8 l2ShardId; bool isService; uint16 txNumberInBatch; address sender; bytes32 key; bytes32 value; } /// @dev An arbitrary length message passed from L2 /// @notice Under the hood it is `L2Log` sent from the special system L2 contract /// @param txNumberInBatch The L2 transaction number in a Batch, in which the message was sent /// @param sender The address of the L2 account from which the message was passed /// @param data An arbitrary length message struct L2Message { uint16 txNumberInBatch; address sender; bytes data; } /// @dev Internal structure that contains the parameters for the writePriorityOp /// internal function. /// @param txId The id of the priority transaction. /// @param l2GasPrice The gas price for the l2 priority operation. /// @param expirationTimestamp The timestamp by which the priority operation must be processed by the operator. /// @param request The external calldata request for the priority operation. struct WritePriorityOpParams { uint256 txId; uint256 l2GasPrice; uint64 expirationTimestamp; BridgehubL2TransactionRequest request; } /// @dev Structure that includes all fields of the L2 transaction /// @dev The hash of this structure is the "canonical L2 transaction hash" and can /// be used as a unique identifier of a tx /// @param txType The tx type number, depending on which the L2 transaction can be /// interpreted differently /// @param from The sender's address. `uint256` type for possible address format changes /// and maintaining backward compatibility /// @param to The recipient's address. `uint256` type for possible address format changes /// and maintaining backward compatibility /// @param gasLimit The L2 gas limit for L2 transaction. Analog to the `gasLimit` on an /// L1 transactions /// @param gasPerPubdataByteLimit Maximum number of L2 gas that will cost one byte of pubdata /// (every piece of data that will be stored on L1 as calldata) /// @param maxFeePerGas The absolute maximum sender willing to pay per unit of L2 gas to get /// the transaction included in a Batch. Analog to the EIP-1559 `maxFeePerGas` on an L1 transactions /// @param maxPriorityFeePerGas The additional fee that is paid directly to the validator /// to incentivize them to include the transaction in a Batch. Analog to the EIP-1559 /// `maxPriorityFeePerGas` on an L1 transactions /// @param paymaster The address of the EIP-4337 paymaster, that will pay fees for the /// transaction. `uint256` type for possible address format changes and maintaining backward compatibility /// @param nonce The nonce of the transaction. For L1->L2 transactions it is the priority /// operation Id /// @param value The value to pass with the transaction /// @param reserved The fixed-length fields for usage in a future extension of transaction /// formats /// @param data The calldata that is transmitted for the transaction call /// @param signature An abstract set of bytes that are used for transaction authorization /// @param factoryDeps The set of L2 bytecode hashes whose preimages were shown on L1 /// @param paymasterInput The arbitrary-length data that is used as a calldata to the paymaster pre-call /// @param reservedDynamic The arbitrary-length field for usage in a future extension of transaction formats struct L2CanonicalTransaction { uint256 txType; uint256 from; uint256 to; uint256 gasLimit; uint256 gasPerPubdataByteLimit; uint256 maxFeePerGas; uint256 maxPriorityFeePerGas; uint256 paymaster; uint256 nonce; uint256 value; // In the future, we might want to add some // new fields to the struct. The `txData` struct // is to be passed to account and any changes to its structure // would mean a breaking change to these accounts. To prevent this, // we should keep some fields as "reserved" // It is also recommended that their length is fixed, since // it would allow easier proof integration (in case we will need // some special circuit for preprocessing transactions) uint256[4] reserved; bytes data; bytes signature; uint256[] factoryDeps; bytes paymasterInput; // Reserved dynamic type for the future use-case. Using it should be avoided, // But it is still here, just in case we want to enable some additional functionality bytes reservedDynamic; } /// @param sender The sender's address. /// @param contractAddressL2 The address of the contract on L2 to call. /// @param valueToMint The amount of base token that should be minted on L2 as the result of this transaction. /// @param l2Value The msg.value of the L2 transaction. /// @param l2Calldata The calldata for the L2 transaction. /// @param l2GasLimit The limit of the L2 gas for the L2 transaction /// @param l2GasPerPubdataByteLimit The price for a single pubdata byte in L2 gas. /// @param factoryDeps The array of L2 bytecodes that the tx depends on. /// @param refundRecipient The recipient of the refund for the transaction on L2. If the transaction fails, then /// this address will receive the `l2Value`. // solhint-disable-next-line gas-struct-packing struct BridgehubL2TransactionRequest { address sender; address contractL2; uint256 mintValue; uint256 l2Value; bytes l2Calldata; uint256 l2GasLimit; uint256 l2GasPerPubdataByteLimit; bytes[] factoryDeps; address refundRecipient; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; /// @title L1 Asset Handler contract interface /// @author Matter Labs /// @custom:security-contact [email protected] /// @notice Used for any asset handler and called by the L1AssetRouter interface IL1AssetHandler { /// @param _chainId the chainId that the message will be sent to /// @param _assetId the assetId of the asset being bridged /// @param _depositSender the address of the entity that initiated the deposit. /// @param _data the actual data specified for the function function bridgeRecoverFailedTransfer( uint256 _chainId, bytes32 _assetId, address _depositSender, bytes calldata _data ) external payable; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; import {L2TransactionRequestTwoBridgesInner, IBridgehub} from "./IBridgehub.sol"; import {IAssetRouterBase} from "../bridge/asset-router/IAssetRouterBase.sol"; import {IL1AssetDeploymentTracker} from "../bridge/interfaces/IL1AssetDeploymentTracker.sol"; /// @author Matter Labs /// @custom:security-contact [email protected] interface ICTMDeploymentTracker is IL1AssetDeploymentTracker { function bridgehubDeposit( uint256 _chainId, address _originalCaller, uint256 _l2Value, bytes calldata _data ) external payable returns (L2TransactionRequestTwoBridgesInner memory request); function BRIDGE_HUB() external view returns (IBridgehub); function L1_ASSET_ROUTER() external view returns (IAssetRouterBase); function registerCTMAssetOnL1(address _ctmAddress) external; function calculateAssetId(address _l1CTM) external view returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; import {IBridgehub} from "./IBridgehub.sol"; /** * @author Matter Labs * @notice MessageRoot contract is responsible for storing and aggregating the roots of the batches from different chains into the MessageRoot. * @custom:security-contact [email protected] */ interface IMessageRoot { function BRIDGE_HUB() external view returns (IBridgehub); function addNewChain(uint256 _chainId) external; function addChainBatchRoot(uint256 _chainId, uint256 _batchNumber, bytes32 _chainBatchRoot) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; /// @title Asset Handler contract interface /// @author Matter Labs /// @custom:security-contact [email protected] /// @notice Used for any asset handler and called by the AssetRouter interface IAssetHandler { /// @dev Emitted when a token is minted event BridgeMint(uint256 indexed chainId, bytes32 indexed assetId, address receiver, uint256 amount); /// @dev Emitted when a token is burned event BridgeBurn( uint256 indexed chainId, bytes32 indexed assetId, address indexed sender, address receiver, uint256 amount ); /// @param _chainId the chainId that the message is from /// @param _assetId the assetId of the asset being bridged /// @param _data the actual data specified for the function /// @dev Note, that while payable, this function will only receive base token on L2 chains, /// while L1 the provided msg.value is always 0. However, this may change in the future, /// so if your AssetHandler implementation relies on it, it is better to explicitly check it. function bridgeMint(uint256 _chainId, bytes32 _assetId, bytes calldata _data) external payable; /// @notice Burns bridged tokens and returns the calldata for L2 <-> L1 message. /// @dev In case of native token vault _data is the tuple of _depositAmount and _l2Receiver. /// @param _chainId the chainId that the message will be sent to /// @param _msgValue the msg.value of the L2 transaction. For now it is always 0. /// @param _assetId the assetId of the asset being bridged /// @param _originalCaller the original caller of the /// @param _data the actual data specified for the function /// @return _bridgeMintData The calldata used by counterpart asset handler to unlock tokens for recipient. function bridgeBurn( uint256 _chainId, uint256 _msgValue, bytes32 _assetId, address _originalCaller, bytes calldata _data ) external payable returns (bytes memory _bridgeMintData); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library MathUpgradeable { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMathUpgradeable { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; /// @author Matter Labs /// @custom:security-contact [email protected] interface IL1AssetDeploymentTracker { function bridgeCheckCounterpartAddress( uint256 _chainId, bytes32 _assetId, address _originalCaller, address _assetHandlerAddressOnCounterpart ) external view; }
{ "codegen": "yul", "detectMissingLibraries": false, "enableEraVMExtensions": true, "evmVersion": "cancun", "forceEVMLA": false, "libraries": {}, "metadata": {}, "optimizer": { "disable_system_request_memoization": true, "enabled": true, "fallback_to_optimizing_for_size": false, "mode": "3" }, "outputSelection": { "*": { "*": [ "abi", "metadata" ], "": [ "ast" ] } }, "remappings": [ "@ensdomains/=node_modules/@ensdomains/", "ds-test/=lib/forge-std/lib/ds-test/src/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "forge-std/=lib/forge-std/src/", "hardhat/=node_modules/hardhat/", "murky/=lib/murky/src/", "foundry-test/=test/foundry/", "l2-contracts/=../l2-contracts/contracts/", "@openzeppelin/contracts-v4/=lib/openzeppelin-contracts-v4/contracts/", "@openzeppelin/contracts-upgradeable-v4/=lib/openzeppelin-contracts-upgradeable-v4/contracts/", "@openzeppelin/=node_modules/@openzeppelin/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable-v4/lib/erc4626-tests/", "openzeppelin-contracts-upgradeable-v4/=lib/openzeppelin-contracts-upgradeable-v4/", "openzeppelin-contracts-v4/=lib/openzeppelin-contracts-v4/", "openzeppelin-contracts/=lib/murky/lib/openzeppelin-contracts/" ], "viaIR": false }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NonSequentialVersion","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"UnsupportedEncodingVersion","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BridgeBurn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"l1Token","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"uint8","name":"decimals","type":"uint8"}],"name":"BridgeInitialize","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BridgeMint","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","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":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"assetId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"bridgeBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_assetId","type":"bytes32"},{"internalType":"address","name":"_originToken","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"bridgeInitialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"bridgeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_input","type":"bytes"}],"name":"decodeString","outputs":[{"internalType":"string","name":"result","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"_input","type":"bytes"}],"name":"decodeUint8","outputs":[{"internalType":"uint8","name":"result","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"l1Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l2Bridge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeTokenVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"originToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","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":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"ignoreName","type":"bool"},{"internalType":"bool","name":"ignoreSymbol","type":"bool"},{"internalType":"bool","name":"ignoreDecimals","type":"bool"}],"internalType":"struct BridgedStandardERC20.ERC20Getters","name":"_availableGetters","type":"tuple"},{"internalType":"string","name":"_newName","type":"string"},{"internalType":"string","name":"_newSymbol","type":"string"},{"internalType":"uint8","name":"_version","type":"uint8"}],"name":"reinitializeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x00040000000000020014000000000002000000000501034f00000060031002700000041b01300197000300000015035500020000000503550000041b0030019d0000008003000039000000400030043f0000000100200190000000280000c13d000000040010008c0000087c0000413d000000000205043b000000e002200270000004230020009c000000450000213d000004350020009c0000005c0000a13d000004360020009c000000e40000a13d000004370020009c0000014d0000213d0000043a0020009c0000018c0000613d0000043b0020009c0000087c0000c13d000000240010008c0000087c0000413d0000000001000416000000000001004b0000087c0000c13d0000000401500370000000000101043b000004460010009c0000087c0000213d000000000010043f0000003301000039000002d50000013d0000000001000416000000000001004b0000087c0000c13d000000000100041a0000ff0000100190000000500000c13d000000ff0210018f000000ff0020008c000000400000613d000000ff011001bf000000000010041b000000ff01000039000000800010043f00000000010004140000041b0010009c0000041b01008041000000c00110021000000420011001c70000800d02000039000000010300003900000421040000411069105f0000040f00000001002001900000087c0000613d00000020010000390000010000100443000001200000044300000422010000410000106a0001042e000004240020009c000000690000a13d000004250020009c000000ef0000a13d000004260020009c0000016e0000213d000004290020009c000001950000613d0000042a0020009c000000640000613d0000087c0000013d0000041c01000041000000800010043f0000002001000039000000840010043f0000002701000039000000a40010043f0000041d01000041000000c40010043f0000041e01000041000000e40010043f0000041f010000410000106b000104300000043f0020009c000000fc0000213d000004430020009c000002a80000613d000004440020009c0000034e0000613d000004450020009c0000087c0000c13d0000000001000416000000000001004b0000087c0000c13d000000ce01000039000001900000013d0000042e0020009c0000010f0000213d000004320020009c000002ca0000613d000004330020009c000003630000613d000004340020009c0000087c0000c13d000000440010008c0000087c0000413d0000000001000416000000000001004b0000087c0000c13d0000000401500370000000000101043b000c00000001001d000004460010009c0000087c0000213d0000002401500370000000000301043b000000cf01000039000000000201041a0000044604200198000000d80000c13d000b00000003001d0000047b022001970000048a022001c7000000000021041b0000048b01000041000000800010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000045c011001c70000048a02000041106910640000040f00000060031002700000041b03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000080057001bf0000009d0000613d0000008008000039000000000901034f000000009a09043c0000000008a80436000000000058004b000000990000c13d000000000006004b000000aa0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f000300000001035500000001002001900000040b0000613d0000001f01400039000000600210018f00000080012001bf000000400010043f000000200030008c0000087c0000413d000000ce03000039000000000303041a000000c004200039000000800500043d0000048a0600004100000000006404350000044603300197000000e0042000390000000000340435000000a00320003900000000005304350000006004000039000000000041043500000100022001bf000000400020043f000000400230021000000000010104330000041b0010009c0000041b010080410000006001100210000000000121019f00000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f0000044d011001c70000801002000039106910640000040f00000001002001900000087c0000613d000000000101043b000000d002000039000000000012041b0000000b030000290000048a040000410000000001000411000000000041004b000003e70000c13d0000000c0000006b000004440000c13d000000400100043d00000044021000390000048e03000041000000000032043500000024021000390000001f03000039000003ba0000013d0000043c0020009c0000026e0000613d0000043d0020009c0000030e0000613d0000043e0020009c0000087c0000c13d0000000001000416000000000001004b0000087c0000c13d000000d001000039000002d90000013d0000042b0020009c000002730000613d0000042c0020009c000003400000613d0000042d0020009c0000087c0000c13d0000000001000416000000000001004b0000087c0000c13d000000cd01000039000000000101041a0000000801100270000001910000013d000004400020009c000002dd0000613d000004410020009c000003820000613d000004420020009c0000087c0000c13d0000000001000416000000000001004b0000087c0000c13d000000cc01000039000000000101041a0000049a001001980000087c0000c13d000000cd01000039000000000101041a000000ff0110018f000000800010043f00000447010000410000106a0001042e0000042f0020009c000002e50000613d000004300020009c000003c50000613d000004310020009c0000087c0000c13d000000640010008c0000087c0000413d0000000002000416000000000002004b0000087c0000c13d0000002402500370000000000202043b000b00000002001d000004460020009c0000087c0000213d0000004402500370000000000202043b000c00000002001d0000045a0020009c0000087c0000213d0000000c020000290000002302200039000000000012004b0000087c0000813d0000000c02000029000900040020003d0000000902500360000000000202043b000a00000002001d0000045a0020009c0000087c0000213d0000000c020000290000002402200039000700000002001d0008000a0020002d000000080010006b0000087c0000213d000000000200041a0005ff0000200194000005140000c13d0000000001000415000000130110008a0006000500100218000000ff00200190001300000000003d001300010000603d000005180000c13d0000045f0120019700000101011001bf000000000010041b0000000b03000029000000000003004b000006350000c13d000000400100043d000004890200004100000000002104350000041b0010009c0000041b01008041000000400110021000000487011001c70000106b00010430000004380020009c000001cb0000613d000004390020009c0000087c0000c13d000000240010008c0000087c0000413d0000000002000416000000000002004b0000087c0000c13d0000000402500370000000000202043b0000045a0020009c0000087c0000213d0000002303200039000000000013004b0000087c0000813d0000000403200039000000000435034f000000000404043b0000045a0040009c0000087c0000213d000000200040008c0000087c0000413d00000000024200190000002402200039000000000012004b0000087c0000213d0000002001300039000000000115034f000000000101043b000000ff0010008c000002e20000a13d0000087c0000013d000004270020009c000002420000613d000004280020009c0000087c0000c13d000000440010008c0000087c0000413d0000000001000416000000000001004b0000087c0000c13d0000000401500370000000000101043b000004460010009c0000087c0000213d0000002402500370000000000202043b000c00000002001d000004460020009c0000087c0000213d000000000010043f0000003401000039000000200010043f000000400200003900000000010000191069104a0000040f0000000c02000029000000000020043f000000200010043f00000000010000190000004002000039000002d80000013d0000000001000416000000000001004b0000087c0000c13d000000cf01000039000000000101041a0000044601100197000000800010043f00000447010000410000106a0001042e000000c40010008c0000087c0000413d0000000002000416000000000002004b0000087c0000c13d0000006402500370000000000202043b0000045a0020009c0000087c0000213d0000002303200039000000000013004b0000087c0000813d000b00040020003d0000000b03500360000000000303043b000c00000003001d0000045a0030009c0000087c0000213d0000000c02200029000a00240020003d0000000a0010006b0000087c0000213d0000008402500370000000000202043b0000045a0020009c0000087c0000213d0000002303200039000000000013004b0000087c0000813d000800040020003d0000000803500360000000000303043b000900000003001d0000045a0030009c0000087c0000213d0000000902200029000700240020003d000000070010006b0000087c0000213d000000a401500370000000000101043b000600000001001d000000ff0010008c0000087c0000213d000000000100041a000000ff0210018f000000ff0020008c000006f20000c13d0000048801000041000000000010043f0000001101000039000000040010043f00000463010000410000106b00010430000000440010008c0000087c0000413d0000000001000416000000000001004b0000087c0000c13d0000000401500370000000000101043b000c00000001001d000004460010009c0000087c0000213d0000002401500370000000000301043b000000cf01000039000000000201041a0000044604200198000002320000c13d000b00000003001d0000047b022001970000048a022001c7000000000021041b0000048b01000041000000800010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000045c011001c70000048a02000041106910640000040f00000060031002700000041b03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000080057001bf000001f70000613d0000008008000039000000000901034f000000009a09043c0000000008a80436000000000058004b000001f30000c13d000000000006004b000002040000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f00030000000103550000000100200190000003ff0000613d0000001f01400039000000600210018f00000080012001bf000000400010043f000000200030008c0000087c0000413d000000ce03000039000000000303041a000000c004200039000000800500043d0000048a0600004100000000006404350000044603300197000000e0042000390000000000340435000000a00320003900000000005304350000006004000039000000000041043500000100022001bf000000400020043f000000400230021000000000010104330000041b0010009c0000041b010080410000006001100210000000000121019f00000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f0000044d011001c70000801002000039106910640000040f00000001002001900000087c0000613d000000000101043b000000d002000039000000000012041b0000000b030000290000048a040000410000000001000411000000000041004b000003e70000c13d0000000c01000029000000000001004b000004290000c13d000000400100043d000000640210003900000498030000410000000000320435000000440210003900000499030000410000000000320435000000240210003900000021030000390000062a0000013d000000e40010008c0000087c0000413d0000000001000416000000000001004b0000087c0000c13d0000000401500370000000000101043b000c00000001001d000004460010009c0000087c0000213d0000002401500370000000000101043b000b00000001001d000004460010009c0000087c0000213d0000006401500370000000000101043b000a00000001001d0000004401500370000000000101043b000900000001001d0000008401500370000000000101043b000800000001001d000000ff0010008c0000087c0000213d0000044801000041000000000010044300000000010004140000041b0010009c0000041b01008041000000c00110021000000449011001c70000800b02000039106910640000040f0000000100200190000005d80000613d000000000101043b0000000a0010006c000004a40000a13d000000400100043d00000044021000390000045903000041000003b70000013d0000000001000416000000000001004b0000087c0000c13d10690f6f0000040f0000035c0000013d000000440010008c0000087c0000413d0000000001000416000000000001004b0000087c0000c13d0000000401500370000000000101043b000c00000001001d000004460010009c0000087c0000213d0000002401500370000000000101043b000b00000001001d0000000001000411000000000010043f0000003401000039000000200010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000044a011001c70000801002000039106910640000040f00000001002001900000087c0000613d000000000101043b0000000c02000029000000000020043f000000200010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000044a011001c70000801002000039106910640000040f00000001002001900000087c0000613d000000000101043b000000000101041a0000000b0310006c0000033d0000813d000000400100043d000000640210003900000477030000410000000000320435000000440210003900000478030000410000000000320435000000240210003900000025030000390000062a0000013d0000000001000416000000000001004b0000087c0000c13d000000cc01000039000000000101041a000000ff001001900000087c0000c13d0000003603000039000000000203041a000000010420019000000001012002700000007f0110618f0000001f0010008c00000000050000390000000105002039000000000054004b000003d70000c13d000000800010043f000000000004004b000003f90000613d000000000030043f000000000001004b000003f70000613d000004650200004100000000040000190000000003040019000000000402041a000000a005300039000000000045043500000001022000390000002004300039000000000014004b000002c10000413d000004900000013d000000240010008c0000087c0000413d0000000001000416000000000001004b0000087c0000c13d0000000401500370000000000101043b000004460010009c0000087c0000213d000000000010043f0000009901000039000000200010043f000000400200003900000000010000191069104a0000040f000000000101041a000000800010043f00000447010000410000106a0001042e0000000001000416000000000001004b0000087c0000c13d0000003501000039000000000101041a000000800010043f00000447010000410000106a0001042e000000240010008c0000087c0000413d0000000002000416000000000002004b0000087c0000c13d0000000402500370000000000202043b0000045a0020009c0000087c0000213d0000002303200039000000000013004b0000087c0000813d0000000404200039000000000345034f000000000303043b0000045a0030009c0000087c0000213d000000200030008c0000087c0000413d00000024022000390000000003230019000000000013004b0000087c0000213d0000002001400039000000000115034f000000000101043b0000045a0010009c0000087c0000213d00000000012100190000001f02100039000000000032004b0000087c0000813d000000000215034f000000000202043b000000200110003910690e6b0000040f0000002002000039000000400300043d000c00000003001d0000000002230436000004990000013d000000440010008c0000087c0000413d0000000001000416000000000001004b0000087c0000c13d0000000401500370000000000101043b000c00000001001d000004460010009c0000087c0000213d0000000001000411000000000010043f0000003401000039000000200010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000044a011001c70000801002000039000b000000050353106910640000040f0000000b0300035f00000001002001900000087c0000613d000000000101043b0000000c02000029000000000020043f000000200010043f0000002401300370000000000101043b000b00000001001d00000000010004140000041b0010009c0000041b01008041000000c0011002100000044a011001c70000801002000039106910640000040f00000001002001900000087c0000613d000000000101043b000000000101041a0000000b02000029000000000021001a000001c50000413d000000000321001900000000010004110000000c020000290000035a0000013d000000440010008c0000087c0000413d0000000001000416000000000001004b0000087c0000c13d0000000401500370000000000201043b000004460020009c0000087c0000213d0000002401500370000000000301043b000000000100041110690efa0000040f0000035b0000013d000000440010008c0000087c0000413d0000000001000416000000000001004b0000087c0000c13d0000000401500370000000000201043b000004460020009c0000087c0000213d0000002401500370000000000301043b000000000100041110690ea30000040f0000000101000039000000400200043d00000000001204350000041b0020009c0000041b02008041000000400120021000000476011001c70000106a0001042e0000000001000416000000000001004b0000087c0000c13d0000006501000039000000000101041a000000000001004b000003dd0000c13d0000006601000039000000000101041a000000000001004b000003dd0000c13d0000006703000039000000000203041a000000010420019000000001012002700000007f0110618f0000001f0010008c00000000050000390000000105002039000000000552013f0000000100500190000003d70000c13d000000800010043f000000000004004b000004800000613d000000000030043f000000000001004b000005370000c13d0000002001000039000000a0020000390000054b0000013d000000640010008c0000087c0000413d0000000001000416000000000001004b0000087c0000c13d0000000401500370000000000101043b000c00000001001d000004460010009c0000087c0000213d0000002401500370000000000101043b000b00000001001d000004460010009c0000087c0000213d0000004401500370000000000101043b000a00000001001d0000000c01000029000000000010043f0000003401000039000000200010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000044a011001c70000801002000039106910640000040f00000001002001900000087c0000613d000000000101043b0000000002000411000000000020043f000000200010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000044a011001c70000801002000039106910640000040f00000001002001900000087c0000613d000000000101043b000000000101041a0000049c0010009c000006190000613d0000000a0310006c000006160000813d000000400100043d00000044021000390000049b03000041000000000032043500000024021000390000001d0300003900000000003204350000041c0200004100000000002104350000000402100039000000200300003900000000003204350000041b0010009c0000041b01008041000000400110021000000454011001c70000106b000104300000000001000416000000000001004b0000087c0000c13d000000cc01000039000000000101041a0000ff00001001900000087c0000c13d0000003703000039000000000203041a000000010420019000000001012002700000007f0110618f0000001f0010008c00000000050000390000000105002039000000000552013f0000000100500190000003f10000613d0000048801000041000000000010043f0000002201000039000000040010043f00000463010000410000106b000104300000041c01000041000000800010043f0000002001000039000000840010043f0000001501000039000000a40010043f0000048f01000041000000c40010043f00000490010000410000106b00010430000000400200043d00000462030000410000000000320435000000040320003900000000001304350000041b0020009c0000041b02008041000000400120021000000463011001c70000106b00010430000000800010043f000000000004004b000003f90000613d000000000030043f000000000001004b000004860000c13d000000a001000039000004910000013d0000049d02200197000000a00020043f000000000001004b000000c001000039000000a001006039000004910000013d0000001f0530018f0000045206300198000000400200043d0000000004620019000004160000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000004060000c13d000004160000013d0000001f0530018f0000045206300198000000400200043d0000000004620019000004160000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000004120000c13d000000000005004b000004230000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f000000000014043500000060013002100000041b0020009c0000041b020080410000004002200210000000000112019f0000106b00010430000b00000003001d000000000010043f0000003301000039000000200010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000044a011001c70000801002000039106910640000040f00000001002001900000087c0000613d000000000101043b000000000101041a000a000b00100074000005d90000813d000000400100043d000000640210003900000496030000410000000000320435000000440210003900000497030000410000000000320435000000240210003900000022030000390000062a0000013d0000003501000039000000000201041a000000000032001a000001c50000413d000b00000003001d0000000002320019000000000021041b0000000c01000029000000000010043f0000003301000039000000200010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000044a011001c70000801002000039106910640000040f00000001002001900000087c0000613d000000000101043b000000000201041a0000000b030000290000000002320019000000000021041b000000400100043d00000000003104350000041b0010009c0000041b01008041000000400110021000000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f00000475011001c70000800d0200003900000003030000390000048c0400004100000000050000190000000c060000291069105f0000040f00000001002001900000087c0000613d000000400100043d0000000b0200002900000000002104350000041b0010009c0000041b01008041000000400110021000000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f00000475011001c70000800d0200003900000002030000390000048d04000041000006100000013d0000049d02200197000000a00020043f000000000001004b00000020020000390000000002006039000005400000013d000004680200004100000000040000190000000003040019000000000402041a000000a005300039000000000045043500000001022000390000002004300039000000000014004b000004880000413d000000c001300039000000800210008a000000800100003910690e590000040f0000002001000039000000400200043d000c00000002001d0000000002120436000000800100003910690e470000040f0000000c0200002900000000012100490000041b0010009c0000041b0100804100000060011002100000041b0020009c0000041b020080410000004002200210000000000121019f0000106a0001042e0000000c01000029000000000010043f0000009901000039000000200010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000044a011001c70000801002000039106910640000040f00000001002001900000087c0000613d000000000101043b000000000201041a0000000103200039000000000031041b000000400100043d000000c0031000390000000a040000290000000000430435000000a003100039000000000023043500000080021000390000000903000029000000000032043500000060021000390000000b03000029000000000032043500000040021000390000000c030000290000000000320435000000c00200003900000000022104360000044b0300004100000000003204350000044c0010009c000005440000213d000000e003100039000000400030043f0000041b0020009c0000041b02008041000000400220021000000000010104330000041b0010009c0000041b010080410000006001100210000000000121019f00000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f0000044d011001c70000801002000039106910640000040f00000001002001900000087c0000613d000000000101043b000a00000001001d10690f6f0000040f0000044e02000041000000400300043d00000000002304350000000202300039000000000012043500000022013000390000000a0200002900000000002104350000000201000367000000c402100370000000000202043b000a00000002001d000000a401100370000000000101043b000700000001001d0000041b0030009c0000041b03008041000000400130021000000000020004140000041b0020009c0000041b02008041000000c002200210000000000121019f0000044f011001c70000801002000039106910640000040f00000001002001900000087c0000613d000000400200043d0000000a03000029000004500030009c000007f60000a13d0000006401200039000004560300004100000000003104350000004401200039000004570300004100000000003104350000002401200039000000220300003900000000003104350000041c0100004100000000001204350000000401200039000000200300003900000000003104350000041b0020009c0000041b02008041000000400120021000000458011001c70000106b000104300000000001000415000000140110008a0006000500100218001400000000003d000400000002001d000004790100004100000000001004430000000001000410000000040010044300000000010004140000041b0010009c0000041b01008041000000c0011002100000047a011001c70000800202000039106910640000040f0000000100200190000005d80000613d000000000101043b000000000001004b0000061e0000c13d0000000401000029000000ff0110018f000000010010008c00000006010000290000000501100270000000000100003f000000010100603f000006210000c13d000000050000006b00000004020000290000013f0000613d0000049d0120019700000001011001bf000001410000013d0000046d030000410000000002000019000000000403041a000000a005200039000000000045043500000001033000390000002002200039000000000012004b000005390000413d0000003f012000390000049e01100197000004910010009c0000054a0000413d0000048801000041000000000010043f0000004101000039000000040010043f00000463010000410000106b000104300000008002100039000000400020043f0000006805000039000000000405041a000000010640019000000001034002700000007f0330618f0000001f0030008c00000000070000390000000107002039000000000774013f0000000100700190000003d70000c13d0000000000320435000000000006004b000005690000613d000000000050043f000000000003004b00000000040000190000056f0000613d0000047005000041000000a00610003900000000040000190000000007460019000000000805041a000000000087043500000001055000390000002004400039000000000034004b000005610000413d0000056f0000013d0000049d04400197000000a0051000390000000000450435000000000003004b000000200400003900000000040060390000003f034000390000049e033001970000000004230019000000000034004b000000000300003900000001030040390000045a0040009c000005440000213d0000000100300190000005440000c13d000000400040043f000004920040009c000005440000213d0000002003400039000800000003001d000000400030043f000b00000004001d0000000000040435000000400500043d0000002003500039000000e004000039000000000043043500000493030000410000000000350435000000e004500039000000800300043d0000000000340435000c00000005001d0000010004500039000000000003004b000005960000613d00000000050000190000000006450019000000a007500039000000000707043300000000007604350000002005500039000000000035004b0000058f0000413d000000000543001900000000000504350000001f033000390000049e0330019700000000034300190000000c0500002900000000045300490000004005500039000000000045043500000000060204330000000005630436000000000006004b000005ac0000613d000000a001100039000000000200001900000000035200190000000004210019000000000404043300000000004304350000002002200039000000000062004b000005a50000413d000a00000005001d000900000006001d000000000156001900000000000104350000049401000041000000000010044300000000010004140000041b0010009c0000041b01008041000000c00110021000000449011001c70000800b02000039106910640000040f0000000100200190000005d80000613d000000000101043b0000000c040000290000008002400039000000000300041000000000003204350000006002400039000000000012043500000009010000290000001f011000390000049e011001970000000a011000290000000002410049000000c0034000390000000000230435000000a00240003900000000000204350000000b0200002900000000020204330000000001210436000000000002004b0000049a0000613d00000000030000190000000805000029000000005405043400000000014104360000000103300039000000000023004b000005d20000413d0000049a0000013d000000000001042f0000000c01000029000000000010043f0000003301000039000000200010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000044a011001c70000801002000039106910640000040f00000001002001900000087c0000613d000000000101043b0000000a02000029000000000021041b0000003501000039000000000201041a0000000b030000290000000002320049000000000021041b000000400100043d00000000003104350000041b0010009c0000041b01008041000000400110021000000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f00000475011001c70000800d0200003900000003030000390000048c040000410000000c0500002900000000060000191069105f0000040f00000001002001900000087c0000613d000000400100043d0000000b0200002900000000002104350000041b0010009c0000041b01008041000000400110021000000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f00000475011001c70000800d02000039000000020300003900000495040000410000000c050000291069105f0000040f00000001002001900000087c0000613d00000000010000190000106a0001042e0000000c01000029000000000200041110690ea30000040f0000000c010000290000000b020000290000000a0300002910690efa0000040f0000035b0000013d00000006010000290000000501100270000000000100003f000000400100043d00000064021000390000045e03000041000000000032043500000044021000390000045d03000041000000000032043500000024021000390000002e0300003900000000003204350000041c0200004100000000002104350000000402100039000000200300003900000000003204350000041b0010009c0000041b01008041000000400110021000000458011001c70000106b00010430000000ce01000039000000000201041a0000047b02200197000000000232019f000000000021041b00000002010003670000000402100370000000000202043b000000d003000039000000000023041b000000cf02000039000000000302041a0000047b033001970000000004000411000000000343019f000000000032041b0000000a0000006b0000064d0000c13d0000048801000041000000000010043f0000003201000039000000040010043f00000463010000410000106b0001043000000009020000290000002004200039000000000241034f000000000202043b0000047c032001980000070f0000613d0000047d0030009c000007f30000c13d0000000a02000029000000810020008c0000087c0000413d0000000c020000290000004504200039000000000241034f000000000202043b0000045a0020009c0000087c0000213d00000007062000290000002002600039000000080020006c0000087c0000813d0000000107600039000000000271034f000000000502043b0000045a0050009c000005440000213d0000001f025000390000049e022001970000003f022000390000049e08200197000000400200043d0000000008820019000000000028004b000000000900003900000001090040390000045a0080009c000005440000213d0000000100900190000005440000c13d0000002109600039000000400080043f00000000065204360000000008950019000000080080006c0000087c0000213d0000002007700039000000000871034f0000049e095001980000001f0a50018f0000000007960019000006860000613d000000000b08034f000000000c06001900000000bd0b043c000000000cdc043600000000007c004b000006820000c13d00000000000a004b000006930000613d000000000898034f0000000309a00210000000000a070433000000000a9a01cf000000000a9a022f000000000808043b0000010009900089000000000898022f00000000089801cf0000000008a8019f0000000000870435000000000556001900000000000504350000002004400039000000000541034f000000000505043b0000045a0050009c0000087c0000213d00000007075000290000002005700039000000080050006c0000087c0000813d0000000106700039000000000561034f000000000505043b0000045a0050009c000005440000213d0000001f085000390000049e088001970000003f088000390000049e08800197000000400900043d0000000008890019000600000009001d000000000098004b000000000900003900000001090040390000045a0080009c000005440000213d0000000100900190000005440000c13d0000002107700039000000400080043f00000006080000290000000008580436000c00000008001d0000000007750019000000080070006c0000087c0000213d0000002006600039000000000761034f0000049e085001980000001f0950018f0000000c06800029000006c50000613d000000000a07034f0000000c0b00002900000000ac0a043c000000000bcb043600000000006b004b000006c10000c13d000000000009004b000006d20000613d000000000787034f0000000308900210000000000906043300000000098901cf000000000989022f000000000707043b0000010008800089000000000787022f00000000078701cf000000000797019f00000000007604350000000c0550002900000000000504350000002004400039000000000441034f000000000404043b0000045a0040009c0000087c0000213d00000007054000290000002004500039000000080040006c0000087c0000813d0000000104500039000000000441034f000000000404043b0000045a0040009c000005440000213d0000001f064000390000049e066001970000003f066000390000049e03600197000000400700043d0000000006370019000400000007001d000000000076004b000000000300003900000001030040390000045a0060009c000005440000213d0000000100300190000005440000c13d0000002103500039000007a20000013d0000000103100039000000060330014f000000ff003001900000070b0000c13d0000ff0000100190000008360000c13d000000060020006c000008360000813d0000045f0110019700000006011001af00000100011001bf000000000010041b0000046001000041000000000201041a0000046101000041000000800010043f00000000010004140000044602200197000000040020008c0000084e0000c13d0000000103000031000000200030008c00000020040000390000000004034019000008730000013d0000045b01000041000000800010043f0000045c010000410000106b000104300000000a03000029000000600030008c0000087c0000413d0000045a0020009c0000087c0000213d00000007062000290000001f02600039000000080020006c0000087c0000813d000000000261034f000000000502043b0000045a0050009c000005440000213d0000001f025000390000049e022001970000003f022000390000049e07200197000000400200043d0000000007720019000000000027004b000000000800003900000001080040390000045a0070009c000005440000213d0000000100800190000005440000c13d0000002008600039000000400070043f00000000065204360000000007850019000000080070006c0000087c0000213d000000000881034f0000049e095001980000001f0a50018f00000000079600190000073a0000613d000000000b08034f000000000c06001900000000bd0b043c000000000cdc043600000000007c004b000007360000c13d00000000000a004b000007470000613d000000000898034f0000000309a00210000000000a070433000000000a9a01cf000000000a9a022f000000000808043b0000010009900089000000000898022f00000000089801cf0000000008a8019f0000000000870435000000000556001900000000000504350000002004400039000000000541034f000000000505043b0000045a0050009c0000087c0000213d00000007065000290000001f05600039000000080050006c0000087c0000813d000000000561034f000000000505043b0000045a0050009c000005440000213d0000001f075000390000049e077001970000003f077000390000049e07700197000000400800043d0000000007780019000600000008001d000000000087004b000000000800003900000001080040390000045a0070009c000005440000213d0000000100800190000005440000c13d0000002006600039000000400070043f00000006070000290000000007570436000c00000007001d0000000007650019000000080070006c0000087c0000213d000000000761034f0000049e085001980000001f0950018f0000000c06800029000007770000613d000000000a07034f0000000c0b00002900000000ac0a043c000000000bcb043600000000006b004b000007730000c13d000000000009004b000007840000613d000000000787034f0000000308900210000000000906043300000000098901cf000000000989022f000000000707043b0000010008800089000000000787022f00000000078701cf000000000797019f00000000007604350000000c0550002900000000000504350000002004400039000000000441034f000000000404043b0000045a0040009c0000087c0000213d00000007054000290000001f04500039000000080040006c0000087c0000813d000000000451034f000000000404043b0000045a0040009c000005440000213d0000001f064000390000049e066001970000003f066000390000049e03600197000000400700043d0000000006370019000400000007001d000000000076004b000000000300003900000001030040390000045a0060009c000005440000213d0000000100300190000005440000c13d0000002003500039000000400060043f000000040500002900000000004504350000000005340019000000080050006c0000087c0000213d000000000331034f0000049e054001980000001f0640018f0000000401000029000700200010003d0000000701500029000007b50000613d000000000703034f0000000708000029000000007907043c0000000008980436000000000018004b000007b10000c13d000000000006004b000007c20000613d000000000353034f0000000305600210000000000601043300000000065601cf000000000656022f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f000000000031043500000007014000290000000000010435000000400100043d000300000001001d0000047e0010009c000005440000213d00000003030000290000006001300039000000400010043f0000004001300039000100000001001d00000000000104350000000001030436000200000001001d00000000000104350000047f01000041000000400400043d0000000000140435000000040140003900000020030000390000000000310435000000240340003900000000210204340000000000130435000a00000004001d0000004403400039000000000001004b000007e60000613d000000000400001900000000053400190000000006420019000000000606043300000000006504350000002004400039000000000014004b000007df0000413d0000000002310019000000000002043500000000020004140000000003000410000000040030008c00000a040000c13d0000000004000415000000120440008a000000050440021000000003010003670000000103000031001200000000003d00000a1f0000013d000000400100043d0000048602000041000001470000013d000000000101043b00000060032000390000000a0400002900000000004304350000004003200039000000070400002900000000004304350000002003200039000000080400002900000000004304350000000000120435000000000000043f0000041b0020009c0000041b02008041000000400120021000000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f00000451011001c70000000102000039106910640000040f00000060031002700000041b03300197000000200030008c000000200400003900000000040340190000001f0540018f00000020044001900000081b0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000047004b000008170000c13d000000000005004b000008280000613d000000000641034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f00030000000103550000000100200190000008420000613d000000000100043d00000446011001980000087e0000c13d000000400100043d00000044021000390000045503000041000000000032043500000024021000390000001803000039000003ba0000013d0000041c01000041000000800010043f0000002001000039000000840010043f0000002e01000039000000a40010043f0000045d01000041000000c40010043f0000045e01000041000000e40010043f0000041f010000410000106b000104300000001f0530018f0000045206300198000000400200043d0000000004620019000004160000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000008490000c13d000004160000013d0000041b0010009c0000041b01008041000000c0011002100000045c011001c7106910640000040f00000060031002700000041b03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000080057001bf000000800a000039000008620000613d000000000801034f000000008908043c000000000a9a043600000000005a004b0000085e0000c13d000000000006004b0000086f0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f00030000000103550000000100200190000008860000613d0000001f01400039000000600210018f000000800e2001bf0000004000e0043f000000200030008c0000087c0000413d000000800300043d000004460030009c000008920000a13d00000000010000190000106b000104300000000c0010006c000009220000c13d0000000c010000290000000b02000029000000090300002910690ea30000040f00000000010000190000106a0001042e0000001f0530018f0000045206300198000000400200043d0000000004620019000004160000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000088d0000c13d000004160000013d0000000001000411000000000031004b000009290000c13d0000000c010000290000001f011000390000049e011001970000003f031000390000049e0b3001970000000003be00190000045a0030009c000005440000213d0000000007000031000000400030043f0000000c0300002900000000003e04350000000a0070006b0000087c0000213d0000000b0300002900000020033000390000000209000367000b0000003903530000000c030000290000049e043001980000001f0530018f000000a0062000390000000002460019000008b30000613d0000000b0800035f000000000c060019000000008d08043c000000000cdc043600000000002c004b000008af0000c13d000000000005004b000008c00000613d0000000b0840035f000000030c500210000000000d020433000000000dcd01cf000000000dcd022f000000000808043b000001000cc000890000000008c8022f0000000008c801cf0000000008d8019f00000000008204350000000c02000029000000200c2000390000000002ce0019000000000002043500000009020000290000001f022000390000049e02200197000a00000002001d0000003f022000390000049e02200197000000400d00043d00000000022d00190000000000d2004b000000000800003900000001080040390000045a0020009c000005440000213d0000000100800190000005440000c13d000000400020043f0000000902000029000000000f2d0436000000070070006b0000087c0000213d00000008020000290000002002200039000700000029035300000009020000290000049e032001980008001f00200193000500000003001d00000000073f0019000008e70000613d000000070200035f00000000080f0019000000002302043c0000000008380436000000000078004b000008e30000c13d000000080000006b000008f60000613d0000000503000029000000070230035f00000008030000290000000303300210000000000807043300000000083801cf000000000838022f000000000202043b0000010003300089000000000232022f00000000023201cf000000000282019f00000000002704350000000902f00029000000000002043500000000070e04330000045a0070009c000005440000213d0000003602000039000000000202041a000000010020019000000001082002700000007f0880618f0000001f0080008c00000000030000390000000103002039000000000232013f0000000100200190000003d70000c13d000000200080008c000009180000413d0000003602000039000000000020043f0000001f027000390000000502200270000004640220009a000000200070008c00000465020040410000001f038000390000000503300270000004640830009a000000000082004b000009180000813d000000000002041b0000000102200039000000000082004b000009140000413d0000001f0070008c0004000100700218000009300000a13d0000003602000039000000000020043f0003049e0070019c0000093a0000c13d00000020080000390000046506000041000009470000013d000000400100043d00000044021000390000045303000041000000000032043500000024021000390000001e03000039000003ba0000013d000004620300004100000000003e043500000084022001bf00000000001204350000004001e0021000000463011001c70000106b00010430000000000007004b0000000002000019000009340000613d000000000206043300000003037002100000049c0330027f0000049c03300167000000000232016f00000004022001af000009530000013d000004650600004100000020080000390000000302000029000000010220008a0000000502200270000004660220009a0000000003e800190000000003030433000000000036041b00000020088000390000000106600039000000000026004b000009400000c13d000000030070006b000009510000813d0000000302700210000000f80220018f0000049c0220027f0000049c022001670000000003e800190000000003030433000000000223016f000000000026041b000000040200002900000001022001bf0000003603000039000000000023041b00000000080d04330000045a0080009c000005440000213d0000003706000039000000000206041a000000010020019000000001072002700000007f0770618f0000001f0070008c00000000030000390000000103002039000000000232013f0000000100200190000003d70000c13d000000200070008c000009740000413d000000000060043f0000001f028000390000000502200270000004670220009a000000200080008c00000468020040410000001f037000390000000503300270000004670730009a000000000072004b000009740000813d000000000002041b0000000102200039000000000072004b000009700000413d0000001f0080008c0000097c0000a13d000000000060043f0000049e0f800198000009870000c13d000000200e0000390000046807000041000009930000013d000000000008004b0000000002000019000009800000613d00000000020f043300000003038002100000049c0330027f0000049c03300167000000000232016f0000000103800210000000000232019f0000099f0000013d0000046807000041000000200e0000390000000102f0008a0000000502200270000004690220009a0000000003de00190000000003030433000000000037041b000000200ee000390000000107700039000000000027004b0000098c0000c13d00000000008f004b0000099d0000813d0000000302800210000000f80220018f0000049c0220027f0000049c022001670000000003de00190000000003030433000000000223016f000000000027041b000000010280021000000001022001bf000000000026041b000000400d00043d0000000002bd00190000000000d2004b000000000600003900000001060040390000045a0020009c000005440000213d0000000100600190000005440000c13d000000400020043f0000000c0200002900000000082d04360000000006480019000000000004004b000009b50000613d0000000b0200035f0000000007080019000000002302043c0000000007370436000000000067004b000009b10000c13d000000000005004b000009c20000613d0000000b0240035f0000000303500210000000000706043300000000073701cf000000000737022f000000000202043b0000010003300089000000000232022f00000000023201cf000000000272019f00000000002604350000000002cd00190000000000020435000000000200041a0000ff0000200190000009d10000c13d000000400100043d00000064021000390000048403000041000000000032043500000044021000390000048503000041000000000032043500000024021000390000002b030000390000062a0000013d000000400b00043d0000046a00b0009c000005440000213d0000004002b00039000000400020043f0000000102000039000000000c2b04360000046b0200004100000000002c043500000000070d04330000045a0070009c000005440000213d0000006702000039000000000202041a000000010020019000000001062002700000007f0660618f0000001f0060008c00000000030000390000000103002039000000000232013f0000000100200190000003d70000c13d000000200060008c000009fa0000413d0000006702000039000000000020043f0000001f0270003900000005022002700000046c0220009a000000200070008c0000046d020040410000001f0360003900000005033002700000046c0630009a000000000062004b000009fa0000813d000000000002041b0000000102200039000000000062004b000009f60000413d0000001f0070008c000000010e70021000000aa20000a13d0000006702000039000000000020043f0000049e0670019800000b240000c13d000000200f0000390000046d0800004100000b300000013d0000001f011000390000049e0110019700000044011000390000041b0010009c0000041b0100804100000060011002100000000a030000290000041b0030009c0000041b030080410000004003300210000000000131019f0000041b0020009c0000041b02008041000000c002200210000000000112019f0000000002000410106910640000040f0000000004000415000000110440008a000000050440021000000060031002700001041b0030019d0000041b033001970003000000010355001100000000003d000000010020019000000a7c0000613d0000049e053001980000001f0630018f0000000a0250002900000a290000613d000000000701034f0000000a08000029000000007907043c0000000008980436000000000028004b00000a250000c13d000000000006004b00000a360000613d000000000551034f0000000306600210000000000702043300000000076701cf000000000767022f000000000505043b0000010006600089000000000565022f00000000056501cf000000000575019f00000000005204350000001f023000390000049e022001970000000a05200029000000000025004b00000000020000390000000102004039000900000005001d0000045a0050009c000005440000213d0000000100200190000005440000c13d0000000902000029000000400020043f000004800030009c0000087c0000213d000000200030008c0000087c0000413d0000000a0200002900000000020204330000045a0020009c0000087c0000213d0000000a063000290000000a022000290000001f05200039000000000065004b0000000007000019000004810700804100000481055001970000048108600197000000000985013f000000000085004b00000000050000190000048105004041000004810090009c000000000507c019000000000005004b0000087c0000c13d00000000520204340000045a0020009c000005440000213d0000001f072000390000049e077001970000003f077000390000049e0770019700000009077000290000045a0070009c000005440000213d000000400070043f00000009070000290000000007270436000a00000007001d0000000007520019000000000067004b0000087c0000213d000000000002004b0000000a0600002900000a780000613d00000000060000190000000a076000290000000008560019000000000808043300000000008704350000002006600039000000000026004b00000a700000413d0000000a0620002900000000000604350000000502400270000000090200002f00000a810000013d000000010200003900000003040000290000000000240435000900600000003d000a00800000003d000000400500043d0000047f0200004100000000002504350000000402500039000000200400003900000000004204350000000602000029000000000202043300000024045000390000000000240435000600000005001d0000004404500039000000000002004b00000a970000613d000000000500001900000000064500190000000c07500029000000000707043300000000007604350000002005500039000000000025004b00000a900000413d0000000004420019000000000004043500000000040004140000000005000410000000040050008c00000aac0000c13d0000000004000415000000100440008a0000000504400210001000000000003d00000ac70000013d000000000007004b000000000200001900000aa60000613d000000000208043300000003037002100000049c0330027f0000049c03300167000000000232016f0000000002e2019f00000b3b0000013d0000001f012000390000049e0110019700000044011000390000041b0010009c0000041b01008041000000600110021000000006020000290000041b0020009c0000041b020080410000004002200210000000000121019f0000041b0040009c0000041b04008041000000c002400210000000000112019f0000000002000410106910640000040f00000000040004150000000f0440008a000000050440021000000060031002700001041b0030019d0000041b033001970003000000010355000f00000000003d000000010020019000000b640000613d0000049e053001980000001f0630018f000000060250002900000ad10000613d000000000701034f0000000608000029000000007907043c0000000008980436000000000028004b00000acd0000c13d000000000006004b00000ade0000613d000000000151034f0000000305600210000000000602043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001204350000001f013000390000049e011001970000000602100029000000000012004b00000000010000390000000101004039000800000002001d0000045a0020009c000005440000213d0000000100100190000005440000c13d0000000801000029000000400010043f000004800030009c0000087c0000213d000000200030008c0000087c0000413d000000060100002900000000010104330000045a0010009c0000087c0000213d000000060530002900000006011000290000001f02100039000000000052004b0000000006000019000004810600804100000481022001970000048107500197000000000872013f000000000072004b00000000020000190000048102004041000004810080009c000000000206c019000000000002004b0000087c0000c13d00000000210104340000045a0010009c000005440000213d0000001f061000390000049e066001970000003f066000390000049e0660019700000008066000290000045a0060009c000005440000213d000000400060043f00000008060000290000000006160436000c00000006001d0000000006210019000000000056004b0000087c0000213d000000000001004b0000000c0500002900000b200000613d00000000050000190000000c065000290000000007250019000000000707043300000000007604350000002005500039000000000015004b00000b180000413d0000000c0510002900000000000504350000000501400270000000080100002f00000b690000013d0000046d08000041000000200f000039000000010260008a00000005022002700000046e0220009a0000000003df00190000000003030433000000000038041b000000200ff000390000000108800039000000000028004b00000b290000c13d000000000076004b00000b3a0000813d0000000302700210000000f80220018f0000049c0220027f0000049c022001670000000003df00190000000003030433000000000223016f000000000028041b0000000102e001bf0000006703000039000000000023041b00000000080b04330000045a0080009c000005440000213d0000006806000039000000000206041a000000010020019000000001072002700000007f0770618f0000001f0070008c00000000030000390000000103002039000000000232013f0000000100200190000003d70000c13d000000200070008c00000b5c0000413d000000000060043f0000001f0280003900000005022002700000046f0220009a000000200080008c00000470020040410000001f0370003900000005033002700000046f0730009a000000000072004b00000b5c0000813d000000000002041b0000000102200039000000000072004b00000b580000413d0000001f0080008c00000b940000a13d000000000060043f0000049e0c80019800000b9f0000c13d000000200a000039000004700700004100000bab0000013d000000010100003900000002020000290000000000120435000800600000003d000c00800000003d000000000100041a0000ff0000100190000009c70000613d000000090100002900000000020104330000045a0020009c000005440000213d0000003601000039000000000501041a000000010050019000000001045002700000007f0440618f0000001f0040008c00000000060000390000000106002039000000000565013f0000000100500190000003d70000c13d000000200040008c00000b8c0000413d000000000010043f0000001f052000390000000505500270000004640550009a000000200020008c00000465050040410000001f044000390000000504400270000004640440009a000000000045004b00000b8c0000813d000000000005041b0000000105500039000000000045004b00000b880000413d0000001f0020008c00000c520000a13d000000000010043f0000049e0620019800000c5e0000c13d0000002005000039000004650400004100000c6a0000013d000000000008004b000000000200001900000b980000613d00000000020c043300000003038002100000049c0330027f0000049c03300167000000000232016f0000000103800210000000000232019f00000bb70000013d0000047007000041000000200a0000390000000102c0008a0000000502200270000004710220009a0000000003ba00190000000003030433000000000037041b000000200aa000390000000107700039000000000027004b00000ba40000c13d00000000008c004b00000bb50000813d0000000302800210000000f80220018f0000049c0220027f0000049c022001670000000003ba00190000000003030433000000000223016f000000000027041b000000010280021000000001022001bf000000000026041b0000006502000039000000000002041b0000006602000039000000000002041b0000000402900370000000000202043b000000000002004b0000000003000039000000010300c039000000000032004b0000087c0000c13d000000cc06000039000000000306041a0000049d03300197000000000223019f000000000026041b0000002403900370000000000703043b000000000007004b0000000003000039000000010300c039000000000037004b0000087c0000c13d0000049f02200197000000000007004b000001000220c1bf000000000026041b0000004403900370000000000703043b000000000007004b0000000003000039000000010300c039000000000037004b0000087c0000c13d0000047202200197000000000007004b00000473030000410000000003006019000000000223019f000000000026041b000000ce02000039000000000702041a000000cd02000039000000000802041a000000400600043d00000060026000390000000c03000029000000000032043500000060020000390000000009260436000000800a600039000000000b4a0019000000000004004b00000bf40000613d0000000b0200035f000000000c0a0019000000002302043c000000000c3c04360000000000bc004b00000bf00000c13d000000000005004b00000c010000613d0000000b0240035f000000030350021000000000040b043300000000043401cf000000000434022f000000000202043b0000010003300089000000000232022f00000000023201cf000000000242019f00000000002b04350000000c02a00029000000000002043500000000011a001900000000026100490000000000290435000000090200002900000000012104360000000503100029000000050000006b00000c110000613d000000070200035f0000000004010019000000002502043c0000000004540436000000000034004b00000c0d0000c13d000000ff0480018f0000044605700197000000080000006b00000c220000613d0000000507000029000000070270035f00000008070000290000000307700210000000000803043300000000087801cf000000000878022f000000000202043b0000010007700089000000000272022f00000000027201cf000000000282019f000000000023043500000009021000290000000000020435000000400260003900000000004204350000000a0260006900000000011200190000041b0010009c0000041b0100804100000060011002100000041b0060009c0000041b060080410000004002600210000000000121019f00000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f0000044d011001c70000800d02000039000000020300003900000474040000411069105f0000040f00000001002001900000087c0000613d000000000200041a000004a001200197000000000010041b0000000601000029000000ff0110018f000000400200043d00000000001204350000041b0020009c0000041b02008041000000400120021000000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f00000475011001c70000800d02000039000000010300003900000421040000411069105f0000040f0000000100200190000006140000c13d0000087c0000013d000000000002004b000000000400001900000c570000613d0000000a04000029000000000404043300000003052002100000049c0550027f0000049c05500167000000000454016f0000000102200210000000000224019f00000c760000013d00000465040000410000002005000039000000010760008a0000000507700270000004660770009a00000009085000290000000008080433000000000084041b00000020055000390000000104400039000000000074004b00000c630000c13d000000000026004b00000c740000813d0000000306200210000000f80660018f0000049c0660027f0000049c0660016700000009055000290000000005050433000000000565016f000000000054041b000000010220021000000001022001bf000000000021041b000000080100002900000000020104330000045a0020009c000005440000213d0000003701000039000000000501041a000000010050019000000001045002700000007f0440618f0000001f0040008c00000000060000390000000106002039000000000565013f0000000100500190000003d70000c13d000000200040008c00000c970000413d000000000010043f0000001f052000390000000505500270000004670550009a000000200020008c00000468050040410000001f044000390000000504400270000004670440009a000000000045004b00000c970000813d000000000005041b0000000105500039000000000045004b00000c930000413d0000001f0020008c00000c9f0000a13d000000000010043f0000049e0620019800000cab0000c13d0000002005000039000004680400004100000cb70000013d000000000002004b000000000400001900000ca40000613d0000000c04000029000000000404043300000003052002100000049c0550027f0000049c05500167000000000454016f0000000102200210000000000224019f00000cc30000013d00000468040000410000002005000039000000010760008a0000000507700270000004690770009a00000008085000290000000008080433000000000084041b00000020055000390000000104400039000000000074004b00000cb00000c13d000000000026004b00000cc10000813d0000000306200210000000f80660018f0000049c0660027f0000049c0660016700000008055000290000000005050433000000000565016f000000000054041b000000010220021000000001022001bf000000000021041b000000000100041a0000ff0000100190000009c70000613d000000400100043d0000046a0010009c000005440000213d0000004002100039000000400020043f000000010200003900000000022104360000046b040000410000000000420435000000090400002900000000050404330000045a0050009c000005440000213d0000006704000039000000000704041a000000010070019000000001067002700000007f0660618f0000001f0060008c00000000080000390000000108002039000000000787013f0000000100700190000003d70000c13d000000200060008c00000cf00000413d000000000040043f0000001f0750003900000005077002700000046c0770009a000000200050008c0000046d070040410000001f0660003900000005066002700000046c0660009a000000000067004b00000cf00000813d000000000007041b0000000107700039000000000067004b00000cec0000413d0000001f0050008c000000010650021000000cf90000a13d000000000040043f0000049e0950019800000d040000c13d00000020080000390000046d0700004100000d100000013d000000000005004b000000000700001900000cfe0000613d0000000a07000029000000000707043300000003055002100000049c0550027f0000049c05500167000000000557016f000000000565019f00000d1b0000013d0000046d070000410000002008000039000000010a90008a000000050aa002700000046e0aa0009a000000090b800029000000000b0b04330000000000b7041b000000200880003900000001077000390000000000a7004b00000d090000c13d000000000059004b00000d1a0000813d0000000305500210000000f80550018f0000049c0550027f0000049c0550016700000009088000290000000008080433000000000558016f000000000057041b00000001056001bf000000000054041b00000000050104330000045a0050009c000005440000213d0000006804000039000000000704041a000000010070019000000001067002700000007f0660618f0000001f0060008c00000000080000390000000108002039000000000787013f0000000100700190000003d70000c13d000000200060008c00000d3b0000413d000000000040043f0000001f0750003900000005077002700000046f0770009a000000200050008c00000470070040410000001f0660003900000005066002700000046f0660009a000000000067004b00000d3b0000813d000000000007041b0000000107700039000000000067004b00000d370000413d0000001f0050008c00000d590000a13d000000000040043f0000049e075001980000047002000041000000200600003900000d4c0000613d000000010870008a0000000508800270000004710880009a00000000091600190000000009090433000000000092041b00000020066000390000000102200039000000000082004b00000d450000c13d000000000057004b00000d560000813d0000000307500210000000f80770018f0000049c0770027f0000049c0770016700000000011600190000000001010433000000000171016f000000000012041b000000010150021000000001011001bf00000d630000013d000000000005004b000000000100001900000d5d0000613d000000000102043300000003025002100000049c0220027f0000049c02200167000000000121016f0000000102500210000000000121019f000000000014041b0000006501000039000000000001041b0000006601000039000000000001041b0000048201000041000000400400043d00000000001404350000000401400039000000200200003900000000002104350000000401000029000000000101043300000024024000390000000000120435000600000004001d0000004402400039000000000001004b00000d7e0000613d000000000400001900000000052400190000000706400029000000000606043300000000006504350000002004400039000000000014004b00000d770000413d0000000002210019000000000002043500000000020004140000000004000410000000040040008c00000d8b0000c13d00000000050004150000000e0550008a0000000505500210000000200030008c0000002004000039000000000403401900000dbf0000013d0000001f011000390000049e0110019700000044011000390000041b0010009c0000041b01008041000000600110021000000006030000290000041b0030009c0000041b030080410000004003300210000000000131019f0000041b0020009c0000041b02008041000000c002200210000000000112019f0000000002000410106910640000040f00000060031002700000041b03300197000000200030008c000000200400003900000000040340190000001f0640018f0000002007400190000000060570002900000dab0000613d000000000801034f0000000609000029000000008a08043c0000000009a90436000000000059004b00000da70000c13d000000000006004b00000db80000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f000300000001035500000000050004150000000d0550008a0000000505500210000000010020019000000ddd0000613d0000001f01400039000000600210018f0000000601200029000000000021004b000000000200003900000001020040390000045a0010009c000005440000213d0000000100200190000005440000c13d000000400010043f000000200030008c0000087c0000413d00000006020000290000000002020433000000ff0020008c0000087c0000213d0000000503500270000000000302001f000000cd03000039000000000403041a0000049d04400197000000000424019f000000000043041b00000001030000290000000003030433000000000003004b0000047303000041000000000300601900000de50000013d0000000101000029000000010200003900000000002104350000047303000041000000400100043d000000cd02000039000000000202041a000000ff0220018f00000003040000290000000004040433000000000004004b000000010330c1bf000000cc04000039000000000504041a0000048305500197000000000353019f00000002050000290000000005050433000000000005004b000001000330c1bf000000000034041b0000006003000039000000000331043600000009040000290000000004040433000000600510003900000000004504350000008005100039000000000004004b00000e030000613d000000000600001900000000075600190000000a08600029000000000808043300000000008704350000002006600039000000000046004b00000dfc0000413d000000000654001900000000000604350000001f044000390000049e04400197000000000554001900000000041500490000000000430435000000080300002900000000040304330000000003450436000000000004004b00000e170000613d000000000500001900000000063500190000000c07500029000000000707043300000000007604350000002005500039000000000045004b00000e100000413d00000000053400190000000000050435000000400510003900000000002504350000001f024000390000049e02200197000000000313004900000000022300190000041b0020009c0000041b0200804100000060022002100000041b0010009c0000041b010080410000004001100210000000000112019f00000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f0000000b0200002900000446052001970000044d011001c70000800d02000039000000020300003900000474040000411069105f0000040f00000001002001900000087c0000613d000000050000006b000006140000c13d000000000200041a000004a001200197000000000010041b000000400100043d000000010300003900000000003104350000041b0010009c0000041b01008041000000400110021000000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f00000475011001c70000800d0200003900000c4d0000013d00000000430104340000000001320436000000000003004b00000e530000613d000000000200001900000000051200190000000006240019000000000606043300000000006504350000002002200039000000000032004b00000e4c0000413d000000000213001900000000000204350000001f023000390000049e022001970000000001210019000000000001042d0000001f022000390000049e022001970000000001120019000000000021004b000000000200003900000001020040390000045a0010009c00000e650000213d000000010020019000000e650000c13d000000400010043f000000000001042d0000048801000041000000000010043f0000004101000039000000040010043f00000463010000410000106b00010430000004a10020009c00000e9b0000813d00000000040100190000001f012000390000049e011001970000003f011000390000049e05100197000000400100043d0000000005510019000000000015004b000000000700003900000001070040390000045a0050009c00000e9b0000213d000000010070019000000e9b0000c13d000000400050043f00000000052104360000000007420019000000000037004b00000ea10000213d0000049e062001980000001f0720018f0000000204400367000000000365001900000e8b0000613d000000000804034f0000000009050019000000008a08043c0000000009a90436000000000039004b00000e870000c13d000000000007004b00000e980000613d000000000464034f0000000306700210000000000703043300000000076701cf000000000767022f000000000404043b0000010006600089000000000464022f00000000046401cf000000000474019f000000000043043500000000022500190000000000020435000000000001042d0000048801000041000000000010043f0000004101000039000000040010043f00000463010000410000106b0001043000000000010000190000106b000104300003000000000002000004460110019800000edc0000613d000200000003001d000304460020019c00000ee60000613d000100000001001d000000000010043f0000003401000039000000200010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000044a011001c70000801002000039106910640000040f0000000100200190000000030300002900000eda0000613d000000000101043b000000000030043f000000200010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000044a011001c70000801002000039106910640000040f0000000306000029000000010020019000000eda0000613d000000000101043b0000000202000029000000000021041b000000400100043d00000000002104350000041b0010009c0000041b01008041000000400110021000000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f00000475011001c70000800d020000390000000303000039000004a20400004100000001050000291069105f0000040f000000010020019000000eda0000613d000000000001042d00000000010000190000106b00010430000000400100043d0000006402100039000004a50300004100000000003204350000004402100039000004a60300004100000000003204350000002402100039000000240300003900000eef0000013d000000400100043d0000006402100039000004a30300004100000000003204350000004402100039000004a40300004100000000003204350000002402100039000000220300003900000000003204350000041c0200004100000000002104350000000402100039000000200300003900000000003204350000041b0010009c0000041b01008041000000400110021000000458011001c70000106b000104300004000000000002000400000003001d000004460110019800000f470000613d000204460020019c00000f510000613d000300000001001d000000000010043f0000003301000039000000200010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000044a011001c70000801002000039106910640000040f000000010020019000000f450000613d000000000101043b000000000101041a000100040010007400000f5b0000413d0000000301000029000000000010043f0000003301000039000000200010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000044a011001c70000801002000039106910640000040f000000010020019000000f450000613d000000000101043b0000000102000029000000000021041b0000000201000029000000000010043f00000000010004140000041b0010009c0000041b01008041000000c0011002100000044a011001c70000801002000039106910640000040f000000010020019000000f450000613d000000000101043b000000000201041a00000004030000290000000002320019000000000021041b000000400100043d00000000003104350000041b0010009c0000041b01008041000000400110021000000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f00000475011001c70000800d0200003900000003030000390000048c04000041000000030500002900000002060000291069105f0000040f000000010020019000000f450000613d000000000001042d00000000010000190000106b00010430000000400100043d0000006402100039000004ab0300004100000000003204350000004402100039000004ac0300004100000000003204350000002402100039000000250300003900000f640000013d000000400100043d0000006402100039000004a90300004100000000003204350000004402100039000004aa0300004100000000003204350000002402100039000000230300003900000f640000013d000000400100043d0000006402100039000004a70300004100000000003204350000004402100039000004a80300004100000000003204350000002402100039000000260300003900000000003204350000041c0200004100000000002104350000000402100039000000200300003900000000003204350000041b0010009c0000041b01008041000000400110021000000458011001c70000106b0001043000020000000000020000006705000039000000000405041a000000010640019000000001024002700000007f0220618f0000001f0020008c00000000010000390000000101002039000000000016004b000010420000c13d000000400300043d0000000001230436000000000006004b00000f8b0000613d000000000050043f000000000002004b00000f910000613d0000046d0500004100000000040000190000000006410019000000000705041a000000000076043500000001055000390000002004400039000000000024004b00000f830000413d00000f920000013d0000049d044001970000000000410435000000000002004b0000002004000039000000000400603900000f920000013d00000000040000190000003f02400039000000200900008a000000000492016f0000000002340019000000000042004b000000000400003900000001040040390000045a0020009c0000103a0000213d00000001004001900000103a0000c13d000000400020043f0000000003030433000000000003004b00000fb60000613d0000041b0030009c0000041b0300804100000060023002100000041b0010009c0000041b010080410000004001100210000000000112019f00000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f0000044d011001c70000801002000039106910640000040f0000000100200190000010400000613d000000400200043d000000000801043b000000200900008a00000fba0000013d0000006501000039000000000801041a000000000008004b000004ad080060410000006805000039000000000405041a000000010640019000000001034002700000007f0330618f0000001f0030008c00000000010000390000000101002039000000000114013f0000000100100190000010420000c13d0000000001320436000000000006004b00000fd50000613d000000000050043f000000000003004b00000fdb0000613d000004700500004100000000040000190000000006410019000000000705041a000000000076043500000001055000390000002004400039000000000034004b00000fcd0000413d00000fdc0000013d0000049d044001970000000000410435000000000003004b0000002004000039000000000400603900000fdc0000013d00000000040000190000003f03400039000000000393016f0000000004230019000000000034004b000000000300003900000001030040390000045a0040009c0000103a0000213d00000001003001900000103a0000c13d000000400040043f0000000002020433000000000002004b000010000000613d000200000008001d0000041b0020009c0000041b0200804100000060022002100000041b0010009c0000041b010080410000004001100210000000000112019f00000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f0000044d011001c70000801002000039106910640000040f0000000100200190000010400000613d000000400400043d000000000101043b0000000208000029000010040000013d0000006601000039000000000101041a000000000001004b000004ad01006041000200000004001d00000060024000390000000000120435000000400140003900000000008104350000002002400039000004ae01000041000100000002001d00000000001204350000049401000041000000000010044300000000010004140000041b0010009c0000041b01008041000000c00110021000000449011001c70000800b02000039106910640000040f0000000100200190000010480000613d000000000101043b0000000204000029000000a0024000390000000003000410000000000032043500000080024000390000000000120435000000a0010000390000000000140435000004af0040009c0000103a0000213d000000c001400039000000400010043f00000001010000290000041b0010009c0000041b01008041000000400110021000000000020404330000041b0020009c0000041b020080410000006002200210000000000112019f00000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f0000044d011001c70000801002000039106910640000040f0000000100200190000010400000613d000000000101043b000000000001042d0000048801000041000000000010043f0000004101000039000000040010043f00000463010000410000106b0001043000000000010000190000106b000104300000048801000041000000000010043f0000002201000039000000040010043f00000463010000410000106b00010430000000000001042f000000000001042f0000041b0010009c0000041b0100804100000040011002100000041b0020009c0000041b020080410000006002200210000000000112019f00000000020004140000041b0020009c0000041b02008041000000c002200210000000000112019f0000044d011001c70000801002000039106910640000040f00000001002001900000105d0000613d000000000101043b000000000001042d00000000010000190000106b0001043000001062002104210000000102000039000000000001042d0000000002000019000000000001042d00001067002104230000000102000039000000000001042d0000000002000019000000000001042d00001069000004320000106a0001042e0000106b0001043000000000000000000000000000000000000000000000000000000000ffffffff08c379a000000000000000000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e747261637420697320696e697469616c697a696e6700000000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000080000000000000000002000000000000000000000000000000000000200000008000000000000000007f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024980000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000007ecebdff00000000000000000000000000000000000000000000000000000000a457c2d600000000000000000000000000000000000000000000000000000000b71bcf8f00000000000000000000000000000000000000000000000000000000d505acce00000000000000000000000000000000000000000000000000000000d505accf00000000000000000000000000000000000000000000000000000000dd62ed3e00000000000000000000000000000000000000000000000000000000b71bcf9000000000000000000000000000000000000000000000000000000000c2eeeebd00000000000000000000000000000000000000000000000000000000a457c2d700000000000000000000000000000000000000000000000000000000a9059cbb00000000000000000000000000000000000000000000000000000000ae1f6aaf0000000000000000000000000000000000000000000000000000000095ce3e920000000000000000000000000000000000000000000000000000000095ce3e930000000000000000000000000000000000000000000000000000000095d89b41000000000000000000000000000000000000000000000000000000009a6ab870000000000000000000000000000000000000000000000000000000007ecebe000000000000000000000000000000000000000000000000000000000084b0196e000000000000000000000000000000000000000000000000000000008c2a993e000000000000000000000000000000000000000000000000000000003644e5140000000000000000000000000000000000000000000000000000000064e130ce0000000000000000000000000000000000000000000000000000000074f4f5460000000000000000000000000000000000000000000000000000000074f4f547000000000000000000000000000000000000000000000000000000007ba8be340000000000000000000000000000000000000000000000000000000064e130cf0000000000000000000000000000000000000000000000000000000070a08231000000000000000000000000000000000000000000000000000000003644e51500000000000000000000000000000000000000000000000000000000395093510000000000000000000000000000000000000000000000000000000044de240a0000000000000000000000000000000000000000000000000000000018160ddc0000000000000000000000000000000000000000000000000000000018160ddd0000000000000000000000000000000000000000000000000000000023b872dd00000000000000000000000000000000000000000000000000000000313ce5670000000000000000000000000000000000000000000000000000000006fdde0300000000000000000000000000000000000000000000000000000000095ea7b30000000000000000000000000000000000000000000000000000000013096a41000000000000000000000000ffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000020000000800000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d95539132020000020000000000000000000000000000000400000000000000000000000002000000000000000000000000000000000000400000000000000000000000006e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9000000000000000000000000000000000000000000000000ffffffffffffff1f0200000000000000000000000000000000000000000000000000000000000000190100000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000420000000000000000000000007fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffe045524332305065726d69743a20696e76616c6964207369676e61747572650000000000000000000000000000000000000000006400000000000000000000000045434453413a20696e76616c6964207369676e61747572650000000000000000756500000000000000000000000000000000000000000000000000000000000045434453413a20696e76616c6964207369676e6174757265202773272076616c000000000000000000000000000000000000008400000000000000000000000045524332305065726d69743a206578706972656420646561646c696e65000000000000000000000000000000000000000000000000000000ffffffffffffffff0ac76f01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000800000000000000000496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d508da5cb5b000000000000000000000000000000000000000000000000000000008e4a23d6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000b5ee06b1df56c38609138bc5e6ab13b03d3f7bd651deddee740dcb4de7a37e484a11f94e20a93c79f6ec743a1954ec4fc2c08429ae2122118bf234b2185c81b8b5ee06b1df56c38609138bc5e6ab13b03d3f7bd651deddee740dcb4de7a37e47bd58482287a32968eb5e762004c02828e8b12361317c896b31af08f87083ce5242a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31aebd58482287a32968eb5e762004c02828e8b12361317c896b31af08f87083ce51000000000000000000000000000000000000000000000000ffffffffffffffbf310000000000000000000000000000000000000000000000000000000000000068781146e01cefedca1b589f9c38fdc134bf06dc0686e99c63a67a6d05cf29529787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6ae68781146e01cefedca1b589f9c38fdc134bf06dc0686e99c63a67a6d05cf29515deacbdf27bb6d74bbde9afdfc388454374cc280d184baf1d69924f3ddf688ada2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c220977535deacbdf27bb6d74bbde9afdfc388454374cc280d184baf1d69924f3ddf688acffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000101000000000000000000000000000000000000000000000000000000000001000081e8e92e5873539605a102eddae7ed06d19bea042099a437cbc3644415eb740402000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000207a65726f00000000000000000000000000000000000000000000000000000045524332303a2064656372656173656420616c6c6f77616e63652062656c6f771806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000ff000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff9f95ce3e93000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80000000000000000000000000000000000000000000000000000000000000007ba8be3400000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000006e697469616c697a696e67000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069084a14490000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000004e487b7100000000000000000000000000000000000000000000000000000000d92e233d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100042f90b18400000000000000000000000000000000000000000000000000000000ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef397b33b307fc137878ebfc75b295289ec0ee25a31bb5bf034f33256fe8ea2aa645524332303a206d696e7420746f20746865207a65726f2061646472657373004549503731323a20556e696e697469616c697a656400000000000000000000000000000000000000000000000000000000000064000000800000000000000000000000000000000000000000000000000000000000000000ffffffffffffff80000000000000000000000000000000000000000000000000ffffffffffffffdf0f000000000000000000000000000000000000000000000000000000000000009a8a0592ac89c5ad3bc6df8224c17b485976f597df104ee20d0df415241f670b9b5b9a05e4726d8bb959f1440e05c6b8109443f2083bc4e386237d7654526553636500000000000000000000000000000000000000000000000000000000000045524332303a206275726e20616d6f756e7420657863656564732062616c616e730000000000000000000000000000000000000000000000000000000000000045524332303a206275726e2066726f6d20746865207a65726f206164647265730000000000000000000000000000000000000000000000000000000000ff000045524332303a20696e73756666696369656e7420616c6c6f77616e6365000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff00000000000000000000000000000000000000000000000100000000000000008c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925737300000000000000000000000000000000000000000000000000000000000045524332303a20617070726f766520746f20746865207a65726f206164647265726573730000000000000000000000000000000000000000000000000000000045524332303a20617070726f76652066726f6d20746865207a65726f20616464616c616e6365000000000000000000000000000000000000000000000000000045524332303a207472616e7366657220616d6f756e7420657863656564732062657373000000000000000000000000000000000000000000000000000000000045524332303a207472616e7366657220746f20746865207a65726f2061646472647265737300000000000000000000000000000000000000000000000000000045524332303a207472616e736665722066726f6d20746865207a65726f206164c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f000000000000000000000000000000000000000000000000ffffffffffffff3f751434384523b31fa83075f240480db907ca17f565881b19f98412122ec2e15c
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ 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.