This project uses experimental features from Node v18 please update if you have issues running it.
- ) download git project to a new folder
git clone https://github.com/creativebuilds/nftx-arbitrage - ) install node_modules
npm install - ) run
npm start - ) Enjoy arbitrage!
TIP: Zoom out your terminal in order to see the full table output
An alternative usecase for this package is to run it as a module.
Simply import the functions you need from lib/utils
import {GetAllSudoSwapCollections, GetNFTxTokens} from 'nftx-arbitrage/lib/utils';
const SSCollections = await GetAllSudoSwapCollections();
const NFTxTokens = await GetNFTxTokens();
// In order to get the asset info, call GetMintsRedeemsAndSwaps using the vault id found in each NFTx Token
const NFTxTokensExtended = await Promise.all(NFTxTokens.map(async (token) => {
let {mints, redeems, swaps} = await GetMintsRedeemsAndSwaps(token.id);
return {
...token,
assetAddress: mints[0]?.vault.asset.id || null,
mints,
redeems,
swaps
}
}))
console.log(NFTxTokensExtended);( OPTIONAL ) to build from source run npm run build
NOTE: you'll receive some errors as the tests folder is not located in /src these are nominal
( OPTIONAL ) to test run npm run test
