Skip to content

Commit 83e8707

Browse files
committed
Create readme
1 parent f9d2f58 commit 83e8707

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# verified-solidity-source
2+
3+
NPM package to fetch the Solidity source for a contract deployed on any EVM chain
4+
5+
Supports:
6+
7+
* Sourcify
8+
* Etherscan
9+
10+
## Installation
11+
12+
```
13+
npm install verified-solidity-source
14+
```
15+
16+
## Usage
17+
18+
This package exports a single async function that accepts 2 parameters: contract address and chain id.
19+
20+
The first matching result is returned.
21+
22+
```js
23+
import verifiedSource from 'verified-solidity-source';
24+
25+
26+
const sources = await verifiedSource('0x8644C2B4293923BF60c909171F089f4c5F75474c', 11155111);
27+
// { '<filename>': { content: '<solidity source>' }
28+
```
29+
30+
## See Also
31+
32+
* [@nomicfoundation/hardhat-verify](https://www.npmjs.com/package/@nomicfoundation/hardhat-verify) to go the other way and submit sources to block exporers
33+
34+
## License
35+
36+
MIT

0 commit comments

Comments
 (0)