Skip to content

Commit

Permalink
feat: add support for hardhat network (#933)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolfopietro97 authored May 31, 2024
1 parent 021a5c9 commit 54c5501
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
23 changes: 22 additions & 1 deletion apps/sdk-hardhat-integration/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,28 @@ const config: HardhatUserConfig = {
gasMultiplier: 1,
timeout: 20000,
httpHeaders: {}
} satisfies HttpNetworkConfig
} satisfies HttpNetworkConfig,

/**
* Default hardhat network configuration
*/
hardhat: {
// Testnet
accounts: {
mnemonic:
'vivid any call mammal mosquito budget midnight expose spirit approve reject system',
path: VET_DERIVATION_PATH,
count: 3,
initialIndex: 0
},
debug: true,
delegator: undefined,
gas: 'auto',
gasPrice: 'auto',
gasMultiplier: 1,
timeout: 20000,
httpHeaders: {}
}
}
};

Expand Down
3 changes: 3 additions & 0 deletions packages/hardhat-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ extendEnvironment((hre) => {
"BUT it's possible that some functionalities will not be available."
]
});

// @NOTE: This is a warning. If vechain network is not found, we will return to not break the hardhat execution
return;
}

// 3 - Extend environment with the 'HardhatVeChainProvider'
Expand Down

1 comment on commit 54c5501

@github-actions
Copy link

Choose a reason for hiding this comment

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

Test Coverage

Summary

Lines Statements Branches Functions
Coverage: 100%
100% (3384/3384) 100% (783/783) 100% (701/701)
Title Tests Skipped Failures Errors Time
core 484 0 💤 0 ❌ 0 🔥 1m 4s ⏱️
network 660 0 💤 0 ❌ 0 🔥 3m 59s ⏱️
errors 48 0 💤 0 ❌ 0 🔥 10.833s ⏱️

Please sign in to comment.