Skip to content

[v0] How to translate godwoken_short_address to eth_address? #1069

Answered by Flouse
Flouse asked this question in Q&A
Discussion options

You must be logged in to vote

Solution

Let's say you have a godwoken_short_address 0xaa61ffa7c181bd3e23cb62c91291178e70c7b311.

1. gw_get_script_hash_by_short_address

curl -X POST https://mainnet.godwoken.io/rpc \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"gw_get_script_hash_by_short_address","params": ["0xaa61ffa7c181bd3e23cb62c91291178e70c7b311"], "id":1}'

Result

-> 0xaa61ffa7c181bd3e23cb62c91291178e70c7b311715511e299776a199f9f9c72

2. gw_get_script

curl -X POST https://mainnet.godwoken.io/rpc \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"gw_get_script","params": ["0xaa61ffa7c181bd3e23cb62c91291178e70c7b311715511e299776a199f9f9c72"], "id":1}'

# Result
->

Replies: 2 comments 9 replies

Comment options

Flouse
May 15, 2023
Maintainer Author

You must be logged in to vote
6 replies
@MaksHladun
Comment options

@jjyr
Comment options

@MaksHladun
Comment options

@Flouse
Comment options

Flouse May 17, 2023
Maintainer Author

@MaksHladun
Comment options

Answer selected by Flouse
Comment options

Flouse
May 15, 2023
Maintainer Author

You must be logged in to vote
3 replies
@MaksHladun
Comment options

@classicalliu
Comment options

@MaksHladun
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed v0
4 participants