Closed carlosfaria94 closed 11 months ago
Hi, thanks for your interest and staring of the repo.
A solution is either to deploy the library then call it, or modifying the type from calldata to memory recursively. Hope that helps.
Thank you @rdubois-crypto
@rdubois-crypto As other use cases (ERC-1271 more precisely) use memory variables, would you be open to a proposition of implementation to be compatible with memory for FCL_WebAuthn
?
It would avoid deployment of the library + an external call or forking FCL + modifying code. Having it directly in the FCL repo would reduce the amount of errors when building on top.
Also, if I am not mistaken, at least in foundry, to deploy the lib and call it, a user would have to modify the FCL code to have at least one function external or public. All function of FCL_Webauthn.sol are internal hence the lib should be embedded in the calling contract https://github.com/rdubois-crypto/FreshCryptoLib/blob/548e9b112126dbf2054ab12a32c6ff8b7594ab56/solidity/src/FCL_Webauthn.sol#L38
Either the library should use memory or should have external functions (imo and if I am not mistaken) What are your thoughts on this ?
Update: see issue #21
I'm trying to use this library with the ERC-4337 reference implementation for a PoC.
I need do decode the
UserOperation
, and thus it needs to be stored inmemory
, however your library heavily usecalldata
(e.g.calldataload
andcalldatacopy
) making it harder (or not possible?).There is another way to do this?
Thank you for your contribution!