This is an implementation of a non-meme token on Avalanche. It has real world functionalities, like things and such, so it's definitely not a pyramid scheme. The code has also been audited by the author during implementation.
To deploy the contract and frontend, do the following:
- Obtain an account funded with enough AVAX (or test AVAX), then copy the private key inside
packages/contracts/.env
under the nameSIGNER_PRIVATE_KEY
, - Move to
packages/contracts
and do:yarn install
,yarn compile
,yarn cli deploy <investmentInterestBips> <investmentPhaseStartUnix> <retractFeeBips> <retractPhaseEndUnix> --network <avalanche|fuji>
,yarn cli init <liquidityKUCO> <liquidityAVAX> --network <avalanche|fuji>
,yarn hardhat verify <kucocoin-address> <uniswap-address> <investmentInterestBips> <investmentPhaseStartUnix> <retractFeeBips> <retractPhaseEndUnix> --network <avalanche|fuji>
,- replace
network-info.json
with relevant information about your deploy.
- Move to
packages/frontend
and do:yarn install
,- navigate to
src/ts/config/network.ts
and updatenetwork
to the network you deployed on, yarn serve
to see frontend onlocalhost:1234
,yarn deploy
to deploy frontend ongh-pages
(need to set that up on github tho).
Note If you change
<investmentInterestBips>
or<retractFeeBips>
you have to manually find the sections inpackages/frontend/index.html
where those values are directly referenced (inkuconomics
section).
You can test the frontend on a locally run avalanche fork, which comes with a funded account specified by the private key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
, which we'll refer to as PRIVATE_KEY
in the following steps.
-
Setup the
contracts
workspace and:- open
.env
and fill inSIGNER_PRIVATE_KEY=<PRIVATE_KEY>
. - run
yarn fork-avalanche
, - run
yarn kucocoin-deploy -n avalanchefork
, - run
yarn kucocoin-init -n avalanchefork
.
- open
-
Set up Metamask and import the
PRIVATE_KEY
. You may need to delete metamask nonce cache to avoid some future errors. -
In frontend workspace:
- navigate to
src/ts/config/network.ts
and updateNETWORK
toavalanchefork
, - run
yarn serve
.
- navigate to
To configure investment and retract periods, you have to also navigate to src/ts/config/token.ts
and update START_TRADING_TIME_UNIX
and END_RETRACT_PERIOD_UNIX
to the values obtained by running
yarn cli get tradingPhaseStart -n avalanchefork
,yarn cli get retractPhaseEnd -n avalanchefork
,
inside contracts
workspace.
- Avalanche for honestly being the best chain,
- Uniswap for deploying their V2 on Avalanche,
- People that developed Namari for their free template hacked into KucoCoin frontend,
- To tis guy for this awesome pen,
- To this guy for the spiral animation,
- To this guy for the windows95 error tab in css,
- To this guy that updated UniwapV2 for Solidity 0.8.4.
- Modal for wallet balance,
- Button for period data fetching,
- KucoCoin burn front-end integration,
- KucoCoin freeze implementation,
- disable retract button if it is overdue (and show a tooltip),
- better error display,
- format error display,
- get svg links for metamask and avalanche,
- error display "can't read properties of undefined" when metamask is not installed,
- copy kucocoin address to clipboard.