Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove scaled price authority upgrade #9585

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions a3p-integration/proposals/a:upgrade-next/agd-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ export const getAuctionCollateral = async index => {
return body.collateralAvailable.value;
};

export const getVaultPrices = async index => {
const path = `published.vaultFactory.managers.manager${index}.quotes`;
const body = await getQuoteBody(path);
return body.quoteAmount;
};

export const bankSend = (addr, wanted) => {
const chain = ['--chain-id', CHAINID];
const from = ['--from', VALIDATORADDR];
Expand Down
11 changes: 11 additions & 0 deletions a3p-integration/proposals/a:upgrade-next/upgradeVaults.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
generateOracleMap,
getLiveOffers,
getPriceQuote,
getVaultPrices,
pushPrices,
} from './agd-tools.js';
import { getDetailsMatchingVats } from './vatDetails.js';
Expand Down Expand Up @@ -95,6 +96,13 @@ const checkAuctionVat = async t => {
t.true(Object.keys(details).length > 2);
};

const verifyVaultPriceUpdate = async t => {
const quote = await getVaultPrices(0);

t.true(quote.value[0].amountIn.brand.includes(' ATOM '));
t.is(quote.value[0].amountOut.value, '+5200000');
};

// test.serial() isn't guaranteed to run tests in order, so we run the intended tests here
test('liquidation post upgrade', async t => {
t.log('starting upgrade vaults test');
Expand All @@ -114,4 +122,7 @@ test('liquidation post upgrade', async t => {

t.log('make new auction');
await checkAuctionVat(t);

t.log('vault price updated');
await verifyVaultPriceUpdate(t);
});
2 changes: 0 additions & 2 deletions golang/cosmos/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -959,8 +959,6 @@ func unreleasedUpgradeHandler(app *GaiaApp, targetUpgrade string) func(sdk.Conte
vm.CoreProposalStepForModules("@agoric/builders/scripts/vats/add-auction.js"),
// upgrade vaultFactory.
vm.CoreProposalStepForModules("@agoric/builders/scripts/vats/upgradeVaults.js"),
// upgrade scaledPriceAuthorities.
vm.CoreProposalStepForModules("@agoric/builders/scripts/vats/upgradeScaledPriceAuthorities.js"),
}
}

Expand Down
Loading