diff --git a/.changeset/fresh-tips-try.md b/.changeset/fresh-tips-try.md new file mode 100644 index 0000000..0f15d55 --- /dev/null +++ b/.changeset/fresh-tips-try.md @@ -0,0 +1,5 @@ +--- +'@3loop/transaction-decoder': patch +--- + +Fix in-memory meta store was missing access to PubliClient for RPC requests diff --git a/packages/transaction-decoder/README.md b/packages/transaction-decoder/README.md index be21a40..9ad4cee 100644 --- a/packages/transaction-decoder/README.md +++ b/packages/transaction-decoder/README.md @@ -1,7 +1,9 @@ # Transaction Decoder ## Getting Started + To get started, install the package from npm, along with its peer dependencies: + ``` $ npm i @3loop/transaction-decoder ``` diff --git a/packages/transaction-decoder/src/vanilla.ts b/packages/transaction-decoder/src/vanilla.ts index 5b6c145..cbe51e0 100644 --- a/packages/transaction-decoder/src/vanilla.ts +++ b/packages/transaction-decoder/src/vanilla.ts @@ -16,7 +16,7 @@ export interface TransactionDecoderOptions { abiStore: VanillaAbiStore | Layer.Layer> contractMetaStore: | VanillaContractMetaStore - | Layer.Layer> + | Layer.Layer, never, PublicClient> logLevel?: LogLevel.Literal } @@ -76,7 +76,7 @@ export class TransactionDecoder { ) } - let MetaStoreLive: Layer.Layer> + let MetaStoreLive: Layer.Layer, never, PublicClient> if (Layer.isLayer(contractMetaStore)) { MetaStoreLive = contractMetaStore as Layer.Layer> @@ -93,7 +93,7 @@ export class TransactionDecoder { } const LoadersLayer = Layer.provideMerge(AbiStoreLive, MetaStoreLive) - const MainLayer = Layer.provideMerge(Layer.succeed(PublicClient, PublicClientLive), LoadersLayer).pipe( + const MainLayer = LoadersLayer.pipe(Layer.provideMerge(Layer.succeed(PublicClient, PublicClientLive))).pipe( Layer.provide(Logger.minimumLogLevel(LogLevel.fromLiteral(logLevel))), )