Skip to content

Commit

Permalink
bump typescript-eslint and cleanup Orch examples filenames (#10125)
Browse files Browse the repository at this point in the history
incidental

## Description
Cleans up the README per #10121 (comment)

I thought that was too light a PR so it also bumps typescript-eslint (not quite latest because that OOMs: #10120)

Then I remember there are a couple filenames to normalize in examples this does that too.

### Security Considerations
n/a
### Scaling Considerations
n/a

### Documentation Considerations
Improved

### Testing Considerations
CI

### Upgrade Considerations
not deployed
  • Loading branch information
mergify[bot] authored Sep 20, 2024
2 parents 741bbd1 + af6f97e commit ad7f655
Show file tree
Hide file tree
Showing 17 changed files with 85 additions and 116 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
"typedoc": "^0.26.7",
"typedoc-plugin-markdown": "^4.2.1",
"typescript": "^5.6.2",
"typescript-eslint": "^7.15.0"
"typescript-eslint": "^7.18.0"
},
"resolutions": {
"**/protobufjs": "^7.2.6",
"**/@types/estree": "^1.0.0",
"**/@typescript-eslint/typescript-estree": "^7.15.0"
"@endo/eslint-plugin/typescript-eslint": "^7.18.0"
},
"engines": {
"node": "^18.12 || ^20.9"
Expand Down
2 changes: 1 addition & 1 deletion packages/boot/test/bootstrapTests/lca.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js';
import type { TestFn } from 'ava';

import { Fail } from '@endo/errors';
import type { start as stakeBldStart } from '@agoric/orchestration/src/examples/stakeBld.contract.js';
import type { start as stakeBldStart } from '@agoric/orchestration/src/examples/stake-bld.contract.js';
import type { Instance } from '@agoric/zoe/src/zoeService/utils.js';
import { SIMULATED_ERRORS } from '@agoric/vats/tools/fake-bridge.js';
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/boot/test/bootstrapTests/orchestration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js';
import { Fail } from '@endo/errors';
import { documentStorageSchema } from '@agoric/internal/src/storage-test-utils.js';
import type { CosmosValidatorAddress } from '@agoric/orchestration';
import type { start as startStakeIca } from '@agoric/orchestration/src/examples/stakeIca.contract.js';
import type { start as startStakeIca } from '@agoric/orchestration/src/examples/stake-ica.contract.js';
import type { Instance } from '@agoric/zoe/src/zoeService/utils.js';
import type { TestFn } from 'ava';
import { SIMULATED_ERRORS } from '@agoric/vats/tools/fake-bridge.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/builders/scripts/orchestration/init-stakeAtom.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
{
installKeys: {
stakeIca: publishRef(
install('@agoric/orchestration/src/examples/stakeIca.contract.js'),
install('@agoric/orchestration/src/examples/stake-ica.contract.js'),
),
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/builders/scripts/orchestration/init-stakeBld.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
{
installKeys: {
stakeBld: publishRef(
install('@agoric/orchestration/src/examples/stakeBld.contract.js'),
install('@agoric/orchestration/src/examples/stake-bld.contract.js'),
),
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/builders/scripts/orchestration/init-stakeOsmo.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
{
installKeys: {
stakeIca: publishRef(
install('@agoric/orchestration/src/examples/stakeIca.contract.js'),
install('@agoric/orchestration/src/examples/stake-ica.contract.js'),
),
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/builders/scripts/testing/restart-stakeAtom.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { E } from '@endo/far';
const trace = makeTracer('RestartSA', true);

/**
* @import {start as StartFn} from '@agoric/orchestration/src/examples/stakeIca.contract.js';
* @import {start as StartFn} from '@agoric/orchestration/src/examples/stake-ica.contract.js';
*/

/**
Expand Down
8 changes: 4 additions & 4 deletions packages/orchestration/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ See [`src/examples`](src/examples)
| [basic-flows](/packages/orchestration/src/examples/basic-flows.contract.js) | Ready 🟢 | Creates an account on a remote chain and returns a continuing offer with all platform-provided invitationMakers. | - `CosmosOrchestrationAccount`<br>- `LocalOrchestrationAccount`|
| [query-flows](/packages/orchestration/src/fixtures/query-flows.contract.js) | Ready 🟢 | Test fixture that enables querying account balances on local and remote chains. | - `Chain`<br>- `LocalOrchestrationAccount`<br>- `CosmosOrchestrationAccount`<br>- Interchain Queries |
| [send-anywhere](/packages/orchestration/src/examples/send-anywhere.contract.js) | Ready 🟢 | Allows sending payments (tokens) over IBC to another chain. | - `LocalOrchestrationAccoun`t<br>- `Vtransfer` (IBC Hooks) |
| [stakeBld](/packages/orchestration/src/examples/stakeBld.contract.js) | Ready 🟢 | Returns a `LocalOrchestrationAccount` that can perform staking actions. | - `LocalOrchestrationAccount` | Ready 🟢 |
| [stakeIca](/packages/orchestration/src/examples/stakeIca.contract.js) | Ready 🟢 | Returns a `CosmosOrchestrationAccount` that can perform staking actions. | - `CosmosOrchestrationAccount` | Ready 🟢 |
| [stake-bld](/packages/orchestration/src/examples/stake-bld.contract.js) | Ready 🟢 | Returns a `LocalOrchestrationAccount` that can perform staking actions. | - `LocalOrchestrationAccount` | Ready 🟢 |
| [stake-ica](/packages/orchestration/src/examples/stake-ica.contract.js) | Ready 🟢 | Returns a `CosmosOrchestrationAccount` that can perform staking actions. | - `CosmosOrchestrationAccount` | Ready 🟢 |
| [staking-combinations](/packages/orchestration/src/examples/staking-combinations.contract.js) | Ready 🟢 | Combines actions into a single offer flow and demonstrates writing continuing offers. | - `CosmosOrchestrationAccount`<br>- `CombineInvitationMakers` <br>- Continuing Offers |
| [swap](/packages/orchestration/src/examples/swap.contract.js) | Under Construction 🚧 | Demonstrates asset swapping on an external chain. | - `CosmosOrchestrationAccount`<br>- `ChainHub` |
| [unbond](/packages/orchestration/src/examples/unbond.contract.js) | Under Construction 🚧 | Undelegates tokens for an ICA and liquid stakes them. | - `CosmosOrchestrationAccount` |
Expand All @@ -39,8 +39,8 @@ See [`src/examples`](src/examples)
|---------------|--------------------------|
| [basic-flows](/packages/orchestration/src/examples/basic-flows.contract.js) | - `.send()`, `sendAll()` methods and `Send`, `SendAll` invitations ([#9193](https://github.com/Agoric/agoric-sdk/issues/9193))<br>- `CosmosOrchAccount.transfer()`, `Transfer` invitation ([#9193](https://github.com/Agoric/agoric-sdk/issues/9193)) |
| [send-anywhere](/packages/orchestration/src/examples/send-anywhere.contract.js) | - Multi-hop (PFM) transfers (not implemented in contract) ([#10006](https://github.com/Agoric/agoric-sdk/issues/10006)) |
| [stakeIca](/packages/orchestration/src/examples/stakeIca.contract.js) | - Redelegate<br>- WithdrawRewards (plural) (not implemented)<br>- StakingQueries (not implemented) ([#10016](https://github.com/Agoric/agoric-sdk/issues/10016))<br>- Staking Flows for LocalOrchAccount<br> - Written as async-flow ([#9838](https://github.com/Agoric/agoric-sdk/issues/9838)) |
| [stakeBld](/packages/orchestration/src/examples/stakeBld.contract.js) | - Everything*, created before e2e test suite<br> - Consider folding under generic "stake" contract, once [interfaces are the same](https://github.com/Agoric/agoric-sdk/blob/1976c502bcaac2e7d21f42b30447671a61053236/packages/orchestration/src/exos/local-orchestration-account.js#L487)|
| [stakeIca](/packages/orchestration/src/examples/stake-ica.contract.js) | - Redelegate<br>- WithdrawRewards (plural) (not implemented)<br>- StakingQueries (not implemented) ([#10016](https://github.com/Agoric/agoric-sdk/issues/10016))<br>- Staking Flows for LocalOrchAccount<br> - Written as async-flow ([#9838](https://github.com/Agoric/agoric-sdk/issues/9838)) |
| [stakeBld](/packages/orchestration/src/examples/stake-bld.contract.js) | - Everything*, created before e2e test suite<br> - Consider folding under generic "stake" contract, once [interfaces are the same](https://github.com/Agoric/agoric-sdk/blob/1976c502bcaac2e7d21f42b30447671a61053236/packages/orchestration/src/exos/local-orchestration-account.js#L487)|
| [swap](/packages/orchestration/src/examples/swap.contract.js) | - Everything - contract incomplete ([#8863](https://github.com/Agoric/agoric-sdk/issues/8863)) |
| [unbond](/packages/orchestration/src/examples/unbond.contract.js) | - Everything - contract incomplete ([#9782](https://github.com/Agoric/agoric-sdk/issues/9782)) |
| [staking-combinations](/packages/orchestration/src/examples/staking-combinations.contract.js) | Only tested via [unit tests](/packages/orchestration/src/examples/staking-combinations.contract.js) |
7 changes: 3 additions & 4 deletions packages/orchestration/src/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ This directory contains sample contracts showcasing the Orchestration API. Each
- **basic-flows.contract.js**: Account creation and query sending
- **send-anywhere.contract.js**: Token sending across supported blockchains
- **auto-stake-it.contract.js**: Automatic remote staking of received tokens
- **unbond.contract.js**: Cross-chain unbonding and transfer

## In Progress

The following contracts are a work in progress as they contain bindings that need to be promptly updated.

- **stakeIca.contract.js**: Interchain account creation for remote staking
- **unbond.contract.js**: Cross-chain unbonding and liquid staking
- **stake-bld.contract.js**: BLD token staking on Agoric
- **stake-ica.contract.js**: Interchain account creation for remote staking
- **swap.contract.js**: Token swapping and remote staking
- **stakeBld.contract.js**: BLD token staking on Agoric

4 changes: 2 additions & 2 deletions packages/orchestration/src/proposals/start-stakeAtom.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { makeChainHub } from '../exos/chain-hub.js';

/**
* @import {IBCConnectionID} from '@agoric/vats';
* @import {StakeIcaSF, StakeIcaTerms} from '../examples/stakeIca.contract';
* @import {StakeIcaSF, StakeIcaTerms} from '../examples/stake-ica.contract';
*/

const trace = makeTracer('StartStakeAtom', true);
Expand All @@ -17,7 +17,7 @@ const trace = makeTracer('StartStakeAtom', true);
* installation: {
* consume: {
* stakeIca: Installation<
* import('../examples/stakeIca.contract.js').start
* import('../examples/stake-ica.contract.js').start
* >;
* };
* };
Expand Down
4 changes: 2 additions & 2 deletions packages/orchestration/src/proposals/start-stakeBld.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const trace = makeTracer('StartStakeBld', true);
* installation: {
* consume: {
* stakeBld: Installation<
* import('../../src/examples/stakeBld.contract.js').start
* import('../../src/examples/stake-bld.contract.js').start
* >;
* };
* };
Expand Down Expand Up @@ -50,7 +50,7 @@ export const startStakeBld = async ({

/**
* @type {StartUpgradableOpts<
* import('../../src/examples/stakeBld.contract.js').start
* import('../../src/examples/stake-bld.contract.js').start
* >}
*/
const startOpts = {
Expand Down
4 changes: 2 additions & 2 deletions packages/orchestration/src/proposals/start-stakeOsmo.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { makeChainHub } from '../exos/chain-hub.js';

/**
* @import {IBCConnectionID} from '@agoric/vats';
* @import {StakeIcaSF} from '../examples/stakeIca.contract';
* @import {StakeIcaSF} from '../examples/stake-ica.contract';
*/

const trace = makeTracer('StartStakeOsmo', true);
Expand All @@ -17,7 +17,7 @@ const trace = makeTracer('StartStakeOsmo', true);
* installation: {
* consume: {
* stakeIca: Installation<
* import('../examples/stakeIca.contract.js').start
* import('../examples/stake-ica.contract.js').start
* >;
* };
* };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { commonSetup } from '../supports.js';

const dirname = path.dirname(new URL(import.meta.url).pathname);

const contractFile = `${dirname}/../../src/examples/stakeBld.contract.js`;
const contractFile = `${dirname}/../../src/examples/stake-bld.contract.js`;
type StartFn =
typeof import('@agoric/orchestration/src/examples/stakeBld.contract.js').start;
typeof import('@agoric/orchestration/src/examples/stake-bld.contract.js').start;

const startContract = async ({
agoricNames,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
QueryBalanceResponse,
} from '@agoric/cosmic-proto/cosmos/bank/v1beta1/query.js';
import { commonSetup } from '../supports.js';
import { type StakeIcaTerms } from '../../src/examples/stakeIca.contract.js';
import { type StakeIcaTerms } from '../../src/examples/stake-ica.contract.js';
import fetchedChainInfo from '../../src/fetched-chain-info.js';
import {
buildQueryPacketString,
Expand All @@ -24,9 +24,9 @@ import { makeChainHub } from '../../src/exos/chain-hub.js';

const dirname = path.dirname(new URL(import.meta.url).pathname);

const contractFile = `${dirname}/../../src/examples/stakeIca.contract.js`;
const contractFile = `${dirname}/../../src/examples/stake-ica.contract.js`;
type StartFn =
typeof import('@agoric/orchestration/src/examples/stakeIca.contract.js').start;
typeof import('@agoric/orchestration/src/examples/stake-ica.contract.js').start;

const getChainTerms = (
chainName: keyof typeof fetchedChainInfo,
Expand Down
Loading

0 comments on commit ad7f655

Please sign in to comment.