zircuit-dex
v0.2.1
Published
Say goodbye to constant portfolio babysitting! Our big-brain on-chain system manages everything for you. Just drop in your liquidity and watch it grow. It's like having a crypto genius working for you 24/7.
Downloads
115
Readme
Say goodbye to constant portfolio babysitting! Our big-brain on-chain system manages everything for you. Just drop in your liquidity and watch it grow. It's like having a crypto genius working for you 24/7.
🏠 Homepage
Prerequisites
- npm >=10.0.0
- node >=20.17.0
Integration
Configuration
Before assembling the widget, you need to create a .env
file (you can copy .env.example
).
❗ Important The widget will not start without the
WC_PROJECT_ID
variable.
| ENV variable | Required | Default | Description |
|----------------------|:--------:|----------|-----------------------------------------------------------|
| VITE_APP_URL
| ✔ | homepage | Base app url (by default uses "homepage" in package json) |
| VITE_API_URL
| ✔ | | Presale API base URL |
| VITE_ANKR_ID
| - | | ANKR RPC Access Key |
| VITE_WC_PROJECT_ID
| ✔ | | Wallet Connect project ID |
Build
Install dependencies:
npm install
Build widget:
npm run build
After the build, there will be several files in the dist folder. The main widget file and entry point is presale.js. This file must be imported to the page with the tag.
The widget is inserted into the page in this way:
❗ Important. The script must be connected at the bottom of the <body> tag. ❗ NOT in <head>.
<html>
<head>
<title>Title</title>
</head>
<body>
<div id="widget-container"></div>
<!-- Site Content -->
<script src="https://cdn.jsdelivr.net/npm/zircuit-dex@latest/presale.js"></script>
<script>
window.createPresaleWidget({
containerId: 'widget-container',
});
</script>
</body>
</html>
The widget will be embedded in the block with the ID widget-container
Demo
You can also run a demo site with the widget already connected.
npm run preview
Author
- Website: https://zircuitdex.com
- Github: @zircuitdex
📝 License
This project is MIT licensed.