Skip to content

FluidWalletFactory ​

Git Source

Inherits:FluidWalletFactoryVariables, FluidWalletFactoryErrorsAndEvents, UUPSUpgradeable

Functions ​

constructor ​

solidity
constructor(address vaultT1Factory_, address fluidWalletFactoryProxy_, address walletProxy_)
    FluidWalletFactoryVariables(vaultT1Factory_, walletProxy_);

Parameters

NameTypeDescription
vaultT1Factory_address
fluidWalletFactoryProxy_address
walletProxy_addresswallet clone template; an upgrade must pass the live WALLET_PROXY

initialize ​

initializes the contract with owner_ as owner

solidity
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.

solidity
function onERC721Received(address operator_, address from_, uint256 tokenId_, bytes calldata data_)
    external
    returns (bytes4);

Parameters

NameTypeDescription
operator_addressoperator_ caller to transfer the the given token ID
from_addressfrom_ previous owner of the given token ID
tokenId_uint256tokenId_ id of the ERC721
data_bytesdata 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).

solidity
function _forwardNft(address wallet_, uint256 nftId_, address owner_, Action[] memory actions_) internal virtual;

deploy ​

| | Wallet Deployment functions | |__________________________________

solidity
function deploy(address owner_) public returns (address wallet_);

walletImplementation ​

solidity
function walletImplementation() public returns (address);

computeWallet ​

solidity
function computeWallet(address owner_) public view returns (address wallet_);

spell ​

| | Owner related functions | |__________________________________

solidity
function spell(address[] memory targets_, bytes[] memory calldatas_) public onlyOwner;

changeImplementation ​

solidity
function changeImplementation(address implementation_) public onlyOwner;

renounceOwnership ​

override renounce ownership as it could leave the contract in an unwanted state if called by mistake.

solidity
function renounceOwnership() public view override onlyOwner;

receive ​

solidity
receive() external payable;

_authorizeUpgrade ​

rejects logic with a different wallet template once the current one is live: it would orphan every wallet

solidity
function _authorizeUpgrade(address newImplementation) internal virtual override onlyOwner;

Structs ​

Action ​

solidity
struct Action {
    address target;
    bytes data;
    uint256 value;
    uint8 operation;
}

StrategyParams ​

solidity
struct StrategyParams {
    uint256 nftId;
    address owner;
    address wallet;
    Action[] actions;
}