Skip to content

Instantly share code, notes, and snippets.

@Athiriyya
Athiriyya / package.json
Last active July 13, 2022 18:52
Parse Defi Kingdoms Quests, Node.js
{
"name": "parse_quests_node",
"version": "1.0.0",
"description": "Parse Defi Kingdoms quest rewards",
"main": "parse_dfk_quest.js",
"type": "module",
"scripts": {
"start": "node parse_dfk_quest.js"
},
"author": "Athiriyya",
@Athiriyya
Athiriyya / parse_dfk_quest_results.py
Last active July 8, 2022 15:23
Python code to parse the results of a Defi Kingdoms quest
#! /usr/bin/env python
from copy import deepcopy
import logging
import sys
from web3 import Web3
from web3.logs import DISCARD
from dfktools.quests.quest_core_v1 import CONTRACT_ADDRESS as QUEST_V1_CONTRACT_ADDRESS
from dfktools.quests.quest_core_v1 import ABI as QUEST_V1_ABI