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.
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;
}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:
acc_
struct StorageBeacon.AccountConfig
Configuration of the Account
Return values:
address
The Account
getOwner
Gets the owner of the Factory.
function getOwner() external view onlyProxy returns(address);Return values:
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:
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 )
account_
address
The Account
Last updated