Skip to content

Lesson 13 Allowed Tokens, wait(1) bug and calling array from contract #1714

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

You must be logged in to vote

Hello @Neftyr

  1. The reason is because we do that at deployment here:

The logic here is that you will use that token anyways, so we add then at deployment to the allowed ones.
  1. In solidity no, you should use a getter function like you did, however you can access solidity variables in python (brownie) as they were function so you can create something like this:
 array = TokenFarm.allowedTokens()
 len(array)
  1. I'll need more info on this, please run the test with -s flag, like this:

brownie test -s -k testname

And post the output here.

I hope this info might help, cheers.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Nlferu
Comment options

@cromewar
Comment options

@Nlferu
Comment options

Answer selected by Nlferu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants