Overview
S Balance
0 S
S Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
2692453 | 33 days ago | Contract Creation | 0 S |
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 Name:
FireBridge
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 20000 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.20; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import {Request, UserInfo, RequestLib, Operation, Status, ChainCode} from "./Common.sol"; import {BridgeStorage} from "./base/BridgeStorage.sol"; import {FToken} from "./base/FToken.sol"; import {BasePausableUpgradeable} from "./base/BasePausableUpgradeable.sol"; import {FeeModel} from "./FeeModel.sol"; contract FireBridge is BridgeStorage, BasePausableUpgradeable { using RequestLib for Request; using EnumerableSet for EnumerableSet.AddressSet; using EnumerableSet for EnumerableSet.Bytes32Set; event QualifiedUserAdded( address indexed _user, string _depositAddress, string _withdrawalAddress ); event QualifiedUserEdited( address indexed _user, string _depositAddress, string _withdrawalAddress ); event QualifiedUserLocked(address indexed _user); event QualifiedUserUnlocked(address indexed _user); event QualifiedUserRemoved(address indexed _user); event TokenSet(address indexed _token); event MinterSet(address indexed _minter); event FeeModelSet(address indexed _feeModel); event FeeRecipientSet(address indexed _feeRecipient); event DepositTxBlocked( bytes32 indexed _depositTxid, uint256 indexed _outputIndex ); event RequestAdded(bytes32 indexed _hash, Operation indexed op, Request _r); event RequestConfirmed(bytes32 indexed _hash); event FeePaid(address indexed _feeRecipient, uint256 indexed _feeAmount); event DstChainAdded(bytes32 indexed _dstChain); event DstChainRemoved(bytes32 indexed _dstChain); modifier onlyMinter() { require(msg.sender == minter, "Caller not minter"); _; } modifier onlyActiveQualifiedUser() { require(isQualifiedUser(msg.sender), "Caller not qualified"); require(!userInfo[msg.sender].locked, "Caller locked"); _; } bytes32 public immutable MAIN_CHAIN; constructor(address _owner, bytes32 _mainChain) { initialize(_owner); MAIN_CHAIN = _mainChain; } function initialize(address _owner) public initializer { __BasePausableUpgradeable_init(_owner); } function _splitFeeAndUpdate(Request memory r) internal view { uint256 _fee = FeeModel(feeModel).getFee(r); r.fee = _fee; r.amount = r.amount - _fee; } function _payFee(uint256 _fee, bool viaMint) internal { if (_fee == 0) return; address _feeRecipient = feeRecipient; if (viaMint) { FToken(fbtc).mint(_feeRecipient, _fee); } else { FToken(fbtc).payFee(msg.sender, _feeRecipient, _fee); } emit FeePaid(_feeRecipient, _fee); } function _addRequest(Request memory r) internal returns (bytes32 _hash) { require( r.nonce == requestHashes.length, "Fatal: nonce not equals array length" ); // Should never happen. _hash = r.getRequestHash(); // For CrosschainRequest: update extra with self hash. if (r.op == Operation.CrosschainRequest) { r.extra = abi.encode(_hash); } requestHashes.push(_hash); requests[_hash] = r; emit RequestAdded(_hash, r.op, r); } /// Owner methods. /// Qualified user management. function addQualifiedUser( address _user, string calldata _depositAddress, string calldata _withdrawalAddress ) external onlyOwner { require(qualifiedUsers.add(_user), "User already qualified"); require( depositAddressToUser[_depositAddress] == address(0), "Deposit address used" ); userInfo[_user] = UserInfo(false, _depositAddress, _withdrawalAddress); depositAddressToUser[_depositAddress] = _user; emit QualifiedUserAdded(_user, _depositAddress, _withdrawalAddress); } function editQualifiedUser( address _user, string calldata _depositAddress, string calldata _withdrawalAddress ) external onlyOwner { require(isQualifiedUser(_user), "User not qualified"); require(!userInfo[_user].locked, "User locked"); string memory _oldDepositAddress = userInfo[_user].depositAddress; if ( keccak256(bytes(_depositAddress)) != keccak256(bytes(_oldDepositAddress)) ) { require( depositAddressToUser[_depositAddress] == address(0), "Deposit address used" ); delete depositAddressToUser[_oldDepositAddress]; userInfo[_user].depositAddress = _depositAddress; depositAddressToUser[_depositAddress] = _user; } userInfo[_user].withdrawalAddress = _withdrawalAddress; emit QualifiedUserEdited(_user, _depositAddress, _withdrawalAddress); } function removeQualifiedUser(address _qualifiedUser) external onlyOwner { require(qualifiedUsers.remove(_qualifiedUser), "User not qualified"); string memory _depositAddress = userInfo[_qualifiedUser].depositAddress; delete depositAddressToUser[_depositAddress]; delete userInfo[_qualifiedUser]; emit QualifiedUserRemoved(_qualifiedUser); } function lockQualifiedUser(address _qualifiedUser) external onlyOwner { require(isQualifiedUser(_qualifiedUser), "User not qualified"); require(!userInfo[_qualifiedUser].locked, "User already locked"); userInfo[_qualifiedUser].locked = true; emit QualifiedUserLocked(_qualifiedUser); } function unlockQualifiedUser(address _qualifiedUser) external onlyOwner { require(isQualifiedUser(_qualifiedUser), "User not qualified"); require(userInfo[_qualifiedUser].locked, "User not locked"); userInfo[_qualifiedUser].locked = false; emit QualifiedUserUnlocked(_qualifiedUser); } /// Protocol configuration. function setToken(address _token) external onlyOwner { fbtc = _token; emit TokenSet(_token); } function setMinter(address _minter) external onlyOwner { minter = _minter; emit MinterSet(_minter); } function setFeeModel(address _feeModel) external onlyOwner { require(_feeModel != address(0), "Invalid feeModel"); feeModel = _feeModel; emit FeeModelSet(_feeModel); } function setFeeRecipient(address _feeRecipient) external onlyOwner { require(_feeRecipient != address(0), "Invalid feeRecipient"); feeRecipient = _feeRecipient; emit FeeRecipientSet(_feeRecipient); } function addDstChains(bytes32[] memory _dstChains) external onlyOwner { for (uint i = 0; i < _dstChains.length; i++) { bytes32 _dstChain = _dstChains[i]; require( _dstChain != MAIN_CHAIN && _dstChain != chain(), "Invalid dst chain" ); if (dstChains.add(_dstChain)) { emit DstChainAdded(_dstChain); } } } function removeDstChains(bytes32[] memory _dstChains) external onlyOwner { for (uint i = 0; i < _dstChains.length; i++) { bytes32 _dstChain = _dstChains[i]; if (dstChains.remove(_dstChain)) { emit DstChainRemoved(_dstChain); } } } /// @notice Mark the deposit tx invalid and reject the minting request if any. function blockDepositTx( bytes32 _depositTxid, uint256 _outputIndex ) external onlyOwner { bytes32 REJECTED = bytes32(uint256(0xdead)); bytes memory _depositTxData = abi.encode(_depositTxid, _outputIndex); bytes32 depositDataHash = keccak256(_depositTxData); bytes32 requestHash = usedDepositTxs[depositDataHash]; require(requestHash == bytes32(0), "Already confirmed or blocked"); // Mark it as rejected. usedDepositTxs[depositDataHash] = REJECTED; emit DepositTxBlocked(_depositTxid, _outputIndex); } /// QualifiedUser methods. /// @notice Initiate a FBTC minting request for the qualifiedUser. /// @param _amount The amount of FBTC to mint. /// @param _depositTxid The BTC deposit txid /// @param _outputIndex The transaction output index to user's deposit address. /// @return _hash The hash of the new created request. /// @return _r The full new created request. function addMintRequest( uint256 _amount, bytes32 _depositTxid, uint256 _outputIndex ) external onlyActiveQualifiedUser whenNotPaused returns (bytes32 _hash, Request memory _r) { // Check request. require(_amount > 0, "Invalid amount"); require(uint256(_depositTxid) != 0, "Empty deposit txid"); bytes memory _depositTxData = abi.encode(_depositTxid, _outputIndex); bytes32 depositDataHash = keccak256(_depositTxData); require( usedDepositTxs[depositDataHash] == bytes32(uint256(0)), "Used BTC deposit tx" ); // Compose request. Main -> Self _r = Request({ nonce: nonce(), op: Operation.Mint, srcChain: MAIN_CHAIN, srcAddress: bytes(userInfo[msg.sender].depositAddress), dstChain: chain(), dstAddress: abi.encode(msg.sender), amount: _amount, fee: 0, // To be set in `_splitFeeAndUpdate` extra: _depositTxData, status: Status.Pending }); // Split fee. _splitFeeAndUpdate(_r); // Save request. _hash = _addRequest(_r); } /// @notice Initiate a FBTC burning request for the qualifiedUser. /// @param _amount The amount of FBTC to burn. /// @return _hash The hash of the new created request. /// @return _r The full new created request. function addBurnRequest( uint256 _amount ) external onlyActiveQualifiedUser whenNotPaused returns (bytes32 _hash, Request memory _r) { // Check request. require(_amount > 0, "Invalid amount"); // Compose request. Self -> Main _r = Request({ nonce: nonce(), op: Operation.Burn, srcChain: chain(), srcAddress: abi.encode(msg.sender), dstChain: MAIN_CHAIN, dstAddress: bytes(userInfo[msg.sender].withdrawalAddress), amount: _amount, fee: 0, // To be set in `_splitFeeAndUpdate` extra: "", // Unset until confirmed status: Status.Pending }); // Split fee. _splitFeeAndUpdate(_r); // Save request. _hash = _addRequest(_r); // Pay fee _payFee(_r.fee, false); // Burn tokens. FToken(fbtc).burn(msg.sender, _r.amount); } /// Customer methods. /// @notice Initiate a FBTC cross-chain bridging request. /// @param _targetChain The target chain identifier. /// @param _targetAddress The encoded address on the target chain . /// @param _amount The amount of FBTC to cross-chain. /// @return _hash The hash of the new created request. /// @return _r The full new created request. function addCrosschainRequest( bytes32 _targetChain, bytes memory _targetAddress, uint256 _amount ) public whenNotPaused returns (bytes32 _hash, Request memory _r) { // Check request. require(_amount > 0, "Invalid amount"); require(dstChains.contains(_targetChain), "Target chain not allowed"); // Compose request. Self -> Target _r = Request({ nonce: nonce(), op: Operation.CrosschainRequest, srcChain: chain(), srcAddress: abi.encode(msg.sender), amount: _amount, dstChain: _targetChain, dstAddress: _targetAddress, fee: 0, extra: "", // Not include in hash. status: Status.Unused // Not used. }); // Split fee. _splitFeeAndUpdate(_r); // Save request. _hash = _addRequest(_r); // Pay fee _payFee(_r.fee, false); // Burn tokens. FToken(fbtc).burn(msg.sender, _r.amount); } /// @notice A more user-friendly interface to cross-chain to an /// EVM-compatible target chain. /// @param _targetChainId The chain id of target EVM chain. /// @param _targetAddress The target EVM address. /// @param _amount The amount of FBTC to cross-chain. /// @return _hash The hash of the new created request. /// @return _r The full new created request. function addEVMCrosschainRequest( uint256 _targetChainId, address _targetAddress, uint256 _amount ) external returns (bytes32 _hash, Request memory _r) { return addCrosschainRequest( bytes32(_targetChainId), abi.encode(_targetAddress), _amount ); } /// Minter methods. /// @notice Confirm the minting request. /// @param _hash The minting request hash. function confirmMintRequest( bytes32 _hash ) external onlyMinter whenNotPaused { // Check request. Request storage r = requests[_hash]; require(r.op == Operation.Mint, "Not Mint request"); uint256 _amount = r.amount; require(_amount > 0, "Invalid request amount"); require(r.status == Status.Pending, "Invalid request status"); // Check and update deposit data usage status. bytes32 depositDataHash = keccak256(r.extra); require( usedDepositTxs[depositDataHash] == bytes32(uint256(0)), "Used BTC deposit tx" ); usedDepositTxs[depositDataHash] = _hash; // Update status. r.status = Status.Confirmed; emit RequestConfirmed(_hash); // Mint tokens FToken(fbtc).mint(abi.decode(r.dstAddress, (address)), _amount); // Pay fee. _payFee(r.fee, true); } /// @notice Confirm the burning request. /// @param _hash The burning request id. /// @param _withdrawalTxid The BTC withdrawal txid /// @param _outputIndex The transaction output index to user's withdrawal address. function confirmBurnRequest( bytes32 _hash, bytes32 _withdrawalTxid, uint256 _outputIndex ) external onlyMinter whenNotPaused { // Check request. require(uint256(_withdrawalTxid) != 0, "Empty withdraw txid"); Request storage r = requests[_hash]; require(r.op == Operation.Burn, "Not Burn request"); require(r.amount > 0, "Invalid request amount"); require(r.status == Status.Pending, "Invalid request status"); bytes memory _withdrawalTxData = abi.encode( _withdrawalTxid, _outputIndex ); bytes32 _withdrawalDataHash = keccak256(_withdrawalTxData); require( usedWithdrawalTxs[_withdrawalDataHash] == bytes32(uint256(0)), "Used BTC withdrawal tx" ); usedWithdrawalTxs[_withdrawalDataHash] = _hash; // Update status. r.status = Status.Confirmed; r.extra = _withdrawalTxData; emit RequestConfirmed(_hash); } /// @notice Confirm the cross-chain request. /// @dev Most fields of the request should be the same as the one on /// source chain. Note: /// 1. The `op` is changed to `CrosschainConfirm` /// 2. The `nonce` is the source nonce, used to calculate source request hash. /// 3. The `status` should be `Unused` (0). /// 4. The `extra` should be 32 bytes length and contain the source request hash. /// @param r The full cross-chain request. function confirmCrosschainRequest( Request memory r ) external onlyMinter whenNotPaused { // Check request. require(r.amount > 0, "Invalid request amount"); require(r.dstChain == chain(), "Dst chain not match"); require( r.op == Operation.CrosschainConfirm, "Not CrosschainConfirm request" ); require(r.status == Status.Unused, "Status should not be used"); require(r.extra.length == 32, "Invalid extra: not valid bytes32"); require( r.dstAddress.length == 32, "Invalid dstAddress: not 32 bytes length" ); require( abi.decode(r.dstAddress, (uint256)) <= type(uint160).max, "Invalid dstAddress: not address" ); bytes32 srcHash = abi.decode(r.extra, (bytes32)); // Set to request to calc hash. require( r.getCrossSourceRequestHash() == srcHash, "Source request hash is incorrect" ); require( crosschainRequestConfirmation[srcHash] == bytes32(0), "Source request already confirmed" ); // Save request. r.nonce = nonce(); // Override src nonce to dst nonce. bytes32 _dsthash = _addRequest(r); crosschainRequestConfirmation[srcHash] = _dsthash; // Mint tokens. FToken(fbtc).mint(abi.decode(r.dstAddress, (address)), r.amount); } /// View functions. /// @notice The unique chain identifier in FBTC system. function chain() public view returns (bytes32) { return ChainCode.getSelfChainCode(); } /// @notice The next request id function nonce() public view returns (uint128) { require( requestHashes.length < type(uint128).max, "Fatal: nonce overflow" ); // Unlikely happens. return uint128(requestHashes.length); } /// @notice Check whether the address is qualified function isQualifiedUser(address _user) public view returns (bool) { return qualifiedUsers.contains(_user); } /// @notice Check whether the address is qualified and active function isActiveUser(address _user) public view returns (bool) { return isQualifiedUser(_user) && !userInfo[_user].locked; } /// @notice Get all qualified users function getQualifiedUsers() external view returns (address[] memory) { return qualifiedUsers.values(); } /// @notice Get all active users function getActiveUsers() external view returns (address[] memory _users) { uint256 activeCount = 0; for (uint256 i = 0; i < qualifiedUsers.length(); ++i) { UserInfo storage info = userInfo[qualifiedUsers.at(i)]; if (!info.locked) { activeCount += 1; } } _users = new address[](activeCount); uint256 j = 0; for (uint256 i = 0; i < qualifiedUsers.length(); ++i) { address _user = qualifiedUsers.at(i); UserInfo storage info = userInfo[_user]; if (!info.locked) { _users[j++] = _user; } } } /// @notice Get qualified user information. function getQualifiedUserInfo( address _user ) external view returns (UserInfo memory info) { info = userInfo[_user]; } /// @notice Get qualified user information. function getValidDstChains() external view returns (bytes32[] memory) { return dstChains.values(); } /// @notice Get request by the index a.k.a the id. /// @param _id The index. /// @return r The returned request. function getRequestById( uint256 _id ) external view returns (Request memory r) { require(_id < requestHashes.length, "Request not exists"); r = requests[requestHashes[_id]]; } /// @notice Get multiple requests by an id range. /// @param _start The start index. /// @param _end The end index. /// @return rs The returned requests. function getRequestsByIdRange( uint256 _start, uint256 _end ) external view returns (Request[] memory rs) { uint256 maxIndex = requestHashes.length - 1; if (_end > maxIndex) _end = maxIndex; require(_start <= _end, "start should <= end"); uint256 len = _end - _start + 1; rs = new Request[](len); for (uint i = 0; i < len; i++) { rs[i] = requests[requestHashes[i + _start]]; } } /// @notice Get request by hash /// @param _hash The hash /// @return r The returned request. function getRequestByHash( bytes32 _hash ) public view returns (Request memory r) { r = requests[_hash]; require(r.op != Operation.Nop, "Request not exists"); } /// @notice Get multiple requests by hashes. /// @param _hashes The hash list /// @return rs The returned requests. function getRequestsByHashes( bytes32[] calldata _hashes ) external view returns (Request[] memory rs) { rs = new Request[](_hashes.length); for (uint i = 0; i < _hashes.length; i++) { rs[i] = getRequestByHash(_hashes[i]); } } /// @notice Calculate hash of the request. /// @param _r The Request to hash /// @return _hash The hash result function calculateRequestHash( Request memory _r ) external pure returns (bytes32 _hash) { _hash = _r.getRequestHash(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position is the index of the value in the `values` array plus 1. // Position 0 is used to mean a value is not in the set. mapping(bytes32 value => uint256) _positions; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._positions[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We cache the value's position to prevent multiple reads from the same storage slot uint256 position = set._positions[value]; if (position != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the lastValue to the index where the value to delete is set._values[valueIndex] = lastValue; // Update the tracked position of the lastValue (that was just moved) set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); // Delete the tracked position for the deleted slot delete set._positions[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._positions[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.20; enum Operation { Nop, // starts from 1. Mint, Burn, CrosschainRequest, CrosschainConfirm } enum Status { Unused, Pending, Confirmed, Rejected } struct Request { Operation op; Status status; uint128 nonce; // Those can be packed into one slot in evm storage. bytes32 srcChain; bytes srcAddress; bytes32 dstChain; bytes dstAddress; uint256 amount; // Transfer value without fee. uint256 fee; bytes extra; } struct UserInfo { bool locked; string depositAddress; string withdrawalAddress; } library ChainCode { // For EVM chains, the chain code is chain id in bytes32 format. bytes32 constant ETH = 0x0000000000000000000000000000000000000000000000000000000000000001; bytes32 constant MANTLE = 0x0000000000000000000000000000000000000000000000000000000000001388; // Other chains. bytes32 constant BTC = 0x0100000000000000000000000000000000000000000000000000000000000000; bytes32 constant SOLANA = 0x0200000000000000000000000000000000000000000000000000000000000000; // For test. bytes32 constant XTN = 0x0110000000000000000000000000000000000000000000000000000000000000; function getSelfChainCode() internal view returns (bytes32) { return bytes32(block.chainid); } } library RequestLib { /// @dev This request hash should be unique across all chains. /// op nonce srcChain dstChain /// (1) Mint: 1 nonce BTC chainid ... /// (2) Burn: 2 nonce chainid BTC ... /// (3) Cross: 3 nonce chainid dst ... /// (4) Cross confirm: 4 nonce src chainid ... /// On the same chain: /// The `nonce` differs /// On different chains: /// The `chain.id` differs or the `op` differs function getRequestHash( Request memory r ) internal pure returns (bytes32 _hash) { _hash = keccak256( abi.encode( r.op, r.nonce, r.srcChain, r.srcAddress, r.dstChain, r.dstAddress, r.amount, r.fee, r.extra // For Burn, this should be none. ) ); } function getCrossSourceRequestHash( Request memory src ) internal pure returns (bytes32 _hash) { // Save. bytes memory extra = src.extra; // Set temperary data to calculate hash. src.op = Operation.CrosschainRequest; src.extra = ""; // clear _hash = getRequestHash(src); // Restore. src.op = Operation.CrosschainConfirm; src.extra = extra; } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.20; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import {Request, UserInfo} from "../Common.sol"; contract BridgeStorage { address public minter; address public fbtc; EnumerableSet.AddressSet internal qualifiedUsers; EnumerableSet.Bytes32Set internal dstChains; mapping(address qualifiedUser => UserInfo info) public userInfo; mapping(string depositAddress => address qualifiedUser) public depositAddressToUser; // For uniqueness check bytes32[] public requestHashes; mapping(bytes32 _hash => Request r) public requests; mapping(bytes32 bytesHash => bytes32 requestHash) public usedDepositTxs; mapping(bytes32 bytesHash => bytes32 requestHash) public usedWithdrawalTxs; mapping(bytes32 srcHash => bytes32 dstHash) public crosschainRequestConfirmation; address public feeModel; address public feeRecipient; uint256[50] private __gap; }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.20; import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import {BasePausableUpgradeable} from "./BasePausableUpgradeable.sol"; abstract contract FToken is ERC20Upgradeable, BasePausableUpgradeable { address public bridge; mapping(address user => bool blocked) public userBlocked; event UserLocked(address indexed user); event UserUnlocked(address indexed user); event BridgeUpdated(address indexed newBridge, address indexed oldBridge); modifier onlyBridge() { require(msg.sender == bridge, "Caller not bridge"); _; } function __FToken_init( address _owner, address _bridge, string memory _name, string memory _symbol ) internal onlyInitializing { __ERC20_init(_name, _symbol); __BasePausableUpgradeable_init(_owner); bridge = _bridge; } function lockUser(address _user) external onlyOwner { userBlocked[_user] = true; emit UserLocked(_user); } function unlockUser(address _user) external onlyOwner { userBlocked[_user] = false; emit UserUnlocked(_user); } function setBridge(address _bridge) external onlyOwner { address oldBridge = bridge; bridge = _bridge; emit BridgeUpdated(_bridge, oldBridge); } function mint(address to, uint256 amount) external onlyBridge { _mint(to, amount); } function burn(address from, uint256 amount) external onlyBridge { _burn(from, amount); } function payFee( address payer, address feeRecipient, uint256 amount ) external onlyBridge { _transfer(payer, feeRecipient, amount); } function _update( address from, address to, uint256 value ) internal override whenNotPaused { require(!userBlocked[from], "from is blocked"); require(!userBlocked[to], "to is blocked"); super._update(from, to, value); } uint256[50] private __gap; }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.20; import {BaseOwnableUpgradeable} from "./BaseOwnableUpgradeable.sol"; import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; abstract contract BasePausableUpgradeable is BaseOwnableUpgradeable, PausableUpgradeable { function __BasePausableUpgradeable_init( address initialOwner ) internal onlyInitializing { __BaseOwnableUpgradeable_init(initialOwner); __Pausable_init(); } function pause() external onlyOwner { _pause(); } function unpause() external onlyOwner { _unpause(); } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.20; import {Operation, Request} from "./Common.sol"; import {BaseOwnableUpgradeable} from "./base/BaseOwnableUpgradeable.sol"; contract FeeModel is BaseOwnableUpgradeable { uint32 public constant FEE_RATE_BASE = 1_000_000; struct FeeTier { uint224 amountTier; // Amount tier. uint32 feeRate; // Fee rate. } struct FeeConfig { uint256 maxFee; // Maximum fee. uint256 minFee; // Minimum fee. FeeTier[] tiers; // Order by amount asc. } mapping(Operation op => FeeConfig cfg) defaultFeeConfig; mapping(bytes32 dstChain => FeeConfig cfg) crosschainFeeConfig; mapping(address user => FeeConfig cfg) userBurnFeeConfig; event DefaultFeeConfigSet(Operation indexed _op, FeeConfig _config); event CrosschainFeeConfigSet(bytes32 indexed _chain, FeeConfig _config); event UserBurnFeeConfigSet(address indexed _user, FeeConfig _config); constructor(address _owner) { initialize(_owner); } function initialize(address _owner) public initializer { __BaseOwnableUpgradeable_init(_owner); } function _validateOp(Operation op) internal pure { require( op == Operation.Mint || op == Operation.Burn || op == Operation.CrosschainRequest, "Invalid op" ); } function _getFee( uint256 _amount, FeeConfig storage _config ) internal view returns (uint256 _fee) { uint256 minFee = _config.minFee; require(minFee < _amount, "amount lower than minimal fee"); uint256 length = _config.tiers.length; require(length > 0, "Empty fee config"); for (uint i = 0; i < length; i++) { FeeTier storage tier = _config.tiers[i]; if (i == length - 1 || _amount < uint256(tier.amountTier)) { // Note: Use `<` instead of `<=`, the border is not included. _fee = (uint256(tier.feeRate) * _amount) / FEE_RATE_BASE; break; } } // Cap the fee. if (_fee < minFee) { _fee = minFee; } uint256 maxFee = _config.maxFee; if (_fee > maxFee) { _fee = maxFee; } } function _validateConfig(FeeConfig calldata _config) internal pure { uint224 prevAmount = 0; require( _config.minFee <= 0.03 * 1e8, "Minimium fee should not exceed 0.03 FBTC" ); require( _config.minFee <= _config.maxFee, "Minimium fee should not exceed maximum fee" ); require(_config.tiers.length > 0, "Empty fee config"); for (uint i = 0; i < _config.tiers.length; i++) { FeeTier calldata tier = _config.tiers[i]; uint224 amount = tier.amountTier; require(amount >= prevAmount, "Tiers not in order"); prevAmount = amount; require( tier.feeRate <= FEE_RATE_BASE / 100, "Fee rate too high, > 1%" ); if (i == _config.tiers.length - 1) { require( amount == type(uint224).max, "The last tier should be uint224.max" ); } } } function setDefaultFeeConfig( Operation _op, FeeConfig calldata _config ) external onlyOwner { _validateOp(_op); _validateConfig(_config); defaultFeeConfig[_op] = _config; emit DefaultFeeConfigSet(_op, _config); } function setCrosschainFeeConfig( bytes32 _dstChain, FeeConfig calldata _config ) external onlyOwner { _validateConfig(_config); crosschainFeeConfig[_dstChain] = _config; emit CrosschainFeeConfigSet(_dstChain, _config); } function setUserBurnFeeConfig( address _user, FeeConfig calldata _config ) external onlyOwner { _validateConfig(_config); userBurnFeeConfig[_user] = _config; emit UserBurnFeeConfigSet(_user, _config); } // View functions. function getFee(Request calldata r) external view returns (uint256 _fee) { _validateOp(r.op); FeeConfig storage _config; if (r.op == Operation.CrosschainRequest) { _config = crosschainFeeConfig[r.dstChain]; if (_config.tiers.length > 0) return _getFee(r.amount, _config); } else if (r.op == Operation.Burn) { address _user = abi.decode(r.srcAddress, (address)); _config = userBurnFeeConfig[_user]; if (_config.tiers.length > 0) return _getFee(r.amount, _config); } _config = defaultFeeConfig[r.op]; if (_config.tiers.length > 0) return _getFee(r.amount, _config); revert("Fee config not set"); } function getDefaultFeeConfig( Operation _op ) external view returns (FeeConfig memory _config) { _config = defaultFeeConfig[_op]; require(_config.tiers.length > 0, "Fee config not set"); } function getCrosschainFeeConfig( bytes32 _dstChain ) external view returns (FeeConfig memory _config) { _config = crosschainFeeConfig[_dstChain]; require(_config.tiers.length > 0, "Fee config not set"); } function getUserBurnFeeConfig( address _user ) external view returns (FeeConfig memory _config) { _config = userBurnFeeConfig[_user]; require(_config.tiers.length > 0, "Fee config not set"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import {ContextUpgradeable} from "../../utils/ContextUpgradeable.sol"; import {IERC20Errors} from "@openzeppelin/contracts/interfaces/draft-IERC6093.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}. * * 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. */ abstract contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20, IERC20Metadata, IERC20Errors { /// @custom:storage-location erc7201:openzeppelin.storage.ERC20 struct ERC20Storage { mapping(address account => uint256) _balances; mapping(address account => mapping(address spender => uint256)) _allowances; uint256 _totalSupply; string _name; string _symbol; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC20")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant ERC20StorageLocation = 0x52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00; function _getERC20Storage() private pure returns (ERC20Storage storage $) { assembly { $.slot := ERC20StorageLocation } } /** * @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 { ERC20Storage storage $ = _getERC20Storage(); $._name = name_; $._symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { ERC20Storage storage $ = _getERC20Storage(); return $._name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { ERC20Storage storage $ = _getERC20Storage(); 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 returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { ERC20Storage storage $ = _getERC20Storage(); return $._totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { ERC20Storage storage $ = _getERC20Storage(); return $._balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { ERC20Storage storage $ = _getERC20Storage(); return $._allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` 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 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); 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 `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` 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. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { ERC20Storage storage $ = _getERC20Storage(); if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows $._totalSupply += value; } else { uint256 fromBalance = $._balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. $._balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. $._totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. $._balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` 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. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { ERC20Storage storage $ = _getERC20Storage(); if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } $._allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.20; import {IERC20, SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; abstract contract BaseOwnableUpgradeable is Ownable2StepUpgradeable, UUPSUpgradeable { using SafeERC20 for IERC20; function __BaseOwnableUpgradeable_init( address initialOwner ) internal onlyInitializing { __Ownable_init(initialOwner); __Ownable2Step_init(); __UUPSUpgradeable_init(); } function renounceOwnership() public override { revert("Unable to renounce ownership"); } function _authorizeUpgrade( address newImplementation ) internal override onlyOwner {} /// @notice Rescue and transfer assets locked in this contract. function rescue(address token, address to) external onlyOwner { if (token == address(0)) { (bool success, ) = payable(to).call{value: address(this).balance}( "" ); require(success, "ETH transfer failed"); } else { IERC20(token).safeTransfer( to, IERC20(token).balanceOf(address(this)) ); } } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Pausable struct PausableStorage { bool _paused; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Pausable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300; function _getPausableStorage() private pure returns (PausableStorage storage $) { assembly { $.slot := PausableStorageLocation } } /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); /** * @dev The operation failed because the contract is paused. */ error EnforcedPause(); /** * @dev The operation failed because the contract is not paused. */ error ExpectedPause(); /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { PausableStorage storage $ = _getPausableStorage(); $._paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { PausableStorage storage $ = _getPausableStorage(); return $._paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { if (paused()) { revert EnforcedPause(); } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { if (!paused()) { revert ExpectedPause(); } } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { PausableStorage storage $ = _getPausableStorage(); $._paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { PausableStorage storage $ = _getPausableStorage(); $._paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` 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 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ interface IERC20Metadata is IERC20 { /** * @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 v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @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 Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 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 in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._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 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._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() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @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 { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC20Permit} from "../extensions/IERC20Permit.sol"; import {Address} from "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol) pragma solidity ^0.8.20; import {OwnableUpgradeable} from "./OwnableUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is specified at deployment time in the constructor for `Ownable`. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable2Step struct Ownable2StepStorage { address _pendingOwner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable2Step")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant Ownable2StepStorageLocation = 0x237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00; function _getOwnable2StepStorage() private pure returns (Ownable2StepStorage storage $) { assembly { $.slot := Ownable2StepStorageLocation } } event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); function __Ownable2Step_init() internal onlyInitializing { } function __Ownable2Step_init_unchained() internal onlyInitializing { } /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { Ownable2StepStorage storage $ = _getOwnable2StepStorage(); return $._pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { Ownable2StepStorage storage $ = _getOwnable2StepStorage(); $._pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { Ownable2StepStorage storage $ = _getOwnable2StepStorage(); delete $._pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); if (pendingOwner() != sender) { revert OwnableUnauthorizedAccount(sender); } _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.20; import {IERC1822Proxiable} from "@openzeppelin/contracts/interfaces/draft-IERC1822.sol"; import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol"; import {Initializable} from "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. */ abstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable address private immutable __self = address(this); /** * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)` * and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called, * while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string. * If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function * during an upgrade. */ string public constant UPGRADE_INTERFACE_VERSION = "5.0.0"; /** * @dev The call is from an unauthorized context. */ error UUPSUnauthorizedCallContext(); /** * @dev The storage `slot` is unsupported as a UUID. */ error UUPSUnsupportedProxiableUUID(bytes32 slot); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { _checkProxy(); _; } /** * @dev Check that the execution is not being performed through a delegate call. This allows a function to be * callable on the implementing contract but not through proxies. */ modifier notDelegated() { _checkNotDelegated(); _; } function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate the implementation's compatibility when performing an upgrade. * * 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. This is guaranteed by the `notDelegated` modifier. */ function proxiableUUID() external view virtual notDelegated returns (bytes32) { return ERC1967Utils.IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. * * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data); } /** * @dev Reverts if the execution is not performed via delegatecall or the execution * context is not of a proxy with an ERC1967-compliant implementation pointing to self. * See {_onlyProxy}. */ function _checkProxy() internal view virtual { if ( address(this) == __self || // Must be called through delegatecall ERC1967Utils.getImplementation() != __self // Must be called through an active proxy ) { revert UUPSUnauthorizedCallContext(); } } /** * @dev Reverts if the execution is performed via delegatecall. * See {notDelegated}. */ function _checkNotDelegated() internal view virtual { if (address(this) != __self) { // Must not be called through delegatecall revert UUPSUnauthorizedCallContext(); } } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; /** * @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call. * * As a security check, {proxiableUUID} is invoked in the new implementation, and the return value * is expected to be the implementation slot in ERC1967. * * Emits an {IERC1967-Upgraded} event. */ function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private { try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) { revert UUPSUnsupportedProxiableUUID(slot); } ERC1967Utils.upgradeToAndCall(newImplementation, data); } catch { // The implementation is not UUPS revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @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 IERC20Permit { /** * @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 v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @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 or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * 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. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @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`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) 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 FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.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. * * The initial owner is set to the address provided by the deployer. 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 OwnableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable struct OwnableStorage { address _owner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; function _getOwnableStorage() private pure returns (OwnableStorage storage $) { assembly { $.slot := OwnableStorageLocation } } /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ function __Ownable_init(address initialOwner) internal onlyInitializing { __Ownable_init_unchained(initialOwner); } function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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) { OwnableStorage storage $ = _getOwnableStorage(); return $._owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { OwnableStorage storage $ = _getOwnableStorage(); address oldOwner = $._owner; $._owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.20; /** * @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 v5.0.0) (proxy/ERC1967/ERC1967Utils.sol) pragma solidity ^0.8.20; import {IBeacon} from "../beacon/IBeacon.sol"; import {Address} from "../../utils/Address.sol"; import {StorageSlot} from "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. */ library ERC1967Utils { // We re-declare ERC-1967 events here because they can't be used directly from IERC1967. // This will be fixed in Solidity 0.8.21. At that point we should remove these events. /** * @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); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev The `implementation` of the proxy is invalid. */ error ERC1967InvalidImplementation(address implementation); /** * @dev The `admin` of the proxy is invalid. */ error ERC1967InvalidAdmin(address admin); /** * @dev The `beacon` of the proxy is invalid. */ error ERC1967InvalidBeacon(address beacon); /** * @dev An upgrade function sees `msg.value > 0` that may be lost. */ error ERC1967NonPayable(); /** * @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 { if (newImplementation.code.length == 0) { revert ERC1967InvalidImplementation(newImplementation); } StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Performs implementation upgrade with additional setup call if data is nonempty. * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected * to avoid stuck value in the contract. * * Emits an {IERC1967-Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); if (data.length > 0) { Address.functionDelegateCall(newImplementation, data); } else { _checkNonPayable(); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Returns the current admin. * * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` */ 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 { if (newAdmin == address(0)) { revert ERC1967InvalidAdmin(address(0)); } StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {IERC1967-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 the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore 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 { if (newBeacon.code.length == 0) { revert ERC1967InvalidBeacon(newBeacon); } StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon; address beaconImplementation = IBeacon(newBeacon).implementation(); if (beaconImplementation.code.length == 0) { revert ERC1967InvalidImplementation(beaconImplementation); } } /** * @dev Change the beacon and trigger a setup call if data is nonempty. * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected * to avoid stuck value in the contract. * * Emits an {IERC1967-BeaconUpgraded} event. * * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for * efficiency. */ function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } else { _checkNonPayable(); } } /** * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract * if an upgrade doesn't perform an initialization call. */ function _checkNonPayable() private { if (msg.value > 0) { revert ERC1967NonPayable(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.20; /** * @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. * * {UpgradeableBeacon} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.20; /** * @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(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` */ 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 } } }
{ "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/" ], "optimizer": { "enabled": true, "runs": 20000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "viaIR": true, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"bytes32","name":"_mainChain","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_depositTxid","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"_outputIndex","type":"uint256"}],"name":"DepositTxBlocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_dstChain","type":"bytes32"}],"name":"DstChainAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_dstChain","type":"bytes32"}],"name":"DstChainRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_feeModel","type":"address"}],"name":"FeeModelSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_feeRecipient","type":"address"},{"indexed":true,"internalType":"uint256","name":"_feeAmount","type":"uint256"}],"name":"FeePaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_feeRecipient","type":"address"}],"name":"FeeRecipientSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"}],"name":"MinterSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"string","name":"_depositAddress","type":"string"},{"indexed":false,"internalType":"string","name":"_withdrawalAddress","type":"string"}],"name":"QualifiedUserAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"string","name":"_depositAddress","type":"string"},{"indexed":false,"internalType":"string","name":"_withdrawalAddress","type":"string"}],"name":"QualifiedUserEdited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"}],"name":"QualifiedUserLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"}],"name":"QualifiedUserRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"}],"name":"QualifiedUserUnlocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_hash","type":"bytes32"},{"indexed":true,"internalType":"enum Operation","name":"op","type":"uint8"},{"components":[{"internalType":"enum Operation","name":"op","type":"uint8"},{"internalType":"enum Status","name":"status","type":"uint8"},{"internalType":"uint128","name":"nonce","type":"uint128"},{"internalType":"bytes32","name":"srcChain","type":"bytes32"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes32","name":"dstChain","type":"bytes32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bytes","name":"extra","type":"bytes"}],"indexed":false,"internalType":"struct Request","name":"_r","type":"tuple"}],"name":"RequestAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"RequestConfirmed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_token","type":"address"}],"name":"TokenSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"MAIN_CHAIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"addBurnRequest","outputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"components":[{"internalType":"enum Operation","name":"op","type":"uint8"},{"internalType":"enum Status","name":"status","type":"uint8"},{"internalType":"uint128","name":"nonce","type":"uint128"},{"internalType":"bytes32","name":"srcChain","type":"bytes32"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes32","name":"dstChain","type":"bytes32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bytes","name":"extra","type":"bytes"}],"internalType":"struct Request","name":"_r","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_targetChain","type":"bytes32"},{"internalType":"bytes","name":"_targetAddress","type":"bytes"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"addCrosschainRequest","outputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"components":[{"internalType":"enum Operation","name":"op","type":"uint8"},{"internalType":"enum Status","name":"status","type":"uint8"},{"internalType":"uint128","name":"nonce","type":"uint128"},{"internalType":"bytes32","name":"srcChain","type":"bytes32"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes32","name":"dstChain","type":"bytes32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bytes","name":"extra","type":"bytes"}],"internalType":"struct Request","name":"_r","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_dstChains","type":"bytes32[]"}],"name":"addDstChains","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_targetChainId","type":"uint256"},{"internalType":"address","name":"_targetAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"addEVMCrosschainRequest","outputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"components":[{"internalType":"enum Operation","name":"op","type":"uint8"},{"internalType":"enum Status","name":"status","type":"uint8"},{"internalType":"uint128","name":"nonce","type":"uint128"},{"internalType":"bytes32","name":"srcChain","type":"bytes32"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes32","name":"dstChain","type":"bytes32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bytes","name":"extra","type":"bytes"}],"internalType":"struct Request","name":"_r","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32","name":"_depositTxid","type":"bytes32"},{"internalType":"uint256","name":"_outputIndex","type":"uint256"}],"name":"addMintRequest","outputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"components":[{"internalType":"enum Operation","name":"op","type":"uint8"},{"internalType":"enum Status","name":"status","type":"uint8"},{"internalType":"uint128","name":"nonce","type":"uint128"},{"internalType":"bytes32","name":"srcChain","type":"bytes32"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes32","name":"dstChain","type":"bytes32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bytes","name":"extra","type":"bytes"}],"internalType":"struct Request","name":"_r","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"string","name":"_depositAddress","type":"string"},{"internalType":"string","name":"_withdrawalAddress","type":"string"}],"name":"addQualifiedUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_depositTxid","type":"bytes32"},{"internalType":"uint256","name":"_outputIndex","type":"uint256"}],"name":"blockDepositTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"enum Operation","name":"op","type":"uint8"},{"internalType":"enum Status","name":"status","type":"uint8"},{"internalType":"uint128","name":"nonce","type":"uint128"},{"internalType":"bytes32","name":"srcChain","type":"bytes32"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes32","name":"dstChain","type":"bytes32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bytes","name":"extra","type":"bytes"}],"internalType":"struct Request","name":"_r","type":"tuple"}],"name":"calculateRequestHash","outputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"chain","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"internalType":"bytes32","name":"_withdrawalTxid","type":"bytes32"},{"internalType":"uint256","name":"_outputIndex","type":"uint256"}],"name":"confirmBurnRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"enum Operation","name":"op","type":"uint8"},{"internalType":"enum Status","name":"status","type":"uint8"},{"internalType":"uint128","name":"nonce","type":"uint128"},{"internalType":"bytes32","name":"srcChain","type":"bytes32"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes32","name":"dstChain","type":"bytes32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bytes","name":"extra","type":"bytes"}],"internalType":"struct Request","name":"r","type":"tuple"}],"name":"confirmCrosschainRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"confirmMintRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"srcHash","type":"bytes32"}],"name":"crosschainRequestConfirmation","outputs":[{"internalType":"bytes32","name":"dstHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"depositAddress","type":"string"}],"name":"depositAddressToUser","outputs":[{"internalType":"address","name":"qualifiedUser","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"string","name":"_depositAddress","type":"string"},{"internalType":"string","name":"_withdrawalAddress","type":"string"}],"name":"editQualifiedUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fbtc","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeModel","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getActiveUsers","outputs":[{"internalType":"address[]","name":"_users","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getQualifiedUserInfo","outputs":[{"components":[{"internalType":"bool","name":"locked","type":"bool"},{"internalType":"string","name":"depositAddress","type":"string"},{"internalType":"string","name":"withdrawalAddress","type":"string"}],"internalType":"struct UserInfo","name":"info","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getQualifiedUsers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"getRequestByHash","outputs":[{"components":[{"internalType":"enum Operation","name":"op","type":"uint8"},{"internalType":"enum Status","name":"status","type":"uint8"},{"internalType":"uint128","name":"nonce","type":"uint128"},{"internalType":"bytes32","name":"srcChain","type":"bytes32"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes32","name":"dstChain","type":"bytes32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bytes","name":"extra","type":"bytes"}],"internalType":"struct Request","name":"r","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"getRequestById","outputs":[{"components":[{"internalType":"enum Operation","name":"op","type":"uint8"},{"internalType":"enum Status","name":"status","type":"uint8"},{"internalType":"uint128","name":"nonce","type":"uint128"},{"internalType":"bytes32","name":"srcChain","type":"bytes32"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes32","name":"dstChain","type":"bytes32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bytes","name":"extra","type":"bytes"}],"internalType":"struct Request","name":"r","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_hashes","type":"bytes32[]"}],"name":"getRequestsByHashes","outputs":[{"components":[{"internalType":"enum Operation","name":"op","type":"uint8"},{"internalType":"enum Status","name":"status","type":"uint8"},{"internalType":"uint128","name":"nonce","type":"uint128"},{"internalType":"bytes32","name":"srcChain","type":"bytes32"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes32","name":"dstChain","type":"bytes32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bytes","name":"extra","type":"bytes"}],"internalType":"struct Request[]","name":"rs","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_end","type":"uint256"}],"name":"getRequestsByIdRange","outputs":[{"components":[{"internalType":"enum Operation","name":"op","type":"uint8"},{"internalType":"enum Status","name":"status","type":"uint8"},{"internalType":"uint128","name":"nonce","type":"uint128"},{"internalType":"bytes32","name":"srcChain","type":"bytes32"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes32","name":"dstChain","type":"bytes32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bytes","name":"extra","type":"bytes"}],"internalType":"struct Request[]","name":"rs","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getValidDstChains","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"isActiveUser","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"isQualifiedUser","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_qualifiedUser","type":"address"}],"name":"lockQualifiedUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_dstChains","type":"bytes32[]"}],"name":"removeDstChains","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_qualifiedUser","type":"address"}],"name":"removeQualifiedUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"requestHashes","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"requests","outputs":[{"internalType":"enum Operation","name":"op","type":"uint8"},{"internalType":"enum Status","name":"status","type":"uint8"},{"internalType":"uint128","name":"nonce","type":"uint128"},{"internalType":"bytes32","name":"srcChain","type":"bytes32"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes32","name":"dstChain","type":"bytes32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bytes","name":"extra","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"rescue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeModel","type":"address"}],"name":"setFeeModel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeRecipient","type":"address"}],"name":"setFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"setToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_qualifiedUser","type":"address"}],"name":"unlockQualifiedUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"bytesHash","type":"bytes32"}],"name":"usedDepositTxs","outputs":[{"internalType":"bytes32","name":"requestHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"bytesHash","type":"bytes32"}],"name":"usedWithdrawalTxs","outputs":[{"internalType":"bytes32","name":"requestHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"qualifiedUser","type":"address"}],"name":"userInfo","outputs":[{"internalType":"bool","name":"locked","type":"bool"},{"internalType":"string","name":"depositAddress","type":"string"},{"internalType":"string","name":"withdrawalAddress","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c034620002c1576200573e906001600160401b0390601f38849003908101601f191682019083821183831017620002c65780839160409687948552833981010312620002c15780516001600160a01b038082169390929091849003620002c1576020015192306080527ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0092835460ff81881c161593811680159081620002b8575b6001149081620002ad575b159081620002a3575b5062000292576001600160401b0319811660011785558362000274575b50620000dd620002dc565b620000e7620002dc565b620000f1620002dc565b620000fb620002dc565b81156200025c577f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03199081169091557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805491821684179055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a36200018e620002dc565b62000198620002dc565b620001a2620002dc565b620001ac620002dc565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff191690556200021b575b5060a0525161541f90816200031f82396080518181816119fb0152611cde015260a051818181610cbf015281816118e50152818161227f01526134ee0152f35b68ff00000000000000001981541690557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d26020835160018152a138620001db565b8551631e4fbdf760e01b815260006004820152602490fd5b6001600160481b0319166801000000000000000117845538620000d2565b865163f92ee8a960e01b8152600490fd5b90501538620000b5565b303b159150620000ac565b859150620000a1565b600080fd5b634e487b7160e01b600052604160045260246000fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156200030c57565b604051631afcd79f60e31b8152600490fdfe60806040908082526004908136101561001757600080fd5b60009060e08235811c91826304c3f117146137385750816307546172146137055781630fd0a58e14613692578163144fa6d7146136095781631521bc261461341e5781631959a002146133805781631d710bd114612f555781632313e70e14612c6c57816326757b7314612b565781632bf90baa146129145781632e2ab109146127205781632eb3e1d1146126eb57816336436a021461238c57816336d9c591146123355781633a8c6bbb146121725781633e73ce45146121385781633f4ba83a146120765781634202d214146120015781634690484014611fcc578163471ea60714611f975781634803ad8b14611f755781634ee958c514611f4c5781634f1ef28614611c905781634fdf5d1d14611a7057816352d1902d146119d057816353681f961461194b5781635c975abb146119085781635fc07732146118cd5781636b36cfa114611829578163715018a6146117d45781637216ac75146117ab57816379ba50971461171d5781638456cb59146116855781638da5cb5b146116315781638dad2b911461153a57816392ca668814611455578163976edea91461142c57816397ee1144146113f75781639832e9e7146110595781639d86698514610f3c57508063a3f901d114610e73578063a5a9504e14610d9c578063a719ac4a14610ca4578063ad3cb1cc14610c47578063affed0e014610c11578063be47223f14610bbe578063c4d66de814610967578063c763e5a11461094c578063e083c0431461084a578063e30c3978146107f6578063e74b981b1461071f578063f2fde38b14610651578063f559360714610515578063f8b06ab614610490578063fca3b5aa14610409578063fcadb3a7146102fc5763ff904c551461029a57600080fd5b346102f95760606003193601126102f9576024359067ffffffffffffffff82116102f957506102f5916102d36102dd9236908301613be9565b6044359135614a5f565b839291925193849384528060208501528301906139fb565b0390f35b80fd5b5091346104055760206003193601126104055773ffffffffffffffffffffffffffffffffffffffff61032c61393d565b610334614fdb565b1691610355610350846000526003602052604060002054151590565b614028565b828452600660205260ff82852054166103c357508183526006602052822060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557f77b77e8230ffce848d188724e51eff4fcc0e26c8be4c996f66f5001b15adca0d8280a280f35b6020606492519162461bcd60e51b8352820152601360248201527f5573657220616c7265616479206c6f636b6564000000000000000000000000006044820152fd5b8280fd5b50346102f95760206003193601126102f95773ffffffffffffffffffffffffffffffffffffffff61043861393d565b610440614fdb565b16807fffffffffffffffffffffffff00000000000000000000000000000000000000008354161782557f726b590ef91a8c76ad05bbe91a57ef84605276528f49cd47d787f558a4e755b68280a280f35b508290346102f95760206003193601126102f95782359067ffffffffffffffff82116102f957366023830112156102f9575061050260206104f0819584602473ffffffffffffffffffffffffffffffffffffffff96369301359101613bb2565b818551938285809451938492016139b3565b8101600781520301902054169051908152f35b50823461064d578160031936011261064d57818093600254945b8581106105e0575050601f1961055c610547856138a6565b9461055485519687613883565b8086526138a6565b0190602091368386013780805b86811061057d578451806102f58882613ee6565b8073ffffffffffffffffffffffffffffffffffffffff61059f6105c193613e78565b90549060031b1c168084526006865260ff8785205416156105c6575b506140bc565b610569565b6105d96105d2866140bc565b95896140e1565b52886105bb565b73ffffffffffffffffffffffffffffffffffffffff6105fe82613e78565b90549060031b1c168352600660205260ff848420541615610628575b610623906140bc565b61052f565b936001810180911161063a579361061a565b602483601184634e487b7160e01b835252fd5b5080fd5b50346102f95760206003193601126102f95761066b61393d565b610673614fdb565b73ffffffffffffffffffffffffffffffffffffffff809116907f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00827fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227008380a380f35b509190346104055760206003193601126104055773ffffffffffffffffffffffffffffffffffffffff61075061393d565b610758614fdb565b169182156107b3575050807fffffffffffffffffffffffff0000000000000000000000000000000000000000600e541617600e557fbf9a9534339a9d6b81696e05dcfb614b7dc518a31d48be3cfb757988381fb3238280a280f35b906020606492519162461bcd60e51b8352820152601460248201527f496e76616c696420666565526563697069656e740000000000000000000000006044820152fd5b50823461064d578160031936011261064d5760209073ffffffffffffffffffffffffffffffffffffffff7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0054169051908152f35b5091346104055760206003193601126104055773ffffffffffffffffffffffffffffffffffffffff61087a61393d565b610882614fdb565b169161089e610350846000526003602052604060002054151590565b828452600660205260ff82852054161561090a5750818352600660205282207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557f3173c201bf375d48571bf1df075410d9603290bad4b56e387b10fc30f0384f938280a280f35b6020606492519162461bcd60e51b8352820152600f60248201527f55736572206e6f74206c6f636b656400000000000000000000000000000000006044820152fd5b50823461064d578160031936011261064d5760209051468152f35b509190346104055760206003193601126104055761098361393d565b907ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a009182549160ff83861c16159267ffffffffffffffff811680159081610bb6575b6001149081610bac575b159081610ba3575b50610b7b578360017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008316178655610b46575b50610a1361504b565b610a1b61504b565b610a2361504b565b610a2b61504b565b73ffffffffffffffffffffffffffffffffffffffff821615610b175750610a5190614f27565b610a5961504b565b610a6161504b565b610a6961504b565b610a7161504b565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008154169055610ac0578280f35b7fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d291817fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff602093541690555160018152a138808280f35b602490868651917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b7fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000166801000000000000000117845538610a0a565b5084517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b905015386109d7565b303b1591506109cf565b8591506109c5565b50823461064d57602060031936011261064d57602090610c0873ffffffffffffffffffffffffffffffffffffffff610bf461393d565b166000526003602052604060002054151590565b90519015158152f35b50823461064d578160031936011261064d576020906fffffffffffffffffffffffffffffffff610c3f614d11565b915191168152f35b50823461064d578160031936011261064d5780516102f591610c688261384b565b600582527f352e302e300000000000000000000000000000000000000000000000000000006020830152519182916020835260208301906139d6565b50346102f95790610cb4366138be565b91610cbd614fdb565b7f000000000000000000000000000000000000000000000000000000000000000091815b8451811015610d9857610cf481866140e1565b518481141580610d8e575b15610d4b579081610d12610d1c93615204565b610d2157506140bc565b610ce1565b7f3a43286b4ee292b2898fe5720ff6f62339c4091d26fc8256cd1663135c56deb98580a2386105bb565b606483602089519162461bcd60e51b8352820152601160248201527f496e76616c69642064737420636861696e0000000000000000000000000000006044820152fd5b5046811415610cff565b8280f35b509190346104055760206003193601126104055773ffffffffffffffffffffffffffffffffffffffff610dcd61393d565b610dd5614fdb565b16918215610e30575050807fffffffffffffffffffffffff0000000000000000000000000000000000000000600d541617600d557f57e1682cf9947a26bcd0a26e75237738985e93b1cb7b5cff920f48b9e72b0eb78280a280f35b906020606492519162461bcd60e51b8352820152601060248201527f496e76616c6964206665654d6f64656c000000000000000000000000000000006044820152fd5b50913461040557806003193601126104055781359060243592610e94614fdb565b815160208101908482528584820152838152610eaf8161382f565b51902090818652600a60205282862054610ef957508452600a602052832061dead90557f8bf67b4286f711ab8935512bec6fe68f6faa41a8155ab9df307eda20f6175a1c8380a380f35b606490602084519162461bcd60e51b8352820152601c60248201527f416c726561647920636f6e6669726d6564206f7220626c6f636b6564000000006044820152fd5b919050346102f95760206003193601126102f9578390833581526009602052209081549260018301549085519081806002870190610f7991613ae1565b03610f849083613883565b60038501548751808093880190610f9a91613ae1565b03610fa59083613883565b6005860154926006870154948951806007819a0190610fc391613ae1565b03610fce9089613883565b8951998a99610fe08b60ff8316613983565b610ff460208c0160ff600884901c166139a6565b60101c6fffffffffffffffffffffffffffffffff16908a015260608901526101408060808a01528801611026916139d6565b9060a088015286810360c088015261103d916139d6565b928501526101008401528281036101208401526102f5916139d6565b5050903461064d5761106a36613dbe565b919394611075614fdb565b73ffffffffffffffffffffffffffffffffffffffff809616956110a8610350886000526003602052604060002054151590565b8688526020906006825260ff8a8a2054166113b55790898181938a8c52600682526110e26110e98d60019788912001855192838092613ae1565b0382613883565b896110f5368d83613bb2565b848151910120928c83519486850195862003611253575b505050505050508789526006815260028a8a20019267ffffffffffffffff861161124057506111458561113f8554613aa7565b85613f99565b8890601f86116001146111b457509184808a9b936111a39796957f217d5c315f4fa315ee51bc0452f8273cbd15987f449991f7b38cf73aaafbca1d9b9c936111a9575b501b906000198660031b1c19161790555b5194859485614001565b0390a280f35b860135925038611188565b90601f198616848b52828b20928b905b828210611229575050917f217d5c315f4fa315ee51bc0452f8273cbd15987f449991f7b38cf73aaafbca1d999a9b9391876111a3989796941061120f575b505084811b019055611199565b60001960f88860031b161c19908601351690553880611202565b808685968294968b013581550195019301906111c4565b896041602492634e487b7160e01b835252fd5b8561127593826112859951938492833781016007815203019020541615613f37565b8d519384928392519283916139b3565b810160078152030190207fffffffffffffffffffffffff000000000000000000000000000000000000000090818154169055888a5260068252828b8b200167ffffffffffffffff89116113a2576112e6896112e08354613aa7565b83613f99565b888b601f821160011461133f578c91611334575b5089851b906000198b60031b1c19161790555b888b518989823783818b81016007815203019020918254161790558981388089818c61110c565b9050880135386112fa565b828d52848d2091601f1981168e87898e5b84841061138957505050501061136f575b50508389811b01905561130d565b60001960f88c60031b161c19908a01351690553880611361565b860135875590950194938401938e93500187898e611350565b60248b604187634e487b7160e01b835252fd5b606483838c519162461bcd60e51b8352820152600b60248201527f55736572206c6f636b65640000000000000000000000000000000000000000006044820152fd5b82853461064d578160031936011261064d5760209073ffffffffffffffffffffffffffffffffffffffff600d54169051908152f35b82858534610405576020600319360112610405576020928291358152600b845220549051908152f35b82853461064d57602091826003193601126102f9576002611527836102f59373ffffffffffffffffffffffffffffffffffffffff61149161393d565b606084805161149f8161382f565b858152828c820152015216815260068752209360608151956114c08761382f565b60ff815416151587526115038351916114e7836114e08160018501613ae1565b0384613883565b8989019283526114fc85518098819301613ae1565b0386613883565b828701948552825197889781895251151590880152519186015260808501906139d6565b9051601f198483030160608501526139d6565b82853461064d57602060031936011261064d5761160a600273ffffffffffffffffffffffffffffffffffffffff61156f61393d565b611577614fdb565b169261158561035085615340565b83855260066020526115bb60206110e26115a96001858a2001855192838092613ae1565b818451938285809451938492016139b3565b810160078152030190207fffffffffffffffffffffffff000000000000000000000000000000000000000081541690558385526006602052842084815561160460018201614073565b01614073565b7f88d7621702a641d13a431461e4e079cb576bdc5fdd11357db1a4d15bbee41af08280a280f35b82853461064d578160031936011261064d5760209073ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054169051908152f35b82853461064d578160031936011261064d5760207f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258916116c3614fdb565b6116cb6150a4565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905551338152a180f35b505091346104055782600319360112610405573373ffffffffffffffffffffffffffffffffffffffff7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0054160361177b578261177833614f27565b80f35b6024925051907f118cdaa70000000000000000000000000000000000000000000000000000000082523390820152fd5b82858534610405576020600319360112610405576020928291358152600c845220549051908152f35b5050346102f957806003193601126102f957506020606492519162461bcd60e51b8352820152601c60248201527f556e61626c6520746f2072656e6f756e6365206f776e657273686970000000006044820152fd5b5050823461064d57602060031936011261064d5782359267ffffffffffffffff908185116118c957366023860112156118c957840135908111610405576024936005368684831b840101116118c55761188183614dc1565b945b838110611897578451806102f58882613d10565b806118ab886118c093851b86010135614e10565b6118b582896140e1565b526105bb81886140e1565b611883565b8480fd5b8380fd5b82853461064d578160031936011261064d57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b82853461064d578160031936011261064d5760209060ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300541690519015158152f35b8483346102f957806003193601126102f957508051600280548083526000918252602080840194927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace92915b8282106119b9576102f586866119af828b0383613883565b5191829182613ee6565b835487529586019560019384019390910190611997565b838584346102f957806003193601126102f9575073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003611a4a57602090517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b5050913461040557806003193601126104055782611a8c61393d565b611a94613960565b90611a9d614fdb565b73ffffffffffffffffffffffffffffffffffffffff90811680611b1b575082809281924791165af1611acd614ef7565b5015611ad857505080f35b906020606492519162461bcd60e51b8352820152601360248201527f455448207472616e73666572206661696c6564000000000000000000000000006044820152fd5b938093915051917f70a0823100000000000000000000000000000000000000000000000000000000835230868401526020928381602481895afa908115611c86578391611c4c575b5084517fa9059cbb0000000000000000000000000000000000000000000000000000000085820190815273ffffffffffffffffffffffffffffffffffffffff939093166024820152604480820192909252908152611bde92918291611bc9606482613883565b519082885af1611bd7614ef7565b90856150f9565b8051918215159182611c27575b50509050611bf95750505080f35b6024935051917f5274afe7000000000000000000000000000000000000000000000000000000008352820152fd5b809250819381010312611c485701518015908115036118c557803880611beb565b8580fd5b809350848092503d8311611c7f575b611c658183613883565b81010312611c7a579051869190611bde611b63565b600080fd5b503d611c5b565b85513d85823e3d90fd5b5050918060031936011261040557611ca661393d565b9060243567ffffffffffffffff81116118c557611cc69036908501613be9565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000000000000000000000000000000000000000000016803014908115611f1e575b50611ef657611d16614fdb565b83169282517f52d1902d0000000000000000000000000000000000000000000000000000000081526020818781885afa879181611ec3575b50611d8257602486868651917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352820152fd5b84879487927f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90818103611e945750843b15611e655780547fffffffffffffffffffffffff00000000000000000000000000000000000000001683179055518592917fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a2845115611e3157505080836020611e2d95519101845af4611e27614ef7565b916150f9565b5080f35b925092505034611e4057505080f35b7fb398979f000000000000000000000000000000000000000000000000000000008152fd5b506024935051917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352820152fd5b846024918451917faa1d49a4000000000000000000000000000000000000000000000000000000008352820152fd5b9091506020813d8211611eee575b81611ede60209383613883565b81010312611c7a57519038611d4e565b3d9150611ed1565b8483517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b9050817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416141538611d09565b82858534610405576020600319360112610405576020928291358152600a845220549051908152f35b82853461064d57602090611f90611f8b36613c04565b6147e9565b9051908152f35b838584346102f95760206003193601126102f95750611fb96102f59235614e10565b90519182916020835260208301906139fb565b82853461064d578160031936011261064d5760209073ffffffffffffffffffffffffffffffffffffffff600e54169051908152f35b82853461064d57602060031936011261064d579060209173ffffffffffffffffffffffffffffffffffffffff61203561393d565b169161204e836000526003602052604060002054151590565b928361205f575b5050519015158152f35b8152600684528190205460ff161591508380612055565b82858534610405578260031936011261040557612091614fdb565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033009081549060ff82161561211157507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a180f35b83517f8dfc202b000000000000000000000000000000000000000000000000000000008152fd5b828585346104055760206003193601126104055735916008548310156102f95750612164602092613e2b565b91905490519160031b1c8152f35b90508391346102f95760606003193601126102f9578335602435926121956140f5565b506121b56121b0336000526003602052604060002054151590565b614140565b338352602095600687526121cf60ff87862054161561418b565b6121d76150a4565b6121e28315156141d6565b84156122f35750916102f5939186938651938585019081526044358886015287855261220d8561382f565b845190208352600a85526122248784205415614221565b61222c614d11565b338452600686526110e26122ae60018a8720016fffffffffffffffffffffffffffffffff8b5194338b8701528a86526122648661384b565b60018d519b6122728d6137e8565b818d528c0152168b8a01527f000000000000000000000000000000000000000000000000000000000000000060608a01528a5192838092613ae1565b60808701524660a087015260c08601528401526101008301526101208201526122d681614291565b6122df81614358565b9280805195869586528501528301906139fb565b6064908787519162461bcd60e51b8352820152601260248201527f456d707479206465706f736974207478696400000000000000000000000000006044820152fd5b5050346102f95760606003193601126102f957506102dd6102f591612358613960565b6123606140f5565b5073ffffffffffffffffffffffffffffffffffffffff855191166020820152602081526102d38161384b565b5050903461064d5761239d36613dbe565b9193966123a8614fdb565b73ffffffffffffffffffffffffffffffffffffffff809816956123ca87615199565b156126a9576123f282519987878c378a8881016007815260209c8d9103019020541615613f37565b81516123fd8161382f565b88815261240b368888613bb2565b908a810191825261241d368787613bb2565b92848201938452898b5260068c52848b209151151560ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008454169116178255600191828101935193845167ffffffffffffffff9586821161269657908f8f9493926124938361248d8654613aa7565b86613f99565b81601f841160011461262f5750600295919083612624575b505060001982881b9260031b1c19161790555b01935190815193841161261157506124da8361248d8654613aa7565b8b90601f8411600114612584579183808d9e95936111a39a999897957f7605c79d00bfa9bdcbafef7eee834f547c78227e535c7c7a41c3f5b3aadec3ac9e9f93612577575b505060001991921b9260031b1c19161790555b81519087878337818881016007815203019020887fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790555194859485614001565b015191506000193861251f565b90601f198493941691858d528d8d20928d5b8181106125fc5750917f7605c79d00bfa9bdcbafef7eee834f547c78227e535c7c7a41c3f5b3aadec3ac9c9d9e959391856111a39b9a99989694106125e3575b505050811b019055612532565b015160001960f88460031b161c191690553880806125d6565b82840151855593860193928f01928f01612596565b8b6041602492634e487b7160e01b835252fd5b0151905038806124ab565b848752808720919689949391601f19851691905b82821061267d575050968360029810612664575b505050811b0190556124be565b015160001960f88460031b161c19169055388080612657565b838a015185558b96909401939283019290810190612643565b60248f604187634e487b7160e01b835252fd5b6020606492519162461bcd60e51b8352820152601660248201527f5573657220616c7265616479207175616c6966696564000000000000000000006044820152fd5b82853461064d578160031936011261064d5760209073ffffffffffffffffffffffffffffffffffffffff600154169051908152f35b838584346102f957816003193601126102f95782359260249485359160089283546000198101908111612902578082116128fa575b508087116128b8578661276791614284565b9360018086018096116128a65761277d86614dc1565b97825b878110612794578851806102f58c82613d10565b81810180821161289257908960076128728a6110e26127b561288d97613e2b565b959054600396871b1c8b52602095600987526fffffffffffffffffffffffffffffffff828d20946128098451996127eb8b6137e8565b8a885480946127ff60ff938484169061426c565b1c16908b01614278565b60101c16828801528a8401546060880152815161282d816110e28160028901613ae1565b608088015283015460a08701526110e261284e8d8351928380928801613ae1565b60c087015260058301548d8701526006830154610100870152518094819301613ae1565b610120820152612882828d6140e1565b526105bb818c6140e1565b612780565b8b601187634e487b7160e01b600052526000fd5b5060118892634e487b7160e01b835252fd5b60648260138a60208a519362461bcd60e51b85528401528201527f73746172742073686f756c64203c3d20656e64000000000000000000000000006044820152fd5b905088612755565b8886601185634e487b7160e01b835252fd5b5050823461064d576020806003193601126104055783359173ffffffffffffffffffffffffffffffffffffffff61294f818654163314614c04565b6129576150a4565b838552600983528185209384549160ff83166005811015612b0157600103612b145760ff60058701549361298c851515614c4f565b60081c1688811015612b0157889288969594926129ae6001612a609414614c9a565b85516129c1816110e28160078e01613ae1565b878151910120808952600a88526129db878a205415614221565b8852600a875281868920556102007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff8a54161789558551917ff5d5c61ade87f414b4943e7cc9baef5c0a8bd5643c183a9940d9cd2a166268048980a26001541695612a5382612a4c81888d01613ae1565b0383613883565b8082518301019101614ce5565b93803b15611c4857612ac5948680948651978895869485937f40c10f1900000000000000000000000000000000000000000000000000000000855284016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b03925af1908115612af85750612ae4575b506117786006830154614996565b612aed9061381b565b61064d578183612ad6565b513d84823e3d90fd5b60248860218b634e487b7160e01b835252fd5b6064888686519162461bcd60e51b8352820152601060248201527f4e6f74204d696e742072657175657374000000000000000000000000000000006044820152fd5b83858492346118c95760206003193601126118c957612c54600791836102f596612b968735612b836140f5565b50612b916008548210614d76565b613e2b565b90549060031b1c8152600960205220906110e2612c2c865197612bb8896137e8565b6fffffffffffffffffffffffffffffffff8554612bd860ff82168c61426c565b612beb60ff8260081c1660208d01614278565b60101c16888a0152600185015460608a01528751612c10816110e28160028a01613ae1565b60808a0152600385015460a08a01528751928380928701613ae1565b60c087015260058201549086015260068101546101008601526110e284518094819301613ae1565b610120830152519182916020835260208301906139fb565b50509134610405576060600319360112610405578135916024918235612caa73ffffffffffffffffffffffffffffffffffffffff8754163314614c04565b612cb26150a4565b8015612f135784865260209060098252828720805460ff81166005811015612f0157600203612ec05760ff90612ced60058401541515614c4f565b60081c169385851015612eae57612d076001809614614c9a565b80519284840190815260443582850152818452612d238461382f565b83519020808a52600b8552818a2054612e6d576007929189918b52600b86528a20556102007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff825416178155019481519467ffffffffffffffff8611612e5c575050612d9984612d938754613aa7565b87613f99565b81601f8511600114612df757508691849182612dea575b505060001991921b9260031b1c19161790555b7ff5d5c61ade87f414b4943e7cc9baef5c0a8bd5643c183a9940d9cd2a166268048280a280f35b0151915060001938612db0565b919084601f1981959616878a52848a20948a905b88838310612e425750505010612e29575b505050811b019055612dc3565b015160001960f88460031b161c19169055388080612e1c565b858701518855909601959485019487935090810190612e0b565b60418991634e487b7160e01b835252fd5b60648760168a8886519362461bcd60e51b85528401528201527f5573656420425443207769746864726177616c207478000000000000000000006044820152fd5b8689602188634e487b7160e01b835252fd5b6064866010898789519362461bcd60e51b85528401528201527f4e6f74204275726e2072657175657374000000000000000000000000000000006044820152fd5b878a602189634e487b7160e01b835252fd5b506064926020601392519362461bcd60e51b85528401528201527f456d7074792077697468647261772074786964000000000000000000000000006044820152fd5b83858492346118c957612f6736613c04565b73ffffffffffffffffffffffffffffffffffffffff91612f8b838754163314614c04565b612f936150a4565b810191612fa283511515614c4f565b60a0820151460361333d578151600581101561332a5785036132e75760209081830151868110156132d45761329257610120830182815151036132515760c084019383855151036131e957845184818051810103126131a3578484910151116131a757815184818051810103126131a3578481015192839160038452895161302981613867565b8c81528252613037846147e9565b918b8552520361316257818952600c8452868920546131215791889594939161308061309f946fffffffffffffffffffffffffffffffff613076614d11565b168a820152614358565b908752600c835287872055600154169251908082518301019101614ce5565b915191813b156118c95783613104968651978895869485937f40c10f1900000000000000000000000000000000000000000000000000000000855284016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b03925af1908115612af85750613118575080f35b6117789061381b565b60648885808a519262461bcd60e51b845283015260248201527f536f75726365207265717565737420616c726561647920636f6e6669726d65646044820152fd5b60648885808a519262461bcd60e51b845283015260248201527f536f757263652072657175657374206861736820697320696e636f72726563746044820152fd5b8980fd5b6064888589519162461bcd60e51b8352820152601f60248201527f496e76616c696420647374416464726573733a206e6f742061646472657373006044820152fd5b6084888589519162461bcd60e51b8352820152602760248201527f496e76616c696420647374416464726573733a206e6f7420333220627974657360448201527f206c656e677468000000000000000000000000000000000000000000000000006064820152fd5b606487848089519262461bcd60e51b845283015260248201527f496e76616c69642065787472613a206e6f742076616c696420627974657333326044820152fd5b6064868387519162461bcd60e51b8352820152601960248201527f5374617475732073686f756c64206e6f742062652075736564000000000000006044820152fd5b602488602189634e487b7160e01b835252fd5b606485602086519162461bcd60e51b8352820152601d60248201527f4e6f742043726f7373636861696e436f6e6669726d20726571756573740000006044820152fd5b602487602188634e487b7160e01b835252fd5b606485602086519162461bcd60e51b8352820152601360248201527f44737420636861696e206e6f74206d61746368000000000000000000000000006044820152fd5b82853461064d57602060031936011261064d57809173ffffffffffffffffffffffffffffffffffffffff6133b261393d565b168152600660205220906102f560ff8354169160026133f48251956133e5876133de8160018501613ae1565b0388613883565b6110e284518094819301613ae1565b6134118251958695151586526060602087015260608601906139d6565b91848303908501526139d6565b84848492346118c957602092836003193601126118c5578235926134406140f5565b5061345b6121b0336000526003602052604060002054151590565b3386526006855261347260ff83882054161561418b565b61347a6150a4565b6134858415156141d6565b61348d614d11565b926110e261351d845133898201528881526134a78161384b565b338a52600689526002868b2001906fffffffffffffffffffffffffffffffff8751986134d28a6137e8565b60028a5260018c8b0152168789015246606089015260808801527f000000000000000000000000000000000000000000000000000000000000000060a0880152855192838092613ae1565b60c0850152830193845285610100840194818652835161353c81613867565b82815261012086015261354e85614291565b61356161355a86614358565b96516148bb565b73ffffffffffffffffffffffffffffffffffffffff60015416905190803b156104055784517f9dc29fac000000000000000000000000000000000000000000000000000000008152339481019485526020850192909252909283919082908490829060400103925af180156135ff576102f5949596506135f0575b5080805195869586528501528301906139fb565b6135f99061381b565b856135dc565b82513d88823e3d90fd5b82346102f95760206003193601126102f95773ffffffffffffffffffffffffffffffffffffffff61363861393d565b613640614fdb565b16807fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001557fa07c91c183e42229e705a9795a1c06d76528b673788b849597364528c96eefb78280a280f35b82346102f9576136a1366138be565b6136a9614fdb565b815b8151811015610d9857806136c26136d692846140e1565b516136cc81615256565b6136db57506140bc565b6136ab565b7ff12e3d4e7509126d52c01ff2338bd1152944152faae418db99384d8e672f98ed8580a2846105bb565b82853461064d578160031936011261064d5773ffffffffffffffffffffffffffffffffffffffff60209254169051908152f35b92915050346102f957806003193601126102f957825480835292815260209392848301929083907f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90845b8181106137d45750505081613799910382613883565b83519485948186019282875251809352850193925b8281106137bd57505050500390f35b8351855286955093810193928101926001016137ae565b825484529288019260019283019201613783565b610140810190811067ffffffffffffffff82111761380557604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff811161380557604052565b6060810190811067ffffffffffffffff82111761380557604052565b6040810190811067ffffffffffffffff82111761380557604052565b6020810190811067ffffffffffffffff82111761380557604052565b90601f601f19910116810190811067ffffffffffffffff82111761380557604052565b67ffffffffffffffff81116138055760051b60200190565b602080600319830112611c7a576004359167ffffffffffffffff8311611c7a5780602384011215611c7a5782600401356138f7816138a6565b936139056040519586613883565b81855260248486019260051b820101928311611c7a57602401905b82821061392e575050505090565b81358152908301908301613920565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203611c7a57565b6024359073ffffffffffffffffffffffffffffffffffffffff82168203611c7a57565b9060058210156139905752565b634e487b7160e01b600052602160045260246000fd5b9060048210156139905752565b60005b8381106139c65750506000910152565b81810151838201526020016139b6565b90601f19601f6020936139f4815180928187528780880191016139b3565b0116010190565b90613aa491613a0b828251613983565b613a1d602082015160208401906139a6565b6fffffffffffffffffffffffffffffffff604082015116604083015260608101516060830152613a7b613a5f60808301516101408060808701528501906139d6565b60a083015160a085015260c083015184820360c08601526139d6565b9160e082015160e0820152610100808301519082015261012080920151918184039101526139d6565b90565b90600182811c92168015613ad7575b6020831014613ac157565b634e487b7160e01b600052602260045260246000fd5b91607f1691613ab6565b9060009291805491613af283613aa7565b918282526001938481169081600014613b545750600114613b14575b50505050565b90919394506000526020928360002092846000945b838610613b40575050505001019038808080613b0e565b805485870183015294019385908201613b29565b91505060209495507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009193501683830152151560051b01019038808080613b0e565b67ffffffffffffffff811161380557601f01601f191660200190565b929192613bbe82613b96565b91613bcc6040519384613883565b829481845281830111611c7a578281602093846000960137010152565b9080601f83011215611c7a57816020613aa493359101613bb2565b60031990602082820112611c7a5760049081359167ffffffffffffffff93848411611c7a57610140908484030112611c7a5760405193613c43856137e8565b838201356005811015611c7a578552602484013582811015611c7a57602086015260448401356fffffffffffffffffffffffffffffffff81168103611c7a576040860152606484013560608601526084840135818111611c7a578383613cab92870101613be9565b608086015260a484013560a086015260c4840135818111611c7a578383613cd492870101613be9565b60c086015260e484013560e0860152610104840135610100860152610124840135908111611c7a57613d07930101613be9565b61012082015290565b602080820190808352835180925260408301928160408460051b8301019501936000915b848310613d445750505050505090565b9091929394958480613d80837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187528a516139fb565b9801930193019194939290613d34565b9181601f84011215611c7a5782359167ffffffffffffffff8311611c7a5760208381860195010111611c7a57565b906060600319830112611c7a5760043573ffffffffffffffffffffffffffffffffffffffff81168103611c7a579167ffffffffffffffff91602435838111611c7a5782613e0d91600401613d90565b93909392604435918211611c7a57613e2791600401613d90565b9091565b600854811015613e625760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30190600090565b634e487b7160e01b600052603260045260246000fd5b600254811015613e625760026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0190600090565b600454811015613e625760046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0190600090565b6020908160408183019282815285518094520193019160005b828110613f0d575050505090565b835173ffffffffffffffffffffffffffffffffffffffff1685529381019392810192600101613eff565b15613f3e57565b606460405162461bcd60e51b815260206004820152601460248201527f4465706f736974206164647265737320757365640000000000000000000000006044820152fd5b818110613f8d575050565b60008155600101613f82565b9190601f8111613fa857505050565b613fd4926000526020600020906020601f840160051c83019310613fd6575b601f0160051c0190613f82565b565b9091508190613fc7565b601f8260209493601f19938186528686013760008582860101520116010190565b929061401a90613aa49593604086526040860191613fe0565b926020818503910152613fe0565b1561402f57565b606460405162461bcd60e51b815260206004820152601260248201527f55736572206e6f74207175616c696669656400000000000000000000000000006044820152fd5b61407d8154613aa7565b9081614087575050565b81601f60009311600114614099575055565b9080839182526140b8601f60208420940160051c840160018501613f82565b5555565b60001981146140cb5760010190565b634e487b7160e01b600052601160045260246000fd5b8051821015613e625760209160051b010190565b60405190614102826137e8565b606061012083600080825280602083015280604083015280848301528360808301528060a08301528360c08301528060e08301526101008201520152565b1561414757565b606460405162461bcd60e51b815260206004820152601460248201527f43616c6c6572206e6f74207175616c69666965640000000000000000000000006044820152fd5b1561419257565b606460405162461bcd60e51b815260206004820152600d60248201527f43616c6c6572206c6f636b6564000000000000000000000000000000000000006044820152fd5b156141dd57565b606460405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420616d6f756e740000000000000000000000000000000000006044820152fd5b1561422857565b606460405162461bcd60e51b815260206004820152601360248201527f5573656420425443206465706f736974207478000000000000000000000000006044820152fd5b60058210156139905752565b60048210156139905752565b919082039182116140cb57565b73ffffffffffffffffffffffffffffffffffffffff600d541690602060405180937fc794dff600000000000000000000000000000000000000000000000000000000825282600483015281806142ea60248201876139fb565b03915afa91821561434c57600092614318575b5060e0818361010061431494015201918251614284565b9052565b90916020823d8211614344575b8161433260209383613883565b810103126102f95750519060e06142fd565b3d9150614325565b6040513d6000823e3d90fd5b90604082016fffffffffffffffffffffffffffffffff8151169260085480940361478057614385816147e9565b93815190600582101561399057600380921461475f575b6801000000000000000081101561380557856143d96143c2600193848101600855613e2b565b81939154906000199060031b92831b921b19161790565b90556000908682526020926009845260408320918551600581101561474b57835486880151906004998a83101561473857907fffffffffffffffffffffffffffff00000000000000000000000000000000000060ff71ffffffffffffffffffffffffffffffff000061ff00945160101b1695169116179160081b16171783556060860151818401556002830192608087015193845167ffffffffffffffff958682116146bd57819061448f8261248d8654613aa7565b8990601f83116001146146db5789926146d0575b505060001982861b92871b1c19161790555b60a08701518382015587810160c08801518051908682116146bd576144de8261113f8554613aa7565b8890601f83116001146146595760079493929189918361464e575b505060001982871b92881b1c19161790555b60e0880151600582015561010088015160068201550192610120870151805191821161463b5761453f82612d938754613aa7565b8690601f83116001146145d35790829187936145c6575b50508060001992931b931b1c19161790555b82519360058510156145b357505084917f903c4021d4469fbbdf338ec3409a975e2ccbd3990776eab0750c28a16617d780916145ae6040519282849384528301906139fb565b0390a3565b906021602492634e487b7160e01b835252fd5b0151915080600019614556565b91929390601f198416928688528489892094895b8b89838310614624575050508111614609575b5050505050811b019055614568565b6000199260f8920151931b161c1916905538808080846145fa565b8686015189559097019694850194889350016145e7565b60248660418b634e487b7160e01b835252fd5b0151905038806144f9565b9392918591601f19821690848b528b8b20918b5b8d8282106146a757505096836007981061468f575b505050811b01905561450b565b015160001960f8848b1b161c19169055388080614682565b838a015185558a9690940193928301920161466d565b60248860418d634e487b7160e01b835252fd5b0151905038806144a3565b90601f1987941691858b528b8b20928b5b8d828210614722575050841161470a575b505050811b0190556144b5565b015160001960f8848a1b161c191690553880806146fd565b8385015186558a979095019493840193016146ec565b60248860218d634e487b7160e01b835252fd5b602485634e487b7160e01b81526021600452fd5b604051866020820152602081526147758161384b565b61012084015261439c565b608460405162461bcd60e51b8152602060048201526024808201527f466174616c3a206e6f6e6365206e6f7420657175616c73206172726179206c6560448201527f6e677468000000000000000000000000000000000000000000000000000000006064820152fd5b80519060058210156139905760408101516fffffffffffffffffffffffffffffffff1690606081015191608082015160a08301519260c08101519060e08101519161010080830151916101208094015195604051998a9860208a019c8d61484f91613983565b60408a01526060890152846080890152610140880161486d916139d6565b9760a0880152601f1997888882030160c089015261488a916139d6565b9360e08701528501528484830301908401526148a5916139d6565b0390810182526148b59082613883565b51902090565b600081156149925773ffffffffffffffffffffffffffffffffffffffff80600e5416919060015416803b15611c7a57600080916064604051809481937f0adfcd810000000000000000000000000000000000000000000000000000000083523360048401528860248401528960448401525af1801561434c57614960575b50807f075a2720282fdf622141dae0b048ef90a21a7e57c134c76912d19d006b3b3f6f91a3565b61496a915061381b565b60007f075a2720282fdf622141dae0b048ef90a21a7e57c134c76912d19d006b3b3f6f614939565b5050565b8015614a5c5773ffffffffffffffffffffffffffffffffffffffff80600e54169060015416803b15611c7a576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260248101849052906000908290604490829084905af1801561434c57614a4d575b507f075a2720282fdf622141dae0b048ef90a21a7e57c134c76912d19d006b3b3f6f600080a3565b614a569061381b565b38614a25565b50565b929190614a6a6140f5565b50614a736150a4565b614a7e8215156141d6565b60009084825260056020526040908183205415614bc157614a9d614d11565b95825133602082015260208152614ab38161384b565b6fffffffffffffffffffffffffffffffff845198614ad08a6137e8565b60038a528660208b01521684890152466060890152608088015260a087015260c086015260e085019283526101008501928284528151614b0f81613867565b838152610120870152614b2186614291565b614b34614b2d87614358565b94516148bb565b73ffffffffffffffffffffffffffffffffffffffff600154169051813b156118c95782517f9dc29fac0000000000000000000000000000000000000000000000000000000081523360048201526024810191909152929081908490604490829084905af1918215614bb7575050614baa57509190565b614bb39061381b565b9190565b51903d90823e3d90fd5b6064825162461bcd60e51b815260206004820152601860248201527f54617267657420636861696e206e6f7420616c6c6f77656400000000000000006044820152fd5b15614c0b57565b606460405162461bcd60e51b815260206004820152601160248201527f43616c6c6572206e6f74206d696e7465720000000000000000000000000000006044820152fd5b15614c5657565b606460405162461bcd60e51b815260206004820152601660248201527f496e76616c6964207265717565737420616d6f756e74000000000000000000006044820152fd5b15614ca157565b606460405162461bcd60e51b815260206004820152601660248201527f496e76616c6964207265717565737420737461747573000000000000000000006044820152fd5b90816020910312611c7a575173ffffffffffffffffffffffffffffffffffffffff81168103611c7a5790565b6008546fffffffffffffffffffffffffffffffff9081811015614d32571690565b606460405162461bcd60e51b815260206004820152601560248201527f466174616c3a206e6f6e6365206f766572666c6f7700000000000000000000006044820152fd5b15614d7d57565b606460405162461bcd60e51b815260206004820152601260248201527f52657175657374206e6f742065786973747300000000000000000000000000006044820152fd5b90614dcb826138a6565b614dd86040519182613883565b828152601f19614de882946138a6565b019060005b828110614df957505050565b602090614e046140f5565b82828501015201614ded565b614e186140f5565b5060005260096020526040906007614edb836000206110e2855195614e3c876137e8565b6fffffffffffffffffffffffffffffffff8354614e5c60ff82168a61426c565b614e6f60ff8260081c1660208b01614278565b60101c1681880152600183015460608801528051614e94816110e28160028801613ae1565b6080880152600383015460a08801528051614eb6816110e28160048801613ae1565b60c0880152600583015460e08801526006830154610100880152518094819301613ae1565b6101208301528151600581101561399057613fd4901515614d76565b3d15614f22573d90614f0882613b96565b91614f166040519384613883565b82523d6000602084013e565b606090565b7fffffffffffffffffffffffff0000000000000000000000000000000000000000907f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c008281541690557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080549073ffffffffffffffffffffffffffffffffffffffff80931680948316179055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b73ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416330361501b57565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c161561507a57565b60046040517fd7e6bcf8000000000000000000000000000000000000000000000000000000008152fd5b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054166150cf57565b60046040517fd93c0665000000000000000000000000000000000000000000000000000000008152fd5b90615138575080511561510e57805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b81511580615190575b615149575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b15615141565b6000818152600360205260408120546151ff57600254680100000000000000008110156151eb5790826151d76143c284600160409601600255613e78565b905560025492815260036020522055600190565b602482634e487b7160e01b81526041600452fd5b905090565b6000818152600560205260408120546151ff57600454680100000000000000008110156151eb5790826152426143c284600160409601600455613eaf565b905560045492815260056020522055600190565b600081815260056020526040812054909190801561533b57600019908181018181116153275760045490838201918211615313578181036152df575b50505060045480156152cb578101906152aa82613eaf565b909182549160031b1b19169055600455815260056020526040812055600190565b602484634e487b7160e01b81526031600452fd5b6152fd6152ee6143c293613eaf565b90549060031b1c928392613eaf565b9055845260056020526040842055388080615292565b602486634e487b7160e01b81526011600452fd5b602485634e487b7160e01b81526011600452fd5b505090565b600081815260036020526040812054909190801561533b57600019908181018181116153275760025490838201918211615313578181036153b5575b50505060025480156152cb5781019061539482613e78565b909182549160031b1b19169055600255815260036020526040812055600190565b6153d36153c46143c293613e78565b90549060031b1c928392613e78565b905584526003602052604084205538808061537c56fea2646970667358221220a11e0c21545369ca56a7fc14185bdb44fedcc87d7e976ec4a9248e74186cf35964736f6c63430008140033000000000000000000000000a6e3cf0e54f4b9c9e1714c8634eb5c9d35acfc850100000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040908082526004908136101561001757600080fd5b60009060e08235811c91826304c3f117146137385750816307546172146137055781630fd0a58e14613692578163144fa6d7146136095781631521bc261461341e5781631959a002146133805781631d710bd114612f555781632313e70e14612c6c57816326757b7314612b565781632bf90baa146129145781632e2ab109146127205781632eb3e1d1146126eb57816336436a021461238c57816336d9c591146123355781633a8c6bbb146121725781633e73ce45146121385781633f4ba83a146120765781634202d214146120015781634690484014611fcc578163471ea60714611f975781634803ad8b14611f755781634ee958c514611f4c5781634f1ef28614611c905781634fdf5d1d14611a7057816352d1902d146119d057816353681f961461194b5781635c975abb146119085781635fc07732146118cd5781636b36cfa114611829578163715018a6146117d45781637216ac75146117ab57816379ba50971461171d5781638456cb59146116855781638da5cb5b146116315781638dad2b911461153a57816392ca668814611455578163976edea91461142c57816397ee1144146113f75781639832e9e7146110595781639d86698514610f3c57508063a3f901d114610e73578063a5a9504e14610d9c578063a719ac4a14610ca4578063ad3cb1cc14610c47578063affed0e014610c11578063be47223f14610bbe578063c4d66de814610967578063c763e5a11461094c578063e083c0431461084a578063e30c3978146107f6578063e74b981b1461071f578063f2fde38b14610651578063f559360714610515578063f8b06ab614610490578063fca3b5aa14610409578063fcadb3a7146102fc5763ff904c551461029a57600080fd5b346102f95760606003193601126102f9576024359067ffffffffffffffff82116102f957506102f5916102d36102dd9236908301613be9565b6044359135614a5f565b839291925193849384528060208501528301906139fb565b0390f35b80fd5b5091346104055760206003193601126104055773ffffffffffffffffffffffffffffffffffffffff61032c61393d565b610334614fdb565b1691610355610350846000526003602052604060002054151590565b614028565b828452600660205260ff82852054166103c357508183526006602052822060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557f77b77e8230ffce848d188724e51eff4fcc0e26c8be4c996f66f5001b15adca0d8280a280f35b6020606492519162461bcd60e51b8352820152601360248201527f5573657220616c7265616479206c6f636b6564000000000000000000000000006044820152fd5b8280fd5b50346102f95760206003193601126102f95773ffffffffffffffffffffffffffffffffffffffff61043861393d565b610440614fdb565b16807fffffffffffffffffffffffff00000000000000000000000000000000000000008354161782557f726b590ef91a8c76ad05bbe91a57ef84605276528f49cd47d787f558a4e755b68280a280f35b508290346102f95760206003193601126102f95782359067ffffffffffffffff82116102f957366023830112156102f9575061050260206104f0819584602473ffffffffffffffffffffffffffffffffffffffff96369301359101613bb2565b818551938285809451938492016139b3565b8101600781520301902054169051908152f35b50823461064d578160031936011261064d57818093600254945b8581106105e0575050601f1961055c610547856138a6565b9461055485519687613883565b8086526138a6565b0190602091368386013780805b86811061057d578451806102f58882613ee6565b8073ffffffffffffffffffffffffffffffffffffffff61059f6105c193613e78565b90549060031b1c168084526006865260ff8785205416156105c6575b506140bc565b610569565b6105d96105d2866140bc565b95896140e1565b52886105bb565b73ffffffffffffffffffffffffffffffffffffffff6105fe82613e78565b90549060031b1c168352600660205260ff848420541615610628575b610623906140bc565b61052f565b936001810180911161063a579361061a565b602483601184634e487b7160e01b835252fd5b5080fd5b50346102f95760206003193601126102f95761066b61393d565b610673614fdb565b73ffffffffffffffffffffffffffffffffffffffff809116907f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00827fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227008380a380f35b509190346104055760206003193601126104055773ffffffffffffffffffffffffffffffffffffffff61075061393d565b610758614fdb565b169182156107b3575050807fffffffffffffffffffffffff0000000000000000000000000000000000000000600e541617600e557fbf9a9534339a9d6b81696e05dcfb614b7dc518a31d48be3cfb757988381fb3238280a280f35b906020606492519162461bcd60e51b8352820152601460248201527f496e76616c696420666565526563697069656e740000000000000000000000006044820152fd5b50823461064d578160031936011261064d5760209073ffffffffffffffffffffffffffffffffffffffff7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0054169051908152f35b5091346104055760206003193601126104055773ffffffffffffffffffffffffffffffffffffffff61087a61393d565b610882614fdb565b169161089e610350846000526003602052604060002054151590565b828452600660205260ff82852054161561090a5750818352600660205282207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557f3173c201bf375d48571bf1df075410d9603290bad4b56e387b10fc30f0384f938280a280f35b6020606492519162461bcd60e51b8352820152600f60248201527f55736572206e6f74206c6f636b656400000000000000000000000000000000006044820152fd5b50823461064d578160031936011261064d5760209051468152f35b509190346104055760206003193601126104055761098361393d565b907ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a009182549160ff83861c16159267ffffffffffffffff811680159081610bb6575b6001149081610bac575b159081610ba3575b50610b7b578360017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008316178655610b46575b50610a1361504b565b610a1b61504b565b610a2361504b565b610a2b61504b565b73ffffffffffffffffffffffffffffffffffffffff821615610b175750610a5190614f27565b610a5961504b565b610a6161504b565b610a6961504b565b610a7161504b565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008154169055610ac0578280f35b7fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d291817fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff602093541690555160018152a138808280f35b602490868651917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b7fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000166801000000000000000117845538610a0a565b5084517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b905015386109d7565b303b1591506109cf565b8591506109c5565b50823461064d57602060031936011261064d57602090610c0873ffffffffffffffffffffffffffffffffffffffff610bf461393d565b166000526003602052604060002054151590565b90519015158152f35b50823461064d578160031936011261064d576020906fffffffffffffffffffffffffffffffff610c3f614d11565b915191168152f35b50823461064d578160031936011261064d5780516102f591610c688261384b565b600582527f352e302e300000000000000000000000000000000000000000000000000000006020830152519182916020835260208301906139d6565b50346102f95790610cb4366138be565b91610cbd614fdb565b7f010000000000000000000000000000000000000000000000000000000000000091815b8451811015610d9857610cf481866140e1565b518481141580610d8e575b15610d4b579081610d12610d1c93615204565b610d2157506140bc565b610ce1565b7f3a43286b4ee292b2898fe5720ff6f62339c4091d26fc8256cd1663135c56deb98580a2386105bb565b606483602089519162461bcd60e51b8352820152601160248201527f496e76616c69642064737420636861696e0000000000000000000000000000006044820152fd5b5046811415610cff565b8280f35b509190346104055760206003193601126104055773ffffffffffffffffffffffffffffffffffffffff610dcd61393d565b610dd5614fdb565b16918215610e30575050807fffffffffffffffffffffffff0000000000000000000000000000000000000000600d541617600d557f57e1682cf9947a26bcd0a26e75237738985e93b1cb7b5cff920f48b9e72b0eb78280a280f35b906020606492519162461bcd60e51b8352820152601060248201527f496e76616c6964206665654d6f64656c000000000000000000000000000000006044820152fd5b50913461040557806003193601126104055781359060243592610e94614fdb565b815160208101908482528584820152838152610eaf8161382f565b51902090818652600a60205282862054610ef957508452600a602052832061dead90557f8bf67b4286f711ab8935512bec6fe68f6faa41a8155ab9df307eda20f6175a1c8380a380f35b606490602084519162461bcd60e51b8352820152601c60248201527f416c726561647920636f6e6669726d6564206f7220626c6f636b6564000000006044820152fd5b919050346102f95760206003193601126102f9578390833581526009602052209081549260018301549085519081806002870190610f7991613ae1565b03610f849083613883565b60038501548751808093880190610f9a91613ae1565b03610fa59083613883565b6005860154926006870154948951806007819a0190610fc391613ae1565b03610fce9089613883565b8951998a99610fe08b60ff8316613983565b610ff460208c0160ff600884901c166139a6565b60101c6fffffffffffffffffffffffffffffffff16908a015260608901526101408060808a01528801611026916139d6565b9060a088015286810360c088015261103d916139d6565b928501526101008401528281036101208401526102f5916139d6565b5050903461064d5761106a36613dbe565b919394611075614fdb565b73ffffffffffffffffffffffffffffffffffffffff809616956110a8610350886000526003602052604060002054151590565b8688526020906006825260ff8a8a2054166113b55790898181938a8c52600682526110e26110e98d60019788912001855192838092613ae1565b0382613883565b896110f5368d83613bb2565b848151910120928c83519486850195862003611253575b505050505050508789526006815260028a8a20019267ffffffffffffffff861161124057506111458561113f8554613aa7565b85613f99565b8890601f86116001146111b457509184808a9b936111a39796957f217d5c315f4fa315ee51bc0452f8273cbd15987f449991f7b38cf73aaafbca1d9b9c936111a9575b501b906000198660031b1c19161790555b5194859485614001565b0390a280f35b860135925038611188565b90601f198616848b52828b20928b905b828210611229575050917f217d5c315f4fa315ee51bc0452f8273cbd15987f449991f7b38cf73aaafbca1d999a9b9391876111a3989796941061120f575b505084811b019055611199565b60001960f88860031b161c19908601351690553880611202565b808685968294968b013581550195019301906111c4565b896041602492634e487b7160e01b835252fd5b8561127593826112859951938492833781016007815203019020541615613f37565b8d519384928392519283916139b3565b810160078152030190207fffffffffffffffffffffffff000000000000000000000000000000000000000090818154169055888a5260068252828b8b200167ffffffffffffffff89116113a2576112e6896112e08354613aa7565b83613f99565b888b601f821160011461133f578c91611334575b5089851b906000198b60031b1c19161790555b888b518989823783818b81016007815203019020918254161790558981388089818c61110c565b9050880135386112fa565b828d52848d2091601f1981168e87898e5b84841061138957505050501061136f575b50508389811b01905561130d565b60001960f88c60031b161c19908a01351690553880611361565b860135875590950194938401938e93500187898e611350565b60248b604187634e487b7160e01b835252fd5b606483838c519162461bcd60e51b8352820152600b60248201527f55736572206c6f636b65640000000000000000000000000000000000000000006044820152fd5b82853461064d578160031936011261064d5760209073ffffffffffffffffffffffffffffffffffffffff600d54169051908152f35b82858534610405576020600319360112610405576020928291358152600b845220549051908152f35b82853461064d57602091826003193601126102f9576002611527836102f59373ffffffffffffffffffffffffffffffffffffffff61149161393d565b606084805161149f8161382f565b858152828c820152015216815260068752209360608151956114c08761382f565b60ff815416151587526115038351916114e7836114e08160018501613ae1565b0384613883565b8989019283526114fc85518098819301613ae1565b0386613883565b828701948552825197889781895251151590880152519186015260808501906139d6565b9051601f198483030160608501526139d6565b82853461064d57602060031936011261064d5761160a600273ffffffffffffffffffffffffffffffffffffffff61156f61393d565b611577614fdb565b169261158561035085615340565b83855260066020526115bb60206110e26115a96001858a2001855192838092613ae1565b818451938285809451938492016139b3565b810160078152030190207fffffffffffffffffffffffff000000000000000000000000000000000000000081541690558385526006602052842084815561160460018201614073565b01614073565b7f88d7621702a641d13a431461e4e079cb576bdc5fdd11357db1a4d15bbee41af08280a280f35b82853461064d578160031936011261064d5760209073ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054169051908152f35b82853461064d578160031936011261064d5760207f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258916116c3614fdb565b6116cb6150a4565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905551338152a180f35b505091346104055782600319360112610405573373ffffffffffffffffffffffffffffffffffffffff7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0054160361177b578261177833614f27565b80f35b6024925051907f118cdaa70000000000000000000000000000000000000000000000000000000082523390820152fd5b82858534610405576020600319360112610405576020928291358152600c845220549051908152f35b5050346102f957806003193601126102f957506020606492519162461bcd60e51b8352820152601c60248201527f556e61626c6520746f2072656e6f756e6365206f776e657273686970000000006044820152fd5b5050823461064d57602060031936011261064d5782359267ffffffffffffffff908185116118c957366023860112156118c957840135908111610405576024936005368684831b840101116118c55761188183614dc1565b945b838110611897578451806102f58882613d10565b806118ab886118c093851b86010135614e10565b6118b582896140e1565b526105bb81886140e1565b611883565b8480fd5b8380fd5b82853461064d578160031936011261064d57602090517f01000000000000000000000000000000000000000000000000000000000000008152f35b82853461064d578160031936011261064d5760209060ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300541690519015158152f35b8483346102f957806003193601126102f957508051600280548083526000918252602080840194927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace92915b8282106119b9576102f586866119af828b0383613883565b5191829182613ee6565b835487529586019560019384019390910190611997565b838584346102f957806003193601126102f9575073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c5e2f85cb57350d3ae918d8b038f891f8ed6f6e5163003611a4a57602090517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b5050913461040557806003193601126104055782611a8c61393d565b611a94613960565b90611a9d614fdb565b73ffffffffffffffffffffffffffffffffffffffff90811680611b1b575082809281924791165af1611acd614ef7565b5015611ad857505080f35b906020606492519162461bcd60e51b8352820152601360248201527f455448207472616e73666572206661696c6564000000000000000000000000006044820152fd5b938093915051917f70a0823100000000000000000000000000000000000000000000000000000000835230868401526020928381602481895afa908115611c86578391611c4c575b5084517fa9059cbb0000000000000000000000000000000000000000000000000000000085820190815273ffffffffffffffffffffffffffffffffffffffff939093166024820152604480820192909252908152611bde92918291611bc9606482613883565b519082885af1611bd7614ef7565b90856150f9565b8051918215159182611c27575b50509050611bf95750505080f35b6024935051917f5274afe7000000000000000000000000000000000000000000000000000000008352820152fd5b809250819381010312611c485701518015908115036118c557803880611beb565b8580fd5b809350848092503d8311611c7f575b611c658183613883565b81010312611c7a579051869190611bde611b63565b600080fd5b503d611c5b565b85513d85823e3d90fd5b5050918060031936011261040557611ca661393d565b9060243567ffffffffffffffff81116118c557611cc69036908501613be9565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000c5e2f85cb57350d3ae918d8b038f891f8ed6f6e516803014908115611f1e575b50611ef657611d16614fdb565b83169282517f52d1902d0000000000000000000000000000000000000000000000000000000081526020818781885afa879181611ec3575b50611d8257602486868651917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352820152fd5b84879487927f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90818103611e945750843b15611e655780547fffffffffffffffffffffffff00000000000000000000000000000000000000001683179055518592917fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a2845115611e3157505080836020611e2d95519101845af4611e27614ef7565b916150f9565b5080f35b925092505034611e4057505080f35b7fb398979f000000000000000000000000000000000000000000000000000000008152fd5b506024935051917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352820152fd5b846024918451917faa1d49a4000000000000000000000000000000000000000000000000000000008352820152fd5b9091506020813d8211611eee575b81611ede60209383613883565b81010312611c7a57519038611d4e565b3d9150611ed1565b8483517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b9050817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416141538611d09565b82858534610405576020600319360112610405576020928291358152600a845220549051908152f35b82853461064d57602090611f90611f8b36613c04565b6147e9565b9051908152f35b838584346102f95760206003193601126102f95750611fb96102f59235614e10565b90519182916020835260208301906139fb565b82853461064d578160031936011261064d5760209073ffffffffffffffffffffffffffffffffffffffff600e54169051908152f35b82853461064d57602060031936011261064d579060209173ffffffffffffffffffffffffffffffffffffffff61203561393d565b169161204e836000526003602052604060002054151590565b928361205f575b5050519015158152f35b8152600684528190205460ff161591508380612055565b82858534610405578260031936011261040557612091614fdb565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033009081549060ff82161561211157507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a180f35b83517f8dfc202b000000000000000000000000000000000000000000000000000000008152fd5b828585346104055760206003193601126104055735916008548310156102f95750612164602092613e2b565b91905490519160031b1c8152f35b90508391346102f95760606003193601126102f9578335602435926121956140f5565b506121b56121b0336000526003602052604060002054151590565b614140565b338352602095600687526121cf60ff87862054161561418b565b6121d76150a4565b6121e28315156141d6565b84156122f35750916102f5939186938651938585019081526044358886015287855261220d8561382f565b845190208352600a85526122248784205415614221565b61222c614d11565b338452600686526110e26122ae60018a8720016fffffffffffffffffffffffffffffffff8b5194338b8701528a86526122648661384b565b60018d519b6122728d6137e8565b818d528c0152168b8a01527f010000000000000000000000000000000000000000000000000000000000000060608a01528a5192838092613ae1565b60808701524660a087015260c08601528401526101008301526101208201526122d681614291565b6122df81614358565b9280805195869586528501528301906139fb565b6064908787519162461bcd60e51b8352820152601260248201527f456d707479206465706f736974207478696400000000000000000000000000006044820152fd5b5050346102f95760606003193601126102f957506102dd6102f591612358613960565b6123606140f5565b5073ffffffffffffffffffffffffffffffffffffffff855191166020820152602081526102d38161384b565b5050903461064d5761239d36613dbe565b9193966123a8614fdb565b73ffffffffffffffffffffffffffffffffffffffff809816956123ca87615199565b156126a9576123f282519987878c378a8881016007815260209c8d9103019020541615613f37565b81516123fd8161382f565b88815261240b368888613bb2565b908a810191825261241d368787613bb2565b92848201938452898b5260068c52848b209151151560ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008454169116178255600191828101935193845167ffffffffffffffff9586821161269657908f8f9493926124938361248d8654613aa7565b86613f99565b81601f841160011461262f5750600295919083612624575b505060001982881b9260031b1c19161790555b01935190815193841161261157506124da8361248d8654613aa7565b8b90601f8411600114612584579183808d9e95936111a39a999897957f7605c79d00bfa9bdcbafef7eee834f547c78227e535c7c7a41c3f5b3aadec3ac9e9f93612577575b505060001991921b9260031b1c19161790555b81519087878337818881016007815203019020887fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790555194859485614001565b015191506000193861251f565b90601f198493941691858d528d8d20928d5b8181106125fc5750917f7605c79d00bfa9bdcbafef7eee834f547c78227e535c7c7a41c3f5b3aadec3ac9c9d9e959391856111a39b9a99989694106125e3575b505050811b019055612532565b015160001960f88460031b161c191690553880806125d6565b82840151855593860193928f01928f01612596565b8b6041602492634e487b7160e01b835252fd5b0151905038806124ab565b848752808720919689949391601f19851691905b82821061267d575050968360029810612664575b505050811b0190556124be565b015160001960f88460031b161c19169055388080612657565b838a015185558b96909401939283019290810190612643565b60248f604187634e487b7160e01b835252fd5b6020606492519162461bcd60e51b8352820152601660248201527f5573657220616c7265616479207175616c6966696564000000000000000000006044820152fd5b82853461064d578160031936011261064d5760209073ffffffffffffffffffffffffffffffffffffffff600154169051908152f35b838584346102f957816003193601126102f95782359260249485359160089283546000198101908111612902578082116128fa575b508087116128b8578661276791614284565b9360018086018096116128a65761277d86614dc1565b97825b878110612794578851806102f58c82613d10565b81810180821161289257908960076128728a6110e26127b561288d97613e2b565b959054600396871b1c8b52602095600987526fffffffffffffffffffffffffffffffff828d20946128098451996127eb8b6137e8565b8a885480946127ff60ff938484169061426c565b1c16908b01614278565b60101c16828801528a8401546060880152815161282d816110e28160028901613ae1565b608088015283015460a08701526110e261284e8d8351928380928801613ae1565b60c087015260058301548d8701526006830154610100870152518094819301613ae1565b610120820152612882828d6140e1565b526105bb818c6140e1565b612780565b8b601187634e487b7160e01b600052526000fd5b5060118892634e487b7160e01b835252fd5b60648260138a60208a519362461bcd60e51b85528401528201527f73746172742073686f756c64203c3d20656e64000000000000000000000000006044820152fd5b905088612755565b8886601185634e487b7160e01b835252fd5b5050823461064d576020806003193601126104055783359173ffffffffffffffffffffffffffffffffffffffff61294f818654163314614c04565b6129576150a4565b838552600983528185209384549160ff83166005811015612b0157600103612b145760ff60058701549361298c851515614c4f565b60081c1688811015612b0157889288969594926129ae6001612a609414614c9a565b85516129c1816110e28160078e01613ae1565b878151910120808952600a88526129db878a205415614221565b8852600a875281868920556102007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff8a54161789558551917ff5d5c61ade87f414b4943e7cc9baef5c0a8bd5643c183a9940d9cd2a166268048980a26001541695612a5382612a4c81888d01613ae1565b0383613883565b8082518301019101614ce5565b93803b15611c4857612ac5948680948651978895869485937f40c10f1900000000000000000000000000000000000000000000000000000000855284016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b03925af1908115612af85750612ae4575b506117786006830154614996565b612aed9061381b565b61064d578183612ad6565b513d84823e3d90fd5b60248860218b634e487b7160e01b835252fd5b6064888686519162461bcd60e51b8352820152601060248201527f4e6f74204d696e742072657175657374000000000000000000000000000000006044820152fd5b83858492346118c95760206003193601126118c957612c54600791836102f596612b968735612b836140f5565b50612b916008548210614d76565b613e2b565b90549060031b1c8152600960205220906110e2612c2c865197612bb8896137e8565b6fffffffffffffffffffffffffffffffff8554612bd860ff82168c61426c565b612beb60ff8260081c1660208d01614278565b60101c16888a0152600185015460608a01528751612c10816110e28160028a01613ae1565b60808a0152600385015460a08a01528751928380928701613ae1565b60c087015260058201549086015260068101546101008601526110e284518094819301613ae1565b610120830152519182916020835260208301906139fb565b50509134610405576060600319360112610405578135916024918235612caa73ffffffffffffffffffffffffffffffffffffffff8754163314614c04565b612cb26150a4565b8015612f135784865260209060098252828720805460ff81166005811015612f0157600203612ec05760ff90612ced60058401541515614c4f565b60081c169385851015612eae57612d076001809614614c9a565b80519284840190815260443582850152818452612d238461382f565b83519020808a52600b8552818a2054612e6d576007929189918b52600b86528a20556102007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff825416178155019481519467ffffffffffffffff8611612e5c575050612d9984612d938754613aa7565b87613f99565b81601f8511600114612df757508691849182612dea575b505060001991921b9260031b1c19161790555b7ff5d5c61ade87f414b4943e7cc9baef5c0a8bd5643c183a9940d9cd2a166268048280a280f35b0151915060001938612db0565b919084601f1981959616878a52848a20948a905b88838310612e425750505010612e29575b505050811b019055612dc3565b015160001960f88460031b161c19169055388080612e1c565b858701518855909601959485019487935090810190612e0b565b60418991634e487b7160e01b835252fd5b60648760168a8886519362461bcd60e51b85528401528201527f5573656420425443207769746864726177616c207478000000000000000000006044820152fd5b8689602188634e487b7160e01b835252fd5b6064866010898789519362461bcd60e51b85528401528201527f4e6f74204275726e2072657175657374000000000000000000000000000000006044820152fd5b878a602189634e487b7160e01b835252fd5b506064926020601392519362461bcd60e51b85528401528201527f456d7074792077697468647261772074786964000000000000000000000000006044820152fd5b83858492346118c957612f6736613c04565b73ffffffffffffffffffffffffffffffffffffffff91612f8b838754163314614c04565b612f936150a4565b810191612fa283511515614c4f565b60a0820151460361333d578151600581101561332a5785036132e75760209081830151868110156132d45761329257610120830182815151036132515760c084019383855151036131e957845184818051810103126131a3578484910151116131a757815184818051810103126131a3578481015192839160038452895161302981613867565b8c81528252613037846147e9565b918b8552520361316257818952600c8452868920546131215791889594939161308061309f946fffffffffffffffffffffffffffffffff613076614d11565b168a820152614358565b908752600c835287872055600154169251908082518301019101614ce5565b915191813b156118c95783613104968651978895869485937f40c10f1900000000000000000000000000000000000000000000000000000000855284016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b03925af1908115612af85750613118575080f35b6117789061381b565b60648885808a519262461bcd60e51b845283015260248201527f536f75726365207265717565737420616c726561647920636f6e6669726d65646044820152fd5b60648885808a519262461bcd60e51b845283015260248201527f536f757263652072657175657374206861736820697320696e636f72726563746044820152fd5b8980fd5b6064888589519162461bcd60e51b8352820152601f60248201527f496e76616c696420647374416464726573733a206e6f742061646472657373006044820152fd5b6084888589519162461bcd60e51b8352820152602760248201527f496e76616c696420647374416464726573733a206e6f7420333220627974657360448201527f206c656e677468000000000000000000000000000000000000000000000000006064820152fd5b606487848089519262461bcd60e51b845283015260248201527f496e76616c69642065787472613a206e6f742076616c696420627974657333326044820152fd5b6064868387519162461bcd60e51b8352820152601960248201527f5374617475732073686f756c64206e6f742062652075736564000000000000006044820152fd5b602488602189634e487b7160e01b835252fd5b606485602086519162461bcd60e51b8352820152601d60248201527f4e6f742043726f7373636861696e436f6e6669726d20726571756573740000006044820152fd5b602487602188634e487b7160e01b835252fd5b606485602086519162461bcd60e51b8352820152601360248201527f44737420636861696e206e6f74206d61746368000000000000000000000000006044820152fd5b82853461064d57602060031936011261064d57809173ffffffffffffffffffffffffffffffffffffffff6133b261393d565b168152600660205220906102f560ff8354169160026133f48251956133e5876133de8160018501613ae1565b0388613883565b6110e284518094819301613ae1565b6134118251958695151586526060602087015260608601906139d6565b91848303908501526139d6565b84848492346118c957602092836003193601126118c5578235926134406140f5565b5061345b6121b0336000526003602052604060002054151590565b3386526006855261347260ff83882054161561418b565b61347a6150a4565b6134858415156141d6565b61348d614d11565b926110e261351d845133898201528881526134a78161384b565b338a52600689526002868b2001906fffffffffffffffffffffffffffffffff8751986134d28a6137e8565b60028a5260018c8b0152168789015246606089015260808801527f010000000000000000000000000000000000000000000000000000000000000060a0880152855192838092613ae1565b60c0850152830193845285610100840194818652835161353c81613867565b82815261012086015261354e85614291565b61356161355a86614358565b96516148bb565b73ffffffffffffffffffffffffffffffffffffffff60015416905190803b156104055784517f9dc29fac000000000000000000000000000000000000000000000000000000008152339481019485526020850192909252909283919082908490829060400103925af180156135ff576102f5949596506135f0575b5080805195869586528501528301906139fb565b6135f99061381b565b856135dc565b82513d88823e3d90fd5b82346102f95760206003193601126102f95773ffffffffffffffffffffffffffffffffffffffff61363861393d565b613640614fdb565b16807fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001557fa07c91c183e42229e705a9795a1c06d76528b673788b849597364528c96eefb78280a280f35b82346102f9576136a1366138be565b6136a9614fdb565b815b8151811015610d9857806136c26136d692846140e1565b516136cc81615256565b6136db57506140bc565b6136ab565b7ff12e3d4e7509126d52c01ff2338bd1152944152faae418db99384d8e672f98ed8580a2846105bb565b82853461064d578160031936011261064d5773ffffffffffffffffffffffffffffffffffffffff60209254169051908152f35b92915050346102f957806003193601126102f957825480835292815260209392848301929083907f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90845b8181106137d45750505081613799910382613883565b83519485948186019282875251809352850193925b8281106137bd57505050500390f35b8351855286955093810193928101926001016137ae565b825484529288019260019283019201613783565b610140810190811067ffffffffffffffff82111761380557604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff811161380557604052565b6060810190811067ffffffffffffffff82111761380557604052565b6040810190811067ffffffffffffffff82111761380557604052565b6020810190811067ffffffffffffffff82111761380557604052565b90601f601f19910116810190811067ffffffffffffffff82111761380557604052565b67ffffffffffffffff81116138055760051b60200190565b602080600319830112611c7a576004359167ffffffffffffffff8311611c7a5780602384011215611c7a5782600401356138f7816138a6565b936139056040519586613883565b81855260248486019260051b820101928311611c7a57602401905b82821061392e575050505090565b81358152908301908301613920565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203611c7a57565b6024359073ffffffffffffffffffffffffffffffffffffffff82168203611c7a57565b9060058210156139905752565b634e487b7160e01b600052602160045260246000fd5b9060048210156139905752565b60005b8381106139c65750506000910152565b81810151838201526020016139b6565b90601f19601f6020936139f4815180928187528780880191016139b3565b0116010190565b90613aa491613a0b828251613983565b613a1d602082015160208401906139a6565b6fffffffffffffffffffffffffffffffff604082015116604083015260608101516060830152613a7b613a5f60808301516101408060808701528501906139d6565b60a083015160a085015260c083015184820360c08601526139d6565b9160e082015160e0820152610100808301519082015261012080920151918184039101526139d6565b90565b90600182811c92168015613ad7575b6020831014613ac157565b634e487b7160e01b600052602260045260246000fd5b91607f1691613ab6565b9060009291805491613af283613aa7565b918282526001938481169081600014613b545750600114613b14575b50505050565b90919394506000526020928360002092846000945b838610613b40575050505001019038808080613b0e565b805485870183015294019385908201613b29565b91505060209495507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009193501683830152151560051b01019038808080613b0e565b67ffffffffffffffff811161380557601f01601f191660200190565b929192613bbe82613b96565b91613bcc6040519384613883565b829481845281830111611c7a578281602093846000960137010152565b9080601f83011215611c7a57816020613aa493359101613bb2565b60031990602082820112611c7a5760049081359167ffffffffffffffff93848411611c7a57610140908484030112611c7a5760405193613c43856137e8565b838201356005811015611c7a578552602484013582811015611c7a57602086015260448401356fffffffffffffffffffffffffffffffff81168103611c7a576040860152606484013560608601526084840135818111611c7a578383613cab92870101613be9565b608086015260a484013560a086015260c4840135818111611c7a578383613cd492870101613be9565b60c086015260e484013560e0860152610104840135610100860152610124840135908111611c7a57613d07930101613be9565b61012082015290565b602080820190808352835180925260408301928160408460051b8301019501936000915b848310613d445750505050505090565b9091929394958480613d80837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187528a516139fb565b9801930193019194939290613d34565b9181601f84011215611c7a5782359167ffffffffffffffff8311611c7a5760208381860195010111611c7a57565b906060600319830112611c7a5760043573ffffffffffffffffffffffffffffffffffffffff81168103611c7a579167ffffffffffffffff91602435838111611c7a5782613e0d91600401613d90565b93909392604435918211611c7a57613e2791600401613d90565b9091565b600854811015613e625760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30190600090565b634e487b7160e01b600052603260045260246000fd5b600254811015613e625760026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0190600090565b600454811015613e625760046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0190600090565b6020908160408183019282815285518094520193019160005b828110613f0d575050505090565b835173ffffffffffffffffffffffffffffffffffffffff1685529381019392810192600101613eff565b15613f3e57565b606460405162461bcd60e51b815260206004820152601460248201527f4465706f736974206164647265737320757365640000000000000000000000006044820152fd5b818110613f8d575050565b60008155600101613f82565b9190601f8111613fa857505050565b613fd4926000526020600020906020601f840160051c83019310613fd6575b601f0160051c0190613f82565b565b9091508190613fc7565b601f8260209493601f19938186528686013760008582860101520116010190565b929061401a90613aa49593604086526040860191613fe0565b926020818503910152613fe0565b1561402f57565b606460405162461bcd60e51b815260206004820152601260248201527f55736572206e6f74207175616c696669656400000000000000000000000000006044820152fd5b61407d8154613aa7565b9081614087575050565b81601f60009311600114614099575055565b9080839182526140b8601f60208420940160051c840160018501613f82565b5555565b60001981146140cb5760010190565b634e487b7160e01b600052601160045260246000fd5b8051821015613e625760209160051b010190565b60405190614102826137e8565b606061012083600080825280602083015280604083015280848301528360808301528060a08301528360c08301528060e08301526101008201520152565b1561414757565b606460405162461bcd60e51b815260206004820152601460248201527f43616c6c6572206e6f74207175616c69666965640000000000000000000000006044820152fd5b1561419257565b606460405162461bcd60e51b815260206004820152600d60248201527f43616c6c6572206c6f636b6564000000000000000000000000000000000000006044820152fd5b156141dd57565b606460405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420616d6f756e740000000000000000000000000000000000006044820152fd5b1561422857565b606460405162461bcd60e51b815260206004820152601360248201527f5573656420425443206465706f736974207478000000000000000000000000006044820152fd5b60058210156139905752565b60048210156139905752565b919082039182116140cb57565b73ffffffffffffffffffffffffffffffffffffffff600d541690602060405180937fc794dff600000000000000000000000000000000000000000000000000000000825282600483015281806142ea60248201876139fb565b03915afa91821561434c57600092614318575b5060e0818361010061431494015201918251614284565b9052565b90916020823d8211614344575b8161433260209383613883565b810103126102f95750519060e06142fd565b3d9150614325565b6040513d6000823e3d90fd5b90604082016fffffffffffffffffffffffffffffffff8151169260085480940361478057614385816147e9565b93815190600582101561399057600380921461475f575b6801000000000000000081101561380557856143d96143c2600193848101600855613e2b565b81939154906000199060031b92831b921b19161790565b90556000908682526020926009845260408320918551600581101561474b57835486880151906004998a83101561473857907fffffffffffffffffffffffffffff00000000000000000000000000000000000060ff71ffffffffffffffffffffffffffffffff000061ff00945160101b1695169116179160081b16171783556060860151818401556002830192608087015193845167ffffffffffffffff958682116146bd57819061448f8261248d8654613aa7565b8990601f83116001146146db5789926146d0575b505060001982861b92871b1c19161790555b60a08701518382015587810160c08801518051908682116146bd576144de8261113f8554613aa7565b8890601f83116001146146595760079493929189918361464e575b505060001982871b92881b1c19161790555b60e0880151600582015561010088015160068201550192610120870151805191821161463b5761453f82612d938754613aa7565b8690601f83116001146145d35790829187936145c6575b50508060001992931b931b1c19161790555b82519360058510156145b357505084917f903c4021d4469fbbdf338ec3409a975e2ccbd3990776eab0750c28a16617d780916145ae6040519282849384528301906139fb565b0390a3565b906021602492634e487b7160e01b835252fd5b0151915080600019614556565b91929390601f198416928688528489892094895b8b89838310614624575050508111614609575b5050505050811b019055614568565b6000199260f8920151931b161c1916905538808080846145fa565b8686015189559097019694850194889350016145e7565b60248660418b634e487b7160e01b835252fd5b0151905038806144f9565b9392918591601f19821690848b528b8b20918b5b8d8282106146a757505096836007981061468f575b505050811b01905561450b565b015160001960f8848b1b161c19169055388080614682565b838a015185558a9690940193928301920161466d565b60248860418d634e487b7160e01b835252fd5b0151905038806144a3565b90601f1987941691858b528b8b20928b5b8d828210614722575050841161470a575b505050811b0190556144b5565b015160001960f8848a1b161c191690553880806146fd565b8385015186558a979095019493840193016146ec565b60248860218d634e487b7160e01b835252fd5b602485634e487b7160e01b81526021600452fd5b604051866020820152602081526147758161384b565b61012084015261439c565b608460405162461bcd60e51b8152602060048201526024808201527f466174616c3a206e6f6e6365206e6f7420657175616c73206172726179206c6560448201527f6e677468000000000000000000000000000000000000000000000000000000006064820152fd5b80519060058210156139905760408101516fffffffffffffffffffffffffffffffff1690606081015191608082015160a08301519260c08101519060e08101519161010080830151916101208094015195604051998a9860208a019c8d61484f91613983565b60408a01526060890152846080890152610140880161486d916139d6565b9760a0880152601f1997888882030160c089015261488a916139d6565b9360e08701528501528484830301908401526148a5916139d6565b0390810182526148b59082613883565b51902090565b600081156149925773ffffffffffffffffffffffffffffffffffffffff80600e5416919060015416803b15611c7a57600080916064604051809481937f0adfcd810000000000000000000000000000000000000000000000000000000083523360048401528860248401528960448401525af1801561434c57614960575b50807f075a2720282fdf622141dae0b048ef90a21a7e57c134c76912d19d006b3b3f6f91a3565b61496a915061381b565b60007f075a2720282fdf622141dae0b048ef90a21a7e57c134c76912d19d006b3b3f6f614939565b5050565b8015614a5c5773ffffffffffffffffffffffffffffffffffffffff80600e54169060015416803b15611c7a576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260248101849052906000908290604490829084905af1801561434c57614a4d575b507f075a2720282fdf622141dae0b048ef90a21a7e57c134c76912d19d006b3b3f6f600080a3565b614a569061381b565b38614a25565b50565b929190614a6a6140f5565b50614a736150a4565b614a7e8215156141d6565b60009084825260056020526040908183205415614bc157614a9d614d11565b95825133602082015260208152614ab38161384b565b6fffffffffffffffffffffffffffffffff845198614ad08a6137e8565b60038a528660208b01521684890152466060890152608088015260a087015260c086015260e085019283526101008501928284528151614b0f81613867565b838152610120870152614b2186614291565b614b34614b2d87614358565b94516148bb565b73ffffffffffffffffffffffffffffffffffffffff600154169051813b156118c95782517f9dc29fac0000000000000000000000000000000000000000000000000000000081523360048201526024810191909152929081908490604490829084905af1918215614bb7575050614baa57509190565b614bb39061381b565b9190565b51903d90823e3d90fd5b6064825162461bcd60e51b815260206004820152601860248201527f54617267657420636861696e206e6f7420616c6c6f77656400000000000000006044820152fd5b15614c0b57565b606460405162461bcd60e51b815260206004820152601160248201527f43616c6c6572206e6f74206d696e7465720000000000000000000000000000006044820152fd5b15614c5657565b606460405162461bcd60e51b815260206004820152601660248201527f496e76616c6964207265717565737420616d6f756e74000000000000000000006044820152fd5b15614ca157565b606460405162461bcd60e51b815260206004820152601660248201527f496e76616c6964207265717565737420737461747573000000000000000000006044820152fd5b90816020910312611c7a575173ffffffffffffffffffffffffffffffffffffffff81168103611c7a5790565b6008546fffffffffffffffffffffffffffffffff9081811015614d32571690565b606460405162461bcd60e51b815260206004820152601560248201527f466174616c3a206e6f6e6365206f766572666c6f7700000000000000000000006044820152fd5b15614d7d57565b606460405162461bcd60e51b815260206004820152601260248201527f52657175657374206e6f742065786973747300000000000000000000000000006044820152fd5b90614dcb826138a6565b614dd86040519182613883565b828152601f19614de882946138a6565b019060005b828110614df957505050565b602090614e046140f5565b82828501015201614ded565b614e186140f5565b5060005260096020526040906007614edb836000206110e2855195614e3c876137e8565b6fffffffffffffffffffffffffffffffff8354614e5c60ff82168a61426c565b614e6f60ff8260081c1660208b01614278565b60101c1681880152600183015460608801528051614e94816110e28160028801613ae1565b6080880152600383015460a08801528051614eb6816110e28160048801613ae1565b60c0880152600583015460e08801526006830154610100880152518094819301613ae1565b6101208301528151600581101561399057613fd4901515614d76565b3d15614f22573d90614f0882613b96565b91614f166040519384613883565b82523d6000602084013e565b606090565b7fffffffffffffffffffffffff0000000000000000000000000000000000000000907f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c008281541690557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080549073ffffffffffffffffffffffffffffffffffffffff80931680948316179055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b73ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416330361501b57565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c161561507a57565b60046040517fd7e6bcf8000000000000000000000000000000000000000000000000000000008152fd5b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054166150cf57565b60046040517fd93c0665000000000000000000000000000000000000000000000000000000008152fd5b90615138575080511561510e57805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b81511580615190575b615149575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b15615141565b6000818152600360205260408120546151ff57600254680100000000000000008110156151eb5790826151d76143c284600160409601600255613e78565b905560025492815260036020522055600190565b602482634e487b7160e01b81526041600452fd5b905090565b6000818152600560205260408120546151ff57600454680100000000000000008110156151eb5790826152426143c284600160409601600455613eaf565b905560045492815260056020522055600190565b600081815260056020526040812054909190801561533b57600019908181018181116153275760045490838201918211615313578181036152df575b50505060045480156152cb578101906152aa82613eaf565b909182549160031b1b19169055600455815260056020526040812055600190565b602484634e487b7160e01b81526031600452fd5b6152fd6152ee6143c293613eaf565b90549060031b1c928392613eaf565b9055845260056020526040842055388080615292565b602486634e487b7160e01b81526011600452fd5b602485634e487b7160e01b81526011600452fd5b505090565b600081815260036020526040812054909190801561533b57600019908181018181116153275760025490838201918211615313578181036153b5575b50505060025480156152cb5781019061539482613e78565b909182549160031b1b19169055600255815260036020526040812055600190565b6153d36153c46143c293613e78565b90549060031b1c928392613e78565b905584526003602052604084205538808061537c56fea2646970667358221220a11e0c21545369ca56a7fc14185bdb44fedcc87d7e976ec4a9248e74186cf35964736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a6e3cf0e54f4b9c9e1714c8634eb5c9d35acfc850100000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _owner (address): 0xA6e3Cf0E54f4b9c9E1714c8634eb5c9d35ACFc85
Arg [1] : _mainChain (bytes32): 0x0100000000000000000000000000000000000000000000000000000000000000
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000a6e3cf0e54f4b9c9e1714c8634eb5c9d35acfc85
Arg [1] : 0100000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.