This will enforce the fields that need to be present in the dictionary:
At the moment if we say that some calldata that we know has the field name and age, we only specify that the dict should have the form dict[str, str | int] but this will also be a valid dict {"name": "John", "age": 25, "whatever": "Hello World!"}.
This is getting very confusing as the data coming from the client is evolving and it's hard to keep track of
This will enforce the fields that need to be present in the dictionary:
At the moment if we say that some calldata that we know has the field
name
andage
, we only specify that the dict should have the formdict[str, str | int]
but this will also be a valid dict{"name": "John", "age": 25, "whatever": "Hello World!"}
.This is getting very confusing as the data coming from the client is evolving and it's hard to keep track of