Skip to content

lsp8-contracts: v0.15.0

Compare
Choose a tag to compare
@github-actions github-actions released this 05 Apr 16:05
5481427

0.15.0 (2024-04-05)

Package for the LSP8 Identifiable Digital Asset Standard.

Installation

npm install @lukso/lsp8-contracts

Type-safe ABIs, contract interfaces and React Hooks

This release includes new type-safe features generated by wagmi:

  • ABIs + typed events
import {
    ilsp8IdentifiableDigitalAssetAbi
    lsp8BurnableAbi
    lsp8BurnableInitAbstractAbi
    lsp8CappedSupplyAbi
    lsp8CappedSupplyInitAbstractAbi
    lsp8EnumerableAbi
    lsp8EnumerableInitAbstractAbi
    lsp8IdentifiableDigitalAssetAbi
    lsp8IdentifiableDigitalAssetInitAbstractAbi
    lsp8MintableAbi
    lsp8MintableInitAbi
} from "@lukso/lsp8-contracts/types";
  • React hooks
  • contract Interfaces (based on Viem types) including the following helper functions:
    • getFunction(...)
    • getEvent(...)
    • encodeFunctionData(...)
    • decodeFunctionData(...)

To see all the React hooks available for the LSP8 contracts, you can look at the file @lukso/lsp8-contracts/types/index.ts under your node_modules dependencies.

Available Constants & Types

The @lukso/lsp8-contracts npm package contains useful constants such as InterfaceIds or ERC725Y Data Keys related to the LSP8 Standard. You can import and access them as follow:

import {
  INTERFACE_ID_LSP8,
  INTERFACE_ID_LSP8_PREVIOUS,
  LSP8DataKeys,
  LSP8_TYPE_IDS,
  LSP8_TOKEN_ID_FORMAT,
} from "@lukso/lsp8-contracts";

Miscellaneous Chores

  • release lsp-smart-contracts 0.15.0 (fbbd048)