Skip to content

Commit

Permalink
test: drop testing proto registry
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Apr 5, 2024
1 parent 607d06e commit e37b916
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions packages/vats/src/proposals/localchain-test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
// @ts-check
import { E } from '@endo/far';
import {
makeProtoConverter,
typedJson,
getSigningAgoricClientOptions,
} from '@agoric/cosmic-proto';

const { registry } = getSigningAgoricClientOptions();
import { typedJson } from '@agoric/cosmic-proto';

/**
* @param {BootstrapPowers & {
Expand All @@ -32,24 +26,16 @@ export const testLocalChain = async (
node = E(node).makeChildNode(nodeName);
}

const convertProto = makeProtoConverter(registry);

let result;
try {
const lca = await E(localchain).createAccount();
console.info('created account', lca);
const address = await E(lca).getAddress();
console.info('address', address);

// test protobuf encoding
const proto = registry.encodeAsAny({
typeUrl: '/cosmos.bank.v1beta1.QueryAllBalancesRequest',
value: {
address,
denom: 'ucosm',
},
const queryMsg = typedJson('/cosmos.bank.v1beta1.QueryAllBalancesRequest', {
address,
});
const queryMsg = convertProto(proto);
const balances = await E(localchain).query(queryMsg);
console.info('balances', balances);

Expand Down

0 comments on commit e37b916

Please sign in to comment.