12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- const web3 = require('@solana/web3.js');
- const fs = require("fs-extra");
- const BigNumber = require("bignumber.js");
- const { Wallet } = require('@coral-xyz/anchor');
- const Decimal = require('decimal.js');
- const BN = require('bn.js');
- const cron = require('node-cron');
- const bs58 = require('bs58')
- const raydium_sdk = require("@raydium-io/raydium-sdk");
- const deepcopy = require('deepcopy');
- const clear = require('clear');
- const Config = require("./config")
- const axios = require('axios');
- let jsonInfo2PoolKeys = raydium_sdk.jsonInfo2PoolKeys;
- let mywalletaddress = Config.mywalletaddress;
- let log = console.log;
- console.log = function () {
- let args = Array.from(arguments);
- let log_prefix = new Date().toISOString();
- args.unshift(log_prefix + "");
- log.apply(console, args);
- }
- BigInt.prototype.toJSON = function () {
- return this.toString()
- }
- let swap_url = "https://solana-mainnet.g.alchemy.com/v2/WLI0ohbUlvbsJVmoIvB1wTSwUA8qP5qS";
- let swap_connection = new web3.Connection("https://solana-mainnet.g.alchemy.com/v2/WLI0ohbUlvbsJVmoIvB1wTSwUA8qP5qS", {
- commitment: "confirmed",
- });
- async function main() {
- // let str_dalao_address = '7T1kJcKi5tYA2Vpza1BQnfShSsFCmyVBnxbncqHoEUqAa'
- // let listen_body_data = `{"id":"${guid()}","jsonrpc":"2.0","method":"getSignaturesForAddress","params":["${str_dalao_address}",{"limit":5, "commitment": "confirmed"}]}`;
- // let requestSignatures = await axios.post(swap_url, listen_body_data, listen_axios_config);
- // if (requestSignatures.status != 200) {
- // console.log(``)
- // return;
- // }
- // else if (requestSignatures.status == 200 && requestSignatures.error) {
- // throw new Error(requestSignatures.error.message);
- // }
- // console.log("yes")
- // requestSignatures = requestSignatures.data.result;
- // requestSignatures = requestSignatures.data;
- // console.log(requestSignatures);
- let sign = '3dCiNfDyJvm1aXtGABgac6DWZ4WqhS3uhswvTEgFhoF2cT9dvaFazNtVg9T5Wm9zCBXsyTMZsUjzQhR4EsuWxVF3'
- let obj_RecentPrioritizationFees;
- // obj_RecentPrioritizationFees = await swap_connection.getRecentPrioritizationFees({ lockedWritableAccounts: [new web3.PublicKey(mywalletaddress)] });
- obj_RecentPrioritizationFees = await swap_connection.getRecentPrioritizationFees();
- console.log(obj_RecentPrioritizationFees)
- // let str_ammid = "AiyRewCvnCWaJuCE851bQZP5LQeT11uVgKCASYZAfEHp"
- // const account = await swap_connection.getAccountInfo(new web3.PublicKey(str_ammid));
- // console.log(account)
- // let web3pub_dalaoaddd = new web3.PublicKey('GFUS44ebiF6YQ5FZQ9dXZVFba69rEuTqLwXcUFvVxVTD')
- // let requestSignatures = await swap_connection.getSignaturesForAddress(web3pub_dalaoaddd, {
- // limit: 5,
- // }, 'confirmed');
- // console.log(requestSignatures);
- }
- main()
|