├── .gitignore ├── LICENSE ├── README.md ├── SUMMARY.md ├── audits ├── DeFis-Network_YFC-MGP_audit_report_2020_83_cn_rc1.pdf ├── README.md ├── dfs_bank_audit_by_SlowMist.png ├── dfs_dss_audit_by_PechShield.jpeg ├── dfs_swap_audit_by_PechShield.jpeg ├── dfs_swap_audit_by_SlowMist.png ├── mining_pools_audit_by_PechShield.png └── yfc.jpeg ├── contracts ├── dividend │ ├── .gitignore │ ├── CMakeLists.txt │ ├── README.txt │ ├── include │ │ ├── dividend.hpp │ │ ├── types.hpp │ │ └── utils.hpp │ ├── ricardian │ │ └── dividend.contracts.md │ └── src │ │ ├── CMakeLists.txt │ │ └── dividend.cpp ├── factory │ ├── CMakeLists.txt │ ├── README.txt │ ├── include │ │ ├── factory.hpp │ │ ├── types.hpp │ │ └── utils.hpp │ ├── ricardian │ │ └── factory.contracts.md │ └── src │ │ ├── CMakeLists.txt │ │ └── factory.cpp ├── family │ ├── CMakeLists.txt │ ├── README.txt │ ├── include │ │ └── family.hpp │ ├── ricardian │ │ └── family.contracts.md │ └── src │ │ ├── CMakeLists.txt │ │ └── family.cpp ├── mining │ ├── .gitignore │ ├── CMakeLists.txt │ ├── README.txt │ ├── include │ │ └── mining.hpp │ ├── ricardian │ │ └── mining.contracts.md │ └── src │ │ ├── CMakeLists.txt │ │ └── mining.cpp └── staking │ ├── .gitignore │ ├── CMakeLists.txt │ ├── README.txt │ ├── include │ └── staking.hpp │ ├── ricardian │ └── staking.contracts.md │ └── src │ ├── CMakeLists.txt │ └── staking.cpp ├── defis_pools.md ├── how-usdt-usdd-work.md ├── package.json ├── ui ├── apps │ ├── .github │ │ └── workflows │ │ │ └── nodejs.yml │ ├── .gitignore │ ├── README.md │ ├── babel.config.js │ ├── package.json │ ├── public │ │ ├── favicon.png │ │ └── index.html │ ├── src │ │ ├── App.vue │ │ ├── assets │ │ │ ├── img │ │ │ │ ├── bank.png │ │ │ │ ├── bank1.png │ │ │ │ ├── bottom.png │ │ │ │ ├── change.png │ │ │ │ ├── dex.png │ │ │ │ ├── dex1.png │ │ │ │ ├── eosio.token-eos.png │ │ │ │ ├── hyk.png │ │ │ │ ├── hyk1.png │ │ │ │ ├── more.png │ │ │ │ ├── swap.png │ │ │ │ ├── swap1.png │ │ │ │ ├── top.png │ │ │ │ └── warning.png │ │ │ ├── logo-old.png │ │ │ └── logo.png │ │ ├── components │ │ │ ├── Bonus.old.vue │ │ │ ├── Bonus.vue │ │ │ ├── FooterDiv.vue │ │ │ ├── HeaderNav.vue │ │ │ ├── Nav.vue │ │ │ ├── Tabbar.vue │ │ │ ├── WarmTip.vue │ │ │ └── bonusChild │ │ │ │ └── BonusTotal.vue │ │ ├── main.js │ │ ├── router │ │ │ └── index.js │ │ ├── store │ │ │ ├── getters.js │ │ │ ├── index.js │ │ │ └── modules │ │ │ │ ├── app.js │ │ │ │ └── sys.js │ │ ├── utils │ │ │ ├── eos │ │ │ │ ├── eos.js │ │ │ │ ├── eos.old.js │ │ │ │ ├── eosio.system.json │ │ │ │ └── index.js │ │ │ ├── filters │ │ │ │ └── index.js │ │ │ ├── lang │ │ │ │ ├── en.js │ │ │ │ ├── index.js │ │ │ │ └── zh-CN.js │ │ │ ├── logic.js │ │ │ ├── public.js │ │ │ ├── swap_router.js │ │ │ └── swap_router1.js │ │ └── views │ │ │ ├── dex │ │ │ ├── Index.vue │ │ │ ├── childViews │ │ │ │ └── CreateMarket.vue │ │ │ └── components │ │ │ │ ├── CreateTip.vue │ │ │ │ └── SlipTip.vue │ │ │ ├── error-page │ │ │ └── 404.vue │ │ │ ├── hyk │ │ │ └── Index.vue │ │ │ ├── index │ │ │ ├── Index.vue │ │ │ ├── childViews │ │ │ │ └── Tutorial.vue │ │ │ └── components │ │ │ │ ├── MarketListsCom-search.vue │ │ │ │ ├── MarketListsCom.vue │ │ │ │ ├── Mining.vue │ │ │ │ └── Usdt.vue │ │ │ ├── layout │ │ │ └── Index.vue │ │ │ └── pools │ │ │ └── Index.vue │ └── vue.config.js ├── apps2 │ ├── .gitignore │ ├── README.md │ ├── babel.config.js │ ├── package.json │ ├── postcss.config.js │ ├── public │ │ ├── favicon.png │ │ ├── index.html │ │ └── static │ │ │ └── chart_library │ │ │ └── static │ │ │ └── tv-chart.630b704a2b9d0eaf1593.html │ ├── src │ │ ├── App.vue │ │ ├── api │ │ │ ├── index.js │ │ │ ├── list.js │ │ │ └── other.js │ │ ├── assets │ │ │ ├── banner │ │ │ │ └── trade.jpeg │ │ │ └── css │ │ │ │ ├── animal.scss │ │ │ │ ├── color.scss │ │ │ │ └── public.scss │ │ ├── components │ │ │ ├── DetailInfo.vue │ │ │ ├── Footer.vue │ │ │ ├── Header.vue │ │ │ ├── InviAcc.vue │ │ │ ├── MarketArea.vue │ │ │ ├── MarketList.vue │ │ │ ├── Nav.vue │ │ │ ├── SlipPointTools.vue │ │ │ ├── UsddTip.vue │ │ │ ├── WarmTip.vue │ │ │ └── popup │ │ │ │ └── NodeSet.vue │ │ ├── main.js │ │ ├── router │ │ │ ├── action.js │ │ │ ├── index.js │ │ │ └── index.old.js │ │ ├── store │ │ │ ├── getters.js │ │ │ ├── index.js │ │ │ └── modules │ │ │ │ ├── app.js │ │ │ │ ├── config.js │ │ │ │ ├── mine.js │ │ │ │ └── sys.js │ │ ├── utils │ │ │ ├── api.js │ │ │ ├── bus.js │ │ │ ├── deal.js │ │ │ ├── eos │ │ │ │ ├── anchor.js │ │ │ │ ├── eos.js │ │ │ │ ├── eosio.system.json │ │ │ │ └── index.js │ │ │ ├── filters │ │ │ │ └── index.js │ │ │ ├── lang │ │ │ │ ├── appsLang │ │ │ │ │ ├── bpInfo.js │ │ │ │ │ ├── dfsMine.js │ │ │ │ │ ├── financial.js │ │ │ │ │ ├── fundation.js │ │ │ │ │ ├── home.js │ │ │ │ │ ├── invite.js │ │ │ │ │ ├── my.js │ │ │ │ │ ├── nodePools.js │ │ │ │ │ ├── pddex.js │ │ │ │ │ ├── sys.js │ │ │ │ │ └── sysParams.js │ │ │ │ ├── en.js │ │ │ │ ├── index.js │ │ │ │ └── zh-CN.js │ │ │ ├── logic.js │ │ │ ├── minerLogic.js │ │ │ ├── public.js │ │ │ ├── socket │ │ │ │ └── index.js │ │ │ ├── swap_router.js │ │ │ └── wallet │ │ │ │ ├── fullScreen.js │ │ │ │ └── index.js │ │ ├── vant.js │ │ └── views │ │ │ ├── bank │ │ │ ├── Index.vue │ │ │ └── components │ │ │ │ └── OrderList.vue │ │ │ ├── bpInfo │ │ │ ├── Index.vue │ │ │ ├── IndexComp.vue │ │ │ └── childViews │ │ │ │ ├── DetailInfo.vue │ │ │ │ ├── UpdateInfo.vue │ │ │ │ ├── comp │ │ │ │ ├── BpInfo.vue │ │ │ │ ├── Records.vue │ │ │ │ ├── ScoreDetail.vue │ │ │ │ ├── ScoreLists.vue │ │ │ │ ├── SetBaseInfo.vue │ │ │ │ └── SetQusAns.vue │ │ │ │ └── dialog │ │ │ │ ├── AddRecord.vue │ │ │ │ ├── BpStory.vue │ │ │ │ ├── Score.vue │ │ │ │ ├── ShowBpJsonErr.vue │ │ │ │ ├── ShowContent.vue │ │ │ │ └── ShowEdts.vue │ │ │ ├── coinViews │ │ │ ├── Index.vue │ │ │ ├── comp │ │ │ │ ├── CoinData.vue │ │ │ │ └── Lists.vue │ │ │ └── kline │ │ │ │ ├── KLine.vue │ │ │ │ ├── datafeed.js │ │ │ │ └── index.js │ │ │ ├── dfsMine │ │ │ ├── Index.vue │ │ │ ├── childView │ │ │ │ └── PoolMarket.vue │ │ │ ├── comp │ │ │ │ ├── MineInfo.vue │ │ │ │ ├── MinerLists.vue │ │ │ │ ├── Pools.vue │ │ │ │ ├── PoolsLits.vue │ │ │ │ └── RewardInfo.vue │ │ │ ├── dfsMine.js │ │ │ └── popup │ │ │ │ └── Speed.vue │ │ │ ├── dsr │ │ │ ├── Index.vue │ │ │ ├── comp │ │ │ │ ├── DsrInfo.vue │ │ │ │ ├── DsrList.vue │ │ │ │ └── DsrMinerList.vue │ │ │ └── dialog │ │ │ │ ├── ActionsIn.vue │ │ │ │ ├── ActionsInSure.vue │ │ │ │ ├── ActionsOut.vue │ │ │ │ ├── MyDeposit.vue │ │ │ │ └── UnOpen.vue │ │ │ ├── dssForTag │ │ │ ├── Index.vue │ │ │ ├── comp │ │ │ │ ├── DsrInfo.vue │ │ │ │ ├── DsrList.vue │ │ │ │ └── DsrMinerList.vue │ │ │ └── dialog │ │ │ │ ├── ActionsIn.vue │ │ │ │ ├── ActionsInSure.vue │ │ │ │ ├── ActionsOut.vue │ │ │ │ ├── MyDeposit.vue │ │ │ │ └── UnOpen.vue │ │ │ ├── farms │ │ │ ├── Index.vue │ │ │ ├── comp │ │ │ │ ├── DfsMiner.vue │ │ │ │ ├── Dss.vue │ │ │ │ ├── Guns.vue │ │ │ │ ├── Pdd.vue │ │ │ │ ├── YfcDss.vue │ │ │ │ └── comp.scss │ │ │ └── dialog │ │ │ │ ├── MoreActionTip.vue │ │ │ │ └── SureTip.vue │ │ │ ├── financial │ │ │ ├── Index.vue │ │ │ ├── childViews │ │ │ │ └── Detail.vue │ │ │ ├── comp │ │ │ │ ├── MyFinancial.vue │ │ │ │ ├── Radical.vue │ │ │ │ ├── Steady.vue │ │ │ │ └── TradeRules.vue │ │ │ ├── css │ │ │ │ ├── dialog.scss │ │ │ │ └── financial.scss │ │ │ ├── dialog │ │ │ │ ├── Deposit.vue │ │ │ │ ├── RewardTip.vue │ │ │ │ ├── Rules.vue │ │ │ │ └── Withdraw.vue │ │ │ └── js │ │ │ │ └── financial.js │ │ │ ├── fundation │ │ │ ├── Index.vue │ │ │ ├── comp │ │ │ │ ├── FunAudio.vue │ │ │ │ ├── FunImg.vue │ │ │ │ ├── FunVideo.vue │ │ │ │ ├── FundationLists.vue │ │ │ │ ├── ReplyLists.vue │ │ │ │ └── Summary.vue │ │ │ └── dialog │ │ │ │ ├── Detail.vue │ │ │ │ ├── Like.vue │ │ │ │ └── ToFundation.vue │ │ │ ├── home │ │ │ ├── Index.vue │ │ │ └── comp │ │ │ │ ├── Banner.vue │ │ │ │ ├── DfsInfo.vue │ │ │ │ ├── Notice.vue │ │ │ │ ├── Rank.vue │ │ │ │ └── Tools.vue │ │ │ ├── index │ │ │ ├── Index.vue │ │ │ ├── childViews │ │ │ │ ├── CreateMarket.vue │ │ │ │ └── Tutorial.vue │ │ │ └── components │ │ │ │ ├── CreateTip.vue │ │ │ │ ├── MainView.vue │ │ │ │ ├── MyFooter.vue │ │ │ │ ├── MyHeader.vue │ │ │ │ ├── Order.vue │ │ │ │ └── Tabs.vue │ │ │ ├── invite │ │ │ ├── Index.vue │ │ │ ├── childViews │ │ │ │ ├── Create.vue │ │ │ │ ├── Detail.vue │ │ │ │ ├── Edit.vue │ │ │ │ └── SignIn.vue │ │ │ ├── comp │ │ │ │ ├── AccInfo.vue │ │ │ │ ├── CreateTop.vue │ │ │ │ ├── DfsFarmsInfo.vue │ │ │ │ ├── FarmLists.vue │ │ │ │ ├── Farms.vue │ │ │ │ └── Intro.vue │ │ │ ├── dialog │ │ │ │ ├── ClaimTip.vue │ │ │ │ ├── CreateTip.vue │ │ │ │ ├── FarmsData.vue │ │ │ │ ├── InviteDia.vue │ │ │ │ ├── Leave.vue │ │ │ │ ├── SignSuccess.vue │ │ │ │ └── SignTip.vue │ │ │ ├── setting │ │ │ │ ├── AddCoin.vue │ │ │ │ ├── Deposit.vue │ │ │ │ └── SetCoin.vue │ │ │ └── signIn │ │ │ │ ├── Lists.vue │ │ │ │ └── SignMain.vue │ │ │ ├── kline │ │ │ ├── ChardingView.vue │ │ │ ├── Index.vue │ │ │ ├── comp │ │ │ │ ├── CurrentOrder.vue │ │ │ │ ├── Deep.vue │ │ │ │ ├── LasterTrade.vue │ │ │ │ ├── MarketInfo.vue │ │ │ │ └── MinerLists.vue │ │ │ ├── datafeed.js │ │ │ └── index.js │ │ │ ├── konami │ │ │ ├── Index.vue │ │ │ ├── dialog │ │ │ │ ├── Msg.vue │ │ │ │ └── Version.vue │ │ │ └── js │ │ │ │ ├── memes.js │ │ │ │ └── myKonami.js │ │ │ ├── layout │ │ │ ├── Index.vue │ │ │ └── comp │ │ │ │ ├── More.vue │ │ │ │ └── Tabbar.vue │ │ │ ├── loan │ │ │ ├── Index.vue │ │ │ └── comp │ │ │ │ └── TopInfo.vue │ │ │ ├── market │ │ │ ├── Index.vue │ │ │ ├── childView │ │ │ │ ├── PoolsData.vue │ │ │ │ └── SymbolData.vue │ │ │ ├── comp │ │ │ │ ├── MarketData.vue │ │ │ │ ├── MarketHis.vue │ │ │ │ ├── MarketLists.vue │ │ │ │ ├── PoolsInfo.vue │ │ │ │ └── Withdraw.vue │ │ │ └── popup │ │ │ │ ├── AboutMarket.vue │ │ │ │ ├── AddMarket.vue │ │ │ │ ├── MarketApy.vue │ │ │ │ ├── MarketTip.vue │ │ │ │ ├── MinReward.vue │ │ │ │ ├── MiningRules.vue │ │ │ │ └── RankTip.vue │ │ │ ├── my │ │ │ ├── Index.vue │ │ │ ├── childView │ │ │ │ ├── AccLists.vue │ │ │ │ └── SetInfo.vue │ │ │ ├── comp │ │ │ │ ├── AccInfo.vue │ │ │ │ ├── AccWallet.vue │ │ │ │ └── Tools.vue │ │ │ ├── dialog │ │ │ │ ├── CancelFollow.vue │ │ │ │ ├── ImgCheck.vue │ │ │ │ └── ProTip.vue │ │ │ └── js │ │ │ │ └── nick.js │ │ │ ├── nodePools │ │ │ ├── Index.vue │ │ │ ├── childView │ │ │ │ ├── CreatePool.vue │ │ │ │ └── DetailLists.vue │ │ │ ├── comp │ │ │ │ ├── Claim.vue │ │ │ │ ├── PoolsLists.vue │ │ │ │ └── VoteNum.vue │ │ │ ├── dialog │ │ │ │ ├── Add.vue │ │ │ │ ├── Boost.vue │ │ │ │ ├── ClaimRules.vue │ │ │ │ ├── ManageVote.vue │ │ │ │ ├── MineRules.vue │ │ │ │ ├── Remove.vue │ │ │ │ ├── RexLock.vue │ │ │ │ └── TipClaim.vue │ │ │ └── js │ │ │ │ └── nodePools.js │ │ │ ├── otherInfo │ │ │ ├── Index.vue │ │ │ ├── comp │ │ │ │ ├── Dynamic.vue │ │ │ │ └── OtherAccInfo.vue │ │ │ └── dialog │ │ │ │ └── ReplyLists.vue │ │ │ ├── pddex │ │ │ ├── Index.vue │ │ │ ├── comp │ │ │ │ ├── PddexRanks.vue │ │ │ │ └── appLogic.js │ │ │ ├── order │ │ │ │ ├── Index.vue │ │ │ │ └── comp │ │ │ │ │ └── CancelSure.vue │ │ │ └── trade │ │ │ │ ├── Index.vue │ │ │ │ ├── IndexComp.vue │ │ │ │ ├── chart │ │ │ │ └── Echart.vue │ │ │ │ ├── comp │ │ │ │ ├── Left.vue │ │ │ │ ├── LimitTrade.vue │ │ │ │ ├── MarketTrade.vue │ │ │ │ ├── Right.vue │ │ │ │ └── content.scss │ │ │ │ └── popup │ │ │ │ ├── BigTrade.vue │ │ │ │ ├── MarketLists.vue │ │ │ │ ├── PointSlider.vue │ │ │ │ └── PriceMore.vue │ │ │ ├── swappage │ │ │ ├── Index.vue │ │ │ ├── comp │ │ │ │ └── TradeHistory.vue │ │ │ ├── dialog │ │ │ │ ├── MoreRouter.vue │ │ │ │ └── OgxSwapTip.vue │ │ │ └── js │ │ │ │ └── ogx.js │ │ │ ├── total │ │ │ └── Index.vue │ │ │ └── voteHome │ │ │ ├── Index.vue │ │ │ ├── nodeVote │ │ │ ├── Index.vue │ │ │ ├── comp │ │ │ │ ├── AccInfo.vue │ │ │ │ ├── NodeDetail.vue │ │ │ │ ├── NodeList.vue │ │ │ │ └── ProxyAcc.vue │ │ │ └── dialog │ │ │ │ └── Rules.vue │ │ │ ├── sysParams │ │ │ ├── Index.vue │ │ │ ├── comp │ │ │ │ └── QusForParams.vue │ │ │ └── dialog │ │ │ │ └── ParamsTip.vue │ │ │ ├── vote │ │ │ ├── Index.vue │ │ │ ├── comp │ │ │ │ ├── Detail.vue │ │ │ │ └── Rank.vue │ │ │ └── dialog │ │ │ │ └── Rules.vue │ │ │ └── voteForTag │ │ │ ├── Index.vue │ │ │ ├── comp │ │ │ ├── Detail.vue │ │ │ └── Rank.vue │ │ │ └── dialog │ │ │ └── Rules.vue │ └── vue.config.js ├── info │ ├── README.md │ ├── babel.config.js │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ ├── public │ │ ├── favicon.png │ │ └── index.html │ ├── src │ │ ├── App.vue │ │ ├── assets │ │ │ ├── css │ │ │ │ ├── animal.scss │ │ │ │ ├── color.scss │ │ │ │ └── public.scss │ │ │ └── img │ │ │ │ ├── dex │ │ │ │ ├── enter_solid_default.svg │ │ │ │ ├── enter_solid_down.svg │ │ │ │ ├── enter_solid_up.svg │ │ │ │ ├── logo.svg │ │ │ │ ├── menu_icon.svg │ │ │ │ ├── price_switch_icon_btn_left.svg │ │ │ │ ├── price_switch_icon_btn_right.svg │ │ │ │ ├── price_switch_icon_green_left.svg │ │ │ │ ├── price_switch_icon_green_right.svg │ │ │ │ ├── setup_icon.svg │ │ │ │ ├── switch_down.svg │ │ │ │ ├── switch_up.svg │ │ │ │ ├── tip.svg │ │ │ │ ├── tips_icon_btn.svg │ │ │ │ ├── user_icon(1).svg │ │ │ │ └── user_icon.svg │ │ │ │ ├── dialog │ │ │ │ ├── sd_icon_btn.svg │ │ │ │ └── tips_poto.svg │ │ │ │ ├── eosio.token-eos.png │ │ │ │ ├── footer │ │ │ │ └── peckshield.jpeg │ │ │ │ ├── loading.png │ │ │ │ ├── market │ │ │ │ ├── pow.jpg │ │ │ │ ├── pow.svg │ │ │ │ └── switch_add.svg │ │ │ │ └── poolspage │ │ │ │ ├── buff.svg │ │ │ │ ├── buff1.svg │ │ │ │ ├── buff2.svg │ │ │ │ └── top_bg.svg │ │ ├── components │ │ │ └── Nav.vue │ │ ├── main.js │ │ ├── router │ │ │ └── index.js │ │ ├── store │ │ │ ├── getters.js │ │ │ ├── index.js │ │ │ └── modules │ │ │ │ ├── app.js │ │ │ │ └── sys.js │ │ ├── utils │ │ │ ├── eos │ │ │ │ ├── eos.js │ │ │ │ ├── eos.old.js │ │ │ │ ├── eosio.system.json │ │ │ │ └── index.js │ │ │ ├── filters │ │ │ │ └── index.js │ │ │ ├── lang │ │ │ │ ├── en.js │ │ │ │ ├── index.js │ │ │ │ └── zh-CN.js │ │ │ ├── logic.js │ │ │ └── public.js │ │ └── views │ │ │ ├── error-page │ │ │ └── 404.vue │ │ │ ├── index │ │ │ ├── Index.vue │ │ │ ├── IndexMobile.vue │ │ │ └── components │ │ │ │ ├── MyFooter.vue │ │ │ │ ├── MyHeader.vue │ │ │ │ ├── PoolsInfo.vue │ │ │ │ ├── Recharts.vue │ │ │ │ ├── Symbols.vue │ │ │ │ └── Transactions.vue │ │ │ └── layout │ │ │ └── Index.vue │ └── vue.config.js └── landing │ ├── .gitignore │ ├── README.md │ ├── babel.config.js │ ├── bp.json │ ├── chains.json │ ├── package.json │ ├── postcss.config.js │ ├── public │ ├── favicon.png │ └── index.html │ ├── src │ ├── App.vue │ ├── assets │ │ ├── files │ │ │ └── DeFis-Network-Whitepaper.pdf │ │ ├── img │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ ├── 4.png │ │ │ ├── 5.png │ │ │ ├── 6.png │ │ │ ├── 7.png │ │ │ ├── LEND.png │ │ │ ├── bank.png │ │ │ ├── defis.png │ │ │ ├── more.png │ │ │ ├── partners │ │ │ │ ├── bitpie.png │ │ │ │ ├── hoov3.png │ │ │ │ ├── meetone.png │ │ │ │ ├── mykey.png │ │ │ │ ├── newdex.png │ │ │ │ ├── peckshield.png │ │ │ │ ├── slowmist.png │ │ │ │ └── tp.png │ │ │ ├── record │ │ │ │ └── peckshield.jpeg │ │ │ ├── swap.png │ │ │ ├── synthetix.png │ │ │ └── team │ │ │ │ ├── discord.svg │ │ │ │ ├── github.svg │ │ │ │ ├── team1.jpeg │ │ │ │ ├── team10.png │ │ │ │ ├── team11.png │ │ │ │ ├── team12.png │ │ │ │ ├── team2.jpeg │ │ │ │ ├── team3.jpeg │ │ │ │ ├── team4.jpeg │ │ │ │ ├── team5.jpeg │ │ │ │ ├── team6.jpeg │ │ │ │ ├── team7.jpeg │ │ │ │ ├── team7.jpg │ │ │ │ ├── team8.jpeg │ │ │ │ ├── team9.jpeg │ │ │ │ ├── telegram.svg │ │ │ │ ├── twitter.svg │ │ │ │ ├── wechat.svg │ │ │ │ └── wechatqr.jpg │ │ └── logo.png │ ├── components │ │ └── Nav.vue │ ├── main.js │ ├── router │ │ └── index.js │ ├── store │ │ ├── getters.js │ │ ├── index.js │ │ └── modules │ │ │ ├── app.js │ │ │ └── sys.js │ ├── utils │ │ ├── eos │ │ │ ├── eos.js │ │ │ ├── eos.old.js │ │ │ ├── eosio.system.json │ │ │ └── index.js │ │ ├── filters │ │ │ └── index.js │ │ ├── lang │ │ │ ├── en.js │ │ │ ├── index.js │ │ │ └── zh-CN.js │ │ ├── logic.js │ │ └── public.js │ └── views │ │ ├── error-page │ │ └── 404.vue │ │ ├── index │ │ ├── Index.vue │ │ ├── IndexMobile.vue │ │ └── components │ │ │ ├── MyFooter.vue │ │ │ └── MyHeader.vue │ │ └── layout │ │ └── Index.vue │ └── vue.config.js └── whitepaper_cn.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | build/ 3 | .vscode 4 | node_modules/ 5 | dist/ 6 | npm-debug.log 7 | .idea 8 | test* 9 | todo 10 | cmd* 11 | 12 | dao/ 13 | feed/ 14 | oracle/ 15 | pools/ 16 | logs/ 17 | swap/ 18 | 19 | drafts/ 20 | docs/ 21 | docs_2/ -------------------------------------------------------------------------------- /SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Table of contents 2 | 3 | * [DeFis Network: An Open Finance System](README.md) 4 | 5 | -------------------------------------------------------------------------------- /audits/DeFis-Network_YFC-MGP_audit_report_2020_83_cn_rc1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/audits/DeFis-Network_YFC-MGP_audit_report_2020_83_cn_rc1.pdf -------------------------------------------------------------------------------- /audits/README.md: -------------------------------------------------------------------------------- 1 | ![DFS Swap](./mining_pools_audit_by_PechShield.png) 2 | 3 | ![DFS Swap](./dfs_swap_audit_by_PechShield.jpeg) 4 | 5 | ![DFS Swap](./dfs_bank_audit_by_SlowMist.png) 6 | 7 | ![DFS Bank](./dfs_swap_audit_by_SlowMist.png) 8 | 9 | -------------------------------------------------------------------------------- /audits/dfs_bank_audit_by_SlowMist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/audits/dfs_bank_audit_by_SlowMist.png -------------------------------------------------------------------------------- /audits/dfs_dss_audit_by_PechShield.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/audits/dfs_dss_audit_by_PechShield.jpeg -------------------------------------------------------------------------------- /audits/dfs_swap_audit_by_PechShield.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/audits/dfs_swap_audit_by_PechShield.jpeg -------------------------------------------------------------------------------- /audits/dfs_swap_audit_by_SlowMist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/audits/dfs_swap_audit_by_SlowMist.png -------------------------------------------------------------------------------- /audits/mining_pools_audit_by_PechShield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/audits/mining_pools_audit_by_PechShield.png -------------------------------------------------------------------------------- /audits/yfc.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/audits/yfc.jpeg -------------------------------------------------------------------------------- /contracts/dividend/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | build/ 3 | .vscode 4 | node_modules/ 5 | dist/ 6 | npm-debug.log 7 | .idea 8 | test* 9 | todo 10 | cmd* -------------------------------------------------------------------------------- /contracts/dividend/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(ExternalProject) 2 | # if no cdt root is given use default path 3 | if(EOSIO_CDT_ROOT STREQUAL "" OR NOT EOSIO_CDT_ROOT) 4 | find_package(eosio.cdt) 5 | endif() 6 | 7 | ExternalProject_Add( 8 | dividend_project 9 | SOURCE_DIR ${CMAKE_SOURCE_DIR}/src 10 | BINARY_DIR ${CMAKE_BINARY_DIR}/dividend 11 | CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${EOSIO_CDT_ROOT}/lib/cmake/eosio.cdt/EosioWasmToolchain.cmake 12 | UPDATE_COMMAND "" 13 | PATCH_COMMAND "" 14 | TEST_COMMAND "" 15 | INSTALL_COMMAND "" 16 | BUILD_ALWAYS 1 17 | ) -------------------------------------------------------------------------------- /contracts/dividend/README.txt: -------------------------------------------------------------------------------- 1 | --- dividend Project --- 2 | 3 | - How to Build - 4 | - cd to 'build' directory 5 | - run the command 'cmake ..' 6 | - run the command 'make' 7 | 8 | - After build - 9 | - The built smart contract is under the 'dividend' directory in the 'build' directory 10 | - You can then do a 'set contract' action with 'cleos' and point in to the './build/dividend' directory 11 | 12 | - Additions to CMake should be done to the CMakeLists.txt in the './src' directory and not in the top level CMakeLists.txt -------------------------------------------------------------------------------- /contracts/dividend/include/dividend.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace eosio; 4 | 5 | CONTRACT dividend : public contract 6 | { 7 | public: 8 | using contract::contract; 9 | 10 | static constexpr name STAKING_CONTRACT{"defistakedfs"_n}; 11 | static constexpr name DFS_CONTRACT{"minedfstoken"_n}; 12 | 13 | static constexpr uint32_t DIVIDEND_GAP = 1 * 86400; 14 | 15 | dividend(name receiver, name code, datastream ds) 16 | : contract(receiver, code, ds), 17 | _divds(_self, _self.value), 18 | _claims(_self, _self.value) 19 | { 20 | 21 | } 22 | 23 | ACTION exec(symbol_code sym); 24 | 25 | ACTION claim(name user, symbol_code sym); 26 | 27 | ACTION update(name user, asset quantity); 28 | 29 | private: 30 | TABLE dividends 31 | { 32 | symbol sym; 33 | name contract; 34 | double reward_per_dfs; 35 | time_point_sec next_dividend; 36 | 37 | uint64_t primary_key() const { return sym.code().raw(); } 38 | }; 39 | 40 | TABLE claim_st 41 | { 42 | name user; 43 | asset amount; 44 | time_point_sec next_dividend; 45 | 46 | uint64_t primary_key() const { return user.value; } 47 | }; 48 | 49 | struct stake_st 50 | { 51 | name owner; 52 | asset bal; 53 | 54 | uint64_t primary_key() const { return owner.value; } 55 | }; 56 | 57 | typedef multi_index<"divds"_n, dividends> divds; 58 | divds _divds; 59 | 60 | typedef multi_index<"claims"_n, claim_st> claims; 61 | claims _claims; 62 | 63 | typedef multi_index<"stakes"_n, stake_st> stakes; 64 | }; -------------------------------------------------------------------------------- /contracts/dividend/include/types.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace eosio; 6 | 7 | struct transfer_args 8 | { 9 | name from; 10 | name to; 11 | asset quantity; 12 | std::string memo; 13 | }; 14 | 15 | struct currency_stats 16 | { 17 | asset supply; 18 | asset max_supply; 19 | name issuer; 20 | 21 | uint64_t primary_key() const { return supply.symbol.code().raw(); } 22 | }; 23 | 24 | struct account 25 | { 26 | asset balance; 27 | 28 | uint64_t primary_key() const { return balance.symbol.code().raw(); } 29 | }; 30 | 31 | struct stake_st 32 | { 33 | name owner; 34 | asset bal; 35 | 36 | uint64_t primary_key() const { return owner.value; } 37 | }; 38 | 39 | typedef eosio::multi_index<"accounts"_n, account> accounts; 40 | typedef eosio::multi_index<"stat"_n, currency_stats> stats; 41 | typedef multi_index<"stakes"_n, stake_st> stakes; -------------------------------------------------------------------------------- /contracts/dividend/include/utils.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | namespace utils 3 | { 4 | using std::string; 5 | 6 | asset get_supply(const name &token_contract_account, const symbol_code &sym_code) 7 | { 8 | stats statstable(token_contract_account, sym_code.raw()); 9 | std::string err_msg = "invalid token contract: "; 10 | err_msg.append(token_contract_account.to_string()); 11 | const auto &st = statstable.require_find(sym_code.raw(), err_msg.c_str()); 12 | return st->supply; 13 | } 14 | 15 | asset get_balance(const name &token_contract_account, const name &owner, const symbol_code &sym_code) 16 | { 17 | accounts accountstable(token_contract_account, owner.value); 18 | const auto &ac = accountstable.get(sym_code.raw()); 19 | return ac.balance; 20 | } 21 | 22 | void inline_transfer(name contract, name from, name to, asset quantity, string memo) 23 | { 24 | action( 25 | permission_level{from, "active"_n}, 26 | contract, 27 | name("transfer"), 28 | make_tuple(from, to, quantity, memo)) 29 | .send(); 30 | } 31 | 32 | std::vector split(const string &str, const string &delim) 33 | { 34 | std::vector strs; 35 | size_t prev = 0, pos = 0; 36 | do 37 | { 38 | pos = str.find(delim, prev); 39 | if (pos == string::npos) 40 | pos = str.length(); 41 | string s = str.substr(prev, pos - prev); 42 | if (!str.empty()) 43 | strs.push_back(s); 44 | prev = pos + delim.length(); 45 | } while (pos < str.length() && prev < str.length()); 46 | return strs; 47 | } 48 | 49 | } // namespace utils -------------------------------------------------------------------------------- /contracts/dividend/ricardian/dividend.contracts.md: -------------------------------------------------------------------------------- 1 |

hi

2 | 3 | Stub for hi action's ricardian contract -------------------------------------------------------------------------------- /contracts/dividend/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(dividend) 2 | 3 | set(EOSIO_WASM_OLD_BEHAVIOR "Off") 4 | find_package(eosio.cdt) 5 | 6 | add_contract( dividend dividend dividend.cpp ) 7 | target_include_directories( dividend PUBLIC ${CMAKE_SOURCE_DIR}/../include ) 8 | target_ricardian_directory( dividend ${CMAKE_SOURCE_DIR}/../ricardian ) -------------------------------------------------------------------------------- /contracts/factory/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(ExternalProject) 2 | # if no cdt root is given use default path 3 | if(EOSIO_CDT_ROOT STREQUAL "" OR NOT EOSIO_CDT_ROOT) 4 | find_package(eosio.cdt) 5 | endif() 6 | 7 | ExternalProject_Add( 8 | factory_project 9 | SOURCE_DIR ${CMAKE_SOURCE_DIR}/src 10 | BINARY_DIR ${CMAKE_BINARY_DIR}/factory 11 | CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${EOSIO_CDT_ROOT}/lib/cmake/eosio.cdt/EosioWasmToolchain.cmake 12 | UPDATE_COMMAND "" 13 | PATCH_COMMAND "" 14 | TEST_COMMAND "" 15 | INSTALL_COMMAND "" 16 | BUILD_ALWAYS 1 17 | ) -------------------------------------------------------------------------------- /contracts/factory/README.txt: -------------------------------------------------------------------------------- 1 | --- factory Project --- 2 | 3 | - How to Build - 4 | - cd to 'build' directory 5 | - run the command 'cmake ..' 6 | - run the command 'make' 7 | 8 | - After build - 9 | - The built smart contract is under the 'factory' directory in the 'build' directory 10 | - You can then do a 'set contract' action with 'cleos' and point in to the './build/factory' directory 11 | 12 | - Additions to CMake should be done to the CMakeLists.txt in the './src' directory and not in the top level CMakeLists.txt -------------------------------------------------------------------------------- /contracts/factory/include/factory.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | CONTRACT factory : public contract 4 | { 5 | public: 6 | using contract::contract; 7 | 8 | factory(name receiver, name code, datastream ds) 9 | : contract(receiver, code, ds), 10 | _pairs(_self, _self.value), 11 | _globals(_self, _self.value) {} 12 | 13 | ACTION mapping(uint64_t mid); 14 | 15 | [[eosio::on_notify("minedfstoken::transfer")]] 16 | void create(name from, name to, asset quantity, std::string memo); 17 | 18 | private: 19 | TABLE pair 20 | { 21 | checksum256 digest; 22 | std::string unikey; 23 | uint64_t mid; 24 | 25 | uint64_t primary_key() const { return utils::uint64_hash(digest); } 26 | uint64_t byid() const { return mid; } 27 | }; 28 | 29 | TABLE globals 30 | { 31 | uint64_t market_id; 32 | EOSLIB_SERIALIZE(globals, (market_id)) 33 | }; 34 | 35 | typedef multi_index<"pairs"_n, pair, indexed_by<"byid"_n, const_mem_fun>> pairs; 36 | pairs _pairs; 37 | 38 | typedef eosio::singleton<"globals"_n, globals> globals_index; 39 | globals_index _globals; 40 | 41 | uint64_t get_mid(); 42 | void create_market(uint64_t mid, name creator, name contract0, name contract1, symbol sym0, symbol sym1); 43 | }; -------------------------------------------------------------------------------- /contracts/factory/include/types.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace eosio; 7 | 8 | struct transfer_args 9 | { 10 | name from; 11 | name to; 12 | asset quantity; 13 | std::string memo; 14 | }; 15 | 16 | struct currency_stats 17 | { 18 | asset supply; 19 | asset max_supply; 20 | name issuer; 21 | 22 | uint64_t primary_key() const { return supply.symbol.code().raw(); } 23 | }; 24 | typedef eosio::multi_index<"stat"_n, currency_stats> stats; 25 | 26 | struct market 27 | { 28 | uint64_t mid; 29 | 30 | name contract0; 31 | name contract1; 32 | symbol sym0; 33 | symbol sym1; 34 | asset reserve0; 35 | asset reserve1; 36 | uint64_t liquidity_token; 37 | double price0_last; // the last price is easy to controll, just for kline display, don't use in other dapp directly 38 | double price1_last; 39 | uint64_t price0_cumulative_last; 40 | uint64_t price1_cumulative_last; 41 | time_point_sec last_update; 42 | 43 | uint64_t primary_key() const { return mid; } 44 | }; 45 | typedef multi_index<"markets"_n, market> markets; 46 | -------------------------------------------------------------------------------- /contracts/factory/include/utils.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace utils 4 | { 5 | using std::string; 6 | 7 | string to_hex(const char *d, uint32_t s) 8 | { 9 | std::string r; 10 | const char *to_hex = "0123456789abcdef"; 11 | uint8_t *c = (uint8_t *)d; 12 | for (uint32_t i = 0; i < s; ++i) 13 | (r += to_hex[(c[i] >> 4)]) += to_hex[(c[i] & 0x0f)]; 14 | return r; 15 | } 16 | 17 | string sha256_to_hex(const checksum256 &sha256) 18 | { 19 | auto hash_data = sha256.extract_as_byte_array(); 20 | return to_hex((char *)hash_data.data(), sizeof(hash_data.data())); 21 | } 22 | 23 | uint64_t uint64_hash(const string &hash) 24 | { 25 | return std::hash{}(hash); 26 | } 27 | 28 | uint64_t uint64_hash(const checksum256 &hash) 29 | { 30 | return uint64_hash(sha256_to_hex(hash)); 31 | } 32 | 33 | asset get_supply(const name &token_contract_account, const symbol_code &sym_code) 34 | { 35 | stats statstable(token_contract_account, sym_code.raw()); 36 | std::string err_msg = "invalid token contract: "; 37 | err_msg.append(token_contract_account.to_string()); 38 | const auto &st = statstable.require_find(sym_code.raw(), err_msg.c_str()); 39 | return st->supply; 40 | } 41 | 42 | void inline_transfer(name contract, name from, name to, asset quantity, string memo) 43 | { 44 | action( 45 | permission_level{from, "active"_n}, 46 | contract, 47 | name("transfer"), 48 | make_tuple(from, to, quantity, memo)) 49 | .send(); 50 | } 51 | 52 | std::vector split(const string &str, const string &delim) 53 | { 54 | std::vector strs; 55 | size_t prev = 0, pos = 0; 56 | do 57 | { 58 | pos = str.find(delim, prev); 59 | if (pos == string::npos) 60 | pos = str.length(); 61 | string s = str.substr(prev, pos - prev); 62 | if (!str.empty()) 63 | strs.push_back(s); 64 | prev = pos + delim.length(); 65 | } while (pos < str.length() && prev < str.length()); 66 | return strs; 67 | } 68 | } // namespace utils -------------------------------------------------------------------------------- /contracts/factory/ricardian/factory.contracts.md: -------------------------------------------------------------------------------- 1 |

hi

2 | 3 | Stub for hi action's ricardian contract -------------------------------------------------------------------------------- /contracts/factory/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(factory) 2 | 3 | set(EOSIO_WASM_OLD_BEHAVIOR "Off") 4 | find_package(eosio.cdt) 5 | 6 | add_contract( factory factory factory.cpp ) 7 | target_include_directories( factory PUBLIC ${CMAKE_SOURCE_DIR}/../include ) 8 | target_ricardian_directory( factory ${CMAKE_SOURCE_DIR}/../ricardian ) -------------------------------------------------------------------------------- /contracts/family/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(ExternalProject) 2 | # if no cdt root is given use default path 3 | if(EOSIO_CDT_ROOT STREQUAL "" OR NOT EOSIO_CDT_ROOT) 4 | find_package(eosio.cdt) 5 | endif() 6 | 7 | ExternalProject_Add( 8 | family_project 9 | SOURCE_DIR ${CMAKE_SOURCE_DIR}/src 10 | BINARY_DIR ${CMAKE_BINARY_DIR}/family 11 | CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${EOSIO_CDT_ROOT}/lib/cmake/eosio.cdt/EosioWasmToolchain.cmake 12 | UPDATE_COMMAND "" 13 | PATCH_COMMAND "" 14 | TEST_COMMAND "" 15 | INSTALL_COMMAND "" 16 | BUILD_ALWAYS 1 17 | ) -------------------------------------------------------------------------------- /contracts/family/README.txt: -------------------------------------------------------------------------------- 1 | --- family Project --- 2 | 3 | - How to Build - 4 | - cd to 'build' directory 5 | - run the command 'cmake ..' 6 | - run the command 'make' 7 | 8 | - After build - 9 | - The built smart contract is under the 'family' directory in the 'build' directory 10 | - You can then do a 'set contract' action with 'cleos' and point in to the './build/family' directory 11 | 12 | - Additions to CMake should be done to the CMakeLists.txt in the './src' directory and not in the top level CMakeLists.txt -------------------------------------------------------------------------------- /contracts/family/include/family.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | using namespace eosio; 6 | 7 | CONTRACT family : public contract 8 | { 9 | public: 10 | using contract::contract; 11 | 12 | family(name receiver, name code, datastream ds) 13 | : contract(receiver, code, ds), 14 | _codes(_self, _self.value), 15 | _stakes(_self, _self.value), 16 | _globals(_self, _self.value) 17 | { 18 | } 19 | 20 | [[eosio::on_notify("minedfstoken::transfer")]] 21 | void join(name from, name to, asset quantity, std::string memo); 22 | 23 | ACTION unstake(name user); 24 | 25 | private: 26 | TABLE code_st 27 | { 28 | uint64_t id; 29 | name owner; 30 | uint64_t primary_key() const { return id; } 31 | uint64_t byname() const { return owner.value; } 32 | }; 33 | 34 | TABLE globals 35 | { 36 | uint64_t id; 37 | }; 38 | 39 | TABLE stake_st 40 | { 41 | name owner; 42 | asset bal; 43 | 44 | uint64_t primary_key() const { return owner.value; } 45 | }; 46 | 47 | typedef multi_index<"stakes"_n, stake_st> stakes; 48 | stakes _stakes; 49 | 50 | typedef eosio::singleton<"globals"_n, globals> globals_index; 51 | globals_index _globals; 52 | 53 | typedef multi_index<"codes"_n, code_st, indexed_by<"byname"_n, const_mem_fun>> codes; 54 | codes _codes; 55 | 56 | uint64_t get_id(); 57 | void create(name from); 58 | }; -------------------------------------------------------------------------------- /contracts/family/ricardian/family.contracts.md: -------------------------------------------------------------------------------- 1 |

hi

2 | 3 | Stub for hi action's ricardian contract -------------------------------------------------------------------------------- /contracts/family/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(family) 2 | 3 | set(EOSIO_WASM_OLD_BEHAVIOR "Off") 4 | find_package(eosio.cdt) 5 | 6 | add_contract( family family family.cpp ) 7 | target_include_directories( family PUBLIC ${CMAKE_SOURCE_DIR}/../include ) 8 | target_ricardian_directory( family ${CMAKE_SOURCE_DIR}/../ricardian ) -------------------------------------------------------------------------------- /contracts/family/src/family.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void family::join(name from, name to, asset quantity, std::string memo) 4 | { 5 | if (from == _self || to != _self) 6 | return; 7 | 8 | if (memo == "join") 9 | { 10 | check(quantity.amount == 100 * 10000, "pay 100 DFS to join"); 11 | create(from); 12 | } 13 | else if (memo == "stake") 14 | { 15 | check(quantity.amount == 5000 * 10000, "stake 5000 DFS to join"); 16 | create(from); 17 | 18 | _stakes.emplace(get_self(), [&](auto &s) { 19 | s.owner = from; 20 | s.bal = quantity; 21 | }); 22 | } 23 | else 24 | { 25 | check(false, "invalid memo"); 26 | } 27 | } 28 | 29 | ACTION family::unstake(name user) 30 | { 31 | require_auth(user); 32 | auto itr = _stakes.require_find(user.value, "stake not found"); 33 | asset quantity = itr->bal; 34 | _stakes.erase(itr); 35 | auto index = _codes.get_index(); 36 | auto code_itr = index.require_find(user.value, "code not found"); 37 | index.erase(code_itr); 38 | action{permission_level{get_self(), "active"_n}, name("minedfstoken"), "transfer"_n, 39 | make_tuple(get_self(), user, quantity, std::string("stake refund"))} 40 | .send(); 41 | } 42 | 43 | uint64_t family::get_id() 44 | { 45 | globals glb = _globals.get_or_default(globals{}); 46 | glb.id += 1; 47 | _globals.set(glb, _self); 48 | return glb.id; 49 | } 50 | 51 | void family::create(name from) 52 | { 53 | auto index = _codes.get_index(); 54 | auto itr = index.find(from.value); 55 | 56 | check(itr == index.end(), "You're in the DFS family already."); 57 | 58 | _codes.emplace(get_self(), [&](auto &s) { 59 | s.id = get_id(); 60 | s.owner = from; 61 | }); 62 | } -------------------------------------------------------------------------------- /contracts/mining/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | build/ 3 | .vscode 4 | node_modules/ 5 | dist/ 6 | npm-debug.log 7 | .idea 8 | test* 9 | todo 10 | cmd* -------------------------------------------------------------------------------- /contracts/mining/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(ExternalProject) 2 | # if no cdt root is given use default path 3 | if(EOSIO_CDT_ROOT STREQUAL "" OR NOT EOSIO_CDT_ROOT) 4 | find_package(eosio.cdt) 5 | endif() 6 | 7 | ExternalProject_Add( 8 | mining_project 9 | SOURCE_DIR ${CMAKE_SOURCE_DIR}/src 10 | BINARY_DIR ${CMAKE_BINARY_DIR}/mining 11 | CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${EOSIO_CDT_ROOT}/lib/cmake/eosio.cdt/EosioWasmToolchain.cmake 12 | UPDATE_COMMAND "" 13 | PATCH_COMMAND "" 14 | TEST_COMMAND "" 15 | INSTALL_COMMAND "" 16 | BUILD_ALWAYS 1 17 | ) -------------------------------------------------------------------------------- /contracts/mining/README.txt: -------------------------------------------------------------------------------- 1 | --- mining Project --- 2 | 3 | - How to Build - 4 | - cd to 'build' directory 5 | - run the command 'cmake ..' 6 | - run the command 'make' 7 | 8 | - After build - 9 | - The built smart contract is under the 'mining' directory in the 'build' directory 10 | - You can then do a 'set contract' action with 'cleos' and point in to the './build/mining' directory 11 | 12 | - Additions to CMake should be done to the CMakeLists.txt in the './src' directory and not in the top level CMakeLists.txt -------------------------------------------------------------------------------- /contracts/mining/ricardian/mining.contracts.md: -------------------------------------------------------------------------------- 1 |

hi

2 | 3 | Stub for hi action's ricardian contract -------------------------------------------------------------------------------- /contracts/mining/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(mining) 2 | 3 | set(EOSIO_WASM_OLD_BEHAVIOR "Off") 4 | find_package(eosio.cdt) 5 | 6 | add_contract( mining mining mining.cpp ) 7 | target_include_directories( mining PUBLIC ${CMAKE_SOURCE_DIR}/../include ) 8 | target_ricardian_directory( mining ${CMAKE_SOURCE_DIR}/../ricardian ) -------------------------------------------------------------------------------- /contracts/staking/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | build/ 3 | .vscode 4 | node_modules/ 5 | dist/ 6 | npm-debug.log 7 | .idea 8 | test* 9 | todo 10 | cmd* -------------------------------------------------------------------------------- /contracts/staking/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(ExternalProject) 2 | # if no cdt root is given use default path 3 | if(EOSIO_CDT_ROOT STREQUAL "" OR NOT EOSIO_CDT_ROOT) 4 | find_package(eosio.cdt) 5 | endif() 6 | 7 | ExternalProject_Add( 8 | staking_project 9 | SOURCE_DIR ${CMAKE_SOURCE_DIR}/src 10 | BINARY_DIR ${CMAKE_BINARY_DIR}/staking 11 | CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${EOSIO_CDT_ROOT}/lib/cmake/eosio.cdt/EosioWasmToolchain.cmake 12 | UPDATE_COMMAND "" 13 | PATCH_COMMAND "" 14 | TEST_COMMAND "" 15 | INSTALL_COMMAND "" 16 | BUILD_ALWAYS 1 17 | ) -------------------------------------------------------------------------------- /contracts/staking/README.txt: -------------------------------------------------------------------------------- 1 | --- staking Project --- 2 | 3 | - How to Build - 4 | - cd to 'build' directory 5 | - run the command 'cmake ..' 6 | - run the command 'make' 7 | 8 | - After build - 9 | - The built smart contract is under the 'staking' directory in the 'build' directory 10 | - You can then do a 'set contract' action with 'cleos' and point in to the './build/staking' directory 11 | 12 | - Additions to CMake should be done to the CMakeLists.txt in the './src' directory and not in the top level CMakeLists.txt -------------------------------------------------------------------------------- /contracts/staking/include/staking.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace eosio; 6 | 7 | CONTRACT staking : public contract 8 | { 9 | public: 10 | using contract::contract; 11 | 12 | static constexpr symbol dfs_symbol = symbol("DFS", 4); 13 | 14 | static constexpr uint32_t seconds_per_day = 1; 15 | static constexpr uint32_t refund_delay_sec = 3 * seconds_per_day; 16 | 17 | staking(name receiver, name code, datastream ds) 18 | : contract(receiver, code, ds), 19 | _stakes(_self, _self.value) 20 | { 21 | } 22 | 23 | ACTION unstake(name user, asset quantity); 24 | 25 | [[eosio::on_notify("minedfstoken::transfer")]] void stake(name from, name to, asset quantity, std::string memo); 26 | 27 | ACTION refund(name user, uint64_t id); 28 | 29 | private: 30 | TABLE stake_st 31 | { 32 | name owner; 33 | asset bal; 34 | 35 | uint64_t primary_key() const { return owner.value; } 36 | }; 37 | 38 | TABLE refund_st 39 | { 40 | uint64_t id; 41 | asset refund; 42 | time_point_sec request_time; 43 | uint64_t primary_key() const { return id; } 44 | }; 45 | 46 | typedef multi_index<"stakes"_n, stake_st> stakes; 47 | stakes _stakes; 48 | 49 | typedef multi_index<"refunds"_n, refund_st> refunds; 50 | }; -------------------------------------------------------------------------------- /contracts/staking/ricardian/staking.contracts.md: -------------------------------------------------------------------------------- 1 |

hi

2 | 3 | Stub for hi action's ricardian contract -------------------------------------------------------------------------------- /contracts/staking/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(staking) 2 | 3 | set(EOSIO_WASM_OLD_BEHAVIOR "Off") 4 | find_package(eosio.cdt) 5 | 6 | add_contract( staking staking staking.cpp ) 7 | target_include_directories( staking PUBLIC ${CMAKE_SOURCE_DIR}/../include ) 8 | target_ricardian_directory( staking ${CMAKE_SOURCE_DIR}/../ricardian ) -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "socket.io-client": "^2.3.1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /ui/apps/.github/workflows/nodejs.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Node.js CI 5 | 6 | on: 7 | push: 8 | branches: [ master ] 9 | pull_request: 10 | branches: [ master ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | strategy: 18 | matrix: 19 | node-version: [10.x, 12.x] 20 | 21 | steps: 22 | - uses: actions/checkout@v2 23 | - name: Use Node.js ${{ matrix.node-version }} 24 | uses: actions/setup-node@v1 25 | with: 26 | node-version: ${{ matrix.node-version }} 27 | - run: npm run build 28 | -------------------------------------------------------------------------------- /ui/apps/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | package-lock.json 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | release.sh -------------------------------------------------------------------------------- /ui/apps/README.md: -------------------------------------------------------------------------------- 1 | # Defis-network 2 | Defis Network front end. 3 | 4 | ## Project setup 5 | ``` 6 | npm install 7 | ``` 8 | 9 | ### Compiles and hot-reloads for development 10 | ``` 11 | npm run serve 12 | ``` 13 | 14 | ### Compiles and minifies for production 15 | ``` 16 | npm run build 17 | ``` 18 | 19 | ### Lints and fixes files 20 | ``` 21 | npm run lint 22 | ``` 23 | 24 | ### Customize configuration 25 | See [Configuration Reference](https://cli.vuejs.org/config/). 26 | -------------------------------------------------------------------------------- /ui/apps/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /ui/apps/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DeFis-network", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "core-js": "^3.6.4", 12 | "vue": "^2.6.11", 13 | "vue-router": "^3.1.3", 14 | "vuex": "^3.1.2", 15 | "moment": "^2.24.0", 16 | "decimal.js": "^10.0.1", 17 | "element-ui": "^2.13.0", 18 | "eosjs-ecc": "^4.0.7", 19 | "eosjs-without-sort": "^16.0.11", 20 | "@scatterjs/core": "^2.7.44", 21 | "@scatterjs/eosjs2": "^1.5.26", 22 | "scatterjs-core": "^2.7.7", 23 | "scatterjs-plugin-eosjs": "^1.5.0", 24 | "axios": "^0.19.0", 25 | "vue-i18n": "^7.8.1", 26 | "numeral": "^2.0.6" 27 | }, 28 | "devDependencies": { 29 | "@vue/cli-plugin-babel": "~4.3.0", 30 | "@vue/cli-plugin-eslint": "~4.3.0", 31 | "@vue/cli-service": "~4.3.0", 32 | "babel-eslint": "^10.1.0", 33 | "eslint": "^6.7.2", 34 | "eslint-plugin-vue": "^6.2.2", 35 | "vue-template-compiler": "^2.6.11", 36 | "mockjs": "^1.1.0", 37 | "node-sass": "^4.12.0", 38 | "sass-loader": "^8.0.0" 39 | }, 40 | "eslintConfig": { 41 | "root": true, 42 | "env": { 43 | "node": true 44 | }, 45 | "extends": [ 46 | "plugin:vue/essential", 47 | "eslint:recommended" 48 | ], 49 | "parserOptions": { 50 | "parser": "babel-eslint" 51 | }, 52 | "rules": {} 53 | }, 54 | "browserslist": [ 55 | "> 1%", 56 | "last 2 versions", 57 | "not dead" 58 | ] 59 | } 60 | -------------------------------------------------------------------------------- /ui/apps/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/public/favicon.png -------------------------------------------------------------------------------- /ui/apps/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | DeFis-Network 11 | 12 | 13 | 16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /ui/apps/src/assets/img/bank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/img/bank.png -------------------------------------------------------------------------------- /ui/apps/src/assets/img/bank1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/img/bank1.png -------------------------------------------------------------------------------- /ui/apps/src/assets/img/bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/img/bottom.png -------------------------------------------------------------------------------- /ui/apps/src/assets/img/change.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/img/change.png -------------------------------------------------------------------------------- /ui/apps/src/assets/img/dex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/img/dex.png -------------------------------------------------------------------------------- /ui/apps/src/assets/img/dex1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/img/dex1.png -------------------------------------------------------------------------------- /ui/apps/src/assets/img/eosio.token-eos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/img/eosio.token-eos.png -------------------------------------------------------------------------------- /ui/apps/src/assets/img/hyk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/img/hyk.png -------------------------------------------------------------------------------- /ui/apps/src/assets/img/hyk1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/img/hyk1.png -------------------------------------------------------------------------------- /ui/apps/src/assets/img/more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/img/more.png -------------------------------------------------------------------------------- /ui/apps/src/assets/img/swap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/img/swap.png -------------------------------------------------------------------------------- /ui/apps/src/assets/img/swap1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/img/swap1.png -------------------------------------------------------------------------------- /ui/apps/src/assets/img/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/img/top.png -------------------------------------------------------------------------------- /ui/apps/src/assets/img/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/img/warning.png -------------------------------------------------------------------------------- /ui/apps/src/assets/logo-old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/logo-old.png -------------------------------------------------------------------------------- /ui/apps/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps/src/assets/logo.png -------------------------------------------------------------------------------- /ui/apps/src/components/FooterDiv.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 36 | 37 | 68 | -------------------------------------------------------------------------------- /ui/apps/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import ElementUI from 'element-ui' 3 | import 'element-ui/lib/theme-chalk/index.css'; 4 | import i18n from '@/utils/lang'; 5 | import App from './App.vue' 6 | import router from './router' 7 | import store from './store' 8 | import './utils/filters/index' 9 | 10 | Vue.config.productionTip = false 11 | // 国际化 - 语言 12 | Vue.use(ElementUI, { 13 | i18n: (key, value) => i18n.t(key, value) 14 | }); 15 | 16 | new Vue({ 17 | router, 18 | store, 19 | i18n, 20 | render: h => h(App), 21 | }).$mount('#app') 22 | -------------------------------------------------------------------------------- /ui/apps/src/store/getters.js: -------------------------------------------------------------------------------- 1 | const getters = { 2 | app: state => state.app, 3 | sys: state => state.sys, 4 | }; 5 | 6 | export default getters; 7 | -------------------------------------------------------------------------------- /ui/apps/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuex from 'vuex'; 3 | import app from './modules/app'; 4 | import sys from './modules/sys'; 5 | import getters from './getters'; 6 | 7 | Vue.use(Vuex); 8 | 9 | const store = new Vuex.Store({ 10 | modules: { 11 | app, 12 | sys, 13 | }, 14 | getters, 15 | }); 16 | 17 | export default store; 18 | -------------------------------------------------------------------------------- /ui/apps/src/utils/eos/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { ChainModel } from './eos'; 3 | 4 | function model() { 5 | return ChainModel 6 | } 7 | 8 | export var EosModel = model(); 9 | -------------------------------------------------------------------------------- /ui/apps/src/utils/filters/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import moment from 'moment'; 3 | import numeral from 'numeral'; 4 | import { toFixed, accSub, accMul } from "@/utils/public" 5 | import store from '@/store' 6 | 7 | // 位数分割 128,373,883 8 | Vue.filter('numeralFormat', (value, p) => { 9 | let xstr = '0'; 10 | if (p) { 11 | xstr = '0.'; 12 | for (var i = 0; i < p; i++) { // eslint-disable-line 13 | xstr += '0'; // eslint-disable-line 14 | } 15 | } 16 | return numeral(value).format(`0,${xstr}`); 17 | }); 18 | 19 | // unix 时间戳、 utc Data类型 20 | Vue.filter('dateFormat', value => moment.utc(value).format('YYYY-MM-DD')); 21 | Vue.filter('dateFormatYMDF', value => moment(value).format('YYYY-MM-DD HH:mm')); 22 | Vue.filter('dateFormatAll', value => moment(value).format('YYYY-MM-DD HH:mm:ss')); 23 | Vue.filter('dateFormatMonth', value => moment.utc(value).format('MM-DD')); 24 | 25 | Vue.filter('dateFormatBIH', value => moment(value).format('YYYY-MM-DD HH:mm:ss')); 26 | Vue.filter('dateFormatBIHM', value => moment(value).format('YYYY-MM-DD HH:mm')); 27 | Vue.filter('dateFormatTimeBIH', value => moment(value).format('HH:mm:ss')); 28 | Vue.filter('dateFormatMonthHour', value => moment(value).format('MM-DD HH:mm:ss')); 29 | Vue.filter('dateFormatT', (value) => { 30 | const zone = moment().zone() / 60; // 时区 31 | return moment(value).add(0 - zone, 'hours').format('MM-DD HH:mm:ss'); 32 | }); 33 | Vue.filter('dateFormatTYear', (value) => { 34 | const zone = moment().zone() / 60; // 时区 35 | return moment(value).add(0 - zone, 'hours').format('YYYY-MM-DD HH:mm:ss'); 36 | }); 37 | 38 | // 截取小数四位数 39 | Vue.filter('numberTofixed', value => toFixed(value, 4)); 40 | 41 | // 英文下显示折扣按照百分比 42 | Vue.filter('englishPercent', value => { 43 | if (store.state.app.language === 'en' || store.state.app.language === 'ko') { 44 | const data = accSub(10, Number(value)); 45 | return `${accMul(data, 10)}%` 46 | } 47 | return value 48 | }) 49 | -------------------------------------------------------------------------------- /ui/apps/src/utils/lang/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import VueI18n from 'vue-i18n'; 3 | import store from '@/store'; 4 | import elEnLocale from 'element-ui/lib/locale/lang/en'; 5 | import elZhLocale from 'element-ui/lib/locale/lang/zh-CN'; 6 | import enLocale from './en'; 7 | import zhLocale from './zh-CN'; 8 | 9 | Vue.use(VueI18n); 10 | 11 | const messages = { 12 | 'zh-CN': { // 中文简体包 13 | ...zhLocale, 14 | ...elZhLocale 15 | }, 16 | en: { // 英文包 17 | ...enLocale, 18 | ...elEnLocale 19 | }, 20 | }; 21 | const i18n = new VueI18n({ 22 | locale: store.state.app.language, // set locale 23 | messages // locale messages 24 | }); 25 | 26 | export default i18n; 27 | -------------------------------------------------------------------------------- /ui/apps/src/views/dex/components/CreateTip.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 26 | 27 | 57 | -------------------------------------------------------------------------------- /ui/apps/src/views/dex/components/SlipTip.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 26 | 27 | 57 | -------------------------------------------------------------------------------- /ui/apps/src/views/index/components/Mining.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 33 | 34 | 64 | -------------------------------------------------------------------------------- /ui/apps/src/views/index/components/Usdt.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 50 | 51 | 54 | -------------------------------------------------------------------------------- /ui/apps/vue.config.js: -------------------------------------------------------------------------------- 1 | // vue.config.js 2 | module.exports = { 3 | // 配置项 4 | publicPath: process.env.NODE_ENV === 'production' ? '/' : '/', // 资源文件目录 5 | // 开启esLint 6 | lintOnSave: process.env.NODE_ENV !== 'production', 7 | // 开发服务配置 8 | devServer: { 9 | open: true, 10 | port: 8888, 11 | proxy: { // 代理控制 12 | '/api': { 13 | target: `http://192.168.8.253:8080`, 14 | ws: false, 15 | changeOrigin: true 16 | }, 17 | } 18 | }, 19 | css: { // 样式相关配置 20 | extract: false, // 将组件内的 CSS 提取到一个单独的 CSS 文件 (只用在生产环境中) 21 | requireModuleExtension: true, // 去掉文件名中的 .module 22 | sourceMap: false, 23 | loaderOptions: { 24 | } 25 | }, 26 | // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录。 27 | assetsDir: 'static', 28 | chainWebpack: config => { 29 | // 移除 prefetch 插件 30 | config.plugins.delete('prefetch') 31 | }, 32 | // 将构建好的文件输出到位置 33 | outputDir: 'dist', 34 | // 是否为生产环境构建生成 source map? 35 | productionSourceMap: process.env.NODE_ENV !== 'production', 36 | 37 | // 三方插件的选项 38 | pluginOptions: { 39 | // ... 40 | }, 41 | } -------------------------------------------------------------------------------- /ui/apps2/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .well-known/ 3 | node_modules/ 4 | dist/ 5 | gitee/ 6 | npm-debug.log* 7 | yarn-debug.log* 8 | yarn-error.log* 9 | package-lock.json* 10 | 11 | # Editor directories and files 12 | .idea 13 | .vscode 14 | *.suo 15 | *.ntvs* 16 | *.njsproj 17 | *.sln 18 | *.project 19 | *.sw? 20 | release* 21 | 22 | -------------------------------------------------------------------------------- /ui/apps2/README.md: -------------------------------------------------------------------------------- 1 | # jin-network 2 | DeFis Network front end. 3 | 4 | ## Project setup 5 | ``` 6 | npm install 7 | ``` 8 | 9 | ### Compiles and hot-reloads for development 10 | ``` 11 | npm run serve 12 | ``` 13 | 14 | ### Compiles and minifies for production 15 | ``` 16 | npm run build 17 | ``` 18 | 19 | ### Lints and fixes files 20 | ``` 21 | npm run lint 22 | ``` 23 | 24 | ### Customize configuration 25 | See [Configuration Reference](https://cli.vuejs.org/config/). 26 | -------------------------------------------------------------------------------- /ui/apps2/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ], 5 | plugins: [ 6 | ['import', { 7 | libraryName: 'vant', 8 | libraryDirectory: 'es', 9 | style: true 10 | }, 'vant'] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /ui/apps2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "defis-network", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "amfe-flexible": "^2.2.1", 12 | "anchor-link": "^2.1.4", 13 | "anchor-link-browser-transport": "^2.1.2", 14 | "axios": "^0.19.0", 15 | "core-js": "^3.6.4", 16 | "decimal.js": "^10.0.1", 17 | "echarts": "^4.9.0", 18 | "element-ui": "^2.14.0", 19 | "eosjs-ecc": "^4.0.7", 20 | "eosjs-without-sort": "^16.0.11", 21 | "mockjs": "^1.1.0", 22 | "moment": "^2.24.0", 23 | "numeral": "^2.0.6", 24 | "qrcodejs2": "^0.0.2", 25 | "scatterjs-core": "^2.7.7", 26 | "scatterjs-plugin-eosjs": "^1.5.0", 27 | "tp-eosjs": "^1.7.0", 28 | "uuid": "^8.3.2", 29 | "vant": "^2.11.1", 30 | "vue": "^2.6.11", 31 | "vue-clipboard2": "^0.2.0", 32 | "vue-i18n": "^7.8.1", 33 | "vue-router": "^3.4.8", 34 | "vue-worker": "^1.2.1", 35 | "vuex": "^3.1.2" 36 | }, 37 | "devDependencies": { 38 | "@vue/cli-plugin-babel": "~4.3.0", 39 | "@vue/cli-plugin-eslint": "~4.3.0", 40 | "@vue/cli-service": "~4.3.0", 41 | "babel-eslint": "^10.1.0", 42 | "babel-plugin-import": "^1.13.1", 43 | "eslint": "^6.7.2", 44 | "eslint-plugin-vue": "^6.2.2", 45 | "mockjs": "^1.1.0", 46 | "node-sass": "^4.12.0", 47 | "postcss-pxtorem": "^4.0.1", 48 | "sass-loader": "^8.0.0", 49 | "vue-template-compiler": "^2.6.11" 50 | }, 51 | "eslintConfig": { 52 | "root": true, 53 | "env": { 54 | "node": true 55 | }, 56 | "extends": [ 57 | "plugin:vue/essential", 58 | "eslint:recommended" 59 | ], 60 | "parserOptions": { 61 | "parser": "babel-eslint" 62 | }, 63 | "rules": {} 64 | }, 65 | "browserslist": [ 66 | "> 1%", 67 | "last 2 versions", 68 | "not dead" 69 | ] 70 | } 71 | -------------------------------------------------------------------------------- /ui/apps2/postcss.config.js: -------------------------------------------------------------------------------- 1 | const AutoPrefixer = require('autoprefixer'); 2 | const pxtorem = require('postcss-pxtorem'); 3 | module.exports = ({ file }) => { 4 | let remUnit; 5 | if (file && file.dirname && file.dirname.indexOf('vant') > -1) { 6 | remUnit = 37.5; 7 | } else { 8 | remUnit = 75; 9 | } 10 | return { 11 | plugins: [ 12 | AutoPrefixer({ 13 | overrideBrowserslist: ['iOS >= 7', 'android >= 4.0'], 14 | }), 15 | pxtorem({ 16 | rootValue: remUnit, 17 | propList: ['*'], 18 | minPixelValue: 1.0001, 19 | }), 20 | ], 21 | }; 22 | }; -------------------------------------------------------------------------------- /ui/apps2/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps2/public/favicon.png -------------------------------------------------------------------------------- /ui/apps2/src/api/index.js: -------------------------------------------------------------------------------- 1 | // 批量导出文件 2 | const requireApi = require.context( 3 | // api 目录的相对路径 4 | '.', 5 | // 是否查询子目录 6 | false, 7 | // 查询文件的一个后缀 8 | /.js$/ 9 | ) 10 | 11 | let module = {} 12 | requireApi.keys().forEach((key)=>{ 13 | if(key === './index.js' || key === './axios.js') return 14 | Object.assign(module,requireApi(key)) 15 | }) 16 | 17 | export default module 18 | 19 | // 取代 20 | // import { get_list } from './list' 21 | // export default { 22 | // get_list 23 | // } -------------------------------------------------------------------------------- /ui/apps2/src/assets/banner/trade.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/apps2/src/assets/banner/trade.jpeg -------------------------------------------------------------------------------- /ui/apps2/src/assets/css/animal.scss: -------------------------------------------------------------------------------- 1 | @keyframes drawer{ 2 | from { 3 | transform: translateY(-100%); 4 | } 5 | to { 6 | transform: translateY(0%); 7 | } 8 | } 9 | 10 | @-moz-keyframes drawer /* Firefox */ 11 | { 12 | from { 13 | transform: translateY(-100%); 14 | } 15 | to { 16 | transform: translateY(0%); 17 | } 18 | } 19 | 20 | @-webkit-keyframes drawer /* Safari 和 Chrome */ 21 | { 22 | from { 23 | transform: translateY(-100%); 24 | } 25 | to { 26 | transform: translateY(0%); 27 | } 28 | } 29 | 30 | @-o-keyframes drawer /* Opera */ 31 | { 32 | from { 33 | transform: translateY(-100%); 34 | } 35 | to { 36 | transform: translateY(0%); 37 | } 38 | } -------------------------------------------------------------------------------- /ui/apps2/src/components/DetailInfo.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 18 | 19 | 26 | -------------------------------------------------------------------------------- /ui/apps2/src/components/UsddTip.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | 14 | 32 | -------------------------------------------------------------------------------- /ui/apps2/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import ElementUI from 'element-ui' 3 | import 'element-ui/lib/theme-chalk/index.css'; 4 | import i18n from '@/utils/lang'; 5 | import App from './App.vue' 6 | import router from './router' 7 | import store from './store' 8 | import './utils/filters/index' 9 | import './router/action'; 10 | import "amfe-flexible"; 11 | import VueClipboard from 'vue-clipboard2'; 12 | import VueWorker from 'vue-worker'; 13 | import './vant' 14 | 15 | import api from './api' 16 | 17 | // 复制文本插件 18 | Vue.use(VueClipboard) 19 | Vue.use(VueWorker) 20 | 21 | Vue.prototype.$api = api 22 | Vue.prototype.$errorImg = 'this.src="https://ndi.340wan.com/eos/eosio.token-eos.png"'; 23 | Vue.prototype.$defaultAccImg = 'this.src="https://cdn.jsdelivr.net/gh/defis-net/material2/farm/defaultAcc.png"'; 24 | Vue.config.productionTip = false 25 | // 国际化 - 语言 26 | Vue.use(ElementUI, { 27 | i18n: (key, value) => i18n.t(key, value) 28 | }); 29 | 30 | new Vue({ 31 | router, 32 | store, 33 | i18n, 34 | render: h => h(App), 35 | }).$mount('#app') 36 | -------------------------------------------------------------------------------- /ui/apps2/src/router/action.js: -------------------------------------------------------------------------------- 1 | import router from './index'; 2 | 3 | router.beforeEach((to, from, next) => { 4 | // console.log(to) 5 | next(); 6 | }); 7 | 8 | // 路由加载出错 9 | router.onError((error) => { 10 | const pattern = /Loading chunk /g; 11 | const isChunkLoadFailed = error.message.match(pattern); 12 | const targetPath = router.history.pending.fullPath; 13 | if (isChunkLoadFailed) { 14 | router.replace(targetPath); 15 | } 16 | }); -------------------------------------------------------------------------------- /ui/apps2/src/store/getters.js: -------------------------------------------------------------------------------- 1 | const getters = { 2 | app: state => state.app, 3 | sys: state => state.sys, 4 | config: state => state.config, 5 | mine: state => state.mine, 6 | }; 7 | 8 | export default getters; 9 | -------------------------------------------------------------------------------- /ui/apps2/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuex from 'vuex'; 3 | import app from './modules/app'; 4 | import sys from './modules/sys'; 5 | import config from './modules/config'; 6 | import mine from './modules/mine'; 7 | import getters from './getters'; 8 | 9 | Vue.use(Vuex); 10 | 11 | const store = new Vuex.Store({ 12 | modules: { 13 | app, 14 | sys, 15 | config, 16 | mine, 17 | }, 18 | getters, 19 | }); 20 | 21 | export default store; 22 | -------------------------------------------------------------------------------- /ui/apps2/src/store/modules/mine.js: -------------------------------------------------------------------------------- 1 | 2 | const mine = { 3 | state: { 4 | usdcBalForDfs: '0.0000', // usdc 下的DFS矿池挖矿余额 5 | usdcBalForUsdc: '0.0000', // usdc 下的USDC矿池挖矿余额 6 | swapDfsBal: '0.0000', // swap 内DFS余额 7 | swapUsdcBal: '0.0000', // swap 内USDC余额 8 | usdcPools: [], 9 | dfsPools: [], 10 | }, 11 | mutations: { 12 | SET_usdcBalForDfs: (state, usdcBalForDfs) => { 13 | state.usdcBalForDfs = usdcBalForDfs; 14 | }, 15 | SET_usdcBalForUsdc: (state, usdcBalForUsdc) => { 16 | state.usdcBalForUsdc = usdcBalForUsdc; 17 | }, 18 | SET_swapDfsBal: (state, swapDfsBal) => { 19 | state.swapDfsBal = swapDfsBal; 20 | }, 21 | SET_swapUsdcBal: (state, swapUsdcBal) => { 22 | state.swapUsdcBal = swapUsdcBal; 23 | }, 24 | SET_usdcPools: (state, usdcPools) => { 25 | state.usdcPools = usdcPools; 26 | }, 27 | SET_dfsPools: (state, dfsPools) => { 28 | state.dfsPools = dfsPools; 29 | }, 30 | }, 31 | actions: { 32 | setUsdcBalForDfs({ commit }, usdcBalForDfs) { 33 | commit('SET_usdcBalForDfs', usdcBalForDfs); 34 | }, 35 | setUsdcBalForUsdc({ commit }, usdcBalForUsdc) { 36 | commit('SET_usdcBalForUsdc', usdcBalForUsdc); 37 | }, 38 | setSwapDfsBal({ commit }, swapDfsBal) { 39 | commit('SET_swapDfsBal', swapDfsBal); 40 | }, 41 | setSwapUsdcBal({ commit }, swapUsdcBal) { 42 | commit('SET_swapUsdcBal', swapUsdcBal); 43 | }, 44 | setUsdcPools({ commit }, usdcPools) { 45 | commit('SET_usdcPools', usdcPools); 46 | }, 47 | setDfsPools({ commit }, dfsPools) { 48 | commit('SET_dfsPools', dfsPools); 49 | }, 50 | } 51 | }; 52 | 53 | export default mine; 54 | -------------------------------------------------------------------------------- /ui/apps2/src/utils/bus.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | 3 | const bus = new Vue(); 4 | export default bus; 5 | -------------------------------------------------------------------------------- /ui/apps2/src/utils/eos/anchor.js: -------------------------------------------------------------------------------- 1 | // The required anchor-link includes 2 | import AnchorLink from 'anchor-link' 3 | import AnchorLinkBrowserTransport from 'anchor-link-browser-transport' 4 | 5 | class AnchorClass { 6 | constructor() { 7 | this.transport = null 8 | this.link = null 9 | } 10 | init(cb) { 11 | this.transport = new AnchorLinkBrowserTransport() 12 | this.link = new AnchorLink({transport: this.transport}) 13 | cb() 14 | } 15 | async getIdentity(cb) { 16 | const identity = await this.link.login('apps.defis.network') 17 | // console.log(identity) 18 | const newId = { 19 | identity: { 20 | accounts: [{ 21 | authority: identity.account.permissions[0].perm_name, 22 | blockchain: "eos", 23 | name: identity.account.account_name 24 | }] 25 | } 26 | } 27 | cb(newId) 28 | } 29 | transaction(params) { 30 | return new Promise((resolve, reject) => { 31 | this.link.transact(params).then((res) => { 32 | // console.log(`Transaction broadcast! Transaction id: ${ res.processed.id }`) 33 | resolve(res); 34 | }, err => { 35 | reject(err) 36 | }) 37 | }) 38 | } 39 | } 40 | 41 | export const Anchor = new AnchorClass(); 42 | 43 | // Anchor.login() 44 | -------------------------------------------------------------------------------- /ui/apps2/src/utils/eos/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { ChainModel } from './eos'; 3 | 4 | function model() { 5 | return ChainModel 6 | } 7 | 8 | export var EosModel = model(); 9 | -------------------------------------------------------------------------------- /ui/apps2/src/utils/filters/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import moment from 'moment'; 3 | import numeral from 'numeral'; 4 | import { toFixed } from "@/utils/public" 5 | 6 | // 位数分割 128,373,883 7 | Vue.filter('numeralFormat', (value, p) => { 8 | let xstr = '0'; 9 | if (p) { 10 | xstr = '0.'; 11 | for (var i = 0; i < p; i++) { // eslint-disable-line 12 | xstr += '0'; // eslint-disable-line 13 | } 14 | } 15 | return numeral(value).format(`0,${xstr}`); 16 | }); 17 | 18 | // unix 时间戳、 utc Data类型 19 | Vue.filter('dateFormat', value => moment.utc(value).format('YYYY-MM-DD')); 20 | Vue.filter('dateFormatYMDF', value => moment(value).format('YYYY-MM-DD HH:mm')); 21 | Vue.filter('dateFormatAll', value => moment(value).format('YYYY-MM-DD HH:mm:ss')); 22 | Vue.filter('dateFormatMonth', value => moment.utc(value).format('MM-DD')); 23 | 24 | Vue.filter('dateFormatBIH', value => moment(value).format('YYYY-MM-DD HH:mm:ss')); 25 | Vue.filter('dateFormatBIHM', value => moment(value).format('YYYY-MM-DD HH:mm')); 26 | Vue.filter('dateFormatTimeBIH', value => moment(value).format('HH:mm:ss')); 27 | Vue.filter('dateFormatMonthHour', value => moment(value).format('MM-DD HH:mm:ss')); 28 | Vue.filter('dateFormatT', (value) => { 29 | const zone = moment().zone() / 60; // 时区 30 | return moment(value).add(0 - zone, 'hours').format('MM-DD HH:mm:ss'); 31 | }); 32 | Vue.filter('dateFormatTYear', (value) => { 33 | const zone = moment().zone() / 60; // 时区 34 | return moment(value).add(0 - zone, 'hours').format('YYYY-MM-DD HH:mm:ss'); 35 | }); 36 | 37 | // 截取小数四位数 38 | Vue.filter('numberTofixed', value => toFixed(value, 4)); 39 | 40 | // 截取 ’1.0000000 DMD‘ 这类数据为4位小数 41 | Vue.filter('numToShot', value => { 42 | const arr = value.toString().split(' '); 43 | if (!arr.length) { 44 | return 0 45 | } 46 | const numArr = arr[0].split('.'); 47 | let num = arr[0]; 48 | if (numArr.length > 1 && numArr[1].length > 4) { 49 | num = toFixed(arr[0], 4) 50 | } 51 | if (arr.length > 1) { 52 | return `${num} ${arr[1]}`; 53 | } 54 | return num; 55 | }) -------------------------------------------------------------------------------- /ui/apps2/src/utils/lang/appsLang/dfsMine.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | 'zh-CN': { 4 | dfsMine: { 5 | totalLiq: '发行量=流通量+蓄水池+矿池', 6 | supply: '总发行', 7 | liq: '总流通', 8 | price: '价格', 9 | reservoir: '蓄水池', 10 | sec: '秒', 11 | coinPool: '{coin}池子', 12 | 13 | speedRules: '流速规则', 14 | speedRules1: '每日基础发行量:3600 DFS', 15 | speedRules2: '衰减系数:每发行100万DFS,衰减25%', 16 | speedRules3: '当前衰减系数:', 17 | speedRules4: '流速计算公式:(每日基础发行量 * 衰减系数) / 86400', 18 | speedRules5_1: '当前每日发行:{supply} DFS', 19 | speedRules5: '当前流速:{speed} DFS/秒', 20 | speedRules6: 'DFS以当前流速流入以下矿池', 21 | speedRules7: 'DFS矿池:35%', 22 | speedRules8: 'EOS矿池:30%', 23 | speedRules9: 'USDT矿池:25%', 24 | speedRules10: 'DSS矿池:10%', 25 | } 26 | }, 27 | 'en': { 28 | dfsMine: { 29 | totalLiq:'Circulation = Circulation + Reservoir + Mining Pool', 30 | supply:'Total Issue', 31 | liq:'Total circulation', 32 | price:'Price', 33 | reservoir:'Reservoir', 34 | sec:'Sec', 35 | coinPool:'{coin} pool', 36 | 37 | speedRules:'Flow rate rules', 38 | speedRules1:'Daily basic circulation: 3600 DFS', 39 | speedRules2:'Attenuation coefficient: every 1 million DFS issued, attenuation 25%', 40 | speedRules3:'Current attenuation coefficient:', 41 | speedRules4:'Flow rate calculation formula: (daily basic circulation * attenuation coefficient) / 86400', 42 | speedRules5_1:'Current daily release: {supply} DFS', 43 | speedRules5:'Current flow rate: {speed} DFS/sec', 44 | speedRules6:'DFS flows into the following mining pools at the current flow rate', 45 | speedRules7:'DFS mining pool: 35%', 46 | speedRules8:'EOS mining pool: 30%', 47 | speedRules9:'USDT mining pool: 25%', 48 | speedRules10:'DSS mining pool: 10%', 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /ui/apps2/src/utils/lang/appsLang/home.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | 'zh-CN': { 4 | home: { 5 | home: '首页', 6 | community: '社区', 7 | asset: '实时数据', 8 | tvl: '流动池总量', 9 | vol: '24H兑换量', 10 | tradeNum: '24H交易人数', 11 | orderNum: '24H订单数量', 12 | homeUi: '大丰收首页全新升级!', 13 | rankUp: '涨幅榜', 14 | rankVol: '成交榜', 15 | rankApy: '年化榜', 16 | rankDeep: '深度榜', 17 | symbol: '交易对', 18 | newPrice: '最新价', 19 | rate24: '24H涨跌幅', 20 | vol24: '24H成交量', 21 | oChain: '跨链充提', 22 | oChainTip: '支持ETH、BTC', 23 | onkey: '一键充提', 24 | 25 | vote: '投票治理', 26 | mine: '挖矿奖励', 27 | financial: '理财策略', 28 | invite: '邀请好友', 29 | fundation: '乐捐一下', 30 | diary: '大丰收日记', 31 | exchange: '兑换USDT', 32 | } 33 | }, 34 | 'en': { 35 | home: { 36 | home:'Home', 37 | community:'Community', 38 | asset:'Real-time data', 39 | tvl:'TVL', 40 | vol: '24H Swap', 41 | tradeNum: '24H Users', 42 | orderNum: '24H Orders', 43 | homeUi:'Great Harvest Homepage is newly upgraded! ', 44 | rankUp:'Top Gainers', 45 | rankVol:'Vol Top', 46 | rankApy: 'Apy Top', 47 | rankDeep: 'Deep Top', 48 | symbol:'Pair', 49 | newPrice:'Price', 50 | rate24: 'Change', 51 | vol24: '24H Volume', 52 | oChain:'Cross deposit and withdrawal', 53 | oChainTip:'Support ETH, BTC', 54 | onkey:'Dep & With', 55 | 56 | vote:'Votes', 57 | mine:'Mining', 58 | financial:'Financial', 59 | invite:'Invite', 60 | fundation:'Fundation', 61 | diary:'DFS Diary', 62 | exchange: 'Get USDT', 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /ui/apps2/src/utils/lang/appsLang/my.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | 'zh-CN': { 4 | my: { 5 | noDesc: '暂时没有简介', 6 | fans: '粉丝', 7 | follows: '关注', 8 | visitors: '访客', 9 | wallet: '我的钱包', 10 | dfsAssets: 'DFS资产', 11 | unClaim: '待领取', 12 | // +++++ 13 | editInfo: '修改资料', 14 | checkBg: '选择背景', 15 | headImg: '选择头像', 16 | accName: '用户名', 17 | accAccount: 'EOS账号', 18 | sex: '性别', 19 | desc: '简介', 20 | bgImg: '背景图', 21 | save: '保存', 22 | mi: '保密', 23 | man: '男', 24 | woman: '女', 25 | searchId: '请输入用户ID', 26 | noFollow: '还没有任何关注的人', 27 | noFans: '暂时没有粉丝哦', 28 | noVist: '暂时没有历史访问哦', 29 | followed: '已关注', 30 | followed2: '互相关注', 31 | followed3: '回粉', 32 | toVist: '回访', 33 | cancelFollow: '取消关注', 34 | cancelFlTip: '您确定取消对 {owner} 的关注么?', 35 | self: '自定义', 36 | errTip1: '请输入正确图片地址', 37 | } 38 | }, 39 | 'en': { 40 | my: { 41 | noDesc:'No introduction at the moment', 42 | fans:'fans', 43 | follows:'Follow', 44 | visitors:'Visitors', 45 | wallet:'My wallet', 46 | dfsAssets:'DFS Assets', 47 | unClaim:'To be claimed', 48 | editInfo:'Modify information', 49 | checkBg:'Select background', 50 | headImg:'Select avatar', 51 | accName:'Username', 52 | accAccount:'EOS account', 53 | sex:'Sex', 54 | desc:'Introduction', 55 | bgImg:'Background image', 56 | save:'Save', 57 | mi:'Confidential', 58 | man:'Man', 59 | woman:'Woman', 60 | searchId:'Please enter the user ID', 61 | noFollow:'There is no follower yet', 62 | noFans:'No fans at the moment', 63 | noVist:'There is no historical access for the time being', 64 | followed:'Followed', 65 | followed2:'Follow each other', 66 | followed3:'Return to fans', 67 | toVist:'Revisit', 68 | cancelFollow:'Cancel follow', 69 | cancelFlTip:'Are you sure to cancel following {owner}? ', 70 | self:'Custom', 71 | errTip1:'Please enter the correct picture address', 72 | } 73 | } 74 | } -------------------------------------------------------------------------------- /ui/apps2/src/utils/lang/appsLang/sys.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | 'zh-CN': { 4 | sys: { 5 | coinPool: '{coin} 矿池', 6 | coinLpPool: '{coin} LP矿池', 7 | vote1: 'EOS 节点', 8 | vote2: 'TAG 参数', 9 | searchMarket: '搜索市场', 10 | coinSystem: '{coin} 系统', 11 | tradeNum: '交易人次', 12 | users: '人', 13 | orders: '次', 14 | dAndW: '充提ETH', 15 | nodePool: '节点矿池', 16 | paramsVote: '参数投票', 17 | traderVote: '承兑商投票', 18 | // +++++ 19 | dataAndServer: '数据与服务', 20 | tradeHis: '交易记录', 21 | marketHis: '做市记录', 22 | myOrders: '我的订单', 23 | myMarkets: '我的做市', 24 | voteAndGen: '投票与治理', 25 | coinVote: '{coin}投票', 26 | usdxSys: 'USDX系统', 27 | eosNode: 'EOS节点', 28 | apps: '应用与游戏', 29 | dcap: '跨链充提', 30 | diary: '大丰收日记', 31 | farm: '农活大厅', 32 | dataTotal: '数据总览', 33 | kline: 'K线数据', 34 | coinViews: '代币观察', 35 | fundation: '乐捐系统', 36 | helper: '大丰收助手', 37 | } 38 | }, 39 | 'en': { 40 | sys: { 41 | coinPool:'{coin} Pool', 42 | coinLpPool:'{coin} LP Pool', 43 | vote1:'EOS Node', 44 | vote2:'TAG System', 45 | searchMarket:'Search', 46 | coinSystem: '{coin} System', 47 | tradeNum: '', 48 | users: ' Users', 49 | orders: ' Orders', 50 | dAndW: 'Get ETH', 51 | nodePool:'Bp Pool', 52 | paramsVote:'System Vote', 53 | traderVote:'Acceptors Vote', 54 | // +++++ 55 | dataAndServer:'Data and Service', 56 | tradeHis:'Trade-His', 57 | marketHis:'Mk-Record', 58 | myOrders:'Orders', 59 | myMarkets:'My Market', 60 | voteAndGen:'Vote and Governance', 61 | coinVote:'{coin} vote', 62 | usdxSys:'USDX', 63 | eosNode:'EOS Node', 64 | apps:'Apps and Games', 65 | dcap:'DCAP', 66 | diary:'DFS Diary', 67 | farm:'Farming Hall', 68 | dataTotal:'Data-Over', 69 | kline:'K-Line', 70 | coinViews:'Tokens', 71 | fundation:'Fundation', 72 | helper:'Assistant', 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /ui/apps2/src/utils/lang/appsLang/sysParams.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | 'zh-CN': { 4 | sysParams: { 5 | qusTitle: 'TAG代币分发给乐捐系统的比例参数', 6 | ans: 'TAG代币的乐捐比例', 7 | votes: '{num} 票', 8 | sure: '确定投票', 9 | rules1: 'TAG为每秒释放0.01个的代币。获取方式有3种', 10 | rules2: '参加投票挖矿从乐捐系统中获得TAG', 11 | rules3: '通过做市挖矿获得TAG', 12 | rules4: '在DSS中存入TAG获得TAG', 13 | rules5: '分配给乐捐账户的比例,委托给DFS社区投票决定', 14 | rules6: '分配的LP做市挖矿的部分,等于80% - 投票选出的乐捐比例', 15 | rules7: '分配的DSS的部分固定为剩下的20%', 16 | } 17 | }, 18 | 'en': { 19 | sysParams: { 20 | qusTitle:'The proportional parameter of TAG tokens distributed to the donation system', 21 | ans:'The ratio of donations to TAG tokens', 22 | votes:'{num} votes', 23 | sure:'Vote', 24 | rules1:'TAG is 0.01 tokens released per second. There are 3 ways to get it', 25 | rules2:'Participate in voting and mining to obtain TAG from Le Donation System', 26 | rules3:'Get TAG through market making mining', 27 | rules4:'Deposit TAG in DSS to get TAG', 28 | rules5:'The proportion allocated to the donation account is entrusted to the DFS community to vote and decide', 29 | rules6:'The allocated LP market-making mining part is equal to 80%-the proportion of donations selected by voting', 30 | rules7:'The allocated DSS is fixed at the remaining 20%', 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /ui/apps2/src/utils/lang/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import VueI18n from 'vue-i18n'; 3 | import store from '@/store'; 4 | import elEnLocale from 'element-ui/lib/locale/lang/en'; 5 | import elZhLocale from 'element-ui/lib/locale/lang/zh-CN'; 6 | import enLocale from './en'; 7 | import zhLocale from './zh-CN'; 8 | 9 | // apps Language 10 | import fundation from './appsLang/fundation' 11 | import nodePools from './appsLang/nodePools' 12 | import financial from './appsLang/financial' 13 | import bpInfo from './appsLang/bpInfo' 14 | import sys from './appsLang/sys' 15 | import sysParams from './appsLang/sysParams' 16 | import pddex from './appsLang/pddex' 17 | import home from './appsLang/home' 18 | import invite from './appsLang/invite' 19 | import dfsMine from './appsLang/dfsMine' 20 | import my from './appsLang/my' 21 | 22 | Vue.use(VueI18n); 23 | 24 | const messages = { 25 | 'zh-CN': { // 中文简体包 26 | ...zhLocale, 27 | ...elZhLocale, 28 | ...fundation['zh-CN'], 29 | ...nodePools['zh-CN'], 30 | ...financial['zh-CN'], 31 | ...bpInfo['zh-CN'], 32 | ...sysParams['zh-CN'], 33 | ...pddex['zh-CN'], 34 | ...home['zh-CN'], 35 | ...invite['zh-CN'], 36 | ...dfsMine['zh-CN'], 37 | ...my['zh-CN'], 38 | ...sys['zh-CN'] 39 | }, 40 | en: { // 英文包 41 | ...enLocale, 42 | ...elEnLocale, 43 | ...fundation['en'], 44 | ...nodePools['en'], 45 | ...bpInfo['en'], 46 | ...financial['en'], 47 | ...sysParams['en'], 48 | ...pddex['en'], 49 | ...home['en'], 50 | ...invite['en'], 51 | ...dfsMine['en'], 52 | ...my['en'], 53 | ...sys['en'] 54 | }, 55 | }; 56 | const i18n = new VueI18n({ 57 | locale: store.state.app.language, // set locale 58 | messages // locale messages 59 | }); 60 | 61 | export default i18n; 62 | -------------------------------------------------------------------------------- /ui/apps2/src/utils/wallet/fullScreen.js: -------------------------------------------------------------------------------- 1 | 2 | import Tp from 'tp-eosjs'; // tokenpocket JS 3 | 4 | export function walletConnected() { 5 | if (Tp.isConnected()) { 6 | return true 7 | } 8 | return false; 9 | } 10 | 11 | export function fullScreen(type) { 12 | if (!walletConnected()) { 13 | return 14 | } 15 | Tp.fullScreen({ 16 | fullScreen: type 17 | }) 18 | } 19 | export function isTpWallet() { 20 | if (Tp.isConnected()) { 21 | return true 22 | } 23 | return false; 24 | } -------------------------------------------------------------------------------- /ui/apps2/src/vant.js: -------------------------------------------------------------------------------- 1 | 2 | import Vue from 'vue' 3 | // import { Button, Toast, Tabbar, TabbarItem, Swipe, SwipeItem, 4 | // Icon, Grid, GridItem, Tab, Tabs, Sticky, Switch, DropdownMenu, 5 | // DropdownItem, PullRefresh, List, Popup, Stepper, Field, 6 | // Slider, CellGroup, Notify, Checkbox } from 'vant'; 7 | import { List, Icon, Field, Form, Picker, Popup, Rate, Swipe, SwipeItem, 8 | NoticeBar, Popover, Calendar, Lazyload, ImagePreview, Tab, Tabs, DropdownMenu, 9 | Slider, CellGroup, Button, Stepper, DropdownItem, PullRefresh, Sticky, Progress, 10 | Pagination, Switch, Loading } from 'vant'; 11 | Vue.use(Button) 12 | // Vue.use(Toast); 13 | // Vue.use(Tabbar); 14 | // Vue.use(TabbarItem); 15 | Vue.use(Swipe); 16 | Vue.use(SwipeItem); 17 | Vue.use(Icon); 18 | // Vue.use(Grid); 19 | // Vue.use(GridItem); 20 | Vue.use(Tab); 21 | Vue.use(Tabs); 22 | Vue.use(Sticky); 23 | Vue.use(Switch); 24 | Vue.use(DropdownMenu); 25 | Vue.use(DropdownItem); 26 | Vue.use(PullRefresh); 27 | Vue.use(List); 28 | Vue.use(Popup); 29 | Vue.use(Stepper); 30 | Vue.use(Field); 31 | Vue.use(Slider); 32 | Vue.use(CellGroup); 33 | // Vue.use(Notify); 34 | // Vue.use(Checkbox); 35 | Vue.use(Form); 36 | Vue.use(Picker); 37 | Vue.use(NoticeBar); 38 | Vue.use(Popover); 39 | Vue.use(Calendar); 40 | Vue.use(Lazyload); 41 | Vue.use(ImagePreview); 42 | Vue.use(Rate); 43 | Vue.use(Progress); 44 | Vue.use(Pagination); 45 | Vue.use(Loading); 46 | -------------------------------------------------------------------------------- /ui/apps2/src/views/bpInfo/childViews/dialog/BpStory.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 35 | 36 | 67 | -------------------------------------------------------------------------------- /ui/apps2/src/views/bpInfo/childViews/dialog/ShowBpJsonErr.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 18 | 19 | 34 | -------------------------------------------------------------------------------- /ui/apps2/src/views/bpInfo/childViews/dialog/ShowContent.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 18 | 19 | 27 | -------------------------------------------------------------------------------- /ui/apps2/src/views/bpInfo/childViews/dialog/ShowEdts.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 41 | 42 | 57 | -------------------------------------------------------------------------------- /ui/apps2/src/views/coinViews/Index.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 57 | 58 | 84 | -------------------------------------------------------------------------------- /ui/apps2/src/views/dfsMine/popup/Speed.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 43 | 44 | 66 | -------------------------------------------------------------------------------- /ui/apps2/src/views/dsr/dialog/UnOpen.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | 23 | -------------------------------------------------------------------------------- /ui/apps2/src/views/dssForTag/dialog/UnOpen.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | 23 | -------------------------------------------------------------------------------- /ui/apps2/src/views/farms/comp/comp.scss: -------------------------------------------------------------------------------- 1 | .lists{ 2 | text-align: left; 3 | border-radius: 15px; 4 | padding: 30px; 5 | margin-bottom: 30px; 6 | box-shadow: 0px 10px 40px 0px rgba(220,220,220,0.5); 7 | .f1{ 8 | flex: 1; 9 | } 10 | .coinDiv{ 11 | width: 80px; 12 | margin-right: 15px; 13 | .coin{ 14 | width: 100%; 15 | } 16 | } 17 | .projectName{ 18 | font-size: 30px; 19 | font-weight: 500; 20 | margin-bottom: 10px; 21 | .claim{ 22 | font-size: 27px; 23 | font-weight: 400; 24 | } 25 | } 26 | // .about{ 27 | // padding-left: 60px; 28 | // } 29 | } 30 | .green{ 31 | color: #07D79B; 32 | } -------------------------------------------------------------------------------- /ui/apps2/src/views/financial/comp/Radical.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 53 | 54 | 66 | -------------------------------------------------------------------------------- /ui/apps2/src/views/financial/css/dialog.scss: -------------------------------------------------------------------------------- 1 | .deposit, 2 | .withdraw{ 3 | position: relative; 4 | color: #333; 5 | padding: 28px; 6 | font-size: 28px; 7 | .close{ 8 | position: absolute; 9 | top: 32px; 10 | right: 32px; 11 | width: 26px; 12 | } 13 | .title{ 14 | font-size: 40px; 15 | font-weight: 500; 16 | text-align: center; 17 | } 18 | } 19 | .content{ 20 | padding: 22px 26px; 21 | border: 1px solid rgba(220, 220, 220, .3); 22 | border-radius: 12px; 23 | margin: 44px 0; 24 | .bal{ 25 | font-size: 24px; 26 | margin-bottom: 15px; 27 | } 28 | .coinInfo{ 29 | // margin: 15px 0; 30 | .coinImg{ 31 | width: 60px; 32 | height: 60px; 33 | border-radius: 30px; 34 | margin-right: 15px; 35 | } 36 | .contract{ 37 | font-size: 22px; 38 | } 39 | } 40 | .iptDiv{ 41 | flex: 1; 42 | .ipt{ 43 | font-size: 52px; 44 | // width: 230px; 45 | padding: 0px 10px; 46 | &::after{ 47 | border: 0px; 48 | } 49 | /deep/ .van-field__control{ 50 | text-align: right; 51 | } 52 | } 53 | .max{ 54 | width: 84px; 55 | color: #29D4B0; 56 | padding: 8px 10px; 57 | border-radius: 5px; 58 | background: rgba(#29D4B0, 0.2); 59 | } 60 | } 61 | .lockTime{ 62 | margin-top: 20px; 63 | font-size: 24px; 64 | .red{ 65 | color: #FF2800; 66 | } 67 | } 68 | } 69 | .btn{ 70 | height: 96px; 71 | font-size: 36px; 72 | font-weight: 500; 73 | color: #fff; 74 | background: #29D4B0; 75 | border-radius: 50px; 76 | &.disabled{ 77 | color: #999; 78 | background: #f5f5f5; 79 | } 80 | } -------------------------------------------------------------------------------- /ui/apps2/src/views/financial/css/financial.scss: -------------------------------------------------------------------------------- 1 | .steady{ 2 | margin: 32px 36px; 3 | font-size: 28px; 4 | color: #333; 5 | .title{ 6 | .name{ 7 | margin-right: 20px; 8 | font-size: 40px; 9 | font-weight: 500; 10 | } 11 | .tip{ 12 | font-weight: normal; 13 | } 14 | } 15 | .lists{ 16 | margin: 32px 0; 17 | background: #FFF; 18 | border-radius: 8px; 19 | text-align: left; 20 | overflow: hidden; 21 | .list{ 22 | position: relative; 23 | padding: 24px 30px; 24 | } 25 | } 26 | } 27 | .coin{ 28 | .coinImg{ 29 | width: 64px; 30 | height: 64px; 31 | border-radius: 50%; 32 | margin-right: 10px; 33 | } 34 | .coinName{ 35 | font-weight: 500; 36 | font-size: 28px; 37 | color: #000; 38 | } 39 | .contract{ 40 | font-size: 22px; 41 | } 42 | .btn{ 43 | font-size: 24px; 44 | background: #29D4B0; 45 | border-radius: 30px; 46 | height: 60px; 47 | padding: 0 36px; 48 | color: #fff; 49 | } 50 | } 51 | .info{ 52 | margin-top: 26px; 53 | .percent{ 54 | flex: 2; 55 | .apy{ 56 | line-height: 44px; 57 | font-size: 44px; 58 | color: #E62C3B; 59 | margin-bottom: 8px; 60 | } 61 | } 62 | .dataInfo{ 63 | flex: 3; 64 | .time{ 65 | line-height: 44px; 66 | font-size: 32px; 67 | margin-bottom: 8px; 68 | } 69 | } 70 | .tip{ 71 | font-size: 24px; 72 | } 73 | } -------------------------------------------------------------------------------- /ui/apps2/src/views/financial/dialog/RewardTip.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 18 | 19 | 35 | -------------------------------------------------------------------------------- /ui/apps2/src/views/financial/dialog/Rules.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | 18 | 29 | -------------------------------------------------------------------------------- /ui/apps2/src/views/financial/js/financial.js: -------------------------------------------------------------------------------- 1 | import {get_table_rows} from '@/api/list' 2 | 3 | export async function gat_apys(cb) { 4 | const params = { 5 | "code":"yfcpayoutone", 6 | "scope":"yfcpayoutone", 7 | "table":"args", 8 | "json":true, 9 | } 10 | const {status, result} = await get_table_rows(params) 11 | if (!status) { 12 | cb({}) 13 | return 14 | } 15 | const rows = result.rows || []; 16 | if (!rows.length) { 17 | cb({}) 18 | return 19 | } 20 | const apy = (Math.pow(rows[0].aprs, 365 * 86400) - 1) * 100; 21 | rows[0].apy = apy.toFixed(2) 22 | cb(rows[0]) 23 | return 24 | } -------------------------------------------------------------------------------- /ui/apps2/src/views/fundation/comp/FunVideo.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 32 | 33 | -------------------------------------------------------------------------------- /ui/apps2/src/views/home/comp/Banner.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 42 | 43 | 54 | -------------------------------------------------------------------------------- /ui/apps2/src/views/index/Index.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 49 | 50 | 75 | -------------------------------------------------------------------------------- /ui/apps2/src/views/index/components/CreateTip.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 26 | 27 | 53 | -------------------------------------------------------------------------------- /ui/apps2/src/views/index/components/Order.vue: -------------------------------------------------------------------------------- 1 | 34 | 35 | 40 | 41 | 70 | -------------------------------------------------------------------------------- /ui/apps2/src/views/invite/comp/Intro.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 17 | 18 | 29 | -------------------------------------------------------------------------------- /ui/apps2/src/views/invite/dialog/ClaimTip.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 27 | 28 | 55 | -------------------------------------------------------------------------------- /ui/apps2/src/views/invite/dialog/CreateTip.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 27 | 28 | 55 | -------------------------------------------------------------------------------- /ui/apps2/src/views/invite/dialog/FarmsData.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 32 | 33 | 60 | -------------------------------------------------------------------------------- /ui/apps2/src/views/invite/dialog/SignTip.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 24 | 25 | 52 | -------------------------------------------------------------------------------- /ui/apps2/src/views/konami/Index.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 70 | 71 | 88 | -------------------------------------------------------------------------------- /ui/apps2/src/views/konami/dialog/Msg.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 32 | 33 | 40 | -------------------------------------------------------------------------------- /ui/apps2/src/views/konami/dialog/Version.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 16 | 17 | 28 | -------------------------------------------------------------------------------- /ui/apps2/src/views/loan/Index.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | 19 | 22 | -------------------------------------------------------------------------------- /ui/apps2/src/views/loan/comp/TopInfo.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | 15 | 23 | -------------------------------------------------------------------------------- /ui/apps2/src/views/market/popup/AboutMarket.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /ui/apps2/src/views/market/popup/MarketTip.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 19 | 20 | 42 | -------------------------------------------------------------------------------- /ui/apps2/src/views/market/popup/MinReward.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 25 | 26 | 40 | -------------------------------------------------------------------------------- /ui/apps2/src/views/market/popup/RankTip.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 15 | 16 | 28 | -------------------------------------------------------------------------------- /ui/apps2/src/views/my/Index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /ui/apps2/src/views/my/dialog/ProTip.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 20 | -------------------------------------------------------------------------------- /ui/apps2/src/views/nodePools/dialog/ClaimRules.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 18 | 19 | 36 | -------------------------------------------------------------------------------- /ui/apps2/src/views/nodePools/dialog/MineRules.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 42 | 43 | 68 | -------------------------------------------------------------------------------- /ui/apps2/src/views/nodePools/dialog/RexLock.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 30 | 31 | -------------------------------------------------------------------------------- /ui/apps2/src/views/nodePools/dialog/TipClaim.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 22 | 23 | 56 | -------------------------------------------------------------------------------- /ui/apps2/src/views/otherInfo/Index.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 30 | 31 | 34 | -------------------------------------------------------------------------------- /ui/apps2/src/views/swappage/dialog/OgxSwapTip.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | 18 | -------------------------------------------------------------------------------- /ui/apps2/src/views/swappage/js/ogx.js: -------------------------------------------------------------------------------- 1 | import {get_table_rows} from '@/api/list'; 2 | import {toFixed, toLocalTime} from '@/utils/public' 3 | // 获取可获得多少 4 | export function ogx_get_num(tab, data) { 5 | if (!tab.length) { 6 | return {} 7 | } 8 | // aboutPrice: "60.643543" 9 | // aboutPriceSym0: "0.0164898014" 10 | // getNum: "0.01644036" 11 | // minOut: "0.01627594" 12 | // payNum: "1" 13 | // price: 0.016489821327133794 14 | // priceRate: "0.00" 15 | // thisCoinsPath: "eosio.token:EOS-tagtokenmain:TAG" 16 | // thisMidsPath: "602" 17 | // type: "pay" 18 | const sym0 = data.sym0; 19 | const sym1 = data.sym1; 20 | const tab0 = tab.find(v => v.symbol === sym0) 21 | const tab1 = tab.find(v => v.symbol === sym1) 22 | const price = tab0.rate / tab1.rate; 23 | // const payNum = data.payNum; 24 | // const getNum = payNum * price; 25 | const backData = { 26 | aboutPrice: toFixed(tab1.rate / tab0.rate, 10), 27 | aboutPriceSym0: toFixed(price, 8), 28 | price, 29 | priceRate: "0.00", 30 | type: data.type, 31 | } 32 | if (data.type === 'pay') { 33 | const payNum = data.payNum; 34 | const getNum = toFixed(payNum * price, 8); 35 | backData.payNum = payNum; 36 | backData.getNum = getNum; 37 | backData.minOut = getNum; 38 | } else { 39 | const getNum = data.getNum; 40 | const payNum = toFixed(getNum / price, 8); 41 | backData.payNum = payNum; 42 | backData.getNum = getNum; 43 | backData.minOut = getNum; 44 | } 45 | return backData; 46 | } 47 | 48 | // 获取ogx价格列表 49 | export async function ogx_get_prices_table(cb) { 50 | const params = { 51 | code: "core.ogx", 52 | json: true, 53 | limit: -1, 54 | scope: "core.ogx", 55 | table: "currrundrate", 56 | } 57 | const {status, result} = await get_table_rows(params); 58 | if (!status) { 59 | return 60 | } 61 | const rows = result.rows || []; 62 | rows.forEach(v => { 63 | const arr = v.sym.split(',') 64 | v.decimal = arr[0] 65 | v.symbol = arr[1] 66 | const time = toLocalTime(v.timestamp * 1000) 67 | v.time = time; 68 | }); 69 | cb(rows) 70 | } -------------------------------------------------------------------------------- /ui/apps2/src/views/voteHome/nodeVote/dialog/Rules.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 40 | 41 | 61 | -------------------------------------------------------------------------------- /ui/apps2/src/views/voteHome/sysParams/dialog/ParamsTip.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 23 | 57 | -------------------------------------------------------------------------------- /ui/apps2/src/views/voteHome/vote/dialog/Rules.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 40 | 41 | 61 | -------------------------------------------------------------------------------- /ui/apps2/src/views/voteHome/voteForTag/dialog/Rules.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 41 | 42 | 62 | -------------------------------------------------------------------------------- /ui/info/README.md: -------------------------------------------------------------------------------- 1 | # jin-network 2 | JIN Network front end. 3 | 4 | ## Project setup 5 | ``` 6 | npm install 7 | ``` 8 | 9 | ### Compiles and hot-reloads for development 10 | ``` 11 | npm run serve 12 | ``` 13 | 14 | ### Compiles and minifies for production 15 | ``` 16 | npm run build 17 | ``` 18 | 19 | ### Lints and fixes files 20 | ``` 21 | npm run lint 22 | ``` 23 | 24 | ### Customize configuration 25 | See [Configuration Reference](https://cli.vuejs.org/config/). 26 | -------------------------------------------------------------------------------- /ui/info/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /ui/info/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jin-network", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "@scatterjs/core": "^2.7.44", 12 | "@scatterjs/eosjs2": "^1.5.26", 13 | "amfe-flexible": "^2.2.1", 14 | "axios": "^0.19.0", 15 | "core-js": "^3.6.4", 16 | "decimal.js": "^10.0.1", 17 | "echarts": "^4.8.0", 18 | "element-ui": "^2.13.0", 19 | "eosjs-ecc": "^4.0.7", 20 | "eosjs-without-sort": "^16.0.11", 21 | "moment": "^2.24.0", 22 | "numeral": "^2.0.6", 23 | "scatterjs-core": "^2.7.7", 24 | "scatterjs-plugin-eosjs": "^1.5.0", 25 | "vue": "^2.6.11", 26 | "vue-i18n": "^7.8.1", 27 | "vue-router": "^3.1.3", 28 | "vuex": "^3.1.2" 29 | }, 30 | "devDependencies": { 31 | "@vue/cli-plugin-babel": "~4.3.0", 32 | "@vue/cli-plugin-eslint": "~4.3.0", 33 | "@vue/cli-service": "~4.3.0", 34 | "babel-eslint": "^10.1.0", 35 | "eslint": "^6.7.2", 36 | "eslint-plugin-vue": "^6.2.2", 37 | "vue-template-compiler": "^2.6.11", 38 | "mockjs": "^1.1.0", 39 | "node-sass": "^4.12.0", 40 | "postcss-pxtorem": "^4.0.1", 41 | "sass-loader": "^8.0.0" 42 | }, 43 | "eslintConfig": { 44 | "root": true, 45 | "env": { 46 | "node": true 47 | }, 48 | "extends": [ 49 | "plugin:vue/essential", 50 | "eslint:recommended" 51 | ], 52 | "parserOptions": { 53 | "parser": "babel-eslint" 54 | }, 55 | "rules": {} 56 | }, 57 | "browserslist": [ 58 | "> 1%", 59 | "last 2 versions", 60 | "not dead" 61 | ] 62 | } 63 | -------------------------------------------------------------------------------- /ui/info/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | autoprefixer: { 4 | overrideBrowserslist: ["Android >= 4.0", "iOS >= 7"] 5 | }, 6 | "postcss-pxtorem": { 7 | rootValue: 75, 8 | propList: ["*"], 9 | // selectorBlackList: ["#app"], 10 | minPixelValue: 1.0001 //忽略 1px转rem 11 | } 12 | } 13 | }; -------------------------------------------------------------------------------- /ui/info/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/info/public/favicon.png -------------------------------------------------------------------------------- /ui/info/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | DeFis-Network 11 | 18 | 19 | 20 | 23 |
24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ui/info/src/assets/css/animal.scss: -------------------------------------------------------------------------------- 1 | @keyframes drawer{ 2 | from { 3 | transform: translateY(-100%); 4 | } 5 | to { 6 | transform: translateY(0%); 7 | } 8 | } 9 | 10 | @-moz-keyframes drawer /* Firefox */ 11 | { 12 | from { 13 | transform: translateY(-100%); 14 | } 15 | to { 16 | transform: translateY(0%); 17 | } 18 | } 19 | 20 | @-webkit-keyframes drawer /* Safari 和 Chrome */ 21 | { 22 | from { 23 | transform: translateY(-100%); 24 | } 25 | to { 26 | transform: translateY(0%); 27 | } 28 | } 29 | 30 | @-o-keyframes drawer /* Opera */ 31 | { 32 | from { 33 | transform: translateY(-100%); 34 | } 35 | to { 36 | transform: translateY(0%); 37 | } 38 | } -------------------------------------------------------------------------------- /ui/info/src/assets/css/color.scss: -------------------------------------------------------------------------------- 1 | // color css 2 | 3 | $color-main: #0bd79a; 4 | $color-aux: #01c798; 5 | $color-black: #000; 6 | $color-bgcolor: #fff; 7 | $color-border: #f3f3f3; 8 | $color-shadow: #e0e0e0; 9 | $color-tip: #a6a6a6; 10 | 11 | .tip{ 12 | color: $color-tip; 13 | } 14 | .svgIcon{ 15 | display: block; 16 | } 17 | 18 | .flex{ 19 | display: flex; 20 | } 21 | .flexc{ 22 | display: flex; 23 | align-items: center; 24 | justify-content: center; 25 | } 26 | .flexb{ 27 | display: flex; 28 | align-items: center; 29 | justify-content: space-between; 30 | } 31 | .flexa{ 32 | display: flex; 33 | align-items: center; 34 | } -------------------------------------------------------------------------------- /ui/info/src/assets/img/dex/enter_solid_default.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | enter_solid_default 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/dex/enter_solid_down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | enter_solid_down 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/dex/enter_solid_up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | enter_solid_up 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/dex/menu_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | menu_icon 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/dex/price_switch_icon_btn_left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | price_switch_icon_btn_left 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/dex/price_switch_icon_btn_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | price_switch_icon_btn_right 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/dex/price_switch_icon_green_left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | price_switch_icon_green_left 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/dex/price_switch_icon_green_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | price_switch_icon_green_right 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/dex/setup_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | setup_icon 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/dex/tip.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/dex/tips_icon_btn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | tips_icon_btn 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/dialog/sd_icon_btn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | sd_icon_btn 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/eosio.token-eos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/info/src/assets/img/eosio.token-eos.png -------------------------------------------------------------------------------- /ui/info/src/assets/img/footer/peckshield.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/info/src/assets/img/footer/peckshield.jpeg -------------------------------------------------------------------------------- /ui/info/src/assets/img/loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/info/src/assets/img/loading.png -------------------------------------------------------------------------------- /ui/info/src/assets/img/market/pow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/info/src/assets/img/market/pow.jpg -------------------------------------------------------------------------------- /ui/info/src/assets/img/market/pow.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/market/switch_add.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | switch_add 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/poolspage/buff.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | accelerate_icon 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/poolspage/buff1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ui/info/src/assets/img/poolspage/buff2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ui/info/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import ElementUI from 'element-ui' 3 | import 'element-ui/lib/theme-chalk/index.css'; 4 | import i18n from '@/utils/lang'; 5 | import App from './App.vue' 6 | import router from './router' 7 | import store from './store' 8 | import './utils/filters/index' 9 | import "amfe-flexible"; 10 | 11 | Vue.config.productionTip = false 12 | // 国际化 - 语言 13 | Vue.use(ElementUI, { 14 | i18n: (key, value) => i18n.t(key, value) 15 | }); 16 | 17 | new Vue({ 18 | router, 19 | store, 20 | i18n, 21 | render: h => h(App), 22 | }).$mount('#app') 23 | -------------------------------------------------------------------------------- /ui/info/src/router/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import Vue from 'vue'; 3 | import Router from 'vue-router'; 4 | import Layout from '@/views/layout/Index'; 5 | 6 | Vue.use(Router); 7 | 8 | /** 9 | * @for meta 10 | * @param title 标题 11 | * @param icon 图标 12 | * @param name 用来匹配路由名称 13 | */ 14 | 15 | const constantRouter = [ 16 | // 首页 17 | { 18 | path: '/', 19 | redirect: '/', 20 | component: Layout, 21 | meta: { title: 'DeFis-BP' }, 22 | children: [ 23 | { 24 | path: '/', 25 | name: 'index', 26 | // component: () => import('@/views/index/Index'), 27 | component: () => import(/* webpackChunkName: "nopage" */ '@/views/index/Index.vue'), 28 | meta: { title: 'DeFis-BP' }, 29 | }, 30 | // { 31 | // path: '/index-mobile', 32 | // name: 'indexMobile', 33 | // // component: () => import('@/views/index/Index'), 34 | // component: () => import(/* webpackChunkName: "nopage" */ '@/views/index/IndexMobile.vue'), 35 | // meta: { title: 'DeFis-BP' }, 36 | // }, 37 | ] 38 | }, 39 | // 404 40 | { 41 | path: '*', 42 | name: 'nopage', 43 | component: () => import(/* webpackChunkName: "nopage" */ '@/views/error-page/404.vue'), 44 | meta: { title: '404 - stable' }, 45 | }, 46 | ] 47 | 48 | export default new Router({ 49 | base: '/', 50 | mode: 'history', 51 | routes: constantRouter, 52 | scrollBehavior (to, from, savedPosition) { 53 | return { x: 0, y: 0 } 54 | } 55 | }); 56 | -------------------------------------------------------------------------------- /ui/info/src/store/getters.js: -------------------------------------------------------------------------------- 1 | const getters = { 2 | app: state => state.app, 3 | sys: state => state.sys, 4 | }; 5 | 6 | export default getters; 7 | -------------------------------------------------------------------------------- /ui/info/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuex from 'vuex'; 3 | import app from './modules/app'; 4 | import sys from './modules/sys'; 5 | import getters from './getters'; 6 | 7 | Vue.use(Vuex); 8 | 9 | const store = new Vuex.Store({ 10 | modules: { 11 | app, 12 | sys, 13 | }, 14 | getters, 15 | }); 16 | 17 | export default store; 18 | -------------------------------------------------------------------------------- /ui/info/src/store/modules/app.js: -------------------------------------------------------------------------------- 1 | /* 2 | * vuex 全站存储 3 | * get: this.$store.state.模块.state 4 | * 如: this.$store.state.app.language 5 | * set: this.$store.dispatch(actions, value) 6 | * 如: this.$store.dispatch('setLanguage', 'en'); 7 | */ 8 | 9 | const app = { 10 | state: { 11 | // 多语言 12 | language: localStorage.getItem('language') || 'en', 13 | // 主题 默认白天 14 | theme: localStorage.getItem('theme') || 'theme-278EDA', 15 | minScreen: false, 16 | }, 17 | mutations: { 18 | SET_LANGUAGE: (state, language) => { 19 | state.language = language; 20 | localStorage.setItem('language', language); 21 | }, 22 | SET_THEME: (state, theme) => { 23 | state.theme = theme; 24 | localStorage.setItem('theme', theme); 25 | }, 26 | SET_MINSCREEN: (state, minScreen) => { 27 | state.minScreen = minScreen; 28 | }, 29 | }, 30 | actions: { 31 | setLanguage({ commit }, language) { 32 | commit('SET_LANGUAGE', language); 33 | }, 34 | setTheme({ commit }, theme) { 35 | commit('SET_THEME', theme); 36 | }, 37 | setMinScreen({ commit }, minScreen) { 38 | commit('SET_MINSCREEN', minScreen); 39 | }, 40 | } 41 | }; 42 | 43 | export default app; 44 | -------------------------------------------------------------------------------- /ui/info/src/store/modules/sys.js: -------------------------------------------------------------------------------- 1 | // 系统性状态存储 2 | const sys = { 3 | state: { 4 | }, 5 | mutations: { 6 | }, 7 | actions: { 8 | } 9 | }; 10 | 11 | export default sys; 12 | -------------------------------------------------------------------------------- /ui/info/src/utils/eos/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { ChainModel } from './eos'; 3 | 4 | function model() { 5 | return ChainModel 6 | } 7 | 8 | export var EosModel = model(); 9 | -------------------------------------------------------------------------------- /ui/info/src/utils/filters/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import moment from 'moment'; 3 | import numeral from 'numeral'; 4 | import { toFixed, accSub, accMul } from "@/utils/public" 5 | import store from '@/store' 6 | 7 | // 位数分割 128,373,883 8 | Vue.filter('numeralFormat', (value, p) => { 9 | let xstr = '0'; 10 | if (p) { 11 | xstr = '0.'; 12 | for (var i = 0; i < p; i++) { // eslint-disable-line 13 | xstr += '0'; // eslint-disable-line 14 | } 15 | } 16 | return numeral(value).format(`0,${xstr}`); 17 | }); 18 | 19 | // unix 时间戳、 utc Data类型 20 | Vue.filter('dateFormat', value => moment.utc(value).format('YYYY-MM-DD')); 21 | Vue.filter('dateFormatYMDF', value => moment(value).format('YYYY-MM-DD HH:mm')); 22 | Vue.filter('dateFormatAll', value => moment(value).format('YYYY-MM-DD HH:mm:ss')); 23 | Vue.filter('dateFormatMonth', value => moment.utc(value).format('MM-DD')); 24 | 25 | Vue.filter('dateFormatBIH', value => moment(value).format('YYYY-MM-DD HH:mm:ss')); 26 | Vue.filter('dateFormatBIHM', value => moment(value).format('YYYY-MM-DD HH:mm')); 27 | Vue.filter('dateFormatTimeBIH', value => moment(value).format('HH:mm:ss')); 28 | Vue.filter('dateFormatMonthHour', value => moment(value).format('MM-DD HH:mm:ss')); 29 | Vue.filter('dateFormatT', (value) => { 30 | const zone = moment().zone() / 60; // 时区 31 | return moment(value).add(0 - zone, 'hours').format('MM-DD HH:mm:ss'); 32 | }); 33 | Vue.filter('dateFormatTYear', (value) => { 34 | const zone = moment().zone() / 60; // 时区 35 | return moment(value).add(0 - zone, 'hours').format('YYYY-MM-DD HH:mm:ss'); 36 | }); 37 | 38 | // 截取小数四位数 39 | Vue.filter('numberTofixed', value => toFixed(value, 4)); 40 | 41 | // 英文下显示折扣按照百分比 42 | Vue.filter('englishPercent', value => { 43 | if (store.state.app.language === 'en' || store.state.app.language === 'ko') { 44 | const data = accSub(10, Number(value)); 45 | return `${accMul(data, 10)}%` 46 | } 47 | return value 48 | }) 49 | -------------------------------------------------------------------------------- /ui/info/src/utils/lang/en.js: -------------------------------------------------------------------------------- 1 | export default { 2 | public: { 3 | }, 4 | nav: { 5 | vision: 'Visions', 6 | dfs: 'DFS', 7 | project: 'Projects', 8 | faq: 'FAQ', 9 | partners: 'Partners', 10 | team: 'TEAM', 11 | report: 'Audit Report', 12 | slowMist: 'Slow Mist', 13 | peckshield: 'Peckshield', 14 | }, 15 | index: { 16 | title1_1: 'An open finance network ', 17 | title1_2: 'that integrates a series of DeFi protocols ', 18 | btn_1: 'Launch App ', 19 | title2_1: 'Let users from every corner of the world', 20 | title2_2: 'enjoy safe and equal financial services', 21 | cont2: 'Traditional financial infrastructures are isolated and fragmented from each other due to cultural differences and geographical restrictions governed by sovereignty. An open financial network based on blockchain technology will bring revolutionary changes to traditional financial infrastructure. This network can break down international financial barriers, collect global liquidity, create network effects, and create currency and financial programmability on a global scale.', 22 | link2: 'Read the whitepaper', 23 | title3_1: 'DFS token', 24 | title3_2: 'Used for trading, community governance, liquidity incentives, dividends of protocol fees revenues, staking, issuing and generating assets, etc.', 25 | cont3: 'By integrating a series of DeFi protocols, DeFis Network will create a powerful network effect in decentralized finance field in the future. The platform coin DFS will continue to capture the value generated by these DeFi protocols. DFS holders will continue to receive dividends from protocol fees. Through smart contracts, dividends are automatically executed, so that each holder can share the dividends of DeFis Network development fairly.', 26 | status1: 'Listed', 27 | status2: 'Coming soon', 28 | } 29 | } -------------------------------------------------------------------------------- /ui/info/src/utils/lang/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import VueI18n from 'vue-i18n'; 3 | import store from '@/store'; 4 | import elEnLocale from 'element-ui/lib/locale/lang/en'; 5 | import elZhLocale from 'element-ui/lib/locale/lang/zh-CN'; 6 | import enLocale from './en'; 7 | import zhLocale from './zh-CN'; 8 | 9 | Vue.use(VueI18n); 10 | 11 | const messages = { 12 | 'zh-CN': { // 中文简体包 13 | ...zhLocale, 14 | ...elZhLocale 15 | }, 16 | en: { // 英文包 17 | ...enLocale, 18 | ...elEnLocale 19 | }, 20 | }; 21 | const i18n = new VueI18n({ 22 | locale: store.state.app.language, // set locale 23 | messages // locale messages 24 | }); 25 | 26 | export default i18n; 27 | -------------------------------------------------------------------------------- /ui/info/src/utils/lang/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | public: { 3 | }, 4 | nav: { 5 | vision: '项目愿景', 6 | dfs: 'DFS代币', 7 | project: '项目进度', 8 | faq: '常见问题', 9 | partners: '合作伙伴', 10 | team: '团队成员', 11 | report: '审计报告', 12 | slowMist: '慢雾审计报告', 13 | peckshield: '派盾审计报告', 14 | }, 15 | index: { 16 | title1_1: '一个整合了一系列', 17 | title1_2: 'DeFi协议的区块链开放金融网络', 18 | btn_1: '立即体验', 19 | title2_1: '让全世界每个角落的人', 20 | title2_2: '都能享受到安全、平等的金融服务', 21 | cont2: '传统的金融基础设施由于受到文化差异和主权管辖的地域限制,彼此是互相孤立、碎片化的。而基于区块链技术的开放金融网络,将为传统金融基础设施带来革命性的改变。这个网络可以打破国际金融壁垒,汇集全球流动性,创造出网络效应,在全球范围内开创货币和金融的可编程性。', 22 | link2: '阅读白皮书', 23 | title3_1: 'DFS代币', 24 | title3_2: '用于交易、社区治理、流动性激励、协议费分红、抵押发行合成资产等', 25 | cont3: '通过整合一系列DeFi协议,DeFis Network未来在区块链金融领域将形成强大的网络效应。而平台币DFS将会持续捕获这些DeFi协议产生的价值。DFS持有者将持续获得协议费的分红。通过智能合约自动执行分红,让每个持有者,都能公平分享到DeFis Network发展的红利。', 26 | status1: '已上线', 27 | status2: '敬请期待', 28 | } 29 | } -------------------------------------------------------------------------------- /ui/info/src/views/index/Index.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 44 | 45 | 47 | -------------------------------------------------------------------------------- /ui/info/src/views/layout/Index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 28 | 29 | -------------------------------------------------------------------------------- /ui/info/vue.config.js: -------------------------------------------------------------------------------- 1 | // vue.config.js 2 | module.exports = { 3 | // 配置项 4 | publicPath: process.env.NODE_ENV === 'production' ? '/' : '/', // 资源文件目录 5 | // 开启esLint 6 | lintOnSave: process.env.NODE_ENV !== 'production', 7 | // 开发服务配置 8 | devServer: { 9 | open: true, 10 | port: 8888, 11 | proxy: { // 代理控制 12 | '/api': { 13 | target: `http://192.168.8.253:8080`, 14 | ws: false, 15 | changeOrigin: true 16 | }, 17 | } 18 | }, 19 | css: { // 样式相关配置 20 | extract: false, // 将组件内的 CSS 提取到一个单独的 CSS 文件 (只用在生产环境中) 21 | requireModuleExtension: true, // 去掉文件名中的 .module 22 | sourceMap: false, 23 | loaderOptions: { 24 | sass: { 25 | prependData: `@import "~@/assets/css/color.scss";` 26 | } 27 | } 28 | }, 29 | // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录。 30 | assetsDir: 'static', 31 | chainWebpack: config => { 32 | // 移除 prefetch 插件 33 | config.plugins.delete('prefetch') 34 | }, 35 | // 将构建好的文件输出到位置 36 | outputDir: 'dist', 37 | // 是否为生产环境构建生成 source map? 38 | productionSourceMap: process.env.NODE_ENV !== 'production', 39 | 40 | // 三方插件的选项 41 | pluginOptions: { 42 | // ... 43 | }, 44 | } -------------------------------------------------------------------------------- /ui/landing/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .well-known/ 3 | node_modules/ 4 | dist/ 5 | npm-debug.log* 6 | yarn-debug.log* 7 | yarn-error.log* 8 | package-lock.json* 9 | 10 | # Editor directories and files 11 | .idea 12 | .vscode 13 | *.suo 14 | *.ntvs* 15 | *.njsproj 16 | *.sln 17 | *.project 18 | *.sw? 19 | release*.sh 20 | *bp.json 21 | -------------------------------------------------------------------------------- /ui/landing/README.md: -------------------------------------------------------------------------------- 1 | # jin-network 2 | JIN Network front end. 3 | 4 | ## Project setup 5 | ``` 6 | npm install 7 | ``` 8 | 9 | ### Compiles and hot-reloads for development 10 | ``` 11 | npm run serve 12 | ``` 13 | 14 | ### Compiles and minifies for production 15 | ``` 16 | npm run build 17 | ``` 18 | 19 | ### Lints and fixes files 20 | ``` 21 | npm run lint 22 | ``` 23 | 24 | ### Customize configuration 25 | See [Configuration Reference](https://cli.vuejs.org/config/). 26 | -------------------------------------------------------------------------------- /ui/landing/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /ui/landing/chains.json: -------------------------------------------------------------------------------- 1 | { 2 | "chains": { 3 | "aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906": "/bp.json" 4 | } 5 | } -------------------------------------------------------------------------------- /ui/landing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jin-network", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "@scatterjs/core": "^2.7.44", 12 | "@scatterjs/eosjs2": "^1.5.26", 13 | "amfe-flexible": "^2.2.1", 14 | "axios": "^0.19.0", 15 | "core-js": "^3.6.4", 16 | "decimal.js": "^10.0.1", 17 | "element-ui": "^2.13.0", 18 | "eosjs-ecc": "^4.0.7", 19 | "eosjs-without-sort": "^16.0.11", 20 | "moment": "^2.24.0", 21 | "numeral": "^2.0.6", 22 | "scatterjs-core": "^2.7.7", 23 | "scatterjs-plugin-eosjs": "^1.5.0", 24 | "vue": "^2.6.11", 25 | "vue-i18n": "^7.8.1", 26 | "vue-router": "^3.1.3", 27 | "vuex": "^3.1.2" 28 | }, 29 | "devDependencies": { 30 | "@vue/cli-plugin-babel": "~4.3.0", 31 | "@vue/cli-plugin-eslint": "~4.3.0", 32 | "@vue/cli-service": "~4.3.0", 33 | "babel-eslint": "^10.1.0", 34 | "eslint": "^6.7.2", 35 | "eslint-plugin-vue": "^6.2.2", 36 | "vue-template-compiler": "^2.6.11", 37 | "mockjs": "^1.1.0", 38 | "node-sass": "^4.12.0", 39 | "postcss-pxtorem": "^4.0.1", 40 | "sass-loader": "^8.0.0" 41 | }, 42 | "eslintConfig": { 43 | "root": true, 44 | "env": { 45 | "node": true 46 | }, 47 | "extends": [ 48 | "plugin:vue/essential", 49 | "eslint:recommended" 50 | ], 51 | "parserOptions": { 52 | "parser": "babel-eslint" 53 | }, 54 | "rules": {} 55 | }, 56 | "browserslist": [ 57 | "> 1%", 58 | "last 2 versions", 59 | "not dead" 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /ui/landing/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | autoprefixer: { 4 | overrideBrowserslist: ["Android >= 4.0", "iOS >= 7"] 5 | }, 6 | "postcss-pxtorem": { 7 | rootValue: 75, 8 | propList: ["*"], 9 | // selectorBlackList: ["#app"], 10 | minPixelValue: 1.0001 //忽略 1px转rem 11 | } 12 | } 13 | }; -------------------------------------------------------------------------------- /ui/landing/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/public/favicon.png -------------------------------------------------------------------------------- /ui/landing/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | DeFis-Network 11 | 18 | 19 | 20 | 23 |
24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ui/landing/src/assets/files/DeFis-Network-Whitepaper.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/files/DeFis-Network-Whitepaper.pdf -------------------------------------------------------------------------------- /ui/landing/src/assets/img/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/1.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/2.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/3.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/4.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/5.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/6.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/7.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/LEND.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/LEND.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/bank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/bank.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/defis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/defis.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/more.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/partners/bitpie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/partners/bitpie.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/partners/hoov3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/partners/hoov3.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/partners/meetone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/partners/meetone.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/partners/mykey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/partners/mykey.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/partners/newdex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/partners/newdex.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/partners/peckshield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/partners/peckshield.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/partners/slowmist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/partners/slowmist.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/partners/tp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/partners/tp.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/record/peckshield.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/record/peckshield.jpeg -------------------------------------------------------------------------------- /ui/landing/src/assets/img/swap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/swap.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/synthetix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/synthetix.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/discord.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/github.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | github 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/team1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/team/team1.jpeg -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/team10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/team/team10.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/team11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/team/team11.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/team12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/team/team12.png -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/team2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/team/team2.jpeg -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/team3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/team/team3.jpeg -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/team4.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/team/team4.jpeg -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/team5.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/team/team5.jpeg -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/team6.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/team/team6.jpeg -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/team7.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/team/team7.jpeg -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/team7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/team/team7.jpg -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/team8.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/team/team8.jpeg -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/team9.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/team/team9.jpeg -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/telegram.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | telegram 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/wechat.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ui/landing/src/assets/img/team/wechatqr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/img/team/wechatqr.jpg -------------------------------------------------------------------------------- /ui/landing/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DFSNetwork/defis-network/05e58ded397fe16aa0a416fba9398618122adc63/ui/landing/src/assets/logo.png -------------------------------------------------------------------------------- /ui/landing/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import ElementUI from 'element-ui' 3 | import 'element-ui/lib/theme-chalk/index.css'; 4 | import i18n from '@/utils/lang'; 5 | import App from './App.vue' 6 | import router from './router' 7 | import store from './store' 8 | import './utils/filters/index' 9 | import "amfe-flexible"; 10 | 11 | Vue.config.productionTip = false 12 | // 国际化 - 语言 13 | Vue.use(ElementUI, { 14 | i18n: (key, value) => i18n.t(key, value) 15 | }); 16 | 17 | new Vue({ 18 | router, 19 | store, 20 | i18n, 21 | render: h => h(App), 22 | }).$mount('#app') 23 | -------------------------------------------------------------------------------- /ui/landing/src/router/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import Vue from 'vue'; 3 | import Router from 'vue-router'; 4 | import Layout from '@/views/layout/Index'; 5 | 6 | Vue.use(Router); 7 | 8 | /** 9 | * @for meta 10 | * @param title 标题 11 | * @param icon 图标 12 | * @param name 用来匹配路由名称 13 | */ 14 | 15 | const constantRouter = [ 16 | // 首页 17 | { 18 | path: '/', 19 | redirect: '/', 20 | component: Layout, 21 | meta: { title: 'DeFis-BP' }, 22 | children: [ 23 | { 24 | path: '/', 25 | name: 'index', 26 | // component: () => import('@/views/index/Index'), 27 | component: () => import(/* webpackChunkName: "nopage" */ '@/views/index/Index.vue'), 28 | meta: { title: 'DeFis-BP' }, 29 | }, 30 | { 31 | path: '/index-mobile', 32 | name: 'indexMobile', 33 | // component: () => import('@/views/index/Index'), 34 | component: () => import(/* webpackChunkName: "nopage" */ '@/views/index/IndexMobile.vue'), 35 | meta: { title: 'DeFis-BP' }, 36 | }, 37 | ] 38 | }, 39 | // 404 40 | { 41 | path: '*', 42 | name: 'nopage', 43 | component: () => import(/* webpackChunkName: "nopage" */ '@/views/error-page/404.vue'), 44 | meta: { title: '404 - stable' }, 45 | }, 46 | ] 47 | 48 | export default new Router({ 49 | base: '/', 50 | mode: 'history', 51 | routes: constantRouter, 52 | scrollBehavior (to, from, savedPosition) { 53 | return { x: 0, y: 0 } 54 | } 55 | }); 56 | -------------------------------------------------------------------------------- /ui/landing/src/store/getters.js: -------------------------------------------------------------------------------- 1 | const getters = { 2 | app: state => state.app, 3 | sys: state => state.sys, 4 | }; 5 | 6 | export default getters; 7 | -------------------------------------------------------------------------------- /ui/landing/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuex from 'vuex'; 3 | import app from './modules/app'; 4 | import sys from './modules/sys'; 5 | import getters from './getters'; 6 | 7 | Vue.use(Vuex); 8 | 9 | const store = new Vuex.Store({ 10 | modules: { 11 | app, 12 | sys, 13 | }, 14 | getters, 15 | }); 16 | 17 | export default store; 18 | -------------------------------------------------------------------------------- /ui/landing/src/store/modules/app.js: -------------------------------------------------------------------------------- 1 | /* 2 | * vuex 全站存储 3 | * get: this.$store.state.模块.state 4 | * 如: this.$store.state.app.language 5 | * set: this.$store.dispatch(actions, value) 6 | * 如: this.$store.dispatch('setLanguage', 'en'); 7 | */ 8 | 9 | const app = { 10 | state: { 11 | // 多语言 12 | language: localStorage.getItem('language') || 'en', 13 | // 主题 默认白天 14 | theme: localStorage.getItem('theme') || 'theme-278EDA', 15 | minScreen: false, 16 | }, 17 | mutations: { 18 | SET_LANGUAGE: (state, language) => { 19 | state.language = language; 20 | localStorage.setItem('language', language); 21 | }, 22 | SET_THEME: (state, theme) => { 23 | state.theme = theme; 24 | localStorage.setItem('theme', theme); 25 | }, 26 | SET_MINSCREEN: (state, minScreen) => { 27 | state.minScreen = minScreen; 28 | }, 29 | }, 30 | actions: { 31 | setLanguage({ commit }, language) { 32 | commit('SET_LANGUAGE', language); 33 | }, 34 | setTheme({ commit }, theme) { 35 | commit('SET_THEME', theme); 36 | }, 37 | setMinScreen({ commit }, minScreen) { 38 | commit('SET_MINSCREEN', minScreen); 39 | }, 40 | } 41 | }; 42 | 43 | export default app; 44 | -------------------------------------------------------------------------------- /ui/landing/src/store/modules/sys.js: -------------------------------------------------------------------------------- 1 | // 系统性状态存储 2 | const sys = { 3 | state: { 4 | }, 5 | mutations: { 6 | }, 7 | actions: { 8 | } 9 | }; 10 | 11 | export default sys; 12 | -------------------------------------------------------------------------------- /ui/landing/src/utils/eos/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { ChainModel } from './eos'; 3 | 4 | function model() { 5 | return ChainModel 6 | } 7 | 8 | export var EosModel = model(); 9 | -------------------------------------------------------------------------------- /ui/landing/src/utils/filters/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import moment from 'moment'; 3 | import numeral from 'numeral'; 4 | import { toFixed, accSub, accMul } from "@/utils/public" 5 | import store from '@/store' 6 | 7 | // 位数分割 128,373,883 8 | Vue.filter('numeralFormat', (value, p) => { 9 | let xstr = '0'; 10 | if (p) { 11 | xstr = '0.'; 12 | for (var i = 0; i < p; i++) { // eslint-disable-line 13 | xstr += '0'; // eslint-disable-line 14 | } 15 | } 16 | return numeral(value).format(`0,${xstr}`); 17 | }); 18 | 19 | // unix 时间戳、 utc Data类型 20 | Vue.filter('dateFormat', value => moment.utc(value).format('YYYY-MM-DD')); 21 | Vue.filter('dateFormatYMDF', value => moment(value).format('YYYY-MM-DD HH:mm')); 22 | Vue.filter('dateFormatAll', value => moment(value).format('YYYY-MM-DD HH:mm:ss')); 23 | Vue.filter('dateFormatMonth', value => moment.utc(value).format('MM-DD')); 24 | 25 | Vue.filter('dateFormatBIH', value => moment(value).format('YYYY-MM-DD HH:mm:ss')); 26 | Vue.filter('dateFormatBIHM', value => moment(value).format('YYYY-MM-DD HH:mm')); 27 | Vue.filter('dateFormatTimeBIH', value => moment(value).format('HH:mm:ss')); 28 | Vue.filter('dateFormatMonthHour', value => moment(value).format('MM-DD HH:mm:ss')); 29 | Vue.filter('dateFormatT', (value) => { 30 | const zone = moment().zone() / 60; // 时区 31 | return moment(value).add(0 - zone, 'hours').format('MM-DD HH:mm:ss'); 32 | }); 33 | Vue.filter('dateFormatTYear', (value) => { 34 | const zone = moment().zone() / 60; // 时区 35 | return moment(value).add(0 - zone, 'hours').format('YYYY-MM-DD HH:mm:ss'); 36 | }); 37 | 38 | // 截取小数四位数 39 | Vue.filter('numberTofixed', value => toFixed(value, 4)); 40 | 41 | // 英文下显示折扣按照百分比 42 | Vue.filter('englishPercent', value => { 43 | if (store.state.app.language === 'en' || store.state.app.language === 'ko') { 44 | const data = accSub(10, Number(value)); 45 | return `${accMul(data, 10)}%` 46 | } 47 | return value 48 | }) 49 | -------------------------------------------------------------------------------- /ui/landing/src/utils/lang/en.js: -------------------------------------------------------------------------------- 1 | export default { 2 | public: { 3 | }, 4 | nav: { 5 | vision: 'Visions', 6 | dfs: 'DFS', 7 | project: 'Projects', 8 | faq: 'FAQ', 9 | partners: 'Partners', 10 | team: 'Contributors', 11 | report: 'Audit Report', 12 | slowMist: 'Slow Mist', 13 | peckshield: 'Peckshield', 14 | }, 15 | index: { 16 | title1_1: 'An open finance network ', 17 | title1_2: 'that integrates a series of DeFi protocols ', 18 | btn_1: 'Launch App ', 19 | title2_1: 'Let users from every corner of the world', 20 | title2_2: 'enjoy safe and equal financial services', 21 | cont2: 'Traditional financial infrastructures are isolated and fragmented from each other due to cultural differences and geographical restrictions governed by sovereignty. An open financial network based on blockchain technology will bring revolutionary changes to traditional financial infrastructure. This network can break down international financial barriers, collect global liquidity, create network effects, and create currency and financial programmability on a global scale.', 22 | link2: 'Read the whitepaper', 23 | title3_1: 'DFS token', 24 | title3_2: 'Used for trading, community governance, liquidity incentives, dividends of protocol fees revenues, staking, issuing and generating assets, etc.', 25 | cont3: 'By integrating a series of DeFi protocols, DeFis Network will create a powerful network effect in decentralized finance field in the future. The platform coin DFS will continue to capture the value generated by these DeFi protocols. DFS holders will continue to receive dividends from protocol fees. Through smart contracts, dividends are automatically executed, so that each holder can share the dividends of DeFis Network development fairly.', 26 | status1: 'Listed', 27 | status2: 'Coming soon', 28 | } 29 | } -------------------------------------------------------------------------------- /ui/landing/src/utils/lang/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import VueI18n from 'vue-i18n'; 3 | import store from '@/store'; 4 | import elEnLocale from 'element-ui/lib/locale/lang/en'; 5 | import elZhLocale from 'element-ui/lib/locale/lang/zh-CN'; 6 | import enLocale from './en'; 7 | import zhLocale from './zh-CN'; 8 | 9 | Vue.use(VueI18n); 10 | 11 | const messages = { 12 | 'zh-CN': { // 中文简体包 13 | ...zhLocale, 14 | ...elZhLocale 15 | }, 16 | en: { // 英文包 17 | ...enLocale, 18 | ...elEnLocale 19 | }, 20 | }; 21 | const i18n = new VueI18n({ 22 | locale: store.state.app.language, // set locale 23 | messages // locale messages 24 | }); 25 | 26 | export default i18n; 27 | -------------------------------------------------------------------------------- /ui/landing/src/utils/lang/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | public: { 3 | }, 4 | nav: { 5 | vision: '项目愿景', 6 | dfs: 'DFS代币', 7 | project: '项目进度', 8 | faq: '常见问题', 9 | partners: '合作伙伴', 10 | team: '协作者', 11 | report: '审计报告', 12 | slowMist: '慢雾审计报告', 13 | peckshield: '派盾审计报告', 14 | }, 15 | index: { 16 | title1_1: '一个整合了一系列', 17 | title1_2: 'DeFi协议的区块链开放金融网络', 18 | btn_1: '立即体验', 19 | title2_1: '让全世界每个角落的人', 20 | title2_2: '都能享受到安全、平等的金融服务', 21 | cont2: '传统的金融基础设施由于受到文化差异和主权管辖的地域限制,彼此是互相孤立、碎片化的。而基于区块链技术的开放金融网络,将为传统金融基础设施带来革命性的改变。这个网络可以打破国际金融壁垒,汇集全球流动性,创造出网络效应,在全球范围内开创货币和金融的可编程性。', 22 | link2: '阅读白皮书', 23 | title3_1: 'DFS代币', 24 | title3_2: '用于交易、社区治理、流动性激励、协议费分红、抵押发行合成资产等', 25 | cont3: '通过整合一系列DeFi协议,DeFis Network未来在区块链金融领域将形成强大的网络效应。而平台币DFS将会持续捕获这些DeFi协议产生的价值。DFS持有者将持续获得协议费的分红。通过智能合约自动执行分红,让每个持有者,都能公平分享到DeFis Network发展的红利。', 26 | status1: '已上线', 27 | status2: '敬请期待', 28 | } 29 | } -------------------------------------------------------------------------------- /ui/landing/src/views/layout/Index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 28 | 29 | -------------------------------------------------------------------------------- /ui/landing/vue.config.js: -------------------------------------------------------------------------------- 1 | // vue.config.js 2 | module.exports = { 3 | // 配置项 4 | publicPath: process.env.NODE_ENV === 'production' ? '/' : '/', // 资源文件目录 5 | // 开启esLint 6 | lintOnSave: process.env.NODE_ENV !== 'production', 7 | // 开发服务配置 8 | devServer: { 9 | open: true, 10 | port: 8888, 11 | proxy: { // 代理控制 12 | '/api': { 13 | target: `http://192.168.8.253:8080`, 14 | ws: false, 15 | changeOrigin: true 16 | }, 17 | } 18 | }, 19 | css: { // 样式相关配置 20 | extract: false, // 将组件内的 CSS 提取到一个单独的 CSS 文件 (只用在生产环境中) 21 | requireModuleExtension: true, // 去掉文件名中的 .module 22 | sourceMap: false, 23 | loaderOptions: { 24 | } 25 | }, 26 | // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录。 27 | assetsDir: 'static', 28 | chainWebpack: config => { 29 | // 移除 prefetch 插件 30 | config.plugins.delete('prefetch') 31 | }, 32 | // 将构建好的文件输出到位置 33 | outputDir: 'dist', 34 | // 是否为生产环境构建生成 source map? 35 | productionSourceMap: process.env.NODE_ENV !== 'production', 36 | 37 | // 三方插件的选项 38 | pluginOptions: { 39 | // ... 40 | }, 41 | } --------------------------------------------------------------------------------