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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"sherif": "^1.0.0",
"simple-git-hooks": "^2.11.1",
"typescript": "5.9.3",
"viem": "2.38.0",
"viem": "2.43.3",
"vite-plugin-react-fallback-throttle": "^0.1.1",
"vitest": "^4.0.8",
"vitest-browser-react": "^2.0.2"
Expand Down
6 changes: 4 additions & 2 deletions packages/connectors/src/porto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,10 @@ export function porto(parameters: PortoParameters = {}) {
return Porto.create({
...parameters,
announceProvider: false,
chains: chains as never,
transports: transports as never,
// @ts-ignore
chains,
// @ts-ignore
transports,
})
})()
return await porto_promise
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 @@ -81,7 +81,7 @@ test('insufficient funds', async () => {
value: 100000 ETH

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

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

Version: viem@2.38.0]
Version: viem@2.43.3]
`)
})

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

Details: execution reverted: Token ID is taken
Version: viem@2.38.0]
Version: viem@2.43.3]
`)
})

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

Details: execution reverted
Version: viem@2.38.0]
Version: viem@2.43.3]
`)
})
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.38.0]
Version: viem@2.43.3]
`)
})

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

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions packages/core/src/actions/prepareTransactionRequest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ test('default', async () => {

const {
gas: _gas,
gasPrice: _gasPrice,
maxFeePerGas: _mfpg,
maxPriorityFeePerGas: _mpfpg,
nonce: _nonce,
Expand Down Expand Up @@ -48,6 +49,7 @@ test('parameters: account', async () => {

const {
gas: _gas,
gasPrice: _gasPrice,
maxFeePerGas: _mfpg,
maxPriorityFeePerGas: _mpfpg,
nonce: _nonce,
Expand Down Expand Up @@ -78,6 +80,7 @@ test('behavior: local account', async () => {

const {
gas: _gas,
gasPrice: _gasPrice,
maxFeePerGas: _mfpg,
maxPriorityFeePerGas: _mpfpg,
nonce: _nonce,
Expand Down
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 @@ -381,7 +381,7 @@ test('throws if allowFailure=false & a contract method fails', async () => {
args: (0xA0Cf798816D4b9b9866b5330EEa46a18382f251e, 69420)

Docs: https://viem.sh/docs/contract/readContract
Version: viem@2.38.0]
Version: viem@2.43.3]
`,
)
})
Expand Down Expand Up @@ -434,7 +434,7 @@ test('allowFailure=true & a contract method fails', async () => {
args: (0xA0Cf798816D4b9b9866b5330EEa46a18382f251e, 69420)

Docs: https://viem.sh/docs/contract/readContract
Version: viem@2.38.0],
Version: viem@2.43.3],
"result": undefined,
"status": "failure",
},
Expand All @@ -448,7 +448,7 @@ test('allowFailure=true & a contract method fails', async () => {
args: (0xA0Cf798816D4b9b9866b5330EEa46a18382f251e, 69421)

Docs: https://viem.sh/docs/contract/readContract
Version: viem@2.38.0],
Version: viem@2.43.3],
"result": undefined,
"status": "failure",
},
Expand Down Expand Up @@ -486,7 +486,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.38.0]
Version: viem@2.43.3]
`,
)
})
Expand Down Expand Up @@ -545,7 +545,7 @@ test('allowFailure=true & encoding contract function data fails', async () => {
args: (1e+31)

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

Docs: https://viem.sh/docs/contract/readContract
Version: viem@2.38.0],
Version: viem@2.43.3],
"result": undefined,
"status": "failure",
},
Expand Down Expand Up @@ -601,7 +601,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.38.0]
Version: viem@2.43.3]
`,
)
})
Expand Down Expand Up @@ -653,7 +653,7 @@ test('allowFailure=true & a contract has no response', async () => {
args: (0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC)

Docs: https://viem.sh/docs/contract/readContract
Version: viem@2.38.0],
Version: viem@2.43.3],
"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 @@ -87,7 +87,7 @@ test('behavior: value exceeds balance', async () => {
value: 99999 ETH

Details: Insufficient funds for gas * price + value
Version: viem@2.38.0]
Version: viem@2.43.3]
`)
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 @@ -91,7 +91,7 @@ test('behavior: value exceeds balance', async () => {
value: 99999 ETH

Details: Insufficient funds for gas * price + value
Version: viem@2.38.0]
Version: viem@2.43.3]
`)
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.38.0]
Version: viem@2.43.3]
`)
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.38.0]
Version: viem@2.43.3]
`)
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.38.0]
Version: viem@2.43.3]
`)
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.38.0]
Version: viem@2.43.3]
`)
})
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.38.0]
Version: viem@2.43.3]
`)
})

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.38.0]
Version: viem@2.43.3]
`)

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.38.0]
Version: viem@2.43.3]
`)

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.38.0]
Version: viem@2.43.3]
`)

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.38.0]
Version: viem@2.43.3]
`)
})

Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/transports/connector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test('behavior: connector type not found', async () => {
[ProviderDisconnectedError: The Provider is disconnected from all chains.

Details: Could not find connector of type "foo" in \`connectors\` passed to \`createConfig\`.
Version: viem@2.38.0]
Version: viem@2.43.3]
`)
})

Expand All @@ -58,7 +58,7 @@ test('behavior: provider is disconnected', async () => {
[ProviderDisconnectedError: The Provider is disconnected from all chains.

Details: Provider is disconnected.
Version: viem@2.38.0]
Version: viem@2.43.3]
`)
})

Expand All @@ -82,7 +82,7 @@ test('behavior: chainId mismatch', async () => {
[ChainDisconnectedError: The Provider is not connected to the requested chain.

Details: The current chain of the connector (id: 1) does not match the target chain for the request (id: 10 – OP Mainnet).
Version: viem@2.38.0]
Version: viem@2.43.3]
`)
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ test('default', async () => {
const {
data: {
gas: _gas,
gasPrice: _gasPrice,
maxFeePerGas: _mfpg,
maxPriorityFeePerGas: _mpfpg,
nonce: _nonce,
Expand Down
Loading
Loading