Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fresh-tips-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@3loop/transaction-decoder': patch
---

Fix in-memory meta store was missing access to PubliClient for RPC requests
2 changes: 2 additions & 0 deletions packages/transaction-decoder/README.md
Original file line number Diff line number Diff line change
@@ -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
```
Expand Down
6 changes: 3 additions & 3 deletions packages/transaction-decoder/src/vanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface TransactionDecoderOptions {
abiStore: VanillaAbiStore | Layer.Layer<EffectAbiStore<AbiParams, ContractAbiResult>>
contractMetaStore:
| VanillaContractMetaStore
| Layer.Layer<EffectContractMetaStore<ContractMetaParams, ContractMetaResult>>
| Layer.Layer<EffectContractMetaStore<ContractMetaParams, ContractMetaResult>, never, PublicClient>
logLevel?: LogLevel.Literal
}

Expand Down Expand Up @@ -76,7 +76,7 @@ export class TransactionDecoder {
)
}

let MetaStoreLive: Layer.Layer<EffectContractMetaStore<ContractMetaParams, ContractMetaResult>>
let MetaStoreLive: Layer.Layer<EffectContractMetaStore<ContractMetaParams, ContractMetaResult>, never, PublicClient>

if (Layer.isLayer(contractMetaStore)) {
MetaStoreLive = contractMetaStore as Layer.Layer<EffectContractMetaStore<ContractMetaParams, ContractMetaResult>>
Expand All @@ -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))),
)

Expand Down
Loading