Utilities
What's on the page
zksync-web3 provides some useful utilities for zkSync builders. They can be imported the following way:
import { utils } from "zksync-web3";Most of the utilities are used internally by the zkSync team. So this document will describe only those which should be helpful for you.
The "address" of Ether ERC20 smart contract
In zkSync, all the native tokens are ERC20. Thus, there needs to be a smart contract
export const ETH_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";ABI of zkSync smart contract
export const ZKSYNC_MAIN_ABI = new utils.Interface(require("../abi/ZkSync.json"));IERC20 interface
Convenient when interacting with native tokens on zkSync.
export const IERC20 = new utils.Interface(require("../abi/IERC20.json")); Last updated:
Previous
zkSync featuresNext
Types