Skip to content

Instantly share code, notes, and snippets.

const web3 = require('@solana/web3.js');
const { PublicKey } = require('@solana/web3.js');
const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
const bs58 = require('bs58');
const connection = new web3.Connection(web3.clusterApiUrl('mainnet-beta'));
let transaction;
function getInstructionDiscriminator(name) {