Skip to content

Autogenerated Python wrapper for Defi Kingdoms Web3 contracts

Notifications You must be signed in to change notification settings

Athiriyya/dfk_contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DFK Contracts

DFK Contracts is a set of all current contracts for Defi Kingdoms, autogenerated from the contracts' ABI json files (findable on the DFK Devs pages). See the ABI Maker for more info on how this process works.

Installation

Use pip:

pip install dfk_contracts

Usage

To get access to ALL of a DFK's contracts, there's a special object:

from dfk_contracts.all_dfk_contracts import AllDfkContracts

# Use default Crystalvale RPC
all_cv_contracts = AllDfkContracts('cv')

# Or use a custom Serendale RPC
all_sd_contracts('sd', 'https://alternate.klaytn.rpc.com')

crystals = all_cv_contracts.crystal_core.get_user_crystals('0xYOUR_ADDRESS')

Each contract here can also be instantiated on its own, for example:

from dfk_contracts.contracts import crystal_core

# Use default Crystalvale RPC
cc = crystal_core.CrystalCore('cv')
crystals = cc.get_user_crystals('0xYOUR_ADDRESS')

Contact

File an issue, write me at [email protected], or find @Athiriyya on the GameFi Devs Discord.

About

Autogenerated Python wrapper for Defi Kingdoms Web3 contracts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages