function createTOFT(address _erc20, bytes _bytecode, bytes32 _salt, bool _linked) external nonpayable
Deploy a new TOFT contract. Callable only by the owner.
Name | Type | Description |
---|---|---|
_erc20 | address | The ERC20 to wrap. |
_bytecode | bytes | The executable bytecode of the TOFT contract. |
_salt | bytes32 | Create2 salt. |
_linked | bool | undefined |
function executeCalls(TapiocaWrapper.ExecutionCall[] _call) external payable returns (bool success, bytes[] results)
Name | Type | Description |
---|---|---|
_call | TapiocaWrapper.ExecutionCall[] | undefined |
Name | Type | Description |
---|---|---|
success | bool | undefined |
results | bytes[] | undefined |
function executeTOFT(address _toft, bytes _bytecode, bool _revertOnFailure) external payable returns (bool success, bytes result)
Execute the _bytecode
against the _toft
. Callable only by the owner.
Used to call derived OFT functions to a TOFT contract.
Name | Type | Description |
---|---|---|
_toft | address | The TOFT contract to execute against. |
_bytecode | bytes | The executable bytecode of the TOFT contract. |
_revertOnFailure | bool | Whether to revert on failure. |
Name | Type | Description |
---|---|---|
success | bool | If the execution was successful. |
result | bytes | The error message if the execution failed. |
function harvestFees() external nonpayable
Harvest fees from all the deployed TOFT contracts. Fees are transferred to the owner.
function harvestableTapiocaOFTsLength() external view returns (uint256)
Return the number of harvestable TOFT contracts deployed on the current chain.
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
function lastTOFT() external view returns (contract ITapiocaOFT)
Return the latest TOFT contract deployed on the current chain.
Name | Type | Description |
---|---|---|
_0 | contract ITapiocaOFT | undefined |
function owner() external view returns (address)
Returns the address of the current owner.
Name | Type | Description |
---|---|---|
_0 | address | undefined |
function renounceOwnership() external nonpayable
Leaves the contract without owner. It will not be possible to call onlyOwner
functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
function tapiocaOFTLength() external view returns (uint256)
Return the number of TOFT contracts deployed on the current chain.
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
function tapiocaOFTs(uint256) external view returns (contract ITapiocaOFT)
Array of deployed TOFT contracts.
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
Name | Type | Description |
---|---|---|
_0 | contract ITapiocaOFT | undefined |
function tapiocaOFTsByErc20(address) external view returns (contract ITapiocaOFT)
Map of deployed TOFT contracts by ERC20.
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Name | Type | Description |
---|---|---|
_0 | contract ITapiocaOFT | undefined |
function transferOwnership(address newOwner) external nonpayable
Transfers ownership of the contract to a new account (newOwner
). Can only be called by the current owner.
Name | Type | Description |
---|---|---|
newOwner | address | undefined |
event CreateOFT(contract ITapiocaOFT indexed _tapiocaOFT, address indexed _erc20)
Called when a new OFT is deployed.
Name | Type | Description |
---|---|---|
_tapiocaOFT indexed |
contract ITapiocaOFT | undefined |
_erc20 indexed |
address | undefined |
event HarvestFees(address indexed _caller)
Called when fees are harvested.
Name | Type | Description |
---|---|---|
_caller indexed |
address | undefined |
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Name | Type | Description |
---|---|---|
previousOwner indexed |
address | undefined |
newOwner indexed |
address | undefined |
event SetFees(uint256 _newFee)
Called when fees are changed.
Name | Type | Description |
---|---|---|
_newFee | uint256 | undefined |
error TapiocaWrapper__AlreadyDeployed(address _erc20)
If the TOFT is already deployed.
Name | Type | Description |
---|---|---|
_erc20 | address | undefined |
error TapiocaWrapper__FailedDeploy()
Failed to deploy the TapiocaWrapper contract.
error TapiocaWrapper__MngmtFeeTooHigh()
The management fee is too high. Currently set to a max of 50 BPS or 0.5%.
error TapiocaWrapper__NoTOFTDeployed()
No TOFT has been deployed yet.
error TapiocaWrapper__TOFTExecutionFailed(bytes message)
The TapiocaOFT execution failed.
Name | Type | Description |
---|---|---|
message | bytes | undefined |