dfktools
dfktools copied to clipboard
How to start crystalvale mining quest or v1 quests
There is no info on how to start v1 quests for crystalvale like mining, also it seems that quest_core_v1 needs to be updated as to reflect the changes. If anyone can help us please let us know in a comment
All quests on Crystalvale use the V2 quest contracts. Here's a minimal mining example based on the quest_example.py file in this repo.
mining_example.py.txt
Starting a mining quest is the same as starting a Fishing quest, say, except :
- A) use the crystal mining quest address,
dfktools.quests.professions.mining.CRYSTALVALE_CRYSTAL_QUEST_CONTRACT_ADDRESS - B)
attempts = 1, not 4+ like fishing quests - C)
level = 0, not 1 like for training quests
(Note that this example assumes that PR 38 has been applied. The relevant info is this: CRYSTALVALE_CRYSTAL_QUEST_CONTRACT_ADDRESS = '0x98b3C85ac3cC3EF36Ff25A9229857AbACE3e7410')
Thanks @Athiriyya, I had no idea mining had changed to a v2 quest on crystalvale, thanks a lot for all the help, everything is working ok now
Crystalvale minning is available on v0.1.4
@0rtis one more issue I've run into is that when calling the complete_quest method, the call would throw an exception
tx_receipt = quest_v2.complete_quest(my_heroes_id[0], my_key, w3_crystalvale.eth.getTransactionCount(account_address), gas_price_gwei, tx_timeout)
DFK-hero|ERROR: Unsupported type. Must be one of integer, float, or string This is due to:
The quest v2 gas argument takes a dictionary argument for start_quest, but requires an integer arg for complete_quest.
Indeed
Fixed in a4bd5dd