From 0179a4c2a3046e71dc98137b0f6638c5c52e906d Mon Sep 17 00:00:00 2001 From: RiperYT <47161881+RiperYT@users.noreply.github.com> Date: Sat, 25 Feb 2023 04:12:31 +0200 Subject: [PATCH] Create main.js --- main.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 main.js diff --git a/main.js b/main.js new file mode 100644 index 0000000..219dec1 --- /dev/null +++ b/main.js @@ -0,0 +1,24 @@ +import Web3 from 'web3'; + +const web3 = new Web3('https://rpc-mumbai.maticvigil.com/'); +const from_wallet = '0x1996fCE6fD000D8eA2f50A18ee3dbEa2d502216B'; +const to_wallet = '0x8e7F03D930F9001A2b1dd0156B465A7A16cAdf08'; +const amount = '0.01'; +const privateKey = 'I think it will be only mine)))' + +async function send() { + const transaction = await web3.eth.accounts.signTransaction({ + from: from_wallet, + to: to_wallet, + gas: 100000, + value: web3.utils.toWei(amount, 'ether'), + data: web3.utils.toHex('Kutsenko Adnrij'), + }, privateKey); + + await web3.eth.sendSignedTransaction( + transaction.rawTransaction + ); + +} + +send();