From a796cbcff3ee6434c95a18c72fa4f8a2494c8b5b Mon Sep 17 00:00:00 2001 From: Xi Zhang <4441690+aefhm@users.noreply.github.com> Date: Wed, 22 May 2024 16:15:23 -0500 Subject: [PATCH] Update Python client instructions --- clients/py/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clients/py/README.md b/clients/py/README.md index 84366a47..c9f1bdfa 100644 --- a/clients/py/README.md +++ b/clients/py/README.md @@ -14,12 +14,15 @@ make from web3 import Web3 from sapphirepy import sapphire -# Setup your Web3 provider with a signing account +# Setup your Web3 provider with a signing account. w3 = Web3(Web3.HTTPProvider('http://localhost:8545')) w3.middleware_onion.add(construct_sign_and_send_raw_middleware(account)) -# Finally, wrap the provider to add Sapphire end-to-end encryption +# Finally, wrap the provider to add Sapphire end-to-end encryption. w3 = sapphire.wrap(w3) +# Optionally, query Oasis Web3 Gateway for the gas price. +# from web3.gas_strategies.rpc import rpc_gas_price_strategy +# w3.eth.set_gas_price_strategy(rpc_gas_price_strategy) ``` The Sapphire middleware for Web3.py ensures all transactions, gas estimates and