Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Python client instructions #317

Merged
merged 1 commit into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions clients/py/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading