kaiachain / kaia

GNU Lesser General Public License v3.0
5 stars 10 forks source link

api: set kairos testnet burnt amount correctly for totalSupply api #23

Closed yoomee1313 closed 1 week ago

yoomee1313 commented 2 weeks ago

Proposed changes

Types of changes

Please put an x in the boxes related to your change.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Related issues

Further comments

Tested at private network and the burnt amount is changed like below. This is testnet so zeroed and allocated amount is not set or balance is not allocated.

> klay.getTotalSupply('latest')
{
  burntFee: "0x12ab5b35b946200",
  deadBurn: "0x0",
  error: "cannot determine rebalance (kip103, kip160) burn amount: rebalance memo not yet stored",
  kip103Burn: "0x0",
  kip160Burn: null,
  number: "0x25d",
  totalBurnt: null,
  totalMinted: "0x111b0ec57e6499a1f4b117ef38222bc7ce207903800",
  totalSupply: null,
  zeroBurn: "0x0"
}
> klay.getTotalSupply('latest')
{
  burntFee: "0x12fe5e19693ce00",
  deadBurn: "0x0",
  kip103Burn: "0x0",
  kip160Burn: "-0xbf82646906be407e42a4800",
  number: "0x282",
  totalBurnt: "-0xbf826468f3bfe264d967a00",
  totalMinted: "0x111b0ec57e6499a1f4b117ef395642062f3e2503800",
  totalSupply: "0x111b0ec57e6499a1f4b1d7719dbf35c611a2fe6b200",
  zeroBurn: "0x0"
}
github-actions[bot] commented 2 weeks ago

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

yoomee1313 commented 2 weeks ago

I have read the CLA Document and I hereby sign the CLA