Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No matter however I run, it shows The number of tokens you've deployed is: 0 #86

Open
the-lost-kite opened this issue Mar 4, 2022 · 3 comments

Comments

@the-lost-kite
Copy link

No description provided.

@PatrickAlphaC
Copy link
Owner

Please add a detailed list of steps you took to get here.

@haverstein
Copy link

I was also having the same output but after putting time.sleep(300) after calling the createCollectible function has solved the issue.

def createCollectible():
    dev = accounts.add(config["wallets"]["from_key"])
    advanced_collectible = AdvancedCollectible[len(AdvancedCollectible) - 1]
    fund_with_link(advanced_collectible.address)
    transaction = advanced_collectible.createCollectible("None", {"from": dev})
    print("Waiting on second transaction...")
    # wait for the 2nd transaction
    transaction.wait(1)
    time.sleep(300)
    requestId = transaction.events["requestedCollectible"]["requestId"]
    token_id = advanced_collectible.requestIdToTokenId(requestId)
    breed = get_breed(advanced_collectible.tokenIdToBreed(token_id))
    print("Dog breed of tokenId {} is {}".format(token_id, breed))
    return transaction

@PatrickAlphaC
Copy link
Owner

I just pushed some updates, could you pull and try again?

We now listen for events instead of just doing time.sleep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants