forked from cerc-io/laconicd
Setup and integrate bond module into the chain (#2)
* Add common message types and update proto gen script * Update proto gen script to generate pulsar proto code * Upgrade direct deps * Populate params and genesis files * Setup keeper files * Setup module files with depinject and autocli * Add placeholder keeper methods * Integrate bond module into the chain
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cerc.bond.module.v1;
|
||||
|
||||
import "cosmos/app/v1alpha1/module.proto";
|
||||
|
||||
// Module is the app config object of the module.
|
||||
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
|
||||
message Module {
|
||||
option (cosmos.app.v1alpha1.module) = {
|
||||
go_import : "git.vdb.to/cerc-io/laconic2d/x/bond"
|
||||
};
|
||||
|
||||
// TODO: Setup any config required
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cerc.bond.v1;
|
||||
|
||||
option go_package = "git.vdb.to/cerc-io/laconic2d/x/bond";
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
|
||||
// Params defines the parameters of the bond module.
|
||||
message Params {
|
||||
// max_bond_amount is maximum amount to bond
|
||||
cosmos.base.v1beta1.Coin max_bond_amount = 1
|
||||
[
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"max_bond_amount\" yaml:\"max_bond_amount\""
|
||||
];
|
||||
}
|
||||
|
||||
// Bond represents funds deposited by an account for record rent payments.
|
||||
message Bond {
|
||||
// id is unique identifier of the bond
|
||||
string id = 1;
|
||||
|
||||
// owner of the bond
|
||||
string owner = 2;
|
||||
|
||||
// balance of the bond
|
||||
repeated cosmos.base.v1beta1.Coin balance = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "json:\"balance\" yaml:\"balance\""
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cerc.bond.v1;
|
||||
|
||||
option go_package = "git.vdb.to/cerc-io/laconic2d/x/bond";
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cerc/bond/v1/bond.proto";
|
||||
|
||||
// GenesisState defines the bond module's genesis state.
|
||||
message GenesisState {
|
||||
// params defines all the parameters of the module.
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// bonds defines all the bonds
|
||||
repeated Bond bonds = 2 [(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user