MCPcopy Index your code
hub / github.com/ecadlabs/taquito-react-template

github.com/ecadlabs/taquito-react-template @v0.12.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.12.0 ↗ · + Follow
15 symbols 35 edges 9 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Taquito React template

Built with Taquito

A minimal React setup for starting developing Tezos DApps quickly with Taquito.

Getting Started

  1. Make sure you have https://nodejs.org/ installed on your computer
  2. Create a new repository from taquito-boilerplate by clicking "Use this template".
  3. Clone your new repository:

git clone <YOUR_REPOSITORY_URL>

  1. Change your current working directory to the newly cloned repository directory.
  2. Install dependencies:

npm install

  1. Start development server:

npm run dev

  1. Open http://localhost:5173/ in your browser to see a sample application.

Building the App

  1. Run the command:

npm run build

  1. After you have build the app you can run it locally:

npm run preview

  1. Open http://localhost:4173/ in your browser to see the production build.

For more information read the Vite Guide

Polyfill

Before we start we need to add the following dependencies in order to not get polyfill issues. The reason for this step is that certain required dependencies are Node APIs, thus not included in Browsers. But still needed for communication and interaction with Wallets and Smart Contracts. For a better understanding here are the steps described.

You do not need to do the steps as it is already configured.

Run npm install buffer stream-browserify util events process

Then create a new file nodeSpecific.ts in the src folder of the project and add: ```js import { Buffer } from 'buffer'

globalThis.Buffer = Buffer ```

Then open the index.html file and add the following script in the body. It should look like this:

```js

//add this line ```

Finally open the vite.config.ts file and add the resolve part:

```js import { defineConfig } from 'vite' import react from '@vitejs/plugin-react-swc'

// https://vitejs.dev/config/ export default defineConfig({ define: { global: {}, }, plugins: [react()], resolve: { alias: { stream: 'stream-browserify', os: 'os-browserify/browser', util: 'util', process: 'process/browser', buffer: 'buffer', }, }, }) ```

Now we can run the app.

Extension points exported contracts — how you extend this code

ButtonProps (Interface)
(no doc)
src/components/DisconnectWallet.tsx
UpdateContractProps (Interface)
(no doc)
src/components/UpdateContract.tsx

Core symbols most depended-on inside this repo

setup
called by 2
src/components/ConnectWallet.tsx
generateQrCode
called by 1
src/App.tsx
App
called by 0
src/App.tsx
Transfers
called by 0
src/components/Transfers.tsx
sendTransfer
called by 0
src/components/Transfers.tsx
DisconnectButton
called by 0
src/components/DisconnectWallet.tsx
disconnectWallet
called by 0
src/components/DisconnectWallet.tsx
ConnectButton
called by 0
src/components/ConnectWallet.tsx

Shape

Function 12
Interface 2
Enum 1

Languages

TypeScript100%

Modules by API surface

src/components/UpdateContract.tsx4 symbols
src/components/DisconnectWallet.tsx3 symbols
src/components/ConnectWallet.tsx3 symbols
src/App.tsx3 symbols
src/components/Transfers.tsx2 symbols

For agents

$ claude mcp add taquito-react-template \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page