Open the-lost-kite opened 2 years ago
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
I just pushed some updates, could you pull and try again?
We now listen for events instead of just doing time.sleep
Please add a detailed list of steps you took to get here.