Skip to content

Commit

Permalink
Merge pull request #9116 from Agoric/ta/upstream-telescope
Browse files Browse the repository at this point in the history
chore(deps): bump telescope to latest (with our patch)
  • Loading branch information
mergify[bot] authored Mar 21, 2024
2 parents 3eb4230 + 1469ce7 commit 0025f91
Show file tree
Hide file tree
Showing 32 changed files with 519 additions and 566 deletions.
2 changes: 1 addition & 1 deletion packages/cosmic-proto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"devDependencies": {
"@agoric/cosmos": "^0.34.1",
"@ava/typescript": "^4.1.0",
"@cosmology/telescope": "^1.0.1",
"@cosmology/telescope": "^1.5.1",
"ava": "^5.3.1",
"publish-scripts": "0.1.0",
"rimraf": "^5.0.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/cosmic-proto/scripts/codegen.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ telescope({
protoDirs,
outPath,
options: {
// for ESM compatibility
restoreImportExtension: '.js',
tsDisable: {
// FIXME types aren't resolving correctly
disableAll: true,
Expand Down
4 changes: 2 additions & 2 deletions packages/cosmic-proto/src/codegen/agoric/lien/genesis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const GenesisState = {
e ? AccountLien.toAmino(e) : undefined,
);
} else {
obj.liens = [];
obj.liens = message.liens;
}
return obj;
},
Expand Down Expand Up @@ -213,7 +213,7 @@ export const AccountLien = {
},
toAmino(message: AccountLien): AccountLienAmino {
const obj: any = {};
obj.address = message.address;
obj.address = message.address === '' ? undefined : message.address;
obj.lien = message.lien ? Lien.toAmino(message.lien) : undefined;
return obj;
},
Expand Down
4 changes: 2 additions & 2 deletions packages/cosmic-proto/src/codegen/agoric/lien/lien.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ export const Lien = {
if (message.coins) {
obj.coins = message.coins.map(e => (e ? Coin.toAmino(e) : undefined));
} else {
obj.coins = [];
obj.coins = message.coins;
}
if (message.delegated) {
obj.delegated = message.delegated.map(e =>
e ? Coin.toAmino(e) : undefined,
);
} else {
obj.delegated = [];
obj.delegated = message.delegated;
}
return obj;
},
Expand Down
8 changes: 4 additions & 4 deletions packages/cosmic-proto/src/codegen/agoric/swingset/genesis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface GenesisStateProtoMsg {
export interface GenesisStateAmino {
params?: ParamsAmino;
state?: StateAmino;
swing_store_export_data?: SwingStoreExportDataEntryAmino[];
swing_store_export_data: SwingStoreExportDataEntryAmino[];
}
export interface GenesisStateAminoMsg {
type: '/agoric.swingset.GenesisState';
Expand Down Expand Up @@ -173,7 +173,7 @@ export const GenesisState = {
e ? SwingStoreExportDataEntry.toAmino(e) : undefined,
);
} else {
obj.swing_store_export_data = [];
obj.swing_store_export_data = message.swingStoreExportData;
}
return obj;
},
Expand Down Expand Up @@ -269,8 +269,8 @@ export const SwingStoreExportDataEntry = {
},
toAmino(message: SwingStoreExportDataEntry): SwingStoreExportDataEntryAmino {
const obj: any = {};
obj.key = message.key;
obj.value = message.value;
obj.key = message.key === '' ? undefined : message.key;
obj.value = message.value === '' ? undefined : message.value;
return obj;
},
fromAminoMsg(
Expand Down
69 changes: 31 additions & 38 deletions packages/cosmic-proto/src/codegen/agoric/swingset/msgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export interface MsgDeliverInboundProtoMsg {
}
/** MsgDeliverInbound defines an SDK message for delivering an eventual send */
export interface MsgDeliverInboundAmino {
messages?: string[];
nums?: string[];
ack?: string;
submitter?: string;
messages: string[];
nums: string[];
ack: string;
submitter: string;
}
export interface MsgDeliverInboundAminoMsg {
type: '/agoric.swingset.MsgDeliverInbound';
Expand Down Expand Up @@ -64,7 +64,7 @@ export interface MsgWalletActionProtoMsg {
* message type is typically protected by feegrant budgets.
*/
export interface MsgWalletActionAmino {
owner?: string;
owner: string;
/** The action to perform, as JSON-stringified marshalled data. */
action?: string;
}
Expand Down Expand Up @@ -115,7 +115,7 @@ export interface MsgWalletSpendActionProtoMsg {
* typically protected by explicit confirmation by the user.
*/
export interface MsgWalletSpendActionAmino {
owner?: string;
owner: string;
/** The action to perform, as JSON-stringified marshalled data. */
spend_action?: string;
}
Expand Down Expand Up @@ -159,10 +159,10 @@ export interface MsgProvisionProtoMsg {
}
/** MsgProvision defines an SDK message for provisioning a client to the chain */
export interface MsgProvisionAmino {
nickname?: string;
address?: string;
power_flags?: string[];
submitter?: string;
nickname: string;
address: string;
power_flags: string[];
submitter: string;
}
export interface MsgProvisionAminoMsg {
type: '/agoric.swingset.MsgProvision';
Expand Down Expand Up @@ -207,15 +207,15 @@ export interface MsgInstallBundleProtoMsg {
}
/** MsgInstallBundle carries a signed bundle to SwingSet. */
export interface MsgInstallBundleAmino {
bundle?: string;
submitter?: string;
bundle: string;
submitter: string;
/**
* Either bundle or compressed_bundle will be set.
* Default compression algorithm is gzip.
*/
compressed_bundle?: string;
compressed_bundle: string;
/** Size in bytes of uncompression of compressed_bundle. */
uncompressed_size?: string;
uncompressed_size: string;
}
export interface MsgInstallBundleAminoMsg {
type: '/agoric.swingset.MsgInstallBundle';
Expand Down Expand Up @@ -377,17 +377,15 @@ export const MsgDeliverInbound = {
if (message.messages) {
obj.messages = message.messages.map(e => e);
} else {
obj.messages = [];
obj.messages = message.messages;
}
if (message.nums) {
obj.nums = message.nums.map(e => e.toString());
} else {
obj.nums = [];
obj.nums = message.nums;
}
obj.ack = message.ack ? message.ack.toString() : undefined;
obj.submitter = message.submitter
? base64FromBytes(message.submitter)
: undefined;
obj.ack = message.ack ? message.ack.toString() : '0';
obj.submitter = message.submitter ? base64FromBytes(message.submitter) : '';
return obj;
},
fromAminoMsg(object: MsgDeliverInboundAminoMsg): MsgDeliverInbound {
Expand Down Expand Up @@ -554,8 +552,8 @@ export const MsgWalletAction = {
},
toAmino(message: MsgWalletAction): MsgWalletActionAmino {
const obj: any = {};
obj.owner = message.owner ? base64FromBytes(message.owner) : undefined;
obj.action = message.action;
obj.owner = message.owner ? base64FromBytes(message.owner) : '';
obj.action = message.action === '' ? undefined : message.action;
return obj;
},
fromAminoMsg(object: MsgWalletActionAminoMsg): MsgWalletAction {
Expand Down Expand Up @@ -724,8 +722,9 @@ export const MsgWalletSpendAction = {
},
toAmino(message: MsgWalletSpendAction): MsgWalletSpendActionAmino {
const obj: any = {};
obj.owner = message.owner ? base64FromBytes(message.owner) : undefined;
obj.spend_action = message.spendAction;
obj.owner = message.owner ? base64FromBytes(message.owner) : '';
obj.spend_action =
message.spendAction === '' ? undefined : message.spendAction;
return obj;
},
fromAminoMsg(object: MsgWalletSpendActionAminoMsg): MsgWalletSpendAction {
Expand Down Expand Up @@ -929,18 +928,14 @@ export const MsgProvision = {
},
toAmino(message: MsgProvision): MsgProvisionAmino {
const obj: any = {};
obj.nickname = message.nickname;
obj.address = message.address
? base64FromBytes(message.address)
: undefined;
obj.nickname = message.nickname ?? '';
obj.address = message.address ? base64FromBytes(message.address) : '';
if (message.powerFlags) {
obj.power_flags = message.powerFlags.map(e => e);
} else {
obj.power_flags = [];
obj.power_flags = message.powerFlags;
}
obj.submitter = message.submitter
? base64FromBytes(message.submitter)
: undefined;
obj.submitter = message.submitter ? base64FromBytes(message.submitter) : '';
return obj;
},
fromAminoMsg(object: MsgProvisionAminoMsg): MsgProvision {
Expand Down Expand Up @@ -1146,16 +1141,14 @@ export const MsgInstallBundle = {
},
toAmino(message: MsgInstallBundle): MsgInstallBundleAmino {
const obj: any = {};
obj.bundle = message.bundle;
obj.submitter = message.submitter
? base64FromBytes(message.submitter)
: undefined;
obj.bundle = message.bundle ?? '';
obj.submitter = message.submitter ? base64FromBytes(message.submitter) : '';
obj.compressed_bundle = message.compressedBundle
? base64FromBytes(message.compressedBundle)
: undefined;
: '';
obj.uncompressed_size = message.uncompressedSize
? message.uncompressedSize.toString()
: undefined;
: '0';
return obj;
},
fromAminoMsg(object: MsgInstallBundleAminoMsg): MsgInstallBundle {
Expand Down
12 changes: 6 additions & 6 deletions packages/cosmic-proto/src/codegen/agoric/swingset/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface QueryEgressRequestProtoMsg {
}
/** QueryEgressRequest is the request type for the Query/Egress RPC method */
export interface QueryEgressRequestAmino {
peer?: string;
peer: string;
}
export interface QueryEgressRequestAminoMsg {
type: '/agoric.swingset.QueryEgressRequest';
Expand Down Expand Up @@ -95,7 +95,7 @@ export interface QueryMailboxRequestProtoMsg {
}
/** QueryMailboxRequest is the mailbox query. */
export interface QueryMailboxRequestAmino {
peer?: string;
peer: string;
}
export interface QueryMailboxRequestAminoMsg {
type: '/agoric.swingset.QueryMailboxRequest';
Expand All @@ -115,7 +115,7 @@ export interface QueryMailboxResponseProtoMsg {
}
/** QueryMailboxResponse is the mailbox response. */
export interface QueryMailboxResponseAmino {
value?: string;
value: string;
}
export interface QueryMailboxResponseAminoMsg {
type: '/agoric.swingset.QueryMailboxResponse';
Expand Down Expand Up @@ -339,7 +339,7 @@ export const QueryEgressRequest = {
},
toAmino(message: QueryEgressRequest): QueryEgressRequestAmino {
const obj: any = {};
obj.peer = message.peer ? base64FromBytes(message.peer) : undefined;
obj.peer = message.peer ? base64FromBytes(message.peer) : '';
return obj;
},
fromAminoMsg(object: QueryEgressRequestAminoMsg): QueryEgressRequest {
Expand Down Expand Up @@ -508,7 +508,7 @@ export const QueryMailboxRequest = {
},
toAmino(message: QueryMailboxRequest): QueryMailboxRequestAmino {
const obj: any = {};
obj.peer = message.peer ? base64FromBytes(message.peer) : undefined;
obj.peer = message.peer ? base64FromBytes(message.peer) : '';
return obj;
},
fromAminoMsg(object: QueryMailboxRequestAminoMsg): QueryMailboxRequest {
Expand Down Expand Up @@ -588,7 +588,7 @@ export const QueryMailboxResponse = {
},
toAmino(message: QueryMailboxResponse): QueryMailboxResponseAmino {
const obj: any = {};
obj.value = message.value;
obj.value = message.value ?? '';
return obj;
},
fromAminoMsg(object: QueryMailboxResponseAminoMsg): QueryMailboxResponse {
Expand Down
Loading

0 comments on commit 0025f91

Please sign in to comment.