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

Apiv2 lookup endpoints #1882

Merged
merged 4 commits into from
Jan 31, 2025
Merged

Apiv2 lookup endpoints #1882

merged 4 commits into from
Jan 31, 2025

Conversation

manuelwedler
Copy link
Contributor

PR to already merge the lookup endpoints of APIv2 to staging. I added the last commit to remove the APIv1 deprecation and the unimplemented v2 paths from the specification.

manuelwedler and others added 4 commits January 30, 2025 12:59
* Add APIv2 OpenAPI specification

`apiv2.yaml` is directly retrieved from Stoplight and can just be copy-pasted again when an update is needed in the future

Needed to change the mode of the validator's refparser because the we reference the same file multiple times now

* Deprecate API v1 endpoints

* Move (Deprecated) to the beginning of titles

* Make Solidity metadata explicit

---------

Co-authored-by: Kaan Uzdoğan <kaanuzdogan@hotmail.com>
* Move `safeHandler` to common.ts

* Update API v2 spec

* Add `v2/contracts/{chainId}` API endpoint

Includes the initial setup of routes and types needed for API v2, as it's the first endpoint

* Fix server test commands

Some shells require mocha's `recursive` option to go through all subdirectories

* Move API v1 routes to apiv1 folder

* Update API v2 spec

* Change pagination to be id based

* Add `getTotalMatchLevel` util function

* Rename MatchLevel types
* Update API v2 spec

* Add VerifiedContract type

* Add tests for GET /v2/contracts/:chainId/:address endpoint

* Add GET `/v2/contract/{chainId}/{address}` endpoint

* Update API v2 spec

* Add proxy detection to GET /v2/contract/{chainId}/{address} endpoint

* Don't deploy a contract in every test

* Fix naming of enpoint to `/v2/contract/{chainId}/{address}`

* Fix proxy-contract-util tests

* Address PR feedback
@manuelwedler manuelwedler merged commit 910de94 into staging Jan 31, 2025
6 checks passed
@kuzdogan kuzdogan deleted the apiv2-lookup branch February 10, 2025 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: COMPLETED
Development

Successfully merging this pull request may close these issues.

2 participants