Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Migrator
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract Migrator is
Initializable,
PausableUpgradeable,
AccessControlEnumerableUpgradeable
{
using SafeERC20Upgradeable for IERC20Upgradeable;
enum MigrationPreference {
BALANCED, // 0
DEUS, // 1
SYMM // 2
}
struct Migration {
address user;
address token;
uint256 amount;
uint256 timestamp;
uint256 block;
MigrationPreference migrationPreference;
}
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
bytes32 public constant UNPAUSER_ROLE = keccak256("UNPAUSER_ROLE");
bytes32 public constant WITHDRAWER_ROLE = keccak256("WITHDRAWER_ROLE");
bytes32 public constant SETTER_ROLE = keccak256("SETTER_ROLE");
address public constant DEUS = 0xDE5ed76E7c05eC5e4572CfC88d1ACEA165109E44;
uint256 public earlyMigrationDeadline;
// total migrated amount by token address by project
mapping(MigrationPreference => mapping(address => uint256))
public totalLateMigratedAmount;
mapping(MigrationPreference => mapping(address => uint256))
public totalEarlyMigratedAmount;
// user migrated amount: project => user => token => amount
mapping(MigrationPreference => mapping(address => mapping(address => uint256)))
public migratedAmount;
// list of user migrations
mapping(address => Migration[]) public migrations;
bytes32 public legacyDEIMerkleRoot;
bytes32 public bDEIMerkleRoot;
// users converted amount: user => token => amount
// address public
mapping(address => mapping(address => uint256)) public convertedAmount;
address public bDEI;
event Migrate(
address[] token,
uint256[] amount,
MigrationPreference[] migrationPreference,
address receiver
);
event Split(address user, uint256 index, uint256 amount);
event Transfer(address user, uint256 index, address receiver);
event Undo(address user, uint256 index);
event ChangePreference(
address user,
uint256 index,
MigrationPreference newPreference
);
event SetMerkleRoots(bytes32 legacyDEIMerkleRoot, bytes32 bDEIMerkleRoot);
event Convert(address token, uint256 tokenAmount, uint256 deusAmount);
error InvalidProof();
function initialize(address _admin) external initializer {
__Pausable_init();
__AccessControlEnumerable_init();
_grantRole(DEFAULT_ADMIN_ROLE, _admin);
earlyMigrationDeadline = block.timestamp + 30 days;
}
function pause() external onlyRole(PAUSER_ROLE) whenNotPaused {
_pause();
}
function unpause() external onlyRole(UNPAUSER_ROLE) {
_unpause();
}
function setMerkleRoots(bytes32 legacyDEIMerkleRoot_, bytes32 bDEIMerkleRoot_) external onlyRole(SETTER_ROLE) {
legacyDEIMerkleRoot = legacyDEIMerkleRoot_;
bDEIMerkleRoot = bDEIMerkleRoot_;
emit SetMerkleRoots(legacyDEIMerkleRoot_, bDEIMerkleRoot_);
}
function setBDEIAddress(address bDEI_) external onlyRole(SETTER_ROLE) {
bDEI = bDEI_;
}
function deposit(
address[] memory tokens,
uint256[] memory amounts,
MigrationPreference[] memory migrationPreferences,
address receiver
) external whenNotPaused {
for (uint256 i; i < tokens.length; ++i) {
IERC20Upgradeable(tokens[i]).safeTransferFrom(
msg.sender,
address(this),
amounts[i]
);
if (block.timestamp < earlyMigrationDeadline) {
totalEarlyMigratedAmount[migrationPreferences[i]][
tokens[i]
] += amounts[i];
} else {
totalLateMigratedAmount[migrationPreferences[i]][
tokens[i]
] += amounts[i];
}
migratedAmount[migrationPreferences[i]][receiver][
tokens[i]
] += amounts[i];
migrations[receiver].push(
Migration({
user: receiver,
token: tokens[i],
amount: amounts[i],
timestamp: block.timestamp,
block: block.number,
migrationPreference: migrationPreferences[i]
})
);
}
emit Migrate(tokens, amounts, migrationPreferences, receiver);
}
function getUserMigrations(
address user
) external view returns (Migration[] memory userMigrations) {
userMigrations = new Migration[](migrations[user].length);
for (uint256 i; i < userMigrations.length; ++i) {
userMigrations[i] = migrations[user][i];
}
}
function getTotalEarlyMigratedAmounts(
address[] memory tokens
)
external
view
returns (
uint256[] memory balancedAmounts,
uint256[] memory deusAmounts,
uint256[] memory symmAmounts
)
{
balancedAmounts = new uint256[](tokens.length);
deusAmounts = new uint256[](tokens.length);
symmAmounts = new uint256[](tokens.length);
for (uint256 i; i < tokens.length; ++i) {
balancedAmounts[i] = totalEarlyMigratedAmount[
MigrationPreference.BALANCED
][tokens[i]];
deusAmounts[i] = totalEarlyMigratedAmount[MigrationPreference.DEUS][
tokens[i]
];
symmAmounts[i] = totalEarlyMigratedAmount[MigrationPreference.SYMM][
tokens[i]
];
}
}
function getTotalLateMigratedAmounts(
address[] memory tokens
)
external
view
returns (
uint256[] memory balancedAmounts,
uint256[] memory deusAmounts,
uint256[] memory symmAmounts
)
{
balancedAmounts = new uint256[](tokens.length);
deusAmounts = new uint256[](tokens.length);
symmAmounts = new uint256[](tokens.length);
for (uint256 i; i < tokens.length; ++i) {
balancedAmounts[i] = totalLateMigratedAmount[
MigrationPreference.BALANCED
][tokens[i]];
deusAmounts[i] = totalLateMigratedAmount[MigrationPreference.DEUS][
tokens[i]
];
symmAmounts[i] = totalLateMigratedAmount[MigrationPreference.SYMM][
tokens[i]
];
}
}
function split(uint256 index, uint256 amount) external whenNotPaused {
require(index < migrations[msg.sender].length, "Index Out Of Range");
Migration storage migration = migrations[msg.sender][index];
require(migration.amount > amount, "Amount Too High");
migration.amount -= amount;
migrations[msg.sender].push(
Migration({
user: msg.sender,
token: migration.token,
amount: amount,
timestamp: migration.timestamp,
block: migration.block,
migrationPreference: migration.migrationPreference
})
);
emit Split(msg.sender, index, amount);
}
function transfer(uint256 index, address receiver) external whenNotPaused {
require(index < migrations[msg.sender].length, "Index Out Of Range");
require(receiver != msg.sender, "Transfer To Owner");
// transfer the migration to receiver
Migration memory migration = migrations[msg.sender][index];
migration.user = receiver;
migrations[receiver].push(migration);
// remove the migration from msg.sender migrations
migrations[msg.sender][index] = migrations[msg.sender][
migrations[msg.sender].length - 1
];
migrations[msg.sender].pop();
// update migratedAmount for msg.sender and receiver
migratedAmount[migration.migrationPreference][msg.sender][
migration.token
] -= migration.amount;
migratedAmount[migration.migrationPreference][receiver][
migration.token
] += migration.amount;
emit Transfer(msg.sender, index, receiver);
}
function undo(uint256 index) external whenNotPaused {
require(index < migrations[msg.sender].length, "Index Out Of Range");
// remove the migration from msg.sender migrations
Migration memory migration = migrations[msg.sender][index];
migrations[msg.sender][index] = migrations[msg.sender][
migrations[msg.sender].length - 1
];
migrations[msg.sender].pop();
// reduce user's migrated amount
migratedAmount[migration.migrationPreference][msg.sender][
migration.token
] -= migration.amount;
// reduce total early/late migrated amount
if (migration.timestamp < earlyMigrationDeadline) {
totalEarlyMigratedAmount[migration.migrationPreference][
migration.token
] -= migration.amount;
} else {
totalLateMigratedAmount[migration.migrationPreference][
migration.token
] -= migration.amount;
}
// transfer migrated token back
IERC20Upgradeable(migration.token).safeTransfer(
msg.sender,
migration.amount
);
emit Undo(msg.sender, index);
}
function changePreference(
uint256 index,
MigrationPreference newPreference
) external whenNotPaused {
require(index < migrations[msg.sender].length, "Index Out Of Range");
Migration storage migration = migrations[msg.sender][index];
require(
migration.migrationPreference != newPreference,
"Same Migration Preference"
);
// undo storages which migration preference effects
migratedAmount[migration.migrationPreference][msg.sender][
migration.token
] -= migration.amount;
if (migration.timestamp < earlyMigrationDeadline) {
totalEarlyMigratedAmount[migration.migrationPreference][
migration.token
] -= migration.amount;
} else {
totalLateMigratedAmount[migration.migrationPreference][
migration.token
] -= migration.amount;
}
// update migration preference
migration.migrationPreference = newPreference;
// redo storages which migration preference effects
migratedAmount[migration.migrationPreference][msg.sender][
migration.token
] += migration.amount;
if (migration.timestamp < earlyMigrationDeadline) {
totalEarlyMigratedAmount[migration.migrationPreference][
migration.token
] += migration.amount;
} else {
totalLateMigratedAmount[migration.migrationPreference][
migration.token
] += migration.amount;
}
emit ChangePreference(msg.sender, index, newPreference);
}
function withdraw(
address[] memory tokens
) external onlyRole(WITHDRAWER_ROLE) {
for (uint256 i; i < tokens.length; ++i) {
IERC20Upgradeable(tokens[i]).safeTransfer(
msg.sender,
IERC20Upgradeable(tokens[i]).balanceOf(address(this))
);
}
}
function wipeMigrations(
address[] memory users,
address[] memory tokens
) external onlyRole(DEFAULT_ADMIN_ROLE) {
for (uint256 i = 0; i < users.length; ++i) {
address user = users[i];
uint256 length = migrations[user].length;
for (uint256 k = 0; k < tokens.length; ++k) {
uint256 j = 0;
while (j < length) {
if (migrations[user][j].token == tokens[k]) {
length -= 1;
migrations[user][j] = migrations[user][length];
migrations[user].pop();
} else {
j += 1;
}
}
}
}
}
function convertBDEI(uint256 amount, uint256 maxAmount, bytes32[] memory proof) external whenNotPaused {
require(amount <= maxAmount, "Invalid Amount");
if (
!MerkleProof.verify(
proof,
bDEIMerkleRoot,
keccak256(abi.encode(msg.sender, maxAmount))
)
) revert InvalidProof();
convertedAmount[msg.sender][bDEI] += amount;
require(convertedAmount[msg.sender][bDEI] <= maxAmount, "Amount Too High");
IERC20Upgradeable(bDEI).safeTransferFrom(
msg.sender,
address(this),
amount
);
uint256 deusAmount = amount / 185;
IERC20Upgradeable(DEUS).safeTransfer(msg.sender, deusAmount);
emit Convert(bDEI, amount, deusAmount);
}
function convertLegacyDEI(uint256 amount, uint256 maxAmount, bytes32[] memory proof) external whenNotPaused {
require(amount <= maxAmount, "Invalid Amount");
if (
!MerkleProof.verify(
proof,
legacyDEIMerkleRoot,
keccak256(abi.encode(msg.sender, maxAmount))
)
) revert InvalidProof();
address legacyDEI = 0xDE12c7959E1a72bbe8a5f7A1dc8f8EeF9Ab011B3;
convertedAmount[msg.sender][legacyDEI] += amount;
require(convertedAmount[msg.sender][legacyDEI] <= maxAmount, "Amount Too High");
IERC20Upgradeable(legacyDEI).safeTransferFrom(
msg.sender,
address(this),
amount
);
uint256 deusAmount = amount / 217;
IERC20Upgradeable(DEUS).safeTransfer(msg.sender, deusAmount);
emit Convert(legacyDEI, amount, deusAmount);
}
function convertXDEUS(uint256 amount) external whenNotPaused {
address xDeus = 0x953Cd009a490176FcEB3a26b9753e6F01645ff28;
IERC20Upgradeable(xDeus).safeTransferFrom(
msg.sender,
address(this),
amount
);
convertedAmount[msg.sender][xDeus] += amount;
IERC20Upgradeable(DEUS).safeTransfer(msg.sender, amount);
emit Convert(xDeus, amount, amount);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)
pragma solidity ^0.8.0;
import "./IAccessControlEnumerableUpgradeable.sol";
import "./AccessControlUpgradeable.sol";
import "../utils/structs/EnumerableSetUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Extension of {AccessControl} that allows enumerating the members of each role.
*/
abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {
function __AccessControlEnumerable_init() internal onlyInitializing {
}
function __AccessControlEnumerable_init_unchained() internal onlyInitializing {
}
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
* you perform all queries on the same block. See the following
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
* for more information.
*/
function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {
return _roleMembers[role].at(index);
}
/**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/
function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {
return _roleMembers[role].length();
}
/**
* @dev Overload {_grantRole} to track enumerable memberships
*/
function _grantRole(bytes32 role, address account) internal virtual override {
super._grantRole(role, account);
_roleMembers[role].add(account);
}
/**
* @dev Overload {_revokeRole} to track enumerable memberships
*/
function _revokeRole(bytes32 role, address account) internal virtual override {
super._revokeRole(role, account);
_roleMembers[role].remove(account);
}
/**
* @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) (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControlUpgradeable.sol";
import "../utils/ContextUpgradeable.sol";
import "../utils/StringsUpgradeable.sol";
import "../utils/introspection/ERC165Upgradeable.sol";
import "../proxy/utils/Initializable.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}.
*
* 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:
*
* ```
* 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}:
*
* ```
* 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.
*/
abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {
function __AccessControl_init() internal onlyInitializing {
}
function __AccessControl_init_unchained() internal onlyInitializing {
}
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `_msgSender()` is missing `role`.
* Overriding this function changes the behavior of the {onlyRole} modifier.
*
* Format of the revert message is described in {_checkRole}.
*
* _Available since v4.6._
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
StringsUpgradeable.toHexString(account),
" is missing role ",
StringsUpgradeable.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @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 override returns (bytes32) {
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 override 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 override 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 `account`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* May emit a {RoleGranted} event.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*
* NOTE: This function is deprecated in favor of {_grantRole}.
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Grants `role` to `account`.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
/**
* @dev Revokes `role` from `account`.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _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 v4.4.1 (access/IAccessControlEnumerable.sol)
pragma solidity ^0.8.0;
import "./IAccessControlUpgradeable.sol";
/**
* @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
*/
interface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {
/**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
* you perform all queries on the same block. See the following
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
* for more information.
*/
function getRoleMember(bytes32 role, uint256 index) external view returns (address);
/**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/
function getRoleMemberCount(bytes32 role) external view returns (uint256);
}// 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 IAccessControlUpgradeable {
/**
* @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 v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20Upgradeable.sol";
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.1) (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]
* ```
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized < type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.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 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 IERC20PermitUpgradeable {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
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.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20Upgradeable {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20Upgradeable.sol";
import "../extensions/draft-IERC20PermitUpgradeable.sol";
import "../../../utils/AddressUpgradeable.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 SafeERC20Upgradeable {
using AddressUpgradeable for address;
function safeTransfer(
IERC20Upgradeable token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20Upgradeable 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(
IERC20Upgradeable 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(
IERC20Upgradeable 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(
IERC20Upgradeable 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(
IERC20PermitUpgradeable 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(IERC20Upgradeable 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/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
* ====
*
* [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 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 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 v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {
function __ERC165_init() internal onlyInitializing {
}
function __ERC165_init_unchained() internal onlyInitializing {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165Upgradeable).interfaceId;
}
/**
* @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 v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165Upgradeable {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// 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 MathUpgradeable {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator
) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
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);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/MathUpgradeable.sol";
/**
* @dev String operations.
*/
library StringsUpgradeable {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = MathUpgradeable.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, MathUpgradeable.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}// 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 EnumerableSetUpgradeable {
// 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) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Tree proofs.
*
* The tree and the proofs can be generated using our
* https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
* You will find a quickstart guide in the readme.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the merkle tree could be reinterpreted as a leaf value.
* OpenZeppelin's JavaScript library generates merkle trees that are safe
* against this attack out of the box.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Calldata version of {verify}
*
* _Available since v4.7._
*/
function verifyCalldata(
bytes32[] calldata proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProofCalldata(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Calldata version of {processProof}
*
* _Available since v4.7._
*/
function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
* `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
*
* CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
*
* _Available since v4.7._
*/
function multiProofVerify(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProof(proof, proofFlags, leaves) == root;
}
/**
* @dev Calldata version of {multiProofVerify}
*
* CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
*
* _Available since v4.7._
*/
function multiProofVerifyCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProofCalldata(proof, proofFlags, leaves) == root;
}
/**
* @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
* proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
* leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
* respectively.
*
* CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
* is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
* tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
*
* _Available since v4.7._
*/
function processMultiProof(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
/**
* @dev Calldata version of {processMultiProof}.
*
* CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
*
* _Available since v4.7._
*/
function processMultiProofCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}{
"optimizer": {
"enabled": true,
"runs": 800
},
"metadata": {
"bytecodeHash": "none"
},
"viaIR": true,
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"InvalidProof","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"enum Migrator.MigrationPreference","name":"newPreference","type":"uint8"}],"name":"ChangePreference","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deusAmount","type":"uint256"}],"name":"Convert","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"token","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"amount","type":"uint256[]"},{"indexed":false,"internalType":"enum Migrator.MigrationPreference[]","name":"migrationPreference","type":"uint8[]"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"}],"name":"Migrate","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":false,"internalType":"bytes32","name":"legacyDEIMerkleRoot","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"bDEIMerkleRoot","type":"bytes32"}],"name":"SetMerkleRoots","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Split","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"Undo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEUS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SETTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNPAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAWER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bDEI","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bDEIMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"enum Migrator.MigrationPreference","name":"newPreference","type":"uint8"}],"name":"changePreference","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"convertBDEI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"convertLegacyDEI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"convertXDEUS","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"convertedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"enum Migrator.MigrationPreference[]","name":"migrationPreferences","type":"uint8[]"},{"internalType":"address","name":"receiver","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"earlyMigrationDeadline","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"getTotalEarlyMigratedAmounts","outputs":[{"internalType":"uint256[]","name":"balancedAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"deusAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"symmAmounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"getTotalLateMigratedAmounts","outputs":[{"internalType":"uint256[]","name":"balancedAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"deusAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"symmAmounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserMigrations","outputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"block","type":"uint256"},{"internalType":"enum Migrator.MigrationPreference","name":"migrationPreference","type":"uint8"}],"internalType":"struct Migrator.Migration[]","name":"userMigrations","type":"tuple[]"}],"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":[{"internalType":"address","name":"_admin","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"legacyDEIMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum Migrator.MigrationPreference","name":"","type":"uint8"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"migratedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"migrations","outputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"block","type":"uint256"},{"internalType":"enum Migrator.MigrationPreference","name":"migrationPreference","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","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":"address","name":"bDEI_","type":"address"}],"name":"setBDEIAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"legacyDEIMerkleRoot_","type":"bytes32"},{"internalType":"bytes32","name":"bDEIMerkleRoot_","type":"bytes32"}],"name":"setMerkleRoots","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"split","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum Migrator.MigrationPreference","name":"","type":"uint8"},{"internalType":"address","name":"","type":"address"}],"name":"totalEarlyMigratedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum Migrator.MigrationPreference","name":"","type":"uint8"},{"internalType":"address","name":"","type":"address"}],"name":"totalLateMigratedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"undo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"wipeMigrations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
6080806040523461001657613912908161001c8239f35b600080fdfe608060408181526004908136101561001657600080fd5b600092833560e01c90816301ffc9a7146126b5575080630bf762081461266757806317a5e2201461247b5780631aadd4391461243a5780631dbabb6e1461241b5780631fe00dad14612392578063248a9ca314612367578063297306be146122cd5780632da620a41461229e5780632f2ff15d146121e957806336568abe146121495780633ace81f1146120f55780633f4ba83a14611f3c5780633f6bb69d14611ed857806346b013c014611eb85780634b19becc14611da65780635c395a7914611c375780635c975abb14611c135780637c6c1c5e14611bea57806381406c2214611bca5780638456cb5914611a4b57806385f438c114611a10578063875f0000146119075780639010d07c146118c557806391d148541461187f57806393badf1b1461157e578063973d9e03146115345780639a48eb51146114dd578063a1f13151146112a0578063a2011b3f14611265578063a217fddf1461124a578063a481c17f146110a2578063b7760c8f14610ea2578063bc1e5ae514610d77578063bd5dec9814610a8c578063c4d66de81461088b578063ca15c87314610863578063d547741f14610826578063e63ab1e9146107eb578063f89df8641461046c578063fb1bb9de1461042d5763fff28a1b146101f257600080fd5b3461042957610200366129bf565b9291909361020c613186565b6102188583111561385c565b610100548351336020808301918252604083018990529661025893909290919061024f81606081015b03601f19810183528261286a565b519020916138a8565b1561041b573386526102b1610102958686528488209673de12c7959e1a72bbe8a5f7a1dc8f8eef9ab011b397888a528752858920610297868254612e14565b90553389528652848820878952865284882054111561363b565b610349835187808783016323b872dd60e01b8152336024850152306044850152866064850152606484526102e484612816565b8751936102f085612832565b8985527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648a8601525190828b5af13d15610413573d9061032f82612e37565b9161033c8851938461286a565b82523d8a8984013e6134d2565b805180610396575b877f9018eade4aec2a696b34b0f5459a1a7dc058389bab8e2380d880817a9e22b21360608960d9880489898c610387843361375a565b8251948552840152820152a180f35b8186918101031261040f5784015180159081150361040f576103b9578080610351565b825162461bcd60e51b8152908101849052602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b8680fd5b6060906134d2565b82516309bde33960e01b8152fd5b8280fd5b838234610468578160031936011261046857602090517f427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a8152f35b5080fd5b509034610429576080806003193601126107e75767ffffffffffffffff9180358381116107e3576104a090369083016128a4565b916024359380851161040f573660238601121561040f5784830135926104c58461288c565b956104d28851978861286a565b84875260209460248689019160051b830101913683116107cb576024879101915b8383106107d357505050506044359182116107cf57366023830112156107cf57810135956105208761288c565b9161052d8251938461286a565b8783528483016024819960051b830101913683116107cb57602401905b8282106107af57505050606435956001600160a01b03988988168098036107ac57610573613186565b805b87518110156106e757806106bd8a8a6106b88f8a8961068e8f93896106878f9c838f6106c29f80828f8f808f8f928f6106186106189f61063e8e610645948961067f9f839f8496918a836105e988956105d261064a9f88906131e6565b51166105de878a6131e6565b5190309033906132e0565b8660fb5442106000146106c7578561062261061d610618836106116106379b610628976131e6565b519b6131e6565b6131fa565b6127cb565b936131e6565b511682528c5220918254612e14565b90556131e6565b51966131e6565b612783565b84865281528861065d88888820946131e6565b5116855252610670848420918254612e14565b9055815260ff8d52209c6131e6565b5116956131e6565b51946131e6565b928c519661069b886127e4565b87528601528a850152426060850152438c85015260a08401613207565b61322b565b6131d7565b610575565b856106226106e2610618836106116106379b610628976131e6565b6127b2565b50979896959194939685519780890190895283518091528560a08a019401918a905b8282106107935750505050816107299188869796959403858a0152612912565b92868403908701525191828152019591855b82811061077357867f9f408e7cdeef8126a6c6b2837688b68c0c498656e49e166c39258752b0c5e9c187808b8960608301520390a180f35b909192968280826107876001948c516129b2565b0198019392910161073b565b8351811686529487019492870192600190910190610709565b80fd5b813560038110156107c757815290860190860161054a565b8b80fd5b8a80fd5b8780fd5b82358152918101918791016104f3565b8580fd5b8380fd5b838234610468578160031936011261046857602090517f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8152f35b5034610429578060031936011261042957610860913561085b600161084961273e565b93838752609760205286200154612c31565b612d8a565b80f35b50903461042957602036600319011261042957602092829135815260c9845220549051908152f35b50903461042957602090816003193601126107e7576108a8612723565b9084549160ff8360081c161592838094610a7f575b8015610a68575b156109ff5760ff1980821660011788556109419291856109ee575b5061090a60ff895460081c166108f481613114565b6108fd81613114565b8260335416603355613114565b878052609786526001600160a01b03878920921691828952865260ff8789205416156109a6575b5086805260c98552858720612f8b565b5062278d00420190814211610993575060fb5561095c578280f35b7f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989161ff001984541684555160018152a138808280f35b634e487b7160e01b865260119052602485fd5b8780526097865286882082895286526001878920918254161790553381887f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a438610931565b61ffff1916610101178855386108df565b855162461bcd60e51b8152808401869052602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608490fd5b50303b1580156108c45750600160ff8216146108c4565b50600160ff8216106108bd565b503461042957602091826003193601126107e757803567ffffffffffffffff8111610d7357610abe90369083016128a4565b937f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e480825260978552838220338352855260ff848320541615610ba65750805b8551811015610ba25760246001600160a01b038681610b1d858b6131e6565b511691610b2a858b6131e6565b51168751938480926370a0823160e01b8252308a8301525afa918215610b98578492610b67575b50610b6292916106bd913390613820565b610afe565b9091508681813d8311610b91575b610b7f818361286a565b810103126107e75751906106bd610b51565b503d610b75565b86513d86823e3d90fd5b5080f35b908491610bb233612e64565b855191610bbe8361284e565b60428352848301936060368637835115610d605760308553835190600191821015610d4d5790607860218601536041915b818311610ce257505050610ca057610c9c938693610c8893610c79604894610c449a519a8576020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8d978801528251928391603789019101612d3b565b8401917f206973206d697373696e6720726f6c6520000000000000000000000000000000603784015251809386840190612d3b565b0103602881018752018561286a565b5162461bcd60e51b81529283928301612d5e565b0390fd5b50505080606493519262461bcd60e51b845283015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015610d3a576f181899199a1a9b1b9c1cb0b131b232b360811b901a610d128588612e53565b53881c928015610d2757600019019190610bef565b634e487b7160e01b825260118952602482fd5b634e487b7160e01b835260328a52602483fd5b634e487b7160e01b815260328852602490fd5b634e487b7160e01b815260328752602490fd5b8480fd5b5082903461046857610dc890610d8c366129bf565b610d999692949196613186565b610da58786111561385c565b6101015484513360208201908152604082018a90529061024f8160608101610241565b15610e945750610e8e7f9018eade4aec2a696b34b0f5459a1a7dc058389bab8e2380d880817a9e22b213939433865261010280602052610e5885858920936001600160a01b039361010395858754168c52602052878b20610e2a848254612e14565b9055338b52602052610e4f878b20918587541692838d52602052888c2054111561363b565b309033906132e0565b60b9850491610e67833361375a565b54169251938493846040919493926001600160a01b03606083019616825260208201520152565b0390a180f35b90516309bde33960e01b8152fd5b508290346104685780600319360112610468578235610ebf61273e565b91610ec8613186565b33845260ff91602093838552610ee28387205483106135ef565b6001600160a01b038091169333851461105f57338752808652610f10610f0a84868a20612980565b50613564565b90858252858852808752610f2682868a2061322b565b338852808752848820805460001981019190821161104c57610f6491610f4b91612980565b50338a52828952610f5e86888c20612980565b90613687565b3388528652610f74848820613704565b8381019182519260a08301938451600381101561103957610f9490612783565b338b52895288878b20940193838551168b528952610fb6878b20918254613017565b9055519251600381101561102657917f138dbc8474f748db86063dcef24cef1495bc73385a946f8d691128085e5ebec297959391610ff76060989694612783565b868b528752848a2091511689528552611014838920918254612e14565b9055815193338552840152820152a180f35b634e487b7160e01b895260218a52602489fd5b634e487b7160e01b8b5260218c5260248bfd5b634e487b7160e01b8a5260118b5260248afd5b835162461bcd60e51b8152808901879052601160248201527f5472616e7366657220546f204f776e65720000000000000000000000000000006044820152606490fd5b503461042957602090816003193601126107e7578235916110c1613186565b815193611170828601956323b872dd60e01b8752336024820152306044820152856064820152606481526110f481612816565b878086519261110284612832565b8684527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564878501525173953cd009a490176fceb3a26b9753e6f01645ff2899828b5af13d15611242573d9061115682612e37565b916111638851938461286a565b82523d8a8784013e613430565b8051806111cb575b877f9018eade4aec2a696b34b0f5459a1a7dc058389bab8e2380d880817a9e22b2136060898989818a338852610102815282882085895281528288206111bf838254612e14565b9055610387823361375a565b8184918101031261040f5782015180159081150361040f576111ee578080611178565b915162461bcd60e51b815291820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b606090613430565b83823461046857816003193601126104685751908152602090f35b838234610468578160031936011261046857602090517f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda8152f35b50346104295780600319360112610429576024359082356003831015610d73576112c8613186565b33855260ff6020948186526112e18488205484106135ef565b3387528186526112f383858920612980565b506005810192808454169260038410156114ca578784146114875750927fc3c2a142bb1c2ac41f2012ce7f1a7e0aebcd6fbfefaaa426c797361ffd57ae6a9795928260609895600261142f9895019061134d825494612783565b8d3390528a528c8a6113ed8960038185209760018101996001600160a01b03998a8c541688528652611383848820918254613017565b90550193845460fb541160001461145c5786546113a2878c54166127cb565b898b5416835285526113b8838320918254613017565b90555b6113c58d8b613213565b8654936113d4878c5416612783565b338352815282822090898b541683525220918254612e14565b90555460fb5411156114335761140691549454166127cb565b9154168a52865261141b838a20918254612e14565b90555b8151943386528501528301906129b2565ba180f35b61144091549454166127b2565b9154168a528652611455838a20918254612e14565b905561141e565b865461146a878c54166127b2565b898b541683528552611480838320918254613017565b90556113bb565b865162461bcd60e51b8152908101899052601960248201527f53616d65204d6967726174696f6e20507265666572656e6365000000000000006044820152606490fd5b634e487b7160e01b8a5260219052602489fd5b50346104295780600319360112610429577ff5df4035299cd4b5ca78fd7be5658dc1e719f43daf4efb818eb4560e6b518834913560243561151c612a48565b8161010055806101015582519182526020820152a180f35b83823461046857806003193601126104685780602092611552612723565b61155a61273e565b6001600160a01b039182168352610102865283832091168252845220549051908152f35b5082903461046857806003193601126104685767ffffffffffffffff918335838111610468576115b190369086016128a4565b936024938435908111610429576115cb90369083016128a4565b9082805260209060978252848420338552825260ff928386862054161561170f57909684965b815188101561170b576001600160a01b03988961160e8a856131e6565b5116938488528686528888205493885b82518110156116f057895b8d8c8c8c8c8c8c871061164b5750505050505050611646906131d7565b61161e565b8352522061165a908390612980565b509080600180930154169061166f85886131e6565b5116036116d4575060001987019687116116c2576116ac88610f5e838f8f8f8f6116a18f888552838352858520612980565b509683525220612980565b878b528989526116bd8c8c20613704565b611629565b634e487b7160e01b8b5260118552858bfd5b81018091111561162957634e487b7160e01b8b5260118552858bfd5b509a509250925096611701906131d7565b96979091976115f1565b8580f35b508491848761171d33612e64565b8551918361172a8461284e565b6042845285840194606036873784511561186d576030865384519060019182101561185b5790607860218701536041915b8183116117f2575050506117b15750610c9c938693610c8893610c79604894610c449a519a8576020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8d978801528251928391603789019101612d3b565b9250505081606494519362461bcd60e51b85528401528201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015611849576f181899199a1a9b1b9c1cb0b131b232b360811b901a6118228589612e53565b53891c9280156118375760001901919061175b565b634e487b7160e01b825260118a528482fd5b634e487b7160e01b835260328b528583fd5b634e487b7160e01b8152603289528390fd5b634e487b7160e01b8152603288529050fd5b5090346104295781600319360112610429578160209360ff926118a061273e565b90358252609786526001600160a01b0383832091168252855220541690519015158152f35b5090346104295781600319360112610429576118f86020936001600160a01b039235815260c98552836024359120612f73565b92905490519260031b1c168152f35b50919034610468576020908160031936011261042957803567ffffffffffffffff81116107e75761193a913691016128a4565b9261194584516135bd565b9261195085516135bd565b9461195b81516135bd565b93825b82518110156119fd576119f89084805260fd808452868620906001600160a01b03918261198b85896131e6565b5116885285528787205461199f848c6131e6565b5260018752808552878720826119b585896131e6565b511688528552878720546119c9848d6131e6565b52600287528452868620906119de83876131e6565b511686528352858520546119f282896131e6565b526131d7565b61195e565b845180611a0c888b8b84612946565b0390f35b838234610468578160031936011261046857602090517f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e48152f35b509190346104685781600319360112610468577f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9081835260209160978352848420338552835260ff858520541615611ae757837f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2588487611aca613186565b611ad2613186565b600160ff19603354161760335551338152a180f35b611af393919333612e64565b855191611aff8361284e565b60428352848301936060368637835115610d605760308553835190600191821015610d4d5790607860218601536041915b818311611b8557505050610ca057610c9c938693610c8893610c79604894610c449a519a8576020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8d978801528251928391603789019101612d3b565b909192600f81166010811015610d3a576f181899199a1a9b1b9c1cb0b131b232b360811b901a611bb58588612e53565b53881c928015610d2757600019019190611b30565b838234610468578160031936011261046857602090610101549051908152f35b8382346104685781600319360112610468576020906001600160a01b0361010354169051908152f35b83823461046857816003193601126104685760209060ff6033541690519015158152f35b5082346107ac5760209182600319360112610468576001600160a01b039182611c5e612723565b169384825260ff908181528383205495611c778761288c565b96611c848651988961286a565b808852611c93601f199161288c565b0182855b828110611d6e57505050835b8751811015611ce557611ce090828652848452611cc5610f0a82898920612980565b611ccf828b6131e6565b52611cda818a6131e6565b506131d7565b611ca3565b855183815288518185018190528190818901908b870190878a8d8d5b848310611d0e5787870388f35b9193958597509260c060019294611d5c839851878151168352878582015116858401528681015187840152606080820151908401526080808201519084015260a080910151908301906129b2565b01970193019091879695939492611d01565b8751611d79816127e4565b878152878382015287898201528760608201528760808201528760a082015282828c010152018390611c97565b5090346104295781600319360112610429577f5d95162205dc900555172b9649799b0334d5c456a8c9d875524229cd73416d4b91610e8e823591611e9360243594611def613186565b33885260ff602052611e058389205486106135ef565b33885260ff602052611e1985848a20612980565b509060028201611e35888254611e3082821161363b565b613017565b905533895260ff6020526106b8848a20916001600160a01b036001850154169360ff60056003830154938301549201541691875195611e73876127e4565b33875260208701528a888701526060860152608085015260a08401613207565b5192839233846040919493926001600160a01b03606083019616825260208201520152565b838234610468578160031936011261046857602090610100549051908152f35b5090346104295760603660031901126104295735600381101561042957611efd61273e565b604435916001600160a01b03908184168094036107e3579184939186936020975260fe8752848420911683528552828220908252845220549051908152f35b508290346104685781600319360112610468577f427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a9081835260209160978352818420338552835260ff82852054161561201157506033549360ff851615611fd057507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa929360ff191660335551338152a180f35b82606492519162461bcd60e51b8352820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152fd5b61201e9493919433612e64565b85519161202a8361284e565b60428352848301936060368637835115610d605760308553835190600191821015610d4d5790607860218601536041915b8183116120b057505050610ca057610c9c938693610c8893610c79604894610c449a519a8576020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8d978801528251928391603789019101612d3b565b909192600f81166010811015610d3a576f181899199a1a9b1b9c1cb0b131b232b360811b901a6120e08588612e53565b53881c928015610d275760001901919061205b565b5082346107ac5761210536612754565b9060038110156121365782849283926020955260fc85526001600160a01b0383832091168252845220549051908152f35b634e487b7160e01b835260218552602483fd5b5091903461046857826003193601126104685761216461273e565b90336001600160a01b0383160361218057906108609135612d8a565b608490602085519162461bcd60e51b8352820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152fd5b5034610429578060031936011261042957610ba291359060c961220a61273e565b928086526020906097825261222460018589200154612c31565b808752609782526001600160a01b03848820951694858852825260ff848820541615612255575b8652528320612f8b565b808752609782528387208588528252838720805460ff191660011790553385827f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8a80a461224b565b8382346104685781600319360112610468576020905173de5ed76e7c05ec5e4572cfc88d1acea165109e448152f35b509190346104685782600319360112610468576122e8612723565b91602435906001600160a01b03809416815260ff6020528481209081548310156107ac57509161231e60c0959261236594612980565b509084825416946001830154169260028301549060ff60056003860154948601549501541694815197885260208801528601526060850152608084015260a08301906129b2565bf35b5090346104295760203660031901126104295781602093600192358152609785522001549051908152f35b50919034610468576020908160031936011261042957803567ffffffffffffffff81116107e7576123c5913691016128a4565b926123d084516135bd565b926123db85516135bd565b946123e681516135bd565b93825b82518110156119fd576124169084805260fc808452868620906001600160a01b03918261198b85896131e6565b6123e9565b83823461046857816003193601126104685760209060fb549051908152f35b5082346107ac5761244a36612754565b9060038110156121365782849283926020955260fd85526001600160a01b0383832091168252845220549051908152f35b5082903461046857602090816003193601126104295783359161249c613186565b33845260ff81526124b18285205484106135ef565b33845260ff81526124c7610f0a84848720612980565b33855260ff8252828520805460001981019190821161265457612501916124ed91612980565b5033875260ff8452610f5e86868920612980565b33855260ff8252612513838620613704565b8281019182519060a0830190815160038110156110265761253390612783565b3389528152606086892094828101946001600160a01b0396878751168c528452612561898c20918254613017565b9055015160fb5411156125f057845191516003811015611026577feb5c2ddb3f84da291d8850278b584c57039961f86384bd48fea5cbc3385ab11f98995091610e8e97969593916125b56125da96946127cb565b90848451168c52526125cb868b20918254613017565b90555b51169051903390613820565b5133815260208101919091529081906040820190565b845191516003811015611026577feb5c2ddb3f84da291d8850278b584c57039961f86384bd48fea5cbc3385ab11f98995091610e8e97969593916126376125da96946127b2565b90848451168c525261264d868b20918254613017565b90556125ce565b634e487b7160e01b875260118852602487fd5b83346107ac5760203660031901126107ac57612681612723565b612689612a48565b6001600160a01b03610103911673ffffffffffffffffffffffffffffffffffffffff1982541617905580f35b84908434610429576020366003190112610429573563ffffffff60e01b81168091036104295760209250635a05180f60e01b81149081156126f8575b5015158152f35b637965db0b60e01b811491508115612712575b50836126f1565b6301ffc9a760e01b1490508361270b565b600435906001600160a01b038216820361273957565b600080fd5b602435906001600160a01b038216820361273957565b604090600319011261273957600435600381101561273957906024356001600160a01b03811681036127395790565b600381101561279c5760005260fe602052604060002090565b634e487b7160e01b600052602160045260246000fd5b600381101561279c5760005260fc602052604060002090565b600381101561279c5760005260fd602052604060002090565b60c0810190811067ffffffffffffffff82111761280057604052565b634e487b7160e01b600052604160045260246000fd5b60a0810190811067ffffffffffffffff82111761280057604052565b6040810190811067ffffffffffffffff82111761280057604052565b6080810190811067ffffffffffffffff82111761280057604052565b90601f8019910116810190811067ffffffffffffffff82111761280057604052565b67ffffffffffffffff81116128005760051b60200190565b81601f82011215612739578035916128bb8361288c565b926128c9604051948561286a565b808452602092838086019260051b820101928311612739578301905b8282106128f3575050505090565b81356001600160a01b03811681036127395781529083019083016128e5565b90815180825260208080930193019160005b828110612932575050505090565b835185529381019392810192600101612924565b9161296f9061296161297d9593606086526060860190612912565b908482036020860152612912565b916040818403910152612912565b90565b805482101561299c576000526006602060002091020190600090565b634e487b7160e01b600052603260045260246000fd5b90600382101561279c5752565b606060031982011261273957600435916024359160443567ffffffffffffffff81116127395781602382011215612739578060040135916129ff8361288c565b92612a0d604051948561286a565b80845260209260248486019260051b82010192831161273957602401905b828210612a39575050505090565b81358152908301908301612a2b565b3360009081527f0ba47cfd5e746a7a77d10576777b78a793709d8d5c4bbd732c557bc9a64bb31b60209081526040808320549092907f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda9060ff1615612aad5750505050565b612ab633612e64565b845191612ac28361284e565b60428352848301936060368637835115612c1d5760308553835190600191821015612c1d5790607860218601536041915b818311612baf57505050612b6d57610c44938593612b5793612b48604894610c9c9951988576020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8b978801528251928391603789019101612d3b565b0103602881018552018361286a565b5162461bcd60e51b815291829160048301612d5e565b60648486519062461bcd60e51b825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015612c09576f181899199a1a9b1b9c1cb0b131b232b360811b901a612bdf8588612e53565b5360041c928015612bf557600019019190612af3565b634e487b7160e01b82526011600452602482fd5b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b81526032600452602490fd5b600081815260209060978252604092838220338352835260ff848320541615612c5a5750505050565b612c6333612e64565b845191612c6f8361284e565b60428352848301936060368637835115612c1d5760308553835190600191821015612c1d5790607860218601536041915b818311612cf557505050612b6d57610c44938593612b5793612b48604894610c9c9951988576020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8b978801528251928391603789019101612d3b565b909192600f81166010811015612c09576f181899199a1a9b1b9c1cb0b131b232b360811b901a612d258588612e53565b5360041c928015612bf557600019019190612ca0565b60005b838110612d4e5750506000910152565b8181015183820152602001612d3e565b60409160208252612d7e8151809281602086015260208686019101612d3b565b601f01601f1916010190565b906040612dc99260009080825260976020526001600160a01b0383832094169384835260205260ff8383205416612dcc575b815260c960205220613024565b50565b808252609760205282822084835260205282822060ff1981541690553384827ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b8580a4612dbc565b91908201809211612e2157565b634e487b7160e01b600052601160045260246000fd5b67ffffffffffffffff811161280057601f01601f191660200190565b90815181101561299c570160200190565b604051906060820182811067ffffffffffffffff82111761280057604052602a825260208201604036823782511561299c5760309053815160019081101561299c57607860218401536029905b808211612f05575050612ec15790565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b9091600f81166010811015612f5e576f181899199a1a9b1b9c1cb0b131b232b360811b901a612f348486612e53565b5360041c918015612f49576000190190612eb1565b60246000634e487b7160e01b81526011600452fd5b60246000634e487b7160e01b81526032600452fd5b805482101561299c5760005260206000200190600090565b919060018301600090828252806020526040822054156000146130115784549468010000000000000000861015612ffd5783612fed612fd4886001604098999a01855584612f73565b819391549060031b600019811b9283911b169119161790565b9055549382526020522055600190565b634e487b7160e01b83526041600452602483fd5b50925050565b91908203918211612e2157565b9060018201906000928184528260205260408420549081151560001461310d57600019918083018181116130f9578254908482019182116130e5578082036130b0575b5050508054801561309c5782019161307f8383612f73565b909182549160031b1b191690555582526020526040812055600190565b634e487b7160e01b86526031600452602486fd5b6130d06130c0612fd49386612f73565b90549060031b1c92839286612f73565b90558652846020526040862055388080613067565b634e487b7160e01b88526011600452602488fd5b634e487b7160e01b87526011600452602487fd5b5050505090565b1561311b57565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608490fd5b60ff6033541661319257565b60405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606490fd5b6000198114612e215760010190565b805182101561299c5760209160051b010190565b51600381101561279c5790565b600382101561279c5752565b90600381101561279c5760ff80198354169116179055565b8054680100000000000000008110156128005761324d91600182018155612980565b9190916132ca5760a0906001600160a01b038082511673ffffffffffffffffffffffffffffffffffffffff1990818654161785556001850191602084015116908254161790556040810151600284015560608101516003840155608081015160048401550151600381101561279c5760056132c89201613213565b565b634e487b7160e01b600052600060045260246000fd5b90926132c893604051936323b872dd60e01b60208601526001600160a01b03809216602486015216604484015260648301526064825261331f82612816565b6001600160a01b03169061339d60405161333881612832565b6020938482527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858301526000808587829751910182855af13d15613428573d9161338283612e37565b92613390604051948561286a565b83523d868885013e613534565b8051806133ab575b50505050565b8184918101031261046857820151908115918215036107ac57506133d1578080806133a5565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b606091613534565b909190156134a657508051156134435790565b73953cd009a490176fceb3a26b9753e6f01645ff283b156134615790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8151156134b65750805190602001fd5b60405162461bcd60e51b8152908190610c9c9060048301612d5e565b909190156134a657508051156134e55790565b73de12c7959e1a72bbe8a5f7a1dc8f8eef9ab011b33b156134615790565b909190156134a657508051156135165790565b73de5ed76e7c05ec5e4572cfc88d1acea165109e443b156134615790565b919290156135515750815115613548575090565b3b156134615790565b8251909150156134b65750805190602001fd5b906132c8604051613574816127e4565b60a060ff600583966001600160a01b0380825416865260018201541660208601526002810154604086015260038101546060860152600481015460808601520154169101613207565b906135c78261288c565b6135d4604051918261286a565b82815280926135e5601f199161288c565b0190602036910137565b156135f657565b60405162461bcd60e51b815260206004820152601260248201527f496e646578204f7574204f662052616e676500000000000000000000000000006044820152606490fd5b1561364257565b60405162461bcd60e51b815260206004820152600f60248201527f416d6f756e7420546f6f204869676800000000000000000000000000000000006044820152606490fd5b906132ca57818103613697575050565b600560ff816132c8946001600160a01b038082541673ffffffffffffffffffffffffffffffffffffffff1990818854161787556001870191600184015416908254161790556002810154600286015560038101546003860155600481015460048601550154169101613213565b8054801561374457600019019061371b8282612980565b6132ca576005600091828155826001820155826002820155826003820155826004820155015555565b634e487b7160e01b600052603160045260246000fd5b61339d604051613797816102416020968783019663a9059cbb60e01b885260248401602090939291936001600160a01b0360408201951681520152565b604051906137a482612832565b8482527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648583015260008094819251908273de5ed76e7c05ec5e4572cfc88d1acea165109e445af13d15613818573d906137fd82612e37565b9161380b604051938461286a565b82523d858784013e613503565b606090613503565b60405163a9059cbb60e01b60208201526001600160a01b039290921660248301526044808301939093529181526132c89161331f60648361286a565b1561386357565b60405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420416d6f756e740000000000000000000000000000000000006044820152606490fd5b929091906000915b84518310156138fd576138c383866131e6565b51906000828210156138eb57506000526020526138e560406000205b926131d7565b916138b0565b6040916138e5938252602052206138df565b91509250149056fea164736f6c6343000811000a
Deployed Bytecode
0x608060408181526004908136101561001657600080fd5b600092833560e01c90816301ffc9a7146126b5575080630bf762081461266757806317a5e2201461247b5780631aadd4391461243a5780631dbabb6e1461241b5780631fe00dad14612392578063248a9ca314612367578063297306be146122cd5780632da620a41461229e5780632f2ff15d146121e957806336568abe146121495780633ace81f1146120f55780633f4ba83a14611f3c5780633f6bb69d14611ed857806346b013c014611eb85780634b19becc14611da65780635c395a7914611c375780635c975abb14611c135780637c6c1c5e14611bea57806381406c2214611bca5780638456cb5914611a4b57806385f438c114611a10578063875f0000146119075780639010d07c146118c557806391d148541461187f57806393badf1b1461157e578063973d9e03146115345780639a48eb51146114dd578063a1f13151146112a0578063a2011b3f14611265578063a217fddf1461124a578063a481c17f146110a2578063b7760c8f14610ea2578063bc1e5ae514610d77578063bd5dec9814610a8c578063c4d66de81461088b578063ca15c87314610863578063d547741f14610826578063e63ab1e9146107eb578063f89df8641461046c578063fb1bb9de1461042d5763fff28a1b146101f257600080fd5b3461042957610200366129bf565b9291909361020c613186565b6102188583111561385c565b610100548351336020808301918252604083018990529661025893909290919061024f81606081015b03601f19810183528261286a565b519020916138a8565b1561041b573386526102b1610102958686528488209673de12c7959e1a72bbe8a5f7a1dc8f8eef9ab011b397888a528752858920610297868254612e14565b90553389528652848820878952865284882054111561363b565b610349835187808783016323b872dd60e01b8152336024850152306044850152866064850152606484526102e484612816565b8751936102f085612832565b8985527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648a8601525190828b5af13d15610413573d9061032f82612e37565b9161033c8851938461286a565b82523d8a8984013e6134d2565b805180610396575b877f9018eade4aec2a696b34b0f5459a1a7dc058389bab8e2380d880817a9e22b21360608960d9880489898c610387843361375a565b8251948552840152820152a180f35b8186918101031261040f5784015180159081150361040f576103b9578080610351565b825162461bcd60e51b8152908101849052602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b8680fd5b6060906134d2565b82516309bde33960e01b8152fd5b8280fd5b838234610468578160031936011261046857602090517f427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a8152f35b5080fd5b509034610429576080806003193601126107e75767ffffffffffffffff9180358381116107e3576104a090369083016128a4565b916024359380851161040f573660238601121561040f5784830135926104c58461288c565b956104d28851978861286a565b84875260209460248689019160051b830101913683116107cb576024879101915b8383106107d357505050506044359182116107cf57366023830112156107cf57810135956105208761288c565b9161052d8251938461286a565b8783528483016024819960051b830101913683116107cb57602401905b8282106107af57505050606435956001600160a01b03988988168098036107ac57610573613186565b805b87518110156106e757806106bd8a8a6106b88f8a8961068e8f93896106878f9c838f6106c29f80828f8f808f8f928f6106186106189f61063e8e610645948961067f9f839f8496918a836105e988956105d261064a9f88906131e6565b51166105de878a6131e6565b5190309033906132e0565b8660fb5442106000146106c7578561062261061d610618836106116106379b610628976131e6565b519b6131e6565b6131fa565b6127cb565b936131e6565b511682528c5220918254612e14565b90556131e6565b51966131e6565b612783565b84865281528861065d88888820946131e6565b5116855252610670848420918254612e14565b9055815260ff8d52209c6131e6565b5116956131e6565b51946131e6565b928c519661069b886127e4565b87528601528a850152426060850152438c85015260a08401613207565b61322b565b6131d7565b610575565b856106226106e2610618836106116106379b610628976131e6565b6127b2565b50979896959194939685519780890190895283518091528560a08a019401918a905b8282106107935750505050816107299188869796959403858a0152612912565b92868403908701525191828152019591855b82811061077357867f9f408e7cdeef8126a6c6b2837688b68c0c498656e49e166c39258752b0c5e9c187808b8960608301520390a180f35b909192968280826107876001948c516129b2565b0198019392910161073b565b8351811686529487019492870192600190910190610709565b80fd5b813560038110156107c757815290860190860161054a565b8b80fd5b8a80fd5b8780fd5b82358152918101918791016104f3565b8580fd5b8380fd5b838234610468578160031936011261046857602090517f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8152f35b5034610429578060031936011261042957610860913561085b600161084961273e565b93838752609760205286200154612c31565b612d8a565b80f35b50903461042957602036600319011261042957602092829135815260c9845220549051908152f35b50903461042957602090816003193601126107e7576108a8612723565b9084549160ff8360081c161592838094610a7f575b8015610a68575b156109ff5760ff1980821660011788556109419291856109ee575b5061090a60ff895460081c166108f481613114565b6108fd81613114565b8260335416603355613114565b878052609786526001600160a01b03878920921691828952865260ff8789205416156109a6575b5086805260c98552858720612f8b565b5062278d00420190814211610993575060fb5561095c578280f35b7f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989161ff001984541684555160018152a138808280f35b634e487b7160e01b865260119052602485fd5b8780526097865286882082895286526001878920918254161790553381887f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a438610931565b61ffff1916610101178855386108df565b855162461bcd60e51b8152808401869052602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608490fd5b50303b1580156108c45750600160ff8216146108c4565b50600160ff8216106108bd565b503461042957602091826003193601126107e757803567ffffffffffffffff8111610d7357610abe90369083016128a4565b937f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e480825260978552838220338352855260ff848320541615610ba65750805b8551811015610ba25760246001600160a01b038681610b1d858b6131e6565b511691610b2a858b6131e6565b51168751938480926370a0823160e01b8252308a8301525afa918215610b98578492610b67575b50610b6292916106bd913390613820565b610afe565b9091508681813d8311610b91575b610b7f818361286a565b810103126107e75751906106bd610b51565b503d610b75565b86513d86823e3d90fd5b5080f35b908491610bb233612e64565b855191610bbe8361284e565b60428352848301936060368637835115610d605760308553835190600191821015610d4d5790607860218601536041915b818311610ce257505050610ca057610c9c938693610c8893610c79604894610c449a519a8576020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8d978801528251928391603789019101612d3b565b8401917f206973206d697373696e6720726f6c6520000000000000000000000000000000603784015251809386840190612d3b565b0103602881018752018561286a565b5162461bcd60e51b81529283928301612d5e565b0390fd5b50505080606493519262461bcd60e51b845283015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015610d3a576f181899199a1a9b1b9c1cb0b131b232b360811b901a610d128588612e53565b53881c928015610d2757600019019190610bef565b634e487b7160e01b825260118952602482fd5b634e487b7160e01b835260328a52602483fd5b634e487b7160e01b815260328852602490fd5b634e487b7160e01b815260328752602490fd5b8480fd5b5082903461046857610dc890610d8c366129bf565b610d999692949196613186565b610da58786111561385c565b6101015484513360208201908152604082018a90529061024f8160608101610241565b15610e945750610e8e7f9018eade4aec2a696b34b0f5459a1a7dc058389bab8e2380d880817a9e22b213939433865261010280602052610e5885858920936001600160a01b039361010395858754168c52602052878b20610e2a848254612e14565b9055338b52602052610e4f878b20918587541692838d52602052888c2054111561363b565b309033906132e0565b60b9850491610e67833361375a565b54169251938493846040919493926001600160a01b03606083019616825260208201520152565b0390a180f35b90516309bde33960e01b8152fd5b508290346104685780600319360112610468578235610ebf61273e565b91610ec8613186565b33845260ff91602093838552610ee28387205483106135ef565b6001600160a01b038091169333851461105f57338752808652610f10610f0a84868a20612980565b50613564565b90858252858852808752610f2682868a2061322b565b338852808752848820805460001981019190821161104c57610f6491610f4b91612980565b50338a52828952610f5e86888c20612980565b90613687565b3388528652610f74848820613704565b8381019182519260a08301938451600381101561103957610f9490612783565b338b52895288878b20940193838551168b528952610fb6878b20918254613017565b9055519251600381101561102657917f138dbc8474f748db86063dcef24cef1495bc73385a946f8d691128085e5ebec297959391610ff76060989694612783565b868b528752848a2091511689528552611014838920918254612e14565b9055815193338552840152820152a180f35b634e487b7160e01b895260218a52602489fd5b634e487b7160e01b8b5260218c5260248bfd5b634e487b7160e01b8a5260118b5260248afd5b835162461bcd60e51b8152808901879052601160248201527f5472616e7366657220546f204f776e65720000000000000000000000000000006044820152606490fd5b503461042957602090816003193601126107e7578235916110c1613186565b815193611170828601956323b872dd60e01b8752336024820152306044820152856064820152606481526110f481612816565b878086519261110284612832565b8684527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564878501525173953cd009a490176fceb3a26b9753e6f01645ff2899828b5af13d15611242573d9061115682612e37565b916111638851938461286a565b82523d8a8784013e613430565b8051806111cb575b877f9018eade4aec2a696b34b0f5459a1a7dc058389bab8e2380d880817a9e22b2136060898989818a338852610102815282882085895281528288206111bf838254612e14565b9055610387823361375a565b8184918101031261040f5782015180159081150361040f576111ee578080611178565b915162461bcd60e51b815291820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b606090613430565b83823461046857816003193601126104685751908152602090f35b838234610468578160031936011261046857602090517f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda8152f35b50346104295780600319360112610429576024359082356003831015610d73576112c8613186565b33855260ff6020948186526112e18488205484106135ef565b3387528186526112f383858920612980565b506005810192808454169260038410156114ca578784146114875750927fc3c2a142bb1c2ac41f2012ce7f1a7e0aebcd6fbfefaaa426c797361ffd57ae6a9795928260609895600261142f9895019061134d825494612783565b8d3390528a528c8a6113ed8960038185209760018101996001600160a01b03998a8c541688528652611383848820918254613017565b90550193845460fb541160001461145c5786546113a2878c54166127cb565b898b5416835285526113b8838320918254613017565b90555b6113c58d8b613213565b8654936113d4878c5416612783565b338352815282822090898b541683525220918254612e14565b90555460fb5411156114335761140691549454166127cb565b9154168a52865261141b838a20918254612e14565b90555b8151943386528501528301906129b2565ba180f35b61144091549454166127b2565b9154168a528652611455838a20918254612e14565b905561141e565b865461146a878c54166127b2565b898b541683528552611480838320918254613017565b90556113bb565b865162461bcd60e51b8152908101899052601960248201527f53616d65204d6967726174696f6e20507265666572656e6365000000000000006044820152606490fd5b634e487b7160e01b8a5260219052602489fd5b50346104295780600319360112610429577ff5df4035299cd4b5ca78fd7be5658dc1e719f43daf4efb818eb4560e6b518834913560243561151c612a48565b8161010055806101015582519182526020820152a180f35b83823461046857806003193601126104685780602092611552612723565b61155a61273e565b6001600160a01b039182168352610102865283832091168252845220549051908152f35b5082903461046857806003193601126104685767ffffffffffffffff918335838111610468576115b190369086016128a4565b936024938435908111610429576115cb90369083016128a4565b9082805260209060978252848420338552825260ff928386862054161561170f57909684965b815188101561170b576001600160a01b03988961160e8a856131e6565b5116938488528686528888205493885b82518110156116f057895b8d8c8c8c8c8c8c871061164b5750505050505050611646906131d7565b61161e565b8352522061165a908390612980565b509080600180930154169061166f85886131e6565b5116036116d4575060001987019687116116c2576116ac88610f5e838f8f8f8f6116a18f888552838352858520612980565b509683525220612980565b878b528989526116bd8c8c20613704565b611629565b634e487b7160e01b8b5260118552858bfd5b81018091111561162957634e487b7160e01b8b5260118552858bfd5b509a509250925096611701906131d7565b96979091976115f1565b8580f35b508491848761171d33612e64565b8551918361172a8461284e565b6042845285840194606036873784511561186d576030865384519060019182101561185b5790607860218701536041915b8183116117f2575050506117b15750610c9c938693610c8893610c79604894610c449a519a8576020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8d978801528251928391603789019101612d3b565b9250505081606494519362461bcd60e51b85528401528201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015611849576f181899199a1a9b1b9c1cb0b131b232b360811b901a6118228589612e53565b53891c9280156118375760001901919061175b565b634e487b7160e01b825260118a528482fd5b634e487b7160e01b835260328b528583fd5b634e487b7160e01b8152603289528390fd5b634e487b7160e01b8152603288529050fd5b5090346104295781600319360112610429578160209360ff926118a061273e565b90358252609786526001600160a01b0383832091168252855220541690519015158152f35b5090346104295781600319360112610429576118f86020936001600160a01b039235815260c98552836024359120612f73565b92905490519260031b1c168152f35b50919034610468576020908160031936011261042957803567ffffffffffffffff81116107e75761193a913691016128a4565b9261194584516135bd565b9261195085516135bd565b9461195b81516135bd565b93825b82518110156119fd576119f89084805260fd808452868620906001600160a01b03918261198b85896131e6565b5116885285528787205461199f848c6131e6565b5260018752808552878720826119b585896131e6565b511688528552878720546119c9848d6131e6565b52600287528452868620906119de83876131e6565b511686528352858520546119f282896131e6565b526131d7565b61195e565b845180611a0c888b8b84612946565b0390f35b838234610468578160031936011261046857602090517f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e48152f35b509190346104685781600319360112610468577f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9081835260209160978352848420338552835260ff858520541615611ae757837f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2588487611aca613186565b611ad2613186565b600160ff19603354161760335551338152a180f35b611af393919333612e64565b855191611aff8361284e565b60428352848301936060368637835115610d605760308553835190600191821015610d4d5790607860218601536041915b818311611b8557505050610ca057610c9c938693610c8893610c79604894610c449a519a8576020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8d978801528251928391603789019101612d3b565b909192600f81166010811015610d3a576f181899199a1a9b1b9c1cb0b131b232b360811b901a611bb58588612e53565b53881c928015610d2757600019019190611b30565b838234610468578160031936011261046857602090610101549051908152f35b8382346104685781600319360112610468576020906001600160a01b0361010354169051908152f35b83823461046857816003193601126104685760209060ff6033541690519015158152f35b5082346107ac5760209182600319360112610468576001600160a01b039182611c5e612723565b169384825260ff908181528383205495611c778761288c565b96611c848651988961286a565b808852611c93601f199161288c565b0182855b828110611d6e57505050835b8751811015611ce557611ce090828652848452611cc5610f0a82898920612980565b611ccf828b6131e6565b52611cda818a6131e6565b506131d7565b611ca3565b855183815288518185018190528190818901908b870190878a8d8d5b848310611d0e5787870388f35b9193958597509260c060019294611d5c839851878151168352878582015116858401528681015187840152606080820151908401526080808201519084015260a080910151908301906129b2565b01970193019091879695939492611d01565b8751611d79816127e4565b878152878382015287898201528760608201528760808201528760a082015282828c010152018390611c97565b5090346104295781600319360112610429577f5d95162205dc900555172b9649799b0334d5c456a8c9d875524229cd73416d4b91610e8e823591611e9360243594611def613186565b33885260ff602052611e058389205486106135ef565b33885260ff602052611e1985848a20612980565b509060028201611e35888254611e3082821161363b565b613017565b905533895260ff6020526106b8848a20916001600160a01b036001850154169360ff60056003830154938301549201541691875195611e73876127e4565b33875260208701528a888701526060860152608085015260a08401613207565b5192839233846040919493926001600160a01b03606083019616825260208201520152565b838234610468578160031936011261046857602090610100549051908152f35b5090346104295760603660031901126104295735600381101561042957611efd61273e565b604435916001600160a01b03908184168094036107e3579184939186936020975260fe8752848420911683528552828220908252845220549051908152f35b508290346104685781600319360112610468577f427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a9081835260209160978352818420338552835260ff82852054161561201157506033549360ff851615611fd057507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa929360ff191660335551338152a180f35b82606492519162461bcd60e51b8352820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152fd5b61201e9493919433612e64565b85519161202a8361284e565b60428352848301936060368637835115610d605760308553835190600191821015610d4d5790607860218601536041915b8183116120b057505050610ca057610c9c938693610c8893610c79604894610c449a519a8576020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8d978801528251928391603789019101612d3b565b909192600f81166010811015610d3a576f181899199a1a9b1b9c1cb0b131b232b360811b901a6120e08588612e53565b53881c928015610d275760001901919061205b565b5082346107ac5761210536612754565b9060038110156121365782849283926020955260fc85526001600160a01b0383832091168252845220549051908152f35b634e487b7160e01b835260218552602483fd5b5091903461046857826003193601126104685761216461273e565b90336001600160a01b0383160361218057906108609135612d8a565b608490602085519162461bcd60e51b8352820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152fd5b5034610429578060031936011261042957610ba291359060c961220a61273e565b928086526020906097825261222460018589200154612c31565b808752609782526001600160a01b03848820951694858852825260ff848820541615612255575b8652528320612f8b565b808752609782528387208588528252838720805460ff191660011790553385827f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8a80a461224b565b8382346104685781600319360112610468576020905173de5ed76e7c05ec5e4572cfc88d1acea165109e448152f35b509190346104685782600319360112610468576122e8612723565b91602435906001600160a01b03809416815260ff6020528481209081548310156107ac57509161231e60c0959261236594612980565b509084825416946001830154169260028301549060ff60056003860154948601549501541694815197885260208801528601526060850152608084015260a08301906129b2565bf35b5090346104295760203660031901126104295781602093600192358152609785522001549051908152f35b50919034610468576020908160031936011261042957803567ffffffffffffffff81116107e7576123c5913691016128a4565b926123d084516135bd565b926123db85516135bd565b946123e681516135bd565b93825b82518110156119fd576124169084805260fc808452868620906001600160a01b03918261198b85896131e6565b6123e9565b83823461046857816003193601126104685760209060fb549051908152f35b5082346107ac5761244a36612754565b9060038110156121365782849283926020955260fd85526001600160a01b0383832091168252845220549051908152f35b5082903461046857602090816003193601126104295783359161249c613186565b33845260ff81526124b18285205484106135ef565b33845260ff81526124c7610f0a84848720612980565b33855260ff8252828520805460001981019190821161265457612501916124ed91612980565b5033875260ff8452610f5e86868920612980565b33855260ff8252612513838620613704565b8281019182519060a0830190815160038110156110265761253390612783565b3389528152606086892094828101946001600160a01b0396878751168c528452612561898c20918254613017565b9055015160fb5411156125f057845191516003811015611026577feb5c2ddb3f84da291d8850278b584c57039961f86384bd48fea5cbc3385ab11f98995091610e8e97969593916125b56125da96946127cb565b90848451168c52526125cb868b20918254613017565b90555b51169051903390613820565b5133815260208101919091529081906040820190565b845191516003811015611026577feb5c2ddb3f84da291d8850278b584c57039961f86384bd48fea5cbc3385ab11f98995091610e8e97969593916126376125da96946127b2565b90848451168c525261264d868b20918254613017565b90556125ce565b634e487b7160e01b875260118852602487fd5b83346107ac5760203660031901126107ac57612681612723565b612689612a48565b6001600160a01b03610103911673ffffffffffffffffffffffffffffffffffffffff1982541617905580f35b84908434610429576020366003190112610429573563ffffffff60e01b81168091036104295760209250635a05180f60e01b81149081156126f8575b5015158152f35b637965db0b60e01b811491508115612712575b50836126f1565b6301ffc9a760e01b1490508361270b565b600435906001600160a01b038216820361273957565b600080fd5b602435906001600160a01b038216820361273957565b604090600319011261273957600435600381101561273957906024356001600160a01b03811681036127395790565b600381101561279c5760005260fe602052604060002090565b634e487b7160e01b600052602160045260246000fd5b600381101561279c5760005260fc602052604060002090565b600381101561279c5760005260fd602052604060002090565b60c0810190811067ffffffffffffffff82111761280057604052565b634e487b7160e01b600052604160045260246000fd5b60a0810190811067ffffffffffffffff82111761280057604052565b6040810190811067ffffffffffffffff82111761280057604052565b6080810190811067ffffffffffffffff82111761280057604052565b90601f8019910116810190811067ffffffffffffffff82111761280057604052565b67ffffffffffffffff81116128005760051b60200190565b81601f82011215612739578035916128bb8361288c565b926128c9604051948561286a565b808452602092838086019260051b820101928311612739578301905b8282106128f3575050505090565b81356001600160a01b03811681036127395781529083019083016128e5565b90815180825260208080930193019160005b828110612932575050505090565b835185529381019392810192600101612924565b9161296f9061296161297d9593606086526060860190612912565b908482036020860152612912565b916040818403910152612912565b90565b805482101561299c576000526006602060002091020190600090565b634e487b7160e01b600052603260045260246000fd5b90600382101561279c5752565b606060031982011261273957600435916024359160443567ffffffffffffffff81116127395781602382011215612739578060040135916129ff8361288c565b92612a0d604051948561286a565b80845260209260248486019260051b82010192831161273957602401905b828210612a39575050505090565b81358152908301908301612a2b565b3360009081527f0ba47cfd5e746a7a77d10576777b78a793709d8d5c4bbd732c557bc9a64bb31b60209081526040808320549092907f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda9060ff1615612aad5750505050565b612ab633612e64565b845191612ac28361284e565b60428352848301936060368637835115612c1d5760308553835190600191821015612c1d5790607860218601536041915b818311612baf57505050612b6d57610c44938593612b5793612b48604894610c9c9951988576020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8b978801528251928391603789019101612d3b565b0103602881018552018361286a565b5162461bcd60e51b815291829160048301612d5e565b60648486519062461bcd60e51b825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015612c09576f181899199a1a9b1b9c1cb0b131b232b360811b901a612bdf8588612e53565b5360041c928015612bf557600019019190612af3565b634e487b7160e01b82526011600452602482fd5b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b81526032600452602490fd5b600081815260209060978252604092838220338352835260ff848320541615612c5a5750505050565b612c6333612e64565b845191612c6f8361284e565b60428352848301936060368637835115612c1d5760308553835190600191821015612c1d5790607860218601536041915b818311612cf557505050612b6d57610c44938593612b5793612b48604894610c9c9951988576020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8b978801528251928391603789019101612d3b565b909192600f81166010811015612c09576f181899199a1a9b1b9c1cb0b131b232b360811b901a612d258588612e53565b5360041c928015612bf557600019019190612ca0565b60005b838110612d4e5750506000910152565b8181015183820152602001612d3e565b60409160208252612d7e8151809281602086015260208686019101612d3b565b601f01601f1916010190565b906040612dc99260009080825260976020526001600160a01b0383832094169384835260205260ff8383205416612dcc575b815260c960205220613024565b50565b808252609760205282822084835260205282822060ff1981541690553384827ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b8580a4612dbc565b91908201809211612e2157565b634e487b7160e01b600052601160045260246000fd5b67ffffffffffffffff811161280057601f01601f191660200190565b90815181101561299c570160200190565b604051906060820182811067ffffffffffffffff82111761280057604052602a825260208201604036823782511561299c5760309053815160019081101561299c57607860218401536029905b808211612f05575050612ec15790565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b9091600f81166010811015612f5e576f181899199a1a9b1b9c1cb0b131b232b360811b901a612f348486612e53565b5360041c918015612f49576000190190612eb1565b60246000634e487b7160e01b81526011600452fd5b60246000634e487b7160e01b81526032600452fd5b805482101561299c5760005260206000200190600090565b919060018301600090828252806020526040822054156000146130115784549468010000000000000000861015612ffd5783612fed612fd4886001604098999a01855584612f73565b819391549060031b600019811b9283911b169119161790565b9055549382526020522055600190565b634e487b7160e01b83526041600452602483fd5b50925050565b91908203918211612e2157565b9060018201906000928184528260205260408420549081151560001461310d57600019918083018181116130f9578254908482019182116130e5578082036130b0575b5050508054801561309c5782019161307f8383612f73565b909182549160031b1b191690555582526020526040812055600190565b634e487b7160e01b86526031600452602486fd5b6130d06130c0612fd49386612f73565b90549060031b1c92839286612f73565b90558652846020526040862055388080613067565b634e487b7160e01b88526011600452602488fd5b634e487b7160e01b87526011600452602487fd5b5050505090565b1561311b57565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608490fd5b60ff6033541661319257565b60405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606490fd5b6000198114612e215760010190565b805182101561299c5760209160051b010190565b51600381101561279c5790565b600382101561279c5752565b90600381101561279c5760ff80198354169116179055565b8054680100000000000000008110156128005761324d91600182018155612980565b9190916132ca5760a0906001600160a01b038082511673ffffffffffffffffffffffffffffffffffffffff1990818654161785556001850191602084015116908254161790556040810151600284015560608101516003840155608081015160048401550151600381101561279c5760056132c89201613213565b565b634e487b7160e01b600052600060045260246000fd5b90926132c893604051936323b872dd60e01b60208601526001600160a01b03809216602486015216604484015260648301526064825261331f82612816565b6001600160a01b03169061339d60405161333881612832565b6020938482527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858301526000808587829751910182855af13d15613428573d9161338283612e37565b92613390604051948561286a565b83523d868885013e613534565b8051806133ab575b50505050565b8184918101031261046857820151908115918215036107ac57506133d1578080806133a5565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b606091613534565b909190156134a657508051156134435790565b73953cd009a490176fceb3a26b9753e6f01645ff283b156134615790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8151156134b65750805190602001fd5b60405162461bcd60e51b8152908190610c9c9060048301612d5e565b909190156134a657508051156134e55790565b73de12c7959e1a72bbe8a5f7a1dc8f8eef9ab011b33b156134615790565b909190156134a657508051156135165790565b73de5ed76e7c05ec5e4572cfc88d1acea165109e443b156134615790565b919290156135515750815115613548575090565b3b156134615790565b8251909150156134b65750805190602001fd5b906132c8604051613574816127e4565b60a060ff600583966001600160a01b0380825416865260018201541660208601526002810154604086015260038101546060860152600481015460808601520154169101613207565b906135c78261288c565b6135d4604051918261286a565b82815280926135e5601f199161288c565b0190602036910137565b156135f657565b60405162461bcd60e51b815260206004820152601260248201527f496e646578204f7574204f662052616e676500000000000000000000000000006044820152606490fd5b1561364257565b60405162461bcd60e51b815260206004820152600f60248201527f416d6f756e7420546f6f204869676800000000000000000000000000000000006044820152606490fd5b906132ca57818103613697575050565b600560ff816132c8946001600160a01b038082541673ffffffffffffffffffffffffffffffffffffffff1990818854161787556001870191600184015416908254161790556002810154600286015560038101546003860155600481015460048601550154169101613213565b8054801561374457600019019061371b8282612980565b6132ca576005600091828155826001820155826002820155826003820155826004820155015555565b634e487b7160e01b600052603160045260246000fd5b61339d604051613797816102416020968783019663a9059cbb60e01b885260248401602090939291936001600160a01b0360408201951681520152565b604051906137a482612832565b8482527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648583015260008094819251908273de5ed76e7c05ec5e4572cfc88d1acea165109e445af13d15613818573d906137fd82612e37565b9161380b604051938461286a565b82523d858784013e613503565b606090613503565b60405163a9059cbb60e01b60208201526001600160a01b039290921660248301526044808301939093529181526132c89161331f60648361286a565b1561386357565b60405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420416d6f756e740000000000000000000000000000000000006044820152606490fd5b929091906000915b84518310156138fd576138c383866131e6565b51906000828210156138eb57506000526020526138e560406000205b926131d7565b916138b0565b6040916138e5938252602052206138df565b91509250149056fea164736f6c6343000811000a
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
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.