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/bright-falcons-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wagmi/core": minor
---

**Breaking (@wagmi/core/tempo):** Updated Tempo APIs for viem 2.54.0: token balance and allowance reads now return `Amount` objects.
5 changes: 5 additions & 0 deletions .changeset/curly-turtles-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wagmi": minor
---

**Breaking (wagmi/tempo):** Updated Tempo APIs for viem 2.54.0: token balance and allowance reads now return `Amount` objects.
6 changes: 3 additions & 3 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
fetch-depth: 0

- name: Install dependencies
uses: wevm/actions/.github/actions/pnpm@f95dc1dadcba18fe3f02b8205e653e98e4a93516
uses: wevm/actions/.github/actions/pnpm@2a55cccb5234b9fa0bbd87c1eaba45571c466a68
with:
node-version: 24.5
skip-cache: true # avoid cache poisoning attacks
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8

- name: Install dependencies
uses: wevm/actions/.github/actions/pnpm@f95dc1dadcba18fe3f02b8205e653e98e4a93516
uses: wevm/actions/.github/actions/pnpm@2a55cccb5234b9fa0bbd87c1eaba45571c466a68
with:
node-version: 24.5
skip-cache: true # avoid cache poisoning attacks
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8

- name: Install dependencies
uses: wevm/actions/.github/actions/pnpm@f95dc1dadcba18fe3f02b8205e653e98e4a93516
uses: wevm/actions/.github/actions/pnpm@2a55cccb5234b9fa0bbd87c1eaba45571c466a68
with:
node-version: 24.5
skip-cache: true # avoid cache poisoning attacks
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8

- name: Install dependencies
uses: wevm/actions/.github/actions/pnpm@f7ad7f00e16e73322562922c241f21f0c7ffbbec
uses: wevm/actions/.github/actions/pnpm@2a55cccb5234b9fa0bbd87c1eaba45571c466a68
with:
node-version: 24.5

Expand All @@ -55,7 +55,7 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8

- name: Install dependencies
uses: wevm/actions/.github/actions/pnpm@f7ad7f00e16e73322562922c241f21f0c7ffbbec
uses: wevm/actions/.github/actions/pnpm@2a55cccb5234b9fa0bbd87c1eaba45571c466a68
with:
node-version: 24.5

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
uses: wevm/actions/.github/actions/pnpm@f7ad7f00e16e73322562922c241f21f0c7ffbbec
uses: wevm/actions/.github/actions/pnpm@2a55cccb5234b9fa0bbd87c1eaba45571c466a68
with:
node-version: 24.5

Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8

- name: Install dependencies
uses: wevm/actions/.github/actions/pnpm@f7ad7f00e16e73322562922c241f21f0c7ffbbec
uses: wevm/actions/.github/actions/pnpm@2a55cccb5234b9fa0bbd87c1eaba45571c466a68
with:
node-version: 24.5

Expand All @@ -82,14 +82,14 @@ jobs:
strategy:
matrix:
typescript-version: ['5.9.3', '6.0.3', 'latest']
viem-version: ['2.51.0', 'latest']
viem-version: ['2.54.0', 'latest']

steps:
- name: Clone repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8

- name: Install dependencies
uses: wevm/actions/.github/actions/pnpm@f7ad7f00e16e73322562922c241f21f0c7ffbbec
uses: wevm/actions/.github/actions/pnpm@2a55cccb5234b9fa0bbd87c1eaba45571c466a68
with:
node-version: 24.5

Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8

- name: Install dependencies
uses: wevm/actions/.github/actions/pnpm@f7ad7f00e16e73322562922c241f21f0c7ffbbec
uses: wevm/actions/.github/actions/pnpm@2a55cccb5234b9fa0bbd87c1eaba45571c466a68
with:
node-version: 24.5

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"solid-js": "catalog:",
"testcontainers": "^11.13.0",
"typescript": "^5.9.3",
"viem": "2.51.0",
"viem": "2.54.0",
"vite": "catalog:",
"vite-plugin-react-fallback-throttle": "^0.1.3",
"vite-plugin-solid": "catalog:",
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/actions/call.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ test('insufficient funds', async () => {
value: 100000 ETH

Details: Insufficient funds for gas * price + value
Version: viem@2.51.0]
Version: viem@2.54.0]
`)
})

Expand All @@ -103,7 +103,7 @@ test('maxFeePerGas less than maxPriorityFeePerGas', async () => {
maxFeePerGas: 20 gwei
maxPriorityFeePerGas: 22 gwei

Version: viem@2.51.0]
Version: viem@2.54.0]
`)
})

