Skip to content

Commit

Permalink
Merge pull request #7047 from Agoric/6641-auctioneer
Browse files Browse the repository at this point in the history
feat(vaults)!: refactor Vaults to use an Auction for Liquidation
  • Loading branch information
mergify[bot] authored Mar 17, 2023
2 parents 9d47dd0 + a2bc45a commit a2fa2fb
Show file tree
Hide file tree
Showing 64 changed files with 3,380 additions and 1,971 deletions.
4 changes: 4 additions & 0 deletions .github/actions/restore-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ runs:
with:
clean: 'false'
submodules: 'true'
persist-credentials: false
- name: Reconfigure git to use HTTP authentication
run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
shell: bash
- uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ jobs:
cli: [link-cli]
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Reconfigure git to use HTTP authentication
run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
shell: bash

# Prerequisites

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-dapp-otc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
uses: actions/checkout@v3
with:
path: agoric-sdk
persist-credentials: false
- name: Reconfigure git to use HTTP authentication
run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
shell: bash
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-dapp-pegasus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
uses: actions/checkout@v3
with:
path: agoric-sdk
persist-credentials: false
- name: Reconfigure git to use HTTP authentication
run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
shell: bash
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-dapp-simple-exchange.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
uses: actions/checkout@v3
with:
path: agoric-sdk
persist-credentials: false
- name: Reconfigure git to use HTTP authentication
run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
shell: bash
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
steps:
- name: Checkout agoric-sdk
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Reconfigure git to use HTTP authentication
run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
shell: bash

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand Down
8 changes: 4 additions & 4 deletions packages/governance/src/contractGovernor.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ const validateQuestionFromCounter = async (zoe, electorate, voteCounter) => {
* governedContractInstallation: Installation<CF>,
* governed: {
* issuerKeywordRecord: IssuerKeywordRecord,
* terms: {governedParams: {[CONTRACT_ELECTORATE]: Amount<'set'>}},
* terms: {governedParams: {[CONTRACT_ELECTORATE]: InvitationParam}},
* }
* }>}
*/

/**
* @typedef {() => {creatorFacet: GovernorFacet<any>, publicFacet: GovernedPublicFacetMethods}} GovernableStartFn
* @typedef {(zcf?: any, pa?: any, baggage?: any) => ERef<{creatorFacet: GovernorFacet<any>, publicFacet: GovernedPublicFacetMethods}>} GovernableStartFn
*/

/**
Expand All @@ -136,7 +136,7 @@ const validateQuestionFromCounter = async (zoe, electorate, voteCounter) => {
* governedContractInstallation: Installation<SF>,
* governed: {
* issuerKeywordRecord: IssuerKeywordRecord,
* terms: {governedParams: {[CONTRACT_ELECTORATE]: Amount<'set'>}},
* terms: {governedParams: {[CONTRACT_ELECTORATE]: import('./contractGovernance/typedParamManager.js').InvitationParam}},
* }
* }>} zcf
* @param {{
Expand Down Expand Up @@ -174,7 +174,7 @@ const start = async (zcf, privateArgs) => {
governedContractInstallation,
governedIssuerKeywordRecord,
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error -- the build config doesn't expect an error here
// @ts-ignore XXX governance types
// @ts-ignore XXX governance types https://github.com/Agoric/agoric-sdk/issues/7178
augmentedTerms,
privateArgs.governed,
);
Expand Down
16 changes: 1 addition & 15 deletions packages/governance/src/types-ambient.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@
*/

/**
* @template {object} PF Public facet
* @template {{}} PF Public facet
* @typedef {PF & GovernedPublicFacetMethods} GovernedPublicFacet
*/

Expand All @@ -618,20 +618,6 @@
* @property {(name: string) => Promise<Invitation>} getInvitation
*/

/**
* @callback WrapPublicFacet
* @param {T} originalPublicFacet
* @returns {T & GovernedPublicFacet}
* @template T
*/

/**
* @callback WrapCreatorFacet
* @param {T} originalCreatorFacet
* @returns {GovernedCreatorFacet<T>}
* @template T
*/

