Error Lesson 6 #291
Answered
by
cromewar
irwingtello
asked this question in
Q&A
Error Lesson 6
#291
-
Hello , im facing with this error , i dont know how solve, i tried but my code looks good, can you help? |
Beta Was this translation helpful? Give feedback.
Answered by
cromewar
Oct 31, 2021
Replies: 1 comment
-
It seems your problem is on your import accounts
FORKED_LOCAL_ENVIRONMENTS = ["mainnet-fork", "mainnet-fork-dev"]
LOCAL_BLOCKCHAIN_ENVIRONMENTS = ["development", "ganache-local"]
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"]) also change ganache-local to ganache-gui, and add it to LOCAL_BLOCKCHAIN_ENVIRONMENTS, this should work. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
irwingtello
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems your problem is on your
get_account
function, which is returning accounts[1]... make sure it seems like this:also change ganache-local to ganache-gui, and add it to LOCAL_BLOCKCHAIN_ENVIRONMENTS, this should work.