Expand All @@ -123,7 +123,7 @@ test('contract revert (contract error)', async () => {
data: 0xa0712d6800000000000000000000000000000000000000000000000000000000000001a4

Details: execution reverted: Token ID is taken
Version: viem@2.51.0]
Version: viem@2.54.0]
`)
})

Expand All @@ -143,6 +143,6 @@ test('contract revert (insufficient params)', async () => {
data: 0xa0712d68

Details: execution reverted
Version: viem@2.51.0]
Version: viem@2.54.0]
`)
})
2 changes: 1 addition & 1 deletion packages/core/src/actions/connect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ test('behavior: user rejected request', async () => {
[UserRejectedRequestError: User rejected the request.

Details: Failed to connect.
Version: viem@2.51.0]
Version: viem@2.54.0]
`)
})

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/actions/deployContract.test.ts

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions packages/core/src/actions/readContracts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ test('throws if allowFailure=false & a contract method fails', async () => {

Docs: https://viem.sh/docs/contract/readContract
Details: execution reverted: ERC721Enumerable: owner index out of bounds
Version: viem@2.51.0]
Version: viem@2.54.0]
`,
)
})
Expand Down Expand Up @@ -436,7 +436,7 @@ test('allowFailure=true & a contract method fails', async () => {

Docs: https://viem.sh/docs/contract/readContract
Details: execution reverted: ERC721Enumerable: owner index out of bounds
Version: viem@2.51.0],
Version: viem@2.54.0],
"result": undefined,
"status": "failure",
},
Expand All @@ -451,7 +451,7 @@ test('allowFailure=true & a contract method fails', async () => {

Docs: https://viem.sh/docs/contract/readContract
Details: execution reverted: ERC721Enumerable: owner index out of bounds
Version: viem@2.51.0],
Version: viem@2.54.0],
"result": undefined,
"status": "failure",
},
Expand Down Expand Up @@ -489,7 +489,7 @@ test('throws if allowFailure=false & encoding contract function data fails', asy
args: (1e+31)

Docs: https://viem.sh/docs/contract/readContract
Version: viem@2.51.0]
Version: viem@2.54.0]
`,
)
})
Expand Down Expand Up @@ -548,7 +548,7 @@ test('allowFailure=true & encoding contract function data fails', async () => {
args: (1e+31)

Docs: https://viem.sh/docs/contract/readContract
Version: viem@2.51.0],
Version: viem@2.54.0],
"result": undefined,
"status": "failure",
},
Expand All @@ -566,7 +566,7 @@ test('allowFailure=true & encoding contract function data fails', async () => {
args: (1e+31)

Docs: https://viem.sh/docs/contract/readContract
Version: viem@2.51.0],
Version: viem@2.54.0],
"result": undefined,
"status": "failure",
},
Expand Down Expand Up @@ -604,7 +604,7 @@ test('should throw if allowFailure=false & a contract has no response', async ()
args: (0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC)

Docs: https://viem.sh/docs/contract/readContract
Version: viem@2.51.0]
Version: viem@2.54.0]
`,
)
})
Expand Down Expand Up @@ -656,7 +656,7 @@ test('allowFailure=true & a contract has no response', async () => {
args: (0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC)

Docs: https://viem.sh/docs/contract/readContract
Version: viem@2.51.0],
Version: viem@2.54.0],
"result": undefined,
"status": "failure",
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/actions/sendTransaction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ test('behavior: value exceeds balance', async () => {
value: 99999 ETH

Details: Insufficient funds for gas * price + value
Version: viem@2.51.0]
Version: viem@2.54.0]
`)
await disconnect(config, { connector })
})
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/actions/sendTransactionSync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ test('behavior: value exceeds balance', async () => {
value: 99999 ETH

Details: Insufficient funds for gas * price + value
Version: viem@2.51.0]
Version: viem@2.54.0]
`)
await disconnect(config, { connector })
})
2 changes: 1 addition & 1 deletion packages/core/src/actions/signMessage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ test('behavior: user rejected request', async () => {
[UserRejectedRequestError: User rejected the request.

Details: Failed to sign message.
Version: viem@2.51.0]
Version: viem@2.54.0]
`)
await disconnect(config, { connector: connector_ })
})
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/actions/signTypedData.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test('behavior: user rejected request', async () => {
[UserRejectedRequestError: User rejected the request.

Details: Failed to sign typed data.
Version: viem@2.51.0]
Version: viem@2.54.0]
`)
await disconnect(config, { connector: connector_ })
})
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/actions/switchChain.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test('behavior: user rejected request', async () => {
[UserRejectedRequestError: User rejected the request.

Details: Failed to switch chain.
Version: viem@2.51.0]
Version: viem@2.54.0]
`)
await disconnect(config, { connector: connector_ })
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ test('behavior: transaction reverted', async () => {
nonce: 43

Details: execution reverted: PartyBid::claim: contribution already claimed
Version: viem@2.51.0]
Version: viem@2.54.0]
`)
})
10 changes: 5 additions & 5 deletions packages/core/src/connectors/mock.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test('behavior: features.connectError', async () => {
[UserRejectedRequestError: User rejected the request.

Details: Failed to connect.
Version: viem@2.51.0]
Version: viem@2.54.0]
`)
})

Expand Down Expand Up @@ -92,7 +92,7 @@ test('behavior: connector.getProvider request errors', async () => {
[UserRejectedRequestError: User rejected the request.

Details: Failed to sign typed data.
Version: viem@2.51.0]
Version: viem@2.54.0]
`)

