State Transitions
These messages (Msg) in the energy module trigger state transitions.
Value may represents {V}, {A} and {A,V}
Route Key-Value storage is `0x00 | Source | Destination -> ProtocolBuffer(Route)`
Value Key-Value storage is `0x01 | Destination -> ProtocolBuffer(Value)`
Route creation
- Save destination account if account not already exist in storage (sdk's account keeper)
- Save route with given source, destination, alias and empty route value if route not already exist
- Call
OnCoinsTransfer cyberbank's module hook to trigger index of balances to update with destination account (not storage)
Route set
- If route have zero value than escrow new value into
EnergyGrid account
- If route have old value more than new value to set than send
SendCoinsFromModuleToAccount from EnergyGrid account to source account difference between old and new values (old-new)
- If route have old value less than new value to set than escrow with
SendCoinsFromAccountToModule from source account to EnergyGrid account difference between new and old values (new-old)
- Update routed to destination energy value (add of sub value)
- Update route with updated value
- Call
OnCoinsTransfer cyberbank's module hook to trigger index of balances to update with source and destination accounts (not storage)
Route's alias edit
- Update route with new alias
Route remove
- Send
SendCoinsFromModuleToAccount from EnergyGrid account to source account route value (volts and amperes)
- Update routed to destination energy value (sub value)
- Remove route
- Call
OnCoinsTransfer cyberbank's module hook to trigger index of balances to update with source and destination accounts (not storage)
Import routes on genesis
- Initialize or update (add) routed to destination value
- Set route
- Call
OnCoinsTransfer cyberbank's module hook to trigger index of balances to update with source and destination accounts (not storage)
Synonyms
go-cyber/x/cyberbank/spec/03_state_transitions
go-cyber/x/resources/spec/03_state_transitions
State Transitions These messages (Msg) in the resources module trigger state transitions. Investmint 1. Check that the desirable period of lock is less than the currently available maximum period of lock 2. Check that the spendable balance is more than or equal to the desired amount to lock 3.…
space-pussy/x/resources/spec/03_state_transitions
State Transitions These messages (Msg) in the resources module trigger state transitions. Investmint 1. Check that the desirable period of lock is less than the currently available maximum period of lock 2. Check that the spendable balance is more than or equal to the desired amount to lock 3.…
go-cyber/x/bandwidth/spec/03_state_transitions
State Transitions [WIP] Bandwidth module doesn't have own messages that trigger state transition. State transition is happen in such cases: Processing of transaction with cyberlinks messages in transaction middleware (ante handler) 1. calculate total bandwidth amount for all cyberlinks messages in…
space-pussy/x/cyberbank/spec/03_state_transitions
space-pussy/x/bandwidth/spec/03_state_transitions
State Transitions [WIP] Bandwidth module doesn't have own messages that trigger state transition. State transition is happen in such cases: Processing of transaction with cyberlinks messages in transaction middleware (ante handler) 1. calculate total bandwidth amount for all cyberlinks messages in…
go-cyber/x/grid/spec/03_state_transitions
State Transitions These messages (Msg) in the energy module trigger state transitions. Route creation 1. Save destination account if account not already exist in storage (sdk's account keeper) 2. Save route with given source, destination, alias and empty route value if route not already exist 3.…
go-cyber/x/liquidity/spec/03_state_transitions
State Transitions These messages (Msg) in the liquidity module trigger state transitions. Coin Escrow for Liquidity Module Messages Transaction confirmation causes state transition on the [Bank](https://docs.cosmos.network/master/modules/bank/) module. Some messages on the…