Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.

fix: update RPC and Block Explorer URLs #14

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1
PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1 # Replace with your private key
# SCROLL_TESTNET_URL=https://prealpha-rpc.scroll.io/l2 - Uncomment this line to use the pre-alpha instead of alpha
SCROLL_TESTNET_URL=https://alpha-rpc.scroll.io/l2
# SCROLL_TESTNET_URL=https://alpha-rpc.scroll.io/l2 - Uncomment this line to use the alpha instead of Sepolia
SCROLL_TESTNET_URL=https://sepolia-rpc.scroll.io/
SCROLL_MAINNET_URL=https://rpc.scroll.io/
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This project demonstrates how to use hardhat or foundry to deploy a contract in
2. Run `yarn install` to install dependencies.
3. Create a `.env` file following the example `.env.example` in the root directory. Change `PRIVATE_KEY` to your own account private key in the `.env`.
4. Run `yarn compile` to compile the contract.
5. Run `yarn deploy:scrollTestnet` to deploy the contract on the Scroll Alpha Testnet.
5. Run `yarn deploy:scrollTestnet` to deploy the contract on the Scroll Sepolia Testnet.
6. Run `yarn test` for hardhat tests.


Expand All @@ -31,7 +31,7 @@ This project demonstrates how to use hardhat or foundry to deploy a contract in
```
3. Deploy the contract.
```
forge create --rpc-url https://alpha-rpc.scroll.io/l2 \
forge create --rpc-url https://sepolia-rpc.scroll.io \
--value <lock_amount> \
--constructor-args <unlock_time> \
--private-key <your_private_key> \
Expand All @@ -43,7 +43,7 @@ This project demonstrates how to use hardhat or foundry to deploy a contract in

For example:
```
forge create --rpc-url https://alpha-rpc.scroll.io/l2 \
forge create --rpc-url https://sepolia-rpc.scroll.io \
--value 0.00000000002ether \
--constructor-args 1696118400 \
--private-key 0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1 \
Expand Down
6 changes: 6 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ const config: HardhatUserConfig = {
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
scrollMainnet: {
url: process.env.SCROLL_MAINNET_URL || "",
chainId: 534352,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
},
};

Expand Down
4 changes: 3 additions & 1 deletion scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ async function main() {

console.log(`Lock with 0.00000001 ETH and unlock timestamp ${unlockTime} deployed to ${lock.address}`);
// console.log(`Block explorer URL: https://l2scan.scroll.io/address/${lock.address}`); Uncomment here to use the pre-alpha
console.log(`Block explorer URL: https://blockscout.scroll.io/address/${lock.address}`);
// console.log(`Block explorer URL: https://blockscout.scroll.io/address/${lock.address}`); Uncomment here to use the alpha
console.log(`Block explorer URL: https://sepolia.scrollscan.com/address/${lock.address}`); // Sepolia block explorer
// console.log(`Block explorer URL: https://scrollscan.com//address/${lock.address}`); // Mainnet block explorer
}

// We recommend this pattern to be able to use async/await everywhere
Expand Down