Skip to content

fix: add missing ft_metadata view function to fungible token example - #428

Open
tenderdeve wants to merge 1 commit into
near:developfrom
tenderdeve:fix/ft-example-metadata
Open

tenderdeve wants to merge 1 commit into
near:developfrom
tenderdeve:fix/ft-example-metadata

Conversation

@tenderdeve

Copy link
Copy Markdown

Summary

  • The my-ft example defines and stores FungibleTokenMetadata but never exposes it via a view function, violating NEP-148
  • Add ft_metadata() view function and implement FungibleTokenMetadataProvider interface
  • Follows the same pattern used by the NFT example (my-nft.ts line 173)

File: examples/src/fungible-token/my-ft.ts

Fixes #415

Test plan

  • Build the example: pnpm build
  • Call ft_metadata on a deployed instance — should return the metadata object
  • Existing FT tests pass

The my-ft example defines and stores FungibleTokenMetadata but never
exposes it via a view function, violating NEP-148. Add ft_metadata()
and implement FungibleTokenMetadataProvider, matching the pattern
used by the NFT example.

Fixes near#415
@github-project-automation github-project-automation Bot moved this to NEW❗ in DevTools Apr 28, 2026
@tenderdeve
tenderdeve marked this pull request as ready for review April 28, 2026 10:03

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: NEW❗

Development

Successfully merging this pull request may close these issues.

my-ft example defines metadata but does not expose function to retrieve it

2 participants