Skip to content

V1 - Do not rely on api keys for contract verifycation but keep them as a fallback - #37

Merged
JasoonS merged 2 commits into
mainfrom
v1-api-token-less-code-retrieval
Jun 20, 2024
Merged

JasoonS merged 2 commits into
mainfrom
v1-api-token-less-code-retrieval

Conversation

@JasoonS

@JasoonS JasoonS commented Jun 17, 2024

Copy link
Copy Markdown
Contributor

Read comments here: #36

@JasoonS
JasoonS requested review from DZakh and DenhamPreen June 17, 2024 05:49
@JasoonS JasoonS changed the title Do not rely on api keys for contract verifycation but keep them as a … Do not rely on api keys for contract verifycation but keep them as a fallback Jun 17, 2024
@github-actions

Copy link
Copy Markdown

Here's the diff of the codegen output.🙌🧠🦜

@JasoonS JasoonS changed the title Do not rely on api keys for contract verifycation but keep them as a fallback V1 - Do not rely on api keys for contract verifycation but keep them as a fallback Jun 17, 2024

// Selecting the api_key to be used based on the index
let api_key = api_keys[api_key_index];
let api_key: Option<String> = if rate_limit_retry_count == 0 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if there is a case where the rate_limit_retry_count can be more than 0 but this is used again. For example when trying to import multiple contracts. Hence first contract won't use api keys and then subsequent requests will?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It resets to zero each time from what I saw.

@JasoonS
JasoonS force-pushed the v1-api-token-less-code-retrieval branch from 036a88a to 4a86aa3 Compare June 20, 2024 12:19
@JasoonS

JasoonS commented Jun 20, 2024

Copy link
Copy Markdown
Contributor Author

Ok, I think this is ready 💪

Completely removed API tokens. Tried out a few ways to allow users to add their own API tokens if the API blocks them.
image

In the above image I had to artificially cause the retrieval of the contract to fail (I couldn't get it to fail without forcing it to fail). So I'm confident that it will be an unlikely edge case that a user will need to provide their own API tokens.

@JasoonS
JasoonS merged commit f271f7c into main Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants