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

Commit

Permalink
Fix geth --dev support in postman (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabijanC authored Jul 14, 2022
1 parent c50e945 commit 8557cf9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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

0 comments on commit 8557cf9

Please sign in to comment.