Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
MultiAccount
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: SYMM-Core-Business-Source-License-1.1
// This contract is licensed under the SYMM Core Business Source License 1.1
// Copyright (c) 2023 Symmetry Labs AG
// For more information, see https://docs.symm.io/legal-disclaimer/license
pragma solidity >=0.8.18;
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.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/token/ERC20/extensions/IERC20Metadata.sol";
import "../interfaces/ISymmio.sol";
import "../interfaces/ISymmioPartyA.sol";
import "../interfaces/IMultiAccount.sol";
import "../facets/BlastConfig/IBlast.sol";
contract MultiAccount is IMultiAccount, Initializable, PausableUpgradeable, AccessControlUpgradeable {
using SafeERC20Upgradeable for IERC20Upgradeable;
// Defining roles for access control
bytes32 public constant SETTER_ROLE = keccak256("SETTER_ROLE");
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
bytes32 public constant UNPAUSER_ROLE = keccak256("UNPAUSER_ROLE");
// State variables
mapping(address => Account[]) public accounts; // User to their accounts mapping
mapping(address => uint256) public indexOfAccount; // Account to its index mapping
mapping(address => address) public owners; // Account to its owner mapping
address public accountsAdmin; // Admin address for the contract
address public symmioAddress; // Address of the Symmio platform
uint256 public saltCounter; // Counter for generating unique addresses with create2
bytes public accountImplementation;
mapping(address => mapping(address => mapping(bytes4 => bool))) public delegatedAccesses; // account -> target -> selector -> state
IBlast public constant BLAST = IBlast(0x4300000000000000000000000000000000000002);
modifier onlyOwner(address account, address sender) {
require(owners[account] == sender, "MultiAccount: Sender isn't owner of account");
_;
}
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
function initialize(address admin, address symmioAddress_, bytes memory accountImplementation_) public initializer {
__Pausable_init();
__AccessControl_init();
_grantRole(DEFAULT_ADMIN_ROLE, admin);
_grantRole(PAUSER_ROLE, admin);
_grantRole(UNPAUSER_ROLE, admin);
_grantRole(SETTER_ROLE, admin);
accountsAdmin = admin;
symmioAddress = symmioAddress_;
accountImplementation = accountImplementation_;
BLAST.configureClaimableYield();
BLAST.configureClaimableGas();
}
function delegateAccess(address account, address target, bytes4 selector, bool state) external onlyOwner(account, msg.sender) {
require(target != msg.sender && target != account, "MultiAccount: invalid target");
emit DelegateAccess(account, target, selector, state);
delegatedAccesses[account][target][selector] = state;
}
function delegateAccesses(address account, address target, bytes4[] memory selector, bool state) external onlyOwner(account, msg.sender) {
require(target != msg.sender && target != account, "MultiAccount: invalid target");
for (uint256 i = selector.length; i != 0; i--) {
delegatedAccesses[account][target][selector[i - 1]] = state;
}
emit DelegateAccesses(account, target, selector, state);
}
function setAccountImplementation(bytes memory accountImplementation_) external onlyRole(SETTER_ROLE) {
emit SetAccountImplementation(accountImplementation, accountImplementation_);
accountImplementation = accountImplementation_;
}
function setSymmioAddress(address addr) external onlyRole(SETTER_ROLE) {
emit SetSymmioAddress(symmioAddress, addr);
symmioAddress = addr;
}
function _deployPartyA() internal returns (address account) {
bytes32 salt = keccak256(abi.encodePacked("MultiAccount_", saltCounter));
saltCounter += 1;
bytes memory bytecode = abi.encodePacked(accountImplementation, abi.encode(accountsAdmin, address(this), symmioAddress));
account = _deployContract(bytecode, salt);
return account;
}
function _deployContract(bytes memory bytecode, bytes32 salt) internal returns (address contractAddress) {
assembly {
contractAddress := create2(0, add(bytecode, 32), mload(bytecode), salt)
}
require(contractAddress != address(0), "MultiAccount: create2 failed");
emit DeployContract(msg.sender, contractAddress);
return contractAddress;
}
function pause() external onlyRole(PAUSER_ROLE) {
_pause();
}
function unpause() external onlyRole(UNPAUSER_ROLE) {
_unpause();
}
function claimAllGas(address recipient) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(recipient != address(this), "BlastConfigFacet: recipient can not be the contract itself");
BLAST.claimAllGas(address(this), recipient);
}
function claimMaxGas(address recipient) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(recipient != address(this), "BlastConfigFacet: recipient can not be the contract itself");
BLAST.claimMaxGas(address(this), recipient);
}
function claimGasAtMinClaimRate(address recipient, uint256 minRate) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(recipient != address(this), "BlastConfigFacet: recipient can not be the contract itself");
BLAST.claimGasAtMinClaimRate(address(this), recipient, minRate);
}
//////////////////////////////// Account Management ////////////////////////////////////
function addAccount(string memory name) external whenNotPaused {
address account = _deployPartyA();
indexOfAccount[account] = accounts[msg.sender].length;
accounts[msg.sender].push(Account(account, name));
owners[account] = msg.sender;
emit AddAccount(msg.sender, account, name);
}
function editAccountName(address accountAddress, string memory name) external whenNotPaused {
uint256 index = indexOfAccount[accountAddress];
accounts[msg.sender][index].name = name;
emit EditAccountName(msg.sender, accountAddress, name);
}
function depositForAccount(address account, uint256 amount) external onlyOwner(account, msg.sender) whenNotPaused {
address collateral = ISymmio(symmioAddress).getCollateral();
IERC20Upgradeable(collateral).safeTransferFrom(msg.sender, address(this), amount);
IERC20Upgradeable(collateral).safeApprove(symmioAddress, amount);
ISymmio(symmioAddress).depositFor(account, amount);
emit DepositForAccount(msg.sender, account, amount);
}
function depositAndAllocateForAccount(address account, uint256 amount) external onlyOwner(account, msg.sender) whenNotPaused {
address collateral = ISymmio(symmioAddress).getCollateral();
IERC20Upgradeable(collateral).safeTransferFrom(msg.sender, address(this), amount);
IERC20Upgradeable(collateral).safeApprove(symmioAddress, amount);
ISymmio(symmioAddress).depositFor(account, amount);
uint256 amountWith18Decimals = (amount * 1e18) / (10 ** IERC20Metadata(collateral).decimals());
bytes memory _callData = abi.encodeWithSignature("allocate(uint256)", amountWith18Decimals);
innerCall(account, _callData);
emit DepositForAccount(msg.sender, account, amount);
emit AllocateForAccount(msg.sender, account, amountWith18Decimals);
}
function withdrawFromAccount(address account, uint256 amount) external onlyOwner(account, msg.sender) whenNotPaused {
bytes memory _callData = abi.encodeWithSignature("withdrawTo(address,uint256)", owners[account], amount);
emit WithdrawFromAccount(msg.sender, account, amount);
innerCall(account, _callData);
}
function innerCall(address account, bytes memory _callData) internal {
(bool _success, bytes memory _resultData) = ISymmioPartyA(account)._call(_callData);
emit Call(msg.sender, account, _callData, _success, _resultData);
require(_success, "MultiAccount: Error occurred");
}
function _call(address account, bytes[] memory _callDatas) public whenNotPaused {
bool isOwner = owners[account] == msg.sender;
for (uint8 i; i < _callDatas.length; i++) {
bytes memory _callData = _callDatas[i];
if (!isOwner) {
require(_callData.length >= 4, "MultiAccount: Invalid call data");
bytes4 functionSelector;
assembly {
functionSelector := mload(add(_callData, 0x20))
}
require(delegatedAccesses[account][msg.sender][functionSelector], "MultiAccount: Unauthorized access");
}
innerCall(account, _callData);
}
}
//////////////////////////////// VIEWS ////////////////////////////////////
function getAccountsLength(address user) external view returns (uint256) {
return accounts[user].length;
}
function getAccounts(address user, uint256 start, uint256 size) external view returns (Account[] memory) {
uint256 len = size > accounts[user].length - start ? accounts[user].length - start : size;
Account[] memory userAccounts = new Account[](len);
for (uint256 i = start; i < start + len; i++) {
userAccounts[i - start] = accounts[user][i];
}
return userAccounts;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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 {Initializable} from "../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:
*
* ```solidity
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```solidity
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
* to enforce additional security measures for this role.
*/
abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {
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);
_;
}
function __AccessControl_init() internal onlyInitializing {
}
function __AccessControl_init_unchained() internal onlyInitializing {
}
/**
* @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/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.9.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized != type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
function __Pausable_init() internal onlyInitializing {
__Pausable_init_unchained();
}
function __Pausable_init_unchained() internal onlyInitializing {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
interface IERC20PermitUpgradeable {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*
* CAUTION: See Security Considerations above.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/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.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20Upgradeable.sol";
import "../extensions/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;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(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));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
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");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
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");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation 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).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
pragma solidity ^0.8.0;
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165Upgradeable.sol";
import {Initializable} from "../../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.9.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library MathUpgradeable {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1, "Math: mulDiv overflow");
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMathUpgradeable {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/MathUpgradeable.sol";
import "./math/SignedMathUpgradeable.sol";
/**
* @dev String operations.
*/
library StringsUpgradeable {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = MathUpgradeable.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toString(int256 value) internal pure returns (string memory) {
return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMathUpgradeable.abs(value))));
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, MathUpgradeable.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: SYMM-Core-Business-Source-License-1.1
// This contract is licensed under the SYMM Core Business Source License 1.1
// Copyright (c) 2023 Symmetry Labs AG
// For more information, see https://docs.symm.io/legal-disclaimer/license
pragma solidity >=0.8.18;
enum YieldMode {
AUTOMATIC,
VOID,
CLAIMABLE
}
enum GasMode {
VOID,
CLAIMABLE
}
interface IBlast {
// configure
function configureContract(address contractAddress, YieldMode _yield, GasMode gasMode, address governor) external;
function configure(YieldMode _yield, GasMode gasMode, address governor) external;
// base configuration options
function configureClaimableYield() external;
function configureClaimableYieldOnBehalf(address contractAddress) external;
function configureAutomaticYield() external;
function configureAutomaticYieldOnBehalf(address contractAddress) external;
function configureVoidYield() external;
function configureVoidYieldOnBehalf(address contractAddress) external;
function configureClaimableGas() external;
function configureClaimableGasOnBehalf(address contractAddress) external;
function configureVoidGas() external;
function configureVoidGasOnBehalf(address contractAddress) external;
function configureGovernor(address _governor) external;
function configureGovernorOnBehalf(address _newGovernor, address contractAddress) external;
// claim yield
function claimYield(address contractAddress, address recipientOfYield, uint256 amount) external returns (uint256);
function claimAllYield(address contractAddress, address recipientOfYield) external returns (uint256);
// claim gas
function claimAllGas(address contractAddress, address recipientOfGas) external returns (uint256);
function claimGasAtMinClaimRate(address contractAddress, address recipientOfGas, uint256 minClaimRateBips) external returns (uint256);
function claimMaxGas(address contractAddress, address recipientOfGas) external returns (uint256);
function claimGas(address contractAddress, address recipientOfGas, uint256 gasToClaim, uint256 gasSecondsToConsume) external returns (uint256);
// read functions
function readClaimableYield(address contractAddress) external view returns (uint256);
function readYieldConfiguration(address contractAddress) external view returns (uint8);
function readGasParams(address contractAddress) external view returns (uint256 etherSeconds, uint256 etherBalance, uint256 lastUpdated, GasMode);
}// SPDX-License-Identifier: SYMM-Core-Business-Source-License-1.1
// This contract is licensed under the SYMM Core Business Source License 1.1
// Copyright (c) 2023 Symmetry Labs AG
// For more information, see https://docs.symm.io/legal-disclaimer/license
pragma solidity >=0.8.18;
interface IMultiAccount {
struct Account {
address accountAddress;
string name;
}
event SetAccountImplementation(bytes oldAddress, bytes newAddress);
event SetSymmioAddress(address oldAddress, address newAddress);
event DeployContract(address sender, address contractAddress);
event AddAccount(address user, address account, string name);
event EditAccountName(address user, address account, string newName);
event DepositForAccount(address user, address account, uint256 amount);
event AllocateForAccount(address user, address account, uint256 amount);
event WithdrawFromAccount(address user, address account, uint256 amount);
event Call(address user, address account, bytes _callData, bool _success, bytes _resultData);
event DelegateAccess(address account, address target, bytes4 selector, bool state);
event DelegateAccesses(address account, address target, bytes4[] selector, bool state);
}// SPDX-License-Identifier: SYMM-Core-Business-Source-License-1.1
// This contract is licensed under the SYMM Core Business Source License 1.1
// Copyright (c) 2023 Symmetry Labs AG
// For more information, see https://docs.symm.io/legal-disclaimer/license
pragma solidity >=0.8.18;
interface ISymmio {
function depositFor(address account, uint256 amount) external;
function withdrawTo(address account, uint256 amount) external;
function getCollateral() external view returns (address);
}// SPDX-License-Identifier: SYMM-Core-Business-Source-License-1.1
// This contract is licensed under the SYMM Core Business Source License 1.1
// Copyright (c) 2023 Symmetry Labs AG
// For more information, see https://docs.symm.io/legal-disclaimer/license
pragma solidity >=0.8.18;
interface ISymmioPartyA {
function _approve(address token, uint256 amount) external;
function _call(bytes calldata _callData) external returns (bool _success, bytes memory _resultData);
function withdrawERC20(address token, uint256 amount) external;
}{
"metadata": {
"bytecodeHash": "none"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"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":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"AddAccount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AllocateForAccount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bytes","name":"_callData","type":"bytes"},{"indexed":false,"internalType":"bool","name":"_success","type":"bool"},{"indexed":false,"internalType":"bytes","name":"_resultData","type":"bytes"}],"name":"Call","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes4","name":"selector","type":"bytes4"},{"indexed":false,"internalType":"bool","name":"state","type":"bool"}],"name":"DelegateAccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes4[]","name":"selector","type":"bytes4[]"},{"indexed":false,"internalType":"bool","name":"state","type":"bool"}],"name":"DelegateAccesses","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"}],"name":"DeployContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DepositForAccount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"string","name":"newName","type":"string"}],"name":"EditAccountName","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":"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":"bytes","name":"oldAddress","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"newAddress","type":"bytes"}],"name":"SetAccountImplementation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"SetSymmioAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawFromAccount","type":"event"},{"inputs":[],"name":"BLAST","outputs":[{"internalType":"contract IBlast","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes[]","name":"_callDatas","type":"bytes[]"}],"name":"_call","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accountImplementation","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"accounts","outputs":[{"internalType":"address","name":"accountAddress","type":"address"},{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accountsAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"addAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"claimAllGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"minRate","type":"uint256"}],"name":"claimGasAtMinClaimRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"claimMaxGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4","name":"selector","type":"bytes4"},{"internalType":"bool","name":"state","type":"bool"}],"name":"delegateAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4[]","name":"selector","type":"bytes4[]"},{"internalType":"bool","name":"state","type":"bool"}],"name":"delegateAccesses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"delegatedAccesses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositAndAllocateForAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositForAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"accountAddress","type":"address"},{"internalType":"string","name":"name","type":"string"}],"name":"editAccountName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"getAccounts","outputs":[{"components":[{"internalType":"address","name":"accountAddress","type":"address"},{"internalType":"string","name":"name","type":"string"}],"internalType":"struct IMultiAccount.Account[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getAccountsLength","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":"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":"","type":"address"}],"name":"indexOfAccount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"address","name":"symmioAddress_","type":"address"},{"internalType":"bytes","name":"accountImplementation_","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"owners","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":[],"name":"saltCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"accountImplementation_","type":"bytes"}],"name":"setAccountImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setSymmioAddress","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":[],"name":"symmioAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawFromAccount","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60808060405234620000c6576000549060ff8260081c1662000074575060ff8082160362000038575b6040516137c09081620000cc8239f35b60ff90811916176000557f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498602060405160ff8152a13862000028565b62461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608490fd5b600080fdfe6080604052600436101561001257600080fd5b60003560e01c806301569e3a1461027757806301ffc9a714610272578063022914a71461026d57806311464fbe14610268578063248a9ca314610263578063272b13231461025e5780632ad26a04146102595780632f2ff15d1461025457806331e69d2d1461024f578063342fcda91461024a57806336568abe1461024557806337f93b08146102405780633f4ba83a1461023b5780634ebabea1146102365780635c975abb146102315780637278b28f1461022c57806382a7e533146102275780638456cb5914610222578063875245811461021d5780638b5afd2b1461021857806391d148541461021357806394aee4221461020e57806395c7d0ec1461020957806397d75776146102045780639b0c03de146101ff578063a04c6809146101fa578063a2011b3f146101f5578063a217fddf146101f0578063b9c9b3f2146101eb578063bcd2bf25146101e6578063bd367d8e146101e1578063c1102214146101dc578063cd2002f5146101d7578063cf7a1d77146101d2578063d547741f146101cd578063d9c2337c146101c8578063e63ab1e9146101c35763fb1bb9de146101be57600080fd5b611ec9565b611ea0565b611d17565b611cd5565b611bb7565b611b49565b611a42565b611993565b61191b565b61189c565b611880565b611845565b611827565b6117ea565b6117c7565b6116be565b61154f565b6114f9565b6114bc565b611439565b6111bb565b61106b565b611042565b61101f565b610f6b565b610ea9565b610e80565b610dea565b610c57565b6109a9565b6108dc565b610733565b61060c565b6105dd565b61050a565b61038f565b610339565b610292565b6001600160a01b0381160361028d57565b600080fd5b3461028d57602036600319011261028d576004356102af8161027c565b6102b7611f04565b60cd54604080516001600160a01b03808416825284811660208301529293917ff78ccdf5924090b2ab6627ac5da4ec5affed73d47c6bc6c8a4620a0d5ed57bc891a16001600160a01b031990921691161760cd55005b604435906001600160e01b03198216820361028d57565b35906001600160e01b03198216820361028d57565b3461028d57602036600319011261028d5760043563ffffffff60e01b811680910361028d57602090637965db0b60e01b811490811561037e575b506040519015158152f35b6301ffc9a760e01b14905038610373565b3461028d57602036600319011261028d5760206004356103ae8161027c565b60018060a01b0380911660005260cb825260406000205416604051908152f35b600091031261028d57565b634e487b7160e01b600052600060045260246000fd5b90600182811c9216801561041f575b602083101461040957565b634e487b7160e01b600052602260045260246000fd5b91607f16916103fe565b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811161045257604052565b610429565b604081019081106001600160401b0382111761045257604052565b606081019081106001600160401b0382111761045257604052565b90601f801991011681019081106001600160401b0382111761045257604052565b60005b8381106104c15750506000910152565b81810151838201526020016104b1565b906020916104ea815180928185528580860191016104ae565b601f01601f1916010190565b9060206105079281815201906104d1565b90565b3461028d576000806003193601126105da57604051908060cf5461052d816103ef565b808552916001918083169081156105b05750600114610567575b610563856105578187038261048d565b604051918291826104f6565b0390f35b925060cf83526000805160206137748339815191525b82841061059857505050810160200161055782610563610547565b8054602085870181019190915290930192810161057d565b8695506105639693506020925061055794915060ff191682840152151560051b8201019293610547565b80fd5b3461028d57602036600319011261028d5760043560005260976020526020600160406000200154604051908152f35b3461028d57602036600319011261028d5761067a602060043561062e8161027c565b610636611f59565b61064b6001600160a01b038216301415612d10565b604051634aa7d2f760e11b81523060048201526001600160a01b03909116602482015291829081906044820190565b038160006002604360981b015af180156106bd5761069457005b6106b49060203d81116106b6575b6106ac818361048d565b810190612d82565b005b503d6106a2565b6128db565b604051906106cf82610457565b565b6001600160401b03811161045257601f01601f191660200190565b81601f8201121561028d57803590610703826106d1565b92610711604051948561048d565b8284526020838301011161028d57816000926020809301838601378301015290565b3461028d57602036600319011261028d576004356001600160401b03811161028d576107847f1deb86e124d1a5f3b49977292b48e989b984bcd8944cfb14d63c8880482f2cff9136906004016106ec565b61078c612ccc565b61084360ce546107d46107cf60405160208101906c4d756c74694163636f756e745f60981b825284602d820152602d81526107c681610472565b51902092612419565b60ce55565b60cc5460cd54604080516001600160a01b0393841660208201523091810191909152911660608083019190915281526108329061083e90601f199061081a60808261048d565b60405193849161082c60208401612ed6565b90612121565b0390810183528261048d565b612f53565b33600090815260c960205260409020546001600160a01b038216600090815260ca602052604090205533600090815260c96020526040902061089f906108876106c2565b6001600160a01b038416815290846020830152612d91565b6001600160a01b038116600090815260cb6020526040902080546001600160a01b031916331790556108d76040519283923384612ead565b0390a1005b3461028d57604036600319011261028d576004356024356108fc8161027c565b60009180835260976020526109176001604085200154612078565b8083526097602090815260408085206001600160a01b0385166000908152925290205460ff1615610946578280f35b8083526097602090815260408085206001600160a01b038516600090815292529020805460ff1916600117905533916001600160a01b0316907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b3461028d5760408060031936011261028d576004356109c78161027c565b6024359060018060a01b0390600093828216855260209260cb84526109f23382848920541614612a8b565b6109fa612ccc565b60cd546004908590610a2290610a16906001600160a01b031681565b6001600160a01b031690565b8451635c1548fb60e01b815292839182905afa9081156106bd578791610c2a575b501690610a5285303385613002565b60cd54610a6a9086906001600160a01b0316846130be565b60cd54610a8190610a16906001600160a01b031681565b91823b15610c265781516317a790f160e11b81526001600160a01b0385166004820152602481018790529287908490604490829084905af19283156106bd57600493610c0d575b5084610ad3876123fc565b9183519485809263313ce56760e01b82525afa9081156106bd577f13b84d799b5b8b235eafe52313197bb3dbf3d5c36c2ac0b62e4c45cc4d3a958e96610b8b610b55610bb193610b4f7fb92f7c65176e3a873589352927ba42330e95085f34ab1a9721f2135b94a5188396610bda998e91610be0575b5061334b565b9061335c565b85516390ca796b60e01b998101999099526024890181905297610b8581604481015b03601f19810183528261048d565b8761340b565b83513381526001600160a01b038716602082015260408101919091529081906060820190565b0390a1513381526001600160a01b03909216602083015260408201929092529081906060820190565b0390a180f35b610c0091508c8d3d10610c06575b610bf8818361048d565b810190613332565b38610b49565b503d610bee565b80610c1a610c209261043f565b806103ce565b38610ac8565b8680fd5b610c4a9150853d8711610c50575b610c42818361048d565b810190612fed565b38610a43565b503d610c38565b3461028d57604036600319011261028d57600435610c748161027c565b6001600160a01b03808216600090815260cb602052604081205490929160243591610ca29082163314612a8b565b610caa612ccc565b60cd54600490602090610cc790610a16906001600160a01b031681565b604051635c1548fb60e01b815292839182905afa9182156106bd57610d0f9284928791610dcc575b5016610cfd82303384613002565b60cd546001600160a01b0316906130be565b60cd54610d2690610a16906001600160a01b031681565b91823b15610dc8576040516317a790f160e11b81526001600160a01b0382166004820152602481018390529284908490604490829084905af19283156106bd577fb92f7c65176e3a873589352927ba42330e95085f34ab1a9721f2135b94a5188393610db5575b50604080513381526001600160a01b0390921660208301528101919091528060608101610bda565b80610c1a610dc29261043f565b38610d8d565b8380fd5b610de4915060203d8111610c5057610c42818361048d565b38610cef565b3461028d57604036600319011261028d57602435610e078161027c565b336001600160a01b03821603610e23576106b490600435612353565b60405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608490fd5b3461028d57600036600319011261028d5760cc546040516001600160a01b039091168152602090f35b3461028d57600036600319011261028d57610ec2612023565b60335460ff811615610f015760ff19166033557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b60405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606490fd5b6001600160401b0381116104525760051b60200190565b8015150361028d57565b606435906106cf82610f54565b3461028d57608036600319011261028d57600435610f888161027c565b60243590610f958261027c565b6044356001600160401b03811161028d573660238201121561028d57806004013592610fc084610f3d565b91610fce604051938461048d565b84835260209460248685019160051b8301019136831161028d57602401905b828210611008576106b4868686611002610f5e565b92612b37565b86809161101484610324565b815201910190610fed565b3461028d57600036600319011261028d57602060ff603354166040519015158152f35b3461028d57600036600319011261028d5760cd546040516001600160a01b039091168152602090f35b3461028d5760208060031936011261028d576001600160401b0360043581811161028d5761109d9036906004016106ec565b916110a6611f04565b7f4ec7166fdb5f155366ddacdab9af9c74d038015a7570252e40c6c82346308ad760405160408152806110eb6110de60408301611311565b82810386840152876104d1565b0390a182519182116104525761110b8261110660cf546103ef565b612780565b80601f83116001146111465750819260009261113b575b5050600019600383901b1c191660019190911b1760cf55005b015190503880611122565b90601f1983169361116760cf60005260008051602061377483398151915290565b926000905b8682106111a3575050836001951061118a575b505050811b0160cf55005b015160001960f88460031b161c1916905538808061117f565b8060018596829496860151815501950193019061116c565b3461028d576000806003193601126105da576000805160206137948339815191528152609760209081526040808320336000908152925290205460ff161561123f57611205612ccc565b600160ff1960335416176033557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a180f35b6112d660486112be611250336124e5565b610b7761125b612565565b6040519485937f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000602086015261129b8151809260206037890191016104ae565b84017001034b99036b4b9b9b4b733903937b6329607d1b60378201520190612121565b60405162461bcd60e51b8152918291600483016104f6565b0390fd5b634e487b7160e01b600052603260045260246000fd5b805482101561130c5760005260206000209060011b0190600090565b6112da565b60cf5460009291611321826103ef565b80825291600190818116908115611386575060011461133f57505050565b9192935060cf600052600080516020613774833981519152916000925b84841061136e57505060209250010190565b8054602085850181019190915290930192810161135c565b915050602093945060ff929192191683830152151560051b010190565b90600092918054916113b4836103ef565b91828252600193848116908160001461141657506001146113d6575b50505050565b90919394506000526020928360002092846000945b8386106114025750505050010190388080806113d0565b8054858701830152940193859082016113eb565b9294505050602093945060ff191683830152151560051b010190388080806113d0565b3461028d5760408060031936011261028d576004356114578161027c565b60243560018060a01b0380921660005260c960205282600020805482101561028d576114a761148b610563936001936112f0565b5093845416936114a0865180948193016113a3565b038261048d565b835193849384528060208501528301906104d1565b3461028d57602036600319011261028d576004356114d98161027c565b60018060a01b031660005260c96020526020604060002054604051908152f35b3461028d57604036600319011261028d57602060ff61154360243561151d8161027c565b6004356000526097845260406000209060018060a01b0316600052602052604060002090565b54166040519015158152f35b3461028d57604036600319011261028d5760043561156c8161027c565b61163f60243560018060a01b03927f40e4447d271dea2a920b9669d305a3255d8783d59b016237e63b106f1c9dd5fa6116378361161087851697600098808a5260cb6020526115c2338360408d20541614612a8b565b6115ca612ccc565b895260cb60209081526040808b2054905163040b850f60e31b92810192909252919091166001600160a01b0316602482015260448082019790975295865260648661048d565b604080513381526001600160a01b0386166020820152908101919091529081906060820190565b0390a161340b565b80f35b602080820190808352835180925260409283810182858560051b8401019601946000925b858410611677575050505050505090565b9091929394959685806116ad600193603f1986820301885286838d51878060a01b038151168452015191818582015201906104d1565b990194019401929594939190611666565b3461028d57606036600319011261028d576004356116db8161027c565b60243560443560018060a01b03831660005260c96020526040600020548281039081116117c2578111156117bc57506001600160a01b038216600090815260c96020526040902061172e90829054612c42565b905b611739826136c7565b92815b6117468484612427565b8110156117ae576117a7816117a161177c611746946117778760018060a01b031660005260c9602052604060002090565b6112f0565b5061179061178a8885612c42565b91613737565b61179a828b612c4f565b5288612c4f565b50613728565b905061173c565b604051806105638782611642565b90611730565b6123e6565b3461028d57600036600319011261028d576040516002604360981b018152602090f35b3461028d57602036600319011261028d576004356118078161027c565b60018060a01b031660005260ca6020526020604060002054604051908152f35b3461028d57600036600319011261028d57602060ce54604051908152f35b3461028d57600036600319011261028d5760206040517f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda8152f35b3461028d57600036600319011261028d57602060405160008152f35b3461028d57606036600319011261028d57602060ff6115436004356118c08161027c565b6119036024356118cf8161027c565b6118d761030d565b9260018060a01b031660005260d0865260406000209060018060a01b0316600052602052604060002090565b9063ffffffff60e01b16600052602052604060002090565b3461028d57604036600319011261028d5761067a602060043561193d8161027c565b611945611f59565b61195a6001600160a01b038216301415612d10565b604051630951888f60e01b81523060048201526001600160a01b0390911660248083019190915235604482015291829081906064820190565b3461028d57604036600319011261028d576004356119b08161027c565b60248035916001600160401b039283811161028d573660238201121561028d578060040135926119df84610f3d565b936119ed604051958661048d565b808552602095828787019260051b8501019336851161028d57838101925b858410611a1c576106b48888613550565b833583811161028d578991611a3783928836918701016106ec565b815201930192611a0b565b3461028d57608036600319011261028d57600435611a5f8161027c565b61163f602435611a6e8161027c565b611b2e611a7961030d565b61190360643593611a8985610f54565b60018060a01b038097167fc6c2cef2fe1f0545b232744fc2812ca3a23cdb770794c9c7458ea69f6d9be7ff6080600099838b5260cb602052611ad38b826040339220541614612a8b565b84163381141580611b3f575b611ae890612aeb565b60405190848252602082015263ffffffff60e01b871660408201528815156060820152a1875260d0602052604087209060018060a01b0316600052602052604060002090565b9060ff801983541691151516179055565b5080841415611adf565b3461028d57602036600319011261028d5761067a6020600435611b6b8161027c565b611b73611f59565b611b886001600160a01b038216301415612d10565b60405163662aa11d60e01b81523060048201526001600160a01b03909116602482015291829081906044820190565b3461028d57606036600319011261028d57600435611bd48161027c565b602435611be08161027c565b604435906001600160401b03821161028d57611c03611c459236906004016106ec565b9060005493611c2960ff8660081c161580968197611cc7575b8115611ca7575b50612706565b84611c3c600160ff196000541617600055565b611c8e576128e7565b611c4b57005b611c5b61ff001960005416600055565b604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989080602081016108d7565b611ca261010061ff00196000541617600055565b6128e7565b303b15915081611cb9575b5038611c23565b6001915060ff161438611cb2565b600160ff8216109150611c1c565b3461028d57604036600319011261028d576106b4602435600435611cf88261027c565b806000526097602052611d12600160406000200154612078565b612353565b3461028d57604036600319011261028d57600435611d348161027c565b6001600160401b039060243582811161028d57611d559036906004016106ec565b611d5d612ccc565b60009160018060a01b038116835260209360ca8552611d8a604085205433865260c98752604086206112f0565b5090600180920191845191821161045257611daf82611da985546103ef565b856127cf565b86601f8311600114611e15575081809187987f13bbfc66aca7f597c509c7eb717cafee4ae3fc31a77f4bbb22b333e81369276d9893611e0a575b501b916000199060031b1c19161790555b610bda6040519283923384612ead565b870151925038611de9565b601f92919219821697611e2d85600052602060002090565b9188905b8a8210611e89575050827f13bbfc66aca7f597c509c7eb717cafee4ae3fc31a77f4bbb22b333e81369276d989910611e70575b5050811b019055611dfa565b86015160001960f88460031b161c191690553880611e64565b808684958294958c01518155019401920190611e31565b3461028d57600036600319011261028d5760206040516000805160206137948339815191528152f35b3461028d57600036600319011261028d5760206040517f427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a8152f35b3360009081527f0ba47cfd5e746a7a77d10576777b78a793709d8d5c4bbd732c557bc9a64bb31b602052604090205460ff1615611f3d57565b6112d660486112be611f4e336124e5565b610b7761125b6125e4565b3360009081527f683723e34a772b6e4f2c919bba7fa32ed8ea11a8325f54da7db716e9d9dd98c7602052604090205460ff1615611f9257565b611f9b336124e5565b600090611fa6612434565b916030611fb28461245f565b536078611fbe8461246c565b5360415b60018111611fe1576112d660486112be85610b778861125b881561249a565b90600f811690601082101561130c5761201e916f181899199a1a9b1b9c1cb0b131b232b360811b901a612014848761247c565b5360041c9161248d565b611fc2565b3360009081527f4f911b9375d0b52c272a370588b5a39d3b1a324938ee95e0e2faf0b3b468c710602052604090205460ff161561205c57565b6112d660486112be61206d336124e5565b610b7761125b612675565b600081815260976020908152604080832033845290915290205460ff161561209d5750565b6120a6336124e5565b6120ae612434565b9160306120ba8461245f565b5360786120c68461246c565b5360415b600181116120e9576112d660486112be85610b778861125b881561249a565b90600f811690601082101561130c5761211c916f181899199a1a9b1b9c1cb0b131b232b360811b901a612014848761247c565b6120ca565b90612134602092828151948592016104ae565b0190565b6001600160a01b03811660009081527f683723e34a772b6e4f2c919bba7fa32ed8ea11a8325f54da7db716e9d9dd98c7602052604081205460ff161561217c575050565b8080526097602090815260408083206001600160a01b038516600090815292529020805460ff1916600117905533916001600160a01b0316907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4565b6001600160a01b03811660009081527f793844da0378ca0230b21a4013ef02cf55735b90b39c85241478ff94b5eceb28602052604081206000805160206137948339815191529060ff905b54161561223257505050565b8082526097602090815260408084206001600160a01b038616600090815292529020805460ff1916600117905533926001600160a01b0316917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4565b6001600160a01b03811660009081527f4f911b9375d0b52c272a370588b5a39d3b1a324938ee95e0e2faf0b3b468c710602052604081207f427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a9060ff90612226565b6001600160a01b03811660009081527f0ba47cfd5e746a7a77d10576777b78a793709d8d5c4bbd732c557bc9a64bb31b602052604081207f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda9060ff90612226565b600090808252609760205260ff61237f84604085209060018060a01b0316600052602052604060002090565b541661238a57505050565b8082526097602090815260408084206001600160a01b038616600090815292529020805460ff1916905533926001600160a01b0316917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a4565b634e487b7160e01b600052601160045260246000fd5b90670de0b6b3a7640000918281029281840414901517156117c257565b90600182018092116117c257565b919082018092116117c257565b60405190608082018281106001600160401b0382111761045257604052604282526060366020840137565b80511561130c5760200190565b80516001101561130c5760210190565b90815181101561130c570160200190565b80156117c2576000190190565b156124a157565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b604051906124f282610472565b602a8252604036602084013760306125098361245f565b5360786125158361246c565b536029905b6001821161252d5761050791501561249a565b600f811690601082101561130c5761255f916f181899199a1a9b1b9c1cb0b131b232b360811b901a612014848661247c565b9061251a565b60008051602061379483398151915261257c612434565b9060306125888361245f565b5360786125948361246c565b536041905b600182116125ac5761050791501561249a565b600f811690601082101561130c576125de916f181899199a1a9b1b9c1cb0b131b232b360811b901a612014848661247c565b90612599565b7f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda61260d612434565b9060306126198361245f565b5360786126258361246c565b536041905b6001821161263d5761050791501561249a565b600f811690601082101561130c5761266f916f181899199a1a9b1b9c1cb0b131b232b360811b901a612014848661247c565b9061262a565b7f427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a61269e612434565b9060306126aa8361245f565b5360786126b68361246c565b536041905b600182116126ce5761050791501561249a565b600f811690601082101561130c57612700916f181899199a1a9b1b9c1cb0b131b232b360811b901a612014848661247c565b906126bb565b1561270d57565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b818110612774575050565b60008155600101612769565b90601f821161278d575050565b6106cf9160cf600052600080516020613774833981519152906020601f840160051c830193106127c5575b601f0160051c0190612769565b90915081906127b8565b9190601f81116127de57505050565b6106cf926000526020600020906020601f840160051c830193106127c557601f0160051c0190612769565b9081516001600160401b038111610452576128298161110660cf546103ef565b602080601f8311600114612865575081929360009261285a575b50508160011b916000199060031b1c19161760cf55565b015190503880612843565b90601f1983169461288660cf60005260008051602061377483398151915290565b926000905b8782106128c35750508360019596106128aa575b505050811b0160cf55565b015160001960f88460031b161c1916905538808061289f565b8060018596829496860151815501950193019061288b565b6040513d6000823e3d90fd5b612970929161294961296b926128fb612a65565b612903612a54565b61290c81612138565b612915816121db565b61291e81612291565b612927816122f2565b60018060a01b03166bffffffffffffffffffffffff60a01b60cc54161760cc55565b60018060a01b03166bffffffffffffffffffffffff60a01b60cd54161760cd55565b612809565b6002604360981b01803b1561028d5760405163784c3b3d60e11b815260009190828160048183865af180156106bd576129e1575b50803b156129dd578190600460405180948193634e606c4760e01b83525af180156106bd576129d05750565b80610c1a6106cf9261043f565b5080fd5b80610c1a6129ee9261043f565b386129a4565b156129fb57565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fd5b6106cf60ff60005460081c166129f4565b612a7f60ff60005460081c16612a7a816129f4565b6129f4565b60ff1960335416603355565b15612a9257565b60405162461bcd60e51b815260206004820152602b60248201527f4d756c74694163636f756e743a2053656e6465722069736e2774206f776e657260448201526a081bd9881858d8dbdd5b9d60aa1b6064820152608490fd5b15612af257565b60405162461bcd60e51b815260206004820152601c60248201527f4d756c74694163636f756e743a20696e76616c696420746172676574000000006044820152606490fd5b909193929360018060a01b038083166000818152602060cb8152612b7c604094612b673382888720541614612a8b565b881684338214159182612c37575b5050612aeb565b8451805b612bbf575050505094612bba917f41e2c91b7cd59c2d41cfac17496b166b244a4921d4a1c926b4a7132b6c66906e95965194859485612c63565b0390a1565b83835260d082528483206001600160a01b0389166000908152602091909152604090209060001981018181116117c2578b611b2e612c3194612c15612c07612c2c958d612c4f565b516001600160e01b03191690565b63ffffffff60e01b16600052602052604060002090565b61248d565b80612b80565b141590508438612b75565b919082039182116117c257565b805182101561130c5760209160051b010190565b9290949394608084019060018060a01b03809116855260209316838501526080604085015281518091528260a0850192019260005b828110612cae5750505060609150931515910152565b84516001600160e01b03191684529381019392810192600101612c98565b60ff60335416612cd857565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b15612d1757565b60405162461bcd60e51b815260206004820152603a60248201527f426c617374436f6e66696746616365743a20726563697069656e742063616e2060448201527f6e6f742062652074686520636f6e747261637420697473656c660000000000006064820152608490fd5b9081602091031261028d575190565b80546801000000000000000081101561045257612db59060019283820181556112f0565b612ea857825181546001600160a01b0319166001600160a01b0391909116178155810191602080910151908151916001600160401b03831161045257612e0583612dff87546103ef565b876127cf565b81601f8411600114612e3e5750928293918392600094612e33575b50501b916000199060031b1c1916179055565b015192503880612e20565b919083601f198116612e5588600052602060002090565b946000905b88838310612e8e5750505010612e75575b505050811b019055565b015160001960f88460031b161c19169055388080612e6b565b858701518855909601959485019487935090810190612e5a565b6103d9565b6001600160a01b03918216815291166020820152606060408201819052610507929101906104d1565b60cf5460009291612ee6826103ef565b91600190818116908115612f405750600114612f0157505050565b909192935060cf600052600080516020613774833981519152906000915b848310612f2d575050500190565b8181602092548587015201920191612f1f565b60ff191683525050811515909102019150565b6020815191016000f56001600160a01b03811615612fa857604080513381526001600160a01b03831660208201527f6cbd957809e2aaf4d5e36136d06e71215f53a984b218c6d501e22f91d348d9ce9190a190565b60405162461bcd60e51b815260206004820152601c60248201527f4d756c74694163636f756e743a2063726561746532206661696c6564000000006044820152606490fd5b9081602091031261028d57516105078161027c565b6040516323b872dd60e01b60208201526001600160a01b03928316602482015292909116604483015260648201929092526106cf9161304e82608481015b03601f19810184528361048d565b61318a565b1561305a57565b60405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608490fd5b9190918115801561310c575b6106cf936130da61304e92613053565b60405163095ea7b360e01b60208201526001600160a01b03909116602482015260448101939093528260648101613040565b50604051636eb1769f60e11b81523060048201526001600160a01b038416602482015292602084806044810103816001600160a01b0386165afa9081156106bd576130da61304e926106cf9660009161316c575b501592505093506130ca565b613184915060203d81116106b6576106ac818361048d565b38613160565b60018060a01b0316906132076040516131a281610457565b6020938482527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858301526000808587829751910182855af13d1561329d573d916131ec836106d1565b926131fa604051948561048d565b83523d868885013e6132a1565b9081519083821592831561327a575b5050509050156132235750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b8480929394500103126105da575081015161329481610f54565b80388381613216565b6060915b9192901561330357508151156132b5575090565b3b156132be5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156133165750805190602001fd5b60405162461bcd60e51b81529081906112d690600483016104f6565b9081602091031261028d575160ff8116810361028d5790565b60ff16604d81116117c257600a0a90565b8115613366570490565b634e487b7160e01b600052601260045260246000fd5b6001600160a01b0391821681529116602082015260a06040820181905261050794926133aa918301906104d1565b921515606082015260808184039101526104d1565b156133c657565b60405162461bcd60e51b815260206004820152601c60248201527f4d756c74694163636f756e743a204572726f72206f63637572726564000000006044820152606490fd5b60405163316fdd9760e11b81529190600080848061342c86600483016104f6565b0381836001600160a01b0387165af19081156106bd578094819261348e575b5050917f268e99f0b37c8146a6aea7c6af329e3924d9c92c4386be924c2990926d99b6619161348685946106cf96604051948594338661337c565b0390a16133bf565b915093503d8085833e6134a1818361048d565b8101936040828603126105da578151916134ba83610f54565b6020810151906001600160401b03821161354c570185601f820112156129dd578051916134e6836106d1565b966134f4604051988961048d565b838852602084840101116105da575085949261353f7f268e99f0b37c8146a6aea7c6af329e3924d9c92c4386be924c2990926d99b6619593613486936020806106cf9b0191016104ae565b949294955081935061344b565b8280fd5b613558612ccc565b60018060a01b039081811660005260209160cb83526040600020541691600092331415925b845160ff82169081101561361d57846135996135a69288612c4f565b51906135ba575b8461340b565b60ff8091169081146117c25760010161357d565b6135c8600482511015613625565b61361861361361360c86840151611903336135f58b60018060a01b031660005260d0602052604060002090565b9060018060a01b0316600052602052604060002090565b5460ff1690565b613671565b6135a0565b505050505050565b1561362c57565b60405162461bcd60e51b815260206004820152601f60248201527f4d756c74694163636f756e743a20496e76616c69642063616c6c2064617461006044820152606490fd5b1561367857565b60405162461bcd60e51b815260206004820152602160248201527f4d756c74694163636f756e743a20556e617574686f72697a65642061636365736044820152607360f81b6064820152608490fd5b906136d182610f3d565b60406136df8151928361048d565b83825281936136f0601f1991610f3d565b0191600091825b848110613705575050505050565b602090825161371381610457565b858152826060818301528286010152016136f7565b60001981146117c25760010190565b906001602060405161374881610457565b61376f8195848060a01b03815416835261376860405180968193016113a3565b038461048d565b015256feacb8d954e2cfef495862221e91bd7523613cf8808827cb33edfe4904cc51bf2965d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa164736f6c6343000812000a
Deployed Bytecode
0x6080604052600436101561001257600080fd5b60003560e01c806301569e3a1461027757806301ffc9a714610272578063022914a71461026d57806311464fbe14610268578063248a9ca314610263578063272b13231461025e5780632ad26a04146102595780632f2ff15d1461025457806331e69d2d1461024f578063342fcda91461024a57806336568abe1461024557806337f93b08146102405780633f4ba83a1461023b5780634ebabea1146102365780635c975abb146102315780637278b28f1461022c57806382a7e533146102275780638456cb5914610222578063875245811461021d5780638b5afd2b1461021857806391d148541461021357806394aee4221461020e57806395c7d0ec1461020957806397d75776146102045780639b0c03de146101ff578063a04c6809146101fa578063a2011b3f146101f5578063a217fddf146101f0578063b9c9b3f2146101eb578063bcd2bf25146101e6578063bd367d8e146101e1578063c1102214146101dc578063cd2002f5146101d7578063cf7a1d77146101d2578063d547741f146101cd578063d9c2337c146101c8578063e63ab1e9146101c35763fb1bb9de146101be57600080fd5b611ec9565b611ea0565b611d17565b611cd5565b611bb7565b611b49565b611a42565b611993565b61191b565b61189c565b611880565b611845565b611827565b6117ea565b6117c7565b6116be565b61154f565b6114f9565b6114bc565b611439565b6111bb565b61106b565b611042565b61101f565b610f6b565b610ea9565b610e80565b610dea565b610c57565b6109a9565b6108dc565b610733565b61060c565b6105dd565b61050a565b61038f565b610339565b610292565b6001600160a01b0381160361028d57565b600080fd5b3461028d57602036600319011261028d576004356102af8161027c565b6102b7611f04565b60cd54604080516001600160a01b03808416825284811660208301529293917ff78ccdf5924090b2ab6627ac5da4ec5affed73d47c6bc6c8a4620a0d5ed57bc891a16001600160a01b031990921691161760cd55005b604435906001600160e01b03198216820361028d57565b35906001600160e01b03198216820361028d57565b3461028d57602036600319011261028d5760043563ffffffff60e01b811680910361028d57602090637965db0b60e01b811490811561037e575b506040519015158152f35b6301ffc9a760e01b14905038610373565b3461028d57602036600319011261028d5760206004356103ae8161027c565b60018060a01b0380911660005260cb825260406000205416604051908152f35b600091031261028d57565b634e487b7160e01b600052600060045260246000fd5b90600182811c9216801561041f575b602083101461040957565b634e487b7160e01b600052602260045260246000fd5b91607f16916103fe565b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811161045257604052565b610429565b604081019081106001600160401b0382111761045257604052565b606081019081106001600160401b0382111761045257604052565b90601f801991011681019081106001600160401b0382111761045257604052565b60005b8381106104c15750506000910152565b81810151838201526020016104b1565b906020916104ea815180928185528580860191016104ae565b601f01601f1916010190565b9060206105079281815201906104d1565b90565b3461028d576000806003193601126105da57604051908060cf5461052d816103ef565b808552916001918083169081156105b05750600114610567575b610563856105578187038261048d565b604051918291826104f6565b0390f35b925060cf83526000805160206137748339815191525b82841061059857505050810160200161055782610563610547565b8054602085870181019190915290930192810161057d565b8695506105639693506020925061055794915060ff191682840152151560051b8201019293610547565b80fd5b3461028d57602036600319011261028d5760043560005260976020526020600160406000200154604051908152f35b3461028d57602036600319011261028d5761067a602060043561062e8161027c565b610636611f59565b61064b6001600160a01b038216301415612d10565b604051634aa7d2f760e11b81523060048201526001600160a01b03909116602482015291829081906044820190565b038160006002604360981b015af180156106bd5761069457005b6106b49060203d81116106b6575b6106ac818361048d565b810190612d82565b005b503d6106a2565b6128db565b604051906106cf82610457565b565b6001600160401b03811161045257601f01601f191660200190565b81601f8201121561028d57803590610703826106d1565b92610711604051948561048d565b8284526020838301011161028d57816000926020809301838601378301015290565b3461028d57602036600319011261028d576004356001600160401b03811161028d576107847f1deb86e124d1a5f3b49977292b48e989b984bcd8944cfb14d63c8880482f2cff9136906004016106ec565b61078c612ccc565b61084360ce546107d46107cf60405160208101906c4d756c74694163636f756e745f60981b825284602d820152602d81526107c681610472565b51902092612419565b60ce55565b60cc5460cd54604080516001600160a01b0393841660208201523091810191909152911660608083019190915281526108329061083e90601f199061081a60808261048d565b60405193849161082c60208401612ed6565b90612121565b0390810183528261048d565b612f53565b33600090815260c960205260409020546001600160a01b038216600090815260ca602052604090205533600090815260c96020526040902061089f906108876106c2565b6001600160a01b038416815290846020830152612d91565b6001600160a01b038116600090815260cb6020526040902080546001600160a01b031916331790556108d76040519283923384612ead565b0390a1005b3461028d57604036600319011261028d576004356024356108fc8161027c565b60009180835260976020526109176001604085200154612078565b8083526097602090815260408085206001600160a01b0385166000908152925290205460ff1615610946578280f35b8083526097602090815260408085206001600160a01b038516600090815292529020805460ff1916600117905533916001600160a01b0316907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b3461028d5760408060031936011261028d576004356109c78161027c565b6024359060018060a01b0390600093828216855260209260cb84526109f23382848920541614612a8b565b6109fa612ccc565b60cd546004908590610a2290610a16906001600160a01b031681565b6001600160a01b031690565b8451635c1548fb60e01b815292839182905afa9081156106bd578791610c2a575b501690610a5285303385613002565b60cd54610a6a9086906001600160a01b0316846130be565b60cd54610a8190610a16906001600160a01b031681565b91823b15610c265781516317a790f160e11b81526001600160a01b0385166004820152602481018790529287908490604490829084905af19283156106bd57600493610c0d575b5084610ad3876123fc565b9183519485809263313ce56760e01b82525afa9081156106bd577f13b84d799b5b8b235eafe52313197bb3dbf3d5c36c2ac0b62e4c45cc4d3a958e96610b8b610b55610bb193610b4f7fb92f7c65176e3a873589352927ba42330e95085f34ab1a9721f2135b94a5188396610bda998e91610be0575b5061334b565b9061335c565b85516390ca796b60e01b998101999099526024890181905297610b8581604481015b03601f19810183528261048d565b8761340b565b83513381526001600160a01b038716602082015260408101919091529081906060820190565b0390a1513381526001600160a01b03909216602083015260408201929092529081906060820190565b0390a180f35b610c0091508c8d3d10610c06575b610bf8818361048d565b810190613332565b38610b49565b503d610bee565b80610c1a610c209261043f565b806103ce565b38610ac8565b8680fd5b610c4a9150853d8711610c50575b610c42818361048d565b810190612fed565b38610a43565b503d610c38565b3461028d57604036600319011261028d57600435610c748161027c565b6001600160a01b03808216600090815260cb602052604081205490929160243591610ca29082163314612a8b565b610caa612ccc565b60cd54600490602090610cc790610a16906001600160a01b031681565b604051635c1548fb60e01b815292839182905afa9182156106bd57610d0f9284928791610dcc575b5016610cfd82303384613002565b60cd546001600160a01b0316906130be565b60cd54610d2690610a16906001600160a01b031681565b91823b15610dc8576040516317a790f160e11b81526001600160a01b0382166004820152602481018390529284908490604490829084905af19283156106bd577fb92f7c65176e3a873589352927ba42330e95085f34ab1a9721f2135b94a5188393610db5575b50604080513381526001600160a01b0390921660208301528101919091528060608101610bda565b80610c1a610dc29261043f565b38610d8d565b8380fd5b610de4915060203d8111610c5057610c42818361048d565b38610cef565b3461028d57604036600319011261028d57602435610e078161027c565b336001600160a01b03821603610e23576106b490600435612353565b60405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608490fd5b3461028d57600036600319011261028d5760cc546040516001600160a01b039091168152602090f35b3461028d57600036600319011261028d57610ec2612023565b60335460ff811615610f015760ff19166033557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b60405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606490fd5b6001600160401b0381116104525760051b60200190565b8015150361028d57565b606435906106cf82610f54565b3461028d57608036600319011261028d57600435610f888161027c565b60243590610f958261027c565b6044356001600160401b03811161028d573660238201121561028d57806004013592610fc084610f3d565b91610fce604051938461048d565b84835260209460248685019160051b8301019136831161028d57602401905b828210611008576106b4868686611002610f5e565b92612b37565b86809161101484610324565b815201910190610fed565b3461028d57600036600319011261028d57602060ff603354166040519015158152f35b3461028d57600036600319011261028d5760cd546040516001600160a01b039091168152602090f35b3461028d5760208060031936011261028d576001600160401b0360043581811161028d5761109d9036906004016106ec565b916110a6611f04565b7f4ec7166fdb5f155366ddacdab9af9c74d038015a7570252e40c6c82346308ad760405160408152806110eb6110de60408301611311565b82810386840152876104d1565b0390a182519182116104525761110b8261110660cf546103ef565b612780565b80601f83116001146111465750819260009261113b575b5050600019600383901b1c191660019190911b1760cf55005b015190503880611122565b90601f1983169361116760cf60005260008051602061377483398151915290565b926000905b8682106111a3575050836001951061118a575b505050811b0160cf55005b015160001960f88460031b161c1916905538808061117f565b8060018596829496860151815501950193019061116c565b3461028d576000806003193601126105da576000805160206137948339815191528152609760209081526040808320336000908152925290205460ff161561123f57611205612ccc565b600160ff1960335416176033557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a180f35b6112d660486112be611250336124e5565b610b7761125b612565565b6040519485937f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000602086015261129b8151809260206037890191016104ae565b84017001034b99036b4b9b9b4b733903937b6329607d1b60378201520190612121565b60405162461bcd60e51b8152918291600483016104f6565b0390fd5b634e487b7160e01b600052603260045260246000fd5b805482101561130c5760005260206000209060011b0190600090565b6112da565b60cf5460009291611321826103ef565b80825291600190818116908115611386575060011461133f57505050565b9192935060cf600052600080516020613774833981519152916000925b84841061136e57505060209250010190565b8054602085850181019190915290930192810161135c565b915050602093945060ff929192191683830152151560051b010190565b90600092918054916113b4836103ef565b91828252600193848116908160001461141657506001146113d6575b50505050565b90919394506000526020928360002092846000945b8386106114025750505050010190388080806113d0565b8054858701830152940193859082016113eb565b9294505050602093945060ff191683830152151560051b010190388080806113d0565b3461028d5760408060031936011261028d576004356114578161027c565b60243560018060a01b0380921660005260c960205282600020805482101561028d576114a761148b610563936001936112f0565b5093845416936114a0865180948193016113a3565b038261048d565b835193849384528060208501528301906104d1565b3461028d57602036600319011261028d576004356114d98161027c565b60018060a01b031660005260c96020526020604060002054604051908152f35b3461028d57604036600319011261028d57602060ff61154360243561151d8161027c565b6004356000526097845260406000209060018060a01b0316600052602052604060002090565b54166040519015158152f35b3461028d57604036600319011261028d5760043561156c8161027c565b61163f60243560018060a01b03927f40e4447d271dea2a920b9669d305a3255d8783d59b016237e63b106f1c9dd5fa6116378361161087851697600098808a5260cb6020526115c2338360408d20541614612a8b565b6115ca612ccc565b895260cb60209081526040808b2054905163040b850f60e31b92810192909252919091166001600160a01b0316602482015260448082019790975295865260648661048d565b604080513381526001600160a01b0386166020820152908101919091529081906060820190565b0390a161340b565b80f35b602080820190808352835180925260409283810182858560051b8401019601946000925b858410611677575050505050505090565b9091929394959685806116ad600193603f1986820301885286838d51878060a01b038151168452015191818582015201906104d1565b990194019401929594939190611666565b3461028d57606036600319011261028d576004356116db8161027c565b60243560443560018060a01b03831660005260c96020526040600020548281039081116117c2578111156117bc57506001600160a01b038216600090815260c96020526040902061172e90829054612c42565b905b611739826136c7565b92815b6117468484612427565b8110156117ae576117a7816117a161177c611746946117778760018060a01b031660005260c9602052604060002090565b6112f0565b5061179061178a8885612c42565b91613737565b61179a828b612c4f565b5288612c4f565b50613728565b905061173c565b604051806105638782611642565b90611730565b6123e6565b3461028d57600036600319011261028d576040516002604360981b018152602090f35b3461028d57602036600319011261028d576004356118078161027c565b60018060a01b031660005260ca6020526020604060002054604051908152f35b3461028d57600036600319011261028d57602060ce54604051908152f35b3461028d57600036600319011261028d5760206040517f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda8152f35b3461028d57600036600319011261028d57602060405160008152f35b3461028d57606036600319011261028d57602060ff6115436004356118c08161027c565b6119036024356118cf8161027c565b6118d761030d565b9260018060a01b031660005260d0865260406000209060018060a01b0316600052602052604060002090565b9063ffffffff60e01b16600052602052604060002090565b3461028d57604036600319011261028d5761067a602060043561193d8161027c565b611945611f59565b61195a6001600160a01b038216301415612d10565b604051630951888f60e01b81523060048201526001600160a01b0390911660248083019190915235604482015291829081906064820190565b3461028d57604036600319011261028d576004356119b08161027c565b60248035916001600160401b039283811161028d573660238201121561028d578060040135926119df84610f3d565b936119ed604051958661048d565b808552602095828787019260051b8501019336851161028d57838101925b858410611a1c576106b48888613550565b833583811161028d578991611a3783928836918701016106ec565b815201930192611a0b565b3461028d57608036600319011261028d57600435611a5f8161027c565b61163f602435611a6e8161027c565b611b2e611a7961030d565b61190360643593611a8985610f54565b60018060a01b038097167fc6c2cef2fe1f0545b232744fc2812ca3a23cdb770794c9c7458ea69f6d9be7ff6080600099838b5260cb602052611ad38b826040339220541614612a8b565b84163381141580611b3f575b611ae890612aeb565b60405190848252602082015263ffffffff60e01b871660408201528815156060820152a1875260d0602052604087209060018060a01b0316600052602052604060002090565b9060ff801983541691151516179055565b5080841415611adf565b3461028d57602036600319011261028d5761067a6020600435611b6b8161027c565b611b73611f59565b611b886001600160a01b038216301415612d10565b60405163662aa11d60e01b81523060048201526001600160a01b03909116602482015291829081906044820190565b3461028d57606036600319011261028d57600435611bd48161027c565b602435611be08161027c565b604435906001600160401b03821161028d57611c03611c459236906004016106ec565b9060005493611c2960ff8660081c161580968197611cc7575b8115611ca7575b50612706565b84611c3c600160ff196000541617600055565b611c8e576128e7565b611c4b57005b611c5b61ff001960005416600055565b604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989080602081016108d7565b611ca261010061ff00196000541617600055565b6128e7565b303b15915081611cb9575b5038611c23565b6001915060ff161438611cb2565b600160ff8216109150611c1c565b3461028d57604036600319011261028d576106b4602435600435611cf88261027c565b806000526097602052611d12600160406000200154612078565b612353565b3461028d57604036600319011261028d57600435611d348161027c565b6001600160401b039060243582811161028d57611d559036906004016106ec565b611d5d612ccc565b60009160018060a01b038116835260209360ca8552611d8a604085205433865260c98752604086206112f0565b5090600180920191845191821161045257611daf82611da985546103ef565b856127cf565b86601f8311600114611e15575081809187987f13bbfc66aca7f597c509c7eb717cafee4ae3fc31a77f4bbb22b333e81369276d9893611e0a575b501b916000199060031b1c19161790555b610bda6040519283923384612ead565b870151925038611de9565b601f92919219821697611e2d85600052602060002090565b9188905b8a8210611e89575050827f13bbfc66aca7f597c509c7eb717cafee4ae3fc31a77f4bbb22b333e81369276d989910611e70575b5050811b019055611dfa565b86015160001960f88460031b161c191690553880611e64565b808684958294958c01518155019401920190611e31565b3461028d57600036600319011261028d5760206040516000805160206137948339815191528152f35b3461028d57600036600319011261028d5760206040517f427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a8152f35b3360009081527f0ba47cfd5e746a7a77d10576777b78a793709d8d5c4bbd732c557bc9a64bb31b602052604090205460ff1615611f3d57565b6112d660486112be611f4e336124e5565b610b7761125b6125e4565b3360009081527f683723e34a772b6e4f2c919bba7fa32ed8ea11a8325f54da7db716e9d9dd98c7602052604090205460ff1615611f9257565b611f9b336124e5565b600090611fa6612434565b916030611fb28461245f565b536078611fbe8461246c565b5360415b60018111611fe1576112d660486112be85610b778861125b881561249a565b90600f811690601082101561130c5761201e916f181899199a1a9b1b9c1cb0b131b232b360811b901a612014848761247c565b5360041c9161248d565b611fc2565b3360009081527f4f911b9375d0b52c272a370588b5a39d3b1a324938ee95e0e2faf0b3b468c710602052604090205460ff161561205c57565b6112d660486112be61206d336124e5565b610b7761125b612675565b600081815260976020908152604080832033845290915290205460ff161561209d5750565b6120a6336124e5565b6120ae612434565b9160306120ba8461245f565b5360786120c68461246c565b5360415b600181116120e9576112d660486112be85610b778861125b881561249a565b90600f811690601082101561130c5761211c916f181899199a1a9b1b9c1cb0b131b232b360811b901a612014848761247c565b6120ca565b90612134602092828151948592016104ae565b0190565b6001600160a01b03811660009081527f683723e34a772b6e4f2c919bba7fa32ed8ea11a8325f54da7db716e9d9dd98c7602052604081205460ff161561217c575050565b8080526097602090815260408083206001600160a01b038516600090815292529020805460ff1916600117905533916001600160a01b0316907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4565b6001600160a01b03811660009081527f793844da0378ca0230b21a4013ef02cf55735b90b39c85241478ff94b5eceb28602052604081206000805160206137948339815191529060ff905b54161561223257505050565b8082526097602090815260408084206001600160a01b038616600090815292529020805460ff1916600117905533926001600160a01b0316917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4565b6001600160a01b03811660009081527f4f911b9375d0b52c272a370588b5a39d3b1a324938ee95e0e2faf0b3b468c710602052604081207f427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a9060ff90612226565b6001600160a01b03811660009081527f0ba47cfd5e746a7a77d10576777b78a793709d8d5c4bbd732c557bc9a64bb31b602052604081207f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda9060ff90612226565b600090808252609760205260ff61237f84604085209060018060a01b0316600052602052604060002090565b541661238a57505050565b8082526097602090815260408084206001600160a01b038616600090815292529020805460ff1916905533926001600160a01b0316917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a4565b634e487b7160e01b600052601160045260246000fd5b90670de0b6b3a7640000918281029281840414901517156117c257565b90600182018092116117c257565b919082018092116117c257565b60405190608082018281106001600160401b0382111761045257604052604282526060366020840137565b80511561130c5760200190565b80516001101561130c5760210190565b90815181101561130c570160200190565b80156117c2576000190190565b156124a157565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b604051906124f282610472565b602a8252604036602084013760306125098361245f565b5360786125158361246c565b536029905b6001821161252d5761050791501561249a565b600f811690601082101561130c5761255f916f181899199a1a9b1b9c1cb0b131b232b360811b901a612014848661247c565b9061251a565b60008051602061379483398151915261257c612434565b9060306125888361245f565b5360786125948361246c565b536041905b600182116125ac5761050791501561249a565b600f811690601082101561130c576125de916f181899199a1a9b1b9c1cb0b131b232b360811b901a612014848661247c565b90612599565b7f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda61260d612434565b9060306126198361245f565b5360786126258361246c565b536041905b6001821161263d5761050791501561249a565b600f811690601082101561130c5761266f916f181899199a1a9b1b9c1cb0b131b232b360811b901a612014848661247c565b9061262a565b7f427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a61269e612434565b9060306126aa8361245f565b5360786126b68361246c565b536041905b600182116126ce5761050791501561249a565b600f811690601082101561130c57612700916f181899199a1a9b1b9c1cb0b131b232b360811b901a612014848661247c565b906126bb565b1561270d57565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b818110612774575050565b60008155600101612769565b90601f821161278d575050565b6106cf9160cf600052600080516020613774833981519152906020601f840160051c830193106127c5575b601f0160051c0190612769565b90915081906127b8565b9190601f81116127de57505050565b6106cf926000526020600020906020601f840160051c830193106127c557601f0160051c0190612769565b9081516001600160401b038111610452576128298161110660cf546103ef565b602080601f8311600114612865575081929360009261285a575b50508160011b916000199060031b1c19161760cf55565b015190503880612843565b90601f1983169461288660cf60005260008051602061377483398151915290565b926000905b8782106128c35750508360019596106128aa575b505050811b0160cf55565b015160001960f88460031b161c1916905538808061289f565b8060018596829496860151815501950193019061288b565b6040513d6000823e3d90fd5b612970929161294961296b926128fb612a65565b612903612a54565b61290c81612138565b612915816121db565b61291e81612291565b612927816122f2565b60018060a01b03166bffffffffffffffffffffffff60a01b60cc54161760cc55565b60018060a01b03166bffffffffffffffffffffffff60a01b60cd54161760cd55565b612809565b6002604360981b01803b1561028d5760405163784c3b3d60e11b815260009190828160048183865af180156106bd576129e1575b50803b156129dd578190600460405180948193634e606c4760e01b83525af180156106bd576129d05750565b80610c1a6106cf9261043f565b5080fd5b80610c1a6129ee9261043f565b386129a4565b156129fb57565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fd5b6106cf60ff60005460081c166129f4565b612a7f60ff60005460081c16612a7a816129f4565b6129f4565b60ff1960335416603355565b15612a9257565b60405162461bcd60e51b815260206004820152602b60248201527f4d756c74694163636f756e743a2053656e6465722069736e2774206f776e657260448201526a081bd9881858d8dbdd5b9d60aa1b6064820152608490fd5b15612af257565b60405162461bcd60e51b815260206004820152601c60248201527f4d756c74694163636f756e743a20696e76616c696420746172676574000000006044820152606490fd5b909193929360018060a01b038083166000818152602060cb8152612b7c604094612b673382888720541614612a8b565b881684338214159182612c37575b5050612aeb565b8451805b612bbf575050505094612bba917f41e2c91b7cd59c2d41cfac17496b166b244a4921d4a1c926b4a7132b6c66906e95965194859485612c63565b0390a1565b83835260d082528483206001600160a01b0389166000908152602091909152604090209060001981018181116117c2578b611b2e612c3194612c15612c07612c2c958d612c4f565b516001600160e01b03191690565b63ffffffff60e01b16600052602052604060002090565b61248d565b80612b80565b141590508438612b75565b919082039182116117c257565b805182101561130c5760209160051b010190565b9290949394608084019060018060a01b03809116855260209316838501526080604085015281518091528260a0850192019260005b828110612cae5750505060609150931515910152565b84516001600160e01b03191684529381019392810192600101612c98565b60ff60335416612cd857565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b15612d1757565b60405162461bcd60e51b815260206004820152603a60248201527f426c617374436f6e66696746616365743a20726563697069656e742063616e2060448201527f6e6f742062652074686520636f6e747261637420697473656c660000000000006064820152608490fd5b9081602091031261028d575190565b80546801000000000000000081101561045257612db59060019283820181556112f0565b612ea857825181546001600160a01b0319166001600160a01b0391909116178155810191602080910151908151916001600160401b03831161045257612e0583612dff87546103ef565b876127cf565b81601f8411600114612e3e5750928293918392600094612e33575b50501b916000199060031b1c1916179055565b015192503880612e20565b919083601f198116612e5588600052602060002090565b946000905b88838310612e8e5750505010612e75575b505050811b019055565b015160001960f88460031b161c19169055388080612e6b565b858701518855909601959485019487935090810190612e5a565b6103d9565b6001600160a01b03918216815291166020820152606060408201819052610507929101906104d1565b60cf5460009291612ee6826103ef565b91600190818116908115612f405750600114612f0157505050565b909192935060cf600052600080516020613774833981519152906000915b848310612f2d575050500190565b8181602092548587015201920191612f1f565b60ff191683525050811515909102019150565b6020815191016000f56001600160a01b03811615612fa857604080513381526001600160a01b03831660208201527f6cbd957809e2aaf4d5e36136d06e71215f53a984b218c6d501e22f91d348d9ce9190a190565b60405162461bcd60e51b815260206004820152601c60248201527f4d756c74694163636f756e743a2063726561746532206661696c6564000000006044820152606490fd5b9081602091031261028d57516105078161027c565b6040516323b872dd60e01b60208201526001600160a01b03928316602482015292909116604483015260648201929092526106cf9161304e82608481015b03601f19810184528361048d565b61318a565b1561305a57565b60405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608490fd5b9190918115801561310c575b6106cf936130da61304e92613053565b60405163095ea7b360e01b60208201526001600160a01b03909116602482015260448101939093528260648101613040565b50604051636eb1769f60e11b81523060048201526001600160a01b038416602482015292602084806044810103816001600160a01b0386165afa9081156106bd576130da61304e926106cf9660009161316c575b501592505093506130ca565b613184915060203d81116106b6576106ac818361048d565b38613160565b60018060a01b0316906132076040516131a281610457565b6020938482527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858301526000808587829751910182855af13d1561329d573d916131ec836106d1565b926131fa604051948561048d565b83523d868885013e6132a1565b9081519083821592831561327a575b5050509050156132235750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b8480929394500103126105da575081015161329481610f54565b80388381613216565b6060915b9192901561330357508151156132b5575090565b3b156132be5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156133165750805190602001fd5b60405162461bcd60e51b81529081906112d690600483016104f6565b9081602091031261028d575160ff8116810361028d5790565b60ff16604d81116117c257600a0a90565b8115613366570490565b634e487b7160e01b600052601260045260246000fd5b6001600160a01b0391821681529116602082015260a06040820181905261050794926133aa918301906104d1565b921515606082015260808184039101526104d1565b156133c657565b60405162461bcd60e51b815260206004820152601c60248201527f4d756c74694163636f756e743a204572726f72206f63637572726564000000006044820152606490fd5b60405163316fdd9760e11b81529190600080848061342c86600483016104f6565b0381836001600160a01b0387165af19081156106bd578094819261348e575b5050917f268e99f0b37c8146a6aea7c6af329e3924d9c92c4386be924c2990926d99b6619161348685946106cf96604051948594338661337c565b0390a16133bf565b915093503d8085833e6134a1818361048d565b8101936040828603126105da578151916134ba83610f54565b6020810151906001600160401b03821161354c570185601f820112156129dd578051916134e6836106d1565b966134f4604051988961048d565b838852602084840101116105da575085949261353f7f268e99f0b37c8146a6aea7c6af329e3924d9c92c4386be924c2990926d99b6619593613486936020806106cf9b0191016104ae565b949294955081935061344b565b8280fd5b613558612ccc565b60018060a01b039081811660005260209160cb83526040600020541691600092331415925b845160ff82169081101561361d57846135996135a69288612c4f565b51906135ba575b8461340b565b60ff8091169081146117c25760010161357d565b6135c8600482511015613625565b61361861361361360c86840151611903336135f58b60018060a01b031660005260d0602052604060002090565b9060018060a01b0316600052602052604060002090565b5460ff1690565b613671565b6135a0565b505050505050565b1561362c57565b60405162461bcd60e51b815260206004820152601f60248201527f4d756c74694163636f756e743a20496e76616c69642063616c6c2064617461006044820152606490fd5b1561367857565b60405162461bcd60e51b815260206004820152602160248201527f4d756c74694163636f756e743a20556e617574686f72697a65642061636365736044820152607360f81b6064820152608490fd5b906136d182610f3d565b60406136df8151928361048d565b83825281936136f0601f1991610f3d565b0191600091825b848110613705575050505050565b602090825161371381610457565b858152826060818301528286010152016136f7565b60001981146117c25760010190565b906001602060405161374881610457565b61376f8195848060a01b03815416835261376860405180968193016113a3565b038461048d565b015256feacb8d954e2cfef495862221e91bd7523613cf8808827cb33edfe4904cc51bf2965d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa164736f6c6343000812000a
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.