Skip to content

Commit

Permalink
Merge pull request #226 from oasisprotocol/matevz/fix/hardhat-network…
Browse files Browse the repository at this point in the history
…-names

Hardhat: Use sapphire and sapphire-testnet for network names
  • Loading branch information
matevz authored Nov 21, 2023
2 parents e7897fc + dfc59fa commit 9fdd2bb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/contracts-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
forge doc --build
- name: hardhat test examples/hardhat
working-directory: examples/hardhat
run: pnpm hardhat run --network sapphire_localnet scripts/run-vigil.ts
run: pnpm hardhat run --network sapphire-localnet scripts/run-vigil.ts
env:
PRIVATE_KEY: '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'
- name: hardhat test examples/onchain-signer
Expand Down
2 changes: 1 addition & 1 deletion contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const config: HardhatUserConfig = {
? [process.env.SAPPHIRE_TESTNET_PRIVATE_KEY]
: [],
},
'sapphire-mainnet': {
sapphire: {
url: 'https://sapphire.oasis.io',
chainId: 0x5afe,
accounts: process.env.SAPPHIRE_MAINNET_PRIVATE_KEY
Expand Down
2 changes: 1 addition & 1 deletion examples/hardhat-boilerplate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ https://faucet.testnet.oasis.dev/ and request some.
Next, run this to deploy your contract on Sapphire Testnet:

```sh
PRIVATE_KEY=your_sapphire_private_key_in_hex npx hardhat run scripts/deploy.js --network sapphire_testnet
PRIVATE_KEY=your_sapphire_private_key_in_hex npx hardhat run scripts/deploy.js --network sapphire-testnet
```

Finally, run the frontend with:
Expand Down
6 changes: 3 additions & 3 deletions examples/hardhat-boilerplate/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ module.exports = {
hardhat: {
chainId: 1337 // We set 1337 to make interacting with MetaMask simpler
},
sapphire_mainnet: {
sapphire: {
url: "https://sapphire.oasis.io",
accounts: process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
: [],
chainId: 0x5afe,
},
sapphire_testnet: {
'sapphire-testnet': {
url: "https://testnet.sapphire.oasis.dev",
accounts: process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
: [],
chainId: 0x5aff,
},
sapphire_localnet: {
'sapphire-localnet': {
url: "http://localhost:8545",
accounts: process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
Expand Down
6 changes: 3 additions & 3 deletions examples/hardhat/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ const config: HardhatUserConfig = {
},
},
networks: {
'sapphire_mainnet': {
sapphire: {
url: 'https://sapphire.oasis.io',
accounts: process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
: [],
chainId: 0x5afe
},
'sapphire_testnet': {
'sapphire-testnet': {
url: 'https://testnet.sapphire.oasis.dev',
accounts: process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
: [],
chainId: 0x5aff
},
'sapphire_localnet': {
'sapphire-localnet': {
url: 'http://localhost:8545',
accounts: process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
Expand Down

0 comments on commit 9fdd2bb

Please sign in to comment.