Skip to content

Commit

Permalink
Merge pull request CryptoGnome#392 from prt1999/master
Browse files Browse the repository at this point in the history
Add Biswap support
  • Loading branch information
CryptoGnome authored Dec 10, 2021
2 parents 5bf25a5 + 34cec4f commit 67d6d05
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions LimitSwap.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,41 @@ def timestamp():
base_symbol = "BNB"
rugdocchain = '&chain=bsc'
modified = False

elif settings['EXCHANGE'].lower() == 'biswap':
if settings['USECUSTOMNODE'].lower() == 'true':
my_provider = settings['CUSTOMNODE']
print(timestamp(), 'Using custom node.')
else:
my_provider = "https://bsc-dataseed4.defibit.io"

if not my_provider:
print(timestamp(), 'Custom node empty. Exiting')
exit(1)

if my_provider[0].lower() == 'h':
print(timestamp(), 'Using HTTPProvider')
client = Web3(Web3.HTTPProvider(my_provider))
elif my_provider[0].lower() == 'w':
print(timestamp(), 'Using WebsocketProvider')
client = Web3(Web3.WebsocketProvider(my_provider))
else:
print(timestamp(), 'Using IPCProvider')
client = Web3(Web3.IPCProvider(my_provider))

print(timestamp(), "Binance Smart Chain Connected =", client.isConnected())
print(timestamp(), "Loading PinkSwap Smart Contracts...")

routerAddress = Web3.toChecksumAddress("0x3a6d8cA21D1CF76F653A67577FA0D27453350dD8")
factoryAddress = Web3.toChecksumAddress("0x858E3312ed3A876947EA49d572A7C42DE08af7EE")

routerContract = client.eth.contract(address=routerAddress, abi=routerAbi)
factoryContract = client.eth.contract(address=factoryAddress, abi=factoryAbi)

weth = Web3.toChecksumAddress("0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c")
base_symbol = "BNB"
rugdocchain = '&chain=bsc'
modified = False

elif settings['EXCHANGE'].lower() == 'apeswap':
if settings['USECUSTOMNODE'].lower() == 'true':
Expand Down

0 comments on commit 67d6d05

Please sign in to comment.