-
|
Following @DZakh's advice here, I proceeded to use the new const ERC20MetadataOutput = {
decimals: S.number,
name: S.string,
symbol: S.string,
};Now, the question is, how can I make the entire output optional? I tried this: const ERC20MetadataOutput = S.optional({
decimals: S.number,
name: S.string,
symbol: S.string,
});And this: const ERC20MetadataOutput = S.nullable(S.object({
decimals: S.number,
name: S.string,
symbol: S.string,
});But neither approach worked. |
Beta Was this translation helpful? Give feedback.
Answered by
DZakh
Jun 5, 2025
Replies: 2 comments 1 reply
-
|
You need to use |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
PaulRBerg
-
|
It currently uses https://github.com/DZakh/sury |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to use
S.schemathe same way you tried to useS.object.