INestorTokensFactory¶
Author: Originally developed by DEFYCA Labs S.a.r.l., maintained by Nestor Exchange OÜ
MIT Licence. Originally Copyright © 2023 DEFYCA Labs S.a.r.l.
Interface defining the token factory for all tokens in the Nestor Protocol.
Functions¶
setTreasuryManager¶
Sets the Treasury Manager to be the specified address.
Parameters
| Name | Type | Description |
|---|---|---|
newTreasuryManager_ |
address |
the address of the treasury manager to set — throws NestorTokensFactoryZeroAddress if the address is zero |
deployFundDepositToken¶
Deploys the NestorFundDepositToken contract as a proxy
function deployFundDepositToken(
address tokenOwner_,
BaseTokenInitParams calldata baseTokenInitParams_,
INestorFundDepositToken.FFDImmutableData calldata initData_
) external returns (address tokenProxyAddr_);
Parameters
| Name | Type | Description |
|---|---|---|
tokenOwner_ |
address |
The owner of the deployed contract |
baseTokenInitParams_ |
BaseTokenInitParams |
the base contract data to deploy a Nestor token contract |
initData_ |
INestorFundDepositToken.FFDImmutableData |
the immutable data for the NestorFundDepositToken |
Returns
| Name | Type | Description |
|---|---|---|
tokenProxyAddr_ |
address |
the address of the deployed token contract — throws NestorTokensFactoryNotATreasuryManager if msg.sender is not the treasury manager — emits NestorTokenDeployed on success |
deployDigitalSecurityToken¶
Deploys the NestorDigitalSecurityToken contract as a proxy
function deployDigitalSecurityToken(
address tokenOwner_,
BaseTokenInitParams calldata baseTokenInitParams_,
INestorDigitalSecurityToken.FDSImmutableData calldata initData_,
INestorDigitalSecurityToken.FDSMutableData calldata updateData_
) external returns (address tokenProxyAddr_);
Parameters
| Name | Type | Description |
|---|---|---|
tokenOwner_ |
address |
The owner of the deployed contract |
baseTokenInitParams_ |
BaseTokenInitParams |
the base contract data to deploy a Nestor token contract |
initData_ |
INestorDigitalSecurityToken.FDSImmutableData |
the immutable data for the NestorDigitalSecurityToken |
updateData_ |
INestorDigitalSecurityToken.FDSMutableData |
the mutable data for the NestorDigitalSecurityToken |
Returns
| Name | Type | Description |
|---|---|---|
tokenProxyAddr_ |
address |
the address of the deployed token contract — throws NestorTokensFactoryNotATreasuryManager if msg.sender is not the treasury manager — emits NestorTokenDeployed on success |
deployOnChainAssetToken¶
Deploys the NestorOnChainAssetToken contract as a proxy
function deployOnChainAssetToken(
address tokenOwner_,
BaseTokenInitParams calldata baseTokenInitParams_,
INestorOnChainAssetToken.FOCASpecData calldata specData_,
INestorOnChainAssetToken.FOCAIssuanceData calldata issuanceData_,
INestorOnChainAssetToken.FOCAUpdateData calldata updateData_
) external returns (address tokenProxyAddr_);
Parameters
| Name | Type | Description |
|---|---|---|
tokenOwner_ |
address |
The owner of the deployed contract |
baseTokenInitParams_ |
BaseTokenInitParams |
the base contract data to deploy a Nestor token contract |
specData_ |
INestorOnChainAssetToken.FOCASpecData |
the immutable specification data for the NestorOnChainAssetToken |
issuanceData_ |
INestorOnChainAssetToken.FOCAIssuanceData |
the immutable issuance data for the NestorOnChainAssetToken |
updateData_ |
INestorOnChainAssetToken.FOCAUpdateData |
the mutable update data for the NestorOnChainAssetToken |
Returns
| Name | Type | Description |
|---|---|---|
tokenProxyAddr_ |
address |
the address of the deployed token contract — throws NestorTokensFactoryNotATreasuryManager if msg.sender is not the treasury manager — emits NestorTokenDeployed on success |
treasuryManager¶
Returns the address of the treasuryManager
existingNestorTokens¶
Checks whether a given token address is an existing Nestor token
Parameters
| Name | Type | Description |
|---|---|---|
tokenAddr_ |
address |
the address of the token to check |
Returns
| Name | Type | Description |
|---|---|---|
<none> |
bool |
A boolean indicating whether the token is an existing Nestor token |
Events¶
NestorTokenDeployed¶
Event emitted upon successful deployment of a token contract.
event NestorTokenDeployed(
IBasicNestorToken.NestorTokenTypes indexed tokenType,
address newTokenContract
);
Errors¶
NestorTokensFactoryZeroAddress¶
Error thrown if an attempt is made to set a zero address during setTreasuryManager
NestorTokensFactoryNotATreasuryManager¶
Error thrown if the msg.sender is not the treasury manager during deployFundDepositToken, deployDigitalSecurityToken, or deployOnChainAssetToken
Structs¶
BaseTokenInitParams¶
Struct representing the base contract data to deploy a Nestor token contract.