ISecurityTokenFactory.sol

ISecurityTokenFactory

Git Source

Interface for the SecurityTokenFactory contract

Defines the structure for deploying and managing SecurityToken instances

Functions

initialize

Initializes the SecurityTokenFactory

Sets up initial roles and deploys the UpgradeableBeacon

function initialize(address initialAuthority, address initialImplementation) external;

Parameters

Name
Type
Description

initialAuthority

address

Address of the initial admin

initialImplementation

address

Address of the initial SecurityToken implementation contract

getDeploymentAddress

Returns the deterministic deployment address for a given id

function getDeploymentAddress(bytes32 id) external view returns (address);

Parameters

Name
Type
Description

id

bytes32

Unique identifier for the deployment

Returns

Name
Type
Description

<none>

address

The computed address where the SecurityToken would be deployed

deploy

Deploys a new SecurityToken instance

Uses Create2 for deterministic address generation

function deploy(bytes32 id, bytes calldata initData) external returns (address deployment);

Parameters

Name
Type
Description

id

bytes32

Unique identifier for the deployment

initData

bytes

Initialization data for the new SecurityToken instance

Returns

Name
Type
Description

deployment

address

Address of the newly deployed SecurityToken instance

upgradeImplementation

Upgrades the implementation of all deployed SecurityToken instances

Can only be called by addresses with the UPGRADE_ROLE

function upgradeImplementation(address newImplementation) external;

Parameters

Name
Type
Description

newImplementation

address

Address of the new implementation contract

beacon

Returns the address of the SecurityTokenBeacon

function beacon() external view returns (address);

Returns

Name
Type
Description

<none>

address

Address of the SecurityTokenBeacon

implementation

Returns the address of the current SecurityToken implementation

function implementation() external view returns (address);

Returns

Name
Type
Description

<none>

address

Address of the current implementation

Events

SecurityTokenDeployed

Emitted when a new SecurityToken is deployed

event SecurityTokenDeployed(address indexed token);

Parameters

Name
Type
Description

token

address

Address of the newly deployed SecurityToken

ImplementationUpgraded

Emitted when the implementation is upgraded

event ImplementationUpgraded(address indexed oldImplementation, address indexed newImplementation);

Parameters

Name
Type
Description

oldImplementation

address

Address of the previous implementation

newImplementation

address

Address of the new implementation

Last updated