Simple UI for the Liberdus TokenLock contract. Uses the Liberdus reference frontend styling.
Use any static server (ES modules require HTTP, not file://).
Clone with submodules:
git clone --recurse-submodules https://github.com/Liberdus/token-lock-ui.git
cd token-lock-ui
python3 -m http.server 8080If the repo is already cloned:
git submodule update --init --recursive
python3 -m http.server 8080Open http://localhost:8080.
All site/network/contract values are configured in js/config.js.
The app resolves an environment from SITE_ENVIRONMENTS, or from ?env=bnbtestnet, ?env=bnbmainnet, ?env=amoy, or ?env=hardhat.
Current environments:
bnbtestnet: BNB Smart Chain Testnet, contract0xd77C46da1726cAEC98f10dE9f3e8fF9578608411bnbmainnet: BNB Smart Chain, contract address to be filled after mainnet deploymentamoy: Polygon Amoy, contract0xDBe4d7479E2cc3Fa691Ede0D98374Cb1347B43F7hardhat: Local Hardhat, deterministic contract0x5FbDB2315678afecb367f032d93F642f64180aa3
Update abi.json if the contract changes.
- Requires MetaMask for write actions.
- Lock amounts are in token units; inputs are converted using token decimals.
ratePerDayusesRATE_SCALE = 1e12.