dfktools icon indicating copy to clipboard operation
dfktools copied to clipboard

How to start crystalvale mining quest or v1 quests

Open mateiQA opened this issue 3 years ago • 2 comments

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

mateiQA avatar Aug 06 '22 23:08 mateiQA

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')

Athiriyya avatar Aug 07 '22 00:08 Athiriyya

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

mateiQA avatar Aug 07 '22 07:08 mateiQA

Crystalvale minning is available on v0.1.4

0rtis avatar Aug 15 '22 13:08 0rtis

@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.

mateiQA avatar Aug 15 '22 17:08 mateiQA

Indeed

0rtis avatar Aug 16 '22 07:08 0rtis

Fixed in a4bd5dd

0rtis avatar Aug 16 '22 13:08 0rtis