Skip to content

Commit

Permalink
fix(a3p): fund Gov2 wallet and reorder tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorge-Lopes committed Nov 5, 2024
1 parent ef7dfe8 commit ee650c5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion a3p-integration/proposals/z:acceptance/test-lib/vaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ export const proposeNewDebtCeiling = async (address, debtLimit) => {
);
};

export const GOV4ADDR = 'agoric1c9gyu460lu70rtcdp95vummd6032psmpdx7wdy';
export const setDebtLimit = async (address, debtLimit) => {
const GOV4ADDR = 'agoric1c9gyu460lu70rtcdp95vummd6032psmpdx7wdy';
const govAccounts = [GOV1ADDR, GOV2ADDR, GOV4ADDR];

console.log('ACTIONS Setting debt limit');
Expand Down
6 changes: 3 additions & 3 deletions a3p-integration/proposals/z:acceptance/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ echo ACCEPTANCE TESTING state sync
echo ACCEPTANCE TESTING wallet
yarn ava wallet.test.js

echo ACCEPTANCE TESTING vaults
yarn ava vaults.test.js

echo ACCEPTANCE TESTING psm
yarn ava psm.test.js

echo ACCEPTANCE TESTING governance
yarn ava governance.test.js

echo ACCEPTANCE TESTING vaults
yarn ava vaults.test.js
6 changes: 5 additions & 1 deletion a3p-integration/proposals/z:acceptance/vaults.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
generateOracleMap,
getPriceQuote,
getVaultPrices,
GOV2ADDR,
} from '@agoric/synthetic-chain';
import { getBalances, agopsVaults } from './test-lib/utils.js';
import {
Expand All @@ -26,7 +27,7 @@ import {
verifyPushedPrice,
getPriceFeedRoundId,
} from './test-lib/price-feed.js';
import { tryISTBalances } from './test-lib/psm-lib.js';
import { tryISTBalances, bankSend as sendIST } from './test-lib/psm-lib.js';

const VAULT_MANAGER = 'manager0';

Expand Down Expand Up @@ -350,6 +351,9 @@ test.serial(
const { totalDebt: totalDebtBefore } =
await getAvailableDebtForMint(VAULT_MANAGER);

// provision governance wallet to cover transaction fees
await sendIST(GOV2ADDR, `1000000uist`, GOV1ADDR);

const limit = (totalDebtBefore - 10_000_000n) / 1_000_000n;
await setDebtLimit(GOV1ADDR, limit);

Expand Down

0 comments on commit ee650c5

Please sign in to comment.