brownie_simple_storage icon indicating copy to clipboard operation
brownie_simple_storage copied to clipboard

Failing when deploying into a testnet

Open fricpto opened this issue 2 years ago • 2 comments

when I run brownie run scripts/deploy.py --network rinkeby I get this result: Screenshot 2022-11-09 165854 and this is my deploy.py code:

from brownie import accounts, config, SimpleStorage, network


def deploy_simple_storage():
    account = get_account()
    simple_storage = SimpleStorage.deploy({"from": account})
    stored_value = simple_storage.retrieve()
    print(stored_value)
    transaction = simple_storage.store(15, {"from": account})
    transaction.wait(1)
    updated_stored_value = simple_storage.retrieve()
    print(updated_stored_value)


def get_account():
    if network.show_active() == "development":
        return accounts[0]
    else:
        return accounts.add(config["wallets"]["from_key"])


def main():
    deploy_simple_storage()

and this is my .env file code: Screenshot 2022-11-09 170221

fricpto avatar Nov 09 '22 15:11 fricpto

Can you add some print statements in there to see if it's reaching where it needs to reach?

PatrickAlphaC avatar Nov 14 '22 17:11 PatrickAlphaC

Hi fricpto, i am confuse with the infura project id? is infura project id and api key are same or different?

Nagesh2189 avatar Jul 04 '23 07:07 Nagesh2189