Skip to content

fluid-labs/randAO-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AO Process Clients Integration Test

This project demonstrates how to use the ao-process-clients library to interact with various AO processes, including Bazar NFTs, tokens, and oracles.

Setup

  1. Install dependencies:

    npm install
  2. Make sure you have a valid Arweave wallet file. The default path is set to ../arweave-keyfile-jAmz_Wcc_3ZeO_b5iruLNnI1e-ObZ9A8wHMKacigJ_g.json in the .env file. Update this path if your wallet is located elsewhere.

Usage

The project includes several scripts to demonstrate different aspects of AO process integration:

1. Create an NFT Collection

To create a new NFT collection:

node create-nft-collection.js

This will:

  • Create a new NFT collection with the name "Test NFT Collection" and ticker "TESTNFT"
  • Save the process ID to nft-process-id.txt for use in other scripts

2. Mint NFTs

To mint NFTs from your collection:

node mint-nft.js

This will:

  • Read the process ID from nft-process-id.txt
  • Mint 1 NFT to your wallet
  • Display your current balance

3. Transfer NFTs

To transfer NFTs to another wallet:

node transfer-nft.js

This will:

  • Read the process ID from nft-process-id.txt
  • Transfer 1 NFT to the specified recipient address
  • Display your new balance after the transfer

Notes

  • The scripts use the wallet specified in the .env file for all operations
  • Make sure your wallet has sufficient balance for the operations
  • The recipient address in transfer-nft.js is set to an example address. Update it with the actual recipient address before running the script.

4. Token Price Fetching

To fetch the price of Arweave tokens:

node arweave-price.js

This will:

  • Connect to the oracle process
  • Fetch the current price of WRAPPED_ARWEAVE tokens
  • Display the price information
  • Save the price to arweave-price.json

5. Liquidity Pool Exploration

To explore liquidity pools:

node test-liquidity-pool.js

This will:

  • Connect to the AO/qAR liquidity pool
  • Retrieve information about the pool
  • Attempt to fetch token prices

6. AO Process Clients Demo

To see a demonstration of various AO process clients:

node ao-clients-demo.js

This will:

  • Demonstrate TokenClient, NftClient, CollectionClient, and BotegaLiquidityPoolClient
  • Show available methods and functionality
  • Connect to various AO processes

Troubleshooting

  • If you encounter errors related to the wallet, make sure the path in .env is correct and the wallet file is valid
  • If you encounter errors related to the process ID, make sure you're using valid process IDs
  • If operations fail, check that you have the necessary permissions
  • For price fetching issues, try using the oracle process directly with the arweave-price.js script

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published