-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: refactor the protobuf directory path
- Loading branch information
1 parent
92c95dd
commit 9f614dc
Showing
37 changed files
with
493 additions
and
438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
.../exocore/feedistribute/distribution.proto → ...ocore/feedistribute/v1/distribution.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
proto/exocore/feedistribute/genesis.proto → proto/exocore/feedistribute/v1/genesis.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
proto/exocore/feedistribute/params.proto → proto/exocore/feedistribute/v1/params.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
proto/exocore/feedistribute/query.proto → proto/exocore/feedistribute/v1/query.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
proto/exocore/feedistribute/tx.proto → proto/exocore/feedistribute/v1/tx.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
proto/exocore/reward/genesis.proto → proto/exocore/reward/v1/genesis.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
proto/exocore/reward/params.proto → proto/exocore/reward/v1/params.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
proto/exocore/reward/query.proto → proto/exocore/reward/v1/query.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
proto/exocore/reward/tx.proto → proto/exocore/reward/v1/tx.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
proto/exocore/reward/types.proto → proto/exocore/reward/v1/types.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
proto/exocore/slash/genesis.proto → proto/exocore/slash/v1/genesis.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
proto/exocore/slash/params.proto → proto/exocore/slash/v1/params.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
proto/exocore/slash/query.proto → proto/exocore/slash/v1/query.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
proto/exocore/slash/tx.proto → proto/exocore/slash/v1/tx.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,36 @@ | ||
package keeper | ||
|
||
import sdk "github.com/cosmos/cosmos-sdk/types" | ||
import ( | ||
epochstypes "github.com/ExocoreNetwork/exocore/x/epochs/types" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
// EpochsHooksWrapper is the wrapper structure that implements the epochs hooks for the avs | ||
// keeper. | ||
type EpochsHooksWrapper struct { | ||
keeper *Keeper | ||
} | ||
|
||
// Interface guard | ||
var _ epochstypes.EpochHooks = EpochsHooksWrapper{} | ||
|
||
// BeforeEpochStart: noop, We don't need to do anything here | ||
func (k Keeper) BeforeEpochStart(_ sdk.Context, _ string, _ int64) { | ||
func (wrapper EpochsHooksWrapper) BeforeEpochStart(_ sdk.Context, _ string, _ int64) { | ||
} | ||
|
||
// AfterEpochEnd mints and allocates coins at the end of each epoch end | ||
func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, _ int64) { | ||
expEpochID := k.GetEpochIdentifier(ctx) | ||
func (wrapper EpochsHooksWrapper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, _ int64) { | ||
expEpochID := wrapper.keeper.GetEpochIdentifier(ctx) | ||
if epochIdentifier != expEpochID { | ||
return | ||
} | ||
// the minted coins generated by minting module will do the token allocation distribution here | ||
// k.AllocateTokens() | ||
previousTotalPower := wrapper.keeper.StakingKeeper.GetLastTotalPower(ctx) | ||
|
||
err := wrapper.keeper.AllocateTokens(ctx, previousTotalPower.Int64()) | ||
if err != nil { | ||
logger := wrapper.keeper.Logger() | ||
logger.Error("failed to allocate tokens", "err", err) | ||
return | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
x/feedistribution/module/module.go → x/feedistribution/module.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package feedistribute | ||
package feedistribution | ||
|
||
import ( | ||
"context" | ||
|
Oops, something went wrong.