Skip to content

Commit bc7eaf1

Browse files
committed
update readme
1 parent bcfaf40 commit bc7eaf1

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

README.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,52 @@
22

33
This is a simple contract that verifies signatures from a given notary.
44

5-
The contract is deployed on Base Sepolia at
5+
The contract is deployed on Base Sepolia at [`0xb4C3FC8aE7f7a9DCc73108cd8F35f82110008189`](https://sepolia.basescan.org/address/0xb4c3fc8ae7f7a9dcc73108cd8f35f82110008189)
66

7+
### Deployment & Verification
8+
9+
This command will deploy the contract and automatically verify it on Basescan.
10+
11+
1. **Set your Private Key:** This is required to sign the deployment transaction.
12+
13+
```bash
14+
export PRIVATE_KEY="<YOUR_PRIVATE_KEY>"
15+
```
16+
17+
2. **Set your Basescan API Key:** You need an API key from Etherscan (which works for Basescan) to publish the source code. You can get one for free from the [Etherscan website](https://etherscan.io/register).
18+
19+
```bash
20+
export ETHERSCAN_API_KEY="<YOUR_ETHERSCAN_API_KEY>"
21+
```
22+
23+
3. **Run the deployment script:**
24+
25+
```bash
26+
forge script script/SignatureChecker.s.sol:VerifierScript \
27+
--rpc-url https://sepolia.base.org \
28+
--private-key $PRIVATE_KEY \
29+
--broadcast \
30+
--verify \
31+
--verifier etherscan \
32+
--etherscan-api-key $ETHERSCAN_API_KEY \
33+
-vvvv
34+
```
35+
36+
### Manual Verification
37+
38+
If the deployment script succeeds but verification fails for some reason, you can verify it manually.
39+
40+
1. **Find your contract address and constructor arguments:** After a successful deployment, Foundry saves a receipt in the `broadcast/` directory. Look inside `broadcast/SignatureChecker.s.sol/84532/run-latest.json`.
41+
42+
- The contract address is under `receipts[0].contractAddress`.
43+
- The constructor arguments are the long hex string under `transactions[0].constructorArguments`.
44+
45+
2. **Run the verify command:**
46+
47+
```bash
48+
forge verify-contract <CONTRACT_ADDRESS> src/Verifier.sol:Verifier \
49+
--chain base-sepolia \
50+
--verifier etherscan \
51+
--etherscan-api-key $ETHERSCAN_API_KEY \
52+
--constructor-args <CONSTRUCTOR_ARGS>
53+
```

0 commit comments

Comments
 (0)