Skip to content

bark-community/bark-token-program

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BARK Token Interaction

This repository contains a TypeScript script for interacting with the BARK token on the Solana blockchain using the Solana Web3.js library and the SPL Token program.

Table of Contents

Introduction

This TypeScript script demonstrates the creation, initialization, and interaction with a custom token (BARK) on the Solana blockchain. It covers various functions, including minting, transferring tokens with fees, fee withdrawal, and more.

Features:

  • Minting BARK tokens on the Solana blockchain.
  • Transferring BARK tokens with fees.
  • Withdrawing fees from BARK accounts.
  • Creating a new fee account.
  • Harvesting and transferring withheld fees.
  • Checking BARK token and Solana account balances.

Requirements

  • Node.js (v14 or higher)
  • npm (Node Package Manager)
  • Solana devnet cluster access
  • Solana wallet with sufficient funds for transaction fees

Networks:

Solana Explorer:

  • Devnet:
  • Testnet:
  • Mainnet:

Getting Started

  1. Clone the repository:

    git clone https://github.com/bark-community/bark-token-program.git
    cd bark
  2. Install dependencies:

    npm install
  3. Configure your Solana wallet details in the script.

  4. Execute the script:

    npm start

Usage

Ensure that you have met the requirements and have configured the script with your Solana wallet details. Run the script to perform various BARK token interactions on the Solana blockchain.

Functions

  • initializeMintAccount(): Initializes the Mint BARK account.
  • initializeSolanaAccounts(): Initializes source and destination Solana token accounts.
  • transferBarkWithFee(): Transfers BARK tokens with fees.
  • withdrawFees(): Withdraws fees from BARK accounts.
  • createFeeAccount(): Creates a new fee account.
  • harvestWithheldTokensToMint(): Harvests withheld fees and transfers to the Mint BARK account.
  • checkBarkBalance(): Checks the BARK token balance of the wallet.
  • checkBalance(): Checks the Solana account balance of the wallet.

Contributing

Contributions are welcome! If you find a bug or have an enhancement in mind, please open an issue or submit a pull request following the contribution guidelines.

License

MIT License.

About

Bark Token Program is a Solana-based decentralized token management system. It allows BARK to create, mint, transfer tokens, and manage associated fees. This program leverages the Solana blockchain to ensure secure and transparent community operations.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors