Skip to content

Lesson 6: Not getting "Insufficient Funds" error #280

Answered by cromewar
ekong16 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @ekong16 this could happen because the get_account function... you might have something like this:

def get_account():
    if (
        network.show_active() in LOCAL_BLOCKCHAIN_ENVIRONMENTS
        or network.show_active() in FORKED_LOCAL_ENVIRONMENTS
    ):
        return accounts[0]
    else:
        return accounts.add(config["wallets"]["from_key"])

so as mainnet-fork is on FORKED_LOCAL_ENVIRONMENTS this will return the first account from ganache-cli as you can see on your run ourtput.

I might be taking the gas needed for the transaction from ganache.

Hope this info might help.

Replies: 5 comments 9 replies

Comment options

You must be logged in to vote
7 replies
@ekong16
Comment options

@cromewar
Comment options

@cromewar
Comment options

@ekong16
Comment options

@cromewar
Comment options

Answer selected by cromewar
Comment options

You must be logged in to vote
2 replies
@cromewar
Comment options

@MananJain2002
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants