Caching ABI in Action for future use #69
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an idea to help the contract kit send transactions to the session kit...
The problem right now with the contract kit, when performing transactions, is you need to manually specify and pass in the ABIs to the
session.transact
call to prevent duplicate calls to retrieve the ABI.The idea was that in situations where we have the ABI or a Struct, we can embed that into the
Action
class, which is what's passed intosession.transact
. If an ABI existed someplace likeaction.abi
, then the Session Kit during thetransct
call would be able to do something like:Which would then prevent the session kit from needing to go out and fetch the ABI (since it's in the action already).
It's basically a trojan horse to pass along the
ABI
inside of theAction
, for processes upstream that might be interacting with thatAction
.This is probably a bad implementation, but it works, and submitted this as a draft to express the idea.