More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 25 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Create Account | 38159898 | 1 min ago | IN | 0 ETH | 0.00000121 | ||||
| Upgrade Account ... | 38159855 | 3 mins ago | IN | 0 ETH | 0.00000039 | ||||
| Upgrade Account ... | 38159594 | 11 mins ago | IN | 0 ETH | 0.00000027 | ||||
| Create Account | 38159584 | 12 mins ago | IN | 0 ETH | 0.00000125 | ||||
| Create Account | 38159469 | 16 mins ago | IN | 0 ETH | 0.00000185 | ||||
| Upgrade Account ... | 38159179 | 25 mins ago | IN | 0 ETH | 0.00000055 | ||||
| Create Account | 38158618 | 44 mins ago | IN | 0 ETH | 0.00000433 | ||||
| Upgrade Account ... | 38158487 | 48 mins ago | IN | 0 ETH | 0.00000025 | ||||
| Safe Transfer Fr... | 38158352 | 53 mins ago | IN | 0 ETH | 0.00000043 | ||||
| Upgrade Account ... | 38158337 | 53 mins ago | IN | 0 ETH | 0.00000026 | ||||
| Upgrade Account ... | 38158295 | 55 mins ago | IN | 0 ETH | 0.00000024 | ||||
| Upgrade Account ... | 38158253 | 56 mins ago | IN | 0 ETH | 0.00000024 | ||||
| Upgrade Account ... | 38157947 | 1 hr ago | IN | 0 ETH | 0.00000029 | ||||
| Upgrade Account ... | 38157911 | 1 hr ago | IN | 0 ETH | 0.00000031 | ||||
| Upgrade Account ... | 38157691 | 1 hr ago | IN | 0 ETH | 0.00000043 | ||||
| Upgrade Account ... | 38157676 | 1 hr ago | IN | 0 ETH | 0.00000048 | ||||
| Upgrade Account ... | 38157660 | 1 hr ago | IN | 0 ETH | 0.00000046 | ||||
| Upgrade Account ... | 38157259 | 1 hr ago | IN | 0 ETH | 0.00000211 | ||||
| Upgrade Account ... | 38157189 | 1 hr ago | IN | 0 ETH | 0.00000149 | ||||
| Upgrade Account ... | 38157161 | 1 hr ago | IN | 0 ETH | 0.00000148 | ||||
| Upgrade Account ... | 38157147 | 1 hr ago | IN | 0 ETH | 0.00000152 | ||||
| Upgrade Account ... | 38156664 | 1 hr ago | IN | 0 ETH | 0.00000038 | ||||
| Upgrade Account ... | 38156649 | 1 hr ago | IN | 0 ETH | 0.00000037 | ||||
| Upgrade Account ... | 38156348 | 2 hrs ago | IN | 0 ETH | 0.00000055 | ||||
| Upgrade Account ... | 38156308 | 2 hrs ago | IN | 0 ETH | 0.0000005 |
Latest 25 internal transactions (View All)
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Factory
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
/**
* Created by Pragma Labs
* SPDX-License-Identifier: BUSL-1.1
*/
pragma solidity 0.8.22;
import { Proxy } from "./Proxy.sol";
import { IAccount } from "./interfaces/IAccount.sol";
import { IFactory } from "./interfaces/IFactory.sol";
import { IRegistry } from "./interfaces/IRegistry.sol";
import { ERC721, ERC721TokenReceiver } from "../lib/solmate/src/tokens/ERC721.sol";
import { Strings } from "./libraries/Strings.sol";
import { MerkleProofLib } from "../lib/solmate/src/utils/MerkleProofLib.sol";
import { FactoryGuardian } from "./guardians/FactoryGuardian.sol";
import { FactoryErrors } from "./libraries/Errors.sol";
/**
* @title Factory
* @author Pragma Labs
* @notice The Factory manages the deployment, upgrades and transfers of Arcadia Accounts.
* @dev The Factory is an ERC721 contract that maps each id to an Arcadia Account.
*/
contract Factory is IFactory, ERC721, FactoryGuardian {
using Strings for uint256;
/* //////////////////////////////////////////////////////////////
STORAGE
////////////////////////////////////////////////////////////// */
// The latest Account version, newly deployed Account use the latest version by default.
uint88 public latestAccountVersion;
// The baseURI of the ERC721 tokens.
string public baseURI;
// The Merkle root of the Merkle tree of all the compatible Account versions.
bytes32 public versionRoot;
// Array of all Arcadia Account contract addresses.
address[] public allAccounts;
// Map accountVersion => blocked status.
mapping(uint256 => bool) public accountVersionBlocked;
// Map accountAddress => accountIndex.
mapping(address => uint256) public accountIndex;
// Map accountVersion => version information.
mapping(uint256 => VersionInformation) public versionInformation;
// Struct with additional information for a specific Account version.
struct VersionInformation {
// The contract address of the Registry.
address registry;
// The contract address of the Account implementation.
address implementation;
// Arbitrary data, can contain instructions to execute when updating Account to new implementation.
bytes data;
}
/* //////////////////////////////////////////////////////////////
EVENTS
////////////////////////////////////////////////////////////// */
event AccountUpgraded(address indexed accountAddress, uint88 indexed newVersion);
event AccountVersionAdded(uint88 indexed version, address indexed registry, address indexed implementation);
event AccountVersionBlocked(uint88 version);
/* //////////////////////////////////////////////////////////////
CONSTRUCTOR
////////////////////////////////////////////////////////////// */
constructor() ERC721("Arcadia Account", "ARCADIA") { }
/*///////////////////////////////////////////////////////////////
ACCOUNT MANAGEMENT
///////////////////////////////////////////////////////////////*/
/**
* @notice Function to create a new Account.
* @param salt A salt to be used to generate the hash.
* @param accountVersion The Account version.
* @param creditor The contract address of the creditor.
* @return account The contract address of the proxy contract of the newly deployed Account.
* @dev If accountVersion == 0, the newest version will be used.
* @dev createAccount() uses the CREATE2 opcode, which can lead to address collision vulnerabilities,
* as described in: https://eips.ethereum.org/EIPS/eip-3607.
* To decrease the probability of finding an address collision, the number of possible account addresses is limited to 2**64.
* We use a salt with 64 bits, the 32 right most bits of the address of the tx.origin, and 32 bits provided by the user.
*/
function createAccount(uint32 salt, uint256 accountVersion, address creditor)
external
whenCreateNotPaused
returns (address account)
{
accountVersion = accountVersion == 0 ? latestAccountVersion : accountVersion;
if (accountVersion > latestAccountVersion) revert FactoryErrors.InvalidAccountVersion();
if (accountVersionBlocked[accountVersion]) revert FactoryErrors.AccountVersionBlocked();
// Hash tx.origin with the user provided salt to avoid front-running Account deployment with an identical salt.
// We use tx.origin instead of msg.sender so that deployments through a third party contract are not vulnerable to front-running.
account = address(
// 64 bit salt: 32 bits from tx.origin and 32 bits provided by the user.
new Proxy{ salt: keccak256(abi.encodePacked(salt, uint32(uint160(tx.origin)))) }(
versionInformation[accountVersion].implementation
)
);
allAccounts.push(account);
accountIndex[account] = allAccounts.length;
_mint(msg.sender, allAccounts.length);
IAccount(account).initialize(msg.sender, versionInformation[accountVersion].registry, creditor);
// unsafe cast: accountVersion <= latestAccountVersion, which is a uint88.
emit AccountUpgraded(account, uint88(accountVersion));
}
/**
* @notice View function returning if an address is an Account.
* @param account The address to be checked.
* @return bool Whether the address is an Account or not.
*/
function isAccount(address account) public view returns (bool) {
return accountIndex[account] > 0;
}
/**
* @notice Returns the owner of an Account.
* @param account The Account address.
* @return owner_ The Account owner.
* @dev Function does not revert when a non-existing Account is passed, but returns zero-address as owner.
*/
function ownerOfAccount(address account) external view returns (address owner_) {
owner_ = _ownerOf[accountIndex[account]];
}
/**
* @notice This function allows Account owners to upgrade the implementation of the Account.
* @param account Account that needs to be upgraded.
* @param version The accountVersion to upgrade to.
* @param proofs The Merkle proofs that prove the compatibility of the upgrade from current to new account version.
* @dev As each Account is a proxy, the implementation of the proxy can be changed by the owner of the Account.
* Checks are done such that only compatible versions can be upgraded to.
* Merkle proofs and their leaves can be found on https://www.github.com/arcadia-finance.
*/
function upgradeAccountVersion(address account, uint256 version, bytes32[] calldata proofs) external {
if (_ownerOf[accountIndex[account]] != msg.sender) revert FactoryErrors.OnlyAccountOwner();
if (accountVersionBlocked[version]) revert FactoryErrors.AccountVersionBlocked();
uint256 currentVersion = IAccount(account).ACCOUNT_VERSION();
bool canUpgrade =
MerkleProofLib.verify(proofs, versionRoot, keccak256(abi.encodePacked(currentVersion, version)));
if (!canUpgrade) revert FactoryErrors.InvalidUpgrade();
IAccount(account).upgradeAccount(
versionInformation[version].implementation,
versionInformation[version].registry,
version,
versionInformation[version].data
);
// unsafe cast: accountVersion <= latestAccountVersion, which is a uint88.
emit AccountUpgraded(account, uint88(version));
}
/**
* @notice Function used to transfer an Account between users based on Account address.
* @param from The sender.
* @param to The target.
* @param account The address of the Account that is transferred.
* @dev This method transfers an Account on Account address instead of id and
* also transfers the Account proxy contract to the new owner.
* @dev The Account itself cannot become its owner.
*/
function safeTransferFrom(address from, address to, address account) public {
if (to == account) revert FactoryErrors.InvalidRecipient();
uint256 id = accountIndex[account];
IAccount(allAccounts[id - 1]).transferOwnership(to);
super.safeTransferFrom(from, to, id);
}
/**
* @notice Function used to transfer an Account between users based on Account id.
* @param from The sender.
* @param to The target.
* @param id The id of the Account that is about to be transferred.
* @dev This method overwrites the safeTransferFrom function in ERC721.sol to
* also transfer the Account proxy contract to the new owner.
* @dev The Account itself cannot become its owner.
*/
function safeTransferFrom(address from, address to, uint256 id) public override {
address account = allAccounts[id - 1];
if (to == account) revert FactoryErrors.InvalidRecipient();
IAccount(account).transferOwnership(to);
super.safeTransferFrom(from, to, id);
}
/**
* @notice Function used to transfer an Account between users based on Account id.
* @param from The sender.
* @param to The target.
* @param id The id of the Account that is about to be transferred.
* @param data additional data, only used for onERC721Received.
* @dev This method overwrites the safeTransferFrom function in ERC721.sol to
* also transfer the Account proxy contract to the new owner.
* @dev The Account itself cannot become its owner.
*/
function safeTransferFrom(address from, address to, uint256 id, bytes calldata data) public override {
address account = allAccounts[id - 1];
if (to == account) revert FactoryErrors.InvalidRecipient();
IAccount(account).transferOwnership(to);
super.safeTransferFrom(from, to, id, data);
}
/**
* @notice Function used to transfer an Account between users based on Account id.
* @param from The sender.
* @param to The target.
* @param id The id of the Account that is about to be transferred.
* @dev This method overwrites the transferFrom function in ERC721.sol to
* also transfer the Account proxy contract to the new owner.
* @dev The Account itself cannot become its owner.
*/
function transferFrom(address from, address to, uint256 id) public override {
address account = allAccounts[id - 1];
if (to == account) revert FactoryErrors.InvalidRecipient();
IAccount(account).transferOwnership(to);
super.transferFrom(from, to, id);
}
/**
* @notice Function used to transfer an Account, called by the Account itself.
* @param to The target.
* @dev Adaptation of safeTransferFrom from the ERC-721 standard, where the Account itself triggers the transfer.
* @dev The Account must do the transferOwnership() before calling this function.
* @dev The Account itself cannot become its owner.
*/
function safeTransferAccount(address to) public {
if (to == address(0)) revert FactoryErrors.InvalidRecipient();
if (to == msg.sender) revert FactoryErrors.InvalidRecipient();
uint256 id = accountIndex[msg.sender];
if (id == 0) revert FactoryErrors.OnlyAccount();
address from = _ownerOf[id];
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
unchecked {
_balanceOf[from]--;
_balanceOf[to]++;
}
_ownerOf[id] = to;
delete getApproved[id];
if (
to.code.length != 0
&& ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, "")
!= ERC721TokenReceiver.onERC721Received.selector
) revert FactoryErrors.UnsafeRecipient();
emit Transfer(from, to, id);
}
/*///////////////////////////////////////////////////////////////
ACCOUNT VERSION MANAGEMENT
///////////////////////////////////////////////////////////////*/
/**
* @notice Function to set a new Account version with the contracts to be used for new deployed Accounts.
* @param registry The contract address of the Registry.
* @param implementation The contract address of the Account implementation.
* @param versionRoot_ The Merkle root of the Merkle tree of all the compatible Account versions.
* @param data Arbitrary data, can contain instructions to execute when updating Account to new implementation.
* @dev Changing any of the contracts does NOT change the contracts for existing deployed Accounts,
* unless the Account owner explicitly chooses to upgrade their Account to a newer version.
*/
function setNewAccountInfo(address registry, address implementation, bytes32 versionRoot_, bytes calldata data)
external
onlyOwner
{
if (versionRoot_ == bytes32(0)) revert FactoryErrors.VersionRootIsZero();
if (implementation == address(0)) revert FactoryErrors.ImplIsZero();
uint256 latestAccountVersion_;
unchecked {
// Update and cache the new latestAccountVersion.
latestAccountVersion_ = ++latestAccountVersion;
}
versionRoot = versionRoot_;
versionInformation[latestAccountVersion_] =
VersionInformation({ registry: registry, implementation: implementation, data: data });
if (IAccount(implementation).ACCOUNT_VERSION() != latestAccountVersion) revert FactoryErrors.VersionMismatch();
if (IAccount(implementation).FACTORY() != address(this)) revert FactoryErrors.FactoryMismatch();
if (IRegistry(registry).FACTORY() != address(this)) revert FactoryErrors.FactoryMismatch();
emit AccountVersionAdded(uint88(latestAccountVersion_), registry, implementation);
}
/**
* @notice Function to block a certain Account implementation version from being created as a new Account.
* @param version The Account version to be phased out.
* @dev Should any Account implementation version be phased out,
* this function can be used to block it from being created for new Accounts.
* @dev Although possible to block an Account version through the versionRoot,
* that would require verifying the Merkle tree on account creation, which is expensive.
*/
function blockAccountVersion(uint256 version) external onlyOwner {
if (version == 0 || version > latestAccountVersion) revert FactoryErrors.InvalidAccountVersion();
accountVersionBlocked[version] = true;
// unsafe cast: accountVersion <= latestAccountVersion, which is a uint88.
emit AccountVersionBlocked(uint88(version));
}
/*///////////////////////////////////////////////////////////////
HELPER FUNCTIONS
///////////////////////////////////////////////////////////////*/
/**
* @notice Function returns the total number of Accounts.
* @return numberOfAccounts The total number of Accounts.
*/
function allAccountsLength() external view returns (uint256 numberOfAccounts) {
numberOfAccounts = allAccounts.length;
}
/*///////////////////////////////////////////////////////////////
ERC-721 LOGIC
///////////////////////////////////////////////////////////////*/
/**
* @notice Function that stores a new base URI.
* @param newBaseURI The new base URI to store.
* @dev tokenURIs of Arcadia Accounts are not meant to be immutable
* and might be updated later to allow users to choose/create their own Account art,
* as such no URI freeze is added.
*/
function setBaseURI(string calldata newBaseURI) external onlyOwner {
baseURI = newBaseURI;
}
/**
* @notice Function that returns the token URI as defined in the ERC721 standard.
* @param tokenId The id of the Account.
* @return uri The token URI.
*/
function tokenURI(uint256 tokenId) public view override returns (string memory uri) {
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.22;
/**
* @title Proxy
* @author Pragma Labs
* @dev Implementation based on ERC1967: Proxy Storage Slots.
* See https://eips.ethereum.org/EIPS/eip-1967.
*/
contract Proxy {
/* //////////////////////////////////////////////////////////////
CONSTANTS
////////////////////////////////////////////////////////////// */
// Storage slot with the address of the current implementation.
// This is the hardcoded keccak-256 hash of: "eip1967.proxy.implementation" subtracted by 1.
bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/* //////////////////////////////////////////////////////////////
STORAGE
////////////////////////////////////////////////////////////// */
// Storage slot for the Account logic, a struct to avoid storage conflict when dealing with upgradeable contracts.
struct AddressSlot {
address value;
}
/* //////////////////////////////////////////////////////////////
EVENTS
////////////////////////////////////////////////////////////// */
event Upgraded(address indexed implementation);
/* //////////////////////////////////////////////////////////////
CONSTRUCTOR
////////////////////////////////////////////////////////////// */
/**
* @param implementation The contract address of the Account logic.
*/
constructor(address implementation) payable {
_getAddressSlot(IMPLEMENTATION_SLOT).value = implementation;
emit Upgraded(implementation);
}
/**
* @dev Fallback function that delegates calls to the implementation address.
* Will run if call data is empty.
*/
receive() external payable virtual {
_delegate(_getAddressSlot(IMPLEMENTATION_SLOT).value);
}
/**
* @dev Fallback function that delegates calls to the implementation address.
* Will run if no other function in the contract matches the call data.
*/
fallback() external payable virtual {
_delegate(_getAddressSlot(IMPLEMENTATION_SLOT).value);
}
/*///////////////////////////////////////////////////////////////
IMPLEMENTATION LOGIC
///////////////////////////////////////////////////////////////*/
/**
* @notice Returns the "AddressSlot" with member "value" located at "slot".
* @param slot The slot where the address of the Logic contract is stored.
* @return r The address stored in slot.
*/
function _getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
assembly {
r.slot := slot
}
}
/*///////////////////////////////////////////////////////////////
DELEGATION LOGIC
///////////////////////////////////////////////////////////////*/
/**
* @param implementation The contract address of the logic.
* @dev Delegates the current call to "implementation".
* This function does not return to its internal call site, it will return directly to the external caller.
*/
function _delegate(address implementation) internal virtual {
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
calldatacopy(0, 0, calldatasize())
// Call the implementation.
// out and outsize are 0 because we don't know the size yet.
let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)
// Copy the returned data.
returndatacopy(0, 0, returndatasize())
switch result
// delegatecall returns 0 on error.
case 0 { revert(0, returndatasize()) }
default { return(0, returndatasize()) }
}
}
}/**
* Created by Pragma Labs
* SPDX-License-Identifier: MIT
*/
pragma solidity 0.8.22;
interface IAccount {
/**
* @notice Returns the Account version.
* @return version The Account version.
*/
function ACCOUNT_VERSION() external view returns (uint256);
/**
* @notice Returns the Arcadia Accounts Factory.
* @return factory The contract address of the Arcadia Accounts Factory.
*/
function FACTORY() external view returns (address);
/**
* @notice Initiates the variables of the Account.
* @param owner The sender of the 'createAccount' on the factory
* @param registry The 'beacon' contract with the external logic.
* @param creditor The contract address of the creditor.
*/
function initialize(address owner, address registry, address creditor) external;
/**
* @notice Updates the Account version and stores a new address in the EIP1967 implementation slot.
* @param newImplementation The contract with the new Account logic.
* @param newRegistry The Registry for this specific implementation (might be identical as the old registry).
* @param data Arbitrary data, can contain instructions to execute when updating Account to new logic.
* @param newVersion The new version of the Account logic.
*/
function upgradeAccount(address newImplementation, address newRegistry, uint256 newVersion, bytes calldata data)
external;
/**
* @notice Transfers ownership of the contract to a new account.
* @param newOwner The new owner of the Account.
*/
function transferOwnership(address newOwner) external;
}/**
* Created by Pragma Labs
* SPDX-License-Identifier: MIT
*/
pragma solidity 0.8.22;
interface IFactory {
/**
* @notice Checks if a contract is an Account.
* @param account The contract address of the Account.
* @return bool indicating if the address is an Account or not.
*/
function isAccount(address account) external view returns (bool);
/**
* @notice Function used to transfer an Account, called by the Account itself.
* @param to The target.
*/
function safeTransferAccount(address to) external;
}/**
* Created by Pragma Labs
* SPDX-License-Identifier: MIT
*/
pragma solidity 0.8.22;
import { AssetValueAndRiskFactors } from "../libraries/AssetValuationLib.sol";
interface IRegistry {
/**
* @notice Returns the Arcadia Accounts Factory.
* @return factory The contract address of the Arcadia Accounts Factory.
*/
function FACTORY() external view returns (address);
/**
* @notice Checks if an asset is in the Registry.
* @param asset The contract address of the asset.
* @return boolean.
*/
function inRegistry(address asset) external view returns (bool);
/**
* @notice Batch retrieves the asset types.
* @param assetAddresses Array of the contract addresses of the assets.
* @return assetTypes Array with the types of the assets.
* 0 = Unknown asset.
* 1 = ERC20.
* 2 = ERC721.
* 3 = ERC1155.
* ...
*/
function batchGetAssetTypes(address[] calldata assetAddresses) external view returns (uint256[] memory);
/**
* @notice Batch deposit multiple assets.
* @param creditor The contract address of the creditor.
* @param assetAddresses Array of the contract addresses of the assets.
* @param assetIds Array of the IDs of the assets.
* @param amounts Array with the amounts of the assets.
*/
function batchProcessDeposit(
address creditor,
address[] calldata assetAddresses,
uint256[] calldata assetIds,
uint256[] calldata amounts
) external;
/**
* @notice Batch withdraw multiple assets.
* @param creditor The contract address of the creditor.
* @param assetAddresses Array of the contract addresses of the assets.
* @param assetIds Array of the IDs of the assets.
* @param amounts Array with the amounts of the assets.
* @return assetTypes Array with the types of the assets.
* 0 = Unknown asset.
* 1 = ERC20.
* 2 = ERC721.
* 3 = ERC1155.
*/
function batchProcessWithdrawal(
address creditor,
address[] calldata assetAddresses,
uint256[] calldata assetIds,
uint256[] calldata amounts
) external returns (uint256[] memory);
/**
* @notice Calculates the combined value of a combination of assets, denominated in a given Numeraire.
* @param numeraire The contract address of the Numeraire.
* @param creditor The contract address of the creditor.
* @param assetAddresses Array of the contract addresses of the assets.
* @param assetIds Array of the IDs of the assets.
* @param assetAmounts Array with the amounts of the assets.
* @return assetValue The combined value of the assets, denominated in the Numeraire.
*/
function getTotalValue(
address numeraire,
address creditor,
address[] calldata assetAddresses,
uint256[] calldata assetIds,
uint256[] calldata assetAmounts
) external view returns (uint256);
/**
* @notice Calculates the collateralValue of a combination of assets, denominated in a given Numeraire.
* @param numeraire The contract address of the Numeraire.
* @param creditor The contract address of the creditor.
* @param assetAddresses Array of the contract addresses of the assets.
* @param assetIds Array of the IDs of the assets.
* @param assetAmounts Array with the amounts of the assets.
* @return collateralValue The collateral value of the assets, denominated in the Numeraire.
*/
function getCollateralValue(
address numeraire,
address creditor,
address[] calldata assetAddresses,
uint256[] calldata assetIds,
uint256[] calldata assetAmounts
) external view returns (uint256);
/**
* @notice Calculates the getLiquidationValue of a combination of assets, denominated in a given Numeraire.
* @param numeraire The contract address of the Numeraire.
* @param creditor The contract address of the creditor.
* @param assetAddresses Array of the contract addresses of the assets.
* @param assetIds Array of the IDs of the assets.
* @param assetAmounts Array with the amounts of the assets.
* @return liquidationValue The liquidation value of the assets, denominated in the Numeraire.
*/
function getLiquidationValue(
address numeraire,
address creditor,
address[] calldata assetAddresses,
uint256[] calldata assetIds,
uint256[] calldata assetAmounts
) external view returns (uint256);
/**
* @notice Calculates the values per asset, denominated in a given Numeraire.
* @param numeraire The contract address of the Numeraire.
* @param creditor The contract address of the creditor.
* @param assetAddresses Array of the contract addresses of the assets.
* @param assetIds Array of the IDs of the assets.
* @param assetAmounts Array with the amounts of the assets.
* @return valuesAndRiskFactors The array of values per assets, denominated in the Numeraire.
*/
function getValuesInNumeraire(
address numeraire,
address creditor,
address[] calldata assetAddresses,
uint256[] calldata assetIds,
uint256[] calldata assetAmounts
) external view returns (AssetValueAndRiskFactors[] memory valuesAndRiskFactors);
}// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
/// @notice Modern, minimalist, and gas efficient ERC-721 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721 {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 indexed id);
event Approval(address indexed owner, address indexed spender, uint256 indexed id);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/*//////////////////////////////////////////////////////////////
METADATA STORAGE/LOGIC
//////////////////////////////////////////////////////////////*/
string public name;
string public symbol;
function tokenURI(uint256 id) public view virtual returns (string memory);
/*//////////////////////////////////////////////////////////////
ERC721 BALANCE/OWNER STORAGE
//////////////////////////////////////////////////////////////*/
mapping(uint256 => address) internal _ownerOf;
mapping(address => uint256) internal _balanceOf;
function ownerOf(uint256 id) public view virtual returns (address owner) {
require((owner = _ownerOf[id]) != address(0), "NOT_MINTED");
}
function balanceOf(address owner) public view virtual returns (uint256) {
require(owner != address(0), "ZERO_ADDRESS");
return _balanceOf[owner];
}
/*//////////////////////////////////////////////////////////////
ERC721 APPROVAL STORAGE
//////////////////////////////////////////////////////////////*/
mapping(uint256 => address) public getApproved;
mapping(address => mapping(address => bool)) public isApprovedForAll;
/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor(string memory _name, string memory _symbol) {
name = _name;
symbol = _symbol;
}
/*//////////////////////////////////////////////////////////////
ERC721 LOGIC
//////////////////////////////////////////////////////////////*/
function approve(address spender, uint256 id) public virtual {
address owner = _ownerOf[id];
require(msg.sender == owner || isApprovedForAll[owner][msg.sender], "NOT_AUTHORIZED");
getApproved[id] = spender;
emit Approval(owner, spender, id);
}
function setApprovalForAll(address operator, bool approved) public virtual {
isApprovedForAll[msg.sender][operator] = approved;
emit ApprovalForAll(msg.sender, operator, approved);
}
function transferFrom(
address from,
address to,
uint256 id
) public virtual {
require(from == _ownerOf[id], "WRONG_FROM");
require(to != address(0), "INVALID_RECIPIENT");
require(
msg.sender == from || isApprovedForAll[from][msg.sender] || msg.sender == getApproved[id],
"NOT_AUTHORIZED"
);
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
unchecked {
_balanceOf[from]--;
_balanceOf[to]++;
}
_ownerOf[id] = to;
delete getApproved[id];
emit Transfer(from, to, id);
}
function safeTransferFrom(
address from,
address to,
uint256 id
) public virtual {
transferFrom(from, to, id);
require(
to.code.length == 0 ||
ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, "") ==
ERC721TokenReceiver.onERC721Received.selector,
"UNSAFE_RECIPIENT"
);
}
function safeTransferFrom(
address from,
address to,
uint256 id,
bytes calldata data
) public virtual {
transferFrom(from, to, id);
require(
to.code.length == 0 ||
ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) ==
ERC721TokenReceiver.onERC721Received.selector,
"UNSAFE_RECIPIENT"
);
}
/*//////////////////////////////////////////////////////////////
ERC165 LOGIC
//////////////////////////////////////////////////////////////*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return
interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165
interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721
interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata
}
/*//////////////////////////////////////////////////////////////
INTERNAL MINT/BURN LOGIC
//////////////////////////////////////////////////////////////*/
function _mint(address to, uint256 id) internal virtual {
require(to != address(0), "INVALID_RECIPIENT");
require(_ownerOf[id] == address(0), "ALREADY_MINTED");
// Counter overflow is incredibly unrealistic.
unchecked {
_balanceOf[to]++;
}
_ownerOf[id] = to;
emit Transfer(address(0), to, id);
}
function _burn(uint256 id) internal virtual {
address owner = _ownerOf[id];
require(owner != address(0), "NOT_MINTED");
// Ownership check above ensures no underflow.
unchecked {
_balanceOf[owner]--;
}
delete _ownerOf[id];
delete getApproved[id];
emit Transfer(owner, address(0), id);
}
/*//////////////////////////////////////////////////////////////
INTERNAL SAFE MINT LOGIC
//////////////////////////////////////////////////////////////*/
function _safeMint(address to, uint256 id) internal virtual {
_mint(to, id);
require(
to.code.length == 0 ||
ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, "") ==
ERC721TokenReceiver.onERC721Received.selector,
"UNSAFE_RECIPIENT"
);
}
function _safeMint(
address to,
uint256 id,
bytes memory data
) internal virtual {
_mint(to, id);
require(
to.code.length == 0 ||
ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) ==
ERC721TokenReceiver.onERC721Received.selector,
"UNSAFE_RECIPIENT"
);
}
}
/// @notice A generic interface for a contract which properly accepts ERC721 tokens.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721TokenReceiver {
function onERC721Received(
address,
address,
uint256,
bytes calldata
) external virtual returns (bytes4) {
return ERC721TokenReceiver.onERC721Received.selector;
}
}// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity 0.8.22;
library Strings {
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
/// @notice Gas optimized merkle proof verification library.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/MerkleProofLib.sol)
/// @author Modified from Solady (https://github.com/Vectorized/solady/blob/main/src/utils/MerkleProofLib.sol)
library MerkleProofLib {
function verify(
bytes32[] calldata proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool isValid) {
/// @solidity memory-safe-assembly
assembly {
if proof.length {
// Left shifting by 5 is like multiplying by 32.
let end := add(proof.offset, shl(5, proof.length))
// Initialize offset to the offset of the proof in calldata.
let offset := proof.offset
// Iterate over proof elements to compute root hash.
// prettier-ignore
for {} 1 {} {
// Slot where the leaf should be put in scratch space. If
// leaf > calldataload(offset): slot 32, otherwise: slot 0.
let leafSlot := shl(5, gt(leaf, calldataload(offset)))
// Store elements to hash contiguously in scratch space.
// The xor puts calldataload(offset) in whichever slot leaf
// is not occupying, so 0 if leafSlot is 32, and 32 otherwise.
mstore(leafSlot, leaf)
mstore(xor(leafSlot, 32), calldataload(offset))
// Reuse leaf to store the hash to reduce stack operations.
leaf := keccak256(0, 64) // Hash both slots of scratch space.
offset := add(offset, 32) // Shift 1 word per cycle.
// prettier-ignore
if iszero(lt(offset, end)) { break }
}
}
isValid := eq(leaf, root) // The proof is valid if the roots match.
}
}
}/**
* Created by Pragma Labs
* SPDX-License-Identifier: BUSL-1.1
*/
pragma solidity 0.8.22;
import { BaseGuardian, GuardianErrors } from "./BaseGuardian.sol";
/**
* @title Factory Guardian
* @author Pragma Labs
* @notice Logic inherited by the Factory that allows:
* - An authorized guardian to trigger an emergency stop.
* - The protocol owner to unpause functionalities.
*/
abstract contract FactoryGuardian is BaseGuardian {
/* //////////////////////////////////////////////////////////////
STORAGE
////////////////////////////////////////////////////////////// */
// Flag indicating if the create() function is paused.
bool public createPaused;
/* //////////////////////////////////////////////////////////////
ERRORS
////////////////////////////////////////////////////////////// */
error FunctionNotImplemented();
/* //////////////////////////////////////////////////////////////
EVENTS
////////////////////////////////////////////////////////////// */
event PauseFlagsUpdated(bool createPauseUpdate);
/* //////////////////////////////////////////////////////////////
MODIFIERS
////////////////////////////////////////////////////////////// */
/**
* @dev Throws if the createAccount functionality is paused.
*/
modifier whenCreateNotPaused() {
if (createPaused) revert GuardianErrors.FunctionIsPaused();
_;
}
/* //////////////////////////////////////////////////////////////
PAUSING LOGIC
////////////////////////////////////////////////////////////// */
/**
* @notice This function is used to pause the creation of Accounts.
* @dev The pause guardian of the Factory has no cool-down period.
*/
function pause() external override onlyGuardian {
emit PauseFlagsUpdated(createPaused = true);
}
/**
* @notice This function is used to unpause the creation of Accounts.
* @param createPaused_ "False" when create functionality should be unpaused.
* @dev This function can unpause the creation of new Accounts.
* @dev Can only update flags from paused (true) to unpaused (false), cannot be used the other way around
* (to set unpaused flags to paused).
*/
function unpause(bool createPaused_) external onlyOwner {
emit PauseFlagsUpdated(createPaused = createPaused && createPaused_);
}
/**
* @notice This function is not implemented.
* @dev No reason to be able to create an Account if the owner of the Factory did not unpause createAccount().
*/
function unpause() external pure override {
revert FunctionNotImplemented();
}
}/**
* Created by Pragma Labs
* SPDX-License-Identifier: BUSL-1.1
*/
pragma solidity 0.8.22;
library AccountErrors {
error AccountInAuction();
error AccountNotLiquidatable();
error AccountUnhealthy();
error AlreadyInitialized();
error CreditorAlreadySet();
error CreditorNotSet();
error CoolDownPeriodNotPassed();
error InvalidAccountVersion();
error InvalidERC20Id();
error InvalidERC721Amount();
error InvalidRecipient();
error InvalidRegistry();
error NoFallback();
error NoReentry();
error NonZeroOpenPosition();
error NumeraireNotFound();
error OnlyFactory();
error OnlyCreditor();
error OnlyLiquidator();
error OnlyOwner();
error TooManyAssets();
error UnknownAsset();
error UnknownAssetType();
}
library FactoryErrors {
error AccountVersionBlocked();
error FactoryMismatch();
error InvalidAccountVersion();
error InvalidRecipient();
error InvalidUpgrade();
error ImplIsZero();
error OnlyAccount();
error OnlyAccountOwner();
error UnsafeRecipient();
error VersionMismatch();
error VersionRootIsZero();
}
library GuardianErrors {
// Thrown when the cool-down period has not yet passed.
error CoolDownPeriodNotPassed();
// Thrown when the functionality is paused.
error FunctionIsPaused();
// Thrown when the caller is not the Guardian.
error OnlyGuardian();
}
library RegistryErrors {
error AssetAlreadyInRegistry();
error AssetModNotUnique();
error AssetNotAllowed();
error InvalidAssetType();
error LengthMismatch();
error MaxRecursiveCallsReached();
error Min1Oracle();
error OnlyAccount();
error OnlyAssetModule();
error OnlyOracleModule();
error OracleModNotUnique();
error OracleNotReverting();
error OracleReverting();
error SequencerDown();
error Unauthorized();
error UnknownAsset();
}/**
* Created by Pragma Labs
* SPDX-License-Identifier: BUSL-1.1
*/
pragma solidity 0.8.22;
// Struct with risk and valuation related information for a certain asset.
struct AssetValueAndRiskFactors {
// The value of the asset.
uint256 assetValue;
// The collateral factor of the asset, for a given creditor.
uint256 collateralFactor;
// The liquidation factor of the asset, for a given creditor.
uint256 liquidationFactor;
}
/**
* @title Asset Valuation Library
* @author Pragma Labs
* @notice The Asset Valuation Library is responsible for calculating the risk weighted values of combinations of assets.
*/
library AssetValuationLib {
/*///////////////////////////////////////////////////////////////
CONSTANTS
///////////////////////////////////////////////////////////////*/
uint256 internal constant ONE_4 = 10_000;
/*///////////////////////////////////////////////////////////////
RISK FACTORS
///////////////////////////////////////////////////////////////*/
/**
* @notice Calculates the collateral value given a combination of asset values and corresponding collateral factors.
* @param valuesAndRiskFactors Array of asset values and corresponding collateral factors.
* @return collateralValue The collateral value of the given assets.
*/
function _calculateCollateralValue(AssetValueAndRiskFactors[] memory valuesAndRiskFactors)
internal
pure
returns (uint256 collateralValue)
{
for (uint256 i; i < valuesAndRiskFactors.length; ++i) {
collateralValue += valuesAndRiskFactors[i].assetValue * valuesAndRiskFactors[i].collateralFactor;
}
collateralValue = collateralValue / ONE_4;
}
/**
* @notice Calculates the liquidation value given a combination of asset values and corresponding liquidation factors.
* @param valuesAndRiskFactors List of asset values and corresponding liquidation factors.
* @return liquidationValue The liquidation value of the given assets.
*/
function _calculateLiquidationValue(AssetValueAndRiskFactors[] memory valuesAndRiskFactors)
internal
pure
returns (uint256 liquidationValue)
{
for (uint256 i; i < valuesAndRiskFactors.length; ++i) {
liquidationValue += valuesAndRiskFactors[i].assetValue * valuesAndRiskFactors[i].liquidationFactor;
}
liquidationValue = liquidationValue / ONE_4;
}
}/**
* Created by Pragma Labs
* SPDX-License-Identifier: BUSL-1.1
*/
pragma solidity 0.8.22;
import { GuardianErrors } from "../libraries/Errors.sol";
import { Owned } from "../../lib/solmate/src/auth/Owned.sol";
/**
* @title Guardian
* @author Pragma Labs
* @notice Abstract contract with the minimal implementation of a Guardian contract.
* It implements the following logic:
* - An authorized guardian can trigger an emergency stop.
* - The protocol owner can unpause functionalities one-by-one.
* - Anyone can unpause all functionalities after a fixed cool-down period.
*/
abstract contract BaseGuardian is Owned {
/* //////////////////////////////////////////////////////////////
STORAGE
////////////////////////////////////////////////////////////// */
// Last timestamp an emergency stop was triggered.
uint96 public pauseTimestamp;
// Address of the Guardian.
address public guardian;
/* //////////////////////////////////////////////////////////////
EVENTS
////////////////////////////////////////////////////////////// */
event GuardianChanged(address indexed user, address indexed newGuardian);
/* //////////////////////////////////////////////////////////////
MODIFIERS
////////////////////////////////////////////////////////////// */
/**
* @dev Only guardians can call functions with this modifier.
*/
modifier onlyGuardian() {
if (msg.sender != guardian) revert GuardianErrors.OnlyGuardian();
_;
}
/**
* @dev The public unpause() function, or a second pause() function, can only called a fixed coolDownPeriod after an initial pause().
* This gives the protocol owner time to investigate and solve potential issues,
* but ensures that no rogue owner or guardian can lock user funds for an indefinite amount of time.
*/
modifier afterCoolDownOf(uint256 coolDownPeriod) {
if (block.timestamp <= pauseTimestamp + coolDownPeriod) revert GuardianErrors.CoolDownPeriodNotPassed();
_;
}
/* //////////////////////////////////////////////////////////////
CONSTRUCTOR
////////////////////////////////////////////////////////////// */
constructor() Owned(msg.sender) { }
/* //////////////////////////////////////////////////////////////
GUARDIAN LOGIC
////////////////////////////////////////////////////////////// */
/**
* @notice This function is used to set the guardian address
* @param guardian_ The address of the new guardian.
*/
function changeGuardian(address guardian_) external onlyOwner {
emit GuardianChanged(msg.sender, guardian = guardian_);
}
/* //////////////////////////////////////////////////////////////
PAUSING LOGIC
////////////////////////////////////////////////////////////// */
/**
* @notice This function is used to pause all the flags of the contract.
* @dev The Guardian can only pause the protocol again after 32 days have passed since the last pause.
* This is to prevent that a malicious owner or guardian can take user funds hostage for an indefinite time.
* After the guardian has paused the protocol, the owner has 30 days to find potential problems,
* find a solution and unpause the protocol. If the protocol is not unpaused after 30 days,
* an emergency procedure can be started by any user to unpause the protocol.
* All users have now at least a two-day window to withdraw assets and close positions before
* the protocol can again be paused 32 days after the contract was previously paused.
*/
function pause() external virtual;
/**
* @notice This function is used to unpause flags that could be abused to lock user assets.
* @dev If the protocol is not unpaused after 30 days, any user can unpause the protocol.
* This ensures that no rogue owner or guardian can lock user funds for an indefinite amount of time.
* All users have now at least a two-day window to withdraw assets and close positions before
* the protocol can again be paused 32 days after the contract was previously paused.
*/
function unpause() external virtual;
}// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
/// @notice Simple single owner authorization mixin.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol)
abstract contract Owned {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event OwnershipTransferred(address indexed user, address indexed newOwner);
/*//////////////////////////////////////////////////////////////
OWNERSHIP STORAGE
//////////////////////////////////////////////////////////////*/
address public owner;
modifier onlyOwner() virtual {
require(msg.sender == owner, "UNAUTHORIZED");
_;
}
/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor(address _owner) {
owner = _owner;
emit OwnershipTransferred(address(0), _owner);
}
/*//////////////////////////////////////////////////////////////
OWNERSHIP LOGIC
//////////////////////////////////////////////////////////////*/
function transferOwnership(address newOwner) public virtual onlyOwner {
owner = newOwner;
emit OwnershipTransferred(msg.sender, newOwner);
}
}{
"remappings": [
"@uniswap/v3-core/contracts/=lib/v3-core/contracts/",
"@openzeppelin/=lib/openzeppelin-contracts/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
"solmate/=lib/solmate/src/",
"v3-core/=lib/v3-core/",
"v3-periphery/=lib/v3-periphery/contracts/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "shanghai",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccountVersionBlocked","type":"error"},{"inputs":[],"name":"FactoryMismatch","type":"error"},{"inputs":[],"name":"FunctionIsPaused","type":"error"},{"inputs":[],"name":"FunctionNotImplemented","type":"error"},{"inputs":[],"name":"ImplIsZero","type":"error"},{"inputs":[],"name":"InvalidAccountVersion","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidUpgrade","type":"error"},{"inputs":[],"name":"OnlyAccount","type":"error"},{"inputs":[],"name":"OnlyAccountOwner","type":"error"},{"inputs":[],"name":"OnlyGuardian","type":"error"},{"inputs":[],"name":"UnsafeRecipient","type":"error"},{"inputs":[],"name":"VersionMismatch","type":"error"},{"inputs":[],"name":"VersionRootIsZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"accountAddress","type":"address"},{"indexed":true,"internalType":"uint88","name":"newVersion","type":"uint88"}],"name":"AccountUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint88","name":"version","type":"uint88"},{"indexed":true,"internalType":"address","name":"registry","type":"address"},{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"AccountVersionAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint88","name":"version","type":"uint88"}],"name":"AccountVersionBlocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newGuardian","type":"address"}],"name":"GuardianChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"createPauseUpdate","type":"bool"}],"name":"PauseFlagsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accountIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"accountVersionBlocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allAccounts","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allAccountsLength","outputs":[{"internalType":"uint256","name":"numberOfAccounts","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"version","type":"uint256"}],"name":"blockAccountVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"guardian_","type":"address"}],"name":"changeGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"salt","type":"uint32"},{"internalType":"uint256","name":"accountVersion","type":"uint256"},{"internalType":"address","name":"creditor","type":"address"}],"name":"createAccount","outputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"createPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isAccount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAccountVersion","outputs":[{"internalType":"uint88","name":"","type":"uint88"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"ownerOfAccount","outputs":[{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseTimestamp","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"safeTransferAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"registry","type":"address"},{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes32","name":"versionRoot_","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setNewAccountInfo","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":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bool","name":"createPaused_","type":"bool"}],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"version","type":"uint256"},{"internalType":"bytes32[]","name":"proofs","type":"bytes32[]"}],"name":"upgradeAccountVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"versionInformation","outputs":[{"internalType":"address","name":"registry","type":"address"},{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405234801562000010575f80fd5b50336040518060400160405280600f81526020016e105c98d8591a58481058d8dbdd5b9d608a1b815250604051806040016040528060078152602001664152434144494160c81b815250815f90816200006a91906200016b565b5060016200007982826200016b565b5050600680546001600160a01b0319166001600160a01b0384169081179091556040519091505f907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35062000237565b634e487b7160e01b5f52604160045260245ffd5b600181811c90821680620000f657607f821691505b6020821081036200011557634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200016657805f5260205f20601f840160051c81016020851015620001425750805b601f840160051c820191505b8181101562000163575f81556001016200014e565b50505b505050565b81516001600160401b03811115620001875762000187620000cd565b6200019f81620001988454620000e1565b846200011b565b602080601f831160018114620001d5575f8415620001bd5750858301515b5f19600386901b1c1916600185901b1785556200022f565b5f85815260208120601f198616915b828110156200020557888601518255948401946001909101908401620001e4565b50858210156200022357878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b612c2c80620002455f395ff3fe608060405234801562000010575f80fd5b506004361062000264575f3560e01c80637ccd0315116200014f578063bac7b49711620000c3578063e985e9c51162000083578063e985e9c51462000606578063f2fde38b1462000636578063f7ac6490146200064d578063fa8072391462000664578063fa907c3e146200067b575f80fd5b8063bac7b497146200057e578063be46ee9c1462000593578063c0a355b214620005ce578063c655e95714620005d8578063c87b56dd14620005ef575f80fd5b80638da5cb5b116200010f5780638da5cb5b14620004f457806395d89b411462000508578063a22cb4651462000512578063ad84f3411462000529578063b88d4fde1462000567575f80fd5b80637ccd031514620004665780638456cb59146200047d578063855670ae1462000487578063866b013814620004bb5780638937214814620004dd575f80fd5b80633ce86c6211620001e757806355f804b311620001a757806355f804b314620004005780636352211e14620004175780636c0360eb146200042e5780636c3fda1d146200043857806370a08231146200044f575f80fd5b80633ce86c6214620003a15780633f4ba83a14620003b8578063405ce58914620003c257806342842e0e14620003d5578063452a932014620003ec575f80fd5b806313c50f78116200023357806313c50f78146200030a57806323b872dd146200032f57806325ca4c9c14620003465780632fcb4f04146200037357806334d4e4a5146200038a575f80fd5b806301ffc9a7146200026857806306fdde031462000294578063081812fc14620002ad578063095ea7b314620002f1575b5f80fd5b6200027f620002793660046200215d565b620006a3565b60405190151581526020015b60405180910390f35b6200029e620006f6565b6040516200028b9190620021d3565b620002d8620002be366004620021e7565b60046020525f90815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016200028b565b620003086200030236600462002214565b62000789565b005b6200027f6200031b366004620021e7565b600b6020525f908152604090205460ff1681565b620003086200034036600462002241565b6200086f565b6200027f6200035736600462002284565b6001600160a01b03165f908152600c6020526040902054151590565b620003086200038436600462002284565b62000938565b620002d86200039b366004620022a2565b620009b0565b62000308620003b2366004620022ed565b62000c21565b6200030862000e27565b600a545b6040519081526020016200028b565b62000308620003e636600462002241565b62000e40565b600754620002d8906001600160a01b031681565b6200030862000411366004620023c1565b62000f03565b620002d862000428366004620021e7565b62000f44565b6200029e62000f9c565b620002d862000449366004620021e7565b62000fab565b620003c66200046036600462002284565b62000fd4565b620003086200047736600462002284565b62001037565b6200030862001226565b600754620004a290600160a81b90046001600160581b031681565b6040516001600160581b0390911681526020016200028b565b620003c6620004cc36600462002284565b600c6020525f908152604090205481565b62000308620004ee366004620021e7565b6200129b565b600654620002d8906001600160a01b031681565b6200029e6200135f565b620003086200052336600462002414565b6200136e565b6006546200054990600160a01b90046bffffffffffffffffffffffff1681565b6040516bffffffffffffffffffffffff90911681526020016200028b565b62000308620005783660046200244c565b620013d9565b6007546200027f90600160a01b900460ff1681565b620002d8620005a436600462002284565b6001600160a01b039081165f908152600c6020908152604080832054835260029091529020541690565b620003c660095481565b62000308620005e93660046200244c565b620014a6565b6200029e62000600366004620021e7565b6200181d565b6200027f62000617366004620024c2565b600560209081525f928352604080842090915290825290205460ff1681565b620003086200064736600462002284565b62001881565b620003086200065e366004620024fe565b620018f9565b620003086200067536600462002542565b620019d7565b620006926200068c366004620021e7565b62001a65565b6040516200028b939291906200255e565b5f6301ffc9a760e01b6001600160e01b031983161480620006d457506380ac58cd60e01b6001600160e01b03198316145b80620006f05750635b5e139f60e01b6001600160e01b03198316145b92915050565b5f8054620007049062002594565b80601f0160208091040260200160405190810160405280929190818152602001828054620007329062002594565b8015620007815780601f10620007575761010080835404028352916020019162000781565b820191905f5260205f20905b8154815290600101906020018083116200076357829003601f168201915b505050505081565b5f818152600260205260409020546001600160a01b031633811480620007d157506001600160a01b0381165f90815260056020908152604080832033845290915290205460ff165b620008145760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b5f8281526004602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b5f600a6200087f600184620025e2565b81548110620008925762000892620025f8565b5f918252602090912001546001600160a01b0390811691508316819003620008cd57604051634e46966960e11b815260040160405180910390fd5b60405163f2fde38b60e01b81526001600160a01b03848116600483015282169063f2fde38b906024015f604051808303815f87803b1580156200090e575f80fd5b505af115801562000921573d5f803e3d5ffd5b505050506200093284848462001b22565b50505050565b6006546001600160a01b03163314620009655760405162461bcd60e51b81526004016200080b906200260c565b600780546001600160a01b0319166001600160a01b03831690811790915560405133907fa14fc14d8620a708a896fd11392a235647d99385500a295f0d7da2a258b2e967905f90a350565b6007545f90600160a01b900460ff1615620009de5760405163bbc5234f60e01b815260040160405180910390fd5b8215620009ec578262000a00565b600754600160a81b90046001600160581b03165b600754909350600160a81b90046001600160581b031683111562000a375760405163a93eca7960e01b815260040160405180910390fd5b5f838152600b602052604090205460ff161562000a675760405163125b49b360e31b815260040160405180910390fd5b6040516001600160e01b031960e086811b8216602084015232901b16602482015260280160408051601f1981840301815282825280516020918201205f878152600d9092529190206001015490916001600160a01b039091169062000acc9062002136565b6001600160a01b0390911681526020018190604051809103905ff590508015801562000afa573d5f803e3d5ffd5b50600a80546001810182557fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180546001600160a01b0319166001600160a01b03841690811790915590545f918252600c602052604090912081905590915062000b6690339062001cec565b5f838152600d60205260409081902054905163c0c53b8b60e01b81523360048201526001600160a01b03918216602482015283821660448201529082169063c0c53b8b906064015f604051808303815f87803b15801562000bc5575f80fd5b505af115801562000bd8573d5f803e3d5ffd5b50506040516001600160581b03861692506001600160a01b03841691507fb942724c61c2812433bb6ffa28d5bcc8563c9a7edee4473d04ee8fed8e6e9de3905f90a39392505050565b6001600160a01b038481165f908152600c60209081526040808320548352600290915290205416331462000c68576040516312272fd360e11b815260040160405180910390fd5b5f838152600b602052604090205460ff161562000c985760405163125b49b360e31b815260040160405180910390fd5b5f846001600160a01b031663bc68c6766040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000cd6573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019062000cfc919062002632565b90505f62000d418484600954858960405160200162000d25929190918252602082015260400190565b6040516020818303038152906040528051906020012062001df9565b90508062000d625760405163012fa17760e61b815260040160405180910390fd5b5f858152600d602052604090819020600181015481549251632c3c717360e01b81526001600160a01b038a811694632c3c71739462000db29483169392909116918b91600201906004016200264a565b5f604051808303815f87803b15801562000dca575f80fd5b505af115801562000ddd573d5f803e3d5ffd5b50506040516001600160581b03881692506001600160a01b03891691507fb942724c61c2812433bb6ffa28d5bcc8563c9a7edee4473d04ee8fed8e6e9de3905f90a3505050505050565b60405163ced4f63360e01b815260040160405180910390fd5b5f600a62000e50600184620025e2565b8154811062000e635762000e63620025f8565b5f918252602090912001546001600160a01b039081169150831681900362000e9e57604051634e46966960e11b815260040160405180910390fd5b60405163f2fde38b60e01b81526001600160a01b03848116600483015282169063f2fde38b906024015f604051808303815f87803b15801562000edf575f80fd5b505af115801562000ef2573d5f803e3d5ffd5b505050506200093284848462001e33565b6006546001600160a01b0316331462000f305760405162461bcd60e51b81526004016200080b906200260c565b600862000f3f8284836200275e565b505050565b5f818152600260205260409020546001600160a01b03168062000f975760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b60448201526064016200080b565b919050565b60088054620007049062002594565b600a818154811062000fbb575f80fd5b5f918252602090912001546001600160a01b0316905081565b5f6001600160a01b0382166200101c5760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b60448201526064016200080b565b506001600160a01b03165f9081526003602052604090205490565b6001600160a01b0381166200105f57604051634e46966960e11b815260040160405180910390fd5b336001600160a01b038216036200108957604051634e46966960e11b815260040160405180910390fd5b335f908152600c602052604081205490819003620010ba5760405163f3f6425d60e01b815260040160405180910390fd5b5f81815260026020908152604080832080546001600160a01b039081168086526003855283862080545f190190559087168086528386208054600101905586865282546001600160a01b0319908116821790935560049094529190932080549093169092553b15801590620011c15750604051630a85bd0160e11b8082523360048301526001600160a01b03838116602484015260448301859052608060648401525f608484015290919085169063150b7a029060a4016020604051808303815f875af11580156200118e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190620011b4919062002825565b6001600160e01b03191614155b15620011e057604051633da6393160e01b815260040160405180910390fd5b81836001600160a01b0316826001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6007546001600160a01b031633146200125257604051636570ecab60e11b815260040160405180910390fd5b6007805460ff60a01b1916600160a01b179055604051600181527f549bab54c75a364ce0e438a4fbf09df7e6b096bcc83a6f91065a0fc8e410b29a9060200160405180910390a1565b6006546001600160a01b03163314620012c85760405162461bcd60e51b81526004016200080b906200260c565b801580620012e75750600754600160a81b90046001600160581b031681115b15620013065760405163a93eca7960e01b815260040160405180910390fd5b5f818152600b6020908152604091829020805460ff1916600117905590516001600160581b03831681527feeb2feae0739ceec246b003c004c3f0d01c1fea822b7f668ac59e7de193ee7e191015b60405180910390a150565b60018054620007049062002594565b335f8181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b5f600a620013e9600186620025e2565b81548110620013fc57620013fc620025f8565b5f918252602090912001546001600160a01b03908116915085168190036200143757604051634e46966960e11b815260040160405180910390fd5b60405163f2fde38b60e01b81526001600160a01b03868116600483015282169063f2fde38b906024015f604051808303815f87803b15801562001478575f80fd5b505af11580156200148b573d5f803e3d5ffd5b505050506200149e868686868662001f2a565b505050505050565b6006546001600160a01b03163314620014d35760405162461bcd60e51b81526004016200080b906200260c565b82620014f25760405163152794b760e31b815260040160405180910390fd5b6001600160a01b0384166200151a576040516316409b0760e01b815260040160405180910390fd5b600780546001600160a81b038116600160a81b918290046001600160581b0390811660010116918202179091556009849055604080516060810182526001600160a01b03888116825287166020808301919091528251601f8601829004820281018201845285815291928301919086908690819084018382808284375f920182905250939094525050838152600d6020908152604091829020845181546001600160a01b03199081166001600160a01b0392831617835592860151600183018054909416911617909155908301519091506002820190620015fc908262002843565b50905050600760159054906101000a90046001600160581b03166001600160581b0316856001600160a01b031663bc68c6766040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200165c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019062001682919062002632565b14620016a15760405163714f551360e01b815260040160405180910390fd5b306001600160a01b0316856001600160a01b0316632dd310006040518163ffffffff1660e01b8152600401602060405180830381865afa158015620016e8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906200170e91906200290c565b6001600160a01b0316146200173657604051630539b97b60e21b815260040160405180910390fd5b306001600160a01b0316866001600160a01b0316632dd310006040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200177d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190620017a391906200290c565b6001600160a01b031614620017cb57604051630539b97b60e21b815260040160405180910390fd5b846001600160a01b0316866001600160a01b0316826001600160581b03167f7a76ee3d6c40ab211805bcb8ef8f41f0c86929a436491a2520b78930f580202e60405160405180910390a4505050505050565b60605f600880546200182f9062002594565b9050116200184c5760405180602001604052805f815250620006f0565b6008620018598362002019565b6040516020016200186c9291906200292a565b60405160208183030381529060405292915050565b6006546001600160a01b03163314620018ae5760405162461bcd60e51b81526004016200080b906200260c565b600680546001600160a01b0319166001600160a01b03831690811790915560405133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a350565b806001600160a01b0316826001600160a01b0316036200192c57604051634e46966960e11b815260040160405180910390fd5b6001600160a01b0381165f908152600c6020526040902054600a62001953600183620025e2565b81548110620019665762001966620025f8565b5f9182526020909120015460405163f2fde38b60e01b81526001600160a01b0385811660048301529091169063f2fde38b906024015f604051808303815f87803b158015620019b3575f80fd5b505af1158015620019c6573d5f803e3d5ffd5b505050506200093284848362001e33565b6006546001600160a01b0316331462001a045760405162461bcd60e51b81526004016200080b906200260c565b6007547f549bab54c75a364ce0e438a4fbf09df7e6b096bcc83a6f91065a0fc8e410b29a90600160a01b900460ff16801562001a3d5750815b6007805460ff60a01b1916600160a01b92151592830217905560405190815260200162001354565b600d6020525f90815260409020805460018201546002830180546001600160a01b0393841694929093169262001a9b9062002594565b80601f016020809104026020016040519081016040528092919081815260200182805462001ac99062002594565b801562001b185780601f1062001aee5761010080835404028352916020019162001b18565b820191905f5260205f20905b81548152906001019060200180831162001afa57829003601f168201915b5050505050905083565b5f818152600260205260409020546001600160a01b0384811691161462001b795760405162461bcd60e51b815260206004820152600a60248201526957524f4e475f46524f4d60b01b60448201526064016200080b565b6001600160a01b03821662001bc55760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b60448201526064016200080b565b336001600160a01b038416148062001bff57506001600160a01b0383165f90815260056020908152604080832033845290915290205460ff165b8062001c2057505f818152600460205260409020546001600160a01b031633145b62001c5f5760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064016200080b565b6001600160a01b038084165f81815260036020908152604080832080545f19019055938616808352848320805460010190558583526002825284832080546001600160a01b03199081168317909155600490925284832080549092169091559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b03821662001d385760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b60448201526064016200080b565b5f818152600260205260409020546001600160a01b03161562001d8f5760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d3525395115160921b60448201526064016200080b565b6001600160a01b0382165f81815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b5f831562001e2b578360051b8501855b803580851160051b94855260209485185260405f20930181811062001e095750505b501492915050565b62001e408383836200086f565b6001600160a01b0382163b158062001ee95750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401525f608484015290919084169063150b7a029060a4016020604051808303815f875af115801562001eb7573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019062001edd919062002825565b6001600160e01b031916145b62000f3f5760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b60448201526064016200080b565b62001f378585856200086f565b6001600160a01b0384163b158062001fd15750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a029062001f829033908a90899089908990600401620029b7565b6020604051808303815f875af115801562001f9f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019062001fc5919062002825565b6001600160e01b031916145b620020125760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b60448201526064016200080b565b5050505050565b6060815f03620020405750506040805180820190915260018152600360fc1b602082015290565b815f5b81156200206f5780620020568162002a09565b9150620020679050600a8362002a38565b915062002043565b5f8167ffffffffffffffff8111156200208c576200208c62002702565b6040519080825280601f01601f191660200182016040528015620020b7576020820181803683370190505b5090505b84156200212e57620020cf600183620025e2565b9150620020de600a8662002a4e565b620020eb90603062002a64565b60f81b818381518110620021035762002103620025f8565b60200101906001600160f81b03191690815f1a90535062002126600a8662002a38565b9450620020bb565b949350505050565b61017c8062002a7b83390190565b6001600160e01b0319811681146200215a575f80fd5b50565b5f602082840312156200216e575f80fd5b81356200217b8162002144565b9392505050565b5f5b838110156200219e57818101518382015260200162002184565b50505f910152565b5f8151808452620021bf81602086016020860162002182565b601f01601f19169290920160200192915050565b602081525f6200217b6020830184620021a6565b5f60208284031215620021f8575f80fd5b5035919050565b6001600160a01b03811681146200215a575f80fd5b5f806040838503121562002226575f80fd5b82356200223381620021ff565b946020939093013593505050565b5f805f6060848603121562002254575f80fd5b83356200226181620021ff565b925060208401356200227381620021ff565b929592945050506040919091013590565b5f6020828403121562002295575f80fd5b81356200217b81620021ff565b5f805f60608486031215620022b5575f80fd5b833563ffffffff81168114620022c9575f80fd5b9250602084013591506040840135620022e281620021ff565b809150509250925092565b5f805f806060858703121562002301575f80fd5b84356200230e81620021ff565b935060208501359250604085013567ffffffffffffffff8082111562002332575f80fd5b818701915087601f83011262002346575f80fd5b81358181111562002355575f80fd5b8860208260051b85010111156200236a575f80fd5b95989497505060200194505050565b5f8083601f8401126200238a575f80fd5b50813567ffffffffffffffff811115620023a2575f80fd5b602083019150836020828501011115620023ba575f80fd5b9250929050565b5f8060208385031215620023d3575f80fd5b823567ffffffffffffffff811115620023ea575f80fd5b620023f88582860162002379565b90969095509350505050565b8035801515811462000f97575f80fd5b5f806040838503121562002426575f80fd5b82356200243381620021ff565b9150620024436020840162002404565b90509250929050565b5f805f805f6080868803121562002461575f80fd5b85356200246e81620021ff565b945060208601356200248081620021ff565b935060408601359250606086013567ffffffffffffffff811115620024a3575f80fd5b620024b18882890162002379565b969995985093965092949392505050565b5f8060408385031215620024d4575f80fd5b8235620024e181620021ff565b91506020830135620024f381620021ff565b809150509250929050565b5f805f6060848603121562002511575f80fd5b83356200251e81620021ff565b925060208401356200253081620021ff565b91506040840135620022e281620021ff565b5f6020828403121562002553575f80fd5b6200217b8262002404565b6001600160a01b038481168252831660208201526060604082018190525f906200258b90830184620021a6565b95945050505050565b600181811c90821680620025a957607f821691505b602082108103620025c857634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b81810381811115620006f057620006f0620025ce565b634e487b7160e01b5f52603260045260245ffd5b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b5f6020828403121562002643575f80fd5b5051919050565b6001600160a01b0385811682528416602080830191909152604082018490526080606083015282545f918291620026818162002594565b80608087015260a060018084165f8114620026a55760018114620026c257620026f1565b60ff19851660a08a015260a084151560051b8a01019650620026f1565b895f5260205f205f5b85811015620026e85781548b8201860152908301908701620026cb565b8a0160a0019750505b50949b9a5050505050505050505050565b634e487b7160e01b5f52604160045260245ffd5b601f82111562000f3f57805f5260205f20601f840160051c810160208510156200273d5750805b601f840160051c820191505b8181101562002012575f815560010162002749565b67ffffffffffffffff83111562002779576200277962002702565b62002791836200278a835462002594565b8362002716565b5f601f841160018114620027c5575f8515620027ad5750838201355b5f19600387901b1c1916600186901b17835562002012565b5f83815260208120601f198716915b82811015620027f65786850135825560209485019460019092019101620027d4565b508682101562002813575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b5f6020828403121562002836575f80fd5b81516200217b8162002144565b815167ffffffffffffffff81111562002860576200286062002702565b620028788162002871845462002594565b8462002716565b602080601f831160018114620028ae575f8415620028965750858301515b5f19600386901b1c1916600185901b1785556200149e565b5f85815260208120601f198616915b82811015620028de57888601518255948401946001909101908401620028bd565b5085821015620028fc57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f602082840312156200291d575f80fd5b81516200217b81620021ff565b5f808454620029398162002594565b600182811680156200295457600181146200296a5762002998565b60ff198416875282151583028701945062002998565b885f526020805f205f5b858110156200298f5781548a82015290840190820162002974565b50505082870194505b505050508351620029ae81836020880162002182565b01949350505050565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290525f828460a08401375f60a0848401015260a0601f19601f85011683010190509695505050505050565b5f6001820162002a1d5762002a1d620025ce565b5060010190565b634e487b7160e01b5f52601260045260245ffd5b5f8262002a495762002a4962002a24565b500490565b5f8262002a5f5762002a5f62002a24565b500690565b80820180821115620006f057620006f0620025ce56fe608060405260405161017c38038061017c8339810160408190526100229161008d565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2506100ba565b5f6020828403121561009d575f80fd5b81516001600160a01b03811681146100b3575f80fd5b9392505050565b60b6806100c65f395ff3fe608060405236603c57603a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b546001600160a01b03166063565b005b603a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc602c565b365f80375f80365f845af43d5f803e808015607c573d5ff35b3d5ffdfea2646970667358221220eeb8a2fa918a2057b66e1d3fa3930647dc7a4e56c99898cd9e280beec9d9ba9f64736f6c63430008160033a2646970667358221220e698395988fa7accaad7a508c386ad01469d05120d959252300fbfbfb86cb2d964736f6c63430008160033
Deployed Bytecode
0x608060405234801562000010575f80fd5b506004361062000264575f3560e01c80637ccd0315116200014f578063bac7b49711620000c3578063e985e9c51162000083578063e985e9c51462000606578063f2fde38b1462000636578063f7ac6490146200064d578063fa8072391462000664578063fa907c3e146200067b575f80fd5b8063bac7b497146200057e578063be46ee9c1462000593578063c0a355b214620005ce578063c655e95714620005d8578063c87b56dd14620005ef575f80fd5b80638da5cb5b116200010f5780638da5cb5b14620004f457806395d89b411462000508578063a22cb4651462000512578063ad84f3411462000529578063b88d4fde1462000567575f80fd5b80637ccd031514620004665780638456cb59146200047d578063855670ae1462000487578063866b013814620004bb5780638937214814620004dd575f80fd5b80633ce86c6211620001e757806355f804b311620001a757806355f804b314620004005780636352211e14620004175780636c0360eb146200042e5780636c3fda1d146200043857806370a08231146200044f575f80fd5b80633ce86c6214620003a15780633f4ba83a14620003b8578063405ce58914620003c257806342842e0e14620003d5578063452a932014620003ec575f80fd5b806313c50f78116200023357806313c50f78146200030a57806323b872dd146200032f57806325ca4c9c14620003465780632fcb4f04146200037357806334d4e4a5146200038a575f80fd5b806301ffc9a7146200026857806306fdde031462000294578063081812fc14620002ad578063095ea7b314620002f1575b5f80fd5b6200027f620002793660046200215d565b620006a3565b60405190151581526020015b60405180910390f35b6200029e620006f6565b6040516200028b9190620021d3565b620002d8620002be366004620021e7565b60046020525f90815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016200028b565b620003086200030236600462002214565b62000789565b005b6200027f6200031b366004620021e7565b600b6020525f908152604090205460ff1681565b620003086200034036600462002241565b6200086f565b6200027f6200035736600462002284565b6001600160a01b03165f908152600c6020526040902054151590565b620003086200038436600462002284565b62000938565b620002d86200039b366004620022a2565b620009b0565b62000308620003b2366004620022ed565b62000c21565b6200030862000e27565b600a545b6040519081526020016200028b565b62000308620003e636600462002241565b62000e40565b600754620002d8906001600160a01b031681565b6200030862000411366004620023c1565b62000f03565b620002d862000428366004620021e7565b62000f44565b6200029e62000f9c565b620002d862000449366004620021e7565b62000fab565b620003c66200046036600462002284565b62000fd4565b620003086200047736600462002284565b62001037565b6200030862001226565b600754620004a290600160a81b90046001600160581b031681565b6040516001600160581b0390911681526020016200028b565b620003c6620004cc36600462002284565b600c6020525f908152604090205481565b62000308620004ee366004620021e7565b6200129b565b600654620002d8906001600160a01b031681565b6200029e6200135f565b620003086200052336600462002414565b6200136e565b6006546200054990600160a01b90046bffffffffffffffffffffffff1681565b6040516bffffffffffffffffffffffff90911681526020016200028b565b62000308620005783660046200244c565b620013d9565b6007546200027f90600160a01b900460ff1681565b620002d8620005a436600462002284565b6001600160a01b039081165f908152600c6020908152604080832054835260029091529020541690565b620003c660095481565b62000308620005e93660046200244c565b620014a6565b6200029e62000600366004620021e7565b6200181d565b6200027f62000617366004620024c2565b600560209081525f928352604080842090915290825290205460ff1681565b620003086200064736600462002284565b62001881565b620003086200065e366004620024fe565b620018f9565b620003086200067536600462002542565b620019d7565b620006926200068c366004620021e7565b62001a65565b6040516200028b939291906200255e565b5f6301ffc9a760e01b6001600160e01b031983161480620006d457506380ac58cd60e01b6001600160e01b03198316145b80620006f05750635b5e139f60e01b6001600160e01b03198316145b92915050565b5f8054620007049062002594565b80601f0160208091040260200160405190810160405280929190818152602001828054620007329062002594565b8015620007815780601f10620007575761010080835404028352916020019162000781565b820191905f5260205f20905b8154815290600101906020018083116200076357829003601f168201915b505050505081565b5f818152600260205260409020546001600160a01b031633811480620007d157506001600160a01b0381165f90815260056020908152604080832033845290915290205460ff165b620008145760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b5f8281526004602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b5f600a6200087f600184620025e2565b81548110620008925762000892620025f8565b5f918252602090912001546001600160a01b0390811691508316819003620008cd57604051634e46966960e11b815260040160405180910390fd5b60405163f2fde38b60e01b81526001600160a01b03848116600483015282169063f2fde38b906024015f604051808303815f87803b1580156200090e575f80fd5b505af115801562000921573d5f803e3d5ffd5b505050506200093284848462001b22565b50505050565b6006546001600160a01b03163314620009655760405162461bcd60e51b81526004016200080b906200260c565b600780546001600160a01b0319166001600160a01b03831690811790915560405133907fa14fc14d8620a708a896fd11392a235647d99385500a295f0d7da2a258b2e967905f90a350565b6007545f90600160a01b900460ff1615620009de5760405163bbc5234f60e01b815260040160405180910390fd5b8215620009ec578262000a00565b600754600160a81b90046001600160581b03165b600754909350600160a81b90046001600160581b031683111562000a375760405163a93eca7960e01b815260040160405180910390fd5b5f838152600b602052604090205460ff161562000a675760405163125b49b360e31b815260040160405180910390fd5b6040516001600160e01b031960e086811b8216602084015232901b16602482015260280160408051601f1981840301815282825280516020918201205f878152600d9092529190206001015490916001600160a01b039091169062000acc9062002136565b6001600160a01b0390911681526020018190604051809103905ff590508015801562000afa573d5f803e3d5ffd5b50600a80546001810182557fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180546001600160a01b0319166001600160a01b03841690811790915590545f918252600c602052604090912081905590915062000b6690339062001cec565b5f838152600d60205260409081902054905163c0c53b8b60e01b81523360048201526001600160a01b03918216602482015283821660448201529082169063c0c53b8b906064015f604051808303815f87803b15801562000bc5575f80fd5b505af115801562000bd8573d5f803e3d5ffd5b50506040516001600160581b03861692506001600160a01b03841691507fb942724c61c2812433bb6ffa28d5bcc8563c9a7edee4473d04ee8fed8e6e9de3905f90a39392505050565b6001600160a01b038481165f908152600c60209081526040808320548352600290915290205416331462000c68576040516312272fd360e11b815260040160405180910390fd5b5f838152600b602052604090205460ff161562000c985760405163125b49b360e31b815260040160405180910390fd5b5f846001600160a01b031663bc68c6766040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000cd6573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019062000cfc919062002632565b90505f62000d418484600954858960405160200162000d25929190918252602082015260400190565b6040516020818303038152906040528051906020012062001df9565b90508062000d625760405163012fa17760e61b815260040160405180910390fd5b5f858152600d602052604090819020600181015481549251632c3c717360e01b81526001600160a01b038a811694632c3c71739462000db29483169392909116918b91600201906004016200264a565b5f604051808303815f87803b15801562000dca575f80fd5b505af115801562000ddd573d5f803e3d5ffd5b50506040516001600160581b03881692506001600160a01b03891691507fb942724c61c2812433bb6ffa28d5bcc8563c9a7edee4473d04ee8fed8e6e9de3905f90a3505050505050565b60405163ced4f63360e01b815260040160405180910390fd5b5f600a62000e50600184620025e2565b8154811062000e635762000e63620025f8565b5f918252602090912001546001600160a01b039081169150831681900362000e9e57604051634e46966960e11b815260040160405180910390fd5b60405163f2fde38b60e01b81526001600160a01b03848116600483015282169063f2fde38b906024015f604051808303815f87803b15801562000edf575f80fd5b505af115801562000ef2573d5f803e3d5ffd5b505050506200093284848462001e33565b6006546001600160a01b0316331462000f305760405162461bcd60e51b81526004016200080b906200260c565b600862000f3f8284836200275e565b505050565b5f818152600260205260409020546001600160a01b03168062000f975760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b60448201526064016200080b565b919050565b60088054620007049062002594565b600a818154811062000fbb575f80fd5b5f918252602090912001546001600160a01b0316905081565b5f6001600160a01b0382166200101c5760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b60448201526064016200080b565b506001600160a01b03165f9081526003602052604090205490565b6001600160a01b0381166200105f57604051634e46966960e11b815260040160405180910390fd5b336001600160a01b038216036200108957604051634e46966960e11b815260040160405180910390fd5b335f908152600c602052604081205490819003620010ba5760405163f3f6425d60e01b815260040160405180910390fd5b5f81815260026020908152604080832080546001600160a01b039081168086526003855283862080545f190190559087168086528386208054600101905586865282546001600160a01b0319908116821790935560049094529190932080549093169092553b15801590620011c15750604051630a85bd0160e11b8082523360048301526001600160a01b03838116602484015260448301859052608060648401525f608484015290919085169063150b7a029060a4016020604051808303815f875af11580156200118e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190620011b4919062002825565b6001600160e01b03191614155b15620011e057604051633da6393160e01b815260040160405180910390fd5b81836001600160a01b0316826001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6007546001600160a01b031633146200125257604051636570ecab60e11b815260040160405180910390fd5b6007805460ff60a01b1916600160a01b179055604051600181527f549bab54c75a364ce0e438a4fbf09df7e6b096bcc83a6f91065a0fc8e410b29a9060200160405180910390a1565b6006546001600160a01b03163314620012c85760405162461bcd60e51b81526004016200080b906200260c565b801580620012e75750600754600160a81b90046001600160581b031681115b15620013065760405163a93eca7960e01b815260040160405180910390fd5b5f818152600b6020908152604091829020805460ff1916600117905590516001600160581b03831681527feeb2feae0739ceec246b003c004c3f0d01c1fea822b7f668ac59e7de193ee7e191015b60405180910390a150565b60018054620007049062002594565b335f8181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b5f600a620013e9600186620025e2565b81548110620013fc57620013fc620025f8565b5f918252602090912001546001600160a01b03908116915085168190036200143757604051634e46966960e11b815260040160405180910390fd5b60405163f2fde38b60e01b81526001600160a01b03868116600483015282169063f2fde38b906024015f604051808303815f87803b15801562001478575f80fd5b505af11580156200148b573d5f803e3d5ffd5b505050506200149e868686868662001f2a565b505050505050565b6006546001600160a01b03163314620014d35760405162461bcd60e51b81526004016200080b906200260c565b82620014f25760405163152794b760e31b815260040160405180910390fd5b6001600160a01b0384166200151a576040516316409b0760e01b815260040160405180910390fd5b600780546001600160a81b038116600160a81b918290046001600160581b0390811660010116918202179091556009849055604080516060810182526001600160a01b03888116825287166020808301919091528251601f8601829004820281018201845285815291928301919086908690819084018382808284375f920182905250939094525050838152600d6020908152604091829020845181546001600160a01b03199081166001600160a01b0392831617835592860151600183018054909416911617909155908301519091506002820190620015fc908262002843565b50905050600760159054906101000a90046001600160581b03166001600160581b0316856001600160a01b031663bc68c6766040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200165c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019062001682919062002632565b14620016a15760405163714f551360e01b815260040160405180910390fd5b306001600160a01b0316856001600160a01b0316632dd310006040518163ffffffff1660e01b8152600401602060405180830381865afa158015620016e8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906200170e91906200290c565b6001600160a01b0316146200173657604051630539b97b60e21b815260040160405180910390fd5b306001600160a01b0316866001600160a01b0316632dd310006040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200177d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190620017a391906200290c565b6001600160a01b031614620017cb57604051630539b97b60e21b815260040160405180910390fd5b846001600160a01b0316866001600160a01b0316826001600160581b03167f7a76ee3d6c40ab211805bcb8ef8f41f0c86929a436491a2520b78930f580202e60405160405180910390a4505050505050565b60605f600880546200182f9062002594565b9050116200184c5760405180602001604052805f815250620006f0565b6008620018598362002019565b6040516020016200186c9291906200292a565b60405160208183030381529060405292915050565b6006546001600160a01b03163314620018ae5760405162461bcd60e51b81526004016200080b906200260c565b600680546001600160a01b0319166001600160a01b03831690811790915560405133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a350565b806001600160a01b0316826001600160a01b0316036200192c57604051634e46966960e11b815260040160405180910390fd5b6001600160a01b0381165f908152600c6020526040902054600a62001953600183620025e2565b81548110620019665762001966620025f8565b5f9182526020909120015460405163f2fde38b60e01b81526001600160a01b0385811660048301529091169063f2fde38b906024015f604051808303815f87803b158015620019b3575f80fd5b505af1158015620019c6573d5f803e3d5ffd5b505050506200093284848362001e33565b6006546001600160a01b0316331462001a045760405162461bcd60e51b81526004016200080b906200260c565b6007547f549bab54c75a364ce0e438a4fbf09df7e6b096bcc83a6f91065a0fc8e410b29a90600160a01b900460ff16801562001a3d5750815b6007805460ff60a01b1916600160a01b92151592830217905560405190815260200162001354565b600d6020525f90815260409020805460018201546002830180546001600160a01b0393841694929093169262001a9b9062002594565b80601f016020809104026020016040519081016040528092919081815260200182805462001ac99062002594565b801562001b185780601f1062001aee5761010080835404028352916020019162001b18565b820191905f5260205f20905b81548152906001019060200180831162001afa57829003601f168201915b5050505050905083565b5f818152600260205260409020546001600160a01b0384811691161462001b795760405162461bcd60e51b815260206004820152600a60248201526957524f4e475f46524f4d60b01b60448201526064016200080b565b6001600160a01b03821662001bc55760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b60448201526064016200080b565b336001600160a01b038416148062001bff57506001600160a01b0383165f90815260056020908152604080832033845290915290205460ff165b8062001c2057505f818152600460205260409020546001600160a01b031633145b62001c5f5760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064016200080b565b6001600160a01b038084165f81815260036020908152604080832080545f19019055938616808352848320805460010190558583526002825284832080546001600160a01b03199081168317909155600490925284832080549092169091559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b03821662001d385760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b60448201526064016200080b565b5f818152600260205260409020546001600160a01b03161562001d8f5760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d3525395115160921b60448201526064016200080b565b6001600160a01b0382165f81815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b5f831562001e2b578360051b8501855b803580851160051b94855260209485185260405f20930181811062001e095750505b501492915050565b62001e408383836200086f565b6001600160a01b0382163b158062001ee95750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401525f608484015290919084169063150b7a029060a4016020604051808303815f875af115801562001eb7573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019062001edd919062002825565b6001600160e01b031916145b62000f3f5760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b60448201526064016200080b565b62001f378585856200086f565b6001600160a01b0384163b158062001fd15750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a029062001f829033908a90899089908990600401620029b7565b6020604051808303815f875af115801562001f9f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019062001fc5919062002825565b6001600160e01b031916145b620020125760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b60448201526064016200080b565b5050505050565b6060815f03620020405750506040805180820190915260018152600360fc1b602082015290565b815f5b81156200206f5780620020568162002a09565b9150620020679050600a8362002a38565b915062002043565b5f8167ffffffffffffffff8111156200208c576200208c62002702565b6040519080825280601f01601f191660200182016040528015620020b7576020820181803683370190505b5090505b84156200212e57620020cf600183620025e2565b9150620020de600a8662002a4e565b620020eb90603062002a64565b60f81b818381518110620021035762002103620025f8565b60200101906001600160f81b03191690815f1a90535062002126600a8662002a38565b9450620020bb565b949350505050565b61017c8062002a7b83390190565b6001600160e01b0319811681146200215a575f80fd5b50565b5f602082840312156200216e575f80fd5b81356200217b8162002144565b9392505050565b5f5b838110156200219e57818101518382015260200162002184565b50505f910152565b5f8151808452620021bf81602086016020860162002182565b601f01601f19169290920160200192915050565b602081525f6200217b6020830184620021a6565b5f60208284031215620021f8575f80fd5b5035919050565b6001600160a01b03811681146200215a575f80fd5b5f806040838503121562002226575f80fd5b82356200223381620021ff565b946020939093013593505050565b5f805f6060848603121562002254575f80fd5b83356200226181620021ff565b925060208401356200227381620021ff565b929592945050506040919091013590565b5f6020828403121562002295575f80fd5b81356200217b81620021ff565b5f805f60608486031215620022b5575f80fd5b833563ffffffff81168114620022c9575f80fd5b9250602084013591506040840135620022e281620021ff565b809150509250925092565b5f805f806060858703121562002301575f80fd5b84356200230e81620021ff565b935060208501359250604085013567ffffffffffffffff8082111562002332575f80fd5b818701915087601f83011262002346575f80fd5b81358181111562002355575f80fd5b8860208260051b85010111156200236a575f80fd5b95989497505060200194505050565b5f8083601f8401126200238a575f80fd5b50813567ffffffffffffffff811115620023a2575f80fd5b602083019150836020828501011115620023ba575f80fd5b9250929050565b5f8060208385031215620023d3575f80fd5b823567ffffffffffffffff811115620023ea575f80fd5b620023f88582860162002379565b90969095509350505050565b8035801515811462000f97575f80fd5b5f806040838503121562002426575f80fd5b82356200243381620021ff565b9150620024436020840162002404565b90509250929050565b5f805f805f6080868803121562002461575f80fd5b85356200246e81620021ff565b945060208601356200248081620021ff565b935060408601359250606086013567ffffffffffffffff811115620024a3575f80fd5b620024b18882890162002379565b969995985093965092949392505050565b5f8060408385031215620024d4575f80fd5b8235620024e181620021ff565b91506020830135620024f381620021ff565b809150509250929050565b5f805f6060848603121562002511575f80fd5b83356200251e81620021ff565b925060208401356200253081620021ff565b91506040840135620022e281620021ff565b5f6020828403121562002553575f80fd5b6200217b8262002404565b6001600160a01b038481168252831660208201526060604082018190525f906200258b90830184620021a6565b95945050505050565b600181811c90821680620025a957607f821691505b602082108103620025c857634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b81810381811115620006f057620006f0620025ce565b634e487b7160e01b5f52603260045260245ffd5b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b5f6020828403121562002643575f80fd5b5051919050565b6001600160a01b0385811682528416602080830191909152604082018490526080606083015282545f918291620026818162002594565b80608087015260a060018084165f8114620026a55760018114620026c257620026f1565b60ff19851660a08a015260a084151560051b8a01019650620026f1565b895f5260205f205f5b85811015620026e85781548b8201860152908301908701620026cb565b8a0160a0019750505b50949b9a5050505050505050505050565b634e487b7160e01b5f52604160045260245ffd5b601f82111562000f3f57805f5260205f20601f840160051c810160208510156200273d5750805b601f840160051c820191505b8181101562002012575f815560010162002749565b67ffffffffffffffff83111562002779576200277962002702565b62002791836200278a835462002594565b8362002716565b5f601f841160018114620027c5575f8515620027ad5750838201355b5f19600387901b1c1916600186901b17835562002012565b5f83815260208120601f198716915b82811015620027f65786850135825560209485019460019092019101620027d4565b508682101562002813575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b5f6020828403121562002836575f80fd5b81516200217b8162002144565b815167ffffffffffffffff81111562002860576200286062002702565b620028788162002871845462002594565b8462002716565b602080601f831160018114620028ae575f8415620028965750858301515b5f19600386901b1c1916600185901b1785556200149e565b5f85815260208120601f198616915b82811015620028de57888601518255948401946001909101908401620028bd565b5085821015620028fc57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f602082840312156200291d575f80fd5b81516200217b81620021ff565b5f808454620029398162002594565b600182811680156200295457600181146200296a5762002998565b60ff198416875282151583028701945062002998565b885f526020805f205f5b858110156200298f5781548a82015290840190820162002974565b50505082870194505b505050508351620029ae81836020880162002182565b01949350505050565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290525f828460a08401375f60a0848401015260a0601f19601f85011683010190509695505050505050565b5f6001820162002a1d5762002a1d620025ce565b5060010190565b634e487b7160e01b5f52601260045260245ffd5b5f8262002a495762002a4962002a24565b500490565b5f8262002a5f5762002a5f62002a24565b500690565b80820180821115620006f057620006f0620025ce56fe608060405260405161017c38038061017c8339810160408190526100229161008d565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2506100ba565b5f6020828403121561009d575f80fd5b81516001600160a01b03811681146100b3575f80fd5b9392505050565b60b6806100c65f395ff3fe608060405236603c57603a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b546001600160a01b03166063565b005b603a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc602c565b365f80375f80365f845af43d5f803e808015607c573d5ff35b3d5ffdfea2646970667358221220eeb8a2fa918a2057b66e1d3fa3930647dc7a4e56c99898cd9e280beec9d9ba9f64736f6c63430008160033a2646970667358221220e698395988fa7accaad7a508c386ad01469d05120d959252300fbfbfb86cb2d964736f6c63430008160033
Loading...
Loading
Loading...
Loading
OVERVIEW
AI Powered Yield Optimizations & Single Click Transactions, 100% DeFiLoading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.