HerbertS19 / Pancakeswap_BSC_Sniper_Bot

Web3 Pancakeswap Sniper bot written in python3
Other
1 stars 0 forks source link

Sweep: Change the Swapper Address contract #2

Open HerbertS19 opened 1 year ago

HerbertS19 commented 1 year ago

Instead of using 0x2D4e39B07117937b2CB51b8a7ab8189b50D41184 as swapper address, change it to make transactions directly to PancakeSwap Router Address 0x10ED43C718714eb63d5aA57B78B54704E256024E

Checklist - [X] `txns.py` > • Replace the hardcoded swapper address "0x2D4e39B07117937b2CB51b8a7ab8189b50D41184" with the new PancakeSwap Router Address "0x10ED43C718714eb63d5aA57B78B54704E256024E" in the `setup_swapper` method. > • Update the comments in the `setup_swapper` method to reflect the new swapper address.
sweep-ai[bot] commented 1 year ago

Here's the PR! https://github.com/HerbertS19/Pancakeswap_BSC_Sniper_Bot/pull/4.

⚡ Sweep Free Trial: I used GPT-4 to create this ticket. You have 4 GPT-4 tickets left for the month and 1 for the day. For more GPT-4 tickets, visit our payment portal. To retrigger Sweep, edit the issue.


Step 1: 🔍 Code Search

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/HerbertS19/Pancakeswap_BSC_Sniper_Bot/blob/0a5b31dea83015a473773a38bd7e4015f81cd151/txns.py#L1-L211 https://github.com/HerbertS19/Pancakeswap_BSC_Sniper_Bot/blob/0a5b31dea83015a473773a38bd7e4015f81cd151/abis/bep20_abi_token.json#L1435-L775 https://github.com/HerbertS19/Pancakeswap_BSC_Sniper_Bot/blob/0a5b31dea83015a473773a38bd7e4015f81cd151/Sniper.py#L376-L422 https://github.com/HerbertS19/Pancakeswap_BSC_Sniper_Bot/blob/0a5b31dea83015a473773a38bd7e4015f81cd151/abis/bep20_abi_token.json#L1465-L775 https://github.com/HerbertS19/Pancakeswap_BSC_Sniper_Bot/blob/0a5b31dea83015a473773a38bd7e4015f81cd151/abis/bep20_abi_token.json#L205-L305

Step 2: 🧐 Snippet Analysis

From looking through the relevant snippets, I decided to make the following modifications:

File Path Proposed Changes
txns.py Modify txns.py with contents:
• Replace the hardcoded swapper address "0x2D4e39B07117937b2CB51b8a7ab8189b50D41184" with the new PancakeSwap Router Address "0x10ED43C718714eb63d5aA57B78B54704E256024E" in the setup_swapper method.
• Update the comments in the setup_swapper method to reflect the new swapper address.

Step 3: 📝 Planning

I have created a plan for writing the pull request. I am now working my plan and coding the required changes to address this issue. Here is the planned pull request:

Change Swapper Address to PancakeSwap Router Address sweep/update_swapper_address

Description

This PR updates the swapper address in the Pancakeswap BSC Sniper Bot codebase. The swapper address is currently hardcoded as "0x2D4e39B07117937b2CB51b8a7ab8189b50D41184", but it needs to be changed to the PancakeSwap Router Address "0x10ED43C718714eb63d5aA57B78B54704E256024E". This change allows transactions to be made directly to the PancakeSwap Router.

Summary of Changes

  • Modified the txns.py file to update the swapper address in the setup_swapper method.
  • Replaced the old swapper address "0x2D4e39B07117937b2CB51b8a7ab8189b50D41184" with the new PancakeSwap Router Address "0x10ED43C718714eb63d5aA57B78B54704E256024E".
  • Updated the comments in the setup_swapper method to reflect the new swapper address.

Please review and merge this PR to ensure that the Pancakeswap BSC Sniper Bot works correctly with the new swapper address.


Step 4: ⌨️ Coding

File Instructions Progress Error logs
txns.py Modify txns.py with contents:
• Replace the hardcoded swapper address "0x2D4e39B07117937b2CB51b8a7ab8189b50D41184" with the new PancakeSwap Router Address "0x10ED43C718714eb63d5aA57B78B54704E256024E" in the setup_swapper method.
• Update the comments in the setup_swapper method to reflect the new swapper address.
✅ Commit 4b0f982 No errors.

Step 5: 🔁 Code Review

Here are my self-reviews of my changes at sweep/update_swapper_address.

Here is the 1st review

No changes required. The changes made in the txns.py file are mostly stylistic, with the exception of the change in the swapper address which is in line with the issue description. There are no logic errors, syntax errors, or unimplemented sections. The changes appear to fully implement the requested issue. Good job!

I finished incorporating these changes.


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord