aptos-labs / aptos-ts-sdk

An SDK for accessing the Aptos blockchain data, submitting transactions, and more!
https://aptos-labs.github.io/aptos-ts-sdk/
Apache License 2.0
74 stars 43 forks source link

[abi] Allow overriding View function ABI with a local version #431

Closed gregnazario closed 3 months ago

gregnazario commented 4 months ago

Description

This doesn't allow skipping the ABI, as it still checks inputted types are the proper types, but it should allow for things like private view functions, and skipping the ABI pull, with the type safety of the ABI.

This ABI check was originally added, because of the move to BCS view functions. This was the only way to allow for more complex arguments to be parsed, without a significantly complex parser on both the fullnode side and the SDK side

The undefined checks tend not to do well, when there are multiple systems that parse from one to the next. Quite often some pieces will return null instead of undefined, and we will likely need to do some extra handling of that elsewhere too.

Test Plan

Related Links