Skip to content

Releases: polytrade-finance/dual-layer-token

Version 1.0.0

13 Jun 09:17
5d90975
Compare
Choose a tag to compare

Change Log

New Features

  • DLTPermit extension has been included, allowing the approval of a spender through message-based signing followingEIP-2612. It involves calling the permit function with signed parameters.
  • DLTEnumerable extension has been added to track the amounts in both main IDs and sub-IDs, including totalMainIds, totalSubIds, totalMainSupply, totalSubSupply, getSubIds, subIdBalanceOf functions.
  • The new getSubIds function retrieves all sub-IDs associated with a main ID.

Performance Improvements

  • setApprovalForAll(operator, approved): Allows the approval or removal of operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller.
  • safeTransferFrom(sender, recipient, mainId, subId, amount, data): Moves amount tokens from sender to recipient using the allowance mechanism. amount is then deducted from the caller's allowance.
  • approve(spender, mainId, subId, amount): Sets amount as the allowance of spender over the caller's tokens.
  • subBalanceOf(account, mainId, subId): Returns the amount of tokens owned by `account
  • balanceOfBatch(accounts, mainIds, subIds): Returns the balances of multiple accounts for each pair of mainIds and subIds.
  • allowance(owner, spender, mainId, subId): Returns the remaining number of tokens that spender can spend on behalf of owner for a specific mainId and subId.
  • isApprovedForAll(owner, operator): Checks if operator is allowed to manage all of the assets of owner.

Initial Dual Layer Token Standard

16 Apr 23:05
be0c622
Compare
Choose a tag to compare
Pre-release
  • setApprovalForAll: Approve or remove operator as an operator for the caller.
  • safeTransferFrom: Moves amount tokens from sender to recipient
  • approve: Sets amount as the allowance of spender over the caller's tokens.
  • totalSupply: Returns the amount of whole tokens.
  • mainTotalSupply: Returns The total supply of all tokens of a given mainId.
  • subTotalSupply: Returns The total supply of tokens with a given mainId and subId
  • totalMainIds: Returns Total number of unique mainId value.
  • totalSubIds: Returns Total number of unique subId values that have been given for a mainId.
  • mainBalanceOf: Returns the amount of tokens owned by account in mainId.
  • subBalanceOf: Returns the amount of tokens owned by account in subId.
  • allowance: Returns the remaining number of tokens that spender will be allowed to spend on behalf of owner.
  • isApprovedForAll: Returns if the operator is allowed to manage all of the assets of owner.