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

fix: support complex arguments/response in contract call #942

Merged
merged 3 commits into from
May 26, 2023

Conversation

Keith-CY
Copy link
Member

@Keith-CY Keith-CY commented May 5, 2023

string will be encoded/decoded with ',' if argument/response type is an array

Preview: https://godwoken-explorer-ui-git-fix-complex-argument-ae0f82-magickbase.vercel.app/account/0x309c15a655f8f1ab860f3ad81a233e8bcadb300e?tab=contract

Try:
["0x309c15a655f8f1ab860f3ad81a233e8bcadb300e","0x309c15a655f8f1ab860f3ad81a233e8bcadb300e"]
or
0x309c15a655f8f1ab860f3ad81a233e8bcadb300e,0x309c15a655f8f1ab860f3ad81a233e8bcadb300e

Ref: Magickbase/godwoken_explorer#1421

string will be encoded/decoded if argument/response type is an array
@vercel
Copy link

vercel bot commented May 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
godwoken-explorer-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 24, 2023 4:40pm

@codecov-commenter
Copy link

Codecov Report

Merging #942 (b84c744) into develop (3f71d5d) will decrease coverage by 0.91%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #942      +/-   ##
===========================================
- Coverage    68.13%   67.22%   -0.91%     
===========================================
  Files           18       18              
  Lines         1321     1321              
  Branches       788      788              
===========================================
- Hits           900      888      -12     
- Misses         365      378      +13     
+ Partials        56       55       -1     

see 4 files with indirect coverage changes

@Keith-CY
Copy link
Member Author

Keith-CY commented May 9, 2023

Please have a review @JeffreyMa597 @FrederLu

@FrederLu
Copy link
Contributor

FrederLu commented May 11, 2023

Try:
["0x309c15a655f8f1ab860f3ad81a233e8bcadb300e","0x309c15a655f8f1ab860f3ad81a233e8bcadb300e"]
or
0x309c15a655f8f1ab860f3ad81a233e8bcadb300e,0x309c15a655f8f1ab860f3ad81a233e8bcadb300e

Array format is now supported.
image

Does the string in the array also support single quotes['0x309c15a655f8f1ab860f3ad81a233e8bcadb3001','0x309c15a655f8f1ab860f3ad81a233e8bcadb300e']? If single quotes are used, an exception will be prompted, but there is no clear prompt from the prompt, which requires the user to have a certain understanding.
image
Or display double-quoted strings in the response data to make the user aware of the input format.

e.g. [0x309c15a655F8F1Ab860F3Ad81A233e8BCaDb300E, 0x309c15a655F8F1Ab860F3Ad81A233e8BCaDb300E]
@Keith-CY
Copy link
Member Author

Try:
["0x309c15a655f8f1ab860f3ad81a233e8bcadb300e","0x309c15a655f8f1ab860f3ad81a233e8bcadb300e"]
or
0x309c15a655f8f1ab860f3ad81a233e8bcadb300e,0x309c15a655f8f1ab860f3ad81a233e8bcadb300e

Array format is now supported. image

Does the string in the array also support single quotes['0x309c15a655f8f1ab860f3ad81a233e8bcadb3001','0x309c15a655f8f1ab860f3ad81a233e8bcadb300e']? If single quotes are used, an exception will be prompted, but there is no clear prompt from the prompt, which requires the user to have a certain understanding. image Or display double-quoted strings in the response data to make the user aware of the input format.

Array as [0x309c15a655F8F1Ab860F3Ad81A233e8BCaDb300E, 0x309c15a655F8F1Ab860F3Ad81A233e8BCaDb300E] is supported by 3deada1

@Keith-CY Keith-CY merged commit bc0727a into develop May 26, 2023
@Keith-CY Keith-CY deleted the fix-complex-arguments-in-contract-call branch May 26, 2023 03:54
Keith-CY added a commit that referenced this pull request May 26, 2023
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jun Ma <[email protected]>
Co-authored-by: Chen Yu <[email protected]>
fix:layout of tooltip is improper (#943)
fix test case of online data (#948)
fix: support complex arguments/response in contract call (#942)
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.

4 participants