Skip to content

Commit

Permalink
build proposals for PriceFeed coreEvals on multiple platforms. (#10146)
Browse files Browse the repository at this point in the history
closes: #10076
refs: #10074

## Description

Build platform-dependent proposals for the PriceFeed coreEval. 

For each platform (not counting A3P) defined in `updatePriceFeeds.js`, a command is added, which invokes `scripts/build-submission.sh` three times to build each of the required proposals (updatePriceFeeds.js, add-auction.js, and upgradeVaults.js). The invocation for updatePriceFeeds takes a parameter specifying the platform.

### Security Considerations

N/A

### Scaling Considerations

N/A

### Documentation Considerations

Not user-visible

### Testing Considerations

test on DevNet and MainFork

### Upgrade Considerations

It's all about upgrade. This coreEval has code that varies depending on the collaterals and oracles present, so we have to build separate proposals for each platform.
  • Loading branch information
Chris-Hibbert authored Oct 10, 2024
1 parent b423dda commit d0a9e65
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions a3p-integration/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ proposals/*/.yarn/*
!proposals/*/.yarn/releases
!proposals/*/.yarn/sdks
!proposals/*/.yarn/versions

# build artifacts
proposals/*/mainNet/*
proposals/*/devNet/*
4 changes: 3 additions & 1 deletion a3p-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"scripts": {
"build": "yarn run build:sdk && yarn run build:submissions && yarn run build:synthetic-chain",
"build:sdk": "make -C ../packages/deployment docker-build-sdk",
"build:submissions": "scripts/build-all-submissions.sh",
"build:submissions": "scripts/build-all-submissions.sh && yarn run build:priceFeeds-for-mainnet && yarn run build:priceFeeds-for-devnet",
"build:priceFeeds-for-mainnet": "scripts/build-submission.sh proposals/f:replace-price-feeds inter-protocol/updatePriceFeeds.js submission/main main; scripts/build-submission.sh proposals/f:replace-price-feeds vats/add-auction.js submission/main; scripts/build-submission.sh proposals/f:replace-price-feeds vats/upgradeVaults.js submission/main",
"build:priceFeeds-for-devnet": "scripts/build-submission.sh proposals/f:replace-price-feeds inter-protocol/updatePriceFeeds.js submission/devnet devnet; scripts/build-submission.sh proposals/f:replace-price-feeds vats/add-auction.js submission/devnet; scripts/build-submission.sh proposals/f:replace-price-feeds vats/upgradeVaults.js submission/devnet",
"build:synthetic-chain": "yarn synthetic-chain build",
"test": "yarn synthetic-chain test",
"doctor": "yarn synthetic-chain doctor"
Expand Down
5 changes: 4 additions & 1 deletion packages/builders/scripts/inter-protocol/updatePriceFeeds.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ export default async (homeP, endowments) => {

const { writeCoreEval } = await makeHelpers(homeP, endowments);

await writeCoreEval('gov-price-feeds', (utils, opts) =>
const match = scriptArgs[0].match(/UNRELEASED_(.*)/);
const variant = match ? match[1] : scriptArgs;

await writeCoreEval(`gov-price-feeds-${variant}`, (utils, opts) =>
defaultProposalBuilder(utils, { ...opts, ...config }),
);
};

0 comments on commit d0a9e65

Please sign in to comment.