Open nishuzumi opened 1 month ago
ERCS/erc-6860.md
Requires 1 more reviewers from @nand2, @pichaoqkc, @qizhou, @samwilsn
The commit e81887866a5076aaccf0f0bd2da1a86f7c221d08 (as a parent of 0e763e08768ed779071801a19bab61bfb22db06f) contains errors. Please inspect the Run Summary for details.
@qizhou Add some fix code
The rfc format problem has been fixed after the last modification, please kindly review it again @nand2, @pichaoqkc, @qizhou, @SamWilsn
Hi!
Thanks for the PR. Here is my feedback :
_from
attribute is not necessary, it is already supported via the userinfo
field in schema "://" [ userinfo "@" ] contractName [ ":" chainid ] pathQuery
.attribute
and evmParams
in aQuery
, it would be better to rework the attribute
field, and start from there. Rename attrName
and attrValue
to something more precise, as the returns
/returnTypes
are no longer the only attributes. For example : attribute = retAttrName "=" retAttrValue / evmAttrName "=" evmAttrValue
blockNumber
: I guess we should add the 5 authorized string values ("latest", "earliest", "pending", "safe" or "finalized").web3://
URL. So, in manual mode, every query (mQuery = *( pchar / "/" / "?" )
) is already allowed, so there is no need to alter it. On the other hand, the special _blockNumber
and _gasLimit
parameters should be described in the manual mode section in the specification (behavior, syntax of value (can reference the syntax definition of auto mode), whether they are forwarded to the smartcontract, etc)I would also argue that, while prefixing these attributes with _
makes sense for the manual mode, to prevent conflicts with actual attributes used by the webpage, they are not necessary for the auto mode since there cannot be any conflict.
One could argue that it may be confusing that sometimes it is _blockNumber
and sometimes it is blockNumber
, but on the other hand when we craft a web3:// URL, we already know for which mode we are crafting the URL. So:
web3://usdc.eth/balanceOf/vitalik.eth?returns=(uint)&blockNumber=12000000
web3://vitalikblog.eth/general/2024/07/23/circlestarks.html?_blockNumber=12000000
What do you think?
Other subject : Outside the scope of this ERC, but linked : for resource request mode (erc-6944), I think we would support this there as well, and it would make sense to me that we just do not forward the new attributes _blockNumber
and _gasLimit
to the smartcontract.
So for the manual mode : should we also extract these from the calldata sent to the smartcontract? It would make sense to me.
Thanks!
This PR extends the Web3 URL specification to include support for the _blockNumber parameter, allowing users to specify a particular block number when making queries and enabling access to historical blockchain data.
Summary of changes:
pathQuery
to optionally includeevmQuery
evmQuery
rule to handle EVM-specific parametersblockNumberQuery
rule for _blockNumber parameter