Skip to content

Commit

Permalink
chore(proto): update generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Nov 15, 2024
1 parent 00930fc commit 70f8bb5
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 36 deletions.
141 changes: 105 additions & 36 deletions golang/cosmos/x/vbank/types/vbank.pb.go

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

7 changes: 7 additions & 0 deletions packages/cosmic-proto/proto/agoric/vbank/vbank.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ message Params {
int64 reward_smoothing_blocks = 3 [
(gogoproto.moretags) = "yaml:\"reward_smoothing_blocks\""
];

// allowed_monitoring_accounts is an array of account addresses that can be
// monitored for sends and receives. An element of `"*"` will permit any
// address. An element of `"!"` will deny all addresses.
repeated string allowed_monitoring_accounts = 4 [
(gogoproto.moretags) = "yaml:\"allowed_monitoring_accounts\""
];
}

// The current state of the module.
Expand Down
28 changes: 28 additions & 0 deletions packages/cosmic-proto/src/codegen/agoric/vbank/vbank.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ export interface Params {
* reward_epoch_duration_blocks.
*/
rewardSmoothingBlocks: bigint;
/**
* allowed_monitoring_accounts is an array of account addresses that can be
* monitored for sends and receives. An element of `"*"` will permit any
* address. An element of `"!"` will deny all addresses.
*/
allowedMonitoringAccounts: string[];
}
export interface ParamsProtoMsg {
typeUrl: '/agoric.vbank.Params';
Expand All @@ -33,6 +39,7 @@ export interface ParamsSDKType {
reward_epoch_duration_blocks: bigint;
per_epoch_reward_fraction: string;
reward_smoothing_blocks: bigint;
allowed_monitoring_accounts: string[];
}
/** The current state of the module. */
export interface State {
Expand Down Expand Up @@ -67,6 +74,7 @@ function createBaseParams(): Params {
rewardEpochDurationBlocks: BigInt(0),
perEpochRewardFraction: '',
rewardSmoothingBlocks: BigInt(0),
allowedMonitoringAccounts: [],
};
}
export const Params = {
Expand All @@ -88,6 +96,9 @@ export const Params = {
if (message.rewardSmoothingBlocks !== BigInt(0)) {
writer.uint32(24).int64(message.rewardSmoothingBlocks);
}
for (const v of message.allowedMonitoringAccounts) {
writer.uint32(34).string(v!);
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): Params {
Expand All @@ -110,6 +121,9 @@ export const Params = {
case 3:
message.rewardSmoothingBlocks = reader.int64();
break;
case 4:
message.allowedMonitoringAccounts.push(reader.string());
break;
default:
reader.skipType(tag & 7);
break;
Expand All @@ -128,6 +142,11 @@ export const Params = {
rewardSmoothingBlocks: isSet(object.rewardSmoothingBlocks)
? BigInt(object.rewardSmoothingBlocks.toString())
: BigInt(0),
allowedMonitoringAccounts: Array.isArray(
object?.allowedMonitoringAccounts,
)
? object.allowedMonitoringAccounts.map((e: any) => String(e))
: [],
};
},
toJSON(message: Params): JsonSafe<Params> {
Expand All @@ -142,6 +161,13 @@ export const Params = {
(obj.rewardSmoothingBlocks = (
message.rewardSmoothingBlocks || BigInt(0)
).toString());
if (message.allowedMonitoringAccounts) {
obj.allowedMonitoringAccounts = message.allowedMonitoringAccounts.map(
e => e,
);
} else {
obj.allowedMonitoringAccounts = [];
}
return obj;
},
fromPartial(object: Partial<Params>): Params {
Expand All @@ -157,6 +183,8 @@ export const Params = {
object.rewardSmoothingBlocks !== null
? BigInt(object.rewardSmoothingBlocks.toString())
: BigInt(0);
message.allowedMonitoringAccounts =
object.allowedMonitoringAccounts?.map(e => e) || [];
return message;
},
fromProtoMsg(message: ParamsProtoMsg): Params {
Expand Down

0 comments on commit 70f8bb5

Please sign in to comment.