Hey there i am really new to solana,
I have only worked with ethereum but i dont understand how i can send a trasnaction there. Im using solana browser bundle.
let transactions = new web3.Transaction()
.add(
web3.SystemProgram.transfer({
fromPubkey: this.walletAddress,
toPubkey: config.receiver,
lamports: web3.LAMPORTS_PER_SOL / 100 //Investing 1 SOL. Remember 1 Lamport = 10^-9 SOL.
}),
);
let connection = new web3.Connection(
web3.clusterApiUrl('devnet'),
);
var transaction = new web3.Transaction().add(
web3.SystemProgram.transfer({
fromPubkey: this.walletAddress,
toPubkey: config.receiver,
lamports: 1, // number of SOL to send
}),
);
var signature = await web3.sendAndConfirmTransaction(connection, transaction, [
this.walletAddress,
]);
console.log('SIGNATURE', signature);
Why is this not working ?
I wanna send sol from one wallet to another