/**
* @typedef {{key: string}} StandardParamPath
*/
Expand Down
10 changes: 5 additions & 5 deletions packages/governance/test/unitTests/test-paramGovernance.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ test('governParam no votes', async t => {
timer,
);

/** @type {GovernedPublicFacet<unknown>} */
/** @type {GovernedPublicFacet<{}>} */
const publicFacet = E(governorFacets.creatorFacet).getPublicFacet();
const notifier = makeNotifierFromAsyncIterable(
await E(publicFacet).getSubscription(),
Expand Down Expand Up @@ -232,15 +232,15 @@ test('change multiple params', async t => {
timer,
);

/** @type {GovernedPublicFacet<unknown>} */
/** @type {GovernedPublicFacet<{}>} */
const publicFacet = await E(governorFacets.creatorFacet).getPublicFacet();
const notifier = makeNotifierFromAsyncIterable(
await E(publicFacet).getSubscription(),
);
const update1 = await notifier.getUpdateSince();
// constructing the fixture to deepEqual would complicate this with insufficient benefit
t.is(
// @ts-expect-error reaching into unknown values
// @ts-expect-error reaching into {} values
update1.value.current.Electorate.value.value[0].description,
'questionPoser',
);
Expand Down Expand Up @@ -314,7 +314,7 @@ test('change multiple params used invitation', async t => {
timer,
);

/** @type {GovernedPublicFacet<unknown>} */
/** @type {GovernedPublicFacet<{}>} */
const publicFacet = E(governorFacets.creatorFacet).getPublicFacet();
const notifier = makeNotifierFromAsyncIterable(
await E(publicFacet).getSubscription(),
Expand Down Expand Up @@ -385,7 +385,7 @@ test('change param continuing invitation', async t => {
timer,
);

/** @type {GovernedPublicFacet<unknown>} */
/** @type {GovernedPublicFacet<{}>} */
const publicFacet = E(governorFacets.creatorFacet).getPublicFacet();
const notifier = makeNotifierFromAsyncIterable(
await E(publicFacet).getSubscription(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ test('change a param', async t => {
governedTerms,
);

/** @type {GovernedPublicFacet<unknown>} */
/** @type {GovernedPublicFacet<{}>} */
const publicFacet = await E(governorFacets.creatorFacet).getPublicFacet();
const notifier = makeNotifierFromAsyncIterable(
await E(publicFacet).getSubscription(),
Expand Down Expand Up @@ -170,7 +170,8 @@ test('call API directly', async t => {
);
t.deepEqual(result, { apiMethodName: 'governanceApi', methodArgs: [] });
t.deepEqual(
// @ts-expect-error FIXME type the puppet extensions
// FIXME type the puppet extensions
// @ts-expect-error xxx governance types https://github.com/Agoric/agoric-sdk/issues/7178
await E(E(governorFacets.creatorFacet).getPublicFacet()).getApiCalled(),
1,
);
Expand Down
2 changes: 1 addition & 1 deletion packages/governance/tools/puppetContractGovernor.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const start = async (zcf, privateArgs) => {
governedContractInstallation,
governedIssuerKeywordRecord,
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error -- the build config doesn't expect an error here
// @ts-ignore XXX governance types
// @ts-ignore XXX governance types https://github.com/Agoric/agoric-sdk/issues/7178
augmentedTerms,
privateArgs.governed,
);
Expand Down
2 changes: 1 addition & 1 deletion packages/inter-protocol/scripts/add-collateral-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const psmGovernanceBuilder = async ({
'../bundles/bundle-vaultFactory.js',
),
),
auction: publishRef(
auctioneer: publishRef(
install(
'../src/auction/auctioneer.js',
'../bundles/bundle-auctioneer.js',
Expand Down
2 changes: 1 addition & 1 deletion packages/inter-protocol/scripts/init-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const installKeyGroups = {
],
},
main: {
auction: [
auctioneer: [
'../src/auction/auctioneer.js',
'../bundles/bundle-auctioneer.js',
],
Expand Down
Loading

0 comments on commit a2fa2fb

Please sign in to comment.