Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Fix geth --dev support in postman #180

Merged
merged 2 commits into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ Loads a `StarknetMockMessaging` contract. The `address` parameter is optional; i
`networkUrl` is the URL of the JSON-RPC API of the L1 node you've run locally or that already exists; possibilities include, and are not limited to:

- [Goerli testnet](https://goerli.net/)
- [Ganache node](https://www.npmjs.com/package/ganache)
- [Ganache](https://www.npmjs.com/package/ganache)
- [Geth](https://github.com/ethereum/go-ethereum#docker-quick-start)
- [Hardhat node](https://hardhat.org/hardhat-network/#running-stand-alone-in-order-to-support-wallets-and-other-software).

### Postman - Flush
Expand Down
2 changes: 2 additions & 0 deletions starknet_devnet/postman_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from abc import ABC, abstractmethod
from web3 import HTTPProvider, Web3
from web3.middleware import geth_poa_middleware

from starkware.solidity.utils import load_nearby_contract
from starkware.starknet.testing.postman import Postman
Expand Down Expand Up @@ -127,6 +128,7 @@ def __init__(self, network_url: str):
super().__init__()
request_kwargs = {"timeout": TIMEOUT_FOR_WEB3_REQUESTS}
self.web3 = Web3(HTTPProvider(network_url, request_kwargs=request_kwargs))
self.web3.middleware_onion.inject(geth_poa_middleware, layer=0)
self.eth_account = EthAccount(self.web3,self.web3.eth.accounts[0])

def load_mock_messaging_contract_in_l1(self, starknet, contract_address):
Expand Down