Skip to content

Commit

Permalink
docs: update README with current API structure and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
portdeveloper committed Aug 10, 2024
1 parent 5a898fb commit 0380076
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


![logo](https://github.com/user-attachments/assets/d71778e6-4fe5-48e3-aa5f-9ad17f783f5e)

Get-ABI-2000 is a Go-based API service that fetches and caches Ethereum contract ABIs. It supports multiple chains, proxy contract detection, and fallback to decompiled ABIs using the Heimdall API.
Expand Down Expand Up @@ -48,24 +46,34 @@ To run the server locally:

The server will start on `http://localhost:8080`.

### API Endpoint
### API Endpoints

1. Health Check:
GET `/`

GET `/abi/:chainId/:address`
2. Fetch ABI:
GET `/abi/:chainId/:address/*rpcUrl`

- `:chainId`: The chain ID (1 for Ethereum, 11155111 for Sepolia, 10 for Optimism, 56 for BSC)
- `:address`: The contract address
- `:rpcUrl`: The RPC URL for the blockchain (without 'https://')

Example 1 (mainnet, non-proxy, not decompiled):
Examples:

```curl http://localhost:8080/abi/1/0x6B175474E89094C44Da98b954EedeAC495271d0F```

Example 2 (mainnet, proxy, not decompiled):

```curl http://localhost:8080/abi/1/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48```
1. Mainnet (non-proxy, not decompiled):
```
curl http://localhost:8080/abi/1/0x6B175474E89094C44Da98b954EedeAC495271d0F/rpc.ankr.com/eth
```

Example 3 (sepolia, non-proxy, decompiled):
2. Mainnet (proxy, not decompiled):
```
curl http://localhost:8080/abi/1/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/rpc.ankr.com/eth
```

```curl http://localhost:8080/abi/11155111/0x759c0e9d7858566df8ab751026bedce462ff42df```
3. Sepolia (non-proxy, decompiled):
```
curl http://localhost:8080/abi/11155111/0x759c0e9d7858566df8ab751026bedce462ff42df/rpc.ankr.com/eth_sepolia
```

### Response

Expand Down Expand Up @@ -101,4 +109,4 @@ Contributions are welcome! Please feel free to open an issue or submit a Pull Re

## License

This project is licensed under the MIT License.
This project is licensed under the MIT License.

0 comments on commit 0380076

Please sign in to comment.