diff --git a/.changeset/cyan-owls-compete.md b/.changeset/cyan-owls-compete.md new file mode 100644 index 0000000000..c9fd7a4210 --- /dev/null +++ b/.changeset/cyan-owls-compete.md @@ -0,0 +1,5 @@ +--- +"viem": patch +--- + +Reverted custom Abstract EIP712 domain changes. diff --git a/src/chains/definitions/abstractTestnet.ts b/src/chains/definitions/abstractTestnet.ts index 756020a44f..3446c0279b 100644 --- a/src/chains/definitions/abstractTestnet.ts +++ b/src/chains/definitions/abstractTestnet.ts @@ -1,7 +1,5 @@ import { defineChain } from '../../utils/chain/defineChain.js' import { chainConfig } from '../../zksync/chainConfig.js' -import type { ZksyncTransactionSerializableEIP712 } from '../../zksync/types/transaction.js' -import { transactionToMessage } from '../../zksync/utils/getEip712Domain.js' export const abstractTestnet = /*#__PURE__*/ defineChain({ ...chainConfig, @@ -28,36 +26,4 @@ export const abstractTestnet = /*#__PURE__*/ defineChain({ blockCreated: 358349, }, }, - custom: { - getEip712Domain(transaction: ZksyncTransactionSerializableEIP712) { - const message = transactionToMessage(transaction) - - return { - domain: { - name: 'Abstract', // Use 'Abstract' rather than 'zkSync' - version: '2', - chainId: transaction.chainId, - }, - types: { - Transaction: [ - { name: 'txType', type: 'uint256' }, - { name: 'from', type: 'uint256' }, - { name: 'to', type: 'uint256' }, - { name: 'gasLimit', type: 'uint256' }, - { name: 'gasPerPubdataByteLimit', type: 'uint256' }, - { name: 'maxFeePerGas', type: 'uint256' }, - { name: 'maxPriorityFeePerGas', type: 'uint256' }, - { name: 'paymaster', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'value', type: 'uint256' }, - { name: 'data', type: 'bytes' }, - { name: 'factoryDeps', type: 'bytes32[]' }, - { name: 'paymasterInput', type: 'bytes' }, - ], - }, - primaryType: 'Transaction', - message: message, - } - }, - }, }) diff --git a/src/zksync/utils/getEip712Domain.ts b/src/zksync/utils/getEip712Domain.ts index 04c716504b..77e7d53d3a 100644 --- a/src/zksync/utils/getEip712Domain.ts +++ b/src/zksync/utils/getEip712Domain.ts @@ -50,7 +50,7 @@ export const getEip712Domain: EIP712DomainFn< ////////////////////////////////////////////////////////////////////////////// // Utilities -export function transactionToMessage( +function transactionToMessage( transaction: ZksyncTransactionSerializableEIP712, ): ZksyncEIP712TransactionSignable { const {