Skip to content
LogoLogo

toSinglesigSmartAccount (ZKsync)

Creates a single-signature ZKsync Smart Account from a Contract Address and the Private Key of the owner.

Usage

import {  } from 'viem/zksync'
 
const  = ({
  : '0xf39Fd6e51aad8F6F4ce6aB8827279cffFb92266', 
  : '0x...'
})

Parameters

address

  • Type: Hex

Address of the deployed Account's Contract implementation.

const account = toSinglesigSmartAccount({
  address: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', 
  privateKey: '0x...'
})

privateKey

  • Type: Hex

Private Key of the owner.

const account = toSinglesigSmartAccount({
  address: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', 
  privateKey: '0x...'
})