Skip to content

Conversation

@defistar
Copy link
Contributor

@defistar defistar commented Jun 5, 2025

Short Summary

  • Unit test for L2ETHBridge Contract
  • reusable setupTestFixture to be used by all the unit tests on L2 Bridge Contracts

L2 Unit test execution steps:

  • ensure Nil Node is up and running on the target server or local machine

  • run these 3 commands

cd rollup-bridge-contracts/test              
source prepare-hardhat-test-env.sh 
npx hardhat test --network nil hardhat/bridge_eth_test.ts 

@defistar defistar self-assigned this Jun 13, 2025
@defistar defistar force-pushed the feature/nil-bridge-unit-tests branch from 37d14ce to 650c779 Compare June 13, 2025 13:18
@defistar defistar marked this pull request as ready for review June 13, 2025 13:19
@defistar defistar requested review from akokoshn, oclaw and olegrok and removed request for olegrok June 13, 2025 13:19
@defistar defistar force-pushed the feature/nil-bridge-unit-tests branch from dfcfdca to 7db44bc Compare June 13, 2025 14:53
@defistar defistar force-pushed the feature/nil-bridge-unit-tests branch from 0e0e27a to 7eaa200 Compare June 23, 2025 08:49
@defistar defistar force-pushed the feature/nil-bridge-unit-tests branch from 7eaa200 to 9b918a5 Compare June 23, 2025 08:53
@defistar defistar enabled auto-merge June 23, 2025 11:21
@defistar defistar force-pushed the feature/nil-bridge-unit-tests branch from 9b918a5 to 8d8f34b Compare June 25, 2025 10:23

function getRemappings() {
const remappingsTxt = fs.readFileSync("remappings.txt", "utf8");
//const remappingsTxt = fs.readFileSync("remappings.txt", "utf8");
Copy link
Contributor

Choose a reason for hiding this comment

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

useless comment

nil: {
url: process.env.NIL_RPC_ENDPOINT,
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : [],
accounts: process.env.NIL_PRIVATE_KEY ? [process.env.NIL_PRIVATE_KEY] : [],
Copy link
Contributor

Choose a reason for hiding this comment

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

Does PRIVATE_KEY environment variable used by any another scripts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@akokoshn this is used in the function to create a new smart-account
we are in midst of getting rid of this variable and create new key-pair for unit tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this will be removed in the new PR coming up soon this week @akokoshn

@defistar defistar requested a review from akokoshn July 7, 2025 11:44
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