T-REX Factory Interface
The T-REX Factory interface defines the set of functions and events used to deploy and manage the T-REX suite of contracts. Below is a detailed breakdown of each function and event, explaining its purpose, source, and functionality. Additionally, the structs TokenDetails
and ClaimDetails
are defined to provide a comprehensive understanding of how to interact with the T-REX Factory contract.
Structs
TokenDetails
Description: This struct holds all the necessary details for deploying a new T-REX token and its associated contracts.
ClaimDetails
Description: This struct holds all the necessary details regarding the claims and claim issuers.
Deployed
Event
Description: Emitted whenever a single contract is deployed by the factory.
IdFactorySet
Event
Description: Emitted when the Identity Factory is set.
ImplementationAuthoritySet
Event
Description: Emitted when the implementation authority of the factory contract is set.
TREXSuiteDeployed
Event
Description: Emitted by the factory when a full suite of T-REX contracts is deployed.
setImplementationAuthority
Source: ITREXFactory
Description: Sets the implementation authority contract address. This contract contains the addresses of all implementation contracts. The proxies created by the factory will use the different implementations available in the implementation authority contract. Only callable by the owner of the T-REX Factory contract. Emits an ImplementationAuthoritySet
event.
setIdFactory
Source: ITREXFactory
Description: Sets the identity factory contract address. The identity factory contract is used by the T-REX Factory to deploy the ONCHAINID of the token in case the ONCHAINID is not specified. Only callable by the owner of the T-REX Factory contract. Emits an IdFactorySet
event.
deployTREXSuite
Source: ITREXFactory
Description: Deploys a new T-REX token and sets all the parameters as required by the issuer paperwork. This function will deploy and set the Token, Identity Registry (IR), Identity Registry Storage (IRS), Claim Topics Registry (CTR), Trusted Issuers Registry (TIR), and Compliance contracts. All contracts are deployed using the CREATE2 opcode, ensuring that they are deployed at a predetermined address. Only callable by the owner of the T-REX Factory contract. Emits a TREXSuiteDeployed
event.
recoverContractOwnership
Source: ITREXFactory
Description: Recovers the ownership of contracts owned by the factory. Typically used for IRS contracts owned by the factory. Only callable by the owner of the T-REX Factory contract.
getImplementationAuthority
Source: ITREXFactory
Description: Returns the address of the implementation authority contract.
getIdFactory
Source: ITREXFactory
Description: Returns the address of the identity factory contract.
getToken
Source: ITREXFactory
Description: Returns the address of the token corresponding to a given salt string.
Last updated