Skip to content

Commit

Permalink
ve8020 Launchpad (#189)
Browse files Browse the repository at this point in the history
* WIP

* tabs structure

* tempale ui complete

* calendar-lockTime componenst

* install web3modal + basic implementation

* move stuff into Wallet component

* wip

* VeSystem Overview (data fetching) (#5)

* Add LaunchpadSubgraph class
* fetch launchpad data from subgraph
* update UI with data

* change UI max-lock time (#3)

* change UI max-lock time
* Changed max lock time calculation

---------

Co-authored-by: Pablo F. Mescher <[email protected]>

* wip

* create Admin Panel + default tabs

* launchpad hooks: deploy, refactor deploy form

* submit button indicator

* List token names (#7)

* Admin Panel - Rewards Distribution / Admin Pools (#8)

* RewardsDistribution Tab
* Admin Pools (no design)
* Basic Tab Navigation

* Available rewards modal placeholder (#9)

* Replace lauchpadProvider by VeSystemProvider (#10)

* Admin Pools (#11)

* Set Multiple Available Rewards  (#12)

Co-authored-by: Luigi <[email protected]>

* VeSystem Config Fields (#13)

* Ve System Config Fields and Buttons (#14)

* Ve system config unlock all (#15)

* Ve System Config - Early Unlock (#16)

* Fixed Modals UI (#17)

* Set Early Penalty Speed & fix styles (#18)

* Added search by bptToken address functionality (#19)

Co-authored-by: Luigi <[email protected]>
Co-authored-by: esis8 <[email protected]>

* Non admin flow pool details / lock (#20)

* Tab Navigation
* Pool Details Button
* Lock Action
* Approve Action
* Pool Details Tab Data

* Non Admin Flow - Withdraw (#21)

* Adapt UI to work with new subgraph schema (#23)

* Claim Modal (#22)

* Update launchpad contract address (#24)

* Available Rewards Modal (#25)

* Properly formatting numbers (#26)

* Admin Pools: Search by vested token address (#27)

* Add Supply Vested % (#28)

* fixed size buttons (#29)

* Fix Calendar timestamp for adding rewards exact week (#30)

* Network support first round (#33)

* Add Polygon zkEVM
* add config file

* fixed design btn selector (#32)

* Add contract addresses (#34)

* add contract addresses
* add subgraph urls

* Missing Non Admin Feautures (#31)

* EarlyWithdraw
* increase_amount
* increase_unlock_time

* Increase Lock Detalis Modals (#35)

* Add  to early penalty

* change texts

* rename search placeholder

* add activation functionality checkboxes (#36)

* launchpad start-time fix

* change texts

* allow increase unlock

* update contract address and abi

* Claim External Rewards

* catch error

* fix lock timestamp issue

* change title for user section

* max lock time changes

* Only Mumbai

* add ethereum to fix issue

* fix timezone issue (#37)

* Network Support (#38)

* networks: polygon, arbitrum, mumbai

* Scope veSystems by admin (#40)

* list veSystems by admin
* fix switch network
* remove code redundancy

* Tooltips (#39)

* Network support (#44)

Add support for:

* mainnet
* optimisim
* avalanche
* base
* gnosis

Update contract addresses

* Replace mumbai with sepolia (#45)

* Added detailed documentation (#52)

* Documentation added
* Detailed docs and changes to launchpad page
* Update admin-ve8020.md

---------

Co-authored-by: Pablo F. Mescher <[email protected]>
Co-authored-by: esis8 <[email protected]>
Co-authored-by: E Esis <[email protected]>
Co-authored-by: Pablo F. Mescher <[email protected]>
Co-authored-by: burns <[email protected]>
  • Loading branch information
6 people authored Feb 21, 2024
1 parent a91cbac commit ea850b5
Show file tree
Hide file tree
Showing 66 changed files with 24,239 additions and 9,551 deletions.
138 changes: 138 additions & 0 deletions docs/.vuepress/abis/Launchpad.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
[
{
"name": "VESystemCreated",
"inputs": [
{
"name": "token",
"type": "address",
"indexed": true
},
{
"name": "votingEscrow",
"type": "address",
"indexed": false
},
{
"name": "rewardDistributor",
"type": "address",
"indexed": false
},
{
"name": "rewardFaucet",
"type": "address",
"indexed": false
},
{
"name": "admin",
"type": "address",
"indexed": false
}
],
"anonymous": false,
"type": "event"
},
{
"stateMutability": "nonpayable",
"type": "constructor",
"inputs": [
{
"name": "_votingEscrow",
"type": "address"
},
{
"name": "_rewardDistributor",
"type": "address"
},
{
"name": "_rewardFaucet",
"type": "address"
}
],
"outputs": []
},
{
"stateMutability": "nonpayable",
"type": "function",
"name": "deploy",
"inputs": [
{
"name": "tokenBptAddr",
"type": "address"
},
{
"name": "name",
"type": "string"
},
{
"name": "symbol",
"type": "string"
},
{
"name": "maxLockTime",
"type": "uint256"
},
{
"name": "rewardDistributorStartTime",
"type": "uint256"
},
{
"name": "admin_unlock_all",
"type": "address"
},
{
"name": "admin_early_unlock",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "address"
},
{
"name": "",
"type": "address"
},
{
"name": "",
"type": "address"
}
]
},
{
"stateMutability": "view",
"type": "function",
"name": "votingEscrow",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address"
}
]
},
{
"stateMutability": "view",
"type": "function",
"name": "rewardDistributor",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address"
}
]
},
{
"stateMutability": "view",
"type": "function",
"name": "rewardFaucet",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address"
}
]
}
]
21 changes: 21 additions & 0 deletions docs/.vuepress/components/Admin8020.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<script setup>
import { createProviderComponent } from '../providers/createProviderComponent';
import { provideNetwork } from '../providers/network';
import { provideVeSystem } from '../providers/veSystem';
import { provideTabs, Tab } from '../providers/tabs';
import TabsComponent from './ve8020/admin/TabsComponent.vue';
const NetworkProvider = createProviderComponent(() => provideNetwork());
const VeSystemProvider = createProviderComponent(() => provideVeSystem());
const TabsProvider = createProviderComponent(() => provideTabs(Tab.LAUNCHPAD));
</script>

<template>
<NetworkProvider>
<VeSystemProvider>
<TabsProvider>
<TabsComponent />
</TabsProvider>
</VeSystemProvider>
</NetworkProvider>
</template>
21 changes: 21 additions & 0 deletions docs/.vuepress/components/Launchpad8020.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<script setup>
import { createProviderComponent } from '../providers/createProviderComponent';
import { provideVeSystem } from '../providers/veSystem';
import { provideNetwork } from '../providers/network';
import { provideTabs, Tab } from '../providers/tabs';
import TabsComponent from './ve8020/TabsComponent.vue';
const NetworkProvider = createProviderComponent(() => provideNetwork());
const VeSystemProvider = createProviderComponent(() => provideVeSystem());
const TabsProvider = createProviderComponent(() => provideTabs(Tab.OVERVIEW));
</script>

<template>
<NetworkProvider>
<VeSystemProvider>
<TabsProvider>
<TabsComponent />
</TabsProvider>
</VeSystemProvider>
</NetworkProvider>
</template>
76 changes: 76 additions & 0 deletions docs/.vuepress/components/Navbar/Wallet.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<script setup>
import { watch, onMounted } from 'vue';
import {
createWeb3Modal,
defaultConfig,
useWeb3ModalAccount,
} from '@web3modal/ethers/vue';
import { NETWORKS } from '../../constants/networks';
import { useNetwork } from '../../providers/network';
const { selectNetwork } = useNetwork();
const projectId = 'c6317c5d201b5bf046ce39e781ce0e78';
const chains = NETWORKS.map(n => ({
chainId: n.id,
name: n.name,
explorerUrl: n.explorer,
rpcUrl: n.rpcUrl,
currency: 'ETH',
}));
const metadata = {
name: 'Balancer Docs',
description: 'Balancer Docs',
url: 'https://docs.balancer.fi/',
icons: ['https://avatars.mywebsite.com/'],
};
createWeb3Modal({
ethersConfig: defaultConfig({ metadata }),
chains,
projectId,
// defaultChain: chains[0],
themeVariables: {
'--w3m-accent': '#0EA5E9',
'--w3m-color-mix': '#000000',
'--w3m-color-mix-strength': 40,
'--wui-font-family': 'red',
},
});
const { chainId } = useWeb3ModalAccount();
watch(chainId, value => {
selectNetwork(NETWORKS.find(x => x.id === value));
});
onMounted(() => {
if (!chainId.value) return;
selectNetwork(NETWORKS.find(x => x.id === chainId.value));
});
</script>

<template>
<div class="btn-connect">
<w3m-button />
</div>
<div class="network-selector">
<w3m-network-button />
</div>
</template>

<style scoped>
.network-selector,
.btn-connect {
margin-left: 5px;
background: #eaf0f6;
border-radius: 20px;
}
.dark .btn-connect,
.dark .network-selector {
background: #1e293b;
}
</style>
13 changes: 13 additions & 0 deletions docs/.vuepress/components/Tools.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@ const coreTools = [
details: 'Query swap routes through the SOR ',
link: '/tools/core/smart-order-router.html',
},
{
title: 've8020 Launchpad Admin Panel',
icon: '/images/protofire.png',
details: 'Admin Panel to launch a ve8020 system',
link: '/tools/core/admin-ve8020.html',
},
{
title: 've8020 User Panel',
icon: '/images/protofire.png',
details: 'User panel for ve8020 system',
link: '/tools/core/ve8020.html',
},
// Add more Core Tools as needed
];
Expand Down
Loading

0 comments on commit ea850b5

Please sign in to comment.