Skip to content

Commit

Permalink
feat: implement dynamic treshholds
Browse files Browse the repository at this point in the history
  • Loading branch information
Another-DevX committed Jan 27, 2024
1 parent 580c2fb commit 945af72
Show file tree
Hide file tree
Showing 6 changed files with 623 additions and 36 deletions.
6 changes: 3 additions & 3 deletions src/assets/data/contracts/alfajores.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"WeightedPoolFactory": "0x997252b17F61fFc6Ca2fDDd7fa1Cb0cdb98f202D",
"YearnLinearPoolFactory": "",
"Multicall": "0xca11bde05977b3631167028862be2a173976ca11",
"SimpleMinter": "0x236C4B59f22697aC22C8AC3A6442eBD6f2af9dbF",
"RFNFT": "0x976c8244061CC363d1e72d0F1c0B4DBe9a78d483",
"RFP": "0x8431584b4DEfaB5f4aDd6A4221161F2Cb6823DE9"
"SimpleMinter": "0x3052fFcE3A66B4AB60183DA87C31F9e753a051E6",
"RFNFT": "0x5a4A3F1397325522e889B48ff16f69c32b7Db1ba",
"RFP": "0x4AF6b567A189467Ad31b4f5d43982dBe1C75841f"
}
6 changes: 3 additions & 3 deletions src/assets/data/contracts/celo.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"WeightedPoolFactory": "0xEB1055c017a1427726F01368C8247649c5A79bF9",
"YearnLinearPoolFactory": "",
"Multicall": "0xca11bde05977b3631167028862be2a173976ca11",
"SimpleMinter": "0xd437fa025E43ca4578aD682Bcfb1B003041d48D1",
"RFNFT": "0xBA7d3fB1BBD73f4289C7FB42e8EC268EC9C32bE3",
"RFP": "0x74072b693f1Da8B74b24563Cbded727228c0A898"
"SimpleMinter": "0x605b4853B9DE704E24A81955B9476Fe10096bD23",
"RFNFT": "0x342abeB491A776978b1EaA1ae6357f066416E9B9",
"RFP": "0xB55C408d0e511A5b818590E48be26562f8C24bF0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ const hasNFT = computed(
const isAbleToUpgradeNFT = computed(() => NFTData?.value?.isAbleToUpgrade[0]);
const levels = ref([
{ nextLevel: '50', votes: 1 },
{ nextLevel: '250', votes: 10 },
{ nextLevel: '1000', votes: 30 },
{ nextLevel: '2500', votes: 75 },
{ nextLevel: '5000', votes: 150 },
{ nextLevel: 'MAX', votes: 250 },
]);
const isOpenUpgradeNFTModal = ref(false);
const isOpenMintNFTModal = ref(false);
Expand Down Expand Up @@ -103,7 +95,7 @@ function handleMintNFTClose() {
>
<p class="text-sm">Next level</p>
<p v-if="NFTData" class="text-sm">
{{ levels[NFTData?.tier - 1].nextLevel }} RFP
{{ NFTData.tresholds[NFTData?.tier] || 'Max' }} RFP
</p>
<p v-else class="text-sm">- RFP</p>
</div>
Expand Down Expand Up @@ -171,7 +163,7 @@ function handleMintNFTClose() {
>
<p class="text-sm">Next level</p>
<p v-if="NFTData" class="text-sm">
{{ levels[NFTData?.tier - 1].nextLevel }} RFP
{{ NFTData.tresholds[NFTData?.tier] || 'Max' }} RFP
</p>
<p v-else class="text-sm">- RFP</p>
</div>
Expand Down Expand Up @@ -242,7 +234,7 @@ function handleMintNFTClose() {
>
<p class="text-sm">Next level</p>
<p v-if="NFTData" class="text-sm">
{{ levels[NFTData?.tier - 1].nextLevel }} RFP
{{ NFTData.tresholds[NFTData?.tier] || 'Max' }} RFP
</p>
<p v-else class="text-sm">- RFP</p>
</div>
Expand Down
13 changes: 13 additions & 0 deletions src/lib/abi/KolektivoRNFT.json
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,19 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTierThresholds",
"outputs": [
{
"internalType": "uint256[]",
"name": "tierThresholds",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
Expand Down
Loading

0 comments on commit 945af72

Please sign in to comment.