TeamSmartWalletFactory

This contract is a factory contract for creating and managing Smart Wallets for teams.

IMPLEMENTATION_PROVIDER_ROLE

bytes32 IMPLEMENTATION_PROVIDER_ROLE

DEPLOYER_ROLE

bytes32 DEPLOYER_ROLE

marketHub

address marketHub

implementations

mapping(bytes32 => address) implementations

helperImplementations

mapping(bytes32 => address) helperImplementations

SmartWalletProxyCreated

Emitted when a new TeamSmartWallet proxy is deployed

HelperProxyCloneCreated

Emitted when a new TeamSmartWallet proxy is deployed

AssignedSmartWalletProxyImplementation

Emitted when a TeamSmartWallet proxy is assigned to a implementation

RegisteredSmartWalletImplementation

Emitted when a new implementation of a TeamSmartWallet is registered

RegisteredHelperImplementation

Emitted when a new implementation of a TeamSmartWallet is registered

constructor

initialize

Initializes the contract.

Parameters

Name
Type
Description

_marketHub

address

The address of the MarketHub contract.

registerSmartWalletImplementation

Registers a new Smart Wallet contract implementation.

Parameters

Name
Type
Description

_key

bytes32

A unique identifier for the implementation.

_implementation

address

The address of the Smart Wallet implementation contract.

registerHelperImplementation

Registers a new Smart Wallet contract implementation.

Parameters

Name
Type
Description

_key

bytes32

A unique identifier for the implementation.

_implementation

address

The address of the Smart Wallet implementation contract.

deploySmartWalletProxy

Deploys a new Smart Wallet contract.

Parameters

Name
Type
Description

_admin

address

The address of the admin of the new Smart Wallet.

_implementationKey

bytes32

The unique identifier for the implementation to use.

Return Values

Name
Type
Description

[0]

address

The address of the newly deployed Smart Wallet.

deployHelperProxyClone

Deploys a new Smart Wallet helper contract.

Parameters

Name
Type
Description

_teamSmartWallet

address

The address of the smart wallet associated with

_implementationKey

bytes32

The unique identifier for the help implementation to clone.

Return Values

Name
Type
Description

[0]

address

The address of the newly deployed Smart Wallet.

upgradeSmartWalletProxy

Upgrades the implementation of a Smart Wallet contract.

Parameters

Name
Type
Description

_proxy

address

The address of the Smart Wallet to upgrade.

_implementationKey

bytes32

The unique identifier for the new implementation to use.

upgradeAndCallSmartWalletProxy

Upgrades the implementation of a Smart Wallet contract and calls a function on the new implementation.

Parameters

Name
Type
Description

_proxy

address

The address of the Smart Wallet to upgrade.

_implementationKey

bytes32

The unique identifier for the new implementation to use.

_data

bytes

The calldata to send to the new implementation.

_authorizeUpgrade

Checks if the caller has the admin role.

Parameters

Name
Type
Description

newImplementation

address

The address of the new implementation.

Last updated