Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
kariy
left a comment
There was a problem hiding this comment.
Ok, good job. This is a very good start.
For the block id input here, I think we can make user's life more easier by having predefined values for the block tag - preconfirmed, latest, and l1 accepted - in the dropdown list. This is to prevent user from specifying invalid block tag.
For estimate fee, we can just omit some of the fields as some of them are implied. In the screenshot for example, we're providing inputs for a Invoke transaction v3, so fields like version and type can be implied here to be 0x3 and INVOKE respectively.
This is specific to estimate fee, we can make the resource_bounds field optional. The purpose of having the estimate fee rpc method in the first place is so that we can get an estimated values for resource_bounds field. So, most of the time, people send an estimate fee request where all of the resource bounds fields are zero. But it doesn't necessarily mean having a nonzero resource bounds is incorrect, hence, we can make it optional here.
For the simulation_flags, yes according to the spec the param is an array. BUT there's only a single value that it accepts (as of RPC 0.8.1) which is SKIP_VALIDATE. So, what I think we can do here, is have some sort of toggle button to choose between sending the estimate fee request with or without the SKIP_VALIDATE flag instead of an input that accepts multiple values.
"SIMULATION_FLAG_FOR_ESTIMATE_FEE": {
"type": "string",
"enum": ["SKIP_VALIDATE"],
"description": "Flags that indicate how to simulate a given transaction. By default, the sequencer behavior is replicated locally"
},
|
Checklist:
|
Displays all possible inputs for JSON RPC playground