Skip to content

Conversation

nidhi-singh02
Copy link
Contributor

@nidhi-singh02 nidhi-singh02 commented Aug 20, 2025

Summary

This changeset removes truffle and its dependencies and replace the smart contract build, deployment and verification process to foundry.

Tasks done in this one -

  • Build using forge
  • Deployment using forge (the earlier truffle migration one) - We have two options - deployment and deployment + verification.
  • Introduced a setup script that installs foundry and forge dependencies, details can be found in README.md.
  • Remove truffle and its related dependencies
  • Ensure CI build passes with these changes
  • Fixed linter issues

As part of README.md, we had the local testing setup earlier, Kept it as is.
Tested the deployment of the wormhole contract and the pyth contract using the foundry setup we migrated to.

  1. Live network (Sepolia Base)
  • Tested both the ways on base sepolia and it works fine.
  • Even verification is happening successfully at the time of deployment. All the 5 contracts are deployed and verified on base sepolia via foundry (forge).
  1. Local network (Anvil)

Tested on a virtual network I created with a custom chain ID 84520 forked from Base sepolia (EVM network).
Steps I followed to do deployment of the price feed ID contract

  1. Add a new entry for my network in
{
  "id": "nids_network",
  "mainnet": false,
  "rpcUrl": "my_rpc_url",
  "networkId": 84520,
  "type": "EvmChain"
}
  1. Add an entry for nids-network in with the next available number.

Command I ran

cd pyth-crosschain/target_chains/ethereum/contracts

./deploy.sh latest nids_network 

Attached the deployment logs.

Screenshot 2025-08-25 at 11 04 51 AM

Note: script folder has foundry related setup. scripts is for js/ts files. Keeping these separate for now.

Enhancements that can be done-

  • Noticed the test directory for forge is named forge-test, will replace it with test in another PR.
  • We can use forge verify-contract to verify the contracts that has already been deployed.

Rationale

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

Copy link

vercel bot commented Aug 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
api-reference Ready Ready Preview Comment Aug 26, 2025 10:39am
component-library Ready Ready Preview Comment Aug 26, 2025 10:39am
developer-hub Ready Ready Preview Comment Aug 26, 2025 10:39am
proposals Ready Ready Preview Comment Aug 26, 2025 10:39am
3 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
entropy-explorer Skipped Skipped Aug 26, 2025 10:39am
insights Skipped Skipped Aug 26, 2025 10:39am
staking Skipped Skipped Aug 26, 2025 10:39am

@vercel vercel bot temporarily deployed to Preview – proposals August 20, 2025 11:58 Inactive
@vercel vercel bot temporarily deployed to Preview – staking August 20, 2025 12:07 Inactive
@vercel vercel bot temporarily deployed to Preview – developer-hub August 20, 2025 12:07 Inactive
@vercel vercel bot temporarily deployed to Preview – entropy-explorer August 20, 2025 12:07 Inactive
@vercel vercel bot temporarily deployed to Preview – api-reference August 20, 2025 12:07 Inactive
@vercel vercel bot temporarily deployed to Preview – insights August 20, 2025 12:07 Inactive
@vercel vercel bot temporarily deployed to Preview – proposals August 20, 2025 12:07 Inactive
@vercel vercel bot temporarily deployed to Preview – component-library August 20, 2025 12:07 Inactive
@vercel vercel bot temporarily deployed to Preview – staking August 20, 2025 12:58 Inactive
@vercel vercel bot temporarily deployed to Preview – proposals August 20, 2025 12:58 Inactive
@vercel vercel bot temporarily deployed to Preview – developer-hub August 20, 2025 12:58 Inactive
@vercel vercel bot temporarily deployed to Preview – component-library August 20, 2025 12:58 Inactive
@vercel vercel bot temporarily deployed to Preview – entropy-explorer August 20, 2025 12:58 Inactive
@vercel vercel bot temporarily deployed to Preview – insights August 20, 2025 12:58 Inactive
@vercel vercel bot temporarily deployed to Preview – api-reference August 20, 2025 12:58 Inactive
@vercel vercel bot temporarily deployed to Preview – staking August 20, 2025 13:52 Inactive
@vercel vercel bot temporarily deployed to Preview – insights August 26, 2025 10:36 Inactive
@vercel vercel bot temporarily deployed to Preview – staking August 26, 2025 10:36 Inactive
@vercel vercel bot temporarily deployed to Preview – entropy-explorer August 26, 2025 10:36 Inactive
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Through format fixing.

@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

format fix as test was failing in CI

@@ -0,0 +1,122 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this file?

@@ -0,0 +1,67 @@
// SPDX-License-Identifier: Apache-2.0
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this file as well?

@@ -0,0 +1,70 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

Copy link
Member

Choose a reason for hiding this comment

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

Check this file as well!

@@ -1,27 +1,47 @@
# Migrations Metadata
MIGRATIONS_DIR=./migrations/test
# =============================================================================
Copy link
Member

Choose a reason for hiding this comment

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

Check for this file as well.

@nidhi-singh02
Copy link
Contributor Author

As discussed on the call with Aditya, reg the deletion of the files, will proceed after getting confirmation from Ali.

@nidhi-singh02 nidhi-singh02 merged commit cf5a70f into main Aug 27, 2025
12 checks passed
@nidhi-singh02 nidhi-singh02 deleted the remove-truffle branch August 27, 2025 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants