Appearance
Solidity API
TradeToken3643Factory
_Factory contract for deploying TradeToken3643 contract using CREATE2.
This implementation provides a way to deterministically deploy TradeToken3643 contract using the CREATE2 opcode.
The factory can deploy different types of TradeToken3643 contract based on the TradeTokenType enum defined in the TradeToken3643 contract._
TradeToken3643Created
solidity
event TradeToken3643Created(address deployedAddress, bytes32 salt)
Emitted when a new TradeToken3643 contract is created.
Parameters
Name | Type | Description |
---|---|---|
deployedAddress | address | The address of the newly deployed TradeToken3643 contract |
salt | bytes32 | The salt value used in CREATE2 deployment |
TradeToken3643Create2Failed
solidity
error TradeToken3643Create2Failed()
Error thrown when the CREATE2 deployment fails
deployTradeToken3643FromFactory
solidity
function deployTradeToken3643FromFactory(enum TradeToken3643.TradeTokenType _tradeTokenType, bytes32 salt) public returns (address)
_Deploys a new TradeToken3643 contract using CREATE2.
This function creates a new TradeToken3643 contract with the specified parameters. The address of the deployed contract is deterministic and depends on the salt value.
Requirements:
- The deployment must not fail
- The salt value must not have been used before_
Parameters
Name | Type | Description |
---|---|---|
_tradeTokenType | enum TradeToken3643.TradeTokenType | The type of TradeToken3643 to deploy |
salt | bytes32 | A unique value used to determine the contract address |
Return Values
Name | Type | Description |
---|---|---|
[0] | address | deployedAddress The address of the newly deployed TradeToken3643 contract |