ITS NODE BABY
This commit is contained in:
1 parent
321e82a71c
commit
38c5579fbb
25 files changed
+3877
-683
No files matched your search
@@ -0,0 +1,39 @@
|
||||
import base58 from "bs58";
|
||||
import "dotenv/config"
|
||||
import * as helpers from "@solana-developers/helpers";
|
||||
import * as web3 from "@solana/web3.js";
|
||||
|
||||
const emoKey = helpers.getKeypairFromEnvironment("EMO");
|
||||
const emoAddr = new web3.PublicKey(emoKey.publicKey);
|
||||
|
||||
const payer = emoKey
|
||||
const connection = new web3.Connection(web3.clusterApiUrl("devnet"));
|
||||
|
||||
const PING_PROGRAM_ADDRESS = new web3.PublicKey('ChT1B39WKLS8qUrkLvFDXMhEJ4F1XZzwUNHUt4AU9aVa')
|
||||
const PING_PROGRAM_DATA_ADDRESS = new web3.PublicKey('Ah9K7dQ8EHaZqcAsgBW8w37yN2eAy3koFmUn4x3CJtod')
|
||||
|
||||
const transaction = new web3.Transaction()
|
||||
const programId = new web3.PublicKey(PING_PROGRAM_ADDRESS)
|
||||
const pingProgramDataId = new web3.PublicKey(PING_PROGRAM_DATA_ADDRESS)
|
||||
|
||||
|
||||
// const instruction = new web3.TransactionInstruction({
|
||||
// keys: [
|
||||
// {
|
||||
// pubkey: pingProgramDataId,
|
||||
// isSigner: false,
|
||||
// isWritable: true
|
||||
// },
|
||||
// ],
|
||||
// programId
|
||||
// });
|
||||
|
||||
// transaction.add(instruction)
|
||||
|
||||
// const signature = await web3.sendAndConfirmTransaction(
|
||||
// connection,
|
||||
// transaction,
|
||||
// [payer]
|
||||
// )
|
||||
|
||||
// console.log(`✅ Transaction completed! Signature is ${signature}`)
|
||||
Reference in new issue
Block a user