trueblocks-core
trueblocks-core copied to clipboard
chifra sdk - serious issues before release
-
~There is nothing stopping the user from shooting themselves in the foot with the types. For example, they call
BlocksTraceswithout first setting theTracesoption. The returned data will beTracedata, but the underlying call will have gone through the regularBlocksroutines.BlockNumberandTransactionIndexwill be filled, but nothing else. The JSON parser is "forgiving" in the sense that it ignores unknown fields and doesn't require other fields.~ -
The Globals data allows users to specify options for which the underlying routine does not have the capability. For example, enabling Raw on routines that have no --raw option. There's a solution here. Instead of embedding the Globals, we can include any available fields in the sdk TypeOptions so the user can only set those values that are available.