0chain / zwalletcli

A client CLI using GoSDK to interface the blockchain, and smart contracts for interest, lock, stake, and vesting
Other
21 stars 16 forks source link

Mint WZCN does not work for the first time ZCN burning #299

Closed peterlimg closed 1 year ago

peterlimg commented 1 year ago

The bridge-burn-zcn could work well, but when run bridge-mint-wzcn, it would say found no none processed burn tickets. This is because bridge-mint-wzcn will get user mint nonce first, and the value is 1, then request none processed tickets from 0chain. However, the burn ticket is with nonce value 1, the query API will only return tickets that is greater than 1 here, therefore, no tickets will be returned actually. So the problem might be in the first step, the user minted nonce should be 0 if we haven't minted before. Need further investigation.

peterlimg commented 1 year ago

The user nonce in SC was set in another network, so it's not a problem actually.