Skip to content

Commit

Permalink
fixup! test: integration with Emerynet
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Feb 21, 2024
1 parent 2cc3e3c commit 863515d
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions packages/cosmic-proto/scripts/test-live.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env tsx
// @ts-check
import '@endo/init';

import process from 'node:process';
import assert from 'node:assert/strict';

import { agoric } from '../src/index.ts';

const rpcEndpoint = 'https://emerynet.rpc.agoric.net:443';

const testMain = async () => {
const client = await agoric.ClientFactory.createRPCQueryClient({
rpcEndpoint,
});
const { params } = await client.agoric.swingset.params();
assert.deepEqual(Object.keys(params).sort(), [
'beansPerUnit',
'bootstrapVatConfig',
'feeUnitPrice',
'powerFlagFees',
'queueMax',
]);
console.log('✅ SwingSet params query successful');
};

process.exitCode = 1;
testMain().then(
() => {
process.exitCode = 0;
},
err => {
console.error('Failed with', err);
process.exit(process.exitCode || 1);
}
);

0 comments on commit 863515d

Please sign in to comment.