ERC20FractionWithCallbackDataManager
Contract for managing ERC20 fractions with Callback of an ERC1155 token
WrongParameters
Error thrown when the params are wrong
WrongCaller
Error thrown when the caller is not the fungible fractions data object
UnsupportedCallback
Error thrown when the callback function called is not supported
ContractNotInitialized
Error thrown when the contract is not initialized
_datapoint
DataPoint used in the fungibleFractions data object
fungibleFractionsDO
Fungible Fractions Data Object contract
dataIndex
Data Index implementation
erc1155ID
ERC1155 token ID
onlyFFDO
Modifier to check if the caller is the fungible fractions data object
constructor
initialize
Initializes the ERC20 Fraction Data Manager
__ERC20FractionDataManager_init_unchained
totalSupply
Total supply of the ERC20 token
This function reads the total supply from the fungible fractions data object
NOTE: This total supply is equal to the amount of fractions of the ERC1155 token with the id erc1155ID
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The amount of ERC20 tokens in circulation |
balanceOf
Balance of an account
This function reads the balance of the account from the fungible fractions data object
NOTE: This balance is equal to the amount of fractions of the ERC1155 token with the id erc1155ID
the account has
Parameters
Name | Type | Description |
---|---|---|
account | address | The account to check the balance of |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The amount of ERC20 tokens the account has |
afterFungibleFractionTransfer
Function called after a single id token transfer
Parameters
Name | Type | Description |
---|---|---|
from | address | The address from which the token was transferred |
to | address | The address to which the token was transferred |
uint256 | ||
value | uint256 | The amount of the token transferred |
afterFungibleFractionTransfer
Function called after a batch of id tokens transfer
Parameters
Name | Type | Description |
---|---|---|
address | ||
address | ||
uint256[] | ||
uint256[] |