await expect(
Expand All @@ -104,7 +104,7 @@ test('behavior: connector.getProvider request errors', async () => {
[UserRejectedRequestError: User rejected the request.

Details: Failed to switch chain.
Version: viem@2.51.0]
Version: viem@2.54.0]
`)

await expect(
Expand All @@ -116,7 +116,7 @@ test('behavior: connector.getProvider request errors', async () => {
[UserRejectedRequestError: User rejected the request.

Details: Failed to switch chain.
Version: viem@2.51.0]
Version: viem@2.54.0]
`)

await expect(
Expand All @@ -128,7 +128,7 @@ test('behavior: connector.getProvider request errors', async () => {
[UserRejectedRequestError: User rejected the request.

Details: Failed to sign message.
Version: viem@2.51.0]
Version: viem@2.54.0]
`)
})

Expand Down
14 changes: 8 additions & 6 deletions packages/core/src/tempo/actions/dex.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe.skip('flaky: merge unblock', () => {
})

// Should have received base tokens
expect(baseBalanceAfter).toBeGreaterThan(baseBalanceBefore)
expect(baseBalanceAfter.amount).toBeGreaterThan(baseBalanceBefore.amount)
})

test('behavior: respects maxAmountIn', async () => {
Expand Down Expand Up @@ -985,15 +985,15 @@ describe.skip('flaky: merge unblock', () => {
})

// Base token balance should be unchanged (we're buying base, not selling)
expect(baseBalanceAfter).toBe(baseBalanceBefore)
expect(baseBalanceAfter.amount).toBe(baseBalanceBefore.amount)

// Quote token balance should decrease (escrowed for the bid)
// Amount = orderAmount * (1 + tick/1000) for bids
const expectedQuoteEscrowed =
(orderAmount * BigInt(100000 + tick)) / BigInt(100000)
expect(quoteBalanceBefore - quoteBalanceAfter).toBeGreaterThanOrEqual(
expectedQuoteEscrowed,
)
expect(
quoteBalanceBefore.amount - quoteBalanceAfter.amount,
).toBeGreaterThanOrEqual(expectedQuoteEscrowed)
})

test('behavior: multiple orders at same tick', async () => {
Expand Down Expand Up @@ -1564,7 +1564,9 @@ describe.skip('flaky: merge unblock', () => {
token: quote,
account: account.address,
})
expect(walletBalanceAfter).toBeGreaterThan(walletBalanceBefore)
expect(walletBalanceAfter.amount).toBeGreaterThan(
walletBalanceBefore.amount,
)
})
})
})
Loading
Loading