Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 1.17 KB

File metadata and controls

24 lines (14 loc) · 1.17 KB

Fts Starter Kit

This starter kit shows how to import, configure and run the new token standard. There are a couple of examples in the src/ directory to build off of.

How to Navigate

Level 1

src/e2e_run.ts is the basic token example. Alexa mints token, transfers token to Billy, Billy burns token.

Run with npx tsx src/e2e_run.ts or npm run build && node build/src/e2e_run.js

Level 2

src/concurrent_transfer_run.ts is a more advanced example that showcases emitting multiple token transfers at once. The expected behavior is for each transfer to succeed and not be blocked on concurrency issues (I'm not sure this should work! Won't higher nonce transactions cancel previous ones?)

Run with src/concurrent_transfer_run.ts or npm run build && node build/src/concurrent_transfer_run.js

Level 3

src/Escrow.ts is an example showing how a third party ZkApp can interact with the token standard. Note how the contract doesn't care which token is being escrowed, as long as it conforms to the standard VK.

Run with npm run build && node build/src/escrow_run.js (ts doesn't like the metadata reflection in the smart contract)

License

Apache-2.0