编译器
0.8.21+commit.d9974bed
文件 1 的 6:ERC721.sol
pragma solidity 0.8.21;
import { ErrorTypes } from "../../errorTypes.sol";
import { Error } from "../../error.sol";
abstract contract ERC721 is Error {
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);
string public name;
string public symbol;
function tokenURI(uint256 id) public view virtual returns (string memory);
mapping(uint256 => uint256) internal _tokenConfig;
mapping(address => mapping(uint256 => uint256)) internal _ownerConfig;
function ownerOf(uint256 id_) public view virtual returns (address owner_) {
if ((owner_ = address(uint160(_tokenConfig[id_]))) == address(0))
revert FluidVaultError(ErrorTypes.ERC721__InvalidParams);
}
function balanceOf(address owner_) public view virtual returns (uint256) {
if (owner_ == address(0)) revert FluidVaultError(ErrorTypes.ERC721__InvalidParams);
return _ownerConfig[owner_][0] & type(uint32).max;
}
uint256 public totalSupply;
mapping(uint256 => address) public getApproved;
mapping(address => mapping(address => bool)) public isApprovedForAll;
constructor(string memory _name, string memory _symbol) {
name = _name;
symbol = _symbol;
}
function approve(address spender_, uint256 id_) public virtual {
address owner_ = address(uint160(_tokenConfig[id_]));
if (!(msg.sender == owner_ || isApprovedForAll[owner_][msg.sender]))
revert FluidVaultError(ErrorTypes.ERC721__Unauthorized);
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 {
uint256 tokenConfig_ = _tokenConfig[id_];
if (from_ != address(uint160(tokenConfig_))) revert FluidVaultError(ErrorTypes.ERC721__InvalidParams);
if (!(msg.sender == from_ || isApprovedForAll[from_][msg.sender] || msg.sender == getApproved[id_]))
revert FluidVaultError(ErrorTypes.ERC721__Unauthorized);
_transfer(from_, to_, id_, (tokenConfig_ >> 192) & type(uint32).max);
delete getApproved[id_];
emit Transfer(from_, to_, id_);
}
function safeTransferFrom(address from_, address to_, uint256 id_) public virtual {
transferFrom(from_, to_, id_);
if (
!(to_.code.length == 0 ||
ERC721TokenReceiver(to_).onERC721Received(msg.sender, from_, id_, "") ==
ERC721TokenReceiver.onERC721Received.selector)
) revert FluidVaultError(ErrorTypes.ERC721__UnsafeRecipient);
}
function safeTransferFrom(address from_, address to_, uint256 id_, bytes calldata data_) public virtual {
transferFrom(from_, to_, id_);
if (
!((to_.code.length == 0) ||
ERC721TokenReceiver(to_).onERC721Received(msg.sender, from_, id_, data_) ==
ERC721TokenReceiver.onERC721Received.selector)
) revert FluidVaultError(ErrorTypes.ERC721__UnsafeRecipient);
}
function tokenByIndex(uint256 index_) external view returns (uint256) {
if (index_ >= totalSupply) {
revert FluidVaultError(ErrorTypes.ERC721__OutOfBoundsIndex);
}
return index_ + 1;
}
function tokenOfOwnerByIndex(address owner_, uint256 index_) external view returns (uint256) {
if (index_ >= balanceOf(owner_)) {
revert FluidVaultError(ErrorTypes.ERC721__OutOfBoundsIndex);
}
index_ = index_ + 1;
return (_ownerConfig[owner_][index_ / 8] >> ((index_ % 8) * 32)) & type(uint32).max;
}
function supportsInterface(bytes4 interfaceId_) public view virtual returns (bool) {
return
interfaceId_ == 0x01ffc9a7 ||
interfaceId_ == 0x80ac58cd ||
interfaceId_ == 0x5b5e139f ||
interfaceId_ == 0x780e9d63;
}
function _transfer(address from_, address to_, uint256 id_, uint256 vaultId_) internal {
if (to_ == address(0)) {
revert FluidVaultError(ErrorTypes.ERC721__InvalidOperation);
} else if (from_ == address(0)) {
_add(to_, id_, vaultId_);
} else if (to_ != from_) {
_remove(from_, id_);
_add(to_, id_, vaultId_);
}
}
function _add(address user_, uint256 id_, uint256 vaultId_) private {
uint256 ownerConfig_ = _ownerConfig[user_][0];
unchecked {
uint256 balanceOf_ = (ownerConfig_ & type(uint32).max) + 1;
_tokenConfig[id_] = (uint160(user_) | (balanceOf_ << 160) | (vaultId_ << 192));
_ownerConfig[user_][0] = (ownerConfig_ & ~uint256(type(uint32).max)) | (balanceOf_);
uint256 wordIndex_ = (balanceOf_ / 8);
_ownerConfig[user_][wordIndex_] = _ownerConfig[user_][wordIndex_] | (id_ << ((balanceOf_ % 8) * 32));
}
}
function _remove(address user_, uint256 id_) private {
uint256 temp_ = _tokenConfig[id_];
uint256 tokenIndex_ = (temp_ >> 160) & type(uint32).max;
_tokenConfig[id_] = 0;
temp_ = _ownerConfig[user_][0];
uint256 lastTokenIndex_ = (temp_ & type(uint32).max);
_ownerConfig[user_][0] = (temp_ & ~uint256(type(uint32).max)) | (lastTokenIndex_ - 1);
{
unchecked {
uint256 lastTokenWordIndex_ = (lastTokenIndex_ / 8);
uint256 lastTokenBitShift_ = (lastTokenIndex_ % 8) * 32;
temp_ = _ownerConfig[user_][lastTokenWordIndex_];
if (lastTokenIndex_ != tokenIndex_) {
uint256 wordIndex_ = (tokenIndex_ / 8);
uint256 bitShift_ = (tokenIndex_ % 8) * 32;
uint256 lastTokenId_ = uint256((temp_ >> lastTokenBitShift_) & type(uint32).max);
if (wordIndex_ == lastTokenWordIndex_) {
temp_ = (temp_ & ~(uint256(type(uint32).max) << bitShift_)) | (lastTokenId_ << bitShift_);
} else {
_ownerConfig[user_][wordIndex_] =
(_ownerConfig[user_][wordIndex_] & ~(uint256(type(uint32).max) << bitShift_)) |
(lastTokenId_ << bitShift_);
}
_tokenConfig[lastTokenId_] =
(_tokenConfig[lastTokenId_] & ~(uint256(type(uint32).max) << 160)) |
(tokenIndex_ << 160);
}
_ownerConfig[user_][lastTokenWordIndex_] = temp_ & ~(uint256(type(uint32).max) << lastTokenBitShift_);
}
}
}
function _mint(address to_, uint256 vaultId_) internal virtual returns (uint256 id_) {
unchecked {
++totalSupply;
}
id_ = totalSupply;
if (id_ >= type(uint32).max || _tokenConfig[id_] != 0) revert FluidVaultError(ErrorTypes.ERC721__InvalidParams);
_transfer(address(0), to_, id_, vaultId_);
emit Transfer(address(0), to_, id_);
}
}
abstract contract ERC721TokenReceiver {
function onERC721Received(address, address, uint256, bytes calldata) external virtual returns (bytes4) {
return ERC721TokenReceiver.onERC721Received.selector;
}
}
文件 2 的 6:Owned.sol
pragma solidity >=0.8.0;
abstract contract Owned {
event OwnershipTransferred(address indexed user, address indexed newOwner);
address public owner;
modifier onlyOwner() virtual {
require(msg.sender == owner, "UNAUTHORIZED");
_;
}
constructor(address _owner) {
owner = _owner;
emit OwnershipTransferred(address(0), _owner);
}
function transferOwnership(address newOwner) public virtual onlyOwner {
owner = newOwner;
emit OwnershipTransferred(msg.sender, newOwner);
}
}
文件 3 的 6:error.sol
pragma solidity 0.8.21;
contract Error {
error FluidVaultError(uint256 errorId_);
error FluidLiquidateResult(uint256 colLiquidated, uint256 debtLiquidated);
}
文件 4 的 6:errorTypes.sol
pragma solidity 0.8.21;
library ErrorTypes {
uint256 internal constant VaultFactory__InvalidOperation = 30001;
uint256 internal constant VaultFactory__Unauthorized = 30002;
uint256 internal constant VaultFactory__SameTokenNotAllowed = 30003;
uint256 internal constant VaultFactory__InvalidParams = 30004;
uint256 internal constant VaultFactory__InvalidVault = 30005;
uint256 internal constant VaultFactory__InvalidVaultAddress = 30006;
uint256 internal constant VaultFactory__OnlyDelegateCallAllowed = 30007;
uint256 internal constant VaultT1__AlreadyEntered = 31001;
uint256 internal constant VaultT1__InvalidOperateAmount = 31002;
uint256 internal constant VaultT1__InvalidMsgValueOperate = 31003;
uint256 internal constant VaultT1__NotAnOwner = 31004;
uint256 internal constant VaultT1__TickIsEmpty = 31005;
uint256 internal constant VaultT1__PositionAboveCF = 31006;
uint256 internal constant VaultT1__TopTickDoesNotExist = 31007;
uint256 internal constant VaultT1__InvalidMsgValueLiquidate = 31008;
uint256 internal constant VaultT1__ExcessSlippageLiquidation = 31009;
uint256 internal constant VaultT1__NotRebalancer = 31010;
uint256 internal constant VaultT1__NftNotOfThisVault = 31011;
uint256 internal constant VaultT1__TokenNotInitialized = 31012;
uint256 internal constant VaultT1__NotAnAuth = 31013;
uint256 internal constant VaultT1__ExcessCollateralWithdrawal = 31014;
uint256 internal constant VaultT1__ExcessDebtPayback = 31015;
uint256 internal constant VaultT1__WithdrawMoreThanOperateLimit = 31016;
uint256 internal constant VaultT1__InvalidLiquidityCallbackAddress = 31017;
uint256 internal constant VaultT1__NotEntered = 31018;
uint256 internal constant VaultT1__OnlyDelegateCallAllowed = 31019;
uint256 internal constant VaultT1__TransferFromFailed = 31020;
uint256 internal constant VaultT1__ExchangePriceOverFlow = 31021;
uint256 internal constant VaultT1__InvalidLiquidationAmt = 31022;
uint256 internal constant VaultT1__UserCollateralDebtExceed = 31023;
uint256 internal constant VaultT1__BranchDebtTooLow = 31024;
uint256 internal constant VaultT1__TickDebtTooLow = 31025;
uint256 internal constant VaultT1__LiquidityExchangePriceUnexpected = 31026;
uint256 internal constant VaultT1__UserDebtTooLow = 31027;
uint256 internal constant VaultT1__InvalidPaybackOrDeposit = 31028;
uint256 internal constant VaultT1__InvalidLiquidation = 31029;
uint256 internal constant VaultT1__InvalidMsgValueInRebalance = 31030;
uint256 internal constant VaultT1__NothingToRebalance = 31031;
uint256 internal constant ERC721__InvalidParams = 32001;
uint256 internal constant ERC721__Unauthorized = 32002;
uint256 internal constant ERC721__InvalidOperation = 32003;
uint256 internal constant ERC721__UnsafeRecipient = 32004;
uint256 internal constant ERC721__OutOfBoundsIndex = 32005;
uint256 internal constant VaultT1Admin__ValueAboveLimit = 33001;
uint256 internal constant VaultT1Admin__OnlyDelegateCallAllowed = 33002;
uint256 internal constant VaultT1Admin__NftIdShouldBeNonZero = 33003;
uint256 internal constant VaultT1Admin__NftNotOfThisVault = 33004;
uint256 internal constant VaultT1Admin__DustDebtIsZero = 33005;
uint256 internal constant VaultT1Admin__FinalDebtShouldBeZero = 33006;
uint256 internal constant VaultT1Admin__NftNotLiquidated = 33007;
uint256 internal constant VaultT1Admin__AbsorbedDustDebtIsZero = 33008;
uint256 internal constant VaultT1Admin__AddressZeroNotAllowed = 33009;
uint256 internal constant VaultRewards__Unauthorized = 34001;
uint256 internal constant VaultRewards__AddressZero = 34002;
uint256 internal constant VaultRewards__InvalidParams = 34003;
uint256 internal constant VaultRewards__NewMagnifierSameAsOldMagnifier = 34004;
uint256 internal constant VaultRewards__NotTheInitiator = 34005;
uint256 internal constant VaultRewards__AlreadyStarted = 34006;
uint256 internal constant VaultRewards__RewardsNotStartedOrEnded = 34007;
}
文件 5 的 6:main.sol
pragma solidity 0.8.21;
import { Owned } from "solmate/src/auth/Owned.sol";
import { ERC721 } from "./ERC721/ERC721.sol";
import { ErrorTypes } from "../errorTypes.sol";
import { StorageRead } from "../../../libraries/storageRead.sol";
abstract contract VaultFactoryVariables is Owned, ERC721, StorageRead {
string internal constant ERC721_NAME = "Fluid Vault";
string internal constant ERC721_SYMBOL = "fVLT";
mapping(address => bool) internal _deployers;
mapping(address => bool) internal _globalAuths;
mapping(address => mapping(address => bool)) internal _vaultAuths;
uint256 internal _totalVaults;
mapping(address => bool) internal _vaultDeploymentLogics;
constructor(address owner_) Owned(owner_) ERC721(ERC721_NAME, ERC721_SYMBOL) {}
}
abstract contract VaultFactoryEvents {
event VaultDeployed(address indexed vault, uint256 indexed vaultId);
event NewPositionMinted(address indexed vault, address indexed user, uint256 indexed tokenId);
event LogSetDeployer(address indexed deployer, bool indexed allowed);
event LogSetGlobalAuth(address indexed globalAuth, bool indexed allowed);
event LogSetVaultAuth(address indexed vaultAuth, bool indexed allowed, address indexed vault);
event LogSetVaultDeploymentLogic(address indexed vaultDeploymentLogic, bool indexed allowed);
}
abstract contract VaultFactoryCore is VaultFactoryVariables, VaultFactoryEvents {
constructor(address owner_) validAddress(owner_) VaultFactoryVariables(owner_) {}
modifier validAddress(address value_) {
if (value_ == address(0)) {
revert FluidVaultError(ErrorTypes.VaultFactory__InvalidParams);
}
_;
}
}
abstract contract VaultFactoryAuth is VaultFactoryCore {
function setDeployer(address deployer_, bool allowed_) external onlyOwner validAddress(deployer_) {
_deployers[deployer_] = allowed_;
emit LogSetDeployer(deployer_, allowed_);
}
function setGlobalAuth(address globalAuth_, bool allowed_) external onlyOwner validAddress(globalAuth_) {
_globalAuths[globalAuth_] = allowed_;
emit LogSetGlobalAuth(globalAuth_, allowed_);
}
function setVaultAuth(
address vault_,
address vaultAuth_,
bool allowed_
) external onlyOwner validAddress(vaultAuth_) {
_vaultAuths[vault_][vaultAuth_] = allowed_;
emit LogSetVaultAuth(vaultAuth_, allowed_, vault_);
}
function setVaultDeploymentLogic(
address deploymentLogic_,
bool allowed_
) public onlyOwner validAddress(deploymentLogic_) {
_vaultDeploymentLogics[deploymentLogic_] = allowed_;
emit LogSetVaultDeploymentLogic(deploymentLogic_, allowed_);
}
function spell(address target_, bytes memory data_) external onlyOwner returns (bytes memory response_) {
assembly {
let succeeded := delegatecall(gas(), target_, add(data_, 0x20), mload(data_), 0, 0)
let size := returndatasize()
response_ := mload(0x40)
mstore(0x40, add(response_, and(add(add(size, 0x20), 0x1f), not(0x1f))))
mstore(response_, size)
returndatacopy(add(response_, 0x20), 0, size)
switch iszero(succeeded)
case 1 {
returndatacopy(0x00, 0x00, size)
revert(0x00, size)
}
}
}
function isDeployer(address deployer_) public view returns (bool) {
return _deployers[deployer_] || owner == deployer_;
}
function isGlobalAuth(address globalAuth_) public view returns (bool) {
return _globalAuths[globalAuth_] || owner == globalAuth_;
}
function isVaultAuth(address vault_, address vaultAuth_) public view returns (bool) {
return _vaultAuths[vault_][vaultAuth_] || owner == vaultAuth_;
}
function isVaultDeploymentLogic(address vaultDeploymentLogic_) public view returns (bool) {
return _vaultDeploymentLogics[vaultDeploymentLogic_];
}
}
abstract contract VaultFactoryDeployment is VaultFactoryCore, VaultFactoryAuth {
function _deploy(bytes memory bytecode_) internal returns (address address_) {
if (bytecode_.length == 0) {
revert FluidVaultError(ErrorTypes.VaultFactory__InvalidOperation);
}
assembly {
address_ := create(0, add(bytecode_, 0x20), mload(bytecode_))
}
if (address_ == address(0)) {
revert FluidVaultError(ErrorTypes.VaultFactory__InvalidOperation);
}
}
function deployVault(
address vaultDeploymentLogic_,
bytes calldata vaultDeploymentData_
) external returns (address vault_) {
if (!isDeployer(msg.sender)) revert FluidVaultError(ErrorTypes.VaultFactory__Unauthorized);
if (!isVaultDeploymentLogic(vaultDeploymentLogic_))
revert FluidVaultError(ErrorTypes.VaultFactory__Unauthorized);
uint256 vaultId_ = ++_totalVaults;
vault_ = getVaultAddress(vaultId_);
(bool success_, bytes memory data_) = vaultDeploymentLogic_.delegatecall(vaultDeploymentData_);
if (!(success_ && vault_ == _deploy(abi.decode(data_, (bytes))) && isVault(vault_))) {
revert FluidVaultError(ErrorTypes.VaultFactory__InvalidVaultAddress);
}
emit VaultDeployed(vault_, vaultId_);
}
function getVaultAddress(uint256 vaultId_) public view returns (address vault_) {
bytes memory data;
if (vaultId_ == 0x00) {
return address(0);
} else if (vaultId_ <= 0x7f) {
data = abi.encodePacked(bytes1(0xd6), bytes1(0x94), address(this), uint8(vaultId_));
} else if (vaultId_ <= 0xff) {
data = abi.encodePacked(bytes1(0xd7), bytes1(0x94), address(this), bytes1(0x81), uint8(vaultId_));
} else if (vaultId_ <= 0xffff) {
data = abi.encodePacked(bytes1(0xd8), bytes1(0x94), address(this), bytes1(0x82), uint16(vaultId_));
} else if (vaultId_ <= 0xffffff) {
data = abi.encodePacked(bytes1(0xd9), bytes1(0x94), address(this), bytes1(0x83), uint24(vaultId_));
} else {
data = abi.encodePacked(bytes1(0xda), bytes1(0x94), address(this), bytes1(0x84), uint32(vaultId_));
}
return address(uint160(uint256(keccak256(data))));
}
function isVault(address vault_) public view returns (bool) {
if (vault_.code.length == 0) {
return false;
} else {
(bool success_, bytes memory data_) = vault_.staticcall(hex"540acabc");
return success_ && vault_ == getVaultAddress(abi.decode(data_, (uint256)));
}
}
function totalVaults() external view returns (uint256) {
return _totalVaults;
}
}
abstract contract VaultFactoryERC721 is VaultFactoryCore, VaultFactoryDeployment {
function mint(uint256 vaultId_, address user_) external returns (uint256 tokenId_) {
if (msg.sender != getVaultAddress(vaultId_)) revert FluidVaultError(ErrorTypes.VaultFactory__InvalidVault);
tokenId_ = _mint(user_, vaultId_);
emit NewPositionMinted(msg.sender, user_, tokenId_);
}
function tokenURI(uint256 id_) public view virtual override returns (string memory) {
return "";
}
}
contract FluidVaultFactory is VaultFactoryCore, VaultFactoryAuth, VaultFactoryDeployment, VaultFactoryERC721 {
constructor(address owner_) VaultFactoryCore(owner_) {}
}
文件 6 的 6:storageRead.sol
pragma solidity 0.8.21;
contract StorageRead {
function readFromStorage(bytes32 slot_) public view returns (uint256 result_) {
assembly {
result_ := sload(slot_)
}
}
}
{
"compilationTarget": {
"contracts/protocols/vault/factory/main.sol": "FluidVaultFactory"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 10000000
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"colLiquidated","type":"uint256"},{"internalType":"uint256","name":"debtLiquidated","type":"uint256"}],"name":"FluidLiquidateResult","type":"error"},{"inputs":[{"internalType":"uint256","name":"errorId_","type":"uint256"}],"name":"FluidVaultError","type":"error"},{"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":"deployer","type":"address"},{"indexed":true,"internalType":"bool","name":"allowed","type":"bool"}],"name":"LogSetDeployer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"globalAuth","type":"address"},{"indexed":true,"internalType":"bool","name":"allowed","type":"bool"}],"name":"LogSetGlobalAuth","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vaultAuth","type":"address"},{"indexed":true,"internalType":"bool","name":"allowed","type":"bool"},{"indexed":true,"internalType":"address","name":"vault","type":"address"}],"name":"LogSetVaultAuth","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vaultDeploymentLogic","type":"address"},{"indexed":true,"internalType":"bool","name":"allowed","type":"bool"}],"name":"LogSetVaultDeploymentLogic","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NewPositionMinted","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":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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":true,"internalType":"uint256","name":"vaultId","type":"uint256"}],"name":"VaultDeployed","type":"event"},{"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":[{"internalType":"address","name":"vaultDeploymentLogic_","type":"address"},{"internalType":"bytes","name":"vaultDeploymentData_","type":"bytes"}],"name":"deployVault","outputs":[{"internalType":"address","name":"vault_","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"vaultId_","type":"uint256"}],"name":"getVaultAddress","outputs":[{"internalType":"address","name":"vault_","type":"address"}],"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":[{"internalType":"address","name":"deployer_","type":"address"}],"name":"isDeployer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"globalAuth_","type":"address"}],"name":"isGlobalAuth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault_","type":"address"}],"name":"isVault","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault_","type":"address"},{"internalType":"address","name":"vaultAuth_","type":"address"}],"name":"isVaultAuth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vaultDeploymentLogic_","type":"address"}],"name":"isVaultDeploymentLogic","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"vaultId_","type":"uint256"},{"internalType":"address","name":"user_","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"stateMutability":"nonpayable","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":"bytes32","name":"slot_","type":"bytes32"}],"name":"readFromStorage","outputs":[{"internalType":"uint256","name":"result_","type":"uint256"}],"stateMutability":"view","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":"operator_","type":"address"},{"internalType":"bool","name":"approved_","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"deployer_","type":"address"},{"internalType":"bool","name":"allowed_","type":"bool"}],"name":"setDeployer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"globalAuth_","type":"address"},{"internalType":"bool","name":"allowed_","type":"bool"}],"name":"setGlobalAuth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault_","type":"address"},{"internalType":"address","name":"vaultAuth_","type":"address"},{"internalType":"bool","name":"allowed_","type":"bool"}],"name":"setVaultAuth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"deploymentLogic_","type":"address"},{"internalType":"bool","name":"allowed_","type":"bool"}],"name":"setVaultDeploymentLogic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target_","type":"address"},{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"spell","outputs":[{"internalType":"bytes","name":"response_","type":"bytes"}],"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":"index_","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"uint256","name":"index_","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalVaults","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"}]