ODCinterfacesdataManagersfractionalizers

ISemiFungibleFraction

NonGenesisId

error NonGenesisId(uint256 id, uint256 upperGenesisId)

burnMintAndPartiallyUnwrap

function burnMintAndPartiallyUnwrap(uint256 fractionsToHandle, uint256 burnId, uint256 mintId, address account, address[] tokens, uint256[] ids, uint256[] values) external

Allows contract owner to burn, mint and partially unwrap assets depending on specific ids and amounts

Parameters

NameTypeDescription
fractionsToHandleuint256The amount of fractions to burn for burnId and mint of mintId
burnIduint256The id from which fractionsToHandle will be burnt
mintIduint256The id of which fractionsToHandle will be minted (if 0 no id is minted)
accountaddressThe address from which the fractions will be burnt, to which the minted fractions will be minted and unwrapped assets will be provided
tokensaddress[]The array of token addresses to be unwrapped
idsuint256[]The array of ids to be unwrapped
valuesuint256[]The array of values to be unwrapped

burnFromOwnerMintToAccount

function burnFromOwnerMintToAccount(uint256 fractionsToHandle, uint256 burnId, uint256 mintId, address account) external

Allows contract owner to burn amount from himself/herself and mint to an account Both burnId and mintId should be genesis ids

Parameters

NameTypeDescription
fractionsToHandleuint256The amount of fractions to burn for burnId and mint of mintId
burnIduint256The id from which fractionsToHandle will be burnt
mintIduint256The id of which fractionsToHandle will be minted
accountaddressThe address to which the minted fractions will be minted

percentageBurnMintAndPartiallyUnwrap

function percentageBurnMintAndPartiallyUnwrap(uint256 fractionsToHandle, uint256 burnId, uint256 mintId, address account, uint256 percentageToProvide) external

Allows contract owner to burn, mint and partially unwrap assets depending on a percentage

Parameters

NameTypeDescription
fractionsToHandleuint256The amount of fractions to burn for burnId and mint of mintId
burnIduint256The id from which fractionsToHandle will be burnt
mintIduint256The id of which fractionsToHandle will be minted (if 0 no id is minted)
accountaddressThe address from which the fractions will be burnt, to which the minted fractions will be minted and unwrapped assets will be provided
percentageToProvideuint256The percentage of the wrapped assets to be provided to the account

safeTransferFrom

function safeTransferFrom(address from, OmnichainAddress to, uint256 id, uint256 value, bytes data, address payable refundAddress) external payable

SafeTransferFrom

Parameters

NameTypeDescription
fromaddressAddress to get the token from
toOmnichainAddressAddress to provide tokens to
iduint256The id of the token
valueuint256The amount of the tokens to transfer
databytesExtra data needed
refundAddressaddress payableAddress to send native coin refund to

mint

function mint(address to, uint256 id, uint256 value, bytes data) external

Mint value tokens of id to to

The caller must be allowed to mint

Parameters

NameTypeDescription
toaddressAddress to mint tokens to
iduint256Token id to mint
valueuint256Amount to mint
databytesAdditional data with no specified format

On this page