Arbitrage bot with Node.js & 1inch pt.2
Описание
Hi! This is a part 2 of how to create your node.js bot application that is swapping tokens by calling the OneSplit smart contract of 1INCH DEX aggregator. I'm forking a blockchain by using ganache-cli and I'm unlocking an existing account on Ethereum.
Project repository: https://github.com/PiotrNap/YouTube-channel-source-code/tree/master/arbitrage-bot
__________
If you want to test it on Ethereum mainnet (on your own risk), and add you private keys. This may give you some clues on where to start with it:
1. Store your private key in a secure way (e.g. by using environment variables stored in .env file)
2. Infura's public node cannot sign the transaction on your behalf, so you need to first sign it (for approving the token spending), and then broadcast it to other nodes. (e.g. https://postimg.cc/0MCLPgwB)
3. You may also want to integrate your Metamask wallet directly with 1inch website, and just simply call their API to approve spending (https://docs.1inch.exchange/api/approve)
Thanks for watching!
Рекомендуемые видео



















