2024-05-10 16:30:28 +00:00
|
|
|
syntax = "proto3";
|
2024-09-27 03:04:45 +00:00
|
|
|
package zgc.precisebank.v1;
|
2024-05-10 16:30:28 +00:00
|
|
|
|
2024-05-13 21:16:05 +00:00
|
|
|
import "cosmos_proto/cosmos.proto";
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
|
2024-09-25 15:31:20 +00:00
|
|
|
option go_package = "github.com/0glabs/0g-chain/x/precisebank/types";
|
2024-05-10 16:30:28 +00:00
|
|
|
|
|
|
|
// GenesisState defines the precisebank module's genesis state.
|
2024-05-13 21:16:05 +00:00
|
|
|
message GenesisState {
|
|
|
|
// balances is a list of all the balances in the precisebank module.
|
|
|
|
repeated FractionalBalance balances = 1 [
|
|
|
|
(gogoproto.castrepeated) = "FractionalBalances",
|
|
|
|
(gogoproto.nullable) = false
|
|
|
|
];
|
2024-05-15 21:07:24 +00:00
|
|
|
|
|
|
|
// remainder is an internal value of how much extra fractional digits are
|
|
|
|
// still backed by the reserve, but not assigned to any account.
|
|
|
|
string remainder = 2 [
|
|
|
|
(cosmos_proto.scalar) = "cosmos.Int",
|
|
|
|
(gogoproto.customtype) = "cosmossdk.io/math.Int",
|
|
|
|
(gogoproto.nullable) = false
|
|
|
|
];
|
2024-05-13 21:16:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// FractionalBalance defines the fractional portion of an account balance
|
|
|
|
message FractionalBalance {
|
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
// address is the address of the balance holder.
|
|
|
|
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
|
|
|
|
// amount indicates amount of only the fractional balance owned by the
|
|
|
|
// address. FractionalBalance currently only supports tracking 1 single asset,
|
|
|
|
// e.g. fractional balances of ukava.
|
|
|
|
string amount = 2 [
|
|
|
|
(cosmos_proto.scalar) = "cosmos.Int",
|
|
|
|
(gogoproto.customtype) = "cosmossdk.io/math.Int",
|
|
|
|
(gogoproto.nullable) = false
|
|
|
|
];
|
|
|
|
}
|