statechain type and message update
Thanks @jpthor for explaining the calculations behind the project,Calculation is super helpful Following that I believe there are three different type of actions will happen on statechain
- Stake -
MsgSetStakeData
- Unstake -
MsgSetUnStake
- Swap -
MsgSwap
There will have two types of information that need to be stored into statechain's KV store.
PoolStruct
and Staker
PoolStruct will be changed when Stake, UnStake , and Swap happens, we will not directly mutate PoolStruct Staker will add when they stake , removed when they unstake
I believe we need to keep the address on binance chain for pool , and staker , thus I added it to the structure
In this PR I defined some of the new structure to implement these logic correctly, and also please pay attentions to the TODO
comments I put in , basically if I think those are not needed , then they are the target for removal.
@jpthor @bmcd_brent Could you please review this PR, and add comments if you disagree