Skip to content

Commit

Permalink
chore(a3p-integration): Type-check s:stake-bld
Browse files Browse the repository at this point in the history
  • Loading branch information
gibson042 committed Nov 20, 2024
1 parent 7ff9b34 commit 5b2e20c
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 5 deletions.
5 changes: 4 additions & 1 deletion a3p-integration/proposals/s:stake-bld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@
"ava": {
"concurrency": 1
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"devDependencies": {
"@types/node": "^22.0.0"
}
}
9 changes: 6 additions & 3 deletions a3p-integration/proposals/s:stake-bld/stakeBld.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ test('basic', async t => {

t.is((await currentDelegation()).length, 1, 'just the initial delegation');

/** @type {import('@agoric/ertp').Brand} */
const BLDBrand = brand.BLD;

await walletUtils.broadcastBridgeAction(GOV1ADDR, {
method: 'executeOffer',
offer: {
Expand All @@ -41,7 +44,7 @@ test('basic', async t => {
},
proposal: {
give: {
In: { brand: brand.BLD, value: 10n },
In: { brand: BLDBrand, value: 10n },
},
},
},
Expand All @@ -55,11 +58,11 @@ test('basic', async t => {
source: 'continuing',
previousOffer: 'request-stake',
invitationMakerName: 'Delegate',
invitationArgs: [VALIDATOR_ADDRESS, { brand: brand.BLD, value: 10n }],
invitationArgs: [VALIDATOR_ADDRESS, { brand: BLDBrand, value: 10n }],
},
proposal: {
give: {
In: { brand: brand.BLD, value: 10n },
In: { brand: BLDBrand, value: 10n },
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion a3p-integration/proposals/s:stake-bld/test-lib/rpc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @file copied from packages/agoric-cli */
// TODO DRY in https://github.com/Agoric/agoric-sdk/issues/9109
// @ts-check
/* global Buffer */
/* eslint-env node */

import { Fail } from '@endo/errors';
import {
Expand Down
1 change: 1 addition & 0 deletions a3p-integration/proposals/s:stake-bld/test-lib/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { makeVstorageKit } from './rpc.js';
*/
export const sendAction = async (bridgeAction, opts) => {
const { marshaller } = opts;
// @ts-expect-error BridgeAction has methods disallowed by Passable
const offerBody = JSON.stringify(marshaller.toCapData(harden(bridgeAction)));

// tryExit should not require --allow-spend
Expand Down
16 changes: 16 additions & 0 deletions a3p-integration/proposals/s:stake-bld/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"noEmit": true,
"target": "esnext",
"module": "esnext",
"moduleResolution": "bundler",
"allowJs": true,
"checkJs": true,
"strict": false,
"strictNullChecks": true,
"noImplicitThis": true,
// XXX synthetic-chain has some errors
"skipLibCheck": true
},
"exclude": ["submission"]
}
17 changes: 17 additions & 0 deletions a3p-integration/proposals/s:stake-bld/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1574,6 +1574,15 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^22.0.0":
version: 22.9.1
resolution: "@types/node@npm:22.9.1"
dependencies:
undici-types: "npm:~6.19.8"
checksum: 10c0/ea489ae603aa8874e4e88980aab6f2dad09c755da779c88dd142983bfe9609803c89415ca7781f723072934066f63daf2b3339ef084a8ad1a8079cf3958be243
languageName: node
linkType: hard

"@types/resolve@npm:1.17.1":
version: 1.17.1
resolution: "@types/resolve@npm:1.17.1"
Expand Down Expand Up @@ -4689,6 +4698,7 @@ __metadata:
"@endo/errors": "npm:^1.2.2"
"@endo/far": "npm:^1.0.4"
"@endo/init": "npm:^1.0.4"
"@types/node": "npm:^22.0.0"
agoric: "npm:0.21.2-dev-5676146.0"
ava: "npm:^5.3.1"
execa: "npm:^8.0.1"
Expand Down Expand Up @@ -5290,6 +5300,13 @@ __metadata:
languageName: node
linkType: hard

"undici-types@npm:~6.19.8":
version: 6.19.8
resolution: "undici-types@npm:6.19.8"
checksum: 10c0/078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344
languageName: node
linkType: hard

"unicorn-magic@npm:^0.3.0":
version: 0.3.0
resolution: "unicorn-magic@npm:0.3.0"
Expand Down

0 comments on commit 5b2e20c

Please sign in to comment.