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

feat(contract_manager): script for EVM feeds contract deployment #1254

Merged
merged 2 commits into from
Jan 30, 2024

Conversation

ali-bahjati
Copy link
Collaborator

This change adds a script to replace truffle deployment scripts. This gives us more control and flexibility over the deployment process.

@ali-bahjati ali-bahjati requested a review from m30m January 29, 2024 14:22
Copy link

vercel bot commented Jan 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
example-oracle-amm ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2024 10:48am
xc-admin-frontend ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2024 10:48am

@@ -404,7 +404,7 @@ export class EvmEntropyContract extends Storable {
return {
chain: this.chain.getId(),
address: this.address,
type: EvmPriceFeedContract.type,
type: EvmEntropyContract.type,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was a bug in json serialization of entropy contracts

@@ -44,18 +44,18 @@ const parser = yargs(hideBin(process.argv))
},
});

async function run_if_not_cached(
cache_key: string,
async function runIfNotCached(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format the naming style


if (config.type === "stable") {
console.log(`Syncing mainnet guardian sets for ${chain.getId()}...`);
// TODO: Add a way to pass gas configs to this
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a generic method I can't easily add the gas options to it. Something to refactor later in the future.

@ali-bahjati ali-bahjati marked this pull request as ready for review January 29, 2024 19:32
This change adds a script to replace truffle deployment scripts. This
gives us more control and flexibility over the deployment process.
@ali-bahjati ali-bahjati force-pushed the contract-mngr/new-deploymnt-script branch from f27ff01 to 5f8ebfb Compare January 29, 2024 19:37
@@ -598,7 +598,7 @@ export class EvmPriceFeedContract extends PriceFeedContract {
pythContract.methods.updatePriceFeeds(priceFeedUpdateData);
const gasEstiamte = await transactionObject.estimateGas({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gasEstimate

artifactName: string,
deployArgs: any[] // eslint-disable-line @typescript-eslint/no-explicit-any
): Promise<string> {
const cache = existsSync(CACHE_FILE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use runIfNotCached here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's a good idea. Let me do it in a separate PR (because this one is already very big)

contract_manager/src/contracts/evm.ts Show resolved Hide resolved
@ali-bahjati ali-bahjati merged commit 9c6bdfd into main Jan 30, 2024
6 checks passed
@ali-bahjati ali-bahjati deleted the contract-mngr/new-deploymnt-script branch January 30, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants