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 been audited by the author during implementation.
- 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.
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/.envunder the nameSIGNER_PRIVATE_KEY, - Move to
packages/contractsand 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.jsonwith relevant information about your deploy.
- Move to
packages/frontendand do:yarn install,- navigate to
src/ts/config/network.tsand updatenetworkto the network you deployed on, yarn serveto see frontend onlocalhost:1234,yarn deployto 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.htmlwhere those values are directly referenced (inkuconomicssection).
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
contractsworkspace and:- open
.envand 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.tsand updateNETWORKtoavalanchefork, - 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.
- Modal for wallet balance;
- Button for period data fetching;
- 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.