BSC抢开盘 ALL IN ONE

主要在于 监控到添加流动性的时间 和发出购买交易的时间
这个是我本人在用的一个监控流动性工具,每个邮箱1000次/每天,可以多注册几个这样就够了
监控网站
注册账号的步骤就省略了
第一步先在这里点WatchNow,监控BSC上的PancakeSwap所有交易,记住一定打开之后就把右下角的暂停掉,要不然一会你的1000条就没了
在这里插入图片描述
然后把V1的勾掉,在v2的地方添加Filters
在这里插入图片描述
安装下面的图片操作,这里的操作是监控所有添加流动性的交易。
在这里插入图片描述
在这里插入图片描述
这个时候你就完成了整个过程,点击下面的Save 就可以去导出你的APIKey了
抄点代码
合约代码库
这个大哥写的合约,首先是通过Create2计算出池子地址,然后购买,这里相当于自己写了一个Router来用
这里你们需要去remix上部署这些合约,然后就可以往这个合约里面打你的子弹,我每一次都是买1BNB,90%的时候都是几倍之后出来的

async def txn_handler(txn,unsubscribe):
	string = json.dumps(txn)
	jsonload= json.loads(string)
	print(jsonload['gasPrice'])
	print(jsonload['hash'])
	if('Token合约地址小写' in jsonload['input']):
		print('start! NOW ')
		你的购买函数
		print('success')
	else :
		pass
def RunForEver(): 
	Pancake_v2_router = '0x10ED43C718714eb63d5aA57B78B54704E256024E'
	stream = Stream('XXXX-XXXXX-XXXXX',network_id=56)
	stream.subscribe_address(Pancake_v2_router,txn_handler,filters=filters)
	stream.connect()

这里面只是一个思路包括了监控和合约,至于在什么时间调用卖出函数要看你自己的想法,关于购买

def Buy(gasPrice,tokenB):
	abi=[{ "anonymous": False, "inputs": [{ "indexed": True, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": True, "internalType": "address", "name": "newOwner", "type": "address" }], "name": "OwnershipTransferred", "type": "event" }, { "inputs": [{ "internalType": "address", "name": "_seller", "type": "address" }], "name": "authenticateSeller", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "emmergencyWithdrawBnb", "outputs": [{ "internalType": "bool", "name": "success", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_token", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }], "name": "emmergencyWithdrawTkn", "outputs": [{ "internalType": "bool", "name": "success", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "tokenOut", "type": "address" }, { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" }], "name": "sandwichIn", "outputs": [{ "internalType": "bool", "name": "success", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "tokenIn", "type": "address" }, { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" }], "name": "sandwichOut", "outputs": [{ "internalType": "bool", "name": "success", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "addresspayable", "name": "_newAdmin", "type": "address" }], "name": "setAdministrator", "outputs": [{ "internalType": "bool", "name": "success", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_newRouter", "type": "address" }], "name": "setSandwichRouter", "outputs": [{ "internalType": "bool", "name": "success", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "stateMutability": "payable", "type": "receive" }, { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "authenticatedSeller", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getAdministrator", "outputs": [{ "internalType": "addresspayable", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getSandwichRouter", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }]
	rpcUrl = ""
	web3 = Web3(Web3.HTTPProvider(rpcUrl))
	acct = web3.eth.account.from_key("")
	contract_address = ''
	contract = web3.eth.contract(contract_address,abi=abi)
	txn = contract.functions.sandwichIn(tokenB,1000000000000000000,0).buildTransaction({
		'from': acct.address,
		'nonce': web3.eth.getTransactionCount(acct.address),
		'gas': 330000,
		'gasPrice': gasPrice
		})
	signed = acct.signTransaction(txn) 
	tx_id = web3.eth.sendRawTransaction(signed.rawTransaction) 
	print(tx_id.hex())
  • 2
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值