Ants铭文介绍
数据格式
UTF-8显示: data:,{"p":"prc-20","op":"mint","tick":"ants","amt":"100000000"} HEX十六进制显示: 0x646174613a2c7b2270223a227072632d3230222c226f70223a226d696e74222c227469636b223a22616e7473222c22616d74223a22313030303030303030227d
如何打铭文
Python脚本自动化
pip3 install web3==5.31.1
vim antsMint.py
from web3 import Web3
from dotenv import load_dotenv
import os,time
load_dotenv()private_key = ‘填你wallet的private key’
address = ‘填你wallet的address’
rpc_url = “https://polygon-rpc.com” # 去https://chainlist.org/chain/137找响应快的rpc server
web3 = Web3(Web3.HTTPProvider(rpc_url))
print(web3.isConnected())
print(Web3.fromWei(web3.eth.getBalance(address),’ether’))
c=0
while True:
nonce = web3.eth.get_transaction_count(address)
tx = {
‘nonce’: nonce,
‘chainId’: 137,
‘to’: address,
‘from’:address,
‘data’:’0x646174613a2c7b2270223a227072632d3230222c226f70223a226d696e74222c227469636b223a22616e7473222c22616d74223a22313030303030303030227d’, # mint16进制
‘gasPrice’: int(web3.eth.gas_price * 1.1),
‘value’: Web3.toWei(0, ‘ether’)
}
try:
gas = web3.eth.estimate_gas(tx)
tx[‘gas’] = gas
print(tx)
signed_tx = web3.eth.account.sign_transaction(tx,private_key)
tx_hash = web3.eth.send_raw_transaction(signed_tx.rawTransaction)
print(web3.toHex(tx_hash))
receipt = web3.eth.wait_for_transaction_receipt(tx_hash)
if receipt.status == 1:
c = c+1
print(“%s Mint Success!” %c)
continue
else:
continue
except Exception as e:
print(e)
python3 antsMint.py
链上交易查询
dune进度查询
钱包wallet地址管理
去年今日运营文章
- 2022: 11月榜单丨飞瓜数据B站UP主排行榜(哔哩哔哩平台)发布!(0)
- 2022: SAAS系统有什么好处(0)
- 2022: DedeCMS创始人IT柏拉图先生去世(0)
- 2022: B站热点有多恐怖?哺育UP主20天涨880w播放、40w粉!(0)
- 2022: 会员营销中,数字会员模式如何打造差异化会员服务(0)
本文由一个理性派AI爱好者投稿,不代表爱运营立场,如若转载,请注明出处:https://www.iyunying.org/zha/328060.html