I was trying to implement FundMe project from Patrick Collins video on youtube. My deploy.py is as following
from brownie import accounts, config, fundme, network
def deploy():
account = get_account()
fundme_contract = fundme.deploy({"from":account})
print("contract deployed to {fundme.address}")
def get_account():
if network.show_active() == "development":
return accounts[0]
else:
return accounts.add(private_key="PRIVATE_KEY")
def main():
deploy()
it gives this error
HTTPError: 401 Client Error: Unauthorized for url: https://sepolia.infura.io/v3/https://sepolia.infura.io/v3/c9c6…(my infura project id)
I think the problem here is that, the url for my infura project is incorrect. https://sepolia.infura.io/v3 part repeats itself. I don’t know what causes this. My .env file is
export WEB3_INFURA_PROJECT_ID = "c9c6..."
export PRIVATE_KEY = "0x57d..."
I tried to delete and remake my .env and brownie-config.yaml files. Even when I deleted it, it still gave the same error. So I think the program is getting my Infura ID from somewhere else but I dont know where. Thanks for helping!