Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Commit

Permalink
feat: v0.15.0-alpha.1 nibiru_proto code gen
Browse files Browse the repository at this point in the history
  • Loading branch information
Unique-Divine committed Oct 10, 2022
1 parent 58e7501 commit b4f4215
Show file tree
Hide file tree
Showing 52 changed files with 1,146 additions and 763 deletions.
23 changes: 4 additions & 19 deletions nibiru_proto/proto/epochs/genesis_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 3 additions & 51 deletions nibiru_proto/proto/epochs/genesis_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,72 +3,24 @@
isort:skip_file
"""
import builtins
import epochs.state_pb2
import google.protobuf.descriptor
import google.protobuf.duration_pb2
import google.protobuf.internal.containers
import google.protobuf.message
import google.protobuf.timestamp_pb2
import typing
import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class EpochInfo(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
IDENTIFIER_FIELD_NUMBER: builtins.int
START_TIME_FIELD_NUMBER: builtins.int
DURATION_FIELD_NUMBER: builtins.int
CURRENT_EPOCH_FIELD_NUMBER: builtins.int
CURRENT_EPOCH_START_TIME_FIELD_NUMBER: builtins.int
EPOCH_COUNTING_STARTED_FIELD_NUMBER: builtins.int
CURRENT_EPOCH_START_HEIGHT_FIELD_NUMBER: builtins.int
identifier: typing.Text
"""A string identifier for the epoch. e.g. "15min" or "1hour" """

@property
def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
"""When the epoch repetitino should start."""
pass
@property
def duration(self) -> google.protobuf.duration_pb2.Duration:
"""How long each epoch lasts for."""
pass
current_epoch: builtins.int
"""The current epoch number, starting from 1."""

@property
def current_epoch_start_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
"""The start timestamp of the current epoch."""
pass
epoch_counting_started: builtins.bool
"""Whether or not this epoch has started. Set to true if current blocktime >= start_time."""

current_epoch_start_height: builtins.int
"""The block height at which the current epoch started at."""

def __init__(self,
*,
identifier: typing.Text = ...,
start_time: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
duration: typing.Optional[google.protobuf.duration_pb2.Duration] = ...,
current_epoch: builtins.int = ...,
current_epoch_start_time: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
epoch_counting_started: builtins.bool = ...,
current_epoch_start_height: builtins.int = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["current_epoch_start_time",b"current_epoch_start_time","duration",b"duration","start_time",b"start_time"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["current_epoch",b"current_epoch","current_epoch_start_height",b"current_epoch_start_height","current_epoch_start_time",b"current_epoch_start_time","duration",b"duration","epoch_counting_started",b"epoch_counting_started","identifier",b"identifier","start_time",b"start_time"]) -> None: ...
global___EpochInfo = EpochInfo

class GenesisState(google.protobuf.message.Message):
"""GenesisState defines the epochs module's genesis state."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
EPOCHS_FIELD_NUMBER: builtins.int
@property
def epochs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___EpochInfo]: ...
def epochs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[epochs.state_pb2.EpochInfo]: ...
def __init__(self,
*,
epochs: typing.Optional[typing.Iterable[global___EpochInfo]] = ...,
epochs: typing.Optional[typing.Iterable[epochs.state_pb2.EpochInfo]] = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["epochs",b"epochs"]) -> None: ...
global___GenesisState = GenesisState
24 changes: 12 additions & 12 deletions nibiru_proto/proto/epochs/query_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions nibiru_proto/proto/epochs/query_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
isort:skip_file
"""
import builtins
import epochs.genesis_pb2
import epochs.state_pb2
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.message
Expand All @@ -22,10 +22,10 @@ class QueryEpochsInfoResponse(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
EPOCHS_FIELD_NUMBER: builtins.int
@property
def epochs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[epochs.genesis_pb2.EpochInfo]: ...
def epochs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[epochs.state_pb2.EpochInfo]: ...
def __init__(self,
*,
epochs: typing.Optional[typing.Iterable[epochs.genesis_pb2.EpochInfo]] = ...,
epochs: typing.Optional[typing.Iterable[epochs.state_pb2.EpochInfo]] = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["epochs",b"epochs"]) -> None: ...
global___QueryEpochsInfoResponse = QueryEpochsInfoResponse
Expand Down
44 changes: 44 additions & 0 deletions nibiru_proto/proto/epochs/state_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 60 additions & 0 deletions nibiru_proto/proto/epochs/state_pb2.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
"""
import builtins
import google.protobuf.descriptor
import google.protobuf.duration_pb2
import google.protobuf.message
import google.protobuf.timestamp_pb2
import typing
import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class EpochInfo(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
IDENTIFIER_FIELD_NUMBER: builtins.int
START_TIME_FIELD_NUMBER: builtins.int
DURATION_FIELD_NUMBER: builtins.int
CURRENT_EPOCH_FIELD_NUMBER: builtins.int
CURRENT_EPOCH_START_TIME_FIELD_NUMBER: builtins.int
EPOCH_COUNTING_STARTED_FIELD_NUMBER: builtins.int
CURRENT_EPOCH_START_HEIGHT_FIELD_NUMBER: builtins.int
identifier: typing.Text
"""A string identifier for the epoch. e.g. "15min" or "1hour" """

@property
def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
"""When the epoch repetitino should start."""
pass
@property
def duration(self) -> google.protobuf.duration_pb2.Duration:
"""How long each epoch lasts for."""
pass
current_epoch: builtins.int
"""The current epoch number, starting from 1."""

@property
def current_epoch_start_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
"""The start timestamp of the current epoch."""
pass
epoch_counting_started: builtins.bool
"""Whether or not this epoch has started. Set to true if current blocktime >= start_time."""

current_epoch_start_height: builtins.int
"""The block height at which the current epoch started at."""

def __init__(self,
*,
identifier: typing.Text = ...,
start_time: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
duration: typing.Optional[google.protobuf.duration_pb2.Duration] = ...,
current_epoch: builtins.int = ...,
current_epoch_start_time: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
epoch_counting_started: builtins.bool = ...,
current_epoch_start_height: builtins.int = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["current_epoch_start_time",b"current_epoch_start_time","duration",b"duration","start_time",b"start_time"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["current_epoch",b"current_epoch","current_epoch_start_height",b"current_epoch_start_height","current_epoch_start_time",b"current_epoch_start_time","duration",b"duration","epoch_counting_started",b"epoch_counting_started","identifier",b"identifier","start_time",b"start_time"]) -> None: ...
global___EpochInfo = EpochInfo
Loading

0 comments on commit b4f4215

Please sign in to comment.