On-chain Interactions

Welcome to FIXeS on-chain interactions documentation

Overview

In this section, we provide detailed instructions on interacting with the FIXeS contract on the blockchain. To effectively interact with the FIXeS contract, users should possess a basic understanding of blockchain technology, smart contracts, and the Flow blockchain that the FIXeS contract is deployed on.


Getting Started

You can get the contract address of FIXeS here: Are the contracts open-sourced?

For front-end or NodeJS projects, we have prepared a more user-friendly way of integration. You can follow this guide to get started.

Requirements

  • Node version v16.0.0 or higher.

  • FCL(Flow Client Library) installation: Official Doc

Dependencies Installation

Install FIXeS contracts to your application via npm, yarn, or pnpm

npm i @fixes/contracts
yarn add @fixes/contracts
pnpm add @fixes/contracts

Include *.cdc assets for your project

Interacting with the Flow blockchain requires using transactions/scripts, and all necessary ones are included in @fixes/contracts package. However, to use them in your application, you need to make sure that your building tool can recognize this file extension first.

Using Vite as an example, you need to add this field in vite.config.js:

How to quickly set up FCL ?

FCL is an all-in-one JS library to interact with Flow blockchain, If you are not familiar with it, you can refer to the code below.

Here is an independent wrapped class of FCL :

If you don't need to use an FCL-compatible wallet for on-chain interactions, you can use this Signer class:

How to send a transaction to Flow blockchain or query data from Flow blockchain?

Here are some example codes. learn more from the official doc

In the following documentation, flow means an instence of flowSigner or flowService as the subject of function calls.


𝔉rc20 Interactions

πŸ”―π”‰rc20

Fixes Inscription Interactions

πŸ”‘Fixes Inscription

Last updated