FluidWalletFactory ​
Inherits:FluidWalletFactoryVariables, FluidWalletFactoryErrorsAndEvents, UUPSUpgradeable
Functions ​
constructor ​
constructor(address vaultT1Factory_, address fluidWalletFactoryProxy_, address walletProxy_)
FluidWalletFactoryVariables(vaultT1Factory_, walletProxy_);Parameters
| Name | Type | Description |
|---|---|---|
vaultT1Factory_ | address | |
fluidWalletFactoryProxy_ | address | |
walletProxy_ | address | wallet clone template; an upgrade must pass the live WALLET_PROXY |
initialize ​
initializes the contract with owner_ as owner
function initialize(address owner_) public initializer;onERC721Received ​
| | Action Execution | |__________________________________
ERC721 callback used Fluid Vault Factory and executes actions encoded in data_ Caller should be Vault T1 Factory.
function onERC721Received(address operator_, address from_, uint256 tokenId_, bytes calldata data_)
external
returns (bytes4);Parameters
| Name | Type | Description |
|---|---|---|
operator_ | address | operator_ caller to transfer the the given token ID |
from_ | address | from_ previous owner of the given token ID |
tokenId_ | uint256 | tokenId_ id of the ERC721 |
data_ | bytes | data bytes containing the abi.encoded() actions that are executed like in Action[] |
_forwardNft ​
forwards the received NFT to the user's wallet clone, passing owner + actions to the wallet's onERC721Received (overridable, e.g. permissioned variant uses the gated safe transfer).
function _forwardNft(address wallet_, uint256 nftId_, address owner_, Action[] memory actions_) internal virtual;deploy ​
| | Wallet Deployment functions | |__________________________________
function deploy(address owner_) public returns (address wallet_);walletImplementation ​
function walletImplementation() public returns (address);computeWallet ​
function computeWallet(address owner_) public view returns (address wallet_);spell ​
| | Owner related functions | |__________________________________
function spell(address[] memory targets_, bytes[] memory calldatas_) public onlyOwner;changeImplementation ​
function changeImplementation(address implementation_) public onlyOwner;renounceOwnership ​
override renounce ownership as it could leave the contract in an unwanted state if called by mistake.
function renounceOwnership() public view override onlyOwner;receive ​
receive() external payable;_authorizeUpgrade ​
rejects logic with a different wallet template once the current one is live: it would orphan every wallet
function _authorizeUpgrade(address newImplementation) internal virtual override onlyOwner;Structs ​
Action ​
struct Action {
address target;
bytes data;
uint256 value;
uint8 operation;
}StrategyParams ​
struct StrategyParams {
uint256 nftId;
address owner;
address wallet;
Action[] actions;
}