|
|
@@ -49,8 +49,8 @@ def load_private_keys(path: str) -> List[str]:
|
|
|
return [line.strip() for line in f if line.strip()]
|
|
|
|
|
|
|
|
|
-def random_gas_limit(base: int = 100000) -> int:
|
|
|
- return base + random.randint(-5000, 10000)
|
|
|
+def random_gas_limit(base: int = 100_000) -> int:
|
|
|
+ return base + random.randint(-5_000, 10_000)
|
|
|
|
|
|
|
|
|
async def wait_tx(tx_hash: str) -> TxReceipt:
|
|
|
@@ -86,7 +86,7 @@ async def send_contract_call(private_key: str,
|
|
|
}
|
|
|
|
|
|
signed = account.sign_transaction(tx)
|
|
|
- tx_hash = w3.eth.send_raw_transaction(signed.raw_transaction).hex()
|
|
|
+ tx_hash = w3.eth.send_raw_transaction(signed.rawTransaction).hex() # <- 修正处
|
|
|
print(f"{desc} tx_hash: {tx_hash}")
|
|
|
await wait_tx(tx_hash)
|
|
|
|