Please I know this question might be a repetition of what was previously asked here but the answers didn't solve my problem.
In my case I actually used the brownie run scripts/deploy.py --network sepolia prompt to deploy my contract to the sepolia network.
This is my deploy.py file.
from brownie import accounts, config, SimpleStorage, network import os def deploy_simple_storage(): account = get_account() simple_storage = SimpleStorage.deploy({"from": account}) def get_account(): if network.show_active() == "development": return accounts[0] else: return accounts.add(config["wallets"]["from_key"]) def main(): deploy_simple_storage() I see the deployed contract in my .build/deployments folder. But when I try to interact with it in my read_value.py file, I get a IndexError: list index out of range error.
This is my read_value.py file.
'''Interacting with contracts deployed inside our brownie project''' from brownie import SimpleStorage, accounts, config, network from brownie.network.contract import ContractContainer def read_contract(): print(SimpleStorage[0]) def main(): read_contract() Please I'll need your help. Thanks.
--network sepoliaflag while interacting with your read_value.py script?