Polygon Hermez Wallet provides a simple UI to get started with the Polygon Hermez Network. It supports depositing, transferring, and withdrawing ETH and ERC-20 tokens in Polygon Hermez.
To learn more, visit the documentation.
Clone the repo:
git clone git@github.com:hermeznetwork/wallet-ui.git
Move into the project directory:
cd wallet-ui
Install project dependencies:
npm install
Install git pre-commit hook (required since husky
v7, see why in this article):
npm run prepare
Create the required .env
file from the example provided in the repo:
cp .env.example .env
The installation process of this application takes care of creating the static typing files and factory required for Typescript to interact with the ERC-20 ABI.
The types are created using TypeChain in the postinstallation
step, from the JSON ABI file, and the output
files are stored in the path src/types/contracts
.
⚠️ The typing files and factory required to interact with the Polygon Hermez contracts ABIs may be created by uncommenting the related section in the scriptsrc/generate-contract-types.sh
and runningnpm run generate-contract-types
ornpm i
.
Once the typing files are built, you can instantiate a typed contract using its factory as follows:
import { Erc20__factory } from "src/types/contracts/erc-20/factories/Erc20__factory";
const contract = Erc20__factory.connect(ethereumAddress, provider);
wallet-ui
is part of the Polygon Hermez project copyright 2021 HermezDAO and published with AGPL-3 license. Please check the LICENSE file for more details.