Skip to content

Commit

Permalink
removes starknet-hardhat plugin from contracts folder
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-de-leon-cll committed Mar 15, 2024
1 parent 29434ab commit d5674f2
Show file tree
Hide file tree
Showing 10 changed files with 754 additions and 347 deletions.
42 changes: 11 additions & 31 deletions contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { HardhatUserConfig } from 'hardhat/types'
import '@shardlabs/starknet-hardhat-plugin'
import '@nomiclabs/hardhat-ethers'
import '@nomicfoundation/hardhat-chai-matchers'
import 'solidity-coverage'
Expand All @@ -19,6 +18,17 @@ const COMPILER_SETTINGS = {
* @type import('hardhat/config').HardhatUserConfig
*/
const config: HardhatUserConfig = {
// NOTE: hardhat comes with a built-in special network called 'harhdat'. This network is automatically created and
// used if no networks are defined in our config: https://hardhat.org/hardhat-runner/docs/config#hardhat-network. We
// do NOT want to use this network. Our testing scripts already spawn a hardhat node in a container, and we want to
// use this for the l1 <> l2 messaging tests rather than the automatically generated network. With that in mind, we
// need to modify this config to point to the hardhat container by adding the 'defaultNetwork' and 'networks' properties.
defaultNetwork: 'localhost',
networks: {
localhost: {
url: 'http://127.0.0.1:8545',
},
},
solidity: {
compilers: [
{
Expand All @@ -27,36 +37,6 @@ const config: HardhatUserConfig = {
},
],
},
starknet: {
// dockerizedVersion: "0.10.0", // alternatively choose one of the two venv options below
// uses (my-venv) defined by `python -m venv path/to/my-venv`
// venv: "../.venv",

// uses the currently active Python environment (hopefully with available Starknet commands!)
venv: 'active',
// network: "alpha",
network: 'devnet',
wallets: {
OpenZeppelin: {
accountName: 'OpenZeppelin',
modulePath: 'starkware.starknet.wallets.open_zeppelin.OpenZeppelinAccount',
accountPath: '~/.starknet_accounts',
},
},
requestTimeout: 1000000,
},
networks: {
devnet: {
url: 'http://127.0.0.1:5050',
args: ['--cairo-compiler-manifest', '../vendor/cairo/Cargo.toml'],
},
integratedDevnet: {
url: 'http://127.0.0.1:5050',
venv: 'active',
args: ['--lite-mode', '--cairo-compiler-manifest', '../vendor/cairo/Cargo.toml'],
// dockerizedVersion: "0.2.0"
},
},
mocha: {
timeout: 10000000,
rootHooks: {
Expand Down
6 changes: 3 additions & 3 deletions contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
"main": "index.js",
"scripts": {
"compile:solidity": "hardhat compile",
"test": "hardhat --network localhost test"
"test": "hardhat test"
},
"author": "",
"license": "MIT",
"devDependencies": {
"@ethereum-waffle/mock-contract": "^4.0.4",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.3",
"@nomiclabs/hardhat-ethers": "^2.0.5",
"@shardlabs/starknet-hardhat-plugin": "^0.8.0-alpha.2",
"@types/chai": "^4.3.3",
"@types/elliptic": "^6.4.14",
"@types/mocha": "^9.1.1",
"chai": "^4.3.6",
"ethers": "^5.6.8",
"hardhat": "^2.16.1",
"solidity-coverage": "^0.8.2"
"solidity-coverage": "^0.8.2",
"starknet": "6.4.0"
},
"dependencies": {
"@chainlink/contracts": "^0.4.2",
Expand Down
3 changes: 3 additions & 0 deletions contracts/test/constants.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/** 15 min */
export const TIMEOUT = 900_000

export const STARKNET_DEVNET_URL = 'http://127.0.0.1:5050'
export const ETH_DEVNET_URL = 'http://127.0.0.1:8545'
Loading

0 comments on commit d5674f2

Please sign in to comment.