You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Base64 encoding has become relevant in Solidity development for reasons like on-chain metadata (NFTs), and seems there's an upcoming demand for Base64-URL encoding driven by passkey-based authentication (relying on WebAuthn).
As of OZ Contracts, we're working on a Base64URL implementation and we'd love to fuzz the implementation. It'd be great if the Vm.sol had a set of functions for Base64 encoding.
Proposal
Consider adding the following function signatures to Vm.sol:
// crates/cheatcodes/spec/src/vm.rs// ======== Utilities ========
...// -------- Base64 --------#[cheatcode(group = Base64)]function toBase64(bytes calldata data) external pure returns (string memory);#[cheatcode(group = Base64)]function toBase64(string calldata data) external pure returns (string memory);#[cheatcode(group = Base64)]
function toBase64URL(bytes calldata data) external pure returns (string memory);#[cheatcode(group = Base64)]
function toBase64URL(string calldata data) external pure returns (string memory);
Such functions can be implemented using this Base64 create, which would provide a reference implementation to fuzz the Solidity version against.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Component
Forge
Describe the feature you would like
Motivation
Base64 encoding has become relevant in Solidity development for reasons like on-chain metadata (NFTs), and seems there's an upcoming demand for Base64-URL encoding driven by passkey-based authentication (relying on WebAuthn).
As of OZ Contracts, we're working on a Base64URL implementation and we'd love to fuzz the implementation. It'd be great if the
Vm.sol
had a set of functions for Base64 encoding.Proposal
Consider adding the following function signatures to
Vm.sol
:Such functions can be implemented using this Base64 create, which would provide a reference implementation to fuzz the Solidity version against.
Additional context
No response
The text was updated successfully, but these errors were encountered: