Source Code
Overview
MON Balance
MON Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Vault
Compiler Version
v0.8.26+commit.8a97fa7a
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.26;
import "../interface/IVault.sol";
import "../interface/IVaultCrossChainManager.sol";
import "../library/Utils.sol";
import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-contracts-upgradeable/contracts/security/PausableUpgradeable.sol";
import "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol";
import "openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol";
import "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
import "openzeppelin-contracts/contracts/utils/math/SafeCast.sol";
import "openzeppelin-contracts/contracts/utils/Address.sol";
import "../interface/cctpv2/ITokenMessengerV2.sol";
import "../interface/cctpv2/IMessageTransmitterV2.sol";
import "../interface/IProtocolVault.sol";
import "../library/DelegateSwapSignature.sol";
import "../oz5Revised/ReentrancyGuardRevised.sol";
import "../oz5Revised/AccessControlRevised.sol";
/// @title Vault contract
/// @author Orderly_Rubick, Orderly_Zion
/// @notice Vault is responsible for saving user's erc20 token.
/// EACH CHAIN SHOULD HAVE ONE Vault CONTRACT.
/// User can deposit erc20 (USDC) from Vault.
/// Only crossChainManager can approve withdraw request.
contract Vault is
IVault,
PausableUpgradeable,
OwnableUpgradeable,
ReentrancyGuardRevised,
AccessControlRevised
{
using EnumerableSet for EnumerableSet.Bytes32Set;
using SafeERC20 for IERC20;
using Address for address payable;
using SafeCast for uint256;
// The cross-chain manager address on Vault side
address public crossChainManagerAddress;
// An incrasing deposit id / nonce on Vault side
uint64 public depositId;
// A set to record the hash value of all allowed brokerIds // brokerHash = keccak256(abi.encodePacked(brokerId))
EnumerableSet.Bytes32Set private allowedBrokerSet;
// A set to record the hash value of all allowed tokens // tokenHash = keccak256(abi.encodePacked(tokenSymbol))
EnumerableSet.Bytes32Set private allowedTokenSet;
// A mapping from tokenHash to token contract address
mapping(bytes32 => address) public allowedToken;
// A flag to indicate if deposit fee is enabled
bool public depositFeeEnabled;
// https://developers.circle.com/stablecoin/docs/cctp-protocol-contract#tokenmessenger-mainnet
// TokenMessager for CCTP
address public tokenMessengerContract;
// MessageTransmitterContract for CCTP
address public messageTransmitterContract;
// A set to record deposit limit for each token. 0 means unlimited
mapping(address => uint256) public tokenAddress2DepositLimit;
// Protocol Vault address
IProtocolVault public protocolVault;
// EnumerableSet for rebalance enable tokens
EnumerableSet.Bytes32Set private _rebalanceEnableTokenSet;
/*=============== Native Token ===============*/
// Native token hash
bytes32 public nativeTokenHash;
// Native token deposit limit
uint256 public nativeTokenDepositLimit;
/*=============== Delegate Swap ===============*/
// Submitted Swap
EnumerableSet.Bytes32Set private _submittedSwapSet;
// Swap Operator Address
address public swapOperator;
// Swap Signer Address
address public swapSigner;
/*=============== CCTP Config ===============*/
uint256 public cctpMaxFee;
uint32 public cctpFinalityThreshold;
// EnumerableSet for disabled deposit tokens
// If a tokenHash is in this set, users cannot deposit this token, but user can still withdraw this token from Orderly
EnumerableSet.Bytes32Set private disabledDepositTokenSet;
// Vault Adapter Address
address public vaultAdapter;
// CCTP V2 model constants
uint32 public constant CCTP_V2_FAST_MODEL = 1000;
uint32 public constant CCTP_V2_NORMAL_MODEL = 2000;
/* ================ Role ================ */
bytes32 public constant SYMBOL_MANAGER_ROLE = keccak256("ORDERLY_MANAGER_SYMBOL_MANAGER_ROLE");
bytes32 public constant BROKER_MANAGER_ROLE = keccak256("ORDERLY_MANAGER_BROKER_MANAGER_ROLE");
/*=============== Modifiers ===============*/
/// @notice onlyRoleOrOwner
modifier onlyRoleOrOwner(bytes32 role) {
if (!hasRole(role, msg.sender) && msg.sender != owner()) {
revert AccessControlUnauthorizedAccount(msg.sender, role);
}
_;
}
/// @notice Require only swapOperator can call
modifier onlySwapOperator() {
require(msg.sender == swapOperator, "Vault: Only swap operator can call");
_;
}
/// @notice Require only cross-chain manager can call
modifier onlyCrossChainManager() {
if (msg.sender != crossChainManagerAddress) revert OnlyCrossChainManagerCanCall();
_;
}
/// @notice check non-zero address
modifier nonZeroAddress(address _address) {
if (_address == address(0)) revert AddressZero();
_;
}
/// @notice Check if the token is supported and not disabled
modifier checkDepositToken(bytes32 _tokenHash) {
if (!allowedTokenSet.contains(_tokenHash)) revert TokenNotAllowed();
if (disabledDepositTokenSet.contains(_tokenHash)) revert DepositTokenDisabled();
// check the token address if the token is not native token
if (_tokenHash != nativeTokenHash && allowedToken[_tokenHash] == address(0)) revert InvalidTokenAddress();
_;
}
/*=============== Constructor ===============*/
constructor() {
_disableInitializers();
}
/*=============== Initializer ===============*/
function initialize() external override initializer {
__Ownable_init();
__Pausable_init();
__ReentrancyGuard_init();
}
/*=============== Setters ===============*/
/// @notice Sets broker status via cross-chain message from ledger
/// @dev Only callable by the cross-chain manager, validates chain ID
/// @param data The SetBrokerData containing broker information and status
function setBrokerFromLedger(EventTypes.SetBrokerData calldata data) external override onlyCrossChainManager {
// Chain ID validation (defense in depth) - using Solidity's built-in block.chainid
require(data.dstChainId == block.chainid, "Vault: dstChainId mismatch");
bool currentStatus = allowedBrokerSet.contains(data.brokerHash);
if (data.allowed) {
// Add broker operation
if (currentStatus) {
// Broker already exists, emit already set event
emit SetBrokerFromLedgerAlreadySet(data.brokerHash, data.dstChainId, data.allowed);
return;
}
// Add the broker using EnumerableSet
allowedBrokerSet.add(data.brokerHash);
} else {
// Remove broker operation
if (!currentStatus) {
// Broker doesn't exist, emit already set event (broker already not present)
emit SetBrokerFromLedgerAlreadySet(data.brokerHash, data.dstChainId, data.allowed);
return;
}
// Remove the broker using EnumerableSet
allowedBrokerSet.remove(data.brokerHash);
}
emit SetBrokerFromLedgerSuccess(data.brokerHash, data.dstChainId, data.allowed);
}
/// @notice Change crossChainManager address
function setCrossChainManager(address _crossChainManagerAddress)
external
override
onlyOwner
nonZeroAddress(_crossChainManagerAddress)
{
emit ChangeCrossChainManager(crossChainManagerAddress, _crossChainManagerAddress);
crossChainManagerAddress = _crossChainManagerAddress;
}
/// @notice Set deposit limit for a token
function setDepositLimit(address _tokenAddress, uint256 _limit)
external
override
onlyRoleOrOwner(SYMBOL_MANAGER_ROLE)
{
tokenAddress2DepositLimit[_tokenAddress] = _limit;
emit ChangeDepositLimit(_tokenAddress, _limit);
}
/// @notice Set protocolVault address
function setProtocolVaultAddress(address _protocolVaultAddress)
external
override
onlyOwner
nonZeroAddress(_protocolVaultAddress)
{
emit SetProtocolVaultAddress(address(protocolVault), _protocolVaultAddress);
protocolVault = IProtocolVault(_protocolVaultAddress);
}
/// @notice Add contract address for an allowed token given the tokenHash
/// @dev This function is only called when changing allow status for a token, not for initializing
function setAllowedToken(bytes32 _tokenHash, bool _allowed) external override onlyOwner {
bool succ = false;
if (_allowed) {
// require tokenAddress exist, except for native token
if (allowedToken[_tokenHash] == address(0) && _tokenHash != nativeTokenHash) revert AddressZero();
succ = allowedTokenSet.add(_tokenHash);
} else {
succ = allowedTokenSet.remove(_tokenHash);
if (disabledDepositTokenSet.contains(_tokenHash)) {
// if the token is already disabled, remove it
disabledDepositTokenSet.remove(_tokenHash);
}
}
if (!succ) revert EnumerableSetError();
emit SetAllowedToken(_tokenHash, _allowed);
}
function disableDepositToken(bytes32 _tokenHash) external override onlyRoleOrOwner(SYMBOL_MANAGER_ROLE) {
if (!allowedTokenSet.contains(_tokenHash)) revert TokenNotAllowed();
bool succ = disabledDepositTokenSet.add(_tokenHash);
if (!succ) revert EnumerableSetError();
emit DisableDepositToken(_tokenHash);
}
function enableDepositToken(bytes32 _tokenHash) external override onlyOwner {
if (!disabledDepositTokenSet.contains(_tokenHash)) revert TokenNotDisabled();
bool succ = disabledDepositTokenSet.remove(_tokenHash);
if (!succ) revert EnumerableSetError();
emit EnableDepositToken(_tokenHash);
}
function getDisabledDepositToken() external view returns (bytes32[] memory) {
return disabledDepositTokenSet.values();
}
function setRebalanceEnableToken(bytes32 _tokenHash, bool _allowed) external override onlyOwner {
bool succ = false;
if (_allowed) {
succ = _rebalanceEnableTokenSet.add(_tokenHash);
} else {
succ = _rebalanceEnableTokenSet.remove(_tokenHash);
}
if (!succ) revert EnumerableSetError();
emit SetRebalanceEnableToken(_tokenHash, _allowed);
}
function getAllRebalanceEnableToken() external view returns (bytes32[] memory) {
return _rebalanceEnableTokenSet.values();
}
/// @notice Add the hash value for an allowed brokerId
function setAllowedBroker(bytes32 _brokerHash, bool _allowed)
external
override
onlyRoleOrOwner(BROKER_MANAGER_ROLE)
{
bool succ = false;
if (_allowed) {
succ = allowedBrokerSet.add(_brokerHash);
} else {
succ = allowedBrokerSet.remove(_brokerHash);
}
if (!succ) revert EnumerableSetError();
emit SetAllowedBroker(_brokerHash, _allowed);
}
/// @notice Set native token hash
function setNativeTokenHash(bytes32 _nativeTokenHash) external override onlyOwner {
nativeTokenHash = _nativeTokenHash;
}
/// @notice Set native token deposit limit
function setNativeTokenDepositLimit(uint256 _nativeTokenDepositLimit)
external
override
onlyRoleOrOwner(SYMBOL_MANAGER_ROLE)
{
nativeTokenDepositLimit = _nativeTokenDepositLimit;
}
/// @notice Change the token address for an allowed token, used when a new token is added
/// @dev maybe should called `addTokenAddressAndAllow`, because it's for initializing
function changeTokenAddressAndAllow(bytes32 _tokenHash, address _tokenAddress)
external
override
onlyOwner
nonZeroAddress(_tokenAddress)
{
allowedToken[_tokenHash] = _tokenAddress;
allowedTokenSet.add(_tokenHash); // ignore returns here
emit ChangeTokenAddressAndAllow(_tokenHash, _tokenAddress);
}
/// @notice Check if the given tokenHash is allowed on this Vault
function getAllowedToken(bytes32 _tokenHash) public view override returns (address) {
if (allowedTokenSet.contains(_tokenHash)) {
return allowedToken[_tokenHash];
} else {
return address(0);
}
}
/// @notice Check if the brokerHash is allowed on this Vault
function getAllowedBroker(bytes32 _brokerHash) public view override returns (bool) {
return allowedBrokerSet.contains(_brokerHash);
}
/// @notice Get all allowed tokenHash from this Vault
function getAllAllowedToken() public view override returns (bytes32[] memory) {
return allowedTokenSet.values();
}
/// @notice Get all allowed brokerIds hash from this Vault
function getAllAllowedBroker() public view override returns (bytes32[] memory) {
return allowedBrokerSet.values();
}
/*=============== Deposit ===============*/
/// @notice The function to receive user deposit, VaultDepositFE type is defined in VaultTypes.sol
function deposit(VaultTypes.VaultDepositFE calldata data) public payable override whenNotPaused {
if (data.tokenHash == nativeTokenHash) {
_ethDeposit(msg.sender, data);
} else {
_deposit(msg.sender, data);
}
}
/// @notice The function to allow users to deposit on behalf of another user, the receiver is the user who will receive the deposit
function depositTo(address receiver, VaultTypes.VaultDepositFE calldata data)
public
payable
override
whenNotPaused
{
if (data.tokenHash == nativeTokenHash) {
_ethDeposit(receiver, data);
} else {
_deposit(receiver, data);
}
}
/// @notice The function to query layerzero fee from CrossChainManager contract
function getDepositFee(address receiver, VaultTypes.VaultDepositFE calldata data)
public
view
override
returns (uint256)
{
_validateDeposit(receiver, data);
VaultTypes.VaultDeposit memory depositData = VaultTypes.VaultDeposit(
data.accountId, receiver, data.brokerHash, data.tokenHash, data.tokenAmount, depositId + 1
);
return (IVaultCrossChainManager(crossChainManagerAddress).getDepositFee(depositData));
}
/// @notice The function to enable/disable deposit fee
function enableDepositFee(bool _enabled) public override onlyOwner whenNotPaused {
depositFeeEnabled = _enabled;
}
/// @notice The function to call deposit of CCManager contract
function _deposit(address receiver, VaultTypes.VaultDepositFE calldata data) internal {
_validateDeposit(receiver, data);
// avoid reentrancy, so `transferFrom` token at the beginning
IERC20 tokenAddress = IERC20(allowedToken[data.tokenHash]);
// check deposit limit
/// @notice Be aware that we track the balance of the token in the contract, should be better track internal token deposit
/// @notice Be aware that becuase of the async process of deposit & withdraw, the limit may be broken. So, it's a soft limit, not a hard limit
if (
tokenAddress2DepositLimit[address(tokenAddress)] != 0
&& data.tokenAmount + tokenAddress.balanceOf(address(this))
> tokenAddress2DepositLimit[address(tokenAddress)]
) {
revert DepositExceedLimit();
}
// avoid non-standard ERC20 tranferFrom bug
tokenAddress.safeTransferFrom(msg.sender, address(this), data.tokenAmount);
// cross-chain tx to ledger
VaultTypes.VaultDeposit memory depositData = VaultTypes.VaultDeposit(
data.accountId, receiver, data.brokerHash, data.tokenHash, data.tokenAmount, _newDepositId()
);
// if deposit fee is enabled, user should pay fee in native token and the msg.value will be forwarded to CrossChainManager to pay for the layerzero cross-chain fee
if (depositFeeEnabled) {
if (msg.value == 0) revert ZeroDepositFee();
IVaultCrossChainManager(crossChainManagerAddress).depositWithFeeRefund{value: msg.value}(
msg.sender, depositData
);
} else {
IVaultCrossChainManager(crossChainManagerAddress).deposit(depositData);
}
emit AccountDepositTo(data.accountId, data.brokerHash, receiver, depositId, data.tokenHash, data.tokenAmount);
}
function _ethDeposit(address receiver, VaultTypes.VaultDepositFE calldata data) internal {
_validateDeposit(receiver, data);
uint128 nativeDepositAmount = msg.value.toUint128();
if (nativeDepositAmount < data.tokenAmount) revert NativeTokenDepositAmountMismatch();
// check native token deposit limit
if (
nativeTokenDepositLimit != 0
&& (data.tokenAmount + address(this).balance - nativeDepositAmount) > nativeTokenDepositLimit
) {
revert DepositExceedLimit();
}
// cross-chain tx to ledger
VaultTypes.VaultDeposit memory depositData = VaultTypes.VaultDeposit(
data.accountId, receiver, data.brokerHash, data.tokenHash, data.tokenAmount, _newDepositId()
);
// cross-chain fee
uint256 crossChainFee = nativeDepositAmount - data.tokenAmount;
// if deposit fee is enabled, user should pay fee in native token and the msg.value will be forwarded to CrossChainManager to pay for the layerzero cross-chain fee
if (depositFeeEnabled) {
if (crossChainFee == 0) revert ZeroDepositFee();
IVaultCrossChainManager(crossChainManagerAddress).depositWithFeeRefund{value: crossChainFee}(
msg.sender, depositData
);
} else {
IVaultCrossChainManager(crossChainManagerAddress).deposit(depositData);
}
emit AccountDepositTo(data.accountId, data.brokerHash, receiver, depositId, data.tokenHash, data.tokenAmount);
}
/// @notice The function to validate deposit data
function _validateDeposit(address receiver, VaultTypes.VaultDepositFE calldata data)
internal
view
checkDepositToken(data.tokenHash)
{
// check if the brokerHash is allowed
if (!allowedBrokerSet.contains(data.brokerHash)) revert BrokerNotAllowed();
// check accountId validation based on caller
if (msg.sender != vaultAdapter) {
// Regular users can only use legacy account ID validation
if (!Utils.validateAccountId(data.accountId, data.brokerHash, receiver)) {
revert AccountIdInvalid();
}
}
// check if tokenAmount > 0
if (data.tokenAmount == 0) revert ZeroDeposit();
}
function _ethWithdraw(address receiver, uint128 amount) internal {
payable(receiver).sendValue(amount);
}
/*=============== Withdraw ===============*/
/// @notice user withdraw
function withdraw(VaultTypes.VaultWithdraw calldata data) public override onlyCrossChainManager whenNotPaused {
// send cross-chain tx to ledger
IVaultCrossChainManager(crossChainManagerAddress).withdraw(data);
require(data.tokenAmount > data.fee, "withdraw: fee is greater than token amount");
uint128 amount = data.tokenAmount - data.fee;
if (data.tokenHash == nativeTokenHash) {
try this.attemptTransferNative(data.receiver, amount) {
// do nothing
} catch {
// emit event to indicate withdraw fail, where zero address means native token
emit WithdrawFailed(address(0), data.receiver, amount);
}
} else {
// avoid reentrancy, so `transfer` token at the end
IERC20 tokenAddress = IERC20(allowedToken[data.tokenHash]);
require(tokenAddress.balanceOf(address(this)) >= amount, "withdraw: insufficient balance");
// avoid revert if transfer to zero address or blacklist.
/// @notice This check condition should always be true because cc promise that
if (!_validReceiver(data.receiver, address(tokenAddress))) {
emit WithdrawFailed(address(tokenAddress), data.receiver, amount);
} else {
tokenAddress.safeTransfer(data.receiver, amount);
}
}
// emit withdraw event
emit AccountWithdraw(
data.accountId,
data.withdrawNonce,
data.brokerHash,
data.sender,
data.receiver,
data.tokenHash,
data.tokenAmount,
data.fee
);
}
/*=============== Withdraw2Contract ===============*/
/// @notice withdraw to another contract by calling the contract's deposit function
function withdraw2Contract(VaultTypes.VaultWithdraw2Contract calldata data)
external
onlyCrossChainManager
whenNotPaused
{
VaultTypes.VaultWithdraw memory vaultWithdrawData = VaultTypes.VaultWithdraw({
accountId: data.accountId,
brokerHash: data.brokerHash,
tokenHash: data.tokenHash,
tokenAmount: data.tokenAmount,
fee: data.fee,
sender: data.sender,
receiver: data.receiver,
withdrawNonce: data.withdrawNonce
});
// send cross-chain tx to ledger
IVaultCrossChainManager(crossChainManagerAddress).withdraw(vaultWithdrawData);
require(data.tokenAmount > data.fee, "withdraw2Contract: fee is greater than token amount");
uint128 amount = data.tokenAmount - data.fee;
if (data.tokenHash == nativeTokenHash) {
// _ethWithdraw(data.receiver, amount);
try this.attemptTransferNative(data.receiver, amount) {
// do nothing
} catch {
// emit event to indicate withdraw fail, where zero address means native token
emit WithdrawFailed(address(0), data.receiver, amount);
}
} else {
// avoid reentrancy, so `transfer` token at the end
IERC20 tokenAddress = IERC20(allowedToken[data.tokenHash]);
require(tokenAddress.balanceOf(address(this)) >= amount, "Vault: insufficient balance");
// avoid revert if transfer to zero address or blacklist.
/// @notice This check condition should always be true because cc promise that
/// @notice But in some extreme cases (e.g. usdc contract pause) it will revert, devs should mannual fix it
if (!_validReceiver(data.receiver, address(tokenAddress))) {
emit WithdrawFailed(address(tokenAddress), data.receiver, amount);
} else {
// because we check type at the beginning, so we can safely check the type here
if (data.vaultType == VaultTypes.VaultEnum.ProtocolVault) {
tokenAddress.safeApprove(data.receiver, amount);
IProtocolVault(data.receiver)
.depositFromStrategy(data.clientId, data.brokerHash, address(tokenAddress), amount);
} else if (data.vaultType == VaultTypes.VaultEnum.Ceffu) {
tokenAddress.safeTransfer(data.receiver, amount);
}
}
}
// emit withdraw event
emit AccountWithdraw(
data.accountId,
data.withdrawNonce,
data.brokerHash,
data.sender,
data.receiver,
data.tokenHash,
data.tokenAmount,
data.fee
);
}
/// @notice validate if the receiver address is zero or in the blacklist
function _validReceiver(address _receiver, address _token) internal view returns (bool) {
if (_receiver == address(0)) {
return false;
} else if (_isBlacklisted(_receiver, _token)) {
return false;
} else {
return true;
}
}
/// @notice check if the receiver is in the blacklist in case the token contract has the blacklist function
function _isBlacklisted(address _receiver, address _token) internal view returns (bool) {
bytes memory data = abi.encodeWithSignature("isBlacklisted(address)", _receiver);
(bool success, bytes memory result) = _token.staticcall(data);
if (success) {
return abi.decode(result, (bool));
} else {
return false;
}
}
function delegateSigner(VaultTypes.VaultDelegate calldata data) public override {
if ((msg.sender).code.length == 0) revert ZeroCodeLength();
if ((data.delegateSigner).code.length != 0) revert NotZeroCodeLength();
if (!allowedBrokerSet.contains(data.brokerHash)) revert BrokerNotAllowed();
// emit delegate event
emit AccountDelegate(msg.sender, data.brokerHash, data.delegateSigner, block.chainid, block.number);
}
/// @notice Update the depositId
function _newDepositId() internal returns (uint64) {
return ++depositId;
}
function emergencyPause() public whenNotPaused onlyOwner {
_pause();
}
function emergencyUnpause() public whenPaused onlyOwner {
_unpause();
}
function setTokenMessengerContract(address _tokenMessengerContract)
public
override
onlyOwner
nonZeroAddress(_tokenMessengerContract)
{
tokenMessengerContract = _tokenMessengerContract;
}
function setRebalanceMessengerContract(address _rebalanceMessengerContract)
public
override
onlyOwner
nonZeroAddress(_rebalanceMessengerContract)
{
messageTransmitterContract = _rebalanceMessengerContract;
}
function setCCTPConfig(uint256 _maxFee, uint32 _finalityThreshold) public onlyOwner {
cctpMaxFee = _maxFee;
require(
_finalityThreshold == CCTP_V2_FAST_MODEL || _finalityThreshold == CCTP_V2_NORMAL_MODEL,
"setCCTPConfig: invalid finality threshold"
);
cctpFinalityThreshold = _finalityThreshold;
}
function rebalanceBurn(RebalanceTypes.RebalanceBurnCCData calldata data) external override onlyCrossChainManager {
/// Check if the token is allowed to be burned
address burnToken = allowedToken[data.tokenHash];
if (burnToken == address(0)) revert AddressZero();
if (!_rebalanceEnableTokenSet.contains(data.tokenHash)) revert NotRebalanceEnableToken();
/// Approve the token to be burned
IERC20(burnToken).approve(tokenMessengerContract, data.amount);
try ITokenMessengerV2(tokenMessengerContract)
.depositForBurn(
data.amount,
data.dstDomain,
Utils.toBytes32(data.dstVaultAddress),
burnToken,
Utils.toBytes32(data.dstVaultAddress),
cctpMaxFee,
cctpFinalityThreshold
) {
// send succ cross-chain tx to ledger
// rebalanceId, amount, tokenHash, burnChainId, mintChainId | true
IVaultCrossChainManager(crossChainManagerAddress)
.burnFinish(
RebalanceTypes.RebalanceBurnCCFinishData({
rebalanceId: data.rebalanceId,
amount: data.amount,
tokenHash: data.tokenHash,
burnChainId: data.burnChainId,
mintChainId: data.mintChainId,
success: true
})
);
} catch {
// send fail cross-chain tx to ledger
// rebalanceId, amount, tokenHash, burnChainId, mintChainId | false
IVaultCrossChainManager(crossChainManagerAddress)
.burnFinish(
RebalanceTypes.RebalanceBurnCCFinishData({
rebalanceId: data.rebalanceId,
amount: data.amount,
tokenHash: data.tokenHash,
burnChainId: data.burnChainId,
mintChainId: data.mintChainId,
success: false
})
);
}
}
function rebalanceMint(RebalanceTypes.RebalanceMintCCData calldata data) external override onlyCrossChainManager {
address mintToken = allowedToken[data.tokenHash];
if (mintToken == address(0)) revert AddressZero();
if (!_rebalanceEnableTokenSet.contains(data.tokenHash)) revert NotRebalanceEnableToken();
uint256 balanceBeforeMint = IERC20(mintToken).balanceOf(address(this));
try IMessageTransmitterV2(messageTransmitterContract).receiveMessage(data.messageBytes, data.messageSignature) {
uint256 balanceAfterMint = IERC20(mintToken).balanceOf(address(this));
uint256 mintedAmount = balanceAfterMint - balanceBeforeMint;
// check the minted amount for normal finality model
if (cctpFinalityThreshold == CCTP_V2_NORMAL_MODEL){
require(mintedAmount == data.amount, "rebalanceMint: minted amount less than expected");
}
// send succ cross-chain tx to ledger
// rebalanceId, amount, tokenHash, burnChainId, mintChainId | true
IVaultCrossChainManager(crossChainManagerAddress).mintFinish(
RebalanceTypes.RebalanceMintCCFinishData({
rebalanceId: data.rebalanceId,
amount: mintedAmount.toUint128(),
tokenHash: data.tokenHash,
burnChainId: data.burnChainId,
mintChainId: data.mintChainId,
success: true
})
);
} catch Error(string memory reason) {
// The method `receiveMessage` is permissionless, so it may fail due to others call it first
// So if the reason is "Nonce already used", we treat it as success
/// @notice This is still a bad practice, because maybe more errors will be treated as success (e.g. cctp contract pause & call it & unpause)
/// But those corner cases are rare, and we can finally fix it
string memory expectedReason = "Nonce already used";
bool success = keccak256(abi.encodePacked(reason)) == keccak256(abi.encodePacked(expectedReason));
IVaultCrossChainManager(crossChainManagerAddress)
.mintFinish(
RebalanceTypes.RebalanceMintCCFinishData({
rebalanceId: data.rebalanceId,
amount: data.amount,
tokenHash: data.tokenHash,
burnChainId: data.burnChainId,
mintChainId: data.mintChainId,
success: success
})
);
}
}
// ============= Only THIS Function ===============
// add only this contract can call this function for try/catch use
function attemptTransferNative(address _to, uint256 _amount) external {
require(msg.sender == address(this), "Only this contract can call");
payable(_to).sendValue(_amount);
}
/*=================================================
=============== Delegate Swap ===============
=================================================*/
/// @notice Set the operator for the Swap
function setSwapOperator(address _swapOperator) public override onlyOwner {
swapOperator = _swapOperator;
}
/// @notice Set the signer for the Swap
function setSwapSigner(address _swapSigner) public override onlyOwner {
swapSigner = _swapSigner;
}
/// @notice Set the vault adapter address
function setVaultAdapter(address _vaultAdapter) public onlyOwner nonZeroAddress(_vaultAdapter) {
vaultAdapter = _vaultAdapter;
emit VaultAdapterSet(vaultAdapter);
}
/// @notice Get all submitted swaps
function getSubmittedSwaps() public view returns (bytes32[] memory) {
return _submittedSwapSet.values();
}
/// @notice If submittedSwapSet contains the tradeId, return true
function isSwapSubmitted(bytes32 tradeId) public view returns (bool) {
return _submittedSwapSet.contains(tradeId);
}
function _verifySwapSignature(VaultTypes.DelegateSwap calldata data) internal view {
// Verify Signature
if (!DelegateSwapSignature.validateDelegateSwapSignature(swapSigner, data)) revert InvalidSwapSignature();
}
function _validateSwap(VaultTypes.DelegateSwap calldata data) internal view {
// require nonce == swapNonce
if (_submittedSwapSet.contains(data.tradeId)) revert SwapAlreadySubmitted();
// Verify that the token is allowed
bytes32 inTokenHash = data.inTokenHash;
if (!allowedTokenSet.contains(inTokenHash)) revert TokenNotAllowed();
// Verify that the owner has enough tokens
if (inTokenHash != nativeTokenHash) {
// ERC20 token case
address tokenAddress = allowedToken[inTokenHash];
if (tokenAddress == address(0)) revert InvalidTokenAddress();
}
// Verify Signature
_verifySwapSignature(data);
}
/*=============== Delegate Swap ===============*/
function delegateSwap(VaultTypes.DelegateSwap calldata data)
external
override
whenNotPaused
onlySwapOperator
nonReentrant
{
_internalDelegateSwap(data);
}
/// @notice Delegate swap with expiration check
function delegateSwapWithExpiration(VaultTypes.DelegateSwap calldata data, uint256 expirationTimestamp)
external
whenNotPaused
onlySwapOperator
nonReentrant
{
if (block.timestamp > expirationTimestamp) revert SwapExpired(expirationTimestamp, block.timestamp);
_internalDelegateSwap(data);
}
function _internalDelegateSwap(VaultTypes.DelegateSwap calldata data) internal {
_validateSwap(data);
_submittedSwapSet.add(data.tradeId);
if (data.inTokenHash != nativeTokenHash) {
address tokenAddress = allowedToken[data.inTokenHash];
IERC20 token = IERC20(tokenAddress);
token.safeApprove(data.to, data.inTokenAmount);
}
uint256 value = 0;
if (data.inTokenHash == nativeTokenHash) {
value = data.value;
}
(bool success, bytes memory result) = data.to.call{value: value}(data.swapCalldata);
if (!success) {
assembly {
revert(add(result, 0x20), mload(result))
}
}
if (data.inTokenHash != nativeTokenHash) {
address tokenAddress = allowedToken[data.inTokenHash];
IERC20 token = IERC20(tokenAddress);
token.safeApprove(data.to, 0);
}
emit DelegateSwapExecuted(data.tradeId, data.inTokenHash, data.inTokenAmount, data.to, data.value);
}
/* ================ Override AccessControlRevised To Simplify Access Control ================ */
/// @notice Override grantRole
function grantRole(bytes32 role, address account) public override onlyOwner {
_grantRole(role, account);
}
/// @notice Override revokeRole
function revokeRole(bytes32 role, address account) public override onlyOwner {
_revokeRole(role, account);
}
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;
import "./../library/types/VaultTypes.sol";
import "./../library/types/RebalanceTypes.sol";
import "./../library/types/EventTypes.sol";
interface IVault {
error OnlyCrossChainManagerCanCall();
error AccountIdInvalid();
error TokenNotAllowed();
error TokenNotDisabled();
error DepositTokenDisabled();
error InvalidTokenAddress();
error BrokerNotAllowed();
error BalanceNotEnough(uint256 balance, uint128 amount);
error AddressZero();
error EnumerableSetError();
error ZeroDepositFee();
error ZeroDeposit();
error ZeroCodeLength();
error NotZeroCodeLength();
error DepositExceedLimit();
error NativeTokenDepositAmountMismatch();
error NotRebalanceEnableToken();
error SwapAlreadySubmitted();
error InvalidSwapSignature();
error CeffuAddressMismatch(address want, address got);
error SwapExpired(uint256 expirationTimestamp, uint256 currentTimestamp);
// @deprecated
event AccountDeposit(
bytes32 indexed accountId,
address indexed userAddress,
uint64 indexed depositNonce,
bytes32 tokenHash,
uint128 tokenAmount
);
// deprecated
event AccountDepositTo(
bytes32 indexed accountId,
address indexed userAddress,
uint64 indexed depositNonce,
bytes32 tokenHash,
uint128 tokenAmount
);
event AccountDepositTo(
bytes32 indexed accountId,
bytes32 indexed brokerHash,
address indexed userAddress,
uint64 depositNonce,
bytes32 tokenHash,
uint128 tokenAmount
);
event AccountWithdraw(
bytes32 indexed accountId,
uint64 indexed withdrawNonce,
bytes32 brokerHash,
address sender,
address receiver,
bytes32 tokenHash,
uint128 tokenAmount,
uint128 fee
);
event AccountDelegate(
address indexed delegateContract,
bytes32 indexed brokerHash,
address indexed delegateSigner,
uint256 chainId,
uint256 blockNumber
);
event SetAllowedToken(bytes32 indexed _tokenHash, bool _allowed);
event SetAllowedBroker(bytes32 indexed _brokerHash, bool _allowed);
event DisableDepositToken(bytes32 indexed _tokenHash);
event EnableDepositToken(bytes32 indexed _tokenHash);
event ChangeTokenAddressAndAllow(bytes32 indexed _tokenHash, address _tokenAddress);
event ChangeCrossChainManager(address oldAddress, address newAddress);
event ChangeDepositLimit(address indexed _tokenAddress, uint256 _limit);
event WithdrawFailed(address indexed token, address indexed receiver, uint256 amount);
event SetRebalanceEnableToken(bytes32 indexed _tokenHash, bool _allowed);
event DelegateSwapExecuted(bytes32 indexed tradeId, bytes32 inTokenHash, uint256 inTokenAmount, address to, uint256 value);
event SetProtocolVaultAddress(address _oldProtocolVaultAddress, address _newProtocolVaultAddress);
event SetCeffuAddress(address _oldCeffuAddress, address _newCeffuAddress);
event VaultAdapterSet(address adapter);
// SetBroker from ledger events
event SetBrokerFromLedgerAlreadySet(bytes32 indexed brokerHash, uint256 dstChainId, bool allowed);
event SetBrokerFromLedgerSuccess(bytes32 indexed brokerHash, uint256 dstChainId, bool allowed);
function initialize() external;
function deposit(VaultTypes.VaultDepositFE calldata data) external payable;
function depositTo(address receiver, VaultTypes.VaultDepositFE calldata data) external payable;
function getDepositFee(address recevier, VaultTypes.VaultDepositFE calldata data) external view returns (uint256);
function enableDepositFee(bool _enabled) external;
function withdraw(VaultTypes.VaultWithdraw calldata data) external;
function delegateSigner(VaultTypes.VaultDelegate calldata data) external;
function withdraw2Contract(VaultTypes.VaultWithdraw2Contract calldata data) external;
// CCTP: functions for receive rebalance msg
function rebalanceMint(RebalanceTypes.RebalanceMintCCData calldata data) external;
function rebalanceBurn(RebalanceTypes.RebalanceBurnCCData calldata data) external;
function setTokenMessengerContract(address _tokenMessengerContract) external;
function setRebalanceMessengerContract(address _rebalanceMessengerContract) external;
// admin call
function setCrossChainManager(address _crossChainManagerAddress) external;
function setDepositLimit(address _tokenAddress, uint256 _limit) external;
function setProtocolVaultAddress(address _protocolVaultAddress) external;
function emergencyPause() external;
function emergencyUnpause() external;
// whitelist
function setAllowedToken(bytes32 _tokenHash, bool _allowed) external;
function disableDepositToken(bytes32 _tokenHash) external;
function enableDepositToken(bytes32 _tokenHash) external;
function setAllowedBroker(bytes32 _brokerHash, bool _allowed) external;
function setNativeTokenHash(bytes32 _nativeTokenHash) external;
function setNativeTokenDepositLimit(uint256 _nativeTokenDepositLimit) external;
function setRebalanceEnableToken(bytes32 _tokenHash, bool _allowed) external;
function changeTokenAddressAndAllow(bytes32 _tokenHash, address _tokenAddress) external;
function getAllowedToken(bytes32 _tokenHash) external view returns (address);
function getAllowedBroker(bytes32 _brokerHash) external view returns (bool);
function getAllAllowedToken() external view returns (bytes32[] memory);
function getAllAllowedBroker() external view returns (bytes32[] memory);
function getAllRebalanceEnableToken() external view returns (bytes32[] memory);
// cross-chain broker management
function setBrokerFromLedger(EventTypes.SetBrokerData calldata data) external;
// Delegate swap function
function setSwapOperator(address _swapOperator) external;
function setSwapSigner(address _swapSigner) external;
function isSwapSubmitted(bytes32 tradeId) external view returns (bool);
function delegateSwap(VaultTypes.DelegateSwap calldata data) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
// Importing necessary utility libraries and types
import "../library/types/AccountTypes.sol";
import "../library/types/VaultTypes.sol";
import "../library/types/RebalanceTypes.sol";
/// @title IVaultCrossChainManager Interface
/// @notice Interface for managing cross-chain activities related to the vault.
interface IVaultCrossChainManager {
/// @notice Triggers a withdrawal from the ledger.
/// @param withdraw Struct containing withdrawal data.
function withdraw(VaultTypes.VaultWithdraw memory withdraw) external;
/// @notice Triggers a finish msg from vault to ledger to inform the status of burn
/// @param data Struct containing burn data.
function burnFinish(RebalanceTypes.RebalanceBurnCCFinishData memory data) external;
/// @notice Triggers a finish msg from vault to ledger to inform the status of mint
/// @param data Struct containing mint data.
function mintFinish(RebalanceTypes.RebalanceMintCCFinishData memory data) external;
/// @notice Initiates a deposit to the vault.
/// @param data Struct containing deposit data.
function deposit(VaultTypes.VaultDeposit memory data) external;
/// @notice Initiates a deposit to the vault along with native fees.
/// @param data Struct containing deposit data.
function depositWithFee(VaultTypes.VaultDeposit memory data) external payable;
/// @notice Initiates a deposit to the vault along with native fees.
/// @param refundReceiver Address of the receiver for the deposit fee refund.
/// @param data Struct containing deposit data.
function depositWithFeeRefund(address refundReceiver, VaultTypes.VaultDeposit memory data) external payable;
/// @notice Fetches the deposit fee based on deposit data.
/// @param data Struct containing deposit data.
/// @return fee The calculated deposit fee.
function getDepositFee(VaultTypes.VaultDeposit memory data) external view returns (uint256);
/// @notice Sets the vault address.
/// @param vault Address of the new vault.
function setVault(address vault) external;
/// @notice Sets the cross-chain relay address.
/// @param crossChainRelay Address of the new cross-chain relay.
function setCrossChainRelay(address crossChainRelay) external;
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;
/// @title Utils library
/// @author Orderly_Rubick Orderly_Zion
library Utils {
// legacy account id
function getAccountId(address _userAddr, string memory _brokerId) internal pure returns (bytes32) {
return keccak256(abi.encode(_userAddr, calculateStringHash(_brokerId)));
}
// legacy account id
function calculateAccountId(address _userAddr, bytes32 _brokerHash) internal pure returns (bytes32) {
return keccak256(abi.encode(_userAddr, _brokerHash));
}
// pv account id
function calculateStrategyVaultAccountId(address _vault, address _userAddr, bytes32 _brokerHash)
internal
pure
returns (bytes32)
{
return keccak256(abi.encode(_vault, _userAddr, _brokerHash));
}
function calculateStringHash(string memory _str) internal pure returns (bytes32) {
return keccak256(abi.encodePacked(_str));
}
// legacy account id for evm
function validateAccountId(bytes32 _accountId, bytes32 _brokerHash, address _userAddress)
internal
pure
returns (bool)
{
return keccak256(abi.encode(_userAddress, _brokerHash)) == _accountId;
}
// legacy account id for solana
function validateAccountId(bytes32 _accountId, bytes32 _brokerHash, bytes32 _userAddress)
internal
pure
returns (bool)
{
return keccak256(abi.encode(_userAddress, _brokerHash)) == _accountId;
}
function validateStrategyVaultAccountId(
address _vault,
bytes32 _accountId,
bytes32 _brokerHash,
address _userAddress
) internal pure returns (bool) {
return calculateStrategyVaultAccountId(_vault, _userAddress, _brokerHash) == _accountId;
}
// both legacy accountId and pv accountId are valid
function validateExtendedAccountId(address _vault, bytes32 _accountId, bytes32 _brokerHash, address _userAddress)
internal
pure
returns (bool)
{
return validateAccountId(_accountId, _brokerHash, _userAddress)
|| validateStrategyVaultAccountId(_vault, _accountId, _brokerHash, _userAddress);
}
function toBytes32(address addr) internal pure returns (bytes32) {
return bytes32(abi.encode(addr));
}
function bytes32ToAddress(bytes32 _bytes32) internal pure returns (address) {
return address(uint160(uint256(_bytes32)));
}
function bytes32ToBytes(bytes32 _bytes32) internal pure returns (bytes memory) {
return abi.encodePacked(_bytes32);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
function __Pausable_init() internal onlyInitializing {
__Pausable_init_unchained();
}
function __Pausable_init_unchained() internal onlyInitializing {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.
pragma solidity ^0.8.0;
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
* and `uint256` (`UintSet`) are supported.
*
* [WARNING]
* ====
* Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
* unusable.
* See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
*
* In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
* array of EnumerableSet.
* ====
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping(bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) {
// Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
if (lastIndex != toDeleteIndex) {
bytes32 lastValue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastValue;
// Update the index for the moved value
set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
}
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
return set._values[index];
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function _values(Set storage set) private view returns (bytes32[] memory) {
return set._values;
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
bytes32[] memory store = _values(set._inner);
bytes32[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(AddressSet storage set) internal view returns (address[] memory) {
bytes32[] memory store = _values(set._inner);
address[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(UintSet storage set) internal view returns (uint256[] memory) {
bytes32[] memory store = _values(set._inner);
uint256[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)
// This file was procedurally generated from scripts/generate/templates/SafeCast.js.
pragma solidity ^0.8.0;
/**
* @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
* checks.
*
* Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
* easily result in undesired exploitation or bugs, since developers usually
* assume that overflows raise errors. `SafeCast` restores this intuition by
* reverting the transaction when such an operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*
* Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
* all math on `uint256` and `int256` and then downcasting.
*/
library SafeCast {
/**
* @dev Returns the downcasted uint248 from uint256, reverting on
* overflow (when the input is greater than largest uint248).
*
* Counterpart to Solidity's `uint248` operator.
*
* Requirements:
*
* - input must fit into 248 bits
*
* _Available since v4.7._
*/
function toUint248(uint256 value) internal pure returns (uint248) {
require(value <= type(uint248).max, "SafeCast: value doesn't fit in 248 bits");
return uint248(value);
}
/**
* @dev Returns the downcasted uint240 from uint256, reverting on
* overflow (when the input is greater than largest uint240).
*
* Counterpart to Solidity's `uint240` operator.
*
* Requirements:
*
* - input must fit into 240 bits
*
* _Available since v4.7._
*/
function toUint240(uint256 value) internal pure returns (uint240) {
require(value <= type(uint240).max, "SafeCast: value doesn't fit in 240 bits");
return uint240(value);
}
/**
* @dev Returns the downcasted uint232 from uint256, reverting on
* overflow (when the input is greater than largest uint232).
*
* Counterpart to Solidity's `uint232` operator.
*
* Requirements:
*
* - input must fit into 232 bits
*
* _Available since v4.7._
*/
function toUint232(uint256 value) internal pure returns (uint232) {
require(value <= type(uint232).max, "SafeCast: value doesn't fit in 232 bits");
return uint232(value);
}
/**
* @dev Returns the downcasted uint224 from uint256, reverting on
* overflow (when the input is greater than largest uint224).
*
* Counterpart to Solidity's `uint224` operator.
*
* Requirements:
*
* - input must fit into 224 bits
*
* _Available since v4.2._
*/
function toUint224(uint256 value) internal pure returns (uint224) {
require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits");
return uint224(value);
}
/**
* @dev Returns the downcasted uint216 from uint256, reverting on
* overflow (when the input is greater than largest uint216).
*
* Counterpart to Solidity's `uint216` operator.
*
* Requirements:
*
* - input must fit into 216 bits
*
* _Available since v4.7._
*/
function toUint216(uint256 value) internal pure returns (uint216) {
require(value <= type(uint216).max, "SafeCast: value doesn't fit in 216 bits");
return uint216(value);
}
/**
* @dev Returns the downcasted uint208 from uint256, reverting on
* overflow (when the input is greater than largest uint208).
*
* Counterpart to Solidity's `uint208` operator.
*
* Requirements:
*
* - input must fit into 208 bits
*
* _Available since v4.7._
*/
function toUint208(uint256 value) internal pure returns (uint208) {
require(value <= type(uint208).max, "SafeCast: value doesn't fit in 208 bits");
return uint208(value);
}
/**
* @dev Returns the downcasted uint200 from uint256, reverting on
* overflow (when the input is greater than largest uint200).
*
* Counterpart to Solidity's `uint200` operator.
*
* Requirements:
*
* - input must fit into 200 bits
*
* _Available since v4.7._
*/
function toUint200(uint256 value) internal pure returns (uint200) {
require(value <= type(uint200).max, "SafeCast: value doesn't fit in 200 bits");
return uint200(value);
}
/**
* @dev Returns the downcasted uint192 from uint256, reverting on
* overflow (when the input is greater than largest uint192).
*
* Counterpart to Solidity's `uint192` operator.
*
* Requirements:
*
* - input must fit into 192 bits
*
* _Available since v4.7._
*/
function toUint192(uint256 value) internal pure returns (uint192) {
require(value <= type(uint192).max, "SafeCast: value doesn't fit in 192 bits");
return uint192(value);
}
/**
* @dev Returns the downcasted uint184 from uint256, reverting on
* overflow (when the input is greater than largest uint184).
*
* Counterpart to Solidity's `uint184` operator.
*
* Requirements:
*
* - input must fit into 184 bits
*
* _Available since v4.7._
*/
function toUint184(uint256 value) internal pure returns (uint184) {
require(value <= type(uint184).max, "SafeCast: value doesn't fit in 184 bits");
return uint184(value);
}
/**
* @dev Returns the downcasted uint176 from uint256, reverting on
* overflow (when the input is greater than largest uint176).
*
* Counterpart to Solidity's `uint176` operator.
*
* Requirements:
*
* - input must fit into 176 bits
*
* _Available since v4.7._
*/
function toUint176(uint256 value) internal pure returns (uint176) {
require(value <= type(uint176).max, "SafeCast: value doesn't fit in 176 bits");
return uint176(value);
}
/**
* @dev Returns the downcasted uint168 from uint256, reverting on
* overflow (when the input is greater than largest uint168).
*
* Counterpart to Solidity's `uint168` operator.
*
* Requirements:
*
* - input must fit into 168 bits
*
* _Available since v4.7._
*/
function toUint168(uint256 value) internal pure returns (uint168) {
require(value <= type(uint168).max, "SafeCast: value doesn't fit in 168 bits");
return uint168(value);
}
/**
* @dev Returns the downcasted uint160 from uint256, reverting on
* overflow (when the input is greater than largest uint160).
*
* Counterpart to Solidity's `uint160` operator.
*
* Requirements:
*
* - input must fit into 160 bits
*
* _Available since v4.7._
*/
function toUint160(uint256 value) internal pure returns (uint160) {
require(value <= type(uint160).max, "SafeCast: value doesn't fit in 160 bits");
return uint160(value);
}
/**
* @dev Returns the downcasted uint152 from uint256, reverting on
* overflow (when the input is greater than largest uint152).
*
* Counterpart to Solidity's `uint152` operator.
*
* Requirements:
*
* - input must fit into 152 bits
*
* _Available since v4.7._
*/
function toUint152(uint256 value) internal pure returns (uint152) {
require(value <= type(uint152).max, "SafeCast: value doesn't fit in 152 bits");
return uint152(value);
}
/**
* @dev Returns the downcasted uint144 from uint256, reverting on
* overflow (when the input is greater than largest uint144).
*
* Counterpart to Solidity's `uint144` operator.
*
* Requirements:
*
* - input must fit into 144 bits
*
* _Available since v4.7._
*/
function toUint144(uint256 value) internal pure returns (uint144) {
require(value <= type(uint144).max, "SafeCast: value doesn't fit in 144 bits");
return uint144(value);
}
/**
* @dev Returns the downcasted uint136 from uint256, reverting on
* overflow (when the input is greater than largest uint136).
*
* Counterpart to Solidity's `uint136` operator.
*
* Requirements:
*
* - input must fit into 136 bits
*
* _Available since v4.7._
*/
function toUint136(uint256 value) internal pure returns (uint136) {
require(value <= type(uint136).max, "SafeCast: value doesn't fit in 136 bits");
return uint136(value);
}
/**
* @dev Returns the downcasted uint128 from uint256, reverting on
* overflow (when the input is greater than largest uint128).
*
* Counterpart to Solidity's `uint128` operator.
*
* Requirements:
*
* - input must fit into 128 bits
*
* _Available since v2.5._
*/
function toUint128(uint256 value) internal pure returns (uint128) {
require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits");
return uint128(value);
}
/**
* @dev Returns the downcasted uint120 from uint256, reverting on
* overflow (when the input is greater than largest uint120).
*
* Counterpart to Solidity's `uint120` operator.
*
* Requirements:
*
* - input must fit into 120 bits
*
* _Available since v4.7._
*/
function toUint120(uint256 value) internal pure returns (uint120) {
require(value <= type(uint120).max, "SafeCast: value doesn't fit in 120 bits");
return uint120(value);
}
/**
* @dev Returns the downcasted uint112 from uint256, reverting on
* overflow (when the input is greater than largest uint112).
*
* Counterpart to Solidity's `uint112` operator.
*
* Requirements:
*
* - input must fit into 112 bits
*
* _Available since v4.7._
*/
function toUint112(uint256 value) internal pure returns (uint112) {
require(value <= type(uint112).max, "SafeCast: value doesn't fit in 112 bits");
return uint112(value);
}
/**
* @dev Returns the downcasted uint104 from uint256, reverting on
* overflow (when the input is greater than largest uint104).
*
* Counterpart to Solidity's `uint104` operator.
*
* Requirements:
*
* - input must fit into 104 bits
*
* _Available since v4.7._
*/
function toUint104(uint256 value) internal pure returns (uint104) {
require(value <= type(uint104).max, "SafeCast: value doesn't fit in 104 bits");
return uint104(value);
}
/**
* @dev Returns the downcasted uint96 from uint256, reverting on
* overflow (when the input is greater than largest uint96).
*
* Counterpart to Solidity's `uint96` operator.
*
* Requirements:
*
* - input must fit into 96 bits
*
* _Available since v4.2._
*/
function toUint96(uint256 value) internal pure returns (uint96) {
require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits");
return uint96(value);
}
/**
* @dev Returns the downcasted uint88 from uint256, reverting on
* overflow (when the input is greater than largest uint88).
*
* Counterpart to Solidity's `uint88` operator.
*
* Requirements:
*
* - input must fit into 88 bits
*
* _Available since v4.7._
*/
function toUint88(uint256 value) internal pure returns (uint88) {
require(value <= type(uint88).max, "SafeCast: value doesn't fit in 88 bits");
return uint88(value);
}
/**
* @dev Returns the downcasted uint80 from uint256, reverting on
* overflow (when the input is greater than largest uint80).
*
* Counterpart to Solidity's `uint80` operator.
*
* Requirements:
*
* - input must fit into 80 bits
*
* _Available since v4.7._
*/
function toUint80(uint256 value) internal pure returns (uint80) {
require(value <= type(uint80).max, "SafeCast: value doesn't fit in 80 bits");
return uint80(value);
}
/**
* @dev Returns the downcasted uint72 from uint256, reverting on
* overflow (when the input is greater than largest uint72).
*
* Counterpart to Solidity's `uint72` operator.
*
* Requirements:
*
* - input must fit into 72 bits
*
* _Available since v4.7._
*/
function toUint72(uint256 value) internal pure returns (uint72) {
require(value <= type(uint72).max, "SafeCast: value doesn't fit in 72 bits");
return uint72(value);
}
/**
* @dev Returns the downcasted uint64 from uint256, reverting on
* overflow (when the input is greater than largest uint64).
*
* Counterpart to Solidity's `uint64` operator.
*
* Requirements:
*
* - input must fit into 64 bits
*
* _Available since v2.5._
*/
function toUint64(uint256 value) internal pure returns (uint64) {
require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits");
return uint64(value);
}
/**
* @dev Returns the downcasted uint56 from uint256, reverting on
* overflow (when the input is greater than largest uint56).
*
* Counterpart to Solidity's `uint56` operator.
*
* Requirements:
*
* - input must fit into 56 bits
*
* _Available since v4.7._
*/
function toUint56(uint256 value) internal pure returns (uint56) {
require(value <= type(uint56).max, "SafeCast: value doesn't fit in 56 bits");
return uint56(value);
}
/**
* @dev Returns the downcasted uint48 from uint256, reverting on
* overflow (when the input is greater than largest uint48).
*
* Counterpart to Solidity's `uint48` operator.
*
* Requirements:
*
* - input must fit into 48 bits
*
* _Available since v4.7._
*/
function toUint48(uint256 value) internal pure returns (uint48) {
require(value <= type(uint48).max, "SafeCast: value doesn't fit in 48 bits");
return uint48(value);
}
/**
* @dev Returns the downcasted uint40 from uint256, reverting on
* overflow (when the input is greater than largest uint40).
*
* Counterpart to Solidity's `uint40` operator.
*
* Requirements:
*
* - input must fit into 40 bits
*
* _Available since v4.7._
*/
function toUint40(uint256 value) internal pure returns (uint40) {
require(value <= type(uint40).max, "SafeCast: value doesn't fit in 40 bits");
return uint40(value);
}
/**
* @dev Returns the downcasted uint32 from uint256, reverting on
* overflow (when the input is greater than largest uint32).
*
* Counterpart to Solidity's `uint32` operator.
*
* Requirements:
*
* - input must fit into 32 bits
*
* _Available since v2.5._
*/
function toUint32(uint256 value) internal pure returns (uint32) {
require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits");
return uint32(value);
}
/**
* @dev Returns the downcasted uint24 from uint256, reverting on
* overflow (when the input is greater than largest uint24).
*
* Counterpart to Solidity's `uint24` operator.
*
* Requirements:
*
* - input must fit into 24 bits
*
* _Available since v4.7._
*/
function toUint24(uint256 value) internal pure returns (uint24) {
require(value <= type(uint24).max, "SafeCast: value doesn't fit in 24 bits");
return uint24(value);
}
/**
* @dev Returns the downcasted uint16 from uint256, reverting on
* overflow (when the input is greater than largest uint16).
*
* Counterpart to Solidity's `uint16` operator.
*
* Requirements:
*
* - input must fit into 16 bits
*
* _Available since v2.5._
*/
function toUint16(uint256 value) internal pure returns (uint16) {
require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits");
return uint16(value);
}
/**
* @dev Returns the downcasted uint8 from uint256, reverting on
* overflow (when the input is greater than largest uint8).
*
* Counterpart to Solidity's `uint8` operator.
*
* Requirements:
*
* - input must fit into 8 bits
*
* _Available since v2.5._
*/
function toUint8(uint256 value) internal pure returns (uint8) {
require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits");
return uint8(value);
}
/**
* @dev Converts a signed int256 into an unsigned uint256.
*
* Requirements:
*
* - input must be greater than or equal to 0.
*
* _Available since v3.0._
*/
function toUint256(int256 value) internal pure returns (uint256) {
require(value >= 0, "SafeCast: value must be positive");
return uint256(value);
}
/**
* @dev Returns the downcasted int248 from int256, reverting on
* overflow (when the input is less than smallest int248 or
* greater than largest int248).
*
* Counterpart to Solidity's `int248` operator.
*
* Requirements:
*
* - input must fit into 248 bits
*
* _Available since v4.7._
*/
function toInt248(int256 value) internal pure returns (int248 downcasted) {
downcasted = int248(value);
require(downcasted == value, "SafeCast: value doesn't fit in 248 bits");
}
/**
* @dev Returns the downcasted int240 from int256, reverting on
* overflow (when the input is less than smallest int240 or
* greater than largest int240).
*
* Counterpart to Solidity's `int240` operator.
*
* Requirements:
*
* - input must fit into 240 bits
*
* _Available since v4.7._
*/
function toInt240(int256 value) internal pure returns (int240 downcasted) {
downcasted = int240(value);
require(downcasted == value, "SafeCast: value doesn't fit in 240 bits");
}
/**
* @dev Returns the downcasted int232 from int256, reverting on
* overflow (when the input is less than smallest int232 or
* greater than largest int232).
*
* Counterpart to Solidity's `int232` operator.
*
* Requirements:
*
* - input must fit into 232 bits
*
* _Available since v4.7._
*/
function toInt232(int256 value) internal pure returns (int232 downcasted) {
downcasted = int232(value);
require(downcasted == value, "SafeCast: value doesn't fit in 232 bits");
}
/**
* @dev Returns the downcasted int224 from int256, reverting on
* overflow (when the input is less than smallest int224 or
* greater than largest int224).
*
* Counterpart to Solidity's `int224` operator.
*
* Requirements:
*
* - input must fit into 224 bits
*
* _Available since v4.7._
*/
function toInt224(int256 value) internal pure returns (int224 downcasted) {
downcasted = int224(value);
require(downcasted == value, "SafeCast: value doesn't fit in 224 bits");
}
/**
* @dev Returns the downcasted int216 from int256, reverting on
* overflow (when the input is less than smallest int216 or
* greater than largest int216).
*
* Counterpart to Solidity's `int216` operator.
*
* Requirements:
*
* - input must fit into 216 bits
*
* _Available since v4.7._
*/
function toInt216(int256 value) internal pure returns (int216 downcasted) {
downcasted = int216(value);
require(downcasted == value, "SafeCast: value doesn't fit in 216 bits");
}
/**
* @dev Returns the downcasted int208 from int256, reverting on
* overflow (when the input is less than smallest int208 or
* greater than largest int208).
*
* Counterpart to Solidity's `int208` operator.
*
* Requirements:
*
* - input must fit into 208 bits
*
* _Available since v4.7._
*/
function toInt208(int256 value) internal pure returns (int208 downcasted) {
downcasted = int208(value);
require(downcasted == value, "SafeCast: value doesn't fit in 208 bits");
}
/**
* @dev Returns the downcasted int200 from int256, reverting on
* overflow (when the input is less than smallest int200 or
* greater than largest int200).
*
* Counterpart to Solidity's `int200` operator.
*
* Requirements:
*
* - input must fit into 200 bits
*
* _Available since v4.7._
*/
function toInt200(int256 value) internal pure returns (int200 downcasted) {
downcasted = int200(value);
require(downcasted == value, "SafeCast: value doesn't fit in 200 bits");
}
/**
* @dev Returns the downcasted int192 from int256, reverting on
* overflow (when the input is less than smallest int192 or
* greater than largest int192).
*
* Counterpart to Solidity's `int192` operator.
*
* Requirements:
*
* - input must fit into 192 bits
*
* _Available since v4.7._
*/
function toInt192(int256 value) internal pure returns (int192 downcasted) {
downcasted = int192(value);
require(downcasted == value, "SafeCast: value doesn't fit in 192 bits");
}
/**
* @dev Returns the downcasted int184 from int256, reverting on
* overflow (when the input is less than smallest int184 or
* greater than largest int184).
*
* Counterpart to Solidity's `int184` operator.
*
* Requirements:
*
* - input must fit into 184 bits
*
* _Available since v4.7._
*/
function toInt184(int256 value) internal pure returns (int184 downcasted) {
downcasted = int184(value);
require(downcasted == value, "SafeCast: value doesn't fit in 184 bits");
}
/**
* @dev Returns the downcasted int176 from int256, reverting on
* overflow (when the input is less than smallest int176 or
* greater than largest int176).
*
* Counterpart to Solidity's `int176` operator.
*
* Requirements:
*
* - input must fit into 176 bits
*
* _Available since v4.7._
*/
function toInt176(int256 value) internal pure returns (int176 downcasted) {
downcasted = int176(value);
require(downcasted == value, "SafeCast: value doesn't fit in 176 bits");
}
/**
* @dev Returns the downcasted int168 from int256, reverting on
* overflow (when the input is less than smallest int168 or
* greater than largest int168).
*
* Counterpart to Solidity's `int168` operator.
*
* Requirements:
*
* - input must fit into 168 bits
*
* _Available since v4.7._
*/
function toInt168(int256 value) internal pure returns (int168 downcasted) {
downcasted = int168(value);
require(downcasted == value, "SafeCast: value doesn't fit in 168 bits");
}
/**
* @dev Returns the downcasted int160 from int256, reverting on
* overflow (when the input is less than smallest int160 or
* greater than largest int160).
*
* Counterpart to Solidity's `int160` operator.
*
* Requirements:
*
* - input must fit into 160 bits
*
* _Available since v4.7._
*/
function toInt160(int256 value) internal pure returns (int160 downcasted) {
downcasted = int160(value);
require(downcasted == value, "SafeCast: value doesn't fit in 160 bits");
}
/**
* @dev Returns the downcasted int152 from int256, reverting on
* overflow (when the input is less than smallest int152 or
* greater than largest int152).
*
* Counterpart to Solidity's `int152` operator.
*
* Requirements:
*
* - input must fit into 152 bits
*
* _Available since v4.7._
*/
function toInt152(int256 value) internal pure returns (int152 downcasted) {
downcasted = int152(value);
require(downcasted == value, "SafeCast: value doesn't fit in 152 bits");
}
/**
* @dev Returns the downcasted int144 from int256, reverting on
* overflow (when the input is less than smallest int144 or
* greater than largest int144).
*
* Counterpart to Solidity's `int144` operator.
*
* Requirements:
*
* - input must fit into 144 bits
*
* _Available since v4.7._
*/
function toInt144(int256 value) internal pure returns (int144 downcasted) {
downcasted = int144(value);
require(downcasted == value, "SafeCast: value doesn't fit in 144 bits");
}
/**
* @dev Returns the downcasted int136 from int256, reverting on
* overflow (when the input is less than smallest int136 or
* greater than largest int136).
*
* Counterpart to Solidity's `int136` operator.
*
* Requirements:
*
* - input must fit into 136 bits
*
* _Available since v4.7._
*/
function toInt136(int256 value) internal pure returns (int136 downcasted) {
downcasted = int136(value);
require(downcasted == value, "SafeCast: value doesn't fit in 136 bits");
}
/**
* @dev Returns the downcasted int128 from int256, reverting on
* overflow (when the input is less than smallest int128 or
* greater than largest int128).
*
* Counterpart to Solidity's `int128` operator.
*
* Requirements:
*
* - input must fit into 128 bits
*
* _Available since v3.1._
*/
function toInt128(int256 value) internal pure returns (int128 downcasted) {
downcasted = int128(value);
require(downcasted == value, "SafeCast: value doesn't fit in 128 bits");
}
/**
* @dev Returns the downcasted int120 from int256, reverting on
* overflow (when the input is less than smallest int120 or
* greater than largest int120).
*
* Counterpart to Solidity's `int120` operator.
*
* Requirements:
*
* - input must fit into 120 bits
*
* _Available since v4.7._
*/
function toInt120(int256 value) internal pure returns (int120 downcasted) {
downcasted = int120(value);
require(downcasted == value, "SafeCast: value doesn't fit in 120 bits");
}
/**
* @dev Returns the downcasted int112 from int256, reverting on
* overflow (when the input is less than smallest int112 or
* greater than largest int112).
*
* Counterpart to Solidity's `int112` operator.
*
* Requirements:
*
* - input must fit into 112 bits
*
* _Available since v4.7._
*/
function toInt112(int256 value) internal pure returns (int112 downcasted) {
downcasted = int112(value);
require(downcasted == value, "SafeCast: value doesn't fit in 112 bits");
}
/**
* @dev Returns the downcasted int104 from int256, reverting on
* overflow (when the input is less than smallest int104 or
* greater than largest int104).
*
* Counterpart to Solidity's `int104` operator.
*
* Requirements:
*
* - input must fit into 104 bits
*
* _Available since v4.7._
*/
function toInt104(int256 value) internal pure returns (int104 downcasted) {
downcasted = int104(value);
require(downcasted == value, "SafeCast: value doesn't fit in 104 bits");
}
/**
* @dev Returns the downcasted int96 from int256, reverting on
* overflow (when the input is less than smallest int96 or
* greater than largest int96).
*
* Counterpart to Solidity's `int96` operator.
*
* Requirements:
*
* - input must fit into 96 bits
*
* _Available since v4.7._
*/
function toInt96(int256 value) internal pure returns (int96 downcasted) {
downcasted = int96(value);
require(downcasted == value, "SafeCast: value doesn't fit in 96 bits");
}
/**
* @dev Returns the downcasted int88 from int256, reverting on
* overflow (when the input is less than smallest int88 or
* greater than largest int88).
*
* Counterpart to Solidity's `int88` operator.
*
* Requirements:
*
* - input must fit into 88 bits
*
* _Available since v4.7._
*/
function toInt88(int256 value) internal pure returns (int88 downcasted) {
downcasted = int88(value);
require(downcasted == value, "SafeCast: value doesn't fit in 88 bits");
}
/**
* @dev Returns the downcasted int80 from int256, reverting on
* overflow (when the input is less than smallest int80 or
* greater than largest int80).
*
* Counterpart to Solidity's `int80` operator.
*
* Requirements:
*
* - input must fit into 80 bits
*
* _Available since v4.7._
*/
function toInt80(int256 value) internal pure returns (int80 downcasted) {
downcasted = int80(value);
require(downcasted == value, "SafeCast: value doesn't fit in 80 bits");
}
/**
* @dev Returns the downcasted int72 from int256, reverting on
* overflow (when the input is less than smallest int72 or
* greater than largest int72).
*
* Counterpart to Solidity's `int72` operator.
*
* Requirements:
*
* - input must fit into 72 bits
*
* _Available since v4.7._
*/
function toInt72(int256 value) internal pure returns (int72 downcasted) {
downcasted = int72(value);
require(downcasted == value, "SafeCast: value doesn't fit in 72 bits");
}
/**
* @dev Returns the downcasted int64 from int256, reverting on
* overflow (when the input is less than smallest int64 or
* greater than largest int64).
*
* Counterpart to Solidity's `int64` operator.
*
* Requirements:
*
* - input must fit into 64 bits
*
* _Available since v3.1._
*/
function toInt64(int256 value) internal pure returns (int64 downcasted) {
downcasted = int64(value);
require(downcasted == value, "SafeCast: value doesn't fit in 64 bits");
}
/**
* @dev Returns the downcasted int56 from int256, reverting on
* overflow (when the input is less than smallest int56 or
* greater than largest int56).
*
* Counterpart to Solidity's `int56` operator.
*
* Requirements:
*
* - input must fit into 56 bits
*
* _Available since v4.7._
*/
function toInt56(int256 value) internal pure returns (int56 downcasted) {
downcasted = int56(value);
require(downcasted == value, "SafeCast: value doesn't fit in 56 bits");
}
/**
* @dev Returns the downcasted int48 from int256, reverting on
* overflow (when the input is less than smallest int48 or
* greater than largest int48).
*
* Counterpart to Solidity's `int48` operator.
*
* Requirements:
*
* - input must fit into 48 bits
*
* _Available since v4.7._
*/
function toInt48(int256 value) internal pure returns (int48 downcasted) {
downcasted = int48(value);
require(downcasted == value, "SafeCast: value doesn't fit in 48 bits");
}
/**
* @dev Returns the downcasted int40 from int256, reverting on
* overflow (when the input is less than smallest int40 or
* greater than largest int40).
*
* Counterpart to Solidity's `int40` operator.
*
* Requirements:
*
* - input must fit into 40 bits
*
* _Available since v4.7._
*/
function toInt40(int256 value) internal pure returns (int40 downcasted) {
downcasted = int40(value);
require(downcasted == value, "SafeCast: value doesn't fit in 40 bits");
}
/**
* @dev Returns the downcasted int32 from int256, reverting on
* overflow (when the input is less than smallest int32 or
* greater than largest int32).
*
* Counterpart to Solidity's `int32` operator.
*
* Requirements:
*
* - input must fit into 32 bits
*
* _Available since v3.1._
*/
function toInt32(int256 value) internal pure returns (int32 downcasted) {
downcasted = int32(value);
require(downcasted == value, "SafeCast: value doesn't fit in 32 bits");
}
/**
* @dev Returns the downcasted int24 from int256, reverting on
* overflow (when the input is less than smallest int24 or
* greater than largest int24).
*
* Counterpart to Solidity's `int24` operator.
*
* Requirements:
*
* - input must fit into 24 bits
*
* _Available since v4.7._
*/
function toInt24(int256 value) internal pure returns (int24 downcasted) {
downcasted = int24(value);
require(downcasted == value, "SafeCast: value doesn't fit in 24 bits");
}
/**
* @dev Returns the downcasted int16 from int256, reverting on
* overflow (when the input is less than smallest int16 or
* greater than largest int16).
*
* Counterpart to Solidity's `int16` operator.
*
* Requirements:
*
* - input must fit into 16 bits
*
* _Available since v3.1._
*/
function toInt16(int256 value) internal pure returns (int16 downcasted) {
downcasted = int16(value);
require(downcasted == value, "SafeCast: value doesn't fit in 16 bits");
}
/**
* @dev Returns the downcasted int8 from int256, reverting on
* overflow (when the input is less than smallest int8 or
* greater than largest int8).
*
* Counterpart to Solidity's `int8` operator.
*
* Requirements:
*
* - input must fit into 8 bits
*
* _Available since v3.1._
*/
function toInt8(int256 value) internal pure returns (int8 downcasted) {
downcasted = int8(value);
require(downcasted == value, "SafeCast: value doesn't fit in 8 bits");
}
/**
* @dev Converts an unsigned uint256 into a signed int256.
*
* Requirements:
*
* - input must be less than or equal to maxInt256.
*
* _Available since v3.0._
*/
function toInt256(uint256 value) internal pure returns (int256) {
// Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256");
return int256(value);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;
interface ITokenMessengerV2 {
function depositForBurn(
uint256 amount,
uint32 destinationDomain,
bytes32 mintRecipient,
address burnToken,
bytes32 destinationCaller,
uint256 maxFee,
uint32 minFinalityThreshold
) external;
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;
interface IMessageTransmitterV2 {
function receiveMessage(bytes calldata message, bytes calldata attestation) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
enum PayloadType {
LP_DEPOSIT,
SP_DEPOSIT,
LP_WITHDRAW,
SP_WITHDRAW,
ASSETS_DISTRIBUTION,
UPDATE_USER_CLAIM
}
struct DepositParams {
PayloadType payloadType;
address receiver;
address token;
uint256 amount;
bytes32 brokerHash;
}
/// @title IProtocolVault Interface
interface IProtocolVault {
function depositFromStrategy(uint256 periodId, bytes32 brokerHash, address token, uint256 amount) external;
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;
import {ECDSA} from "openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol";
import {VaultTypes} from "./types/VaultTypes.sol";
library DelegateSwapSignature {
function validateDelegateSwapSignature(
address expectedSigner,
VaultTypes.DelegateSwap calldata data
) internal view returns (bool) {
bytes memory encoded = abi.encode(
data.tradeId,
block.chainid,
data.inTokenHash,
data.inTokenAmount,
data.to,
data.value,
data.swapCalldata
);
bytes32 digest = ECDSA.toEthSignedMessageHash(keccak256(encoded));
address recoveredAddress = ECDSA.recover(digest, data.v, data.r, data.s);
return recoveredAddress == expectedSigner;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)
pragma solidity ^0.8.20;
import {Initializable} from "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol";
/**
* @dev Contract module that helps prevent reentrant calls to a function.
* @dev This is a revised version of the ReentrancyGuardUpgradeable contract only for backward compatibility
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
* consider using {ReentrancyGuardTransient} instead.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuardRevised is Initializable {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant NOT_ENTERED = 1;
uint256 private constant ENTERED = 2;
/// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard
struct ReentrancyGuardStorage {
uint256 _status;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;
function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {
assembly {
$.slot := ReentrancyGuardStorageLocation
}
}
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
function __ReentrancyGuard_init() internal onlyInitializing {
__ReentrancyGuard_init_unchained();
}
function __ReentrancyGuard_init_unchained() internal onlyInitializing {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
$._status = NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
// On the first call to nonReentrant, _status will be NOT_ENTERED
if ($._status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
$._status = ENTERED;
}
function _nonReentrantAfter() private {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
$._status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
return $._status == ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (access/AccessControl.sol)
pragma solidity ^0.8.20;
import {Initializable} from "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol";
import {IAccessControl} from "openzeppelin-contracts/contracts/access/IAccessControl.sol";
import {IAccessControlRevised} from "./IAccessControlRevised.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
* @dev This is a revised version of the AccessControlUpgradeable contract only for backward compatibility
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```solidity
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```solidity
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
* to enforce additional security measures for this role.
*/
abstract contract AccessControlRevised is Initializable, IAccessControlRevised {
struct RoleData {
mapping(address account => bool) hasRole;
bytes32 adminRole;
}
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/// @custom:storage-location erc7201:openzeppelin.storage.AccessControl
struct AccessControlStorage {
mapping(bytes32 role => RoleData) _roles;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControl")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800;
function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) {
assembly {
$.slot := AccessControlStorageLocation
}
}
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with an {AccessControlUnauthorizedAccount} error including the required role.
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
function __AccessControl_init() internal onlyInitializing {
}
function __AccessControl_init_unchained() internal onlyInitializing {
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual returns (bool) {
AccessControlStorage storage $ = _getAccessControlStorage();
return $._roles[role].hasRole[account];
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `msg.sender`
* is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, msg.sender);
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
* is missing `role`.
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert AccessControlUnauthorizedAccount(account, role);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
AccessControlStorage storage $ = _getAccessControlStorage();
return $._roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleGranted} event.
*/
function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleRevoked} event.
*/
function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `callerConfirmation`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address callerConfirmation) public virtual {
if (callerConfirmation != msg.sender) {
revert AccessControlBadConfirmation();
}
_revokeRole(role, callerConfirmation);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
AccessControlStorage storage $ = _getAccessControlStorage();
bytes32 previousAdminRole = getRoleAdmin(role);
$._roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
AccessControlStorage storage $ = _getAccessControlStorage();
if (!hasRole(role, account)) {
$._roles[role].hasRole[account] = true;
emit RoleGranted(role, account, msg.sender);
return true;
} else {
return false;
}
}
/**
* @dev Attempts to revoke `role` from `account` and returns a boolean indicating if `role` was revoked.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
AccessControlStorage storage $ = _getAccessControlStorage();
if (hasRole(role, account)) {
$._roles[role].hasRole[account] = false;
emit RoleRevoked(role, account, msg.sender);
return true;
} else {
return false;
}
}
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;
/// @title VaultTypes library
/// @author Orderly_Rubick
library VaultTypes {
struct VaultDepositFE {
bytes32 accountId;
bytes32 brokerHash;
bytes32 tokenHash;
uint128 tokenAmount;
}
struct VaultDeposit {
bytes32 accountId;
address userAddress;
bytes32 brokerHash;
bytes32 tokenHash;
uint128 tokenAmount;
uint64 depositNonce; // deposit nonce
}
struct VaultWithdraw {
bytes32 accountId;
bytes32 brokerHash;
bytes32 tokenHash;
uint128 tokenAmount;
uint128 fee;
address sender;
address receiver;
uint64 withdrawNonce; // withdraw nonce
}
struct VaultDelegate {
bytes32 brokerHash;
address delegateSigner;
}
enum VaultEnum {
ProtocolVault,
UserVault,
Ceffu
}
struct VaultWithdraw2Contract {
VaultEnum vaultType;
bytes32 accountId;
bytes32 brokerHash;
bytes32 tokenHash;
uint128 tokenAmount;
uint128 fee;
address sender;
address receiver;
uint64 withdrawNonce;
uint256 clientId;
}
struct DelegateSwap {
bytes32 tradeId;
uint256 chainId;
bytes32 inTokenHash;
uint256 inTokenAmount;
address to;
uint256 value;
bytes swapCalldata;
// signature
bytes32 r;
bytes32 s;
uint8 v;
}
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;
/// @title RebalanceTypes library
/// @author Orderly_Rubick
library RebalanceTypes {
enum RebalanceStatusEnum {
None,
Pending,
Succ,
Fail
}
// RebalanceStatus
struct RebalanceStatus {
uint64 rebalanceId; // Because the mapping key rebalanceId is mod, so we need to record the real rebalanceId
RebalanceStatusEnum burnStatus;
RebalanceStatusEnum mintStatus;
}
// RebalanceBurnUploadData
struct RebalanceBurnUploadData {
bytes32 r;
bytes32 s;
uint8 v;
uint64 rebalanceId;
uint128 amount;
bytes32 tokenHash;
uint256 burnChainId;
uint256 mintChainId;
}
struct RebalanceBurnCCData {
uint32 dstDomain;
uint64 rebalanceId;
uint128 amount;
bytes32 tokenHash;
uint256 burnChainId;
uint256 mintChainId;
address dstVaultAddress;
}
struct RebalanceBurnCCFinishData {
bool success;
uint64 rebalanceId;
uint128 amount;
bytes32 tokenHash;
uint256 burnChainId;
uint256 mintChainId;
}
// RebalanceMintUploadData
struct RebalanceMintUploadData {
bytes32 r;
bytes32 s;
uint8 v;
uint64 rebalanceId;
uint128 amount;
bytes32 tokenHash;
uint256 burnChainId;
uint256 mintChainId;
bytes messageBytes;
bytes messageSignature;
}
struct RebalanceMintCCData {
uint64 rebalanceId;
uint128 amount;
bytes32 tokenHash;
uint256 burnChainId;
uint256 mintChainId;
bytes messageBytes;
bytes messageSignature;
}
struct RebalanceMintCCFinishData {
bool success;
uint64 rebalanceId;
uint128 amount;
bytes32 tokenHash;
uint256 burnChainId;
uint256 mintChainId;
}
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;
/// @title EventTypes library
/// @author Orderly_Rubick
library EventTypes {
// EventUpload
struct EventUpload {
EventUploadData[] events;
bytes32 r;
bytes32 s;
uint8 v;
uint8 count;
uint64 batchId;
}
// EventUploadData
// bizType:
// 1 - withdraw
// 2 -settlement
// 3 - adl
// 4 - liquidation
// 5 - feeDistribution
// 6 - delegateSigner
// 7 - delegateWithdraw
// 8 - adlV2
// 9 - liquidationV2
// 10 - withdrawSol
// 11 - withdraw2Contract
// 12 - balanceTransfer
// 13 - swapResult
// 14 - withdraw2ContractV2
struct EventUploadData {
uint8 bizType;
uint64 eventId;
bytes data;
}
// WithdrawData
struct WithdrawData {
uint128 tokenAmount;
uint128 fee;
uint256 chainId; // target withdraw chain
bytes32 accountId;
bytes32 r; // String to bytes32, big endian?
bytes32 s;
uint8 v;
address sender;
uint64 withdrawNonce;
address receiver;
uint64 timestamp;
string brokerId; // only this field is string, others should be bytes32 hashedBrokerId
string tokenSymbol; // only this field is string, others should be bytes32 hashedTokenSymbol
}
// WithdrawDataSol
struct WithdrawDataSol {
uint128 tokenAmount;
uint128 fee;
uint256 chainId; // target withdraw chain
bytes32 accountId;
bytes32 r;
bytes32 s;
bytes32 sender;
bytes32 receiver;
uint64 withdrawNonce;
uint64 timestamp;
string brokerId; // only this field is string, others should be bytes32 hashedBrokerId
string tokenSymbol; // only this field is string, others should be bytes32 hashedTokenSymbol
}
struct Settlement {
bytes32 accountId;
bytes32 settledAssetHash;
bytes32 insuranceAccountId;
int128 settledAmount;
uint128 insuranceTransferAmount;
uint64 timestamp;
SettlementExecution[] settlementExecutions;
}
struct SettlementExecution {
bytes32 symbolHash;
uint128 markPrice;
int128 sumUnitaryFundings;
int128 settledAmount;
}
struct Adl {
bytes32 accountId;
bytes32 insuranceAccountId;
bytes32 symbolHash;
int128 positionQtyTransfer;
int128 costPositionTransfer;
uint128 adlPrice;
int128 sumUnitaryFundings;
uint64 timestamp;
}
struct AdlV2 {
bytes32 accountId;
bytes32 symbolHash;
int128 positionQtyTransfer;
int128 costPositionTransfer;
uint128 adlPrice;
int128 sumUnitaryFundings;
uint64 timestamp;
bool isInsuranceAccount;
}
struct Liquidation {
bytes32 liquidatedAccountId;
bytes32 insuranceAccountId;
bytes32 liquidatedAssetHash;
uint128 insuranceTransferAmount;
uint64 timestamp;
LiquidationTransfer[] liquidationTransfers;
}
struct LiquidationTransfer {
bytes32 liquidatorAccountId;
bytes32 symbolHash;
int128 positionQtyTransfer;
int128 costPositionTransfer;
int128 liquidatorFee;
int128 insuranceFee;
int128 liquidationFee;
uint128 markPrice;
int128 sumUnitaryFundings;
uint64 liquidationTransferId;
}
struct LiquidationV2 {
bytes32 accountId;
bytes32 liquidatedAssetHash;
int128 insuranceTransferAmount;
uint64 timestamp;
bool isInsuranceAccount;
LiquidationTransferV2[] liquidationTransfers;
}
struct LiquidationTransferV2 {
bytes32 symbolHash;
int128 positionQtyTransfer;
int128 costPositionTransfer;
int128 fee;
uint128 markPrice;
int128 sumUnitaryFundings;
}
struct FeeDistribution {
bytes32 fromAccountId;
bytes32 toAccountId;
uint128 amount;
bytes32 tokenHash;
}
struct DelegateSigner {
address delegateSigner;
address delegateContract;
bytes32 brokerHash;
uint256 chainId;
}
enum VaultEnum {
ProtocolVault,
UserVault,
Ceffu
}
struct Withdraw2Contract {
uint128 tokenAmount;
uint128 fee;
uint256 chainId; // target withdraw chain
bytes32 accountId;
VaultEnum vaultType;
address sender;
uint64 withdrawNonce;
address receiver; // maybe optional?
uint64 timestamp;
bytes32 brokerHash;
bytes32 tokenHash;
uint256 clientId;
}
/// @dev Balance transfer event structure for tracking inter-account transfers
struct BalanceTransfer {
bytes32 fromAccountId; /// @dev Source account ID
bytes32 toAccountId; /// @dev Destination account ID
uint128 amount; /// @dev Transfer amount
bytes32 tokenHash; /// @dev Token hash identifier
bool isFromAccountId; /// @dev true: debit event, false: credit event
uint8 transferType; /// @dev Transfer type - see ILedgerEvent.BalanceTransfer for full enumeration
uint256 transferId; /// @dev Unique identifier to link debit/credit pairs
}
/// @dev Enum to track which side of the transfer has been processed
enum TransferSide {
None, /// @dev No events processed yet
Debit, /// @dev Only debit event processed
Credit, /// @dev Only credit event processed
Both /// @dev Both debit and credit events processed
}
/// @dev Track the state of an internal transfer
struct InternalTransferTrack {
TransferSide side; /// @dev Which side(s) have been processed
bytes32 tokenHash; /// @dev Token being transferred
uint128 amount; /// @dev Amount being transferred
}
struct SwapResult {
bytes32 accountId;
bytes32 buyTokenHash;
bytes32 sellTokenHash;
int128 buyQuantity;
int128 sellQuantity;
uint256 chainId;
uint8 swapStatus; // OFF_CHAIN_SUCCESS(0), ON_CHAIN_SUCCESS(1), ON_CHAIN_FAILED(2)
}
enum ChainType {
EVM,
SOL
}
struct Withdraw2ContractV2 {
uint128 tokenAmount;
uint128 fee;
ChainType senderChainType;
ChainType receiverChainType;
uint256 chainId; // target withdraw chain
bytes32 accountId;
VaultEnum vaultType;
bytes32 sender; // Support Solana account and EVM address
uint64 withdrawNonce;
bytes32 receiver;
uint64 timestamp;
bytes32 brokerHash;
bytes32 tokenHash;
uint256 clientId;
}
// SetBrokerData - for cross-chain broker addition or removal
struct SetBrokerData {
bytes32 brokerHash; // The hash of the broker to be added or removed
uint256 dstChainId; // The destination chain ID where broker should be modified
bool allowed; // true = add broker, false = remove broker
}
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;
/// @title AccountTypes library
/// @author Orderly_Rubick
library AccountTypes {
struct PerpPosition {
int128 positionQty;
int128 costPosition;
int128 lastSumUnitaryFundings;
uint128 lastExecutedPrice;
uint128 lastSettledPrice;
uint128 averageEntryPrice;
int128 openingCost;
uint128 lastAdlPrice;
}
// account id, unique for each account, should be accountId -> {addr, brokerId}
// and keccak256(addr, brokerID) == accountId
struct Account {
// user's broker id
bytes32 brokerHash;
// primary address
address userAddress;
// mapping symbol => balance
mapping(bytes32 => int128) balances;
// mapping symbol => totalFrozenBalance
mapping(bytes32 => uint128) totalFrozenBalances;
// mapping withdrawNonce => symbol => balance
mapping(uint64 => mapping(bytes32 => uint128)) frozenBalances;
// perp position
mapping(bytes32 => PerpPosition) perpPositions;
// lastwithdraw nonce
uint64 lastWithdrawNonce;
// last perp trade id
uint64 lastPerpTradeId;
// last engine event id
uint64 lastEngineEventId;
// @deprecated last deposit event id
uint64 lastDepositEventId;
// last deposit src chain id
uint64 lastDepositSrcChainId;
// last deposit src chain nonce
uint64 lastDepositSrcChainNonce;
// solana account public key
bytes32 solAccountPubKey;
}
struct AccountDeposit {
bytes32 accountId;
bytes32 brokerHash;
address userAddress;
bytes32 tokenHash;
uint256 srcChainId;
uint128 tokenAmount;
uint64 srcChainDepositNonce;
}
struct AccountDepositSol {
bytes32 accountId;
bytes32 brokerHash;
bytes32 pubkey;
bytes32 tokenHash;
uint256 srcChainId;
uint128 tokenAmount;
uint64 srcChainDepositNonce;
}
// for accountWithdrawFinish
struct AccountWithdraw {
bytes32 accountId;
address sender;
address receiver;
bytes32 brokerHash;
bytes32 tokenHash;
uint128 tokenAmount;
uint128 fee;
uint256 chainId;
uint64 withdrawNonce;
}
struct AccountTokenBalances {
// token hash
bytes32 tokenHash;
// balance & frozenBalance
int128 balance;
uint128 frozenBalance;
}
struct AccountPerpPositions {
// symbol hash
bytes32 symbolHash;
// perp position
int128 positionQty;
int128 costPosition;
int128 lastSumUnitaryFundings;
uint128 lastExecutedPrice;
uint128 lastSettledPrice;
uint128 averageEntryPrice;
int128 openingCost;
uint128 lastAdlPrice;
}
// for batch get
struct AccountSnapshot {
bytes32 accountId;
bytes32 brokerHash;
address userAddress;
uint64 lastWithdrawNonce;
uint64 lastPerpTradeId;
uint64 lastEngineEventId;
uint64 lastDepositEventId;
AccountTokenBalances[] tokenBalances;
AccountPerpPositions[] perpPositions;
uint64 lastDepositSrcChainId;
uint64 lastDepositSrcChainNonce;
}
struct AccountDelegateSigner {
uint256 chainId;
address signer;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized != type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.0;
import "../Strings.sol";
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV // Deprecated in v4.8
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength);
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*
* _Available since v4.2._
*/
function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature);
}
return (signer, RecoverError.NoError);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
/**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
/**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (access/IAccessControl.sol)
pragma solidity ^0.8.20;
/**
* @dev External interface of AccessControl declared to support ERC-165 detection.
* @dev This is a revised version of the IAccessControl interface only for backward compatibility
*/
interface IAccessControlRevised {
/**
* @dev The `account` is missing a role.
*/
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);
/**
* @dev The caller of a function is not the expected one.
*
* NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
*/
error AccessControlBadConfirmation();
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted to signal this.
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call. This account bears the admin role (for the granted role).
* Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `callerConfirmation`.
*/
function renounceRole(bytes32 role, address callerConfirmation) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = 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), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @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) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator
) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1);
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator,
Rounding rounding
) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10**64) {
value /= 10**64;
result += 64;
}
if (value >= 10**32) {
value /= 10**32;
result += 32;
}
if (value >= 10**16) {
value /= 10**16;
result += 16;
}
if (value >= 10**8) {
value /= 10**8;
result += 8;
}
if (value >= 10**4) {
value /= 10**4;
result += 4;
}
if (value >= 10**2) {
value /= 10**2;
result += 2;
}
if (value >= 10**1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
}
}
}{
"remappings": [
"ds-test/=lib/forge-std/lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"contract-evm/=/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/"
],
"optimizer": {
"enabled": true,
"runs": 1000
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
},
"evmVersion": "cancun",
"viaIR": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"AccountIdInvalid","type":"error"},{"inputs":[],"name":"AddressZero","type":"error"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint128","name":"amount","type":"uint128"}],"name":"BalanceNotEnough","type":"error"},{"inputs":[],"name":"BrokerNotAllowed","type":"error"},{"inputs":[{"internalType":"address","name":"want","type":"address"},{"internalType":"address","name":"got","type":"address"}],"name":"CeffuAddressMismatch","type":"error"},{"inputs":[],"name":"DepositExceedLimit","type":"error"},{"inputs":[],"name":"DepositTokenDisabled","type":"error"},{"inputs":[],"name":"EnumerableSetError","type":"error"},{"inputs":[],"name":"InvalidSwapSignature","type":"error"},{"inputs":[],"name":"InvalidTokenAddress","type":"error"},{"inputs":[],"name":"NativeTokenDepositAmountMismatch","type":"error"},{"inputs":[],"name":"NotRebalanceEnableToken","type":"error"},{"inputs":[],"name":"NotZeroCodeLength","type":"error"},{"inputs":[],"name":"OnlyCrossChainManagerCanCall","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"SwapAlreadySubmitted","type":"error"},{"inputs":[{"internalType":"uint256","name":"expirationTimestamp","type":"uint256"},{"internalType":"uint256","name":"currentTimestamp","type":"uint256"}],"name":"SwapExpired","type":"error"},{"inputs":[],"name":"TokenNotAllowed","type":"error"},{"inputs":[],"name":"TokenNotDisabled","type":"error"},{"inputs":[],"name":"ZeroCodeLength","type":"error"},{"inputs":[],"name":"ZeroDeposit","type":"error"},{"inputs":[],"name":"ZeroDepositFee","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegateContract","type":"address"},{"indexed":true,"internalType":"bytes32","name":"brokerHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegateSigner","type":"address"},{"indexed":false,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"AccountDelegate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"accountId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":true,"internalType":"uint64","name":"depositNonce","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"tokenHash","type":"bytes32"},{"indexed":false,"internalType":"uint128","name":"tokenAmount","type":"uint128"}],"name":"AccountDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"accountId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":true,"internalType":"uint64","name":"depositNonce","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"tokenHash","type":"bytes32"},{"indexed":false,"internalType":"uint128","name":"tokenAmount","type":"uint128"}],"name":"AccountDepositTo","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"accountId","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"brokerHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint64","name":"depositNonce","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"tokenHash","type":"bytes32"},{"indexed":false,"internalType":"uint128","name":"tokenAmount","type":"uint128"}],"name":"AccountDepositTo","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"accountId","type":"bytes32"},{"indexed":true,"internalType":"uint64","name":"withdrawNonce","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"brokerHash","type":"bytes32"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"bytes32","name":"tokenHash","type":"bytes32"},{"indexed":false,"internalType":"uint128","name":"tokenAmount","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"fee","type":"uint128"}],"name":"AccountWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"ChangeCrossChainManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"ChangeDepositLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_tokenHash","type":"bytes32"},{"indexed":false,"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"ChangeTokenAddressAndAllow","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"tradeId","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"inTokenHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"inTokenAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"DelegateSwapExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_tokenHash","type":"bytes32"}],"name":"DisableDepositToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_tokenHash","type":"bytes32"}],"name":"EnableDepositToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_brokerHash","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"_allowed","type":"bool"}],"name":"SetAllowedBroker","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_tokenHash","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"_allowed","type":"bool"}],"name":"SetAllowedToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"brokerHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"dstChainId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"allowed","type":"bool"}],"name":"SetBrokerFromLedgerAlreadySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"brokerHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"dstChainId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"allowed","type":"bool"}],"name":"SetBrokerFromLedgerSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_oldCeffuAddress","type":"address"},{"indexed":false,"internalType":"address","name":"_newCeffuAddress","type":"address"}],"name":"SetCeffuAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_oldProtocolVaultAddress","type":"address"},{"indexed":false,"internalType":"address","name":"_newProtocolVaultAddress","type":"address"}],"name":"SetProtocolVaultAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_tokenHash","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"_allowed","type":"bool"}],"name":"SetRebalanceEnableToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"adapter","type":"address"}],"name":"VaultAdapterSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawFailed","type":"event"},{"inputs":[],"name":"BROKER_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CCTP_V2_FAST_MODEL","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CCTP_V2_NORMAL_MODEL","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SYMBOL_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"allowedToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"attemptTransferNative","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cctpFinalityThreshold","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cctpMaxFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_tokenHash","type":"bytes32"},{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"changeTokenAddressAndAllow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"crossChainManagerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"brokerHash","type":"bytes32"},{"internalType":"address","name":"delegateSigner","type":"address"}],"internalType":"struct VaultTypes.VaultDelegate","name":"data","type":"tuple"}],"name":"delegateSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"tradeId","type":"bytes32"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bytes32","name":"inTokenHash","type":"bytes32"},{"internalType":"uint256","name":"inTokenAmount","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"swapCalldata","type":"bytes"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"}],"internalType":"struct VaultTypes.DelegateSwap","name":"data","type":"tuple"}],"name":"delegateSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"tradeId","type":"bytes32"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bytes32","name":"inTokenHash","type":"bytes32"},{"internalType":"uint256","name":"inTokenAmount","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"swapCalldata","type":"bytes"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"}],"internalType":"struct VaultTypes.DelegateSwap","name":"data","type":"tuple"},{"internalType":"uint256","name":"expirationTimestamp","type":"uint256"}],"name":"delegateSwapWithExpiration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"accountId","type":"bytes32"},{"internalType":"bytes32","name":"brokerHash","type":"bytes32"},{"internalType":"bytes32","name":"tokenHash","type":"bytes32"},{"internalType":"uint128","name":"tokenAmount","type":"uint128"}],"internalType":"struct VaultTypes.VaultDepositFE","name":"data","type":"tuple"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"depositFeeEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositId","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"components":[{"internalType":"bytes32","name":"accountId","type":"bytes32"},{"internalType":"bytes32","name":"brokerHash","type":"bytes32"},{"internalType":"bytes32","name":"tokenHash","type":"bytes32"},{"internalType":"uint128","name":"tokenAmount","type":"uint128"}],"internalType":"struct VaultTypes.VaultDepositFE","name":"data","type":"tuple"}],"name":"depositTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_tokenHash","type":"bytes32"}],"name":"disableDepositToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyUnpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"enableDepositFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_tokenHash","type":"bytes32"}],"name":"enableDepositToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllAllowedBroker","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllAllowedToken","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllRebalanceEnableToken","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_brokerHash","type":"bytes32"}],"name":"getAllowedBroker","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_tokenHash","type":"bytes32"}],"name":"getAllowedToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"components":[{"internalType":"bytes32","name":"accountId","type":"bytes32"},{"internalType":"bytes32","name":"brokerHash","type":"bytes32"},{"internalType":"bytes32","name":"tokenHash","type":"bytes32"},{"internalType":"uint128","name":"tokenAmount","type":"uint128"}],"internalType":"struct VaultTypes.VaultDepositFE","name":"data","type":"tuple"}],"name":"getDepositFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDisabledDepositToken","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSubmittedSwaps","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"tradeId","type":"bytes32"}],"name":"isSwapSubmitted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messageTransmitterContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeTokenDepositLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeTokenHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolVault","outputs":[{"internalType":"contract IProtocolVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstDomain","type":"uint32"},{"internalType":"uint64","name":"rebalanceId","type":"uint64"},{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"bytes32","name":"tokenHash","type":"bytes32"},{"internalType":"uint256","name":"burnChainId","type":"uint256"},{"internalType":"uint256","name":"mintChainId","type":"uint256"},{"internalType":"address","name":"dstVaultAddress","type":"address"}],"internalType":"struct RebalanceTypes.RebalanceBurnCCData","name":"data","type":"tuple"}],"name":"rebalanceBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"rebalanceId","type":"uint64"},{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"bytes32","name":"tokenHash","type":"bytes32"},{"internalType":"uint256","name":"burnChainId","type":"uint256"},{"internalType":"uint256","name":"mintChainId","type":"uint256"},{"internalType":"bytes","name":"messageBytes","type":"bytes"},{"internalType":"bytes","name":"messageSignature","type":"bytes"}],"internalType":"struct RebalanceTypes.RebalanceMintCCData","name":"data","type":"tuple"}],"name":"rebalanceMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_brokerHash","type":"bytes32"},{"internalType":"bool","name":"_allowed","type":"bool"}],"name":"setAllowedBroker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_tokenHash","type":"bytes32"},{"internalType":"bool","name":"_allowed","type":"bool"}],"name":"setAllowedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"brokerHash","type":"bytes32"},{"internalType":"uint256","name":"dstChainId","type":"uint256"},{"internalType":"bool","name":"allowed","type":"bool"}],"internalType":"struct EventTypes.SetBrokerData","name":"data","type":"tuple"}],"name":"setBrokerFromLedger","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxFee","type":"uint256"},{"internalType":"uint32","name":"_finalityThreshold","type":"uint32"}],"name":"setCCTPConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_crossChainManagerAddress","type":"address"}],"name":"setCrossChainManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"setDepositLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nativeTokenDepositLimit","type":"uint256"}],"name":"setNativeTokenDepositLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_nativeTokenHash","type":"bytes32"}],"name":"setNativeTokenHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_protocolVaultAddress","type":"address"}],"name":"setProtocolVaultAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_tokenHash","type":"bytes32"},{"internalType":"bool","name":"_allowed","type":"bool"}],"name":"setRebalanceEnableToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rebalanceMessengerContract","type":"address"}],"name":"setRebalanceMessengerContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_swapOperator","type":"address"}],"name":"setSwapOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_swapSigner","type":"address"}],"name":"setSwapSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenMessengerContract","type":"address"}],"name":"setTokenMessengerContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vaultAdapter","type":"address"}],"name":"setVaultAdapter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapOperator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenAddress2DepositLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenMessengerContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vaultAdapter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"accountId","type":"bytes32"},{"internalType":"bytes32","name":"brokerHash","type":"bytes32"},{"internalType":"bytes32","name":"tokenHash","type":"bytes32"},{"internalType":"uint128","name":"tokenAmount","type":"uint128"},{"internalType":"uint128","name":"fee","type":"uint128"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint64","name":"withdrawNonce","type":"uint64"}],"internalType":"struct VaultTypes.VaultWithdraw","name":"data","type":"tuple"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"enum VaultTypes.VaultEnum","name":"vaultType","type":"uint8"},{"internalType":"bytes32","name":"accountId","type":"bytes32"},{"internalType":"bytes32","name":"brokerHash","type":"bytes32"},{"internalType":"bytes32","name":"tokenHash","type":"bytes32"},{"internalType":"uint128","name":"tokenAmount","type":"uint128"},{"internalType":"uint128","name":"fee","type":"uint128"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint64","name":"withdrawNonce","type":"uint64"},{"internalType":"uint256","name":"clientId","type":"uint256"}],"internalType":"struct VaultTypes.VaultWithdraw2Contract","name":"data","type":"tuple"}],"name":"withdraw2Contract","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
6080604052348015600e575f80fd5b5060156019565b60d3565b5f54610100900460ff161560835760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff9081161460d1575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b615af5806100e05f395ff3fe60806040526004361061044e575f3560e01c80638bc2714e11610237578063cb76efdf1161013c578063e6b40bf2116100b7578063f36a53f811610087578063f649e01b1161006d578063f649e01b14610ced578063fbe2eb0114610d0c578063fea65b4914610d21575f80fd5b8063f36a53f814610caf578063f58e138a14610cce575f80fd5b8063e6b40bf214610c43578063ec9cd71f14610c5c578063eeb97d1814610c7b578063f2fde38b14610c90575f80fd5b8063d515bb031161010c578063d6aeb431116100f2578063d6aeb43114610bf1578063df0f4ae714610c05578063e4a5b28714610c24575f80fd5b8063d515bb0314610bbd578063d547741f14610bd2575f80fd5b8063cb76efdf14610b41578063d2944d1714610b60578063d2c493fd14610b7f578063d2ca203814610b9e575f80fd5b8063a02a345e116101cc578063b182dc691161019c578063ba46a17711610182578063ba46a17714610af0578063c7eeb9c214610b03578063c9fc879714610b22575f80fd5b8063b182dc6914610ab2578063b1f6c86814610ad1575f80fd5b8063a02a345e14610a4c578063a217fddf14610a6b578063a9809cbc14610a7e578063b07cd8bd14610a9d575f80fd5b806394936b3d1161020757806394936b3d146109ba5780639852099c146109d957806398c2d08614610a195780639aff63d114610a38575f80fd5b80638bc2714e146109025780638da5cb5b1461092657806391d14854146109435780639305a91a146109a6575f80fd5b80633d8afb5311610357578063681d527c116102d257806374aeadc3116102a25780638129fc1c116102885780638129fc1c146108a4578063822a6572146108b85780638b5ce46d146108d7575f80fd5b806374aeadc31461087057806380ca29f414610885575f80fd5b8063681d527c146107ea5780636f2c0e151461081e578063715018a61461083d5780637227bcbc14610851575f80fd5b806351858e27116103275780635c975abb1161030d5780635c975abb146107955780635e1eb4ce146107ac5780635efc56c7146107cb575f80fd5b806351858e27146107625780635a9249e614610776575f80fd5b80633d8afb53146106e45780634428eaed1461071b5780634a4e3bd51461072f5780634b43ac4914610743575f80fd5b8063248a9ca3116103e75780632ef7664c116103b7578063301413481161039d5780633014134814610681578063322dda6d146106b257806336568abe146106c5575f80fd5b80632ef7664c146106435780632f2ff15d14610662575f80fd5b8063248a9ca314610589578063258082f5146105d6578063272d177d146106055780632df4869b14610624575f80fd5b8063150ad47111610422578063150ad471146104e35780631841af01146105045780631d6ba60d146105235780631e30726b14610556575f80fd5b806274f4191461045257806304b90bb714610484578063092dac19146104a557806311e2e8c2146104c4575b5f80fd5b34801561045d575f80fd5b5061047161046c36600461518e565b610d40565b6040519081526020015b60405180910390f35b34801561048f575f80fd5b506104a361049e3660046151c0565b610e65565b005b3480156104b0575f80fd5b506104a36104bf3660046151d9565b610e8f565b3480156104cf575f80fd5b506104a36104de3660046151f0565b610fa9565b3480156104ee575f80fd5b506104f761104f565b60405161047b9190615211565b34801561050f575f80fd5b506104a361051e366004615264565b611060565b34801561052e575f80fd5b506104717f5bafaa52d337b93938458f4eae175ab2d71e8c0b8a2a7755272d8e85dac43a0f81565b348015610561575f80fd5b506104717fd76356f7269540ce37ce4d52b405dbc27e3d523e623b1d6af55bb97c668c10ca81565b348015610594575f80fd5b506104716105a33660046151d9565b5f9081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b3480156105e1575f80fd5b506105f56105f03660046151d9565b61114e565b604051901515815260200161047b565b348015610610575f80fd5b506104a361061f3660046152a6565b61115a565b34801561062f575f80fd5b506104a361063e3660046152ce565b611238565b34801561064e575f80fd5b506104a361065d3660046152f4565b611349565b34801561066d575f80fd5b506104a361067c3660046151f0565b6113ca565b34801561068c575f80fd5b5060aa5461069d9063ffffffff1681565b60405163ffffffff909116815260200161047b565b6104a36106c0366004615322565b6113e1565b3480156106d0575f80fd5b506104a36106df3660046151f0565b61140d565b3480156106ef575f80fd5b50609e54610703906001600160a01b031681565b6040516001600160a01b03909116815260200161047b565b348015610726575f80fd5b506104f7611459565b34801561073a575f80fd5b506104a3611465565b34801561074e575f80fd5b5060ad54610703906001600160a01b031681565b34801561076d575f80fd5b506104a361147f565b348015610781575f80fd5b5060a054610703906001600160a01b031681565b3480156107a0575f80fd5b5060335460ff166105f5565b3480156107b7575f80fd5b506104a36107c63660046151c0565b611497565b3480156107d6575f80fd5b506104a36107e536600461533c565b611531565b3480156107f5575f80fd5b506107036108043660046151d9565b609c6020525f90815260409020546001600160a01b031681565b348015610829575f80fd5b5060a754610703906001600160a01b031681565b348015610848575f80fd5b506104a36115d8565b34801561085c575f80fd5b506104a361086b3660046151d9565b6115e9565b34801561087b575f80fd5b5061069d6103e881565b348015610890575f80fd5b506104a361089f3660046151c0565b61168c565b3480156108af575f80fd5b506104a36116b6565b3480156108c3575f80fd5b5060a854610703906001600160a01b031681565b3480156108e2575f80fd5b506104716108f13660046151c0565b609f6020525f908152604090205481565b34801561090d575f80fd5b50609d546107039061010090046001600160a01b031681565b348015610931575f80fd5b506065546001600160a01b0316610703565b34801561094e575f80fd5b506105f561095d3660046151f0565b5f9182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156109b1575f80fd5b506104f76117df565b3480156109c5575f80fd5b506104a36109d43660046151c0565b6117eb565b3480156109e4575f80fd5b50609754610a0090600160a01b900467ffffffffffffffff1681565b60405167ffffffffffffffff909116815260200161047b565b348015610a24575f80fd5b506104a3610a3336600461536e565b61183e565b348015610a43575f80fd5b506104f7611cdf565b348015610a57575f80fd5b506104a3610a66366004615380565b611ceb565b348015610a76575f80fd5b506104715f81565b348015610a89575f80fd5b506104a3610a983660046151c0565b611e7c565b348015610aa8575f80fd5b5061047160a45481565b348015610abd575f80fd5b50609754610703906001600160a01b031681565b348015610adc575f80fd5b506104a3610aeb3660046153a1565b611f16565b6104a3610afe36600461518e565b61223b565b348015610b0e575f80fd5b50610703610b1d3660046151d9565b612264565b348015610b2d575f80fd5b506104a3610b3c3660046152f4565b61229c565b348015610b4c575f80fd5b506104a3610b5b3660046153bb565b61237d565b348015610b6b575f80fd5b506104a3610b7a3660046153e9565b6123a0565b348015610b8a575f80fd5b506104a3610b9936600461540a565b612459565b348015610ba9575f80fd5b506104a3610bb83660046151c0565b612934565b348015610bc8575f80fd5b5061047160a35481565b348015610bdd575f80fd5b506104a3610bec3660046151f0565b6129b9565b348015610bfc575f80fd5b506104f76129c1565b348015610c10575f80fd5b506104a3610c1f3660046152f4565b6129cd565b348015610c2f575f80fd5b506105f5610c3e3660046151d9565b612ae6565b348015610c4e575f80fd5b50609d546105f59060ff1681565b348015610c67575f80fd5b506104a3610c763660046151d9565b612af2565b348015610c86575f80fd5b5061047160a95481565b348015610c9b575f80fd5b506104a3610caa3660046151c0565b612aff565b348015610cba575f80fd5b506104a3610cc93660046151d9565b612b8c565b348015610cd9575f80fd5b506104a3610ce83660046152a6565b612c24565b348015610cf8575f80fd5b506104a3610d073660046151c0565b612c86565b348015610d17575f80fd5b5061069d6107d081565b348015610d2c575f80fd5b506104a3610d3b36600461543c565b612cf6565b5f610d4b838361336c565b5f6040518060c00160405280845f01358152602001856001600160a01b031681526020018460200135815260200184604001358152602001846060016020810190610d96919061546d565b6001600160801b03168152609754602090910190610dc690600160a01b900467ffffffffffffffff16600161549a565b67ffffffffffffffff1690526097546040517f2690952b0000000000000000000000000000000000000000000000000000000081529192506001600160a01b031690632690952b90610e1c9084906004016154ba565b602060405180830381865afa158015610e37573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e5b9190615519565b9150505b92915050565b610e6d61351c565b60a780546001600160a01b0319166001600160a01b0392909216919091179055565b335f9081527f1a448ce734f8fc2bafc952eed975fe4d38808797a808cf3d7766f56ed14ba7f360205260409020547fd76356f7269540ce37ce4d52b405dbc27e3d523e623b1d6af55bb97c668c10ca9060ff16158015610efa57506065546001600160a01b03163314155b15610f265760405163e2517d3f60e01b8152336004820152602481018290526044015b60405180910390fd5b610f31609a83613576565b610f4e5760405163514e24c360e11b815260040160405180910390fd5b5f610f5a60ab84613590565b905080610f7a5760405163a65b249b60e01b815260040160405180910390fd5b60405183907f417f8dd3a7e0aeca3a29e55eefbd9dfd5f51bfea929b3fb33539fe57030e993f905f90a2505050565b610fb161351c565b806001600160a01b038116610fd957604051639fabe1c160e01b815260040160405180910390fd5b5f838152609c6020526040902080546001600160a01b0319166001600160a01b03841617905561100a609a84613590565b506040516001600160a01b038316815283907fdd5c3f86e468e8e3d0da2fcfd07779497eec7c153f181f4859a704d66e2444f8906020015b60405180910390a2505050565b606061105b60ab61359b565b905090565b6110686135a7565b60a7546001600160a01b031633146110cd5760405162461bcd60e51b815260206004820152602260248201527f5661756c743a204f6e6c792073776170206f70657261746f722063616e2063616044820152611b1b60f21b6064820152608401610f1d565b6110d56135fa565b80421115611118576040517f4e26543a00000000000000000000000000000000000000000000000000000000815260048101829052426024820152604401610f1d565b6111218261365d565b61114a60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5050565b5f610e5f609883613576565b335f9081527f1a448ce734f8fc2bafc952eed975fe4d38808797a808cf3d7766f56ed14ba7f360205260409020547fd76356f7269540ce37ce4d52b405dbc27e3d523e623b1d6af55bb97c668c10ca9060ff161580156111c557506065546001600160a01b03163314155b156111ec5760405163e2517d3f60e01b815233600482015260248101829052604401610f1d565b6001600160a01b0383165f818152609f602052604090819020849055517f5e93e2a54705c57ed67fc9650a3b1753179b163ce4881d3964205a708eaef2fc906110429085815260200190565b333b5f03611272576040517f30773dbb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61128260408201602083016151c0565b6001600160a01b03163b156112c3576040517f623793c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112cf60988235613576565b6112ec576040516359d9b86360e01b815260040160405180910390fd5b6112fc60408201602083016151c0565b604080514681524360208201526001600160a01b03929092169183359133917f1e236eed9d7e9ca81e25a438791ca7f69cf43cdcc537a0fd4f74f0697da0460b910160405180910390a450565b61135161351c565b5f811561136a5761136360a184613590565b9050611378565b61137560a184613843565b90505b806113965760405163a65b249b60e01b815260040160405180910390fd5b827f0a189b5878f2d02888fa70a7a78ab12badfddc55f3082c424820d3215a35d05883604051611042911515815260200190565b6113d261351c565b6113dc828261384e565b505050565b6113e96135a7565b60a354816040013503611403576114003382613904565b50565b6114003382613bfc565b6001600160a01b038116331461144f576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113dc8282613f1a565b606061105b60a561359b565b61146d613fbe565b61147561351c565b61147d614010565b565b6114876135a7565b61148f61351c565b61147d614062565b61149f61351c565b806001600160a01b0381166114c757604051639fabe1c160e01b815260040160405180910390fd5b609754604080516001600160a01b03928316815291841660208301527f171f28064de7df65eb845ec06e0161ab312efa47a10fee262fab3dac2f33e80a910160405180910390a150609780546001600160a01b0319166001600160a01b0392909216919091179055565b6115396135a7565b60a7546001600160a01b0316331461159e5760405162461bcd60e51b815260206004820152602260248201527f5661756c743a204f6e6c792073776170206f70657261746f722063616e2063616044820152611b1b60f21b6064820152608401610f1d565b6115a66135fa565b6115af8161365d565b61140060017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b6115e061351c565b61147d5f61409f565b6115f161351c565b6115fc60ab82613576565b611632576040517fdcbe342100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61163e60ab83613843565b90508061165e5760405163a65b249b60e01b815260040160405180910390fd5b60405182907f15528aab2653148a39115365e6f12aad15940c754e9e35bd1f8c0dce70ac032d905f90a25050565b61169461351c565b60a880546001600160a01b0319166001600160a01b0392909216919091179055565b5f54610100900460ff16158080156116d457505f54600160ff909116105b806116ed5750303b1580156116ed57505f5460ff166001145b61175f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610f1d565b5f805460ff191660011790558015611780575f805461ff0019166101001790555b6117886140f0565b611790614162565b6117986141d4565b8015611400575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b606061105b609a61359b565b6117f361351c565b806001600160a01b03811661181b57604051639fabe1c160e01b815260040160405180910390fd5b50609e80546001600160a01b0319166001600160a01b0392909216919091179055565b6097546001600160a01b031633146118695760405163833d33e760e01b815260040160405180910390fd5b6118716135a7565b609754604051634c61684360e11b81526001600160a01b03909116906398c2d086906118a1908490600401615547565b5f604051808303815f87803b1580156118b8575f80fd5b505af11580156118ca573d5f803e3d5ffd5b506118df9250505060a082016080830161546d565b6001600160801b03166118f8608083016060840161546d565b6001600160801b0316116119745760405162461bcd60e51b815260206004820152602a60248201527f77697468647261773a206665652069732067726561746572207468616e20746f60448201527f6b656e20616d6f756e74000000000000000000000000000000000000000000006064820152608401610f1d565b5f61198560a083016080840161546d565b611995608084016060850161546d565b61199f91906155ed565b905060a354826040013503611a8b573063f58e138a6119c460e0850160c086016151c0565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526001600160801b03841660248201526044015f604051808303815f87803b158015611a11575f80fd5b505af1925050508015611a22575060015b611a8657611a3660e0830160c084016151c0565b6040516001600160801b03831681526001600160a01b0391909116905f907f53d65f1c22313c10a5012cd91dc9444f0f6dd09d7887d1a8894a2f4dbae84e149060200160405180910390a3611c0b565b611c0b565b6040828101355f908152609c6020528190205490516370a0823160e01b81523060048201526001600160a01b03909116906001600160801b0383169082906370a0823190602401602060405180830381865afa158015611aed573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b119190615519565b1015611b5f5760405162461bcd60e51b815260206004820152601e60248201527f77697468647261773a20696e73756666696369656e742062616c616e636500006044820152606401610f1d565b611b78611b7260e0850160c086016151c0565b82614246565b611bdc57611b8c60e0840160c085016151c0565b6040516001600160801b03841681526001600160a01b03918216918316907f53d65f1c22313c10a5012cd91dc9444f0f6dd09d7887d1a8894a2f4dbae84e149060200160405180910390a3611c09565b611c09611bef60e0850160c086016151c0565b6001600160a01b038316906001600160801b03851661427a565b505b611c1c610100830160e0840161560c565b67ffffffffffffffff1682357f732a6fe7863c74cbd74d2f2b1e3c27304465e354a9d38f03bf10c8436a70aa276020850135611c5e60c0870160a088016151c0565b611c6e60e0880160c089016151c0565b6040880135611c8360808a0160608b0161546d565b611c9360a08b0160808c0161546d565b604080519687526001600160a01b039586166020880152949093169385019390935260608401526001600160801b0391821660808401521660a082015260c00160405180910390a35050565b606061105b60a161359b565b6097546001600160a01b03163314611d165760405163833d33e760e01b815260040160405180910390fd5b46816020013514611d695760405162461bcd60e51b815260206004820152601a60248201527f5661756c743a20647374436861696e4964206d69736d617463680000000000006044820152606401610f1d565b5f611d7660988335613576565b9050611d8860608301604084016153bb565b15611df9578015611de75781357f8c11dfa3b29c25072fa5975887ad1798f81a4ba366cab8aa3203073a73e2d80a6020840135611dcb60608601604087016153bb565b6040805192835290151560208301520160405180910390a25050565b611df360988335613590565b50611e44565b80611e365781357f8c11dfa3b29c25072fa5975887ad1798f81a4ba366cab8aa3203073a73e2d80a6020840135611dcb60608601604087016153bb565b611e4260988335613843565b505b81357f027e4cd65dd9f222a5ff31529c61f9b02b3f6d0a7e688ea7db2ead8dbc0da6a06020840135611dcb60608601604087016153bb565b611e8461351c565b806001600160a01b038116611eac57604051639fabe1c160e01b815260040160405180910390fd5b60a054604080516001600160a01b03928316815291841660208301527f4bb8c4ef110887028d1717e548739a084de305c2b08cb6d4d3ed9b659f688aef910160405180910390a15060a080546001600160a01b0319166001600160a01b0392909216919091179055565b6097546001600160a01b03163314611f415760405163833d33e760e01b815260040160405180910390fd5b60608101355f908152609c60205260409020546001600160a01b031680611f7b57604051639fabe1c160e01b815260040160405180910390fd5b611f8a60a16060840135613576565b611fa7576040516356b3a57360e11b815260040160405180910390fd5b609d546001600160a01b038083169163095ea7b39161010090910416611fd3606086016040870161546d565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526001600160801b031660248201526044016020604051808303815f875af1158015612024573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120489190615625565b50609d5461010090046001600160a01b0316638e0250ee61206f606085016040860161546d565b61207c6020860186615640565b61209461208f60e0880160c089016151c0565b61430b565b856120a861208f60e08a0160c08b016151c0565b60a95460aa5460405160e089901b6001600160e01b03191681526001600160801b03909716600488015263ffffffff958616602488015260448701949094526001600160a01b039092166064860152608485015260a48401521660c482015260e4015f604051808303815f87803b158015612121575f80fd5b505af1925050508015612132575060015b612203576097546040805160c0810182525f81526001600160a01b0390921691633a8c58999160208083019161216d9190880190880161560c565b67ffffffffffffffff16815260200161218c606087016040880161546d565b6001600160801b0316815260200185606001358152602001856080013581526020018560a001358152506040518263ffffffff1660e01b81526004016121d29190615659565b5f604051808303815f87803b1580156121e9575f80fd5b505af11580156121fb573d5f803e3d5ffd5b505050505050565b6097546040805160c081018252600181526001600160a01b0390921691633a8c58999160208083019161216d9190880190880161560c565b6122436135a7565b60a35481604001350361225a5761114a8282613904565b61114a8282613bfc565b5f612270609a83613576565b1561229057505f908152609c60205260409020546001600160a01b031690565b505f919050565b919050565b6122a461351c565b5f8115612301575f838152609c60205260409020546001600160a01b03161580156122d1575060a3548314155b156122ef57604051639fabe1c160e01b815260040160405180910390fd5b6122fa609a84613590565b905061232b565b61230c609a84613843565b905061231960ab84613576565b1561232b5761232960ab84613843565b505b806123495760405163a65b249b60e01b815260040160405180910390fd5b827f75982e4722797db7bbfd209216413b5edd134de5cd687de171dd12deeee642ff83604051611042911515815260200190565b61238561351c565b61238d6135a7565b609d805460ff1916911515919091179055565b6123a861351c565b60a982905563ffffffff81166103e814806123ca575063ffffffff81166107d0145b61243c5760405162461bcd60e51b815260206004820152602960248201527f73657443435450436f6e6669673a20696e76616c69642066696e616c6974792060448201527f7468726573686f6c6400000000000000000000000000000000000000000000006064820152608401610f1d565b60aa805463ffffffff191663ffffffff9290921691909117905550565b6097546001600160a01b031633146124845760405163833d33e760e01b815260040160405180910390fd5b6040808201355f908152609c60205220546001600160a01b0316806124bc57604051639fabe1c160e01b815260040160405180910390fd5b6124cb60a16040840135613576565b6124e8576040516356b3a57360e11b815260040160405180910390fd5b6040516370a0823160e01b81523060048201525f906001600160a01b038316906370a0823190602401602060405180830381865afa15801561252c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125509190615519565b609e549091506001600160a01b03166357ecfd2861257160a08601866156b1565b61257e60c08801886156b1565b6040518563ffffffff1660e01b815260040161259d9493929190615723565b5f604051808303815f87803b1580156125b4575f80fd5b505af19250505080156125c5575060015b612755576125d1615749565b806308c379a00361274b57506125e561579b565b806125f0575061274d565b5f6040518060400160405280601281526020017f4e6f6e636520616c72656164792075736564000000000000000000000000000081525090505f8160405160200161263b9190615836565b60405160208183030381529060405280519060200120836040516020016126629190615836565b60408051601f19818403018152828252805160209182012060975460c085019093529390931480835293506001600160a01b0316916358a126709190818101906126ae908b018b61560c565b67ffffffffffffffff1681526020018960200160208101906126d0919061546d565b6001600160801b03168152602001896040013581526020018960600135815260200189608001358152506040518263ffffffff1660e01b81526004016127169190615659565b5f604051808303815f87803b15801561272d575f80fd5b505af115801561273f573d5f803e3d5ffd5b50505050505050505050565b505b3d5f803e3d5ffd5b6040516370a0823160e01b81523060048201525f906001600160a01b038416906370a0823190602401602060405180830381865afa158015612799573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127bd9190615519565b90505f6127ca8383615841565b60aa5490915063ffffffff166107cf190161286c576127ef604086016020870161546d565b6001600160801b0316811461286c5760405162461bcd60e51b815260206004820152602f60248201527f726562616c616e63654d696e743a206d696e74656420616d6f756e74206c657360448201527f73207468616e20657870656374656400000000000000000000000000000000006064820152608401610f1d565b6097546040805160c08101909152600181526001600160a01b03909116906358a12670906020808201906128a2908a018a61560c565b67ffffffffffffffff1681526020016128ba85614339565b6001600160801b03168152602001886040013581526020018860600135815260200188608001358152506040518263ffffffff1660e01b81526004016129009190615659565b5f604051808303815f87803b158015612917575f80fd5b505af1158015612929573d5f803e3d5ffd5b505050505050505050565b61293c61351c565b806001600160a01b03811661296457604051639fabe1c160e01b815260040160405180910390fd5b60ad80546001600160a01b0319166001600160a01b0384169081179091556040519081527fafd97b3f968da28dbbbda91d687a091910064177f0280798e8d856b23a4858349060200160405180910390a15050565b61144f61351c565b606061105b609861359b565b335f9081527f0bf91477422a066ca8ed18eac669f5e3f374baa39c6c763ac707e6bf753b916560205260409020547f5bafaa52d337b93938458f4eae175ab2d71e8c0b8a2a7755272d8e85dac43a0f9060ff16158015612a3857506065546001600160a01b03163314155b15612a5f5760405163e2517d3f60e01b815233600482015260248101829052604401610f1d565b5f8215612a7857612a71609885613590565b9050612a86565b612a83609885613843565b90505b80612aa45760405163a65b249b60e01b815260040160405180910390fd5b837fe2004c296ac9fa6b9b57d55d8bbe257982d1111c229081bb672d5ddbec7f260684604051612ad8911515815260200190565b60405180910390a250505050565b5f610e5f60a583613576565b612afa61351c565b60a355565b612b0761351c565b6001600160a01b038116612b835760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610f1d565b6114008161409f565b335f9081527f1a448ce734f8fc2bafc952eed975fe4d38808797a808cf3d7766f56ed14ba7f360205260409020547fd76356f7269540ce37ce4d52b405dbc27e3d523e623b1d6af55bb97c668c10ca9060ff16158015612bf757506065546001600160a01b03163314155b15612c1e5760405163e2517d3f60e01b815233600482015260248101829052604401610f1d565b5060a455565b333014612c735760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c79207468697320636f6e74726163742063616e2063616c6c00000000006044820152606401610f1d565b61114a6001600160a01b038316826143bb565b612c8e61351c565b806001600160a01b038116612cb657604051639fabe1c160e01b815260040160405180910390fd5b50609d80546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b6097546001600160a01b03163314612d215760405163833d33e760e01b815260040160405180910390fd5b612d296135a7565b5f604051806101000160405280836020013581526020018360400135815260200183606001358152602001836080016020810190612d67919061546d565b6001600160801b03168152602001612d8560c0850160a0860161546d565b6001600160801b03168152602001612da360e0850160c086016151c0565b6001600160a01b03168152602001612dc2610100850160e086016151c0565b6001600160a01b03168152602001612de26101208501610100860161560c565b67ffffffffffffffff169052609754604051634c61684360e11b81529192506001600160a01b0316906398c2d08690612e1f908490600401615854565b5f604051808303815f87803b158015612e36575f80fd5b505af1158015612e48573d5f803e3d5ffd5b50612e5d9250505060c0830160a0840161546d565b6001600160801b0316612e7660a084016080850161546d565b6001600160801b031611612ef25760405162461bcd60e51b815260206004820152603360248201527f776974686472617732436f6e74726163743a206665652069732067726561746560448201527f72207468616e20746f6b656e20616d6f756e74000000000000000000000000006064820152608401610f1d565b5f612f0360c0840160a0850161546d565b612f1360a085016080860161546d565b612f1d91906155ed565b905060a35483606001350361300b573063f58e138a612f43610100860160e087016151c0565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526001600160801b03841660248201526044015f604051808303815f87803b158015612f90575f80fd5b505af1925050508015612fa1575060015b61300657612fb6610100840160e085016151c0565b6040516001600160801b03831681526001600160a01b0391909116905f907f53d65f1c22313c10a5012cd91dc9444f0f6dd09d7887d1a8894a2f4dbae84e149060200160405180910390a3613292565b613292565b60608301355f908152609c6020526040908190205490516370a0823160e01b81523060048201526001600160a01b03909116906001600160801b0383169082906370a0823190602401602060405180830381865afa15801561306f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906130939190615519565b10156130e15760405162461bcd60e51b815260206004820152601b60248201527f5661756c743a20696e73756666696369656e742062616c616e636500000000006044820152606401610f1d565b6130f5611b72610100860160e087016151c0565b61315a5761310a610100850160e086016151c0565b6040516001600160801b03841681526001600160a01b03918216918316907f53d65f1c22313c10a5012cd91dc9444f0f6dd09d7887d1a8894a2f4dbae84e149060200160405180910390a3613290565b5f61316860208601866158f7565b6002811115613179576131796158e3565b03613257576131ac613192610100860160e087016151c0565b6001600160a01b038316906001600160801b0385166144d0565b6131bd610100850160e086016151c0565b604080517fa064296b00000000000000000000000000000000000000000000000000000000815261012087013560048201529086013560248201526001600160a01b0383811660448301526001600160801b0385166064830152919091169063a064296b906084015f604051808303815f87803b15801561323c575f80fd5b505af115801561324e573d5f803e3d5ffd5b50505050613290565b600261326660208601866158f7565b6002811115613277576132776158e3565b0361329057613290611bef610100860160e087016151c0565b505b6132a46101208401610100850161560c565b67ffffffffffffffff1660208401357f732a6fe7863c74cbd74d2f2b1e3c27304465e354a9d38f03bf10c8436a70aa2760408601356132e960e0880160c089016151c0565b6132fa610100890160e08a016151c0565b606089013561330f60a08b0160808c0161546d565b61331f60c08c0160a08d0161546d565b604080519687526001600160a01b039586166020880152949093169385019390935260608401526001600160801b0391821660808401521660a082015260c00160405180910390a3505050565b604081013561337c609a82613576565b6133995760405163514e24c360e11b815260040160405180910390fd5b6133a460ab82613576565b156133db576040517f2bdd210700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60a354811415801561340157505f818152609c60205260409020546001600160a01b0316155b1561341f57604051630f58058360e11b815260040160405180910390fd5b61342e60986020840135613576565b61344b576040516359d9b86360e01b815260040160405180910390fd5b60ad546001600160a01b031633146134cb57604080516001600160a01b0385166020828101919091528085013582840152825180830384018152606090920190925280519101208235146134cb576040517fc7ee9ce600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6134db608083016060840161546d565b6001600160801b03165f036113dc576040517f56316e8700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6065546001600160a01b0316331461147d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f1d565b5f81815260018301602052604081205415155b9392505050565b5f613589838361461c565b60605f61358983614668565b60335460ff161561147d5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610f1d565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901613657576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b613666816146c1565b61367260a58235613590565b5060a3548160400135146136c6576040808201355f908152609c60205220546001600160a01b0316806136c36136ae60a08501608086016151c0565b6001600160a01b0383169060608601356144d0565b50505b5f60a3548260400135036136db575060a08101355b5f806136ed60a08501608086016151c0565b6001600160a01b03168361370460c08701876156b1565b604051613712929190615915565b5f6040518083038185875af1925050503d805f811461374c576040519150601f19603f3d011682016040523d82523d5f602084013e613751565b606091505b50915091508161376357805160208201fd5b60a3548460400135146137b2576040808501355f908152609c60205220546001600160a01b0316806137af61379e60a08801608089016151c0565b6001600160a01b038316905f6144d0565b50505b83357f8547134a897aa2cdae5a6b87fe6e6bdc56bc90996de46cb8ef405a5779fef736604086013560608701356137ef60a0890160808a016151c0565b6040805193845260208401929092526001600160a01b03169082015260a08701356060820152608001612ad8565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f613589838361477a565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff166138f4575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916600117905551339287917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a46001915050610e5f565b5f915050610e5f565b5092915050565b61390e828261336c565b5f61391834614339565b905061392a608083016060840161546d565b6001600160801b0316816001600160801b03161015613975576040517ffa7c753700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60a454158015906139be575060a4546001600160801b0382164761399f608086016060870161546d565b6001600160801b03166139b29190615924565b6139bc9190615841565b115b156139dc5760405163365a77c960e21b815260040160405180910390fd5b5f6040518060c00160405280845f01358152602001856001600160a01b031681526020018460200135815260200184604001358152602001846060016020810190613a27919061546d565b6001600160801b03168152602001613a3d614854565b67ffffffffffffffff16905290505f613a5c608085016060860161546d565b613a6690846155ed565b609d546001600160801b0391909116915060ff1615613b0657805f03613a9f576040516393d3bb4d60e01b815260040160405180910390fd5b609754604051632322e4b160e11b81526001600160a01b0390911690634645c962908390613ad39033908790600401615937565b5f604051808303818588803b158015613aea575f80fd5b505af1158015613afc573d5f803e3d5ffd5b5050505050613b64565b609754604051630a8f0d0760e41b81526001600160a01b039091169063a8f0d07090613b369085906004016154ba565b5f604051808303815f87803b158015613b4d575f80fd5b505af1158015613b5f573d5f803e3d5ffd5b505050505b6097546001600160a01b038616906020860135908635907fc5429babd1ad36d726eaa90564d64e1ce3b7f4b9a3d3d3c9eead1ab7dc1afa2e90600160a01b900467ffffffffffffffff166040890135613bc360808b0160608c0161546d565b6040805167ffffffffffffffff909416845260208401929092526001600160801b03169082015260600160405180910390a45050505050565b613c06828261336c565b6040808201355f908152609c6020908152828220546001600160a01b0316808352609f9091529190205415801590613cd557506001600160a01b0381165f818152609f6020526040908190205490516370a0823160e01b81523060048201529091906370a0823190602401602060405180830381865afa158015613c8c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613cb09190615519565b613cc0608085016060860161546d565b6001600160801b0316613cd39190615924565b115b15613cf35760405163365a77c960e21b815260040160405180910390fd5b613d233330613d08608086016060870161546d565b6001600160a01b0385169291906001600160801b03166148a1565b5f6040518060c00160405280845f01358152602001856001600160a01b031681526020018460200135815260200184604001358152602001846060016020810190613d6e919061546d565b6001600160801b03168152602001613d84614854565b67ffffffffffffffff169052609d5490915060ff1615613e2557345f03613dbe576040516393d3bb4d60e01b815260040160405180910390fd5b609754604051632322e4b160e11b81526001600160a01b0390911690634645c962903490613df29033908690600401615937565b5f604051808303818588803b158015613e09575f80fd5b505af1158015613e1b573d5f803e3d5ffd5b5050505050613e83565b609754604051630a8f0d0760e41b81526001600160a01b039091169063a8f0d07090613e559084906004016154ba565b5f604051808303815f87803b158015613e6c575f80fd5b505af1158015613e7e573d5f803e3d5ffd5b505050505b6097546001600160a01b038516906020850135908535907fc5429babd1ad36d726eaa90564d64e1ce3b7f4b9a3d3d3c9eead1ab7dc1afa2e90600160a01b900467ffffffffffffffff166040880135613ee260808a0160608b0161546d565b6040805167ffffffffffffffff909416845260208401929092526001600160801b03169082015260600160405180910390a450505050565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff16156138f4575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610e5f565b60335460ff1661147d5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610f1d565b614018613fbe565b6033805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b61406a6135a7565b6033805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586140453390565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff1661415a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610f1d565b61147d6148f8565b5f54610100900460ff166141cc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610f1d565b61147d61496b565b5f54610100900460ff1661423e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610f1d565b61147d6149e1565b5f6001600160a01b03831661425c57505f610e5f565b6142668383614a4b565b1561427257505f610e5f565b506001610e5f565b6040516001600160a01b0383166024820152604481018290526113dc9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152614b4b565b604080516001600160a01b03831660208201525f9101604051602081830303815290604052610e5f906159a5565b5f6001600160801b038211156143b75760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610f1d565b5090565b8047101561440b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610f1d565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114614454576040519150601f19603f3d011682016040523d82523d5f602084013e614459565b606091505b50509050806113dc5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610f1d565b80158061456157506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa15801561453b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061455f9190615519565b155b6145d35760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610f1d565b6040516001600160a01b0383166024820152604481018290526113dc9084907f095ea7b300000000000000000000000000000000000000000000000000000000906064016142bf565b5f81815260018301602052604081205461466157508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610e5f565b505f610e5f565b6060815f018054806020026020016040519081016040528092919081815260200182805480156146b557602002820191905f5260205f20905b8154815260200190600101908083116146a1575b50505050509050919050565b6146cd60a58235613576565b15614704576040517f0b69314400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040810135614714609a82613576565b6147315760405163514e24c360e11b815260040160405180910390fd5b60a3548114614771575f818152609c60205260409020546001600160a01b03168061476f57604051630f58058360e11b815260040160405180910390fd5b505b61114a82614c2f565b5f81815260018301602052604081205480156138f4575f61479c600183615841565b85549091505f906147af90600190615841565b905081811461480e575f865f0182815481106147cd576147cd6159c8565b905f5260205f200154905080875f0184815481106147ed576147ed6159c8565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061481f5761481f6159dc565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610e5f565b5f6097601481819054906101000a900467ffffffffffffffff16614877906159f0565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055905090565b6040516001600160a01b03808516602483015283166044820152606481018290526148f29085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016142bf565b50505050565b5f54610100900460ff166149625760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610f1d565b61147d3361409f565b5f54610100900460ff166149d55760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610f1d565b6033805460ff19169055565b5f54610100900460ff1661381d5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610f1d565b6040516001600160a01b03831660248201525f90819060440160408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167ffe575a8700000000000000000000000000000000000000000000000000000000179052519091505f9081906001600160a01b03861690614ada908590615836565b5f60405180830381855afa9150503d805f8114614b12576040519150601f19603f3d011682016040523d82523d5f602084013e614b17565b606091505b50915091508115614b405780806020019051810190614b369190615625565b9350505050610e5f565b5f9350505050610e5f565b5f614b9f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614c7b9092919063ffffffff16565b8051909150156113dc5780806020019051810190614bbd9190615625565b6113dc5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610f1d565b60a854614c45906001600160a01b031682614c91565b611400576040517f06a0cf4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060614c8984845f85614d8b565b949350505050565b5f8082354660408501356060860135614cb060a08801608089016151c0565b60a0880135614cc260c08a018a6156b1565b604051602001614cd9989796959493929190615a1c565b60405160208183030381529060405290505f614d4882805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018290525f90605c01604051602081830303815290604052805190602001209050919050565b90505f614d7182614d6161014088016101208901615a6a565b8760e00135886101000135614e79565b6001600160a01b0390811690871614935050505092915050565b606082471015614e035760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610f1d565b5f80866001600160a01b03168587604051614e1e9190615836565b5f6040518083038185875af1925050503d805f8114614e58576040519150601f19603f3d011682016040523d82523d5f602084013e614e5d565b606091505b5091509150614e6e87838387614e9f565b979650505050505050565b5f805f614e8887878787614f17565b91509150614e9581614fd4565b5095945050505050565b60608315614f0d5782515f03614f06576001600160a01b0385163b614f065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610f1d565b5081614c89565b614c898383615138565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115614f4c57505f90506003614fcb565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614f9d573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116614fc5575f60019250925050614fcb565b91505f90505b94509492505050565b5f816004811115614fe757614fe76158e3565b03614fef5750565b6001816004811115615003576150036158e3565b036150505760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610f1d565b6002816004811115615064576150646158e3565b036150b15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610f1d565b60038160048111156150c5576150c56158e3565b036114005760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610f1d565b8151156151485781518083602001fd5b8060405162461bcd60e51b8152600401610f1d9190615a8a565b80356001600160a01b0381168114612297575f80fd5b5f60808284031215615188575f80fd5b50919050565b5f8060a0838503121561519f575f80fd5b6151a883615162565b91506151b78460208501615178565b90509250929050565b5f602082840312156151d0575f80fd5b61358982615162565b5f602082840312156151e9575f80fd5b5035919050565b5f8060408385031215615201575f80fd5b823591506151b760208401615162565b602080825282518282018190525f918401906040840190835b8181101561524857835183526020938401939092019160010161522a565b509095945050505050565b5f6101408284031215615188575f80fd5b5f8060408385031215615275575f80fd5b823567ffffffffffffffff81111561528b575f80fd5b61529785828601615253565b95602094909401359450505050565b5f80604083850312156152b7575f80fd5b6152c083615162565b946020939093013593505050565b5f60408284031280156152df575f80fd5b509092915050565b8015158114611400575f80fd5b5f8060408385031215615305575f80fd5b823591506020830135615317816152e7565b809150509250929050565b5f60808284031215615332575f80fd5b6135898383615178565b5f6020828403121561534c575f80fd5b813567ffffffffffffffff811115615362575f80fd5b610e5b84828501615253565b5f6101008284031280156152df575f80fd5b5f60608284031280156152df575f80fd5b5f60e08284031215615188575f80fd5b5f60e082840312156153b1575f80fd5b6135898383615391565b5f602082840312156153cb575f80fd5b8135613589816152e7565b803563ffffffff81168114612297575f80fd5b5f80604083850312156153fa575f80fd5b823591506151b7602084016153d6565b5f6020828403121561541a575f80fd5b813567ffffffffffffffff811115615430575f80fd5b610e5b84828501615391565b5f610140828403121561544d575f80fd5b6135898383615253565b80356001600160801b0381168114612297575f80fd5b5f6020828403121561547d575f80fd5b61358982615457565b634e487b7160e01b5f52601160045260245ffd5b67ffffffffffffffff8181168382160190811115610e5f57610e5f615486565b60c08101610e5f8284805182526001600160a01b03602082015116602083015260408101516040830152606081015160608301526001600160801b03608082015116608083015267ffffffffffffffff60a08201511660a08301525050565b5f60208284031215615529575f80fd5b5051919050565b803567ffffffffffffffff81168114612297575f80fd5b81358152602080830135908201526040808301359082015261010081016001600160801b0361557860608501615457565b1660608301526001600160801b0361559260808501615457565b1660808301526001600160a01b036155ac60a08501615162565b1660a08301526155be60c08401615162565b6001600160a01b031660c08301526155d860e08401615530565b67ffffffffffffffff811660e08401526138fd565b6001600160801b038281168282160390811115610e5f57610e5f615486565b5f6020828403121561561c575f80fd5b61358982615530565b5f60208284031215615635575f80fd5b8151613589816152e7565b5f60208284031215615650575f80fd5b613589826153d6565b60c08101610e5f828480511515825267ffffffffffffffff60208201511660208301526001600160801b036040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b5f808335601e198436030181126156c6575f80fd5b83018035915067ffffffffffffffff8211156156e0575f80fd5b6020019150368190038213156156f4575f80fd5b9250929050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b604081525f6157366040830186886156fb565b8281036020840152614e6e8185876156fb565b5f60033d111561575f5760045f803e505f5160e01c5b90565b601f8201601f1916810167ffffffffffffffff8111828210171561579457634e487b7160e01b5f52604160045260245ffd5b6040525050565b5f60443d10156157a85790565b6040513d600319016004823e80513d602482011167ffffffffffffffff821117156157d257505090565b808201805167ffffffffffffffff8111156157ee575050505090565b3d8401600319018282016020011115615808575050505090565b61581760208285010185615762565b509392505050565b5f81518060208401855e5f93019283525090919050565b5f613589828461581f565b81810381811115610e5f57610e5f615486565b5f610100820190508251825260208301516020830152604083015160408301526001600160801b0360608401511660608301526001600160801b0360808401511660808301526001600160a01b0360a08401511660a083015260c08301516158c760c08401826001600160a01b03169052565b5060e08301516138fd60e084018267ffffffffffffffff169052565b634e487b7160e01b5f52602160045260245ffd5b5f60208284031215615907575f80fd5b813560038110613589575f80fd5b818382375f9101908152919050565b80820180821115610e5f57610e5f615486565b6001600160a01b038316815260e081016135896020830184805182526001600160a01b03602082015116602083015260408101516040830152606081015160608301526001600160801b03608082015116608083015267ffffffffffffffff60a08201511660a08301525050565b80516020808301519190811015615188575f1960209190910360031b1b16919050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b5f67ffffffffffffffff821667ffffffffffffffff8103615a1357615a13615486565b60010192915050565b8881528760208201528660408201528560608201526001600160a01b03851660808201528360a082015260e060c08201525f615a5c60e0830184866156fb565b9a9950505050505050505050565b5f60208284031215615a7a575f80fd5b813560ff81168114613589575f80fd5b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f8301168401019150509291505056fea2646970667358221220099564db2775aedbeb8b2e473e9e423320f79ef68f13733b813b171324efeb1e64736f6c634300081a0033
Deployed Bytecode
0x60806040526004361061044e575f3560e01c80638bc2714e11610237578063cb76efdf1161013c578063e6b40bf2116100b7578063f36a53f811610087578063f649e01b1161006d578063f649e01b14610ced578063fbe2eb0114610d0c578063fea65b4914610d21575f80fd5b8063f36a53f814610caf578063f58e138a14610cce575f80fd5b8063e6b40bf214610c43578063ec9cd71f14610c5c578063eeb97d1814610c7b578063f2fde38b14610c90575f80fd5b8063d515bb031161010c578063d6aeb431116100f2578063d6aeb43114610bf1578063df0f4ae714610c05578063e4a5b28714610c24575f80fd5b8063d515bb0314610bbd578063d547741f14610bd2575f80fd5b8063cb76efdf14610b41578063d2944d1714610b60578063d2c493fd14610b7f578063d2ca203814610b9e575f80fd5b8063a02a345e116101cc578063b182dc691161019c578063ba46a17711610182578063ba46a17714610af0578063c7eeb9c214610b03578063c9fc879714610b22575f80fd5b8063b182dc6914610ab2578063b1f6c86814610ad1575f80fd5b8063a02a345e14610a4c578063a217fddf14610a6b578063a9809cbc14610a7e578063b07cd8bd14610a9d575f80fd5b806394936b3d1161020757806394936b3d146109ba5780639852099c146109d957806398c2d08614610a195780639aff63d114610a38575f80fd5b80638bc2714e146109025780638da5cb5b1461092657806391d14854146109435780639305a91a146109a6575f80fd5b80633d8afb5311610357578063681d527c116102d257806374aeadc3116102a25780638129fc1c116102885780638129fc1c146108a4578063822a6572146108b85780638b5ce46d146108d7575f80fd5b806374aeadc31461087057806380ca29f414610885575f80fd5b8063681d527c146107ea5780636f2c0e151461081e578063715018a61461083d5780637227bcbc14610851575f80fd5b806351858e27116103275780635c975abb1161030d5780635c975abb146107955780635e1eb4ce146107ac5780635efc56c7146107cb575f80fd5b806351858e27146107625780635a9249e614610776575f80fd5b80633d8afb53146106e45780634428eaed1461071b5780634a4e3bd51461072f5780634b43ac4914610743575f80fd5b8063248a9ca3116103e75780632ef7664c116103b7578063301413481161039d5780633014134814610681578063322dda6d146106b257806336568abe146106c5575f80fd5b80632ef7664c146106435780632f2ff15d14610662575f80fd5b8063248a9ca314610589578063258082f5146105d6578063272d177d146106055780632df4869b14610624575f80fd5b8063150ad47111610422578063150ad471146104e35780631841af01146105045780631d6ba60d146105235780631e30726b14610556575f80fd5b806274f4191461045257806304b90bb714610484578063092dac19146104a557806311e2e8c2146104c4575b5f80fd5b34801561045d575f80fd5b5061047161046c36600461518e565b610d40565b6040519081526020015b60405180910390f35b34801561048f575f80fd5b506104a361049e3660046151c0565b610e65565b005b3480156104b0575f80fd5b506104a36104bf3660046151d9565b610e8f565b3480156104cf575f80fd5b506104a36104de3660046151f0565b610fa9565b3480156104ee575f80fd5b506104f761104f565b60405161047b9190615211565b34801561050f575f80fd5b506104a361051e366004615264565b611060565b34801561052e575f80fd5b506104717f5bafaa52d337b93938458f4eae175ab2d71e8c0b8a2a7755272d8e85dac43a0f81565b348015610561575f80fd5b506104717fd76356f7269540ce37ce4d52b405dbc27e3d523e623b1d6af55bb97c668c10ca81565b348015610594575f80fd5b506104716105a33660046151d9565b5f9081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b3480156105e1575f80fd5b506105f56105f03660046151d9565b61114e565b604051901515815260200161047b565b348015610610575f80fd5b506104a361061f3660046152a6565b61115a565b34801561062f575f80fd5b506104a361063e3660046152ce565b611238565b34801561064e575f80fd5b506104a361065d3660046152f4565b611349565b34801561066d575f80fd5b506104a361067c3660046151f0565b6113ca565b34801561068c575f80fd5b5060aa5461069d9063ffffffff1681565b60405163ffffffff909116815260200161047b565b6104a36106c0366004615322565b6113e1565b3480156106d0575f80fd5b506104a36106df3660046151f0565b61140d565b3480156106ef575f80fd5b50609e54610703906001600160a01b031681565b6040516001600160a01b03909116815260200161047b565b348015610726575f80fd5b506104f7611459565b34801561073a575f80fd5b506104a3611465565b34801561074e575f80fd5b5060ad54610703906001600160a01b031681565b34801561076d575f80fd5b506104a361147f565b348015610781575f80fd5b5060a054610703906001600160a01b031681565b3480156107a0575f80fd5b5060335460ff166105f5565b3480156107b7575f80fd5b506104a36107c63660046151c0565b611497565b3480156107d6575f80fd5b506104a36107e536600461533c565b611531565b3480156107f5575f80fd5b506107036108043660046151d9565b609c6020525f90815260409020546001600160a01b031681565b348015610829575f80fd5b5060a754610703906001600160a01b031681565b348015610848575f80fd5b506104a36115d8565b34801561085c575f80fd5b506104a361086b3660046151d9565b6115e9565b34801561087b575f80fd5b5061069d6103e881565b348015610890575f80fd5b506104a361089f3660046151c0565b61168c565b3480156108af575f80fd5b506104a36116b6565b3480156108c3575f80fd5b5060a854610703906001600160a01b031681565b3480156108e2575f80fd5b506104716108f13660046151c0565b609f6020525f908152604090205481565b34801561090d575f80fd5b50609d546107039061010090046001600160a01b031681565b348015610931575f80fd5b506065546001600160a01b0316610703565b34801561094e575f80fd5b506105f561095d3660046151f0565b5f9182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156109b1575f80fd5b506104f76117df565b3480156109c5575f80fd5b506104a36109d43660046151c0565b6117eb565b3480156109e4575f80fd5b50609754610a0090600160a01b900467ffffffffffffffff1681565b60405167ffffffffffffffff909116815260200161047b565b348015610a24575f80fd5b506104a3610a3336600461536e565b61183e565b348015610a43575f80fd5b506104f7611cdf565b348015610a57575f80fd5b506104a3610a66366004615380565b611ceb565b348015610a76575f80fd5b506104715f81565b348015610a89575f80fd5b506104a3610a983660046151c0565b611e7c565b348015610aa8575f80fd5b5061047160a45481565b348015610abd575f80fd5b50609754610703906001600160a01b031681565b348015610adc575f80fd5b506104a3610aeb3660046153a1565b611f16565b6104a3610afe36600461518e565b61223b565b348015610b0e575f80fd5b50610703610b1d3660046151d9565b612264565b348015610b2d575f80fd5b506104a3610b3c3660046152f4565b61229c565b348015610b4c575f80fd5b506104a3610b5b3660046153bb565b61237d565b348015610b6b575f80fd5b506104a3610b7a3660046153e9565b6123a0565b348015610b8a575f80fd5b506104a3610b9936600461540a565b612459565b348015610ba9575f80fd5b506104a3610bb83660046151c0565b612934565b348015610bc8575f80fd5b5061047160a35481565b348015610bdd575f80fd5b506104a3610bec3660046151f0565b6129b9565b348015610bfc575f80fd5b506104f76129c1565b348015610c10575f80fd5b506104a3610c1f3660046152f4565b6129cd565b348015610c2f575f80fd5b506105f5610c3e3660046151d9565b612ae6565b348015610c4e575f80fd5b50609d546105f59060ff1681565b348015610c67575f80fd5b506104a3610c763660046151d9565b612af2565b348015610c86575f80fd5b5061047160a95481565b348015610c9b575f80fd5b506104a3610caa3660046151c0565b612aff565b348015610cba575f80fd5b506104a3610cc93660046151d9565b612b8c565b348015610cd9575f80fd5b506104a3610ce83660046152a6565b612c24565b348015610cf8575f80fd5b506104a3610d073660046151c0565b612c86565b348015610d17575f80fd5b5061069d6107d081565b348015610d2c575f80fd5b506104a3610d3b36600461543c565b612cf6565b5f610d4b838361336c565b5f6040518060c00160405280845f01358152602001856001600160a01b031681526020018460200135815260200184604001358152602001846060016020810190610d96919061546d565b6001600160801b03168152609754602090910190610dc690600160a01b900467ffffffffffffffff16600161549a565b67ffffffffffffffff1690526097546040517f2690952b0000000000000000000000000000000000000000000000000000000081529192506001600160a01b031690632690952b90610e1c9084906004016154ba565b602060405180830381865afa158015610e37573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e5b9190615519565b9150505b92915050565b610e6d61351c565b60a780546001600160a01b0319166001600160a01b0392909216919091179055565b335f9081527f1a448ce734f8fc2bafc952eed975fe4d38808797a808cf3d7766f56ed14ba7f360205260409020547fd76356f7269540ce37ce4d52b405dbc27e3d523e623b1d6af55bb97c668c10ca9060ff16158015610efa57506065546001600160a01b03163314155b15610f265760405163e2517d3f60e01b8152336004820152602481018290526044015b60405180910390fd5b610f31609a83613576565b610f4e5760405163514e24c360e11b815260040160405180910390fd5b5f610f5a60ab84613590565b905080610f7a5760405163a65b249b60e01b815260040160405180910390fd5b60405183907f417f8dd3a7e0aeca3a29e55eefbd9dfd5f51bfea929b3fb33539fe57030e993f905f90a2505050565b610fb161351c565b806001600160a01b038116610fd957604051639fabe1c160e01b815260040160405180910390fd5b5f838152609c6020526040902080546001600160a01b0319166001600160a01b03841617905561100a609a84613590565b506040516001600160a01b038316815283907fdd5c3f86e468e8e3d0da2fcfd07779497eec7c153f181f4859a704d66e2444f8906020015b60405180910390a2505050565b606061105b60ab61359b565b905090565b6110686135a7565b60a7546001600160a01b031633146110cd5760405162461bcd60e51b815260206004820152602260248201527f5661756c743a204f6e6c792073776170206f70657261746f722063616e2063616044820152611b1b60f21b6064820152608401610f1d565b6110d56135fa565b80421115611118576040517f4e26543a00000000000000000000000000000000000000000000000000000000815260048101829052426024820152604401610f1d565b6111218261365d565b61114a60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5050565b5f610e5f609883613576565b335f9081527f1a448ce734f8fc2bafc952eed975fe4d38808797a808cf3d7766f56ed14ba7f360205260409020547fd76356f7269540ce37ce4d52b405dbc27e3d523e623b1d6af55bb97c668c10ca9060ff161580156111c557506065546001600160a01b03163314155b156111ec5760405163e2517d3f60e01b815233600482015260248101829052604401610f1d565b6001600160a01b0383165f818152609f602052604090819020849055517f5e93e2a54705c57ed67fc9650a3b1753179b163ce4881d3964205a708eaef2fc906110429085815260200190565b333b5f03611272576040517f30773dbb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61128260408201602083016151c0565b6001600160a01b03163b156112c3576040517f623793c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112cf60988235613576565b6112ec576040516359d9b86360e01b815260040160405180910390fd5b6112fc60408201602083016151c0565b604080514681524360208201526001600160a01b03929092169183359133917f1e236eed9d7e9ca81e25a438791ca7f69cf43cdcc537a0fd4f74f0697da0460b910160405180910390a450565b61135161351c565b5f811561136a5761136360a184613590565b9050611378565b61137560a184613843565b90505b806113965760405163a65b249b60e01b815260040160405180910390fd5b827f0a189b5878f2d02888fa70a7a78ab12badfddc55f3082c424820d3215a35d05883604051611042911515815260200190565b6113d261351c565b6113dc828261384e565b505050565b6113e96135a7565b60a354816040013503611403576114003382613904565b50565b6114003382613bfc565b6001600160a01b038116331461144f576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113dc8282613f1a565b606061105b60a561359b565b61146d613fbe565b61147561351c565b61147d614010565b565b6114876135a7565b61148f61351c565b61147d614062565b61149f61351c565b806001600160a01b0381166114c757604051639fabe1c160e01b815260040160405180910390fd5b609754604080516001600160a01b03928316815291841660208301527f171f28064de7df65eb845ec06e0161ab312efa47a10fee262fab3dac2f33e80a910160405180910390a150609780546001600160a01b0319166001600160a01b0392909216919091179055565b6115396135a7565b60a7546001600160a01b0316331461159e5760405162461bcd60e51b815260206004820152602260248201527f5661756c743a204f6e6c792073776170206f70657261746f722063616e2063616044820152611b1b60f21b6064820152608401610f1d565b6115a66135fa565b6115af8161365d565b61140060017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b6115e061351c565b61147d5f61409f565b6115f161351c565b6115fc60ab82613576565b611632576040517fdcbe342100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61163e60ab83613843565b90508061165e5760405163a65b249b60e01b815260040160405180910390fd5b60405182907f15528aab2653148a39115365e6f12aad15940c754e9e35bd1f8c0dce70ac032d905f90a25050565b61169461351c565b60a880546001600160a01b0319166001600160a01b0392909216919091179055565b5f54610100900460ff16158080156116d457505f54600160ff909116105b806116ed5750303b1580156116ed57505f5460ff166001145b61175f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610f1d565b5f805460ff191660011790558015611780575f805461ff0019166101001790555b6117886140f0565b611790614162565b6117986141d4565b8015611400575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b606061105b609a61359b565b6117f361351c565b806001600160a01b03811661181b57604051639fabe1c160e01b815260040160405180910390fd5b50609e80546001600160a01b0319166001600160a01b0392909216919091179055565b6097546001600160a01b031633146118695760405163833d33e760e01b815260040160405180910390fd5b6118716135a7565b609754604051634c61684360e11b81526001600160a01b03909116906398c2d086906118a1908490600401615547565b5f604051808303815f87803b1580156118b8575f80fd5b505af11580156118ca573d5f803e3d5ffd5b506118df9250505060a082016080830161546d565b6001600160801b03166118f8608083016060840161546d565b6001600160801b0316116119745760405162461bcd60e51b815260206004820152602a60248201527f77697468647261773a206665652069732067726561746572207468616e20746f60448201527f6b656e20616d6f756e74000000000000000000000000000000000000000000006064820152608401610f1d565b5f61198560a083016080840161546d565b611995608084016060850161546d565b61199f91906155ed565b905060a354826040013503611a8b573063f58e138a6119c460e0850160c086016151c0565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526001600160801b03841660248201526044015f604051808303815f87803b158015611a11575f80fd5b505af1925050508015611a22575060015b611a8657611a3660e0830160c084016151c0565b6040516001600160801b03831681526001600160a01b0391909116905f907f53d65f1c22313c10a5012cd91dc9444f0f6dd09d7887d1a8894a2f4dbae84e149060200160405180910390a3611c0b565b611c0b565b6040828101355f908152609c6020528190205490516370a0823160e01b81523060048201526001600160a01b03909116906001600160801b0383169082906370a0823190602401602060405180830381865afa158015611aed573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b119190615519565b1015611b5f5760405162461bcd60e51b815260206004820152601e60248201527f77697468647261773a20696e73756666696369656e742062616c616e636500006044820152606401610f1d565b611b78611b7260e0850160c086016151c0565b82614246565b611bdc57611b8c60e0840160c085016151c0565b6040516001600160801b03841681526001600160a01b03918216918316907f53d65f1c22313c10a5012cd91dc9444f0f6dd09d7887d1a8894a2f4dbae84e149060200160405180910390a3611c09565b611c09611bef60e0850160c086016151c0565b6001600160a01b038316906001600160801b03851661427a565b505b611c1c610100830160e0840161560c565b67ffffffffffffffff1682357f732a6fe7863c74cbd74d2f2b1e3c27304465e354a9d38f03bf10c8436a70aa276020850135611c5e60c0870160a088016151c0565b611c6e60e0880160c089016151c0565b6040880135611c8360808a0160608b0161546d565b611c9360a08b0160808c0161546d565b604080519687526001600160a01b039586166020880152949093169385019390935260608401526001600160801b0391821660808401521660a082015260c00160405180910390a35050565b606061105b60a161359b565b6097546001600160a01b03163314611d165760405163833d33e760e01b815260040160405180910390fd5b46816020013514611d695760405162461bcd60e51b815260206004820152601a60248201527f5661756c743a20647374436861696e4964206d69736d617463680000000000006044820152606401610f1d565b5f611d7660988335613576565b9050611d8860608301604084016153bb565b15611df9578015611de75781357f8c11dfa3b29c25072fa5975887ad1798f81a4ba366cab8aa3203073a73e2d80a6020840135611dcb60608601604087016153bb565b6040805192835290151560208301520160405180910390a25050565b611df360988335613590565b50611e44565b80611e365781357f8c11dfa3b29c25072fa5975887ad1798f81a4ba366cab8aa3203073a73e2d80a6020840135611dcb60608601604087016153bb565b611e4260988335613843565b505b81357f027e4cd65dd9f222a5ff31529c61f9b02b3f6d0a7e688ea7db2ead8dbc0da6a06020840135611dcb60608601604087016153bb565b611e8461351c565b806001600160a01b038116611eac57604051639fabe1c160e01b815260040160405180910390fd5b60a054604080516001600160a01b03928316815291841660208301527f4bb8c4ef110887028d1717e548739a084de305c2b08cb6d4d3ed9b659f688aef910160405180910390a15060a080546001600160a01b0319166001600160a01b0392909216919091179055565b6097546001600160a01b03163314611f415760405163833d33e760e01b815260040160405180910390fd5b60608101355f908152609c60205260409020546001600160a01b031680611f7b57604051639fabe1c160e01b815260040160405180910390fd5b611f8a60a16060840135613576565b611fa7576040516356b3a57360e11b815260040160405180910390fd5b609d546001600160a01b038083169163095ea7b39161010090910416611fd3606086016040870161546d565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526001600160801b031660248201526044016020604051808303815f875af1158015612024573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120489190615625565b50609d5461010090046001600160a01b0316638e0250ee61206f606085016040860161546d565b61207c6020860186615640565b61209461208f60e0880160c089016151c0565b61430b565b856120a861208f60e08a0160c08b016151c0565b60a95460aa5460405160e089901b6001600160e01b03191681526001600160801b03909716600488015263ffffffff958616602488015260448701949094526001600160a01b039092166064860152608485015260a48401521660c482015260e4015f604051808303815f87803b158015612121575f80fd5b505af1925050508015612132575060015b612203576097546040805160c0810182525f81526001600160a01b0390921691633a8c58999160208083019161216d9190880190880161560c565b67ffffffffffffffff16815260200161218c606087016040880161546d565b6001600160801b0316815260200185606001358152602001856080013581526020018560a001358152506040518263ffffffff1660e01b81526004016121d29190615659565b5f604051808303815f87803b1580156121e9575f80fd5b505af11580156121fb573d5f803e3d5ffd5b505050505050565b6097546040805160c081018252600181526001600160a01b0390921691633a8c58999160208083019161216d9190880190880161560c565b6122436135a7565b60a35481604001350361225a5761114a8282613904565b61114a8282613bfc565b5f612270609a83613576565b1561229057505f908152609c60205260409020546001600160a01b031690565b505f919050565b919050565b6122a461351c565b5f8115612301575f838152609c60205260409020546001600160a01b03161580156122d1575060a3548314155b156122ef57604051639fabe1c160e01b815260040160405180910390fd5b6122fa609a84613590565b905061232b565b61230c609a84613843565b905061231960ab84613576565b1561232b5761232960ab84613843565b505b806123495760405163a65b249b60e01b815260040160405180910390fd5b827f75982e4722797db7bbfd209216413b5edd134de5cd687de171dd12deeee642ff83604051611042911515815260200190565b61238561351c565b61238d6135a7565b609d805460ff1916911515919091179055565b6123a861351c565b60a982905563ffffffff81166103e814806123ca575063ffffffff81166107d0145b61243c5760405162461bcd60e51b815260206004820152602960248201527f73657443435450436f6e6669673a20696e76616c69642066696e616c6974792060448201527f7468726573686f6c6400000000000000000000000000000000000000000000006064820152608401610f1d565b60aa805463ffffffff191663ffffffff9290921691909117905550565b6097546001600160a01b031633146124845760405163833d33e760e01b815260040160405180910390fd5b6040808201355f908152609c60205220546001600160a01b0316806124bc57604051639fabe1c160e01b815260040160405180910390fd5b6124cb60a16040840135613576565b6124e8576040516356b3a57360e11b815260040160405180910390fd5b6040516370a0823160e01b81523060048201525f906001600160a01b038316906370a0823190602401602060405180830381865afa15801561252c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125509190615519565b609e549091506001600160a01b03166357ecfd2861257160a08601866156b1565b61257e60c08801886156b1565b6040518563ffffffff1660e01b815260040161259d9493929190615723565b5f604051808303815f87803b1580156125b4575f80fd5b505af19250505080156125c5575060015b612755576125d1615749565b806308c379a00361274b57506125e561579b565b806125f0575061274d565b5f6040518060400160405280601281526020017f4e6f6e636520616c72656164792075736564000000000000000000000000000081525090505f8160405160200161263b9190615836565b60405160208183030381529060405280519060200120836040516020016126629190615836565b60408051601f19818403018152828252805160209182012060975460c085019093529390931480835293506001600160a01b0316916358a126709190818101906126ae908b018b61560c565b67ffffffffffffffff1681526020018960200160208101906126d0919061546d565b6001600160801b03168152602001896040013581526020018960600135815260200189608001358152506040518263ffffffff1660e01b81526004016127169190615659565b5f604051808303815f87803b15801561272d575f80fd5b505af115801561273f573d5f803e3d5ffd5b50505050505050505050565b505b3d5f803e3d5ffd5b6040516370a0823160e01b81523060048201525f906001600160a01b038416906370a0823190602401602060405180830381865afa158015612799573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127bd9190615519565b90505f6127ca8383615841565b60aa5490915063ffffffff166107cf190161286c576127ef604086016020870161546d565b6001600160801b0316811461286c5760405162461bcd60e51b815260206004820152602f60248201527f726562616c616e63654d696e743a206d696e74656420616d6f756e74206c657360448201527f73207468616e20657870656374656400000000000000000000000000000000006064820152608401610f1d565b6097546040805160c08101909152600181526001600160a01b03909116906358a12670906020808201906128a2908a018a61560c565b67ffffffffffffffff1681526020016128ba85614339565b6001600160801b03168152602001886040013581526020018860600135815260200188608001358152506040518263ffffffff1660e01b81526004016129009190615659565b5f604051808303815f87803b158015612917575f80fd5b505af1158015612929573d5f803e3d5ffd5b505050505050505050565b61293c61351c565b806001600160a01b03811661296457604051639fabe1c160e01b815260040160405180910390fd5b60ad80546001600160a01b0319166001600160a01b0384169081179091556040519081527fafd97b3f968da28dbbbda91d687a091910064177f0280798e8d856b23a4858349060200160405180910390a15050565b61144f61351c565b606061105b609861359b565b335f9081527f0bf91477422a066ca8ed18eac669f5e3f374baa39c6c763ac707e6bf753b916560205260409020547f5bafaa52d337b93938458f4eae175ab2d71e8c0b8a2a7755272d8e85dac43a0f9060ff16158015612a3857506065546001600160a01b03163314155b15612a5f5760405163e2517d3f60e01b815233600482015260248101829052604401610f1d565b5f8215612a7857612a71609885613590565b9050612a86565b612a83609885613843565b90505b80612aa45760405163a65b249b60e01b815260040160405180910390fd5b837fe2004c296ac9fa6b9b57d55d8bbe257982d1111c229081bb672d5ddbec7f260684604051612ad8911515815260200190565b60405180910390a250505050565b5f610e5f60a583613576565b612afa61351c565b60a355565b612b0761351c565b6001600160a01b038116612b835760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610f1d565b6114008161409f565b335f9081527f1a448ce734f8fc2bafc952eed975fe4d38808797a808cf3d7766f56ed14ba7f360205260409020547fd76356f7269540ce37ce4d52b405dbc27e3d523e623b1d6af55bb97c668c10ca9060ff16158015612bf757506065546001600160a01b03163314155b15612c1e5760405163e2517d3f60e01b815233600482015260248101829052604401610f1d565b5060a455565b333014612c735760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c79207468697320636f6e74726163742063616e2063616c6c00000000006044820152606401610f1d565b61114a6001600160a01b038316826143bb565b612c8e61351c565b806001600160a01b038116612cb657604051639fabe1c160e01b815260040160405180910390fd5b50609d80546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b6097546001600160a01b03163314612d215760405163833d33e760e01b815260040160405180910390fd5b612d296135a7565b5f604051806101000160405280836020013581526020018360400135815260200183606001358152602001836080016020810190612d67919061546d565b6001600160801b03168152602001612d8560c0850160a0860161546d565b6001600160801b03168152602001612da360e0850160c086016151c0565b6001600160a01b03168152602001612dc2610100850160e086016151c0565b6001600160a01b03168152602001612de26101208501610100860161560c565b67ffffffffffffffff169052609754604051634c61684360e11b81529192506001600160a01b0316906398c2d08690612e1f908490600401615854565b5f604051808303815f87803b158015612e36575f80fd5b505af1158015612e48573d5f803e3d5ffd5b50612e5d9250505060c0830160a0840161546d565b6001600160801b0316612e7660a084016080850161546d565b6001600160801b031611612ef25760405162461bcd60e51b815260206004820152603360248201527f776974686472617732436f6e74726163743a206665652069732067726561746560448201527f72207468616e20746f6b656e20616d6f756e74000000000000000000000000006064820152608401610f1d565b5f612f0360c0840160a0850161546d565b612f1360a085016080860161546d565b612f1d91906155ed565b905060a35483606001350361300b573063f58e138a612f43610100860160e087016151c0565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526001600160801b03841660248201526044015f604051808303815f87803b158015612f90575f80fd5b505af1925050508015612fa1575060015b61300657612fb6610100840160e085016151c0565b6040516001600160801b03831681526001600160a01b0391909116905f907f53d65f1c22313c10a5012cd91dc9444f0f6dd09d7887d1a8894a2f4dbae84e149060200160405180910390a3613292565b613292565b60608301355f908152609c6020526040908190205490516370a0823160e01b81523060048201526001600160a01b03909116906001600160801b0383169082906370a0823190602401602060405180830381865afa15801561306f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906130939190615519565b10156130e15760405162461bcd60e51b815260206004820152601b60248201527f5661756c743a20696e73756666696369656e742062616c616e636500000000006044820152606401610f1d565b6130f5611b72610100860160e087016151c0565b61315a5761310a610100850160e086016151c0565b6040516001600160801b03841681526001600160a01b03918216918316907f53d65f1c22313c10a5012cd91dc9444f0f6dd09d7887d1a8894a2f4dbae84e149060200160405180910390a3613290565b5f61316860208601866158f7565b6002811115613179576131796158e3565b03613257576131ac613192610100860160e087016151c0565b6001600160a01b038316906001600160801b0385166144d0565b6131bd610100850160e086016151c0565b604080517fa064296b00000000000000000000000000000000000000000000000000000000815261012087013560048201529086013560248201526001600160a01b0383811660448301526001600160801b0385166064830152919091169063a064296b906084015f604051808303815f87803b15801561323c575f80fd5b505af115801561324e573d5f803e3d5ffd5b50505050613290565b600261326660208601866158f7565b6002811115613277576132776158e3565b0361329057613290611bef610100860160e087016151c0565b505b6132a46101208401610100850161560c565b67ffffffffffffffff1660208401357f732a6fe7863c74cbd74d2f2b1e3c27304465e354a9d38f03bf10c8436a70aa2760408601356132e960e0880160c089016151c0565b6132fa610100890160e08a016151c0565b606089013561330f60a08b0160808c0161546d565b61331f60c08c0160a08d0161546d565b604080519687526001600160a01b039586166020880152949093169385019390935260608401526001600160801b0391821660808401521660a082015260c00160405180910390a3505050565b604081013561337c609a82613576565b6133995760405163514e24c360e11b815260040160405180910390fd5b6133a460ab82613576565b156133db576040517f2bdd210700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60a354811415801561340157505f818152609c60205260409020546001600160a01b0316155b1561341f57604051630f58058360e11b815260040160405180910390fd5b61342e60986020840135613576565b61344b576040516359d9b86360e01b815260040160405180910390fd5b60ad546001600160a01b031633146134cb57604080516001600160a01b0385166020828101919091528085013582840152825180830384018152606090920190925280519101208235146134cb576040517fc7ee9ce600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6134db608083016060840161546d565b6001600160801b03165f036113dc576040517f56316e8700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6065546001600160a01b0316331461147d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f1d565b5f81815260018301602052604081205415155b9392505050565b5f613589838361461c565b60605f61358983614668565b60335460ff161561147d5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610f1d565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901613657576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b613666816146c1565b61367260a58235613590565b5060a3548160400135146136c6576040808201355f908152609c60205220546001600160a01b0316806136c36136ae60a08501608086016151c0565b6001600160a01b0383169060608601356144d0565b50505b5f60a3548260400135036136db575060a08101355b5f806136ed60a08501608086016151c0565b6001600160a01b03168361370460c08701876156b1565b604051613712929190615915565b5f6040518083038185875af1925050503d805f811461374c576040519150601f19603f3d011682016040523d82523d5f602084013e613751565b606091505b50915091508161376357805160208201fd5b60a3548460400135146137b2576040808501355f908152609c60205220546001600160a01b0316806137af61379e60a08801608089016151c0565b6001600160a01b038316905f6144d0565b50505b83357f8547134a897aa2cdae5a6b87fe6e6bdc56bc90996de46cb8ef405a5779fef736604086013560608701356137ef60a0890160808a016151c0565b6040805193845260208401929092526001600160a01b03169082015260a08701356060820152608001612ad8565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f613589838361477a565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff166138f4575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916600117905551339287917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a46001915050610e5f565b5f915050610e5f565b5092915050565b61390e828261336c565b5f61391834614339565b905061392a608083016060840161546d565b6001600160801b0316816001600160801b03161015613975576040517ffa7c753700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60a454158015906139be575060a4546001600160801b0382164761399f608086016060870161546d565b6001600160801b03166139b29190615924565b6139bc9190615841565b115b156139dc5760405163365a77c960e21b815260040160405180910390fd5b5f6040518060c00160405280845f01358152602001856001600160a01b031681526020018460200135815260200184604001358152602001846060016020810190613a27919061546d565b6001600160801b03168152602001613a3d614854565b67ffffffffffffffff16905290505f613a5c608085016060860161546d565b613a6690846155ed565b609d546001600160801b0391909116915060ff1615613b0657805f03613a9f576040516393d3bb4d60e01b815260040160405180910390fd5b609754604051632322e4b160e11b81526001600160a01b0390911690634645c962908390613ad39033908790600401615937565b5f604051808303818588803b158015613aea575f80fd5b505af1158015613afc573d5f803e3d5ffd5b5050505050613b64565b609754604051630a8f0d0760e41b81526001600160a01b039091169063a8f0d07090613b369085906004016154ba565b5f604051808303815f87803b158015613b4d575f80fd5b505af1158015613b5f573d5f803e3d5ffd5b505050505b6097546001600160a01b038616906020860135908635907fc5429babd1ad36d726eaa90564d64e1ce3b7f4b9a3d3d3c9eead1ab7dc1afa2e90600160a01b900467ffffffffffffffff166040890135613bc360808b0160608c0161546d565b6040805167ffffffffffffffff909416845260208401929092526001600160801b03169082015260600160405180910390a45050505050565b613c06828261336c565b6040808201355f908152609c6020908152828220546001600160a01b0316808352609f9091529190205415801590613cd557506001600160a01b0381165f818152609f6020526040908190205490516370a0823160e01b81523060048201529091906370a0823190602401602060405180830381865afa158015613c8c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613cb09190615519565b613cc0608085016060860161546d565b6001600160801b0316613cd39190615924565b115b15613cf35760405163365a77c960e21b815260040160405180910390fd5b613d233330613d08608086016060870161546d565b6001600160a01b0385169291906001600160801b03166148a1565b5f6040518060c00160405280845f01358152602001856001600160a01b031681526020018460200135815260200184604001358152602001846060016020810190613d6e919061546d565b6001600160801b03168152602001613d84614854565b67ffffffffffffffff169052609d5490915060ff1615613e2557345f03613dbe576040516393d3bb4d60e01b815260040160405180910390fd5b609754604051632322e4b160e11b81526001600160a01b0390911690634645c962903490613df29033908690600401615937565b5f604051808303818588803b158015613e09575f80fd5b505af1158015613e1b573d5f803e3d5ffd5b5050505050613e83565b609754604051630a8f0d0760e41b81526001600160a01b039091169063a8f0d07090613e559084906004016154ba565b5f604051808303815f87803b158015613e6c575f80fd5b505af1158015613e7e573d5f803e3d5ffd5b505050505b6097546001600160a01b038516906020850135908535907fc5429babd1ad36d726eaa90564d64e1ce3b7f4b9a3d3d3c9eead1ab7dc1afa2e90600160a01b900467ffffffffffffffff166040880135613ee260808a0160608b0161546d565b6040805167ffffffffffffffff909416845260208401929092526001600160801b03169082015260600160405180910390a450505050565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff16156138f4575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610e5f565b60335460ff1661147d5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610f1d565b614018613fbe565b6033805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b61406a6135a7565b6033805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586140453390565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff1661415a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610f1d565b61147d6148f8565b5f54610100900460ff166141cc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610f1d565b61147d61496b565b5f54610100900460ff1661423e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610f1d565b61147d6149e1565b5f6001600160a01b03831661425c57505f610e5f565b6142668383614a4b565b1561427257505f610e5f565b506001610e5f565b6040516001600160a01b0383166024820152604481018290526113dc9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152614b4b565b604080516001600160a01b03831660208201525f9101604051602081830303815290604052610e5f906159a5565b5f6001600160801b038211156143b75760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610f1d565b5090565b8047101561440b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610f1d565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114614454576040519150601f19603f3d011682016040523d82523d5f602084013e614459565b606091505b50509050806113dc5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610f1d565b80158061456157506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa15801561453b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061455f9190615519565b155b6145d35760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610f1d565b6040516001600160a01b0383166024820152604481018290526113dc9084907f095ea7b300000000000000000000000000000000000000000000000000000000906064016142bf565b5f81815260018301602052604081205461466157508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610e5f565b505f610e5f565b6060815f018054806020026020016040519081016040528092919081815260200182805480156146b557602002820191905f5260205f20905b8154815260200190600101908083116146a1575b50505050509050919050565b6146cd60a58235613576565b15614704576040517f0b69314400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040810135614714609a82613576565b6147315760405163514e24c360e11b815260040160405180910390fd5b60a3548114614771575f818152609c60205260409020546001600160a01b03168061476f57604051630f58058360e11b815260040160405180910390fd5b505b61114a82614c2f565b5f81815260018301602052604081205480156138f4575f61479c600183615841565b85549091505f906147af90600190615841565b905081811461480e575f865f0182815481106147cd576147cd6159c8565b905f5260205f200154905080875f0184815481106147ed576147ed6159c8565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061481f5761481f6159dc565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610e5f565b5f6097601481819054906101000a900467ffffffffffffffff16614877906159f0565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055905090565b6040516001600160a01b03808516602483015283166044820152606481018290526148f29085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016142bf565b50505050565b5f54610100900460ff166149625760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610f1d565b61147d3361409f565b5f54610100900460ff166149d55760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610f1d565b6033805460ff19169055565b5f54610100900460ff1661381d5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610f1d565b6040516001600160a01b03831660248201525f90819060440160408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167ffe575a8700000000000000000000000000000000000000000000000000000000179052519091505f9081906001600160a01b03861690614ada908590615836565b5f60405180830381855afa9150503d805f8114614b12576040519150601f19603f3d011682016040523d82523d5f602084013e614b17565b606091505b50915091508115614b405780806020019051810190614b369190615625565b9350505050610e5f565b5f9350505050610e5f565b5f614b9f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614c7b9092919063ffffffff16565b8051909150156113dc5780806020019051810190614bbd9190615625565b6113dc5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610f1d565b60a854614c45906001600160a01b031682614c91565b611400576040517f06a0cf4a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060614c8984845f85614d8b565b949350505050565b5f8082354660408501356060860135614cb060a08801608089016151c0565b60a0880135614cc260c08a018a6156b1565b604051602001614cd9989796959493929190615a1c565b60405160208183030381529060405290505f614d4882805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018290525f90605c01604051602081830303815290604052805190602001209050919050565b90505f614d7182614d6161014088016101208901615a6a565b8760e00135886101000135614e79565b6001600160a01b0390811690871614935050505092915050565b606082471015614e035760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610f1d565b5f80866001600160a01b03168587604051614e1e9190615836565b5f6040518083038185875af1925050503d805f8114614e58576040519150601f19603f3d011682016040523d82523d5f602084013e614e5d565b606091505b5091509150614e6e87838387614e9f565b979650505050505050565b5f805f614e8887878787614f17565b91509150614e9581614fd4565b5095945050505050565b60608315614f0d5782515f03614f06576001600160a01b0385163b614f065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610f1d565b5081614c89565b614c898383615138565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115614f4c57505f90506003614fcb565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614f9d573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116614fc5575f60019250925050614fcb565b91505f90505b94509492505050565b5f816004811115614fe757614fe76158e3565b03614fef5750565b6001816004811115615003576150036158e3565b036150505760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610f1d565b6002816004811115615064576150646158e3565b036150b15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610f1d565b60038160048111156150c5576150c56158e3565b036114005760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610f1d565b8151156151485781518083602001fd5b8060405162461bcd60e51b8152600401610f1d9190615a8a565b80356001600160a01b0381168114612297575f80fd5b5f60808284031215615188575f80fd5b50919050565b5f8060a0838503121561519f575f80fd5b6151a883615162565b91506151b78460208501615178565b90509250929050565b5f602082840312156151d0575f80fd5b61358982615162565b5f602082840312156151e9575f80fd5b5035919050565b5f8060408385031215615201575f80fd5b823591506151b760208401615162565b602080825282518282018190525f918401906040840190835b8181101561524857835183526020938401939092019160010161522a565b509095945050505050565b5f6101408284031215615188575f80fd5b5f8060408385031215615275575f80fd5b823567ffffffffffffffff81111561528b575f80fd5b61529785828601615253565b95602094909401359450505050565b5f80604083850312156152b7575f80fd5b6152c083615162565b946020939093013593505050565b5f60408284031280156152df575f80fd5b509092915050565b8015158114611400575f80fd5b5f8060408385031215615305575f80fd5b823591506020830135615317816152e7565b809150509250929050565b5f60808284031215615332575f80fd5b6135898383615178565b5f6020828403121561534c575f80fd5b813567ffffffffffffffff811115615362575f80fd5b610e5b84828501615253565b5f6101008284031280156152df575f80fd5b5f60608284031280156152df575f80fd5b5f60e08284031215615188575f80fd5b5f60e082840312156153b1575f80fd5b6135898383615391565b5f602082840312156153cb575f80fd5b8135613589816152e7565b803563ffffffff81168114612297575f80fd5b5f80604083850312156153fa575f80fd5b823591506151b7602084016153d6565b5f6020828403121561541a575f80fd5b813567ffffffffffffffff811115615430575f80fd5b610e5b84828501615391565b5f610140828403121561544d575f80fd5b6135898383615253565b80356001600160801b0381168114612297575f80fd5b5f6020828403121561547d575f80fd5b61358982615457565b634e487b7160e01b5f52601160045260245ffd5b67ffffffffffffffff8181168382160190811115610e5f57610e5f615486565b60c08101610e5f8284805182526001600160a01b03602082015116602083015260408101516040830152606081015160608301526001600160801b03608082015116608083015267ffffffffffffffff60a08201511660a08301525050565b5f60208284031215615529575f80fd5b5051919050565b803567ffffffffffffffff81168114612297575f80fd5b81358152602080830135908201526040808301359082015261010081016001600160801b0361557860608501615457565b1660608301526001600160801b0361559260808501615457565b1660808301526001600160a01b036155ac60a08501615162565b1660a08301526155be60c08401615162565b6001600160a01b031660c08301526155d860e08401615530565b67ffffffffffffffff811660e08401526138fd565b6001600160801b038281168282160390811115610e5f57610e5f615486565b5f6020828403121561561c575f80fd5b61358982615530565b5f60208284031215615635575f80fd5b8151613589816152e7565b5f60208284031215615650575f80fd5b613589826153d6565b60c08101610e5f828480511515825267ffffffffffffffff60208201511660208301526001600160801b036040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b5f808335601e198436030181126156c6575f80fd5b83018035915067ffffffffffffffff8211156156e0575f80fd5b6020019150368190038213156156f4575f80fd5b9250929050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b604081525f6157366040830186886156fb565b8281036020840152614e6e8185876156fb565b5f60033d111561575f5760045f803e505f5160e01c5b90565b601f8201601f1916810167ffffffffffffffff8111828210171561579457634e487b7160e01b5f52604160045260245ffd5b6040525050565b5f60443d10156157a85790565b6040513d600319016004823e80513d602482011167ffffffffffffffff821117156157d257505090565b808201805167ffffffffffffffff8111156157ee575050505090565b3d8401600319018282016020011115615808575050505090565b61581760208285010185615762565b509392505050565b5f81518060208401855e5f93019283525090919050565b5f613589828461581f565b81810381811115610e5f57610e5f615486565b5f610100820190508251825260208301516020830152604083015160408301526001600160801b0360608401511660608301526001600160801b0360808401511660808301526001600160a01b0360a08401511660a083015260c08301516158c760c08401826001600160a01b03169052565b5060e08301516138fd60e084018267ffffffffffffffff169052565b634e487b7160e01b5f52602160045260245ffd5b5f60208284031215615907575f80fd5b813560038110613589575f80fd5b818382375f9101908152919050565b80820180821115610e5f57610e5f615486565b6001600160a01b038316815260e081016135896020830184805182526001600160a01b03602082015116602083015260408101516040830152606081015160608301526001600160801b03608082015116608083015267ffffffffffffffff60a08201511660a08301525050565b80516020808301519190811015615188575f1960209190910360031b1b16919050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b5f67ffffffffffffffff821667ffffffffffffffff8103615a1357615a13615486565b60010192915050565b8881528760208201528660408201528560608201526001600160a01b03851660808201528360a082015260e060c08201525f615a5c60e0830184866156fb565b9a9950505050505050505050565b5f60208284031215615a7a575f80fd5b813560ff81168114613589575f80fd5b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f8301168401019150509291505056fea2646970667358221220099564db2775aedbeb8b2e473e9e423320f79ef68f13733b813b171324efeb1e64736f6c634300081a0033
Deployed Bytecode Sourcemap
1276:34712:29:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14170:493;;;;;;;;;;-1:-1:-1;14170:493:29;;;;;:::i;:::-;;:::i;:::-;;;861:25:30;;;849:2;834:18;14170:493:29;;;;;;;;31962:119;;;;;;;;;;-1:-1:-1;31962:119:29;;;;;:::i;:::-;;:::i;:::-;;9394:343;;;;;;;;;;-1:-1:-1;9394:343:29;;;;;:::i;:::-;;:::i;11917:362::-;;;;;;;;;;-1:-1:-1;11917:362:29;;;;;:::i;:::-;;:::i;10075:132::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;34140:346::-;;;;;;;;;;-1:-1:-1;34140:346:29;;;;;:::i;:::-;;:::i;4047:94::-;;;;;;;;;;;;4093:48;4047:94;;3946;;;;;;;;;;;;3992:48;3946:94;;4527:191:26;;;;;;;;;;-1:-1:-1;4527:191:26;;;;;:::i;:::-;4592:7;4687:14;;;2960:28;4687:14;;;;;:24;;;;4527:191;12672:145:29;;;;;;;;;;-1:-1:-1;12672:145:29;;;;;:::i;:::-;;:::i;:::-;;;3238:14:30;;3231:22;3213:41;;3201:2;3186:18;12672:145:29;3073:187:30;7803:269:29;;;;;;;;;;-1:-1:-1;7803:269:29;;;;;:::i;:::-;;:::i;24941:460::-;;;;;;;;;;-1:-1:-1;24941:460:29;;;;;:::i;:::-;;:::i;10213:414::-;;;;;;;;;;-1:-1:-1;10213:414:29;;;;;:::i;:::-;;:::i;35706:118::-;;;;;;;;;;-1:-1:-1;35706:118:29;;;;;:::i;:::-;;:::i;3415:35::-;;;;;;;;;;-1:-1:-1;3415:35:29;;;;;;;;;;;4474:10:30;4462:23;;;4444:42;;4432:2;4417:18;3415:35:29;4300:192:30;13362:262:29;;;;;;:::i;:::-;;:::i;6116:243:26:-;;;;;;;;;;-1:-1:-1;6116:243:26;;;;;:::i;:::-;;:::i;2511:41:29:-;;;;;;;;;;-1:-1:-1;2511:41:29;;;;-1:-1:-1;;;;;2511:41:29;;;;;;-1:-1:-1;;;;;5051:55:30;;;5033:74;;5021:2;5006:18;2511:41:29;4887:226:30;32525:118:29;;;;;;;;;;;;;:::i;25624:83::-;;;;;;;;;;;;;:::i;3720:27::-;;;;;;;;;;-1:-1:-1;3720:27:29;;;;-1:-1:-1;;;;;3720:27:29;;;25536:82;;;;;;;;;;;;;:::i;2727:35::-;;;;;;;;;;-1:-1:-1;2727:35:29;;;;-1:-1:-1;;;;;2727:35:29;;;1858:84:2;;;;;;;;;;-1:-1:-1;1928:7:2;;;;1858:84;;7420:331:29;;;;;;;;;;-1:-1:-1;7420:331:29;;;;;:::i;:::-;;:::i;33871:211::-;;;;;;;;;;-1:-1:-1;33871:211:29;;;;;:::i;:::-;;:::i;2155:47::-;;;;;;;;;;-1:-1:-1;2155:47:29;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;2155:47:29;;;3240:27;;;;;;;;;;-1:-1:-1;3240:27:29;;;;-1:-1:-1;;;;;3240:27:29;;;2064:101:0;;;;;;;;;;;;;:::i;9743:326:29:-;;;;;;;;;;-1:-1:-1;9743:326:29;;;;;:::i;:::-;;:::i;3785:48::-;;;;;;;;;;;;3829:4;3785:48;;32131:111;;;;;;;;;;-1:-1:-1;32131:111:29;;;;;:::i;:::-;;:::i;5647:146::-;;;;;;;;;;;;;:::i;3300:25::-;;;;;;;;;;-1:-1:-1;3300:25:29;;;;-1:-1:-1;;;;;3300:25:29;;;2630:60;;;;;;;;;;-1:-1:-1;2630:60:29;;;;;:::i;:::-;;;;;;;;;;;;;;2425:37;;;;;;;;;;-1:-1:-1;2425:37:29;;;;;;;-1:-1:-1;;;;;2425:37:29;;;1441:85:0;;;;;;;;;;-1:-1:-1;1513:6:0;;-1:-1:-1;;;;;1513:6:0;1441:85;;3504:207:26;;;;;;;;;;-1:-1:-1;3504:207:26;;;;;:::i;:::-;3581:4;3673:14;;;2960:28;3673:14;;;;;;;;-1:-1:-1;;;;;3673:31:26;;;;;;;;;;;;;;;3504:207;12881:126:29;;;;;;;;;;;;;:::i;25954:255::-;;;;;;;;;;-1:-1:-1;25954:255:29;;;;;:::i;:::-;;:::i;1723:23::-;;;;;;;;;;-1:-1:-1;1723:23:29;;;;-1:-1:-1;;;1723:23:29;;;;;;;;;6024:18:30;6012:31;;;5994:50;;5982:2;5967:18;1723:23:29;5850:200:30;19361:1708:29;;;;;;;;;;-1:-1:-1;19361:1708:29;;;;;:::i;:::-;;:::i;10633:136::-;;;;;;;;;;;;;:::i;6072:1293::-;;;;;;;;;;-1:-1:-1;6072:1293:29;;;;;:::i;:::-;;:::i;2357:49:26:-;;;;;;;;;;-1:-1:-1;2357:49:26;2402:4;2357:49;;8120:321:29;;;;;;;;;;-1:-1:-1;8120:321:29;;;;;:::i;:::-;;:::i;3032:38::-;;;;;;;;;;;;;;;;1625:39;;;;;;;;;;-1:-1:-1;1625:39:29;;;;-1:-1:-1;;;;;1625:39:29;;;26578:2147;;;;;;;;;;-1:-1:-1;26578:2147:29;;;;;:::i;:::-;;:::i;13766:314::-;;;;;;:::i;:::-;;:::i;12355:246::-;;;;;;;;;;-1:-1:-1;12355:246:29;;;;;:::i;:::-;;:::i;8628:760::-;;;;;;;;;;-1:-1:-1;8628:760:29;;;;;:::i;:::-;;:::i;14728:126::-;;;;;;;;;;-1:-1:-1;14728:126:29;;;;;:::i;:::-;;:::i;26215:357::-;;;;;;;;;;-1:-1:-1;26215:357:29;;;;;:::i;:::-;;:::i;28731:2685::-;;;;;;;;;;-1:-1:-1;28731:2685:29;;;;;:::i;:::-;;:::i;32294:185::-;;;;;;;;;;-1:-1:-1;32294:185:29;;;;;:::i;:::-;;:::i;2961:30::-;;;;;;;;;;;;;;;;35866:120;;;;;;;;;;-1:-1:-1;35866:120:29;;;;;:::i;:::-;;:::i;13076:128::-;;;;;;;;;;;;;:::i;10834:443::-;;;;;;;;;;-1:-1:-1;10834:443:29;;;;;:::i;:::-;;:::i;32719:128::-;;;;;;;;;;-1:-1:-1;32719:128:29;;;;;:::i;:::-;;:::i;2260:29::-;;;;;;;;;;-1:-1:-1;2260:29:29;;;;;;;;11321:133;;;;;;;;;;-1:-1:-1;11321:133:29;;;;;:::i;:::-;;:::i;3384:25::-;;;;;;;;;;;;;;;;2314:198:0;;;;;;;;;;-1:-1:-1;2314:198:0;;;;;:::i;:::-;;:::i;11507:220:29:-;;;;;;;;;;-1:-1:-1;11507:220:29;;;;;:::i;:::-;;:::i;31550:195::-;;;;;;;;;;-1:-1:-1;31550:195:29;;;;;:::i;:::-;;:::i;25713:235::-;;;;;;;;;;-1:-1:-1;25713:235:29;;;;;:::i;:::-;;:::i;3839:50::-;;;;;;;;;;;;3885:4;3839:50;;21222:2839;;;;;;;;;;-1:-1:-1;21222:2839:29;;;;;:::i;:::-;;:::i;14170:493::-;14314:7;14337:32;14354:8;14364:4;14337:16;:32::i;:::-;14379:42;14424:137;;;;;;;;14461:4;:14;;;14424:137;;;;14477:8;-1:-1:-1;;;;;14424:137:29;;;;;14487:4;:15;;;14424:137;;;;14504:4;:14;;;14424:137;;;;14520:4;:16;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;14424:137:29;;;14538:9;;14424:137;;;;;14538:13;;-1:-1:-1;;;14538:9:29;;;;14550:1;14538:13;:::i;:::-;14424:137;;;;14603:24;;14579:76;;;;;14379:182;;-1:-1:-1;;;;;;14603:24:29;;14579:63;;:76;;14379:182;;14579:76;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;14571:85;;;14170:493;;;;;:::o;31962:119::-;1334:13:0;:11;:13::i;:::-;32046:12:29::1;:28:::0;;-1:-1:-1;;;;;;32046:28:29::1;-1:-1:-1::0;;;;;32046:28:29;;;::::1;::::0;;;::::1;::::0;;31962:119::o;9394:343::-;4299:10;3581:4:26;3673:31;;;:14;;:31;:14;:31;;;3992:48:29;;3673:31:26;;4284:26:29;:51;;;;-1:-1:-1;1513:6:0;;-1:-1:-1;;;;;1513:6:0;4314:10:29;:21;;4284:51;4280:139;;;4358:50;;-1:-1:-1;;;4358:50:29;;4391:10;4358:50;;;10472:74:30;10562:18;;;10555:34;;;10445:18;;4358:50:29;;;;;;;;4280:139;9513:36:::1;:15;9538:10:::0;9513:24:::1;:36::i;:::-;9508:67;;9558:17;;-1:-1:-1::0;;;9558:17:29::1;;;;;;;;;;;9508:67;9585:9;9597:39;:23;9625:10:::0;9597:27:::1;:39::i;:::-;9585:51;;9651:4;9646:38;;9664:20;;-1:-1:-1::0;;;9664:20:29::1;;;;;;;;;;;9646:38;9699:31;::::0;9719:10;;9699:31:::1;::::0;;;::::1;9498:239;9394:343:::0;;:::o;11917:362::-;1334:13:0;:11;:13::i;:::-;12071::29;-1:-1:-1;;;;;4929:22:29;::::1;4925:48;;4960:13;;-1:-1:-1::0;;;4960:13:29::1;;;;;;;;;;;4925:48;12100:24:::2;::::0;;;:12:::2;:24;::::0;;;;:40;;-1:-1:-1;;;;;;12100:40:29::2;-1:-1:-1::0;;;;;12100:40:29;::::2;;::::0;;12150:31:::2;:15;12100:24:::0;12150:19:::2;:31::i;:::-;-1:-1:-1::0;12219:53:29::2;::::0;-1:-1:-1;;;;;5051:55:30;;5033:74;;12246:10:29;;12219:53:::2;::::0;5021:2:30;5006:18;12219:53:29::2;;;;;;;;1357:1:0::1;11917:362:29::0;;:::o;10075:132::-;10133:16;10168:32;:23;:30;:32::i;:::-;10161:39;;10075:132;:::o;34140:346::-;1482:19:2;:17;:19::i;:::-;4553:12:29::1;::::0;-1:-1:-1;;;;;4553:12:29::1;4539:10;:26;4531:73;;;::::0;-1:-1:-1;;;4531:73:29;;10802:2:30;4531:73:29::1;::::0;::::1;10784:21:30::0;10841:2;10821:18;;;10814:30;10880:34;10860:18;;;10853:62;-1:-1:-1;;;10931:18:30;;;10924:32;10973:19;;4531:73:29::1;10600:398:30::0;4531:73:29::1;3542:21:28::2;:19;:21::i;:::-;34365:19:29::3;34347:15;:37;34343:99;;;34393:49;::::0;::::3;::::0;;::::3;::::0;::::3;11177:25:30::0;;;34426:15:29::3;11218:18:30::0;;;11211:34;11150:18;;34393:49:29::3;11003:248:30::0;34343:99:29::3;34452:27;34474:4;34452:21;:27::i;:::-;3584:20:28::2;2096:1:::0;2679:30;4260:23;4007:283;3584:20:::2;34140:346:29::0;;:::o;12672:145::-;12749:4;12772:38;:16;12798:11;12772:25;:38::i;7803:269::-;4299:10;3581:4:26;3673:31;;;:14;;:31;:14;:31;;;3992:48:29;;3673:31:26;;4284:26:29;:51;;;;-1:-1:-1;1513:6:0;;-1:-1:-1;;;;;1513:6:0;4314:10:29;:21;;4284:51;4280:139;;;4358:50;;-1:-1:-1;;;4358:50:29;;4391:10;4358:50;;;10472:74:30;10562:18;;;10555:34;;;10445:18;;4358:50:29;10298:297:30;4280:139:29;-1:-1:-1;;;;;7960:40:29;::::1;;::::0;;;:25:::1;:40;::::0;;;;;;:49;;;8024:41;::::1;::::0;::::1;::::0;8003:6;861:25:30;;849:2;834:18;;715:177;24941:460:29;25036:10;25035:24;25063:1;25035:29;25031:58;;25073:16;;;;;;;;;;;;;;25031:58;25104:19;;;;;;;;:::i;:::-;-1:-1:-1;;;;;25103:33:29;;:38;25099:70;;25150:19;;;;;;;;;;;;;;25099:70;25184:42;:16;25210:15;;25184:25;:42::i;:::-;25179:74;;25235:18;;-1:-1:-1;;;25235:18:29;;;;;;;;;;;25179:74;25345:19;;;;;;;;:::i;:::-;25300:94;;;25366:13;11177:25:30;;25381:12:29;11233:2:30;11218:18;;11211:34;-1:-1:-1;;;;;25300:94:29;;;;;25328:15;;;25316:10;;25300:94;;11150:18:30;25300:94:29;;;;;;;24941:460;:::o;10213:414::-;1334:13:0;:11;:13::i;:::-;10319:9:29::1;10350:8;10346:167;;;10381:40;:24;10410:10:::0;10381:28:::1;:40::i;:::-;10374:47;;10346:167;;;10459:43;:24;10491:10:::0;10459:31:::1;:43::i;:::-;10452:50;;10346:167;10527:4;10522:38;;10540:20;;-1:-1:-1::0;;;10540:20:29::1;;;;;;;;;;;10522:38;10599:10;10575:45;10611:8;10575:45;;;;3238:14:30::0;3231:22;3213:41;;3201:2;3186:18;;3073:187;35706:118:29;1334:13:0;:11;:13::i;:::-;35792:25:29::1;35803:4;35809:7;35792:10;:25::i;:::-;;35706:118:::0;;:::o;13362:262::-;1482:19:2;:17;:19::i;:::-;13490:15:29::1;;13472:4;:14;;;:33:::0;13468:150:::1;;13521:29;13533:10;13545:4;13521:11;:29::i;:::-;13362:262:::0;:::o;13468:150::-:1;13581:26;13590:10;13602:4;13581:8;:26::i;6116:243:26:-:0;-1:-1:-1;;;;;6209:32:26;;6231:10;6209:32;6205:100;;6264:30;;;;;;;;;;;;;;6205:100;6315:37;6327:4;6333:18;6315:11;:37::i;32525:118:29:-;32575:16;32610:26;:17;:24;:26::i;25624:83::-;1729:16:2;:14;:16::i;:::-;1334:13:0::1;:11;:13::i;:::-;25690:10:29::2;:8;:10::i;:::-;25624:83::o:0;25536:82::-;1482:19:2;:17;:19::i;:::-;1334:13:0::1;:11;:13::i;:::-;25603:8:29::2;:6;:8::i;7420:331::-:0;1334:13:0;:11;:13::i;:::-;7560:25:29;-1:-1:-1;;;;;4929:22:29;::::1;4925:48;;4960:13;;-1:-1:-1::0;;;4960:13:29::1;;;;;;;;;;;4925:48;7630:24:::2;::::0;7606:76:::2;::::0;;-1:-1:-1;;;;;7630:24:29;;::::2;11430:74:30::0;;11540:55;;;11535:2;11520:18;;11513:83;7606:76:29::2;::::0;11403:18:30;7606:76:29::2;;;;;;;-1:-1:-1::0;7692:24:29::2;:52:::0;;-1:-1:-1;;;;;;7692:52:29::2;-1:-1:-1::0;;;;;7692:52:29;;;::::2;::::0;;;::::2;::::0;;7420:331::o;33871:211::-;1482:19:2;:17;:19::i;:::-;4553:12:29::1;::::0;-1:-1:-1;;;;;4553:12:29::1;4539:10;:26;4531:73;;;::::0;-1:-1:-1;;;4531:73:29;;10802:2:30;4531:73:29::1;::::0;::::1;10784:21:30::0;10841:2;10821:18;;;10814:30;10880:34;10860:18;;;10853:62;-1:-1:-1;;;10931:18:30;;;10924:32;10973:19;;4531:73:29::1;10600:398:30::0;4531:73:29::1;3542:21:28::2;:19;:21::i;:::-;34048:27:29::3;34070:4;34048:21;:27::i;:::-;3584:20:28::2;2096:1:::0;2679:30;4260:23;4007:283;2064:101:0;1334:13;:11;:13::i;:::-;2128:30:::1;2155:1;2128:18;:30::i;9743:326:29:-:0;1334:13:0;:11;:13::i;:::-;9834:44:29::1;:23;9867:10:::0;9834:32:::1;:44::i;:::-;9829:76;;9887:18;;;;;;;;;;;;;;9829:76;9915:9;9927:42;:23;9958:10:::0;9927:30:::1;:42::i;:::-;9915:54;;9984:4;9979:38;;9997:20;;-1:-1:-1::0;;;9997:20:29::1;;;;;;;;;;;9979:38;10032:30;::::0;10051:10;;10032:30:::1;::::0;;;::::1;9819:250;9743:326:::0;:::o;32131:111::-;1334:13:0;:11;:13::i;:::-;32211:10:29::1;:24:::0;;-1:-1:-1;;;;;;32211:24:29::1;-1:-1:-1::0;;;;;32211:24:29;;;::::1;::::0;;;::::1;::::0;;32131:111::o;5647:146::-;3279:19:1;3302:13;;;;;;3301:14;;3347:34;;;;-1:-1:-1;3365:12:1;;3380:1;3365:12;;;;:16;3347:34;3346:108;;;-1:-1:-1;3426:4:1;1713:19:3;:23;;;3387:66:1;;-1:-1:-1;3436:12:1;;;;;:17;3387:66;3325:201;;;;-1:-1:-1;;;3325:201:1;;11809:2:30;3325:201:1;;;11791:21:30;11848:2;11828:18;;;11821:30;11887:34;11867:18;;;11860:62;11958:16;11938:18;;;11931:44;11992:19;;3325:201:1;11607:410:30;3325:201:1;3536:12;:16;;-1:-1:-1;;3536:16:1;3551:1;3536:16;;;3562:65;;;;3596:13;:20;;-1:-1:-1;;3596:20:1;;;;;3562:65;5709:16:29::1;:14;:16::i;:::-;5735:17;:15;:17::i;:::-;5762:24;:22;:24::i;:::-;3651:14:1::0;3647:99;;;3697:5;3681:21;;-1:-1:-1;;3681:21:1;;;3721:14;;-1:-1:-1;12174:36:30;;3721:14:1;;12162:2:30;12147:18;3721:14:1;;;;;;;3269:483;5647:146:29:o;12881:126::-;12941:16;12976:24;:15;:22;:24::i;25954:255::-;1334:13:0;:11;:13::i;:::-;26103:27:29;-1:-1:-1;;;;;4929:22:29;::::1;4925:48;;4960:13;;-1:-1:-1::0;;;4960:13:29::1;;;;;;;;;;;4925:48;-1:-1:-1::0;26146:26:29::2;:56:::0;;-1:-1:-1;;;;;;26146:56:29::2;-1:-1:-1::0;;;;;26146:56:29;;;::::2;::::0;;;::::2;::::0;;25954:255::o;19361:1708::-;4747:24;;-1:-1:-1;;;;;4747:24:29;4733:10;:38;4729:81;;4780:30;;-1:-1:-1;;;4780:30:29;;;;;;;;;;;4729:81;1482:19:2::1;:17;:19::i;:::-;19546:24:29::2;::::0;19522:64:::2;::::0;-1:-1:-1;;;19522:64:29;;-1:-1:-1;;;;;19546:24:29;;::::2;::::0;19522:58:::2;::::0;:64:::2;::::0;19581:4;;19522:64:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;19624:8:29::2;::::0;-1:-1:-1;;;19624:8:29;;;::::2;::::0;::::2;;:::i;:::-;-1:-1:-1::0;;;;;19605:27:29::2;:16;::::0;;;::::2;::::0;::::2;;:::i;:::-;-1:-1:-1::0;;;;;19605:27:29::2;;19597:82;;;::::0;-1:-1:-1;;;19597:82:29;;13769:2:30;19597:82:29::2;::::0;::::2;13751:21:30::0;13808:2;13788:18;;;13781:30;13847:34;13827:18;;;13820:62;13918:12;13898:18;;;13891:40;13948:19;;19597:82:29::2;13567:406:30::0;19597:82:29::2;19690:14;19726:8;::::0;;;::::2;::::0;::::2;;:::i;:::-;19707:16;::::0;;;::::2;::::0;::::2;;:::i;:::-;:27;;;;:::i;:::-;19690:44;;19767:15;;19749:4;:14;;;:33:::0;19745:1026:::2;;19802:4;:26;19829:13;::::0;;;::::2;::::0;::::2;;:::i;:::-;19802:49;::::0;-1:-1:-1;;;;;;19802:49:29::2;::::0;;;;;;-1:-1:-1;;;;;14418:55:30;;;19802:49:29::2;::::0;::::2;14400:74:30::0;-1:-1:-1;;;;;14510:47:30;;14490:18;;;14483:75;14373:18;;19802:49:29::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;19798:288;;20049:13;::::0;;;::::2;::::0;::::2;;:::i;:::-;20022:49;::::0;-1:-1:-1;;;;;14733:47:30;;14715:66;;-1:-1:-1;;;;;20022:49:29;;;::::2;::::0;20045:1:::2;::::0;20022:49:::2;::::0;14703:2:30;14688:18;20022:49:29::2;;;;;;;19745:1026;;19798:288;19745:1026;;;20222:14;::::0;;::::2;;20180:19;20209:28:::0;;;:12:::2;:28;::::0;;;;;20260:37;;-1:-1:-1;;;20260:37:29;;20291:4:::2;20260:37;::::0;::::2;5033:74:30::0;-1:-1:-1;;;;;20209:28:29;;::::2;::::0;-1:-1:-1;;;;;20260:47:29;::::2;::::0;20209:28;;20260:22:::2;::::0;5006:18:30;;20260:37:29::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:47;;20252:90;;;::::0;-1:-1:-1;;;20252:90:29;;14994:2:30;20252:90:29::2;::::0;::::2;14976:21:30::0;15033:2;15013:18;;;15006:30;15072:32;15052:18;;;15045:60;15122:18;;20252:90:29::2;14792:354:30::0;20252:90:29::2;20522:52;20537:13;::::0;;;::::2;::::0;::::2;;:::i;:::-;20560:12;20522:14;:52::i;:::-;20517:244;;20637:13;::::0;;;::::2;::::0;::::2;;:::i;:::-;20599:60;::::0;-1:-1:-1;;;;;14733:47:30;;14715:66;;-1:-1:-1;;;;;20599:60:29;;::::2;::::0;;::::2;::::0;::::2;::::0;14703:2:30;14688:18;20599:60:29::2;;;;;;;20517:244;;;20698:48;20724:13;::::0;;;::::2;::::0;::::2;;:::i;:::-;-1:-1:-1::0;;;;;20698:25:29;::::2;::::0;-1:-1:-1;;;;;20698:48:29;::::2;:25;:48::i;:::-;20102:669;19745:1026;20873:18;::::0;;;::::2;::::0;::::2;;:::i;:::-;20816:246;;20845:14:::0;::::2;20816:246;20905:15;::::0;::::2;;20934:11;::::0;;;::::2;::::0;::::2;;:::i;:::-;20959:13;::::0;;;::::2;::::0;::::2;;:::i;:::-;20986:14;::::0;::::2;;21014:16;::::0;;;::::2;::::0;::::2;;:::i;:::-;21044:8;::::0;;;::::2;::::0;::::2;;:::i;:::-;20816:246;::::0;;15627:25:30;;;-1:-1:-1;;;;;15688:55:30;;;15683:2;15668:18;;15661:83;15780:55;;;;15760:18;;;15753:83;;;;15867:2;15852:18;;15845:34;-1:-1:-1;;;;;15916:47:30;;;15910:3;15895:19;;15888:76;16001:47;15995:3;15980:19;;15973:76;15614:3;15599:19;20816:246:29::2;;;;;;;19471:1598;19361:1708:::0;:::o;10633:136::-;10694:16;10729:33;:24;:31;:33::i;6072:1293::-;4747:24;;-1:-1:-1;;;;;4747:24:29;4733:10;:38;4729:81;;4780:30;;-1:-1:-1;;;4780:30:29;;;;;;;;;;;4729:81;6310:13:::1;6291:4;:15;;;:32;6283:71;;;::::0;-1:-1:-1;;;6283:71:29;;16262:2:30;6283:71:29::1;::::0;::::1;16244:21:30::0;16301:2;16281:18;;;16274:30;16340:28;16320:18;;;16313:56;16386:18;;6283:71:29::1;16060:350:30::0;6283:71:29::1;6365:18;6386:42;:16;6412:15:::0;::::1;6386:25;:42::i;:::-;6365:63:::0;-1:-1:-1;6443:12:29::1;::::0;;;::::1;::::0;::::1;;:::i;:::-;6439:830;;;6511:13;6507:223;;;6644:15:::0;::::1;6614:77;6661:15;::::0;::::1;;6678:12;::::0;;;::::1;::::0;::::1;;:::i;:::-;6614:77;::::0;;16583:25:30;;;16651:14;;16644:22;16639:2;16624:18;;16617:50;16556:18;6614:77:29::1;;;;;;;6709:7;13362:262:::0;:::o;6507:223::-:1;6793:37;:16;6814:15:::0;::::1;6793:20;:37::i;:::-;;6439:830;;;6905:13;6900:252;;7066:15:::0;::::1;7036:77;7083:15;::::0;::::1;;7100:12;::::0;;;::::1;::::0;::::1;;:::i;6900:252::-;7218:40;:16;7242:15:::0;::::1;7218:23;:40::i;:::-;;6439:830;7311:15:::0;::::1;7284:74;7328:15;::::0;::::1;;7345:12;::::0;;;::::1;::::0;::::1;;:::i;8120:321::-:0;1334:13:0;:11;:13::i;:::-;8259:21:29;-1:-1:-1;;;;;4929:22:29;::::1;4925:48;;4960:13;;-1:-1:-1::0;;;4960:13:29::1;;;;;;;;;;;4925:48;8333:13:::2;::::0;8301:70:::2;::::0;;-1:-1:-1;;;;;8333:13:29;;::::2;11430:74:30::0;;11540:55;;;11535:2;11520:18;;11513:83;8301:70:29::2;::::0;11403:18:30;8301:70:29::2;;;;;;;-1:-1:-1::0;8381:13:29::2;:53:::0;;-1:-1:-1;;;;;;8381:53:29::2;-1:-1:-1::0;;;;;8381:53:29;;;::::2;::::0;;;::::2;::::0;;8120:321::o;26578:2147::-;4747:24;;-1:-1:-1;;;;;4747:24:29;4733:10;:38;4729:81;;4780:30;;-1:-1:-1;;;4780:30:29;;;;;;;;;;;4729:81;26789:14:::1;::::0;::::1;;26756:17;26776:28:::0;;;:12:::1;:28;::::0;;;;;-1:-1:-1;;;;;26776:28:29::1;::::0;26814:49:::1;;26850:13;;-1:-1:-1::0;;;26850:13:29::1;;;;;;;;;;;26814:49;26878;:24;26912:14;::::0;::::1;;26878:33;:49::i;:::-;26873:88;;26936:25;;-1:-1:-1::0;;;26936:25:29::1;;;;;;;;;;;26873:88;27041:22;::::0;-1:-1:-1;;;;;27015:25:29;;::::1;::::0;::::1;::::0;27041:22:::1;::::0;;::::1;;27065:11;::::0;;;::::1;::::0;::::1;;:::i;:::-;27015:62;::::0;-1:-1:-1;;;;;;27015:62:29::1;::::0;;;;;;-1:-1:-1;;;;;14418:55:30;;;27015:62:29::1;::::0;::::1;14400:74:30::0;-1:-1:-1;;;;;14510:47:30;14490:18;;;14483:75;14373:18;;27015:62:29::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;27109:22:29::1;::::0;::::1;::::0;::::1;-1:-1:-1::0;;;;;27109:22:29::1;27091:69;27178:11;::::0;;;::::1;::::0;::::1;;:::i;:::-;27207:14;;::::0;::::1;:4:::0;:14:::1;:::i;:::-;27239:37;27255:20;::::0;;;::::1;::::0;::::1;;:::i;:::-;27239:15;:37::i;:::-;27294:9:::0;27321:37:::1;27337:20;::::0;;;::::1;::::0;::::1;;:::i;27321:37::-;27376:10;::::0;27404:21:::1;::::0;27091:348:::1;::::0;::::1;::::0;;;-1:-1:-1;;;;;;27091:348:29;;;-1:-1:-1;;;;;17446:47:30;;;27091:348:29::1;::::0;::::1;17428:66:30::0;27404:21:29::1;17530:23:30::0;;;17510:18;;;17503:51;17570:18;;;17563:34;;;;-1:-1:-1;;;;;17633:55:30;;;17613:18;;;17606:83;17705:19;;;17698:35;17749:19;;;17742:35;27404:21:29::1;17793:19:30::0;;;17786:52;17400:19;;27091:348:29::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;27087:1632;;28250:24;::::0;28325:365:::1;::::0;;::::1;::::0;::::1;::::0;;28250:24:::1;28325:365:::0;;-1:-1:-1;;;;;28250:24:29;;::::1;::::0;28226:77:::1;::::0;28325:365:::1;::::0;;::::1;::::0;28405:16:::1;::::0;;;;;;::::1;;:::i;:::-;28325:365;;::::0;;::::1;;28455:11;::::0;;;::::1;::::0;::::1;;:::i;:::-;-1:-1:-1::0;;;;;28325:365:29::1;;;;;28503:4;:14;;;28325:365;;;;28556:4;:16;;;28325:365;;;;28611:4;:16;;;28325:365;;::::0;28226:482:::1;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;34140:346:::0;;:::o;27087:1632::-:1;27607:24;::::0;27682:364:::1;::::0;;::::1;::::0;::::1;::::0;;27607:24;27682:364;;-1:-1:-1;;;;;27607:24:29;;::::1;::::0;27583:77:::1;::::0;27682:364:::1;::::0;;::::1;::::0;27762:16:::1;::::0;;;;;;::::1;;:::i;13766:314::-:0;1482:19:2;:17;:19::i;:::-;13950:15:29::1;;13932:4;:14;;;:33:::0;13928:146:::1;;13981:27;13993:8;14003:4;13981:11;:27::i;13928:146::-;14039:24;14048:8;14058:4;14039:8;:24::i;12355:246::-:0;12430:7;12453:36;:15;12478:10;12453:24;:36::i;:::-;12449:146;;;-1:-1:-1;12512:24:29;;;;:12;:24;;;;;;-1:-1:-1;;;;;12512:24:29;;12355:246::o;12449:146::-;-1:-1:-1;12582:1:29;;12355:246;-1:-1:-1;12355:246:29:o;12449:146::-;12355:246;;;:::o;8628:760::-;1334:13:0;:11;:13::i;:::-;8726:9:29::1;8757:8;8753:529;;;8888:1;8852:24:::0;;;:12:::1;:24;::::0;;;;;-1:-1:-1;;;;;8852:24:29::1;:38:::0;:71;::::1;;;;8908:15;;8894:10;:29;;8852:71;8848:97;;;8932:13;;-1:-1:-1::0;;;8932:13:29::1;;;;;;;;;;;8848:97;8966:31;:15;8986:10:::0;8966:19:::1;:31::i;:::-;8959:38;;8753:529;;;9035:34;:15;9058:10:::0;9035:22:::1;:34::i;:::-;9028:41:::0;-1:-1:-1;9087:44:29::1;:23;9120:10:::0;9087:32:::1;:44::i;:::-;9083:189;;;9214:42;:23;9245:10:::0;9214:30:::1;:42::i;:::-;;9083:189;9296:4;9291:38;;9309:20;;-1:-1:-1::0;;;9309:20:29::1;;;;;;;;;;;9291:38;9360:10;9344:37;9372:8;9344:37;;;;3238:14:30::0;3231:22;3213:41;;3201:2;3186:18;;3073:187;14728:126:29;1334:13:0;:11;:13::i;:::-;1482:19:2::1;:17;:19::i;:::-;14819:17:29::2;:28:::0;;-1:-1:-1;;14819:28:29::2;::::0;::::2;;::::0;;;::::2;::::0;;14728:126::o;26215:357::-;1334:13:0;:11;:13::i;:::-;26309:10:29::1;:20:::0;;;26360:40:::1;::::0;::::1;3829:4;26360:40;::::0;:86:::1;;-1:-1:-1::0;26404:42:29::1;::::0;::::1;3885:4;26404:42;26360:86;26339:174;;;::::0;-1:-1:-1;;;26339:174:29;;18834:2:30;26339:174:29::1;::::0;::::1;18816:21:30::0;18873:2;18853:18;;;18846:30;18912:34;18892:18;;;18885:62;18983:11;18963:18;;;18956:39;19012:19;;26339:174:29::1;18632:405:30::0;26339:174:29::1;26523:21;:42:::0;;-1:-1:-1;;26523:42:29::1;;::::0;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;26215:357:29:o;28731:2685::-;4747:24;;-1:-1:-1;;;;;4747:24:29;4733:10;:38;4729:81;;4780:30;;-1:-1:-1;;;4780:30:29;;;;;;;;;;;4729:81;28888:14:::1;::::0;;::::1;;28855:17;28875:28:::0;;;:12:::1;:28;::::0;;;-1:-1:-1;;;;;28875:28:29::1;::::0;28913:49:::1;;28949:13;;-1:-1:-1::0;;;28949:13:29::1;;;;;;;;;;;28913:49;28977;:24;29011:14;::::0;::::1;;28977:33;:49::i;:::-;28972:88;;29035:25;;-1:-1:-1::0;;;29035:25:29::1;;;;;;;;;;;28972:88;29099:42;::::0;-1:-1:-1;;;29099:42:29;;29135:4:::1;29099:42;::::0;::::1;5033:74:30::0;29071:25:29::1;::::0;-1:-1:-1;;;;;29099:27:29;::::1;::::0;::::1;::::0;5006:18:30;;29099:42:29::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;29177:26;::::0;29071:70;;-1:-1:-1;;;;;;29177:26:29::1;29155:64;29220:17;;::::0;::::1;:4:::0;:17:::1;:::i;:::-;29239:21;;::::0;::::1;:4:::0;:21:::1;:::i;:::-;29155:106;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;29151:2259;;;;:::i;:::-;;;::::0;::::1;;;;;:::i;:::-;;;;;;;;30739:28;:51;;;;;;;;;;;;;;;;::::0;::::1;;30804:12;30885:14;30868:32;;;;;;;;:::i;:::-;;;;;;;;;;;;;30858:43;;;;;;30846:6;30829:24;;;;;;;;:::i;:::-;;::::0;;-1:-1:-1;;30829:24:29;;::::1;::::0;;;;;;30819:35;;30829:24:::1;30819:35:::0;;::::1;::::0;30939:24:::1;::::0;31014:367:::1;::::0;::::1;::::0;;;30819:82;;;::::1;31014:367:::0;;;30819:82;-1:-1:-1;;;;;;30939:24:29::1;::::0;30915:77:::1;::::0;30829:24;31014:367;;::::1;::::0;31094:16:::1;::::0;;::::1;:4:::0;:16:::1;:::i;:::-;31014:367;;;;;;31144:4;:11;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;31014:367:29::1;;;;;31192:4;:14;;;31014:367;;;;31245:4;:16;;;31014:367;;;;31300:4;:16;;;31014:367;;::::0;30915:484:::1;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;30311:1099;;30277:1133;35792:25;35706:118:::0;;:::o;29151:2259::-:1;;;;;::::0;::::1;;;;;29304:42;::::0;-1:-1:-1;;;29304:42:29;;29340:4:::1;29304:42;::::0;::::1;5033:74:30::0;29277:24:29::1;::::0;-1:-1:-1;;;;;29304:27:29;::::1;::::0;::::1;::::0;5006:18:30;;29304:42:29::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;29277:69:::0;-1:-1:-1;29360:20:29::1;29383:36;29402:17:::0;29277:69;29383:36:::1;:::i;:::-;29503:21;::::0;29360:59;;-1:-1:-1;29503:45:29::1;:21;-1:-1:-1::0;;29503:45:29;29499:170:::1;;29591:11;::::0;;;::::1;::::0;::::1;;:::i;:::-;-1:-1:-1::0;;;;;29575:27:29::1;:12;:27;29567:87;;;::::0;-1:-1:-1;;;29567:87:29;;22555:2:30;29567:87:29::1;::::0;::::1;22537:21:30::0;22594:2;22574:18;;;22567:30;22633:34;22613:18;;;22606:62;22704:17;22684:18;;;22677:45;22739:19;;29567:87:29::1;22353:411:30::0;29567:87:29::1;29848:24;::::0;29902:349:::1;::::0;;::::1;::::0;::::1;::::0;;;29848:24;29902:349;;-1:-1:-1;;;;;29848:24:29;;::::1;::::0;29824:60:::1;::::0;29902:349:::1;::::0;;::::1;::::0;29978:16:::1;::::0;;::::1;:4:::0;:16:::1;:::i;:::-;29902:349;;;;;;30024:24;:12;:22;:24::i;:::-;-1:-1:-1::0;;;;;29902:349:29::1;;;;;30081:4;:14;;;29902:349;;;;30130:4;:16;;;29902:349;;;;30181:4;:16;;;29902:349;;::::0;29824:441:::1;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;29262:1014;;28844:2572;;28731:2685:::0;:::o;32294:185::-;1334:13:0;:11;:13::i;:::-;32374::29;-1:-1:-1;;;;;4929:22:29;::::1;4925:48;;4960:13;;-1:-1:-1::0;;;4960:13:29::1;;;;;;;;;;;4925:48;32399:12:::2;:28:::0;;-1:-1:-1;;;;;;32399:28:29::2;-1:-1:-1::0;;;;;32399:28:29;::::2;::::0;;::::2;::::0;;;32443:29:::2;::::0;5033:74:30;;;32443:29:29::2;::::0;5021:2:30;5006:18;32443:29:29::2;;;;;;;1357:1:0::1;32294:185:29::0;:::o;35866:120::-;1334:13:0;:11;:13::i;13076:128:29:-;13137:16;13172:25;:16;:23;:25::i;10834:443::-;4299:10;3581:4:26;3673:31;;;:14;;:31;:14;:31;;;4093:48:29;;3673:31:26;;4284:26:29;:51;;;;-1:-1:-1;1513:6:0;;-1:-1:-1;;;;;1513:6:0;4314:10:29;:21;;4284:51;4280:139;;;4358:50;;-1:-1:-1;;;4358:50:29;;4391:10;4358:50;;;10472:74:30;10562:18;;;10555:34;;;10445:18;;4358:50:29;10298:297:30;4280:139:29;10989:9:::1;11020:8;11016:153;;;11051:33;:16;11072:11:::0;11051:20:::1;:33::i;:::-;11044:40;;11016:153;;;11122:36;:16;11146:11:::0;11122:23:::1;:36::i;:::-;11115:43;;11016:153;11183:4;11178:38;;11196:20;;-1:-1:-1::0;;;11196:20:29::1;;;;;;;;;;;11178:38;11248:11;11231:39;11261:8;11231:39;;;;3238:14:30::0;3231:22;3213:41;;3201:2;3186:18;;3073:187;11231:39:29::1;;;;;;;;10979:298;10834:443:::0;;;:::o;32719:128::-;32782:4;32805:35;:17;32832:7;32805:26;:35::i;11321:133::-;1334:13:0;:11;:13::i;:::-;11413:15:29::1;:34:::0;11321:133::o;2314:198:0:-;1334:13;:11;:13::i;:::-;-1:-1:-1;;;;;2402:22:0;::::1;2394:73;;;::::0;-1:-1:-1;;;2394:73:0;;22971:2:30;2394:73:0::1;::::0;::::1;22953:21:30::0;23010:2;22990:18;;;22983:30;23049:34;23029:18;;;23022:62;23120:8;23100:18;;;23093:36;23146:19;;2394:73:0::1;22769:402:30::0;2394:73:0::1;2477:28;2496:8;2477:18;:28::i;11507:220:29:-:0;4299:10;3581:4:26;3673:31;;;:14;;:31;:14;:31;;;3992:48:29;;3673:31:26;;4284:26:29;:51;;;;-1:-1:-1;1513:6:0;;-1:-1:-1;;;;;1513:6:0;4314:10:29;:21;;4284:51;4280:139;;;4358:50;;-1:-1:-1;;;4358:50:29;;4391:10;4358:50;;;10472:74:30;10562:18;;;10555:34;;;10445:18;;4358:50:29;10298:297:30;4280:139:29;-1:-1:-1;11670:23:29::1;:50:::0;11507:220::o;31550:195::-;31638:10;31660:4;31638:27;31630:67;;;;-1:-1:-1;;;31630:67:29;;23378:2:30;31630:67:29;;;23360:21:30;23417:2;23397:18;;;23390:30;23456:29;23436:18;;;23429:57;23503:18;;31630:67:29;23176:351:30;31630:67:29;31707:31;-1:-1:-1;;;;;31707:22:29;;31730:7;31707:22;:31::i;25713:235::-;1334:13:0;:11;:13::i;:::-;25854:23:29;-1:-1:-1;;;;;4929:22:29;::::1;4925:48;;4960:13;;-1:-1:-1::0;;;4960:13:29::1;;;;;;;;;;;4925:48;-1:-1:-1::0;25893:22:29::2;:48:::0;;-1:-1:-1;;;;;25893:48:29;;::::2;;;::::0;;;::::2;::::0;;;::::2;::::0;;25713:235::o;21222:2839::-;4747:24;;-1:-1:-1;;;;;4747:24:29;4733:10;:38;4729:81;;4780:30;;-1:-1:-1;;;4780:30:29;;;;;;;;;;;4729:81;1482:19:2::1;:17;:19::i;:::-;21381:49:29::2;21433:342;;;;;;;;21483:4;:14;;;21433:342;;;;21523:4;:15;;;21433:342;;;;21563:4;:14;;;21433:342;;;;21604:4;:16;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;21433:342:29::2;::::0;;::::2;;21639:8;::::0;;;::::2;::::0;::::2;;:::i;:::-;-1:-1:-1::0;;;;;21433:342:29::2;::::0;;::::2;;21669:11;::::0;;;::::2;::::0;::::2;;:::i;:::-;-1:-1:-1::0;;;;;21433:342:29::2;::::0;;::::2;;21704:13;::::0;;;::::2;::::0;::::2;;:::i;:::-;-1:-1:-1::0;;;;;21433:342:29::2;::::0;;::::2;;21746:18;::::0;;;::::2;::::0;::::2;;:::i;:::-;21433:342;;::::0;;21850:24:::2;::::0;21826:77:::2;::::0;-1:-1:-1;;;21826:77:29;;21381:394;;-1:-1:-1;;;;;;21850:24:29::2;::::0;21826:58:::2;::::0;:77:::2;::::0;21381:394;;21826:77:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;21941:8:29::2;::::0;-1:-1:-1;;;21941:8:29;;;::::2;::::0;::::2;;:::i;:::-;-1:-1:-1::0;;;;;21922:27:29::2;:16;::::0;;;::::2;::::0;::::2;;:::i;:::-;-1:-1:-1::0;;;;;21922:27:29::2;;21914:91;;;::::0;-1:-1:-1;;;21914:91:29;;24667:2:30;21914:91:29::2;::::0;::::2;24649:21:30::0;24706:2;24686:18;;;24679:30;24745:34;24725:18;;;24718:62;24816:21;24796:18;;;24789:49;24855:19;;21914:91:29::2;24465:415:30::0;21914:91:29::2;22016:14;22052:8;::::0;;;::::2;::::0;::::2;;:::i;:::-;22033:16;::::0;;;::::2;::::0;::::2;;:::i;:::-;:27;;;;:::i;:::-;22016:44;;22093:15;;22075:4;:14;;;:33:::0;22071:1692:::2;;22180:4;:26;22207:13;::::0;;;::::2;::::0;::::2;;:::i;:::-;22180:49;::::0;-1:-1:-1;;;;;;22180:49:29::2;::::0;;;;;;-1:-1:-1;;;;;14418:55:30;;;22180:49:29::2;::::0;::::2;14400:74:30::0;-1:-1:-1;;;;;14510:47:30;;14490:18;;;14483:75;14373:18;;22180:49:29::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;22176:288;;22427:13;::::0;;;::::2;::::0;::::2;;:::i;:::-;22400:49;::::0;-1:-1:-1;;;;;14733:47:30;;14715:66;;-1:-1:-1;;;;;22400:49:29;;;::::2;::::0;22423:1:::2;::::0;22400:49:::2;::::0;14703:2:30;14688:18;22400:49:29::2;;;;;;;22071:1692;;22176:288;22071:1692;;;22600:14;::::0;::::2;;22558:19;22587:28:::0;;;:12:::2;:28;::::0;;;;;;;22638:37;;-1:-1:-1;;;22638:37:29;;22669:4:::2;22638:37;::::0;::::2;5033:74:30::0;-1:-1:-1;;;;;22587:28:29;;::::2;::::0;-1:-1:-1;;;;;22638:47:29;::::2;::::0;22587:28;;22638:22:::2;::::0;5006:18:30;;22638:37:29::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:47;;22630:87;;;::::0;-1:-1:-1;;;22630:87:29;;25087:2:30;22630:87:29::2;::::0;::::2;25069:21:30::0;25126:2;25106:18;;;25099:30;25165:29;25145:18;;;25138:57;25212:18;;22630:87:29::2;24885:351:30::0;22630:87:29::2;23017:52;23032:13;::::0;;;::::2;::::0;::::2;;:::i;23017:52::-;23012:741;;23132:13;::::0;;;::::2;::::0;::::2;;:::i;:::-;23094:60;::::0;-1:-1:-1;;;;;14733:47:30;;14715:66;;-1:-1:-1;;;;;23094:60:29;;::::2;::::0;;::::2;::::0;::::2;::::0;14703:2:30;14688:18;23094:60:29::2;;;;;;;23012:741;;;23311:34;23293:14;;::::0;::::2;:4:::0;:14:::2;:::i;:::-;:52;;;;;;;;:::i;:::-;::::0;23289:450:::2;;23369:47;23394:13;::::0;;;::::2;::::0;::::2;;:::i;:::-;-1:-1:-1::0;;;;;23369:24:29;::::2;::::0;-1:-1:-1;;;;;23369:47:29;::::2;:24;:47::i;:::-;23453:13;::::0;;;::::2;::::0;::::2;;:::i;:::-;23528:15;23438:137:::0;;;;;23513:13:::2;::::0;::::2;;23438:137;::::0;::::2;25936:25:30::0;23528:15:29;;::::2;;25977:18:30::0;;;25970:34;-1:-1:-1;;;;;26040:55:30;;;26020:18;;;26013:83;-1:-1:-1;;;;;26132:47:30;;26112:18;;;26105:75;23438:74:29;;;::::2;::::0;::::2;::::0;25908:19:30;;23438:137:29::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;23289:450;;;23622:26;23604:14;;::::0;::::2;:4:::0;:14:::2;:::i;:::-;:44;;;;;;;;:::i;:::-;::::0;23600:139:::2;;23672:48;23698:13;::::0;;;::::2;::::0;::::2;;:::i;23672:48::-;22480:1283;22071:1692;23865:18;::::0;;;::::2;::::0;::::2;;:::i;:::-;23808:246;;23837:14;::::0;::::2;;23808:246;23897:15;::::0;::::2;;23926:11;::::0;;;::::2;::::0;::::2;;:::i;:::-;23951:13;::::0;;;::::2;::::0;::::2;;:::i;:::-;23978:14;::::0;::::2;;24006:16;::::0;;;::::2;::::0;::::2;;:::i;:::-;24036:8;::::0;;;::::2;::::0;::::2;;:::i;:::-;23808:246;::::0;;15627:25:30;;;-1:-1:-1;;;;;15688:55:30;;;15683:2;15668:18;;15661:83;15780:55;;;;15760:18;;;15753:83;;;;15867:2;15852:18;;15845:34;-1:-1:-1;;;;;15916:47:30;;;15910:3;15895:19;;15888:76;16001:47;15995:3;15980:19;;15973:76;15614:3;15599:19;23808:246:29::2;;;;;;;21371:2690;;21222:2839:::0;:::o;18438:714::-;18579:14;;;;5124:36;:15;18579:14;5124:24;:36::i;:::-;5119:67;;5169:17;;-1:-1:-1;;;5169:17:29;;;;;;;;;;;5119:67;5200:44;:23;5233:10;5200:32;:44::i;:::-;5196:79;;;5253:22;;;;;;;;;;;;;;5196:79;5371:15;;5357:10;:29;;:71;;;;-1:-1:-1;5426:1:29;5390:24;;;:12;:24;;;;;;-1:-1:-1;;;;;5390:24:29;:38;5357:71;5353:105;;;5437:21;;-1:-1:-1;;;5437:21:29;;;;;;;;;;;5353:105;18660:42:::1;:16;18686:15;::::0;::::1;;18660:25;:42::i;:::-;18655:74;;18711:18;;-1:-1:-1::0;;;18711:18:29::1;;;;;;;;;;;18655:74;18812:12;::::0;-1:-1:-1;;;;;18812:12:29::1;18798:10;:26;18794:258;;1179:37:21::0;;;-1:-1:-1;;;;;10490:55:30;;18956:15:29::1;1179:37:21::0;;;10472:74:30;;;;18956:15:29;;::::1;;10562:18:30::0;;;10555:34;1179:37:21;;;;;;;;;10445:18:30;;;;1179:37:21;;;1169:48;;;;;18940:14:29;::::1;1169:62:21::0;18911:131:29::1;;19009:18;;;;;;;;;;;;;;18911:131;19102:16;::::0;;;::::1;::::0;::::1;;:::i;:::-;-1:-1:-1::0;;;;;19102:21:29::1;19122:1;19102:21:::0;19098:47:::1;;19132:13;;;;;;;;;;;;;;1599:130:0::0;1513:6;;-1:-1:-1;;;;;1513:6:0;929:10:4;1662:23:0;1654:68;;;;-1:-1:-1;;;1654:68:0;;26393:2:30;1654:68:0;;;26375:21:30;;;26412:18;;;26405:30;26471:34;26451:18;;;26444:62;26523:18;;1654:68:0;26191:356:30;6412:138:14;6492:4;4343:19;;;:12;;;:19;;;;;;:24;;6515:28;6508:35;6412:138;-1:-1:-1;;;6412:138:14:o;5911:123::-;5981:4;6004:23;6009:3;6021:5;6004:4;:23::i;7757:300::-;7820:16;7848:22;7873:19;7881:3;7873:7;:19::i;2010:106:2:-;1928:7;;;;2079:9;2071:38;;;;-1:-1:-1;;;2071:38:2;;26754:2:30;2071:38:2;;;26736:21:30;26793:2;26773:18;;;26766:30;26832:18;26812;;;26805:46;26868:18;;2071:38:2;26552:340:30;3617:384:28;2679:30;3817:9;;-1:-1:-1;;3817:20:28;3813:88;;3860:30;;;;;;;;;;;;;;3813:88;2138:1;3975:19;;3617:384::o;34492:1071:29:-;34581:19;34595:4;34581:13;:19::i;:::-;34610:35;:17;34632:12;;34610:21;:35::i;:::-;;34680:15;;34660:4;:16;;;:35;34656:228;;34747:16;;;;;34711:20;34734:30;;;:12;:30;;;;-1:-1:-1;;;;;34734:30:29;;34827:46;34845:7;;;;;;;;:::i;:::-;-1:-1:-1;;;;;34827:17:29;;;34854:18;;;;34827:17;:46::i;:::-;34697:187;;34656:228;34894:13;34945:15;;34925:4;:16;;;:35;34921:84;;-1:-1:-1;34984:10:29;;;;34921:84;35016:12;;35053:7;;;;;;;;:::i;:::-;-1:-1:-1;;;;;35053:12:29;35073:5;35080:17;;;;:4;:17;:::i;:::-;35053:45;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35015:83;;;;35113:7;35108:119;;35195:6;35189:13;35182:4;35174:6;35170:17;35163:40;35108:119;35261:15;;35241:4;:16;;;:35;35237:211;;35328:16;;;;;35292:20;35315:30;;;:12;:30;;;;-1:-1:-1;;;;;35315:30:29;;35408:29;35426:7;;;;;;;;:::i;:::-;-1:-1:-1;;;;;35408:17:29;;;35435:1;35408:17;:29::i;:::-;35278:170;;35237:211;35484:12;;35463:93;35498:16;;;;35516:18;;;;35536:7;;;;;;;;:::i;:::-;35463:93;;;27404:25:30;;;27460:2;27445:18;;27438:34;;;;-1:-1:-1;;;;;27508:55:30;27488:18;;;27481:83;35545:10:29;;;;27595:2:30;27580:18;;27573:34;27391:3;27376:19;35463:93:29;27173:440:30;4007:283:28;2096:1;2679:30;4260:23;4007:283::o;6202:129:14:-;6275:4;6298:26;6306:3;6318:5;6298:7;:26::i;7036:385:26:-;7113:4;3673:14;;;2960:28;3673:14;;;;;;;;-1:-1:-1;;;;;3673:31:26;;;;;;;;;;;;7198:217;;7241:8;:14;;;;;;;;;;;-1:-1:-1;;;;;7241:31:26;;;;;;;;;;:38;;-1:-1:-1;;7241:38:26;7275:4;7241:38;;;7298;7325:10;;7250:4;;7298:38;;7241:8;7298:38;7357:4;7350:11;;;;;7198:217;7399:5;7392:12;;;;;7198:217;7119:302;7036:385;;;;:::o;16823:1555:29:-;16922:32;16939:8;16949:4;16922:16;:32::i;:::-;16965:27;16995:21;:9;:19;:21::i;:::-;16965:51;-1:-1:-1;17053:16:29;;;;;;;;:::i;:::-;-1:-1:-1;;;;;17031:38:29;:19;-1:-1:-1;;;;;17031:38:29;;17027:85;;;17078:34;;;;;;;;;;;;;;17027:85;17183:23;;:28;;;;:138;;-1:-1:-1;17298:23:29;;-1:-1:-1;;;;;17232:62:29;;17251:21;17232:16;;;;;;;;:::i;:::-;-1:-1:-1;;;;;17232:40:29;;;;;:::i;:::-;:62;;;;:::i;:::-;17231:90;17183:138;17166:218;;;17353:20;;-1:-1:-1;;;17353:20:29;;;;;;;;;;;17166:218;17429:42;17474:139;;;;;;;;17511:4;:14;;;17474:139;;;;17527:8;-1:-1:-1;;;;;17474:139:29;;;;;17537:4;:15;;;17474:139;;;;17554:4;:14;;;17474:139;;;;17570:4;:16;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;17474:139:29;;;;;17588:15;:13;:15::i;:::-;17474:139;;;;17429:184;-1:-1:-1;17651:21:29;17697:16;;;;;;;;:::i;:::-;17675:38;;:19;:38;:::i;:::-;17900:17;;-1:-1:-1;;;;;17651:62:29;;;;;-1:-1:-1;17900:17:29;;17896:357;;;17937:13;17954:1;17937:18;17933:47;;17964:16;;-1:-1:-1;;;17964:16:29;;;;;;;;;;;17933:47;18018:24;;17994:147;;-1:-1:-1;;;17994:147:29;;-1:-1:-1;;;;;18018:24:29;;;;17994:70;;18072:13;;17994:147;;18104:10;;18116:11;;17994:147;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17896:357;;;18196:24;;18172:70;;-1:-1:-1;;;18172:70:29;;-1:-1:-1;;;;;18196:24:29;;;;18172:57;;:70;;18230:11;;18172:70;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17896:357;18327:9;;-1:-1:-1;;;;;18267:104:29;;;18300:15;;;;;18284:14;;;18267:104;;-1:-1:-1;;;18327:9:29;;;;18338:14;;;;18354:16;;;;;;;;:::i;:::-;18267:104;;;28365:18:30;28353:31;;;28335:50;;28416:2;28401:18;;28394:34;;;;-1:-1:-1;;;;;28464:47:30;28444:18;;;28437:75;28323:2;28308:18;18267:104:29;;;;;;;16912:1466;;;16823:1555;;:::o;14927:1890::-;15023:32;15040:8;15050:4;15023:16;:32::i;:::-;15177:14;;;;;15135:19;15164:28;;;:12;:28;;;;;;;;-1:-1:-1;;;;;15164:28:29;15533:48;;;:25;:48;;;;;;;:53;;;;:200;;-1:-1:-1;;;;;;15685:48:29;;;;;;:25;:48;;;;;;;;15625:37;;-1:-1:-1;;;15625:37:29;;15656:4;15625:37;;;5033:74:30;15685:48:29;;;15625:22;;5006:18:30;;15625:37:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;15606:16;;;;;;;;:::i;:::-;-1:-1:-1;;;;;15606:56:29;;;;;:::i;:::-;:127;15533:200;15516:280;;;15765:20;;-1:-1:-1;;;15765:20:29;;;;;;;;;;;15516:280;15857:74;15887:10;15907:4;15914:16;;;;;;;;:::i;:::-;-1:-1:-1;;;;;15857:29:29;;;:74;;-1:-1:-1;;;;;15857:74:29;:29;:74::i;:::-;15977:42;16022:139;;;;;;;;16059:4;:14;;;16022:139;;;;16075:8;-1:-1:-1;;;;;16022:139:29;;;;;16085:4;:15;;;16022:139;;;;16102:4;:14;;;16022:139;;;;16118:4;:16;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;16022:139:29;;;;;16136:15;:13;:15::i;:::-;16022:139;;;;16347:17;;15977:184;;-1:-1:-1;16347:17:29;;16343:349;;;16384:9;16397:1;16384:14;16380:43;;16407:16;;-1:-1:-1;;;16407:16:29;;;;;;;;;;;16380:43;16461:24;;16437:143;;-1:-1:-1;;;16437:143:29;;-1:-1:-1;;;;;16461:24:29;;;;16437:70;;16515:9;;16437:143;;16543:10;;16555:11;;16437:143;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16343:349;;;16635:24;;16611:70;;-1:-1:-1;;;16611:70:29;;-1:-1:-1;;;;;16635:24:29;;;;16611:57;;:70;;16669:11;;16611:70;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16343:349;16766:9;;-1:-1:-1;;;;;16706:104:29;;;16739:15;;;;;16723:14;;;16706:104;;-1:-1:-1;;;16766:9:29;;;;16777:14;;;;16793:16;;;;;;;;:::i;:::-;16706:104;;;28365:18:30;28353:31;;;28335:50;;28416:2;28401:18;;28394:34;;;;-1:-1:-1;;;;;28464:47:30;28444:18;;;28437:75;28323:2;28308:18;16706:104:29;;;;;;;15013:1804;;14927:1890;;:::o;7658:386:26:-;7736:4;3673:14;;;2960:28;3673:14;;;;;;;;-1:-1:-1;;;;;3673:31:26;;;;;;;;;;;;7821:217;;;7897:5;7863:14;;;;;;;;;;;-1:-1:-1;;;;;7863:31:26;;;;;;;;;;:39;;-1:-1:-1;;7863:39:26;;;7921:38;7948:10;;7872:4;;7921:38;;7897:5;7921:38;7980:4;7973:11;;;;;2188:106:2;1928:7;;;;2246:41;;;;-1:-1:-1;;;2246:41:2;;28725:2:30;2246:41:2;;;28707:21:30;28764:2;28744:18;;;28737:30;28803:22;28783:18;;;28776:50;28843:18;;2246:41:2;28523:344:30;2676:117:2;1729:16;:14;:16::i;:::-;2734:7:::1;:15:::0;;-1:-1:-1;;2734:15:2::1;::::0;;2764:22:::1;929:10:4::0;2773:12:2::1;2764:22;::::0;-1:-1:-1;;;;;5051:55:30;;;5033:74;;5021:2;5006:18;2764:22:2::1;;;;;;;2676:117::o:0;2429:115::-;1482:19;:17;:19::i;:::-;2488:7:::1;:14:::0;;-1:-1:-1;;2488:14:2::1;2498:4;2488:14;::::0;;2517:20:::1;2524:12;929:10:4::0;;850:96;2666:187:0;2758:6;;;-1:-1:-1;;;;;2774:17:0;;;-1:-1:-1;;;;;;2774:17:0;;;;;;;2806:40;;2758:6;;;2774:17;2758:6;;2806:40;;2739:16;;2806:40;2729:124;2666:187;:::o;1003:95::-;5374:13:1;;;;;;;5366:69;;;;-1:-1:-1;;;5366:69:1;;29074:2:30;5366:69:1;;;29056:21:30;29113:2;29093:18;;;29086:30;29152:34;29132:18;;;29125:62;-1:-1:-1;;;29203:18:30;;;29196:41;29254:19;;5366:69:1;28872:407:30;5366:69:1;1065:26:0::1;:24;:26::i;1063:97:2:-:0;5374:13:1;;;;;;;5366:69;;;;-1:-1:-1;;;5366:69:1;;29074:2:30;5366:69:1;;;29056:21:30;29113:2;29093:18;;;29086:30;29152:34;29132:18;;;29125:62;-1:-1:-1;;;29203:18:30;;;29196:41;29254:19;;5366:69:1;28872:407:30;5366:69:1;1126:27:2::1;:25;:27::i;2831:111:28:-:0;5374:13:1;;;;;;;5366:69;;;;-1:-1:-1;;;5366:69:1;;29074:2:30;5366:69:1;;;29056:21:30;29113:2;29093:18;;;29086:30;29152:34;29132:18;;;29125:62;-1:-1:-1;;;29203:18:30;;;29196:41;29254:19;;5366:69:1;28872:407:30;5366:69:1;2901:34:28::1;:32;:34::i;24144:294:29:-:0;24226:4;-1:-1:-1;;;;;24246:23:29;;24242:190;;-1:-1:-1;24292:5:29;24285:12;;24242:190;24318:33;24333:9;24344:6;24318:14;:33::i;:::-;24314:118;;;-1:-1:-1;24374:5:29;24367:12;;24314:118;-1:-1:-1;24417:4:29;24410:11;;763:205:8;902:58;;-1:-1:-1;;;;;10490:55:30;;902:58:8;;;10472:74:30;10562:18;;;10555:34;;;875:86:8;;895:5;;925:23;;10445:18:30;;902:58:8;;;;-1:-1:-1;;902:58:8;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;902:58:8;;;;;;;;;;875:19;:86::i;2221:114:21:-;2311:16;;;-1:-1:-1;;;;;5051:55:30;;2311:16:21;;;5033:74:30;2277:7:21;;5006:18:30;2311:16:21;;;;;;;;;;;;2303:25;;;:::i;9088:192:13:-;9145:7;-1:-1:-1;;;;;9172:26:13;;;9164:78;;;;-1:-1:-1;;;9164:78:13;;30090:2:30;9164:78:13;;;30072:21:30;30129:2;30109:18;;;30102:30;30168:34;30148:18;;;30141:62;30239:9;30219:18;;;30212:37;30266:19;;9164:78:13;29888:403:30;9164:78:13;-1:-1:-1;9267:5:13;9088:192::o;2412:312:9:-;2526:6;2501:21;:31;;2493:73;;;;-1:-1:-1;;;2493:73:9;;30498:2:30;2493:73:9;;;30480:21:30;30537:2;30517:18;;;30510:30;30576:31;30556:18;;;30549:59;30625:18;;2493:73:9;30296:353:30;2493:73:9;2578:12;2596:9;-1:-1:-1;;;;;2596:14:9;2618:6;2596:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2577:52;;;2647:7;2639:78;;;;-1:-1:-1;;;2639:78:9;;31066:2:30;2639:78:9;;;31048:21:30;31105:2;31085:18;;;31078:30;31144:34;31124:18;;;31117:62;31215:28;31195:18;;;31188:56;31261:19;;2639:78:9;30864:422:30;1475:603:8;1830:10;;;1829:62;;-1:-1:-1;1846:39:8;;;;;1870:4;1846:39;;;11430:74:30;-1:-1:-1;;;;;11540:55:30;;;11520:18;;;11513:83;1846:15:8;;;;;11403:18:30;;1846:39:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:44;1829:62;1808:163;;;;-1:-1:-1;;;1808:163:8;;31493:2:30;1808:163:8;;;31475:21:30;31532:2;31512:18;;;31505:30;31571:34;31551:18;;;31544:62;31642:24;31622:18;;;31615:52;31684:19;;1808:163:8;31291:418:30;1808:163:8;2008:62;;-1:-1:-1;;;;;10490:55:30;;2008:62:8;;;10472:74:30;10562:18;;;10555:34;;;1981:90:8;;2001:5;;2031:22;;10445:18:30;;2008:62:8;10298:297:30;2206:404:14;2269:4;4343:19;;;:12;;;:19;;;;;;2285:319;;-1:-1:-1;2327:23:14;;;;;;;;:11;:23;;;;;;;;;;;;;2507:18;;2485:19;;;:12;;;:19;;;;;;:40;;;;2539:11;;2285:319;-1:-1:-1;2588:5:14;2581:12;;5562:109;5618:16;5653:3;:11;;5646:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5562:109;;;:::o;33092:718:29:-;33220:40;:17;33247:12;;33220:26;:40::i;:::-;33216:75;;;33269:22;;;;;;;;;;;;;;33216:75;33368:16;;;;33399:37;:15;33368:16;33399:24;:37::i;:::-;33394:68;;33445:17;;-1:-1:-1;;;33445:17:29;;;;;;;;;;;33394:68;33543:15;;33528:11;:30;33524:215;;33606:20;33629:25;;;:12;:25;;;;;;-1:-1:-1;;;;;33629:25:29;;33668:60;;33707:21;;-1:-1:-1;;;33707:21:29;;;;;;;;;;;33668:60;33560:179;33524:215;33777:26;33798:4;33777:20;:26::i;2778:1388:14:-;2844:4;2981:19;;;:12;;;:19;;;;;;3015:15;;3011:1149;;3384:21;3408:14;3421:1;3408:10;:14;:::i;:::-;3456:18;;3384:38;;-1:-1:-1;3436:17:14;;3456:22;;3477:1;;3456:22;:::i;:::-;3436:42;;3510:13;3497:9;:26;3493:398;;3543:17;3563:3;:11;;3575:9;3563:22;;;;;;;;:::i;:::-;;;;;;;;;3543:42;;3714:9;3685:3;:11;;3697:13;3685:26;;;;;;;;:::i;:::-;;;;;;;;;;;;:38;;;;3797:23;;;:12;;;:23;;;;;:36;;;3493:398;3969:17;;:3;;:17;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;4061:3;:12;;:19;4074:5;4061:19;;;;;;;;;;;4054:26;;;4102:4;4095:11;;;;;;;25444:86:29;25487:6;25514:9;;25512:11;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;25505:18;;25444:86;:::o;974:241:8:-;1139:68;;-1:-1:-1;;;;;32521:55:30;;;1139:68:8;;;32503:74:30;32613:55;;32593:18;;;32586:83;32685:18;;;32678:34;;;1112:96:8;;1132:5;;1162:27;;32476:18:30;;1139:68:8;32301:417:30;1112:96:8;974:241;;;;:::o;1104:111:0:-;5374:13:1;;;;;;;5366:69;;;;-1:-1:-1;;;5366:69:1;;29074:2:30;5366:69:1;;;29056:21:30;29113:2;29093:18;;;29086:30;29152:34;29132:18;;;29125:62;-1:-1:-1;;;29203:18:30;;;29196:41;29254:19;;5366:69:1;28872:407:30;5366:69:1;1176:32:0::1;929:10:4::0;1176:18:0::1;:32::i;1166:95:2:-:0;5374:13:1;;;;;;;5366:69;;;;-1:-1:-1;;;5366:69:1;;29074:2:30;5366:69:1;;;29056:21:30;29113:2;29093:18;;;29086:30;29152:34;29132:18;;;29125:62;-1:-1:-1;;;29203:18:30;;;29196:41;29254:19;;5366:69:1;28872:407:30;5366:69:1;1239:7:2::1;:15:::0;;-1:-1:-1;;1239:15:2::1;::::0;;1166:95::o;2948:183:28:-;5374:13:1;;;;;;;5366:69;;;;-1:-1:-1;;;5366:69:1;;29074:2:30;5366:69:1;;;29056:21:30;29113:2;29093:18;;;29086:30;29152:34;29132:18;;;29125:62;-1:-1:-1;;;29203:18:30;;;29196:41;29254:19;;5366:69:1;28872:407:30;24556:379:29;24674:60;;-1:-1:-1;;;;;5051:55:30;;24674:60:29;;;5033:74:30;24638:4:29;;;;5006:18:30;;24674:60:29;;;-1:-1:-1;;24674:60:29;;;;;;;;;;;;;;;;;;;;24782:23;24674:60;;-1:-1:-1;;;;;;;;;;24782:17:29;;;:23;;24674:60;;24782:23;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24744:61;;;;24819:7;24815:114;;;24860:6;24849:26;;;;;;;;;;;;:::i;:::-;24842:33;;;;;;;24815:114;24913:5;24906:12;;;;;;;3747:706:8;4166:23;4192:69;4220:4;4192:69;;;;;;;;;;;;;;;;;4200:5;-1:-1:-1;;;;;4192:27:8;;;:69;;;;;:::i;:::-;4275:17;;4166:95;;-1:-1:-1;4275:21:8;4271:176;;4370:10;4359:30;;;;;;;;;;;;:::i;:::-;4351:85;;;;-1:-1:-1;;;4351:85:8;;33120:2:30;4351:85:8;;;33102:21:30;33159:2;33139:18;;;33132:30;33198:34;33178:18;;;33171:62;33269:12;33249:18;;;33242:40;33299:19;;4351:85:8;32918:406:30;32853:233:29;33031:10;;32979:69;;-1:-1:-1;;;;;33031:10:29;33043:4;32979:51;:69::i;:::-;32974:105;;33057:22;;;;;;;;;;;;;;3873:223:9;4006:12;4037:52;4059:6;4067:4;4073:1;4076:12;4037:21;:52::i;:::-;4030:59;3873:223;-1:-1:-1;;;;3873:223:9:o;232:613:20:-;379:4;;442:12;;468:13;495:16;;;;525:18;;;;557:7;;;;;;;;:::i;:::-;578:10;;;;602:17;;;;578:4;602:17;:::i;:::-;418:211;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;395:234;;640:14;657:48;696:7;686:18;;;;;;7455:58:11;;34981:66:30;7455:58:11;;;34969:79:30;35064:12;;;35057:28;;;7325:7:11;;35101:12:30;;7455:58:11;;;;;;;;;;;;7445:69;;;;;;7438:76;;7256:265;;;;657:48:20;640:65;-1:-1:-1;715:24:20;742:45;640:65;764:6;;;;;;;;:::i;:::-;772:4;:6;;;780:4;:6;;;742:13;:45::i;:::-;-1:-1:-1;;;;;804:34:20;;;;;;;;-1:-1:-1;;;;232:613:20;;;;:::o;4960:446:9:-;5125:12;5182:5;5157:21;:30;;5149:81;;;;-1:-1:-1;;;5149:81:9;;34534:2:30;5149:81:9;;;34516:21:30;34573:2;34553:18;;;34546:30;34612:34;34592:18;;;34585:62;34683:8;34663:18;;;34656:36;34709:19;;5149:81:9;34332:402:30;5149:81:9;5241:12;5255:23;5282:6;-1:-1:-1;;;;;5282:11:9;5301:5;5308:4;5282:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5240:73;;;;5330:69;5357:6;5365:7;5374:10;5386:12;5330:26;:69::i;:::-;5323:76;4960:446;-1:-1:-1;;;;;;;4960:446:9:o;6696:270:11:-;6819:7;6839:17;6858:18;6880:25;6891:4;6897:1;6900;6903;6880:10;:25::i;:::-;6838:67;;;;6915:18;6927:5;6915:11;:18::i;:::-;-1:-1:-1;6950:9:11;6696:270;-1:-1:-1;;;;;6696:270:11:o;7466:628:9:-;7646:12;7674:7;7670:418;;;7701:10;:17;7722:1;7701:22;7697:286;;-1:-1:-1;;;;;1713:19:3;;;7908:60:9;;;;-1:-1:-1;;;7908:60:9;;35326:2:30;7908:60:9;;;35308:21:30;35365:2;35345:18;;;35338:30;35404:31;35384:18;;;35377:59;35453:18;;7908:60:9;35124:353:30;7908:60:9;-1:-1:-1;8003:10:9;7996:17;;7670:418;8044:33;8052:10;8064:12;8044:7;:33::i;5069:1494:11:-;5195:7;;6119:66;6106:79;;6102:161;;;-1:-1:-1;6217:1:11;;-1:-1:-1;6221:30:11;6201:51;;6102:161;6374:24;;;6357:14;6374:24;;;;;;;;;35709:25:30;;;35782:4;35770:17;;35750:18;;;35743:45;;;;35804:18;;;35797:34;;;35847:18;;;35840:34;;;6374:24:11;;35681:19:30;;6374:24:11;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6374:24:11;;-1:-1:-1;;6374:24:11;;;-1:-1:-1;;;;;;;6412:20:11;;6408:101;;6464:1;6468:29;6448:50;;;;;;;6408:101;6527:6;-1:-1:-1;6535:20:11;;-1:-1:-1;5069:1494:11;;;;;;;;:::o;570:511::-;647:20;638:5;:29;;;;;;;;:::i;:::-;;634:441;;570:511;:::o;634:441::-;743:29;734:5;:38;;;;;;;;:::i;:::-;;730:345;;788:34;;-1:-1:-1;;;788:34:11;;36087:2:30;788:34:11;;;36069:21:30;36126:2;36106:18;;;36099:30;36165:26;36145:18;;;36138:54;36209:18;;788:34:11;35885:348:30;730:345:11;852:35;843:5;:44;;;;;;;;:::i;:::-;;839:236;;903:41;;-1:-1:-1;;;903:41:11;;36440:2:30;903:41:11;;;36422:21:30;36479:2;36459:18;;;36452:30;36518:33;36498:18;;;36491:61;36569:18;;903:41:11;36238:355:30;839:236:11;974:30;965:5;:39;;;;;;;;:::i;:::-;;961:114;;1020:44;;-1:-1:-1;;;1020:44:11;;36800:2:30;1020:44:11;;;36782:21:30;36839:2;36819:18;;;36812:30;36878:34;36858:18;;;36851:62;36949:4;36929:18;;;36922:32;36971:19;;1020:44:11;36598:398:30;8616:540:9;8775:17;;:21;8771:379;;9003:10;8997:17;9059:15;9046:10;9042:2;9038:19;9031:44;8771:379;9126:12;9119:20;;-1:-1:-1;;;9119:20:9;;;;;;;;:::i;14:196:30:-;82:20;;-1:-1:-1;;;;;131:54:30;;121:65;;111:93;;200:1;197;190:12;215:163;282:5;327:3;318:6;313:3;309:16;305:26;302:46;;;344:1;341;334:12;302:46;-1:-1:-1;366:6:30;215:163;-1:-1:-1;215:163:30:o;383:327::-;485:6;493;546:3;534:9;525:7;521:23;517:33;514:53;;;563:1;560;553:12;514:53;586:29;605:9;586:29;:::i;:::-;576:39;;634:70;696:7;691:2;680:9;676:18;634:70;:::i;:::-;624:80;;383:327;;;;;:::o;897:186::-;956:6;1009:2;997:9;988:7;984:23;980:32;977:52;;;1025:1;1022;1015:12;977:52;1048:29;1067:9;1048:29;:::i;1088:226::-;1147:6;1200:2;1188:9;1179:7;1175:23;1171:32;1168:52;;;1216:1;1213;1206:12;1168:52;-1:-1:-1;1261:23:30;;1088:226;-1:-1:-1;1088:226:30:o;1319:300::-;1387:6;1395;1448:2;1436:9;1427:7;1423:23;1419:32;1416:52;;;1464:1;1461;1454:12;1416:52;1509:23;;;-1:-1:-1;1575:38:30;1609:2;1594:18;;1575:38;:::i;1624:611::-;1814:2;1826:21;;;1896:13;;1799:18;;;1918:22;;;1766:4;;1997:15;;;1971:2;1956:18;;;1766:4;2040:169;2054:6;2051:1;2048:13;2040:169;;;2115:13;;2103:26;;2158:2;2184:15;;;;2149:12;;;;2076:1;2069:9;2040:169;;;-1:-1:-1;2226:3:30;;1624:611;-1:-1:-1;;;;;1624:611:30:o;2240:161::-;2305:5;2350:3;2341:6;2336:3;2332:16;2328:26;2325:46;;;2367:1;2364;2357:12;2406:480;2506:6;2514;2567:2;2555:9;2546:7;2542:23;2538:32;2535:52;;;2583:1;2580;2573:12;2535:52;2623:9;2610:23;2656:18;2648:6;2645:30;2642:50;;;2688:1;2685;2678:12;2642:50;2711:72;2775:7;2766:6;2755:9;2751:22;2711:72;:::i;:::-;2701:82;2852:2;2837:18;;;;2824:32;;-1:-1:-1;;;;2406:480:30:o;3265:300::-;3333:6;3341;3394:2;3382:9;3373:7;3369:23;3365:32;3362:52;;;3410:1;3407;3400:12;3362:52;3433:29;3452:9;3433:29;:::i;:::-;3423:39;3531:2;3516:18;;;;3503:32;;-1:-1:-1;;;3265:300:30:o;3570:236::-;3662:6;3722:2;3710:9;3701:7;3697:23;3693:32;3737:2;3734:22;;;3752:1;3749;3742:12;3734:22;-1:-1:-1;3791:9:30;;3570:236;-1:-1:-1;;3570:236:30:o;3811:118::-;3897:5;3890:13;3883:21;3876:5;3873:32;3863:60;;3919:1;3916;3909:12;3934:361;3999:6;4007;4060:2;4048:9;4039:7;4035:23;4031:32;4028:52;;;4076:1;4073;4066:12;4028:52;4121:23;;;-1:-1:-1;4220:2:30;4205:18;;4192:32;4233:30;4192:32;4233:30;:::i;:::-;4282:7;4272:17;;;3934:361;;;;;:::o;4497:253::-;4590:6;4643:3;4631:9;4622:7;4618:23;4614:33;4611:53;;;4660:1;4657;4650:12;4611:53;4683:61;4736:7;4725:9;4683:61;:::i;5372:366::-;5463:6;5516:2;5504:9;5495:7;5491:23;5487:32;5484:52;;;5532:1;5529;5522:12;5484:52;5572:9;5559:23;5605:18;5597:6;5594:30;5591:50;;;5637:1;5634;5627:12;5591:50;5660:72;5724:7;5715:6;5704:9;5700:22;5660:72;:::i;6055:237::-;6147:6;6207:3;6195:9;6186:7;6182:23;6178:33;6223:2;6220:22;;;6238:1;6235;6228:12;6297:236;6389:6;6449:2;6437:9;6428:7;6424:23;6420:32;6464:2;6461:22;;;6479:1;6476;6469:12;6538:168;6610:5;6655:3;6646:6;6641:3;6637:16;6633:26;6630:46;;;6672:1;6669;6662:12;6711:263;6809:6;6862:3;6850:9;6841:7;6837:23;6833:33;6830:53;;;6879:1;6876;6869:12;6830:53;6902:66;6960:7;6949:9;6902:66;:::i;6979:241::-;7035:6;7088:2;7076:9;7067:7;7063:23;7059:32;7056:52;;;7104:1;7101;7094:12;7056:52;7143:9;7130:23;7162:28;7184:5;7162:28;:::i;7225:163::-;7292:20;;7352:10;7341:22;;7331:33;;7321:61;;7378:1;7375;7368:12;7393:298;7460:6;7468;7521:2;7509:9;7500:7;7496:23;7492:32;7489:52;;;7537:1;7534;7527:12;7489:52;7582:23;;;-1:-1:-1;7648:37:30;7681:2;7666:18;;7648:37;:::i;7696:380::-;7794:6;7847:2;7835:9;7826:7;7822:23;7818:32;7815:52;;;7863:1;7860;7853:12;7815:52;7903:9;7890:23;7936:18;7928:6;7925:30;7922:50;;;7968:1;7965;7958:12;7922:50;7991:79;8062:7;8053:6;8042:9;8038:22;7991:79;:::i;8312:259::-;8413:6;8466:3;8454:9;8445:7;8441:23;8437:33;8434:53;;;8483:1;8480;8473:12;8434:53;8506:59;8557:7;8546:9;8506:59;:::i;8576:188::-;8644:20;;-1:-1:-1;;;;;8693:46:30;;8683:57;;8673:85;;8754:1;8751;8744:12;8769:186;8828:6;8881:2;8869:9;8860:7;8856:23;8852:32;8849:52;;;8897:1;8894;8887:12;8849:52;8920:29;8939:9;8920:29;:::i;8960:184::-;-1:-1:-1;;;9009:1:30;9002:88;9109:4;9106:1;9099:15;9133:4;9130:1;9123:15;9149:191;9252:18;9217:26;;;9245;;;9213:59;;9284:27;;9281:53;;;9314:18;;:::i;9842:262::-;10036:3;10021:19;;10049:49;10025:9;10080:6;9429:5;9423:12;9418:3;9411:25;-1:-1:-1;;;;;9489:4:30;9482:5;9478:16;9472:23;9468:72;9461:4;9456:3;9452:14;9445:96;9590:4;9583:5;9579:16;9573:23;9566:4;9561:3;9557:14;9550:47;9646:4;9639:5;9635:16;9629:23;9622:4;9617:3;9613:14;9606:47;-1:-1:-1;;;;;9706:4:30;9699:5;9695:16;9689:23;9685:64;9678:4;9673:3;9669:14;9662:88;9811:18;9803:4;9796:5;9792:16;9786:23;9782:48;9775:4;9770:3;9766:14;9759:72;;;9345:492;10109:184;10179:6;10232:2;10220:9;10211:7;10207:23;10203:32;10200:52;;;10248:1;10245;10238:12;10200:52;-1:-1:-1;10271:16:30;;10109:184;-1:-1:-1;10109:184:30:o;12221:171::-;12288:20;;12348:18;12337:30;;12327:41;;12317:69;;12382:1;12379;12372:12;12397:1165;12640:20;;12669:24;;12763:4;12751:17;;;12738:31;12785:20;;;12778:37;12885:4;12873:17;;;12860:31;12907:20;;;12900:37;12595:3;12580:19;;-1:-1:-1;;;;;12979:37:30;13010:4;12998:17;;12979:37;:::i;:::-;12975:78;12968:4;12957:9;12953:20;12946:108;-1:-1:-1;;;;;13096:37:30;13127:4;13119:6;13115:17;13096:37;:::i;:::-;13092:78;13085:4;13074:9;13070:20;13063:108;-1:-1:-1;;;;;13213:37:30;13244:4;13236:6;13232:17;13213:37;:::i;:::-;13209:86;13202:4;13191:9;13187:20;13180:116;13325:37;13356:4;13348:6;13344:17;13325:37;:::i;:::-;-1:-1:-1;;;;;4821:54:30;13419:4;13404:20;;4809:67;13456:36;13486:4;13474:17;;13456:36;:::i;:::-;5819:18;5808:30;;13550:4;13535:20;;5796:43;13501:55;5743:102;13978:243;-1:-1:-1;;;;;14093:42:30;;;14049;;;14045:91;;14148:44;;14145:70;;;14195:18;;:::i;15151:184::-;15209:6;15262:2;15250:9;15241:7;15237:23;15233:32;15230:52;;;15278:1;15275;15268:12;15230:52;15301:28;15319:9;15301:28;:::i;16678:245::-;16745:6;16798:2;16786:9;16777:7;16773:23;16769:32;16766:52;;;16814:1;16811;16804:12;16766:52;16846:9;16840:16;16865:28;16887:5;16865:28;:::i;16928:184::-;16986:6;17039:2;17027:9;17018:7;17014:23;17010:32;17007:52;;;17055:1;17052;17045:12;17007:52;17078:28;17096:9;17078:28;:::i;18326:301::-;18546:3;18531:19;;18559:62;18535:9;18603:6;17960:5;17954:12;17947:20;17940:28;17935:3;17928:41;18030:18;18022:4;18015:5;18011:16;18005:23;18001:48;17994:4;17989:3;17985:14;17978:72;-1:-1:-1;;;;;18103:4:30;18096:5;18092:16;18086:23;18082:64;18075:4;18070:3;18066:14;18059:88;18196:4;18189:5;18185:16;18179:23;18172:4;18167:3;18163:14;18156:47;18252:4;18245:5;18241:16;18235:23;18228:4;18223:3;18219:14;18212:47;18308:4;18301:5;18297:16;18291:23;18284:4;18279:3;18275:14;18268:47;;;17849:472;19042:521;19119:4;19125:6;19185:11;19172:25;19279:2;19275:7;19264:8;19248:14;19244:29;19240:43;19220:18;19216:68;19206:96;;19298:1;19295;19288:12;19206:96;19325:33;;19377:20;;;-1:-1:-1;19420:18:30;19409:30;;19406:50;;;19452:1;19449;19442:12;19406:50;19485:4;19473:17;;-1:-1:-1;19516:14:30;19512:27;;;19502:38;;19499:58;;;19553:1;19550;19543:12;19499:58;19042:521;;;;;:::o;19568:266::-;19656:6;19651:3;19644:19;19708:6;19701:5;19694:4;19689:3;19685:14;19672:43;-1:-1:-1;19760:1:30;19735:16;;;19753:4;19731:27;;;19724:38;;;;19816:2;19795:15;;;-1:-1:-1;;19791:29:30;19782:39;;;19778:50;;19568:266::o;19839:431::-;20052:2;20041:9;20034:21;20015:4;20078:61;20135:2;20124:9;20120:18;20112:6;20104;20078:61;:::i;:::-;20187:9;20179:6;20175:22;20170:2;20159:9;20155:18;20148:50;20215:49;20257:6;20249;20241;20215:49;:::i;20275:179::-;20310:3;20352:1;20334:16;20331:23;20328:120;;;20398:1;20395;20392;20377:23;-1:-1:-1;20435:1:30;20429:8;20424:3;20420:18;20328:120;20275:179;:::o;20459:403::-;20569:2;20550:13;;-1:-1:-1;;20546:27:30;20534:40;;20604:18;20589:34;;20625:22;;;20586:62;20583:242;;;-1:-1:-1;;;20678:1:30;20671:88;20782:4;20779:1;20772:15;20810:4;20807:1;20800:15;20583:242;20841:2;20834:22;-1:-1:-1;;20459:403:30:o;20867:628::-;20906:3;20948:4;20930:16;20927:26;20924:39;;;20867:628;:::o;20924:39::-;20990:2;20984:9;21030:16;-1:-1:-1;;21026:29:30;21023:1;20984:9;21002:54;21085:4;21079:11;21159:16;21152:4;21144:6;21140:17;21137:39;21116:18;21108:6;21105:30;21102:75;21099:88;;;21180:5;;20867:628;:::o;21099:88::-;21217:6;21211:4;21207:17;21253:3;21247:10;21280:18;21272:6;21269:30;21266:43;;;21302:5;;;;20867:628;:::o;21266:43::-;21367:16;21357:27;;-1:-1:-1;;21353:40:30;21328:16;;;21346:4;21324:27;21321:73;21318:86;;;21397:5;;;;20867:628;:::o;21318:86::-;21413:57;21464:4;21455:6;21447;21443:19;21439:30;21433:4;21413:57;:::i;:::-;-1:-1:-1;21486:3:30;20867:628;-1:-1:-1;;;20867:628:30:o;21500:212::-;21542:3;21580:5;21574:12;21624:6;21617:4;21610:5;21606:16;21601:3;21595:36;21686:1;21650:16;;21675:13;;;-1:-1:-1;21650:16:30;;21500:212;-1:-1:-1;21500:212:30:o;21717:192::-;21848:3;21873:30;21899:3;21891:6;21873:30;:::i;22220:128::-;22287:9;;;22308:11;;;22305:37;;;22322:18;;:::i;23532:928::-;23686:4;23728:3;23717:9;23713:19;23705:27;;23765:6;23759:13;23748:9;23741:32;23829:4;23821:6;23817:17;23811:24;23804:4;23793:9;23789:20;23782:54;23892:4;23884:6;23880:17;23874:24;23867:4;23856:9;23852:20;23845:54;-1:-1:-1;;;;;23959:4:30;23951:6;23947:17;23941:24;23937:65;23930:4;23919:9;23915:20;23908:95;-1:-1:-1;;;;;24063:4:30;24055:6;24051:17;24045:24;24041:65;24034:4;24023:9;24019:20;24012:95;-1:-1:-1;;;;;24167:4:30;24159:6;24155:17;24149:24;24145:73;24138:4;24127:9;24123:20;24116:103;24266:4;24258:6;24254:17;24248:24;24281:54;24329:4;24318:9;24314:20;24300:12;-1:-1:-1;;;;;4821:54:30;4809:67;;4755:127;24281:54;;24384:4;24376:6;24372:17;24366:24;24399:55;24448:4;24437:9;24433:20;24417:14;5819:18;5808:30;5796:43;;5743:102;25241:184;-1:-1:-1;;;25290:1:30;25283:88;25390:4;25387:1;25380:15;25414:4;25411:1;25404:15;25430:270;25503:6;25556:2;25544:9;25535:7;25531:23;25527:32;25524:52;;;25572:1;25569;25562:12;25524:52;25611:9;25598:23;25650:1;25643:5;25640:12;25630:40;;25666:1;25663;25656:12;26897:271;27080:6;27072;27067:3;27054:33;27036:3;27106:16;;27131:13;;;27106:16;26897:271;-1:-1:-1;26897:271:30:o;27618:125::-;27683:9;;;27704:10;;;27701:36;;;27717:18;;:::i;27748:382::-;-1:-1:-1;;;;;28001:55:30;;27983:74;;27970:3;27955:19;;28066:58;28120:2;28105:18;;28097:6;9429:5;9423:12;9418:3;9411:25;-1:-1:-1;;;;;9489:4:30;9482:5;9478:16;9472:23;9468:72;9461:4;9456:3;9452:14;9445:96;9590:4;9583:5;9579:16;9573:23;9566:4;9561:3;9557:14;9550:47;9646:4;9639:5;9635:16;9629:23;9622:4;9617:3;9613:14;9606:47;-1:-1:-1;;;;;9706:4:30;9699:5;9695:16;9689:23;9685:64;9678:4;9673:3;9669:14;9662:88;9811:18;9803:4;9796:5;9792:16;9786:23;9782:48;9775:4;9770:3;9766:14;9759:72;;;9345:492;29586:297;29704:12;;29751:4;29740:16;;;29734:23;;29704:12;29769:16;;29766:111;;;-1:-1:-1;;29843:4:30;29839:17;;;;29836:1;29832:25;29828:38;29817:50;;29586:297;-1:-1:-1;29586:297:30:o;31714:184::-;-1:-1:-1;;;31763:1:30;31756:88;31863:4;31860:1;31853:15;31887:4;31884:1;31877:15;31903:184;-1:-1:-1;;;31952:1:30;31945:88;32052:4;32049:1;32042:15;32076:4;32073:1;32066:15;32092:204;32130:3;32174:18;32167:5;32163:30;32217:18;32208:7;32205:31;32202:57;;32239:18;;:::i;:::-;32288:1;32275:15;;32092:204;-1:-1:-1;;32092:204:30:o;33329:724::-;33654:6;33643:9;33636:25;33697:6;33692:2;33681:9;33677:18;33670:34;33740:6;33735:2;33724:9;33720:18;33713:34;33783:6;33778:2;33767:9;33763:18;33756:34;-1:-1:-1;;;;;33831:6:30;33827:55;33821:3;33810:9;33806:19;33799:84;33920:6;33914:3;33903:9;33899:19;33892:35;33964:3;33958;33947:9;33943:19;33936:32;33617:4;33985:62;34042:3;34031:9;34027:19;34019:6;34011;33985:62;:::i;:::-;33977:70;33329:724;-1:-1:-1;;;;;;;;;;33329:724:30:o;34058:269::-;34115:6;34168:2;34156:9;34147:7;34143:23;34139:32;34136:52;;;34184:1;34181;34174:12;34136:52;34223:9;34210:23;34273:4;34266:5;34262:16;34255:5;34252:27;34242:55;;34293:1;34290;34283:12;37001:418;37150:2;37139:9;37132:21;37113:4;37182:6;37176:13;37225:6;37220:2;37209:9;37205:18;37198:34;37284:6;37279:2;37271:6;37267:15;37262:2;37251:9;37247:18;37241:50;37340:1;37335:2;37326:6;37315:9;37311:22;37307:31;37300:42;37410:2;37403;37399:7;37394:2;37386:6;37382:15;37378:29;37367:9;37363:45;37359:54;37351:62;;;37001:418;;;;:::o
Swarm Source
ipfs://099564db2775aedbeb8b2e473e9e423320f79ef68f13733b813b171324efeb1e
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in MON
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.