Toekn.

Overview

Toekn. is a peer to peer spl token swap system. This project, deployed at Toekn., interacts with an Anchor smart contract deployed to the Solana devnet at address 7gW2yGMScBLiHhGPmFxjb83Vay6DrAtuP1BjjUct85ZX. It was created as an entry for the Solana Talent Olympics.

Features

  • Wallet Connect button: A wallet link button using solana-wallet-adapter to help sign transactions for creating/closing/withdrawing from escrow.
  • Escrow Creation: Users select a token from a dropdown of tokens present in their Phantom wallet, specify the amount to transfer to the escrow, then select the token and amount they want in exchange. This process returns a transaction signature and the escrow address.
  • Withdraw: Users enter the escrow address to view swap details. Upon acceptance, the swap completes, and the escrow account closes.
  • Close Escrow: Users can close escrows created with their wallet address by entering the escrow address and signing with the same wallet address.
  • Blink Implementation: Once a user creates their escrow, they can download a blink to share on their socials or share directly with the person who they want to swap tokens with. This enables the escrow "Taker" to sign a transaction without having to open the Toekn. app at all.

Getting Started

Run Development Server:

npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result