Comments (4)
So, to get Jewel inventory on DFK Chain, you'll want to do:
rpc_server = 'https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc'
w3 = Web3(Web3.HTTPProvider(rpc_server))
amount_wei = w3.eth.get_balance(account_address)
amount = w3.fromWei(amount_wei, 'ether')
This is because Jewel is the 'Ethereum' of the DFK Chain. There is also wJEWEL
, which IS an ERC20 token. That's what gets awarded in gardening quests, for example. By some magic I don't totally understand, that wrapped Jewel gets turned into normal Jewel.
from dfktools.
Found that it's likely the contract address for CV Jewel isn't "0x4f60a160D8C2DDdaAfe16FCC57566dB84D674BD6" as per "get_realm_item_list". Looking at dfk-chain explorer, CV jewel is supposedly "Wrapped JEWEL - 0xCCb93dABD71c8Dad03Fc4CE5559dC3D89F67a260" but if you call balanceOf function with Wrapped JEWEL address on a wallet, it seems to return 0. Very strange...
from dfktools.
Ahh noted on the gas token part. I'm still very new to web3 dev work. Thanks for clarifying.
Nah, I'm using DFK Chain RPC. I swapped it out in my scripts. I've also had to change the UniswapV2Factory.py contract to reflect the DFK Chain's address to get my scripts to run. Otherwise it would be throwing errors. Basically, the current UniswapV2Factory.py script is pointing to the C-Chain address.
from dfktools.
Hey Athiriyya, yup that works! I'm still figuring out how to work with gas tokens properly for swaps. Thanks!
from dfktools.
Related Issues (20)
- question HOT 2
- pip package HOT 2
- Example for querying price of a token pair? HOT 1
- saleAuctions is not recent data HOT 1
- Quest is not working. Error:"is not in the chain after 30 seconds" HOT 1
- [Functionality] Tavern Data HOT 1
- startQuest() on new fishing/foraging contract
- Rewards not listed parse of quest v2 receipt HOT 1
- Quest cannot be started: "Error execution reverted: level not found" HOT 4
- Golding Mining Quest Contract not current HOT 2
- Issue with bid_hero HOT 2
- Add questV2 reward keys HOT 1
- How to retrieve latest hero purchases? HOT 3
- How to start crystalvale mining quest or v1 quests HOT 6
- Add cv contract address for uniswap_v2_factory.py HOT 1
- cant read some hero data
- Pet Contract HOT 1
- dfktear address fix HOT 1
- Single quest support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dfktools.