ProxyFactory

It's the implementation of ozERC1967Proxy . It inherits Open Zeppelin's UUPSUpgradeable mechanism for upgrading the proxy.

Here is where users' Accounts are created ( ozAccountProxy ), and the Gelato task as well for each Account that will be used by Gelato's PokeMe contract to query each Account in order to know when to start the new transaction.

Github repo here.

Open methods

createNewProxy

Creates an Account.

function createNewProxy(
    struct StorageBeacon.AccountConfig calldata acc_
) external nonReentrant returns(address);

Parameters:

Struct:

struct AccountConfig {
    address user;
    address token;
    uint slippage; 
    string name;
}
Name
Type
Description

user

address

User who created the Account

token

address

Coin the user will receive in L2

slippage

uint256

Slippage used on swaps from ETH to token

name

string

Name of the Account

Function:

Name
Type
Description

acc_

struct StorageBeacon.AccountConfig

Configuration of the Account

Return values:

Type
Description

address

The Account

getOwner

Gets the owner of the Factory.

function getOwner() external view onlyProxy returns(address);

Return values:

Type
Description

address

Owner of the Factory

Owner methods

changeOwner

Changes the owner of the proxy of the Factory.

function changeOwner(address newOwner_) external onlyProxy onlyOwner;

Parameters:

Name
Type
Description

newOwner_

address

New owner of the Factory

System methods

_startTask

function _startTask(address account_) private;

Creates the Gelato task using -in its body- just a generic selector (without arguments) of the bridging function to be called in ozPayMe ( sendToArb )

Name
Type
Description

account_

address

The Account

Last updated