Skip to content

Commit

Permalink
Fix load of abi fragments from store missing array (#92)
Browse files Browse the repository at this point in the history
* Fix load of abi fragments from store missing array

* Turbo repo upgrade

* Changeset

* Update pnpm version in github actions
  • Loading branch information
Ferossgp authored Sep 2, 2024
1 parent 76badf6 commit 03306a6
Show file tree
Hide file tree
Showing 11 changed files with 9,133 additions and 6,118 deletions.
5 changes: 5 additions & 0 deletions .changeset/dull-tools-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@3loop/transaction-decoder': minor
---

Fix store abi loader for fragments needs wrapping in square brakets to act as array
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
name: Install pnpm
id: pnpm-install
with:
version: 8
version: 9.9.0
run_install: false

- name: Get pnpm store directory
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
name: Install pnpm
id: pnpm-install
with:
version: 8
version: 9.9.0
run_install: false

- name: Get pnpm store directory
Expand Down Expand Up @@ -56,8 +56,8 @@ jobs:
with:
version: pnpm run version
publish: pnpm exec changeset publish
commit: "[ci] release"
title: "[ci] release"
commit: '[ci] release'
title: '[ci] release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"eslint": "^8.47.0",
"prettier": "^3.0.2",
"tsconfig": "workspace:*",
"turbo": "latest"
"turbo": "2.1.1"
},
"packageManager": "pnpm@8.6.10",
"packageManager": "pnpm@9.9.0",
"name": "@3loop/decoder-monorepo"
}
8 changes: 4 additions & 4 deletions packages/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"version": "0.0.0",
"private": true,
"devDependencies": {
"@vercel/style-guide": "^4.0.2",
"eslint-config-turbo": "^1.10.12",
"eslint-plugin-prettier": "^5.0.0",
"eslint-config-prettier": "^8.10.0",
"@vercel/style-guide": "^6.0.0",
"eslint-config-turbo": "^2.1.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-sort-export-all": "^1.4.1"
}
}
2 changes: 1 addition & 1 deletion packages/transaction-decoder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const AbiStoreLive = Layer.succeed(
if (abi) {
return {
type: 'func',
abi: `[${abi}]`,
abi: abi,
address,
chainID: chainID,
signature,
Expand Down
3 changes: 2 additions & 1 deletion packages/transaction-decoder/src/abi-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ const AbiLoaderRequestResolver = RequestResolver.makeBatched((requests: Array<Ab
cachedResults,
([request, result]) => {
const group = requestGroups[makeRequestKey(request)]
const abi = result?.abi ?? null
const abi = getBestMatch(result)

return Effect.forEach(group, (req) => Request.succeed(req, abi), { discard: true })
},
{
Expand Down
4 changes: 2 additions & 2 deletions packages/transaction-decoder/test/mocks/abi-loader-mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const MockedAbiStoreLive = Layer.succeed(
status: 'success',
result: {
type: 'func',
abi: `[${signatureAbi}]`,
abi: signatureAbi,
address,
chainID: 1,
signature,
Expand All @@ -82,7 +82,7 @@ export const MockedAbiStoreLive = Layer.succeed(
status: 'success',
result: {
type: 'event',
abi: `[${signatureAbi}]`,
abi: signatureAbi,
address,
chainID: 1,
event,
Expand Down
4 changes: 2 additions & 2 deletions packages/transaction-decoder/test/vanilla.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('Transaction Decoder', () => {
status: 'success',
result: {
type: 'func',
abi: `[${signatureAbi}]`,
abi: signatureAbi,
address,
chainID: 1,
signature,
Expand All @@ -57,7 +57,7 @@ describe('Transaction Decoder', () => {
status: 'success',
result: {
type: 'event',
abi: `[${signatureAbi}]`,
abi: signatureAbi,
address,
chainID: 1,
event,
Expand Down
Loading

0 comments on commit 03306a6

Please sign in to comment.