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.
createMetadata
specific env vars.Summary:
createMetadata
memoizes the call to ensure metadata is not reallocated in memory if it is the same call.Methods that actively use
createMetadata
and are affected are:defineMethod
createDecoratedTx
createDecoratedConstants
createSignedTx
decodeSignedTx
decodeSigningPayload
decodeUnsignedTx
NOTE:
getRegistryBase
usescreateMetadataUnmemoized
TXWRAPPER_METADATA_CACHE_MAX
Summary:
Set the max amount of memoized calls we want in the cache. It uses an LRU cache to handle the input and output of values. This takes in an integer. Ex:
export TXWRAPPER_METADATA_CACHE_MAX=10
. This will default to unlimited size if the value is not inputted.NOTES:
TXWRAPPER_METADATA_CACHE_MAX_AGE
Summary:
Set the TTL (Time To Live) for items in the memoized cache. This takes in an integer in the measurement of milliseconds. Ex:
export TXWRAPPER_METADATA_CACHE_MAX_AGE=1000
for 1 second.Other Changes
getRegistryBase
usescreateMetadataUnmemoized
instead ofcreateMetadata