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

runtime api: query by eth address #675

Merged
merged 1 commit into from
Mar 29, 2024
Merged

Conversation

Andrew7234
Copy link
Collaborator

@Andrew7234 Andrew7234 commented Mar 25, 2024

Resolves #638

This PR now allows querying runtime api endpoints by both ethereum and oasis addresses. This applies to both path params and query params.

» curl "http://localhost:8008/v1/sapphire/events?contract_address=39d22B78A7651A76Ffbde2aaAB5FD92666Aca520" | jq                                                                                                                                                         andrewlow@Beleriand
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 79573    0 79573    0     0  1158k      0 --:--:-- --:--:-- --:--:-- 1253k
{
  "events": [
    {
      "body": {
        "address": "OdIr...

@Andrew7234 Andrew7234 force-pushed the andrew7234/api-eth-address branch 2 times, most recently from 3fa7c45 to 97d1b63 Compare March 25, 2024 23:25
@Andrew7234 Andrew7234 changed the title api: query by eth address in runtime runtime api: query by eth address Mar 26, 2024
@Andrew7234 Andrew7234 force-pushed the andrew7234/api-eth-address branch from a969e88 to 09c1745 Compare March 26, 2024 02:41
storage/client/client.go Outdated Show resolved Hide resolved
tests/e2e_regression/test_cases.sh Outdated Show resolved Hide resolved
@Andrew7234 Andrew7234 marked this pull request as ready for review March 26, 2024 02:46
Copy link
Collaborator

@pro-wh pro-wh left a comment

Choose a reason for hiding this comment

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

we want this to simplify how sourcify accesses contract creation info

api/v1/types/util.go Show resolved Hide resolved
Copy link
Contributor

@mitjat mitjat left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

api/spec/v1.yaml Outdated Show resolved Hide resolved
api/v1/strict_server.go Show resolved Hide resolved
api/v1/types/util.go Outdated Show resolved Hide resolved
api/v1/types/util.go Outdated Show resolved Hide resolved
@@ -1,4 +1,4 @@
HTTP/1.1 404 Not Found
HTTP/1.1 200 OK
Copy link
Contributor

Choose a reason for hiding this comment

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

Note to self/readers: This went 404->200 because even though it's the same endpoint, we now run it in eden, but we used to run it in damask: #675 (comment)

@Andrew7234 Andrew7234 force-pushed the andrew7234/api-eth-address branch 2 times, most recently from db43ab0 to 2618267 Compare March 29, 2024 02:59
add e2e_regression tests for eth api querying; reorg

openapi: Refactor EthOrOasisAddress examples

add changelog
@Andrew7234 Andrew7234 force-pushed the andrew7234/api-eth-address branch from 9656bff to 765f22c Compare March 29, 2024 03:07
@Andrew7234 Andrew7234 enabled auto-merge March 29, 2024 03:07
@Andrew7234 Andrew7234 merged commit 278aa80 into main Mar 29, 2024
14 checks passed
@Andrew7234 Andrew7234 deleted the andrew7234/api-eth-address branch March 29, 2024 03:12
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.

evm_tokens doesn't accept Ethereum formatted addresses
3 participants