Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add description how to verify contract with Foundry #123

Merged
merged 2 commits into from
Jan 22, 2024
Merged
Changes from 1 commit
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
50 changes: 50 additions & 0 deletions docs/tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Tools

## Foundry

You can verify contracts using Foundry in Hedera using our verification service.
Our verification service instance is located at `https://server-verify.hashscan.io`.
acuarica marked this conversation as resolved.
Show resolved Hide resolved

Once you have a running Foundry example, you can deploy and verify it with our verification service, for example

```console
forge create --rpc-url https://testnet.hashio.io/api \
--private-key <your_private_key> src/Counter.sol:Counter \
--verify \
--verifier sourcify \
--verifier-url https://server-verify.hashscan.io
```

After the contract has been verified, you can check its sources in the verification repository, for example see `https://repository-verify.hashscan.io/contracts/full_match/296/0x559e79D4Edf86E772840eFc2ee4CFC37bB500f2F/`.

Tracking issue <https://github.com/hashgraph/hedera-sourcify/issues/122>.

### Running the verification service locally

Make sure you are running a local node instance and grab one of the alias ECDSA keys.

```console
hedera start -d --network local
```

Create a new Foundry project

```console
forge init hello_foundry
acuarica marked this conversation as resolved.
Show resolved Hide resolved
```

Start the local verification service

```console
npm run server:start
```

Deploy and verify the contract locally

```console
forge create --rpc-url http://localhost:7546 \
--private-key <your_private_key> src/Counter.sol:Counter \
--verify \
--verifier sourcify \
--verifier-url http://localhost:5002
```
Loading