Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 16 from a total of 16 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Approve Upgrade ... | 7611163 | 373 days ago | IN | 0 ETH | 0.00266708 | ||||
| Approve Upgrade ... | 6627181 | 523 days ago | IN | 0 ETH | 0.00223883 | ||||
| Unfreeze | 6624149 | 524 days ago | IN | 0 ETH | 0.03257336 | ||||
| Hard Freeze | 6624143 | 524 days ago | IN | 0 ETH | 0.05323738 | ||||
| Soft Freeze | 6624128 | 524 days ago | IN | 0 ETH | 0.04271944 | ||||
| Set Soft Freeze ... | 6545395 | 536 days ago | IN | 0 ETH | 0.00058902 | ||||
| Approve Upgrade ... | 6545269 | 536 days ago | IN | 0 ETH | 0.00124639 | ||||
| Approve Upgrade ... | 6545265 | 536 days ago | IN | 0 ETH | 0.00132107 | ||||
| Unfreeze | 6544420 | 536 days ago | IN | 0 ETH | 0.01627566 | ||||
| Hard Freeze | 6544415 | 536 days ago | IN | 0 ETH | 0.02621828 | ||||
| Unfreeze | 6544335 | 536 days ago | IN | 0 ETH | 0.02674933 | ||||
| Soft Freeze | 6544322 | 536 days ago | IN | 0 ETH | 0.02439674 | ||||
| Set Soft Freeze ... | 6544013 | 536 days ago | IN | 0 ETH | 0.00476984 | ||||
| Approve Upgrade ... | 6512804 | 541 days ago | IN | 0 ETH | 0.00094442 | ||||
| Approve Upgrade ... | 6512803 | 541 days ago | IN | 0 ETH | 0.00087297 | ||||
| Approve Upgrade ... | 6487407 | 545 days ago | IN | 0 ETH | 0.00063748 |
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
To
|
Amount
|
||
|---|---|---|---|---|---|---|---|
| 0x6101a060 | 6461475 | 549 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
SecurityCouncil
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;
import {ISecurityCouncil} from "./interfaces/ISecurityCouncil.sol";
import {IProtocolUpgradeHandler} from "./interfaces/IProtocolUpgradeHandler.sol";
import {Multisig} from "./Multisig.sol";
import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
/// @title Security Council
/// @author Matter Labs
/// @custom:security-contact [email protected]
/// @dev The group of security experts who serve as a technical security service for ZKsync protocol.
contract SecurityCouncil is ISecurityCouncil, Multisig, EIP712 {
/// @notice Address of the contract, which manages protocol upgrades.
IProtocolUpgradeHandler public immutable PROTOCOL_UPGRADE_HANDLER;
/// @dev EIP-712 TypeHash for protocol upgrades approval by the Security Council.
bytes32 internal constant APPROVE_UPGRADE_SECURITY_COUNCIL_TYPEHASH =
keccak256("ApproveUpgradeSecurityCouncil(bytes32 id)");
/// @dev EIP-712 TypeHash for soft emergency freeze approval by the Security Council.
bytes32 internal constant SOFT_FREEZE_SECURITY_COUNCIL_TYPEHASH =
keccak256("SoftFreeze(uint256 nonce,uint256 validUntil)");
/// @dev EIP-712 TypeHash for hard emergency freeze approval by the Security Council.
bytes32 internal constant HARD_FREEZE_SECURITY_COUNCIL_TYPEHASH =
keccak256("HardFreeze(uint256 nonce,uint256 validUntil)");
/// @dev EIP-712 TypeHash for setting threshold for soft freeze approval by the Security Council.
bytes32 internal constant SET_SOFT_FREEZE_THRESHOLD_TYPEHASH =
keccak256("SetSoftFreezeThreshold(uint256 threshold,uint256 nonce,uint256 validUntil)");
/// @dev EIP-712 TypeHash for unfreezing the protocol upgrade by the Security Council.
bytes32 internal constant UNFREEZE_TYPEHASH = keccak256("Unfreeze(uint256 nonce,uint256 validUntil)");
/// @dev The default threshold for soft freeze initiated by the Security Council.
uint256 public constant SOFT_FREEZE_CONSERVATIVE_THRESHOLD = 9;
/// @dev The recommended threshold parameter for soft freeze initiated by the Security Council.
uint256 public constant RECOMMENDED_SOFT_FREEZE_THRESHOLD = 3;
/// @dev The number of signatures needed to trigger hard freeze.
uint256 public constant HARD_FREEZE_THRESHOLD = 9;
/// @dev The number of signatures needed to approve upgrade.
uint256 public constant APPROVE_UPGRADE_SECURITY_COUNCIL_THRESHOLD = 6;
/// @dev The number of signatures needed to unfreeze the protocol.
uint256 public constant UNFREEZE_THRESHOLD = 9;
/// @dev Tracks the unique identifier used in the last successful soft emergency freeze,
/// to ensure each request is unique.
uint256 public softFreezeNonce;
/// @dev Tracks the unique identifier used in the last successful hard emergency freeze,
/// to ensure each request is unique.
uint256 public hardFreezeNonce;
/// @dev Tracks the unique identifier used in the last successful setting of the soft freeze threshold,
/// to ensure each request is unique.
uint256 public softFreezeThresholdSettingNonce;
/// @dev Tracks the unique identifier used in the last successful unfreeze.
uint256 public unfreezeNonce;
/// @dev Represents the number of signatures needed to trigger soft freeze.
/// This value is automatically reset to 9 after each soft freeze, but it can be
/// set by the 9 SC members and requires to be not bigger than 9.
uint256 public softFreezeThreshold;
/// @dev Initializes the Security Council contract with predefined members and setup for EIP-712.
/// @param _protocolUpgradeHandler The address of the protocol upgrade handler contract, responsible for executing the upgrades.
/// @param _members Array of addresses representing the members of the Security Council.
/// Expected to be sorted in ascending order without duplicates.
constructor(IProtocolUpgradeHandler _protocolUpgradeHandler, address[] memory _members)
Multisig(_members, 9)
EIP712("SecurityCouncil", "1")
{
PROTOCOL_UPGRADE_HANDLER = _protocolUpgradeHandler;
require(_members.length == 12, "SecurityCouncil requires exactly 12 members");
softFreezeThreshold = RECOMMENDED_SOFT_FREEZE_THRESHOLD;
}
/// @notice Approves ZKsync protocol upgrade, by the 6 out of 12 Security Council approvals.
/// @param _id Unique identifier of the upgrade proposal to be approved.
/// @param _signers An array of signers associated with the signatures.
/// @param _signatures An array of signatures from council members approving the upgrade.
function approveUpgradeSecurityCouncil(bytes32 _id, address[] calldata _signers, bytes[] calldata _signatures)
external
{
bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(APPROVE_UPGRADE_SECURITY_COUNCIL_TYPEHASH, _id)));
checkSignatures(digest, _signers, _signatures, APPROVE_UPGRADE_SECURITY_COUNCIL_THRESHOLD);
PROTOCOL_UPGRADE_HANDLER.approveUpgradeSecurityCouncil(_id);
}
/// @notice Initiates the protocol soft freeze by small threshold of the Security Council members.
/// @param _validUntil The timestamp until which the signature should remain valid.
/// @param _signers An array of signers associated with the signatures.
/// @param _signatures An array of signatures from council members approving the freeze.
function softFreeze(uint256 _validUntil, address[] calldata _signers, bytes[] calldata _signatures) external {
require(block.timestamp < _validUntil, "Signature expired");
bytes32 digest = _hashTypedDataV4(
keccak256(abi.encode(SOFT_FREEZE_SECURITY_COUNCIL_TYPEHASH, softFreezeNonce++, _validUntil))
);
checkSignatures(digest, _signers, _signatures, softFreezeThreshold);
// Reset threshold
softFreezeThreshold = SOFT_FREEZE_CONSERVATIVE_THRESHOLD;
PROTOCOL_UPGRADE_HANDLER.softFreeze();
}
/// @notice Initiates the protocol hard freeze by majority of the Security Council members.
/// @param _validUntil The timestamp until which the signature should remain valid.
/// @param _signers An array of signers associated with the signatures.
/// @param _signatures An array of signatures from council members approving the freeze.
function hardFreeze(uint256 _validUntil, address[] calldata _signers, bytes[] calldata _signatures) external {
require(block.timestamp < _validUntil, "Signature expired");
bytes32 digest = _hashTypedDataV4(
keccak256(abi.encode(HARD_FREEZE_SECURITY_COUNCIL_TYPEHASH, hardFreezeNonce++, _validUntil))
);
checkSignatures(digest, _signers, _signatures, HARD_FREEZE_THRESHOLD);
PROTOCOL_UPGRADE_HANDLER.hardFreeze();
}
/// @notice Initiates the protocol unfreeze by the Security Council members.
/// @param _validUntil The timestamp until which the signature should remain valid.
/// @param _signers An array of signers associated with the signatures.
/// @param _signatures An array of signatures from council members approving the unfreeze.
function unfreeze(uint256 _validUntil, address[] calldata _signers, bytes[] calldata _signatures) external {
require(block.timestamp < _validUntil, "Signature expired");
bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(UNFREEZE_TYPEHASH, unfreezeNonce++, _validUntil)));
checkSignatures(digest, _signers, _signatures, UNFREEZE_THRESHOLD);
PROTOCOL_UPGRADE_HANDLER.unfreeze();
}
/// @notice Sets the threshold for triggering a soft freeze.
/// @param _threshold New threshold for the Security Council members for approving the soft freeze.
/// @param _validUntil The timestamp until which the signature should remain valid.
/// @param _signers An array of signers associated with the signatures.
/// @param _signatures An array of signatures from council members approving the threshold setting.
function setSoftFreezeThreshold(
uint256 _threshold,
uint256 _validUntil,
address[] calldata _signers,
bytes[] calldata _signatures
) external {
require(_threshold > 0, "Threshold is too small");
require(_threshold <= SOFT_FREEZE_CONSERVATIVE_THRESHOLD, "Threshold is too big");
require(block.timestamp < _validUntil, "Signature expired");
bytes32 digest = _hashTypedDataV4(
keccak256(
abi.encode(
SET_SOFT_FREEZE_THRESHOLD_TYPEHASH, _threshold, softFreezeThresholdSettingNonce++, _validUntil
)
)
);
checkSignatures(digest, _signers, _signatures, SOFT_FREEZE_CONSERVATIVE_THRESHOLD);
softFreezeThreshold = _threshold;
}
}// SPDX-License-Identifier: MIT pragma solidity 0.8.24; /// @author Matter Labs /// @custom:security-contact [email protected] interface ISecurityCouncil { function approveUpgradeSecurityCouncil(bytes32 _id, address[] calldata _signers, bytes[] calldata _signatures) external; function softFreeze(uint256 _validUntil, address[] calldata _signers, bytes[] calldata _signatures) external; function hardFreeze(uint256 _validUntil, address[] calldata _signers, bytes[] calldata _signatures) external; function unfreeze(uint256 _validUntil, address[] calldata _signers, bytes[] calldata _signatures) external; function setSoftFreezeThreshold( uint256 _threshold, uint256 _validUntil, address[] calldata _signers, bytes[] calldata _signatures ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; /// @author Matter Labs /// @custom:security-contact [email protected] interface IProtocolUpgradeHandler { /// @dev This enumeration includes the following states: /// @param None Default state, indicating the upgrade has not been set. /// @param LegalVetoPeriod The upgrade passed L2 voting process but it is waiting for the legal veto period. /// @param Waiting The upgrade passed Legal Veto period but it is waiting for the approval from guardians or Security Council. /// @param ExecutionPending The upgrade proposal is waiting for the delay period before being ready for execution. /// @param Ready The upgrade proposal is ready to be executed. /// @param Expired The upgrade proposal was expired. /// @param Done The upgrade has been successfully executed. enum UpgradeState { None, LegalVetoPeriod, Waiting, ExecutionPending, Ready, Expired, Done } /// @dev Represents the status of an upgrade process, including the creation timestamp and actions made by guardians and Security Council. /// @param creationTimestamp The timestamp (in seconds) when the upgrade state was created. /// @param securityCouncilApprovalTimestamp The timestamp (in seconds) when Security Council approved the upgrade. /// @param guardiansApproval Indicates whether the upgrade has been approved by the guardians. /// @param guardiansExtendedLegalVeto Indicates whether guardians extended the legal veto period. /// @param executed Indicates whether the proposal is executed or not. struct UpgradeStatus { uint48 creationTimestamp; uint48 securityCouncilApprovalTimestamp; bool guardiansApproval; bool guardiansExtendedLegalVeto; bool executed; } /// @dev Represents a call to be made during an upgrade. /// @param target The address to which the call will be made. /// @param value The amount of Ether (in wei) to be sent along with the call. /// @param data The calldata to be executed on the `target` address. struct Call { address target; uint256 value; bytes data; } /// @dev Defines the structure of an upgrade that is executed by Protocol Upgrade Handler. /// @param executor The L1 address that is authorized to perform the upgrade execution (if address(0) then anyone). /// @param calls An array of `Call` structs, each representing a call to be made during the upgrade execution. /// @param salt A bytes32 value used for creating unique upgrade proposal hashes. struct UpgradeProposal { Call[] calls; address executor; bytes32 salt; } /// @dev This enumeration includes the following states: /// @param None Default state, indicating the freeze has not been happening in this upgrade cycle. /// @param Soft The protocol is/was frozen for the short time. /// @param Hard The protocol is/was frozen for the long time. /// @param AfterSoftFreeze The protocol was soft frozen, it can be hard frozen in this upgrade cycle. /// @param AfterHardFreeze The protocol was hard frozen, but now it can't be frozen until the upgrade. enum FreezeStatus { None, Soft, Hard, AfterSoftFreeze, AfterHardFreeze } function startUpgrade( uint256 _l2BatchNumber, uint256 _l2MessageIndex, uint16 _l2TxNumberInBatch, bytes32[] calldata _proof, UpgradeProposal calldata _proposal ) external; function extendLegalVeto(bytes32 _id) external; function approveUpgradeSecurityCouncil(bytes32 _id) external; function approveUpgradeGuardians(bytes32 _id) external; function execute(UpgradeProposal calldata _proposal) external payable; function executeEmergencyUpgrade(UpgradeProposal calldata _proposal) external payable; function softFreeze() external; function hardFreeze() external; function reinforceFreeze() external; function unfreeze() external; function reinforceFreezeOneChain(uint256 _chainId) external; function reinforceUnfreeze() external; function reinforceUnfreezeOneChain(uint256 _chainId) external; function upgradeState(bytes32 _id) external view returns (UpgradeState); function updateSecurityCouncil(address _newSecurityCouncil) external; function updateGuardians(address _newGuardians) external; function updateEmergencyUpgradeBoard(address _newEmergencyUpgradeBoard) external; /// @notice Emitted when the security council address is changed. event ChangeSecurityCouncil(address indexed _securityCouncilBefore, address indexed _securityCouncilAfter); /// @notice Emitted when the guardians address is changed. event ChangeGuardians(address indexed _guardiansBefore, address indexed _guardiansAfter); /// @notice Emitted when the emergency upgrade board address is changed. event ChangeEmergencyUpgradeBoard( address indexed _emergencyUpgradeBoardBefore, address indexed _emergencyUpgradeBoardAfter ); /// @notice Emitted when upgrade process on L1 is started. event UpgradeStarted(bytes32 indexed _id, UpgradeProposal _proposal); /// @notice Emitted when the legal veto period is extended. event UpgradeLegalVetoExtended(bytes32 indexed _id); /// @notice Emitted when Security Council approved the upgrade. event UpgradeApprovedBySecurityCouncil(bytes32 indexed _id); /// @notice Emitted when Guardians approved the upgrade. event UpgradeApprovedByGuardians(bytes32 indexed _id); /// @notice Emitted when the upgrade is executed. event UpgradeExecuted(bytes32 indexed _id); /// @notice Emitted when the emergency upgrade is executed. event EmergencyUpgradeExecuted(bytes32 indexed _id); /// @notice Emitted when the protocol became soft frozen. event SoftFreeze(uint256 _protocolFrozenUntil); /// @notice Emitted when the protocol became hard frozen. event HardFreeze(uint256 _protocolFrozenUntil); /// @notice Emitted when someone makes an attempt to freeze the protocol when it is frozen already. event ReinforceFreeze(); /// @notice Emitted when the protocol became active after the soft/hard freeze. event Unfreeze(); /// @notice Emitted when someone makes an attempt to freeze the specific chain when the protocol is frozen already. event ReinforceFreezeOneChain(uint256 _chainId); /// @notice Emitted when someone makes an attempt to unfreeze the protocol when it is unfrozen already. event ReinforceUnfreeze(); /// @notice Emitted when someone makes an attempt to unfreeze the specific chain when the protocol is unfrozen already. event ReinforceUnfreezeOneChain(uint256 _chainId); }
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;
import {SignatureChecker} from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";
/// @title Multisig
/// @dev An abstract contract implementing a basic multisig wallet functionality.
/// This contract allows a group of members to collectively authorize actions
/// by submitting a threshold number of valid signatures.
/// @author Matter Labs
/// @custom:security-contact [email protected]
abstract contract Multisig is IERC1271 {
using SignatureChecker for address;
/// @notice List of addresses authorized as members of the multisig.
address[] public members;
/// @notice The threshold for EIP-1271 signature verification.
uint256 public immutable EIP1271_THRESHOLD;
/// @dev Initializes the contract by setting the sorted list of multisig members.
/// Members must be unique and sorted in ascending order to ensure efficient
/// signature verification.
/// @param _members Array of addresses to be set as multisig members.
/// Expected to be sorted without duplicates.
/// @param _eip1271Threshold The threshold for EIP-1271 signature verification.
constructor(address[] memory _members, uint256 _eip1271Threshold) {
require(_eip1271Threshold > 0, "EIP-1271 threshold is too small");
require(_eip1271Threshold <= _members.length, "EIP-1271 threshold is too big");
EIP1271_THRESHOLD = _eip1271Threshold;
address lastAddress;
for (uint256 i = 0; i < _members.length; ++i) {
address currentMember = _members[i];
// Ensure the members list is strictly ascending to prevent duplicates and enable efficient signature checks.
require(lastAddress < currentMember, "Members not sorted or duplicate found");
members.push(currentMember);
lastAddress = currentMember;
}
}
/// @dev The function to check if the provided signatures meet the threshold requirement.
/// Signatures must be from unique members and are expected in the same order as the members list (sorted order).
/// @param _digest The hash of the data being signed.
/// @param _signers An array of signers associated with the signatures.
/// @param _signatures An array of signatures to be validated.
/// @param _threshold The minimum number of valid signatures required to pass the check.
function checkSignatures(bytes32 _digest, address[] memory _signers, bytes[] memory _signatures, uint256 _threshold)
public
view
{
// Ensure the total number of signatures meets or exceeds the threshold.
require(_signatures.length >= _threshold, "Insufficient valid signatures");
require(_signers.length == _signatures.length, "Inconsistent signers/signatures length");
uint256 currentMember;
for (uint256 i = 0; i < _signatures.length; ++i) {
bool success = _signers[i].isValidSignatureNow(_digest, _signatures[i]);
require(success, "Signature verification failed");
while (members[currentMember] != _signers[i]) {
currentMember++;
}
currentMember++;
}
}
/// @dev The function to check if the provided signatures are valid and meet predefined threshold.
/// @param _digest The hash of the data being signed.
/// @param _signature An array of signers and signatures to be validated ABI encoded from `address[], bytes[]` to `abi.decode(data,(address[],bytes[]))`.
function isValidSignature(bytes32 _digest, bytes calldata _signature) external view override returns (bytes4) {
(address[] memory signers, bytes[] memory signatures) = abi.decode(_signature, (address[], bytes[]));
checkSignatures(_digest, signers, signatures, EIP1271_THRESHOLD);
return IERC1271.isValidSignature.selector;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol)
pragma solidity ^0.8.20;
import {MessageHashUtils} from "./MessageHashUtils.sol";
import {ShortStrings, ShortString} from "../ShortStrings.sol";
import {IERC5267} from "../../interfaces/IERC5267.sol";
/**
* @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
*
* The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose
* encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract
* does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to
* produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.
*
* This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
* scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
* ({_hashTypedDataV4}).
*
* The implementation of the domain separator was designed to be as efficient as possible while still properly updating
* the chain id to protect against replay attacks on an eventual fork of the chain.
*
* NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
* https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
*
* NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
* separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the
* separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
*
* @custom:oz-upgrades-unsafe-allow state-variable-immutable
*/
abstract contract EIP712 is IERC5267 {
using ShortStrings for *;
bytes32 private constant TYPE_HASH =
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
// Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
// invalidate the cached domain separator if the chain id changes.
bytes32 private immutable _cachedDomainSeparator;
uint256 private immutable _cachedChainId;
address private immutable _cachedThis;
bytes32 private immutable _hashedName;
bytes32 private immutable _hashedVersion;
ShortString private immutable _name;
ShortString private immutable _version;
string private _nameFallback;
string private _versionFallback;
/**
* @dev Initializes the domain separator and parameter caches.
*
* The meaning of `name` and `version` is specified in
* https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
*
* - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
* - `version`: the current major version of the signing domain.
*
* NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
* contract upgrade].
*/
constructor(string memory name, string memory version) {
_name = name.toShortStringWithFallback(_nameFallback);
_version = version.toShortStringWithFallback(_versionFallback);
_hashedName = keccak256(bytes(name));
_hashedVersion = keccak256(bytes(version));
_cachedChainId = block.chainid;
_cachedDomainSeparator = _buildDomainSeparator();
_cachedThis = address(this);
}
/**
* @dev Returns the domain separator for the current chain.
*/
function _domainSeparatorV4() internal view returns (bytes32) {
if (address(this) == _cachedThis && block.chainid == _cachedChainId) {
return _cachedDomainSeparator;
} else {
return _buildDomainSeparator();
}
}
function _buildDomainSeparator() private view returns (bytes32) {
return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));
}
/**
* @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
* function returns the hash of the fully encoded EIP712 message for this domain.
*
* This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
*
* ```solidity
* bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
* keccak256("Mail(address to,string contents)"),
* mailTo,
* keccak256(bytes(mailContents))
* )));
* address signer = ECDSA.recover(digest, signature);
* ```
*/
function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);
}
/**
* @dev See {IERC-5267}.
*/
function eip712Domain()
public
view
virtual
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
)
{
return (
hex"0f", // 01111
_EIP712Name(),
_EIP712Version(),
block.chainid,
address(this),
bytes32(0),
new uint256[](0)
);
}
/**
* @dev The name parameter for the EIP712 domain.
*
* NOTE: By default this function reads _name which is an immutable value.
* It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
*/
// solhint-disable-next-line func-name-mixedcase
function _EIP712Name() internal view returns (string memory) {
return _name.toStringWithFallback(_nameFallback);
}
/**
* @dev The version parameter for the EIP712 domain.
*
* NOTE: By default this function reads _version which is an immutable value.
* It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
*/
// solhint-disable-next-line func-name-mixedcase
function _EIP712Version() internal view returns (string memory) {
return _version.toStringWithFallback(_versionFallback);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/SignatureChecker.sol)
pragma solidity ^0.8.20;
import {ECDSA} from "./ECDSA.sol";
import {IERC1271} from "../../interfaces/IERC1271.sol";
/**
* @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA
* signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like
* Argent and Safe Wallet (previously Gnosis Safe).
*/
library SignatureChecker {
/**
* @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the
* signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.
*
* NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
* change through time. It could return true at block N and false at block N+1 (or the opposite).
*/
function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {
(address recovered, ECDSA.RecoverError error, ) = ECDSA.tryRecover(hash, signature);
return
(error == ECDSA.RecoverError.NoError && recovered == signer) ||
isValidERC1271SignatureNow(signer, hash, signature);
}
/**
* @dev Checks if a signature is valid for a given signer and data hash. The signature is validated
* against the signer smart contract using ERC1271.
*
* NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
* change through time. It could return true at block N and false at block N+1 (or the opposite).
*/
function isValidERC1271SignatureNow(
address signer,
bytes32 hash,
bytes memory signature
) internal view returns (bool) {
(bool success, bytes memory result) = signer.staticcall(
abi.encodeCall(IERC1271.isValidSignature, (hash, signature))
);
return (success &&
result.length >= 32 &&
abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1271.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC1271 standard signature validation method for
* contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].
*/
interface IERC1271 {
/**
* @dev Should return whether the signature provided is valid for the provided data
* @param hash Hash of the data to be signed
* @param signature Signature byte array associated with _data
*/
function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)
pragma solidity ^0.8.20;
import {Strings} from "../Strings.sol";
/**
* @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.
*
* The library provides methods for generating a hash of a message that conforms to the
* https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]
* specifications.
*/
library MessageHashUtils {
/**
* @dev Returns the keccak256 digest of an EIP-191 signed data with version
* `0x45` (`personal_sign` messages).
*
* The digest is calculated by prefixing a bytes32 `messageHash` with
* `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the
* hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
*
* NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with
* keccak256, although any bytes32 value can be safely used because the final digest will
* be re-hashed.
*
* See {ECDSA-recover}.
*/
function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash
mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix
digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)
}
}
/**
* @dev Returns the keccak256 digest of an EIP-191 signed data with version
* `0x45` (`personal_sign` messages).
*
* The digest is calculated by prefixing an arbitrary `message` with
* `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the
* hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
*
* See {ECDSA-recover}.
*/
function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {
return
keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message));
}
/**
* @dev Returns the keccak256 digest of an EIP-191 signed data with version
* `0x00` (data with intended validator).
*
* The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended
* `validator` address. Then hashing the result.
*
* See {ECDSA-recover}.
*/
function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
return keccak256(abi.encodePacked(hex"19_00", validator, data));
}
/**
* @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).
*
* The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with
* `\x19\x01` and hashing the result. It corresponds to the hash signed by the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.
*
* See {ECDSA-recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {
/// @solidity memory-safe-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, hex"19_01")
mstore(add(ptr, 0x02), domainSeparator)
mstore(add(ptr, 0x22), structHash)
digest := keccak256(ptr, 0x42)
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol)
pragma solidity ^0.8.20;
import {StorageSlot} from "./StorageSlot.sol";
// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
// | length | 0x BB |
type ShortString is bytes32;
/**
* @dev This library provides functions to convert short memory strings
* into a `ShortString` type that can be used as an immutable variable.
*
* Strings of arbitrary length can be optimized using this library if
* they are short enough (up to 31 bytes) by packing them with their
* length (1 byte) in a single EVM word (32 bytes). Additionally, a
* fallback mechanism can be used for every other case.
*
* Usage example:
*
* ```solidity
* contract Named {
* using ShortStrings for *;
*
* ShortString private immutable _name;
* string private _nameFallback;
*
* constructor(string memory contractName) {
* _name = contractName.toShortStringWithFallback(_nameFallback);
* }
*
* function name() external view returns (string memory) {
* return _name.toStringWithFallback(_nameFallback);
* }
* }
* ```
*/
library ShortStrings {
// Used as an identifier for strings longer than 31 bytes.
bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;
error StringTooLong(string str);
error InvalidShortString();
/**
* @dev Encode a string of at most 31 chars into a `ShortString`.
*
* This will trigger a `StringTooLong` error is the input string is too long.
*/
function toShortString(string memory str) internal pure returns (ShortString) {
bytes memory bstr = bytes(str);
if (bstr.length > 31) {
revert StringTooLong(str);
}
return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));
}
/**
* @dev Decode a `ShortString` back to a "normal" string.
*/
function toString(ShortString sstr) internal pure returns (string memory) {
uint256 len = byteLength(sstr);
// using `new string(len)` would work locally but is not memory safe.
string memory str = new string(32);
/// @solidity memory-safe-assembly
assembly {
mstore(str, len)
mstore(add(str, 0x20), sstr)
}
return str;
}
/**
* @dev Return the length of a `ShortString`.
*/
function byteLength(ShortString sstr) internal pure returns (uint256) {
uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;
if (result > 31) {
revert InvalidShortString();
}
return result;
}
/**
* @dev Encode a string into a `ShortString`, or write it to storage if it is too long.
*/
function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {
if (bytes(value).length < 32) {
return toShortString(value);
} else {
StorageSlot.getStringSlot(store).value = value;
return ShortString.wrap(FALLBACK_SENTINEL);
}
}
/**
* @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
*/
function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {
if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
return toString(value);
} else {
return store;
}
}
/**
* @dev Return the length of a string that was encoded to `ShortString` or written to storage using
* {setWithFallback}.
*
* WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
* actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
*/
function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {
if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
return byteLength(value);
} else {
return bytes(store).length;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)
pragma solidity ^0.8.20;
interface IERC5267 {
/**
* @dev MAY be emitted to signal that the domain could have changed.
*/
event EIP712DomainChanged();
/**
* @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
* signature.
*/
function eip712Domain()
external
view
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.20;
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS
}
/**
* @dev The signature derives the `address(0)`.
*/
error ECDSAInvalidSignature();
/**
* @dev The signature has an invalid length.
*/
error ECDSAInvalidSignatureLength(uint256 length);
/**
* @dev The signature has an S value that is in the upper half order.
*/
error ECDSAInvalidSignatureS(bytes32 s);
/**
* @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
* return address(0) without also returning an error description. Errors are documented using an enum (error type)
* and a bytes32 providing additional information about the error.
*
* If no error is returned, then the address can be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*/
function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {
unchecked {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
// We do not check for an overflow here since the shift operation results in 0 or 1.
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*/
function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError, bytes32) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS, s);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature, bytes32(0));
}
return (signer, RecoverError.NoError, bytes32(0));
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
*/
function _throwError(RecoverError error, bytes32 errorArg) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert ECDSAInvalidSignature();
} else if (error == RecoverError.InvalidSignatureLength) {
revert ECDSAInvalidSignatureLength(uint256(errorArg));
} else if (error == RecoverError.InvalidSignatureS) {
revert ECDSAInvalidSignatureS(errorArg);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)
pragma solidity ^0.8.20;
import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant HEX_DIGITS = "0123456789abcdef";
uint8 private constant ADDRESS_LENGTH = 20;
/**
* @dev The `value` string doesn't fit in the specified `length`.
*/
error StringsInsufficientHexLength(uint256 value, uint256 length);
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toStringSigned(int256 value) internal pure returns (string memory) {
return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
uint256 localValue = value;
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = HEX_DIGITS[localValue & 0xf];
localValue >>= 4;
}
if (localValue != 0) {
revert StringsInsufficientHexLength(value, length);
}
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
* representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
}
}// 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
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Muldiv operation overflow.
*/
error MathOverflowedMulDiv();
enum Rounding {
Floor, // Toward negative infinity
Ceil, // Toward positive infinity
Trunc, // Toward zero
Expand // Away from zero
}
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds towards infinity instead
* of rounding towards zero.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
if (b == 0) {
// Guarantee the same behavior as in a regular Solidity division.
return a / b;
}
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
* denominator == 0.
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
* Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0 = x * y; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
if (denominator <= prod1) {
revert MathOverflowedMulDiv();
}
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator.
// Always >= 1. See https://cs.stackexchange.com/q/138556/92363.
uint256 twos = denominator & (0 - denominator);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
// works in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
* towards zero.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256 of a positive value rounded towards zero.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
}
}
/**
* @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
*/
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
return uint8(rounding) % 2 == 1;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}{
"remappings": [
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "paris",
"viaIR": false,
"libraries": {}
}Contract ABI
API[{"inputs":[{"internalType":"contract IProtocolUpgradeHandler","name":"_protocolUpgradeHandler","type":"address"},{"internalType":"address[]","name":"_members","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"inputs":[],"name":"APPROVE_UPGRADE_SECURITY_COUNCIL_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EIP1271_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HARD_FREEZE_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROTOCOL_UPGRADE_HANDLER","outputs":[{"internalType":"contract IProtocolUpgradeHandler","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RECOMMENDED_SOFT_FREEZE_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SOFT_FREEZE_CONSERVATIVE_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNFREEZE_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"},{"internalType":"address[]","name":"_signers","type":"address[]"},{"internalType":"bytes[]","name":"_signatures","type":"bytes[]"}],"name":"approveUpgradeSecurityCouncil","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_digest","type":"bytes32"},{"internalType":"address[]","name":"_signers","type":"address[]"},{"internalType":"bytes[]","name":"_signatures","type":"bytes[]"},{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"checkSignatures","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_validUntil","type":"uint256"},{"internalType":"address[]","name":"_signers","type":"address[]"},{"internalType":"bytes[]","name":"_signatures","type":"bytes[]"}],"name":"hardFreeze","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"hardFreezeNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_digest","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"members","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_threshold","type":"uint256"},{"internalType":"uint256","name":"_validUntil","type":"uint256"},{"internalType":"address[]","name":"_signers","type":"address[]"},{"internalType":"bytes[]","name":"_signatures","type":"bytes[]"}],"name":"setSoftFreezeThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_validUntil","type":"uint256"},{"internalType":"address[]","name":"_signers","type":"address[]"},{"internalType":"bytes[]","name":"_signatures","type":"bytes[]"}],"name":"softFreeze","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"softFreezeNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"softFreezeThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"softFreezeThresholdSettingNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_validUntil","type":"uint256"},{"internalType":"address[]","name":"_signers","type":"address[]"},{"internalType":"bytes[]","name":"_signatures","type":"bytes[]"}],"name":"unfreeze","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unfreezeNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
6101a06040523480156200001257600080fd5b5060405162001e9938038062001e99833981016040819052620000359162000418565b6040518060400160405280600f81526020016e14d958dd5c9a5d1e50dbdd5b98da5b608a1b815250604051806040016040528060018152602001603160f81b81525082600960008111620000d05760405162461bcd60e51b815260206004820152601f60248201527f4549502d31323731207468726573686f6c6420697320746f6f20736d616c6c0060448201526064015b60405180910390fd5b8151811115620001235760405162461bcd60e51b815260206004820152601d60248201527f4549502d31323731207468726573686f6c6420697320746f6f206269670000006044820152606401620000c7565b60808190526000805b83518110156200021b5760008482815181106200014d576200014d62000503565b60200260200101519050806001600160a01b0316836001600160a01b031610620001c85760405162461bcd60e51b815260206004820152602560248201527f4d656d62657273206e6f7420736f72746564206f72206475706c696361746520604482015264199bdd5b9960da1b6064820152608401620000c7565b60008054600180820183559180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630180546001600160a01b0319166001600160a01b038416179055909250016200012c565b506200022f9250849150600190506200035b565b61014052620002408160026200035b565b61016052815160208084019190912061010052815190820120610120524660c052620002d06101005161012051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60a05250503060e0526001600160a01b038216610180528051600c146200034e5760405162461bcd60e51b815260206004820152602b60248201527f5365637572697479436f756e63696c2072657175697265732065786163746c7960448201526a203132206d656d6265727360a81b6064820152608401620000c7565b50506003600755620006ec565b60006020835110156200037b57620003738362000394565b90506200038e565b81620003888482620005aa565b5060ff90505b92915050565b600080829050601f81511115620003c2578260405163305a27a960e01b8152600401620000c7919062000676565b8051620003cf82620006c7565b179392505050565b6001600160a01b0381168114620003ed57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b80516200041381620003d7565b919050565b600080604083850312156200042c57600080fd5b82516200043981620003d7565b602084810151919350906001600160401b03808211156200045957600080fd5b818601915086601f8301126200046e57600080fd5b815181811115620004835762000483620003f0565b8060051b604051601f19603f83011681018181108582111715620004ab57620004ab620003f0565b604052918252848201925083810185019189831115620004ca57600080fd5b938501935b82851015620004f357620004e38562000406565b84529385019392850192620004cf565b8096505050505050509250929050565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806200052e57607f821691505b6020821081036200054f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620005a5576000816000526020600020601f850160051c81016020861015620005805750805b601f850160051c820191505b81811015620005a1578281556001016200058c565b5050505b505050565b81516001600160401b03811115620005c657620005c6620003f0565b620005de81620005d7845462000519565b8462000555565b602080601f831160018114620006165760008415620005fd5750858301515b600019600386901b1c1916600185901b178555620005a1565b600085815260208120601f198616915b82811015620006475788860151825594840194600190910190840162000626565b5085821015620006665787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020808352835180602085015260005b81811015620006a65785810183015185820160400152820162000688565b506000604082860101526040601f19601f8301168501019250505092915050565b805160208083015191908110156200054f5760001960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516101605161018051611719620007806000396000818161025b015281816105df01528181610706015281816108010152610ac301526000610bea01526000610bb801526000610e1201526000610dea01526000610d4501526000610d6f01526000610d9901526000818161028a01526102e401526117196000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80635daf08ca116100b8578063b4c77c3b1161007c578063b4c77c3b14610256578063b5c8ccee1461027d578063cb172aff1461013c578063dbf96b8014610285578063e2243bea146102ac578063eb72e6d6146102b557600080fd5b80635daf08ca146101f4578063784394e81461013c5780637dce97ef1461021f57806384b0196e14610228578063a49c8f191461024357600080fd5b8063240ed080116100ff578063240ed080146101be5780632a8b57e8146101c75780632e8891fd146101cf578063368a8c22146101d8578063397948a9146101e157600080fd5b8063019172211461013c5780631626ba7e14610157578063194b1ee6146101835780631d4838b4146101985780632138a9ab146101ab575b600080fd5b610144600981565b6040519081526020015b60405180910390f35b61016a610165366004611045565b6102c8565b6040516001600160e01b0319909116815260200161014e565b6101966101913660046112a4565b61031a565b005b6101966101a6366004611365565b610501565b6101966101b9366004611365565b610658565b61014460065481565b610144600381565b61014460075481565b61014460055481565b6101966101ef366004611365565b61075f565b6102076102023660046113df565b61084d565b6040516001600160a01b03909116815260200161014e565b61014460045481565b610230610877565b60405161014e9796959493929190611448565b6101966102513660046114e1565b6108bd565b6102077f000000000000000000000000000000000000000000000000000000000000000081565b610144600681565b6101447f000000000000000000000000000000000000000000000000000000000000000081565b61014460035481565b6101966102c3366004611365565b610a25565b600080806102d884860186611564565b915091506103088683837f000000000000000000000000000000000000000000000000000000000000000061031a565b50630b135d3f60e11b95945050505050565b80825110156103705760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e742076616c6964207369676e61747572657300000060448201526064015b60405180910390fd5b81518351146103d05760405162461bcd60e51b815260206004820152602660248201527f496e636f6e73697374656e74207369676e6572732f7369676e617475726573206044820152650d8cadccee8d60d31b6064820152608401610367565b6000805b83518110156104f957600061042f878684815181106103f5576103f56115c8565b602002602001015188858151811061040f5761040f6115c8565b60200260200101516001600160a01b0316610b1c9092919063ffffffff16565b90508061047e5760405162461bcd60e51b815260206004820152601d60248201527f5369676e617475726520766572696669636174696f6e206661696c65640000006044820152606401610367565b858281518110610490576104906115c8565b60200260200101516001600160a01b0316600084815481106104b4576104b46115c8565b6000918252602090912001546001600160a01b0316146104e057826104d8816115de565b93505061047e565b826104ea816115de565b935050508060010190506103d4565b505050505050565b8442106105205760405162461bcd60e51b815260040161036790611605565b60048054600091610590917fd6fb98ad88d4948bc7671a869dfb5ec0ccd1a330599d18d3fac18c75ce36d0f29184610557836115de565b90915550604080516020810193909352820152606081018890526080015b60405160208183030381529060405280519060200120610b7e565b90506105dd818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506105d69250879150889050611630565b600961031a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166384a20db86040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561063857600080fd5b505af115801561064c573d6000803e3d6000fd5b50505050505050505050565b8442106106775760405162461bcd60e51b815260040161036790611605565b600380546000916106ae917f68ee1e22d294803f2b6efc3fde00d1e0b8f5f0aa2086aaaee226bd8d17f15feb9184610557836115de565b90506106fc818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106f49250879150889050611630565b60075461031a565b60096007819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663314e6ebe6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561063857600080fd5b604080517fc91a90b2153b64f9f68784c8eeb8c2bc7a62d3f153fcb15e9fbf277999d61f60602082015290810186905260009061079e90606001610575565b90506107eb818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506107e49250879150889050611630565b600661031a565b60405163ea3e739b60e01b8152600481018790527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ea3e739b90602401600060405180830381600087803b15801561063857600080fd5b6000818154811061085d57600080fd5b6000918252602090912001546001600160a01b0316905081565b60006060806000806000606061088b610bb1565b610893610be3565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b600086116109065760405162461bcd60e51b8152602060048201526016602482015275151a1c995cda1bdb19081a5cc81d1bdbc81cdb585b1b60521b6044820152606401610367565b600986111561094e5760405162461bcd60e51b81526020600482015260146024820152735468726573686f6c6420697320746f6f2062696760601b6044820152606401610367565b84421061096d5760405162461bcd60e51b815260040161036790611605565b60006109d17f636f0c16c6c997b3d68f26b3722196fbe7c7884e145c75f1511a5f0c83d4b21788600560008154809291906109a7906115de565b9091555060408051602081019490945283019190915260608201526080810188905260a001610575565b9050610a17818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506105d69250879150889050611630565b505050600793909355505050565b844210610a445760405162461bcd60e51b815260040161036790611605565b60068054600091610a7b917fe8999d80f7615e5a9309cecf4352acc7a23f29500c2dd3fd9c1f1bfe053068119184610557836115de565b9050610ac1818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506105d69250879150889050611630565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636a28f0006040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561063857600080fd5b6000806000610b2b8585610c10565b5090925090506000816003811115610b4557610b4561163d565b148015610b635750856001600160a01b0316826001600160a01b0316145b80610b745750610b74868686610c5d565b9695505050505050565b6000610bab610b8b610d38565b8360405161190160f01b8152600281019290925260228201526042902090565b92915050565b6060610bde7f00000000000000000000000000000000000000000000000000000000000000006001610e63565b905090565b6060610bde7f00000000000000000000000000000000000000000000000000000000000000006002610e63565b60008060008351604103610c4a5760208401516040850151606086015160001a610c3c88828585610f0f565b955095509550505050610c56565b50508151600091506002905b9250925092565b6000806000856001600160a01b03168585604051602401610c7f929190611653565b60408051601f198184030181529181526020820180516001600160e01b0316630b135d3f60e11b17905251610cb49190611674565b600060405180830381855afa9150503d8060008114610cef576040519150601f19603f3d011682016040523d82523d6000602084013e610cf4565b606091505b5091509150818015610d0857506020815110155b8015610b7457508051630b135d3f60e11b90610d2d9083016020908101908401611690565b149695505050505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015610d9157507f000000000000000000000000000000000000000000000000000000000000000046145b15610dbb57507f000000000000000000000000000000000000000000000000000000000000000090565b610bde604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b606060ff8314610e7d57610e7683610fde565b9050610bab565b818054610e89906116a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb5906116a9565b8015610f025780601f10610ed757610100808354040283529160200191610f02565b820191906000526020600020905b815481529060010190602001808311610ee557829003601f168201915b5050505050905092915050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610f4a5750600091506003905082610fd4565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610f9e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610fca57506000925060019150829050610fd4565b9250600091508190505b9450945094915050565b60606000610feb8361101d565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600060ff8216601f811115610bab57604051632cd44ac360e21b815260040160405180910390fd5b60008060006040848603121561105a57600080fd5b83359250602084013567ffffffffffffffff8082111561107957600080fd5b818601915086601f83011261108d57600080fd5b81358181111561109c57600080fd5b8760208285010111156110ae57600080fd5b6020830194508093505050509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611100576111006110c1565b604052919050565b600067ffffffffffffffff821115611122576111226110c1565b5060051b60200190565b600082601f83011261113d57600080fd5b8135602061115261114d83611108565b6110d7565b8083825260208201915060208460051b87010193508684111561117457600080fd5b602086015b848110156111a65780356001600160a01b03811681146111995760008081fd5b8352918301918301611179565b509695505050505050565b60006111bf61114d84611108565b8381529050602080820190600585901b8401868111156111de57600080fd5b845b8181101561127257803567ffffffffffffffff808211156112015760008081fd5b8188019150601f8a818401126112175760008081fd5b823582811115611229576112296110c1565b61123a818301601f191688016110d7565b92508083528b8782860101111561125357600091508182fd5b80878501888501376000908301870152508552509282019282016111e0565b505050509392505050565b600082601f83011261128e57600080fd5b61129d838335602085016111b1565b9392505050565b600080600080608085870312156112ba57600080fd5b84359350602085013567ffffffffffffffff808211156112d957600080fd5b6112e58883890161112c565b945060408701359150808211156112fb57600080fd5b506113088782880161127d565b949793965093946060013593505050565b60008083601f84011261132b57600080fd5b50813567ffffffffffffffff81111561134357600080fd5b6020830191508360208260051b850101111561135e57600080fd5b9250929050565b60008060008060006060868803121561137d57600080fd5b85359450602086013567ffffffffffffffff8082111561139c57600080fd5b6113a889838a01611319565b909650945060408801359150808211156113c157600080fd5b506113ce88828901611319565b969995985093965092949392505050565b6000602082840312156113f157600080fd5b5035919050565b60005b838110156114135781810151838201526020016113fb565b50506000910152565b600081518084526114348160208601602086016113f8565b601f01601f19169290920160200192915050565b60ff60f81b881681526000602060e0602084015261146960e084018a61141c565b838103604085015261147b818a61141c565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b818110156114cf578351835292840192918401916001016114b3565b50909c9b505050505050505050505050565b600080600080600080608087890312156114fa57600080fd5b8635955060208701359450604087013567ffffffffffffffff8082111561152057600080fd5b61152c8a838b01611319565b9096509450606089013591508082111561154557600080fd5b5061155289828a01611319565b979a9699509497509295939492505050565b6000806040838503121561157757600080fd5b823567ffffffffffffffff8082111561158f57600080fd5b61159b8683870161112c565b935060208501359150808211156115b157600080fd5b506115be8582860161127d565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b6000600182016115fe57634e487b7160e01b600052601160045260246000fd5b5060010190565b60208082526011908201527014da59db985d1d5c9948195e1c1a5c9959607a1b604082015260600190565b600061129d3684846111b1565b634e487b7160e01b600052602160045260246000fd5b82815260406020820152600061166c604083018461141c565b949350505050565b600082516116868184602087016113f8565b9190910192915050565b6000602082840312156116a257600080fd5b5051919050565b600181811c908216806116bd57607f821691505b6020821081036116dd57634e487b7160e01b600052602260045260246000fd5b5091905056fea2646970667358221220fd2e5a12caabe79d8e808c07cf60258de6f6b75b5d15713258de939fe84befe164736f6c634300081800330000000000000000000000009b956d242e6806044877c7c1b530d475e371d5440000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000220eed10f3068ecbbaafad4ab810f3628b372597000000000000000000000000595a9f73410cfe472fa0f765a6af5f2da23666780000000000000000000000005b5c922dda9bc4865aa1a4d30529178ad541e0300000000000000000000000006393bf2afa953b425322f00567fae372199190b40000000000000000000000006f3d34ec48c8e1695091798e636db199e767185200000000000000000000000071fc7ae3f3379afeb34cd4c27514ae69b535001100000000000000000000000072698e1fbc70ae03b646a3e8992e88565be2f0db000000000000000000000000a17027eda3e1cfd0b48b772bb9a3515547c8cadd000000000000000000000000ac0eb1266f84277ab9f87d218a7ce36c86ee47e1000000000000000000000000b70a955e88b1522e41960b8e81fb28ffc336ba61000000000000000000000000c9f23c161a4dacdca4e09ad7795786526c25f9c6000000000000000000000000d3c0b171e33b69bcd8d790c1638cbc5db559d841
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101375760003560e01c80635daf08ca116100b8578063b4c77c3b1161007c578063b4c77c3b14610256578063b5c8ccee1461027d578063cb172aff1461013c578063dbf96b8014610285578063e2243bea146102ac578063eb72e6d6146102b557600080fd5b80635daf08ca146101f4578063784394e81461013c5780637dce97ef1461021f57806384b0196e14610228578063a49c8f191461024357600080fd5b8063240ed080116100ff578063240ed080146101be5780632a8b57e8146101c75780632e8891fd146101cf578063368a8c22146101d8578063397948a9146101e157600080fd5b8063019172211461013c5780631626ba7e14610157578063194b1ee6146101835780631d4838b4146101985780632138a9ab146101ab575b600080fd5b610144600981565b6040519081526020015b60405180910390f35b61016a610165366004611045565b6102c8565b6040516001600160e01b0319909116815260200161014e565b6101966101913660046112a4565b61031a565b005b6101966101a6366004611365565b610501565b6101966101b9366004611365565b610658565b61014460065481565b610144600381565b61014460075481565b61014460055481565b6101966101ef366004611365565b61075f565b6102076102023660046113df565b61084d565b6040516001600160a01b03909116815260200161014e565b61014460045481565b610230610877565b60405161014e9796959493929190611448565b6101966102513660046114e1565b6108bd565b6102077f0000000000000000000000009b956d242e6806044877c7c1b530d475e371d54481565b610144600681565b6101447f000000000000000000000000000000000000000000000000000000000000000981565b61014460035481565b6101966102c3366004611365565b610a25565b600080806102d884860186611564565b915091506103088683837f000000000000000000000000000000000000000000000000000000000000000961031a565b50630b135d3f60e11b95945050505050565b80825110156103705760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e742076616c6964207369676e61747572657300000060448201526064015b60405180910390fd5b81518351146103d05760405162461bcd60e51b815260206004820152602660248201527f496e636f6e73697374656e74207369676e6572732f7369676e617475726573206044820152650d8cadccee8d60d31b6064820152608401610367565b6000805b83518110156104f957600061042f878684815181106103f5576103f56115c8565b602002602001015188858151811061040f5761040f6115c8565b60200260200101516001600160a01b0316610b1c9092919063ffffffff16565b90508061047e5760405162461bcd60e51b815260206004820152601d60248201527f5369676e617475726520766572696669636174696f6e206661696c65640000006044820152606401610367565b858281518110610490576104906115c8565b60200260200101516001600160a01b0316600084815481106104b4576104b46115c8565b6000918252602090912001546001600160a01b0316146104e057826104d8816115de565b93505061047e565b826104ea816115de565b935050508060010190506103d4565b505050505050565b8442106105205760405162461bcd60e51b815260040161036790611605565b60048054600091610590917fd6fb98ad88d4948bc7671a869dfb5ec0ccd1a330599d18d3fac18c75ce36d0f29184610557836115de565b90915550604080516020810193909352820152606081018890526080015b60405160208183030381529060405280519060200120610b7e565b90506105dd818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506105d69250879150889050611630565b600961031a565b7f0000000000000000000000009b956d242e6806044877c7c1b530d475e371d5446001600160a01b03166384a20db86040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561063857600080fd5b505af115801561064c573d6000803e3d6000fd5b50505050505050505050565b8442106106775760405162461bcd60e51b815260040161036790611605565b600380546000916106ae917f68ee1e22d294803f2b6efc3fde00d1e0b8f5f0aa2086aaaee226bd8d17f15feb9184610557836115de565b90506106fc818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106f49250879150889050611630565b60075461031a565b60096007819055507f0000000000000000000000009b956d242e6806044877c7c1b530d475e371d5446001600160a01b031663314e6ebe6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561063857600080fd5b604080517fc91a90b2153b64f9f68784c8eeb8c2bc7a62d3f153fcb15e9fbf277999d61f60602082015290810186905260009061079e90606001610575565b90506107eb818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506107e49250879150889050611630565b600661031a565b60405163ea3e739b60e01b8152600481018790527f0000000000000000000000009b956d242e6806044877c7c1b530d475e371d5446001600160a01b03169063ea3e739b90602401600060405180830381600087803b15801561063857600080fd5b6000818154811061085d57600080fd5b6000918252602090912001546001600160a01b0316905081565b60006060806000806000606061088b610bb1565b610893610be3565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b600086116109065760405162461bcd60e51b8152602060048201526016602482015275151a1c995cda1bdb19081a5cc81d1bdbc81cdb585b1b60521b6044820152606401610367565b600986111561094e5760405162461bcd60e51b81526020600482015260146024820152735468726573686f6c6420697320746f6f2062696760601b6044820152606401610367565b84421061096d5760405162461bcd60e51b815260040161036790611605565b60006109d17f636f0c16c6c997b3d68f26b3722196fbe7c7884e145c75f1511a5f0c83d4b21788600560008154809291906109a7906115de565b9091555060408051602081019490945283019190915260608201526080810188905260a001610575565b9050610a17818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506105d69250879150889050611630565b505050600793909355505050565b844210610a445760405162461bcd60e51b815260040161036790611605565b60068054600091610a7b917fe8999d80f7615e5a9309cecf4352acc7a23f29500c2dd3fd9c1f1bfe053068119184610557836115de565b9050610ac1818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506105d69250879150889050611630565b7f0000000000000000000000009b956d242e6806044877c7c1b530d475e371d5446001600160a01b0316636a28f0006040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561063857600080fd5b6000806000610b2b8585610c10565b5090925090506000816003811115610b4557610b4561163d565b148015610b635750856001600160a01b0316826001600160a01b0316145b80610b745750610b74868686610c5d565b9695505050505050565b6000610bab610b8b610d38565b8360405161190160f01b8152600281019290925260228201526042902090565b92915050565b6060610bde7f5365637572697479436f756e63696c000000000000000000000000000000000f6001610e63565b905090565b6060610bde7f31000000000000000000000000000000000000000000000000000000000000016002610e63565b60008060008351604103610c4a5760208401516040850151606086015160001a610c3c88828585610f0f565b955095509550505050610c56565b50508151600091506002905b9250925092565b6000806000856001600160a01b03168585604051602401610c7f929190611653565b60408051601f198184030181529181526020820180516001600160e01b0316630b135d3f60e11b17905251610cb49190611674565b600060405180830381855afa9150503d8060008114610cef576040519150601f19603f3d011682016040523d82523d6000602084013e610cf4565b606091505b5091509150818015610d0857506020815110155b8015610b7457508051630b135d3f60e11b90610d2d9083016020908101908401611690565b149695505050505050565b6000306001600160a01b037f000000000000000000000000541e05fbe96895095e0f4b70865abac70cb12e0e16148015610d9157507f0000000000000000000000000000000000000000000000000000000000aa36a746145b15610dbb57507f385f228c6b73e471854b6ed5dbc779b26e9eb143605830d17dd630a1ec03b55a90565b610bde604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f276d9a8ea796e6929ad373b956388272851285a3acfb6c8fe63a0f2b88c20242918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b606060ff8314610e7d57610e7683610fde565b9050610bab565b818054610e89906116a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb5906116a9565b8015610f025780601f10610ed757610100808354040283529160200191610f02565b820191906000526020600020905b815481529060010190602001808311610ee557829003601f168201915b5050505050905092915050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610f4a5750600091506003905082610fd4565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610f9e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610fca57506000925060019150829050610fd4565b9250600091508190505b9450945094915050565b60606000610feb8361101d565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600060ff8216601f811115610bab57604051632cd44ac360e21b815260040160405180910390fd5b60008060006040848603121561105a57600080fd5b83359250602084013567ffffffffffffffff8082111561107957600080fd5b818601915086601f83011261108d57600080fd5b81358181111561109c57600080fd5b8760208285010111156110ae57600080fd5b6020830194508093505050509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611100576111006110c1565b604052919050565b600067ffffffffffffffff821115611122576111226110c1565b5060051b60200190565b600082601f83011261113d57600080fd5b8135602061115261114d83611108565b6110d7565b8083825260208201915060208460051b87010193508684111561117457600080fd5b602086015b848110156111a65780356001600160a01b03811681146111995760008081fd5b8352918301918301611179565b509695505050505050565b60006111bf61114d84611108565b8381529050602080820190600585901b8401868111156111de57600080fd5b845b8181101561127257803567ffffffffffffffff808211156112015760008081fd5b8188019150601f8a818401126112175760008081fd5b823582811115611229576112296110c1565b61123a818301601f191688016110d7565b92508083528b8782860101111561125357600091508182fd5b80878501888501376000908301870152508552509282019282016111e0565b505050509392505050565b600082601f83011261128e57600080fd5b61129d838335602085016111b1565b9392505050565b600080600080608085870312156112ba57600080fd5b84359350602085013567ffffffffffffffff808211156112d957600080fd5b6112e58883890161112c565b945060408701359150808211156112fb57600080fd5b506113088782880161127d565b949793965093946060013593505050565b60008083601f84011261132b57600080fd5b50813567ffffffffffffffff81111561134357600080fd5b6020830191508360208260051b850101111561135e57600080fd5b9250929050565b60008060008060006060868803121561137d57600080fd5b85359450602086013567ffffffffffffffff8082111561139c57600080fd5b6113a889838a01611319565b909650945060408801359150808211156113c157600080fd5b506113ce88828901611319565b969995985093965092949392505050565b6000602082840312156113f157600080fd5b5035919050565b60005b838110156114135781810151838201526020016113fb565b50506000910152565b600081518084526114348160208601602086016113f8565b601f01601f19169290920160200192915050565b60ff60f81b881681526000602060e0602084015261146960e084018a61141c565b838103604085015261147b818a61141c565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b818110156114cf578351835292840192918401916001016114b3565b50909c9b505050505050505050505050565b600080600080600080608087890312156114fa57600080fd5b8635955060208701359450604087013567ffffffffffffffff8082111561152057600080fd5b61152c8a838b01611319565b9096509450606089013591508082111561154557600080fd5b5061155289828a01611319565b979a9699509497509295939492505050565b6000806040838503121561157757600080fd5b823567ffffffffffffffff8082111561158f57600080fd5b61159b8683870161112c565b935060208501359150808211156115b157600080fd5b506115be8582860161127d565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b6000600182016115fe57634e487b7160e01b600052601160045260246000fd5b5060010190565b60208082526011908201527014da59db985d1d5c9948195e1c1a5c9959607a1b604082015260600190565b600061129d3684846111b1565b634e487b7160e01b600052602160045260246000fd5b82815260406020820152600061166c604083018461141c565b949350505050565b600082516116868184602087016113f8565b9190910192915050565b6000602082840312156116a257600080fd5b5051919050565b600181811c908216806116bd57607f821691505b6020821081036116dd57634e487b7160e01b600052602260045260246000fd5b5091905056fea2646970667358221220fd2e5a12caabe79d8e808c07cf60258de6f6b75b5d15713258de939fe84befe164736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000009b956d242e6806044877c7c1b530d475e371d5440000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000220eed10f3068ecbbaafad4ab810f3628b372597000000000000000000000000595a9f73410cfe472fa0f765a6af5f2da23666780000000000000000000000005b5c922dda9bc4865aa1a4d30529178ad541e0300000000000000000000000006393bf2afa953b425322f00567fae372199190b40000000000000000000000006f3d34ec48c8e1695091798e636db199e767185200000000000000000000000071fc7ae3f3379afeb34cd4c27514ae69b535001100000000000000000000000072698e1fbc70ae03b646a3e8992e88565be2f0db000000000000000000000000a17027eda3e1cfd0b48b772bb9a3515547c8cadd000000000000000000000000ac0eb1266f84277ab9f87d218a7ce36c86ee47e1000000000000000000000000b70a955e88b1522e41960b8e81fb28ffc336ba61000000000000000000000000c9f23c161a4dacdca4e09ad7795786526c25f9c6000000000000000000000000d3c0b171e33b69bcd8d790c1638cbc5db559d841
-----Decoded View---------------
Arg [0] : _protocolUpgradeHandler (address): 0x9B956d242e6806044877C7C1B530D475E371d544
Arg [1] : _members (address[]): 0x220eED10f3068EcBBaAFaD4ab810f3628b372597,0x595A9F73410cFE472FA0F765a6Af5f2da2366678,0x5B5c922DDA9bc4865Aa1A4d30529178aD541E030,0x6393bf2aFA953B425322F00567fae372199190b4,0x6f3d34ec48C8e1695091798e636DB199E7671852,0x71FC7ae3F3379AfEB34Cd4c27514ae69b5350011,0x72698e1FBC70ae03b646A3e8992e88565be2F0Db,0xa17027EDa3E1cfd0b48b772BB9A3515547C8cAdD,0xaC0EB1266f84277ab9f87D218a7cE36C86ee47e1,0xB70a955E88B1522E41960B8e81Fb28fFc336ba61,0xc9F23C161a4DacdCA4e09Ad7795786526C25f9c6,0xD3c0B171E33B69BcD8D790c1638cbc5Db559d841
-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 0000000000000000000000009b956d242e6806044877c7c1b530d475e371d544
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [3] : 000000000000000000000000220eed10f3068ecbbaafad4ab810f3628b372597
Arg [4] : 000000000000000000000000595a9f73410cfe472fa0f765a6af5f2da2366678
Arg [5] : 0000000000000000000000005b5c922dda9bc4865aa1a4d30529178ad541e030
Arg [6] : 0000000000000000000000006393bf2afa953b425322f00567fae372199190b4
Arg [7] : 0000000000000000000000006f3d34ec48c8e1695091798e636db199e7671852
Arg [8] : 00000000000000000000000071fc7ae3f3379afeb34cd4c27514ae69b5350011
Arg [9] : 00000000000000000000000072698e1fbc70ae03b646a3e8992e88565be2f0db
Arg [10] : 000000000000000000000000a17027eda3e1cfd0b48b772bb9a3515547c8cadd
Arg [11] : 000000000000000000000000ac0eb1266f84277ab9f87d218a7ce36c86ee47e1
Arg [12] : 000000000000000000000000b70a955e88b1522e41960b8e81fb28ffc336ba61
Arg [13] : 000000000000000000000000c9f23c161a4dacdca4e09ad7795786526c25f9c6
Arg [14] : 000000000000000000000000d3c0b171e33b69bcd8d790c1638cbc5db559d841
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.