ExocoreNetwork / exocore

5 stars 9 forks source link

Allow Query Delegation/Assets with Staker Checksum Address #66

Closed cloud8little closed 4 weeks ago

cloud8little commented 1 month ago

Summary of Bug

Currently when query staker asset info or delegation info, the stakerID is the formatted with _, and staker_address here must be all lower case.

Version

https://github.com/ExocoreNetwork/exocore/commit/c83c75f7c3bc81affa67bda7f6680ee38269c58b the latest commit of develop branch.

Steps to Reproduce

Take the account 0x968001CDCf7558611B1c07c584948E47f009c6D6 for example, the address is copied from etherscan, and its with checksum formatted. the account deposit 2e18 ERC20 token, and query the staker info with following command.

exocored query assets QueStakerAssetInfos 0x968001CDCf7558611B1c07c584948E47f009c6D6_0x9ce1 --node http://localhost:20000
asset_infos: {}
exocored query assets QueStakerAssetInfos 0x968001cdcf7558611b1c07c584948e47f009c6d6_0x9ce1 --node http://localhost:20000
asset_infos:
  0x83e6850591425e3c1e263c054f4466838b9bd9e4_0x9ce1:
    total_deposit_amount: "2000000000000000000"
    wait_unbonding_amount: "0"
    withdrawable_amount: "2000000000000000000"

the same issue with query delegation info.

exocored query delegation QueryDelegationInfo 0x6e5eE3e436539f46455b5174411942F520c1120E_0x9ce1 0x83e6850591425e3c1e263c054f4466838b9bd9e4_0x9ce1 --node http://localhost:20000
delegation_infos: {}
exocored query delegation QueryDelegationInfo 0x6e5ee3e436539f46455b5174411942f520c1120e_0x9ce1 0x83e6850591425e3c1e263c054f4466838b9bd9e4_0x9ce1 --node http://localhost:20000
delegation_infos:
  exo13hasr43vvq8v44xpzh0l6yuym4kca98f87j7ac:
    undelegatable_share: "1000000000000000000000.000000000000000000"
    wait_undelegation_amount: "0"

Screenshots

Additional context


For Admin Use

cloud8little commented 4 weeks ago

Resolved by fix #80