-
Notifications
You must be signed in to change notification settings - Fork 300
feat(contracts): remove truffle and replace with foundry #2973
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
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
0ad7686
to
8075795
Compare
@@ -1,5 +1,6 @@ | |||
/// <reference types="next" /> | |||
/// <reference types="next/image-types/global" /> | |||
/// <reference path="./.next/types/routes.d.ts" /> |
There was a problem hiding this comment.
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" /> |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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; | |||
|
There was a problem hiding this comment.
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 | |||
# ============================================================================= |
There was a problem hiding this comment.
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.
As discussed on the call with Aditya, reg the deletion of the files, will proceed after getting confirmation from Ali. |
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 -
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.
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
pyth-crosschain/contract_manager/store/chains/EvmChains.json
Line 1303 in 46fa322
nids-network
inpyth-crosschain/governance/xc_admin/packages/xc_admin_common/src/chains.ts
Line 254 in 46fa322
Command I ran
cd pyth-crosschain/target_chains/ethereum/contracts ./deploy.sh latest nids_network
Attached the deployment logs.
Note:
script
folder has foundry related setup.scripts
is for js/ts files. Keeping these separate for now.Enhancements that can be done-
forge-test
, will replace it withtest
in another PR.forge verify-contract
to verify the contracts that has already been deployed.Rationale
How has this been tested?