update desktop resize

This commit is contained in:
EmberSpirit
2023-10-05 21:23:59 +02:00
parent 2f712d41d6
commit dd7a0a113d
26 changed files with 595 additions and 390 deletions
+1 -1
View File
@@ -223,7 +223,7 @@ onMounted(async () => {
margin-top: 82px
padding: 24px 0
@media (min-width: 992px)
margin-top: 128px
margin-top: 96px
padding: 80px 0
&.mobile
&.no-scroll
+1 -1
View File
@@ -1,6 +1,6 @@
{
"contractName": "Bloodline",
"contractAddress": "0xBd6bB82108D5F27E8A8f081723408bF26d665a8c",
"contractAddress": "0x00E5DAd5dA0FC4Da0baB7f0D99E28C07d8A88ee4",
"abi": [
{
"inputs": [
+336 -155
View File
@@ -1,6 +1,6 @@
{
"contractName": "LiquidityOwner",
"contractAddress": "0xEb898F92F7db3bbF807513C847bfDeE846E1b5Ff",
"contractAddress": "0x947f05D74ac7dA0Eb0CA88eF9b579D196B178BaE",
"abi": [
{
"inputs": [
@@ -19,80 +19,25 @@
"name": "_weth",
"type": "address"
},
{
"internalType": "address",
"name": "_nfPositionManager",
"type": "address"
},
{
"internalType": "address",
"name": "_memeAltar",
"type": "address"
},
{
"internalType": "uint256",
"name": "_chunk",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"stateMutability": "payable",
"type": "constructor"
},
{
"inputs": [],
"name": "CurrentPriceDisallowsToProvide",
"type": "error"
},
{
"inputs": [],
"name": "NothingToProvide",
"type": "error"
},
{
"inputs": [],
"name": "ProjectAlive",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"indexed": true,
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"indexed": true,
"internalType": "uint256",
"name": "amountWETH",
"type": "uint256"
}
],
"name": "LiquidityProvided",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"indexed": true,
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"indexed": true,
"internalType": "uint256",
"name": "amountWETH",
"type": "uint256"
}
],
"name": "LiquidityShouldBeProvidedLater",
"type": "event"
},
{
"inputs": [
{
@@ -117,6 +62,69 @@
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"internalType": "uint128",
"name": "liquidity",
"type": "uint128"
},
{
"internalType": "uint80",
"name": "tokenId",
"type": "uint80"
}
],
"internalType": "struct LiquidityOwner.Position",
"name": "position",
"type": "tuple"
}
],
"name": "addETHPositionToLinkedList",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "int24",
"name": "_tickLower",
"type": "int24"
},
{
"internalType": "int24",
"name": "_tickUpper",
"type": "int24"
},
{
"internalType": "uint256",
"name": "amountBloodline",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountWETH",
"type": "uint256"
}
],
"name": "addNewPosition",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
@@ -125,17 +133,12 @@
"type": "int48"
}
],
"name": "_positions",
"name": "allRangesLinkedList",
"outputs": [
{
"internalType": "uint112",
"name": "providedETH",
"type": "uint112"
},
{
"internalType": "uint112",
"name": "unprovidedETH",
"type": "uint112"
"internalType": "int48",
"name": "",
"type": "int48"
}
],
"stateMutability": "view",
@@ -155,29 +158,44 @@
"type": "function"
},
{
"inputs": [
{
"internalType": "int24",
"name": "tickLower",
"type": "int24"
"inputs": [],
"name": "burn",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
"inputs": [],
"name": "chunk",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256[]",
"name": "liquidityTokenIds",
"type": "uint256[]"
}
],
"name": "collectDeveloperFees",
"outputs": [
{
"internalType": "uint128",
"name": "wethAmount",
"type": "uint128"
"internalType": "uint256",
"name": "amount0",
"type": "uint256"
},
{
"internalType": "uint128",
"name": "bloodlineAmount",
"type": "uint128"
"internalType": "uint256",
"name": "amount1",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
@@ -188,14 +206,79 @@
"name": "collectedEthTotal",
"outputs": [
{
"internalType": "uint112",
"internalType": "uint256",
"name": "",
"type": "uint112"
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "currentTokenIdToFill",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint128",
"name": "liquidity",
"type": "uint128"
}
],
"name": "decreasePositionLiquidity",
"outputs": [
{
"internalType": "uint256",
"name": "amount0",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount1",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountWETH",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountBloodline",
"type": "uint256"
}
],
"name": "increasePositionLiquidity",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "memeAltar",
@@ -211,13 +294,94 @@
},
{
"inputs": [
{
"internalType": "uint256[]",
"name": "positionsToCancel",
"type": "uint256[]"
},
{
"internalType": "uint256",
"name": "developerFee",
"name": "amountOfWETHToUse",
"type": "uint256"
}
],
"name": "payDeveloperFee",
"name": "movePriceUP",
"outputs": [
{
"internalType": "uint256",
"name": "amount0Collected",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount1Collected",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "nfPositionManager",
"outputs": [
{
"internalType": "contract INonfungiblePositionManager",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "onERC721Received",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "developerFee",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountOfETHToPaySender",
"type": "uint256"
}
],
"name": "payDeveloperFeeAndForGas",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
@@ -240,34 +404,16 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "pool",
"outputs": [
{
"internalType": "contract IUniswapV3Pool",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "previousBLDTotalSupply",
"outputs": [
{
"internalType": "uint128",
"name": "",
"type": "uint128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "positions",
"outputs": [
{
"internalType": "int24",
"name": "tickLower",
@@ -277,37 +423,29 @@
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"internalType": "uint128",
"name": "liquidity",
"type": "uint128"
},
{
"internalType": "uint80",
"name": "tokenId",
"type": "uint80"
}
],
"name": "provideUnprovidedLiquidity",
"outputs": [],
"stateMutability": "nonpayable",
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
}
],
"name": "rageQuit",
"inputs": [],
"name": "rebalance",
"outputs": [
{
"internalType": "uint128",
"name": "wethAmount",
"type": "uint128"
},
{
"internalType": "uint128",
"name": "bloodlineAmount",
"type": "uint128"
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
@@ -316,9 +454,28 @@
{
"inputs": [
{
"internalType": "uint112",
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "tokenIds",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "collectedEthInRound",
"type": "uint112"
"type": "uint256"
}
],
"name": "triggerRoundCompleted",
@@ -333,24 +490,37 @@
"type": "function"
},
{
"inputs": [
"inputs": [],
"name": "uniV3Pool",
"outputs": [
{
"internalType": "uint256",
"name": "amount0Owed",
"type": "uint256"
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"internalType": "uint256",
"name": "amount1Owed",
"type": "uint256"
"inputs": [
{
"internalType": "int256",
"name": "amount0Delta",
"type": "int256"
},
{
"internalType": "int256",
"name": "amount1Delta",
"type": "int256"
},
{
"internalType": "bytes",
"name": "",
"name": "_data",
"type": "bytes"
}
],
"name": "uniswapV3MintCallback",
"name": "uniswapV3SwapCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
@@ -367,6 +537,17 @@
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "withdrawETH",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
]
}
+7 -12
View File
@@ -1,6 +1,6 @@
{
"contractName": "MemeAltar",
"contractAddress": "0x9fA80C0A942016A0a246402e97d30562CF93f5AE",
"contractAddress": "0x9842954639aF0c1d7A692222955868806287aeEA",
"abi": [
{
"inputs": [
@@ -484,11 +484,6 @@
"internalType": "uint256",
"name": "amountETHBase",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountETHForSelling",
"type": "uint256"
}
],
"stateMutability": "view",
@@ -500,6 +495,11 @@
"internalType": "address",
"name": "memeToSacrifice",
"type": "address"
},
{
"internalType": "bool",
"name": "buyFunc",
"type": "bool"
}
],
"name": "getAmountToReachGoal",
@@ -549,12 +549,7 @@
"outputs": [
{
"internalType": "uint256",
"name": "rewardCurrentCycle",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "rewardNextCycle",
"name": "",
"type": "uint256"
}
],
+5 -5
View File
@@ -1,6 +1,6 @@
{
"contractName": "RewardLocker",
"contractAddress": "0xC21568120adc35AB0aA7460A4A5E1C3D4f845269",
"contractAddress": "0xc9f5F78320D0f75099eEA8f8F6FD35BF246f0916",
"abi": [
{
"inputs": [
@@ -551,14 +551,14 @@
"name": "rounds",
"outputs": [
{
"internalType": "uint32",
"internalType": "uint256",
"name": "roundCompletedTimestamp",
"type": "uint32"
"type": "uint256"
},
{
"internalType": "uint224",
"internalType": "uint256",
"name": "totalSacrificeCompetitionRewards",
"type": "uint224"
"type": "uint256"
},
{
"internalType": "uint256",
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
[{"inputs":[{"internalType":"address","name":"meme","type":"address"},{"internalType":"address","name":"uniV2Pool","type":"address"}],"name":"addMemeToList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint40","name":"b1","type":"uint40"},{"internalType":"uint40","name":"m1","type":"uint40"},{"internalType":"uint40","name":"b2","type":"uint40"},{"internalType":"uint40","name":"m2","type":"uint40"},{"internalType":"uint40","name":"b3","type":"uint40"},{"internalType":"uint40","name":"m4","type":"uint40"}],"internalType":"struct MemeAltar.BM","name":"newBM","type":"tuple"}],"name":"adjustBM","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint112","name":"newDefaultGoal","type":"uint112"}],"name":"adjustDefaultGoal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"newDurationLimit","type":"uint32"}],"name":"adjustRoundDurationLimit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"switchAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"meme","type":"address"},{"internalType":"address","name":"newUniV2Pool","type":"address"}],"name":"switchUniV2Pool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"meme","type":"address"}],"name":"removeMemeFromList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
[{"inputs":[{"internalType":"address","name":"meme","type":"address"},{"internalType":"address","name":"uniV2Pool","type":"address"}],"name":"addMemeToList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint8","name":"b1","type":"uint8"},{"internalType":"uint8","name":"m1","type":"uint8"},{"internalType":"uint8","name":"b2","type":"uint8"},{"internalType":"uint8","name":"m2","type":"uint8"},{"internalType":"uint8","name":"b3","type":"uint8"},{"internalType":"uint8","name":"m4","type":"uint8"}],"internalType":"struct MemeAltar.BM","name":"newBM","type":"tuple"}],"name":"adjustBM","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDefaultGoal","type":"uint256"}],"name":"adjustDefaultGoal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDurationLimit","type":"uint256"}],"name":"adjustRoundDurationLimit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"meme","type":"address"}],"name":"removeMemeFromList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"switchAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFixedPrice","type":"uint256"}],"name":"adjustFixedPrice","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
+5 -7
View File
@@ -1,20 +1,18 @@
.bloodline-devider
font-size: 42px
text-align: center
@media (min-width: 992px)
margin: 24px 0
.bloodline-border
padding: 16px
padding: 12px
border-radius: 16px
border: 2px solid #000
&.bloodline-border--variant1
border: 4px solid var(--midnight-black)
border: 3px solid var(--midnight-black)
&.bloodline-border__thin
border-width: 1px
@media (min-width: 992px)
padding: 24px 32px
border: 4px solid #000
padding: 18px 24px
border: 3px solid #000
&.purple
border-color: var(--purple)
&.white
@@ -23,7 +21,7 @@
border-color: var(--grey, #858585)
.bloodline-badge
padding: 8px 16px 8px 16px
padding: 6px 12px 6px 12px
border-radius: 14px
background-color: #0F0F0F
display: flex
+1 -1
View File
@@ -47,7 +47,7 @@ body
// max-width: 800px
// padding: 24px 64px
@media (min-width: 992px)
max-width: 860px
max-width: 640px
h1
font-weight: 700
+11 -8
View File
@@ -43,25 +43,28 @@ $button-background-color: $black
--darkgrey: #{$darkgrey}
//fonts
.tiny-text
font-family: Inter
font-size: 14px
.low-mid-text
font-family: Inter
font-size: 16px
font-style: normal
font-weight: 400
line-height: normal
@media (min-width: 992px)
font-size: 24px
// @media (min-width: 992px)
// font-size: 18px
.mid-mid-text
font-family: Inter
font-size: 18px
font-style: normal
font-weight: 400
line-height: normal
@media (min-width: 992px)
font-size: 24px
// @media (min-width: 992px)
// font-size: 24px
.mid-text
font-family: Inter
font-size: 24px
font-size: 18px
font-style: normal
font-weight: 400
line-height: normal
@@ -86,8 +89,8 @@ $button-background-color: $black
font-weight: 400
line-height: normal
font-size: 24px
@media (min-width: 992px)
font-size: 32px
// @media (min-width: 992px)
// font-size: 32px
.header
font-family: Inter
font-size: 32px
@@ -95,7 +98,7 @@ $button-background-color: $black
font-weight: 400
line-height: normal
@media (min-width: 992px)
font-size: 40px
font-size: 30px
// :root
// --font-size-text: 16px
+27 -10
View File
@@ -23,7 +23,7 @@
<div class="blood-chart-coin">
<img :src="getImageUrl(coin.vamplogo)" alt="logo" />
</div>
<div class="blood-chart-coin-title">{{ coin.name }}</div>
<div class="blood-chart-coin-title low-mid-text">{{ coin.name }}</div>
</div>
<div class="blood-chart-element-body">
<div class="blood-chart-bar-wrapper">
@@ -68,7 +68,7 @@
<!-- {{ compactNumber(coin.amount) }} -->
{{ coin.amount.toFixed(2) }}
</div>
<div class="blood-chart-coin">$BLOOD</div>
<div>$BLOOD</div>
</div>
</swiper-slide>
@@ -117,7 +117,10 @@
<use xlink:href="#gentle-wave" x="48" y="7" fill="#8B0000" />
</g>
</svg>
<div class="blood-chart-bar" :style="`height: ${getPercentage(coin.amount, props.data.goal)}%`">
<div
class="blood-chart-bar"
:style="`height: ${getPercentageBloodChart(coin.amount, props.data.goal)}%`"
>
<div class="wrapper">
<div><span class="dot"></span></div>
<div><span class="dot"></span></div>
@@ -194,6 +197,16 @@ const token = computed(() => props.data?.token);
// icon: "/assets/img/token/elonvamp.png",
// },
// ];
function getPercentageBloodChart(amount, goal) {
let returnNumber = 5;
if ((Number(amount) / Number(goal)) * 100 < 5) {
returnNumber = 5;
} else {
returnNumber = (Number(amount) / Number(goal)) * 100;
}
return returnNumber.toFixed(2);
}
</script>
<style lang="sass">
@@ -216,25 +229,31 @@ const token = computed(() => props.data?.token);
.blood-chart-element
height: 100%
width: 80px
@media (min-width: 992px)
width: 60px
display: flex
flex-direction: column
.blood-chart-element-header
flex: 0 0 100px
.blood-chart-coin
height: 80px
width: 80px
border-radius: 80px
margin-left: auto
margin-right: auto
position: relative
margin-bottom: 16px
overflow: hidden
height: 80px
width: 80px
@media (min-width: 992px)
height: 60px
width: 60px
img
height: 100%
width: 100%
.blood-chart-coin-title
text-align: center
margin-bottom: 32px
font-size: 16px
@media (min-width: 992px)
font-size: 24px
.blood-chart-element-body
background-color: rgba(233, 233, 233, 0.2)
flex: 0 0 500px
@@ -261,8 +280,6 @@ const token = computed(() => props.data?.token);
.blood-chart-amount
font-size: 24px
margin-bottom: 8px
.blood-chart-coin
font-size: 16px
.swiper-slide
+1
View File
@@ -93,6 +93,7 @@ function openUnstake() {
display: flex
text-align: left
gap: 16px
height: 56px
.token-logo
margin-left: auto
.connected-stake-buttons
+1
View File
@@ -179,6 +179,7 @@ async function connectWallet(connector) {
display: flex
gap: 16px
align-items: center
height: 56px
.connected-token-button
margin-left: auto
.bloodline-badge
+7 -32
View File
@@ -9,28 +9,7 @@
<div class="navbar-text">
<router-link to="/">Bloodline</router-link>
</div>
<div class="navbar-center" v-if="!isMobile">
<!-- <div class="navbar-social-links">
<div class="social-bloodline-badge">
<div class="social-bloodline-badge-icon">
<font-awesome-icon icon="fa-brands fa-discord" />
</div>
<div class="social-bloodline-badge-text">Discord</div>
</div>
<div class="social-bloodline-badge">
<div class="social-bloodline-badge-icon">
<font-awesome-icon icon="fa-brands fa-telegram" />
</div>
<div class="social-bloodline-badge-text">Telegram</div>
</div>
<div class="social-bloodline-badge">
<div class="social-bloodline-badge-icon">
<font-awesome-icon icon="fa-brands fa-twitter" />
</div>
<div class="social-bloodline-badge-text">Twitter</div>
</div>
</div> -->
</div>
<div class="navbar-center" v-if="!isMobile"></div>
<div class="navbar-end">
<div class="navbar-navigation mid-text" v-if="!isMobile">
<div
@@ -128,10 +107,6 @@ onBeforeUnmount(() => {
</script>
<style lang="sass" scoped>
// margin-bottom: 82px
// @media (min-width: 992px)
// margin-bottom: 128px
.navbar
position: fixed
z-index: 3
@@ -142,7 +117,7 @@ onBeforeUnmount(() => {
transition: transform .3s ease,visibility 0s .3s linear
height: 82px
@media (min-width: 992px)
height: 128px
height: 96px
// &.navbar--hidden
// transform: translate3d(0,-100%,0)
.navbar-inner
@@ -158,8 +133,8 @@ onBeforeUnmount(() => {
height: 50px
width: 50px
@media (min-width: 992px)
height: 75px
width: 75px
height: 56px
width: 56px
.navbar-text
font-family: 'Vampire', sans-serif
@@ -168,7 +143,7 @@ onBeforeUnmount(() => {
letter-spacing: 0.138em
line-height: 73.107px
@media (min-width: 992px)
font-size: 64px
font-size: 48px
a
text-decoration: none
color: white
@@ -237,6 +212,6 @@ onBeforeUnmount(() => {
&:hover,&:active,&:focus
cursor: pointer
img
width: 45px
height: 45px
width: 32px
height: 32px
</style>
+11 -19
View File
@@ -4,16 +4,16 @@
{{ props.title }}
</div>
<div class="rewards-inner">
<div class="rewards-body">
<div class="rewards-coin low-mid-text">$BLOOD</div>
<div class="rewards-amount">{{ props.amount }}</div>
</div>
<img class="bloodline-token" :src="props.image" alt="vampir" />
<token-name-price name="$BLOOD" :price="props.amount"></token-name-price>
<token-logo :img="props.image" :alt="'vampire'"></token-logo>
</div>
</div>
</template>
<script setup>
import TokenNamePrice from "@/components/TokenNamePrice.vue";
import TokenLogo from "@/components/TokenLogo.vue";
const props = defineProps({
title: String,
info: String,
@@ -27,20 +27,12 @@ const props = defineProps({
display: flex
flex-direction: column
gap: 8px
.rewards-inner, .rewards-clan-wrapper
padding: 6px 0
.rewards-inner
display: flex
padding: 0 8px 8px 8px
padding: 0 6px 6px 6px
border-bottom: 1px solid var(--grey, #858585)
.rewards-body
align-self: center
.rewards-amount
text-align: left
font-size: 24px
margin-top: 8px
@media (min-width: 992px)
font-size: 40px
margin-top: 0
img
margin-left: auto
align-self: center
justify-content: space-between
height: 56px
box-sizing: content-box
</style>
+55 -52
View File
@@ -21,7 +21,7 @@
<img v-if="isMobile" :src="token.logoMobile" alt="token logo" />
<img v-if="!isMobile" :src="token.logo" alt="token logo" />
</div>
<div class="sacrifice-token-name">{{ token.name }}</div>
<div class="sacrifice-token-name mid-text">{{ token.name }}</div>
</div>
</div>
</div>
@@ -49,9 +49,18 @@
<div class="sacrifice-adder-step bloodline-badge" @click="addTokens(100000000)">+100m</div>
<div class="sacrifice-adder-step bloodline-badge" @click="addTokens(1000000000)">+1b</div>
</template>
<template v-slot:message-end>
<div class="input-balance tiny-text">
Balance:
{{
walletStore.token.find((obj) => obj.contractAddress === activeToken.contractAddress)
.balanceOf
}}
</div>
</template>
</token-input>
</div>
<div class="sacrifice-divider bloodline-devider">
<div class="bloodline-devider">
<font-awesome-icon :icon="['fas', 'arrow-down']" />
</div>
<div
@@ -62,15 +71,11 @@
purple: output && output > 0,
}"
>
<div class="sarcrifice-to-input">
<div class="sacrifice-to-output">
<div class="sacrifice-to-output-coin">$BLOOD</div>
<div class="sacrifice-to-output-rewards header">{{ output.toFixed(5) }}</div>
</div>
<div class="sacrifice-logo">
<img :src="activeToken.vamp?.logo" :alt="activeToken.vamp?.name" />
</div>
<div class="sacrifice-to-body">
<token-name-price name="$BLOOD" :price="`≈${output?.toFixed(5)}`"></token-name-price>
<token-logo img="/assets/img/token/bloodline.png" :alt="'bloodline logo'"></token-logo>
</div>
<div class="sacrifice-staking-bonus">
<div
class="sacrifice-staking-bonus-inner"
@@ -101,7 +106,7 @@
<img src="/assets/img/fuel-noozle.png" alt="fuel noozle" />
</div>
<div class="sacrifice-fees-body">
<div class="sacrifice-fees-body-header">
<div class="sacrifice-fees-body-header mid-text">
<div class="sacrifice-fees-body-header-title">Gas Subsidy</div>
<div class="sacrifice-fees-body-header-amount">≤30 Gwei</div>
</div>
@@ -109,6 +114,7 @@
</div>
</div>
<div class="sacrifice-buttons-function-wrapper">
{{ stateComputed }}
<template v-if="walletStore.connected">
<div class="btn btn-immortal sub-header" disabled v-if="stateComputed === 0">Enter Amount</div>
<div
@@ -154,6 +160,8 @@ import { useUniswapStore } from "@/stores/uniswap";
import StakeComponentV1 from "@/components/StakeComponentV1.vue";
import LoadingComponent from "@/components/LoadingComponent.vue";
import TokenInput from "@/components/TokenInput.vue";
import TokenNamePrice from "@/components/TokenNamePrice.vue";
import TokenLogo from "@/components/TokenLogo.vue";
import StakeSuccessToast from "@/components/toasts/StakeSuccessToast.vue";
import { useToast } from "vue-toastification";
@@ -262,6 +270,7 @@ onBeforeUnmount(() => {
});
async function sacrificeToken(amount) {
console.log("sacrificeToken");
try {
state.value = 2;
const getRewards = await getRewardsFor(amount);
@@ -270,18 +279,27 @@ async function sacrificeToken(amount) {
if (getRewards.variant === "sacrifice") {
console.log("sacrifice");
hash = await memeburnerStore.sacrificeMeme(amount);
console.log("hash", hash);
} else {
console.log("buy");
hash = await memeburnerStore.sacrificeMemeAndBuyBLOOD(amount);
console.log("hash", hash);
}
console.log("hierabc");
console.log("state.value = 2");
console.log("hash", hash);
state.value = 3;
console.log("state.value = 3");
const data = await waitForTransaction({
hash: hash,
});
console.log("data", data);
activeToken.value.allowance = await tokenStore.allowance();
state.value = 4;
console.log("state.value = 4");
showSuccessToast(
tokenStore.activeToken.rewards?.toFixed(5),
"Success!",
@@ -350,17 +368,23 @@ async function getRewardsFor(value) {
BigInt(value * Math.pow(10, activeToken.value.decimals))
);
console.log("rewardsForResult", rewardsForResult);
const rewardsForResultNumber = Number(rewardsForResult[0]) / Math.pow(10, tokenStore.activeToken.decimals);
const rewardsForResultNumber = Number(rewardsForResult) / Math.pow(10, tokenStore.activeToken.decimals);
newOutput = rewardsForResultNumber;
variant = "sacrifice";
} else {
const rewardsForResult = await memeburnerStore.getRewardFor(
BigInt(value * Math.pow(10, activeToken.value.decimals))
);
console.log(
"tokenNumber.value * Math.pow(10, tokenStore.activeToken.decimals)",
tokenNumber.value * Math.pow(10, tokenStore.activeToken.decimals)
);
console.log("tokenNumber.value", tokenNumber.value);
var quoteRewards = await uniswapStore.quoteExactInputSingle(
tokenNumber.value * Math.pow(10, tokenStore.activeToken.decimals)
);
const rewardsForResultNumber = Number(rewardsForResult[0]) / Math.pow(10, tokenStore.activeToken.decimals);
console.log("quoteRewards", quoteRewards);
const rewardsForResultNumber = Number(rewardsForResult) / Math.pow(10, tokenStore.activeToken.decimals);
console.log("rewardsForResultNumber", rewardsForResultNumber);
const quoteRewardsNumber = Number(quoteRewards) / Math.pow(10, tokenStore.activeToken.decimals);
console.log("quoteRewardsNumber", quoteRewardsNumber);
@@ -370,14 +394,13 @@ async function getRewardsFor(value) {
variant = "buy";
// const hash = await memeburnerStore.sacrificeMeme(tokenNumber.value);
} else {
newOutput = rewardsForResultNumber[0];
newOutput = rewardsForResultNumber;
variant = "sacrifice";
//sacrificeMemeAndBuyBLOOD
// const hash = await memeburnerStore.sacrificeMeme(tokenNumber.value);
}
}
console.log("variant", variant);
state.value = 1;
output.value = newOutput;
tokenStore.activeToken.rewards = newOutput;
return { ouput: newOutput, variant: variant };
@@ -453,7 +476,7 @@ function showSuccessToast(value, header, subheader, info) {
.sacrifice-token
border-radius: 16px
padding: 12px
padding: 9px
cursor: pointer
background-color: #0F0F0F
text-align: center
@@ -461,17 +484,18 @@ function showSuccessToast(value, header, subheader, info) {
border: 4px solid transparent
.sacrifice-token-logo
pointer-events: none
// @media (min-width: 992px)
@media (min-width: 992px)
img
height: 100px
width: 100px
// padding: 0
// background-color: unset
&.sacrifice-token--active
border-color: var(--purple)
.sacrifice-token-name
font-size: 16px
@media (min-width: 992px)
padding: 5px 26px
font-size: 24px
.sacrifice-buttons-function-wrapper
text-align: center
@@ -480,27 +504,28 @@ function showSuccessToast(value, header, subheader, info) {
@media (min-width: 992px)
display: flex
.btn
padding: 16px 64px
padding: 12px 48px
.sacrifice-fees-info-wrapper
display: flex
border: 2px dashed var(--grey)
border: 1px dashed var(--grey)
color: var(--grey)
border-radius: 16px
padding: 16px
font-size: 16px
gap: 16px
padding: 12px
gap: 12px
.sacrifice-fees-img
img
height: 46px
.sacrifice-fees-body
flex: 1 1 auto
display: flex
flex-direction: column
justify-content: space-between
.sacrifice-fees-body-header
display: flex
flex-direction: row
justify-content: space-between
margin-bottom: 8px
@media (min-width: 992px)
font-size: 24px
margin-bottom: 0
.sacrifice-from-to-wrapper
@@ -511,20 +536,6 @@ function showSuccessToast(value, header, subheader, info) {
@media (min-width: 992px)
gap: 32px
.sacrifice-from-wrapper
.sarcrifice-from-input
display: flex
margin-bottom: 8px
@media (min-width: 992px)
height: 60px
input
width: 100%
height: 45px
font-size: 24px
border-radius: 16px
padding: 0 16px
@media (min-width: 992px)
font-size: 32px
height: auto
.sacrifice-logo
margin-left: 16px
img
@@ -553,13 +564,13 @@ function showSuccessToast(value, header, subheader, info) {
font-size: 14px
background: var(--grey, #858585)
color: var(--midnight-black, #0F0F0F)
@media (min-width: 992px)
font-size: 16px
&:hover,
&:active,
&:focus
background-color: var(--grey-light)
cursor: pointer
@media (min-width: 992px)
font-size: 12px
// .sacrifice-adder-balance
// margin-left: auto
// .sacrifice-adder-max
@@ -574,19 +585,11 @@ function showSuccessToast(value, header, subheader, info) {
.sacrifice-to-wrapper
display: flex
flex-direction: column
gap: 24px
.sarcrifice-to-input
gap: 18px
.sacrifice-to-body
display: flex
justify-content: space-between
.sacrifice-logo
img
width: 45px
height: 45px
border-radius: 50%
pointer-events: none
@media (min-width: 992px)
height: 82px
width: 82px
height: 56px
.sacrificed-info
display: flex
padding: 8px 24px
+23 -19
View File
@@ -22,7 +22,7 @@
<div class="connected-stake-headline mid-mid-text">
<slot name="headline" v-if="variant !== 2">Staked</slot>
</div>
<div class="connected-stake-subheadline">
<div class="connected-stake-subheadline low-mid-text">
<slot name="subheadline"
>Stake for a 25% bonus on your sacrifice.<br />
Upper limit is your stake.</slot
@@ -176,8 +176,15 @@ function openUnstake() {
async function orderUnstake() {
loading.value = true;
var result = await rewardLockerStore.orderUnstake();
console.log("orderUnstake", result);
state.value = 2;
var hash = await rewardLockerStore.orderUnstake();
state.value = 3;
const data = await waitForTransaction({
hash: hash,
});
state.value = 4;
await walletStore.loadWalletData();
showSuccessToast();
loading.value = false;
}
@@ -192,7 +199,12 @@ async function stakeToken() {
console.log("data", data);
state.value = 4;
await walletStore.loadWalletData();
showSuccessToast();
showSuccessToast(
tokenNumber.value,
"Success!",
"You just staked",
"Your next sacrifice will get an extra staking bonus as a reward."
);
//reload data
} catch (error) {
state.value = 0;
@@ -215,7 +227,7 @@ const stateStake = computed(() => {
return returnState;
});
function showSuccessToast() {
function showSuccessToast(value, header, subheader, info) {
// Define the content object with the component, props and listeners
const content = {
component: StakeSuccessToast,
@@ -223,10 +235,10 @@ function showSuccessToast() {
props: {
// counter: this.counter,
// value: tokenStore.activeToken.rewards?.toFixed(5),
value: tokenNumber.value,
header: "Success!",
subheader: "You just staked",
info: "Your next sacrifice will get an extra staking bonus as a reward.",
value: value,
header: header,
subheader: subheader,
info: info,
},
// Listen and react to events using callbacks. In this case we listen for
// the "click" event emitted when clicking the toast button
@@ -248,20 +260,15 @@ function showSuccessToast() {
<style lang="sass">
.connected-stake-subheadline
font-size: 16px
@media (min-width: 992px)
font-size: 24px
.stake-component--variant2
border-radius: 16px
background: var(--darkgrey, #202020)
display: flex
flex-direction: column
gap: 24px
gap: 18px
padding: 8px
@media (min-width: 992px)
padding: 32px 64px
padding: 24px 48px
.unstake-menu
display: flex
flex-direction: column
@@ -275,9 +282,6 @@ function showSuccessToast() {
.connected-stake
.connected-stake-headline
text-align: left
font-size: 18px
.connected-stake-subheadline
font-size: 16px
.connected-stake-body
.token-price-wrapper, .stake-reward
.token-name
+16 -19
View File
@@ -43,24 +43,18 @@
<div class="rewards-total-wrapper">
<div class="rewards-total-headline low-mid-text">Total Reward</div>
<div class="rewards-total-inner bloodline-border bloodline-border--variant1">
<div class="rewards-body">
<div class="rewards-coin low-mid-text">$BLOOD</div>
<token-name-price
name="$BLOOD"
:price="getCurrentRoundData?.rewards_total?.toFixed(5)"
></token-name-price>
<token-logo img="/assets/img/vampir.png" :alt="'vampire'"></token-logo>
<!-- <div class="rewards-coin low-mid-text">$BLOOD</div>
<div class="rewards-amount header" v-if="activeRound === currentRound">0</div>
<div class="rewards-amount header" v-else>{{ getCurrentRoundData?.rewards_total.toFixed(5) }}</div>
</div>
<img class="bloodline-token" src="/assets/img/token/bloodline.png" alt="vampir" />
<div class="rewards-amount header" v-else>{{ getCurrentRoundData?.rewards_total.toFixed(5) }}</div> -->
<!-- </div> -->
<!-- <img class="bloodline-token" src="/assets/img/token/bloodline.png" alt="vampir" /> -->
</div>
</div>
<!-- <div class="claim-button">
<button v-if="activeRound === currentRound" class="btn btn-immortal" @click="router.push({ name: 'home' })">
Sacrifice
</button>
<div class="stake-buttons" v-else-if="getCurrentRoundData?.rewards_total > 0">
<div class="btn btn-immortal" @click="claimRewards">Claim</div>
<div class="btn btn-immortal">Stake</div>
</div>
<div v-else class="btn btn-immortal btn--disabled">Nothing to claim</div>
</div> -->
<div class="claim-button">
<template v-if="!walletStore.connected">
<button class="btn btn-immortal sub-header" @click="showPanel = true">Connect</button>
@@ -100,7 +94,7 @@
</Transition>
</template>
<template v-else>
<div class="btn btn-immortal btn--disabled">Nothing to claim</div>
<div class="btn btn-immortal btn--disabled sub-header">Nothing to claim</div>
</template>
</div>
</div>
@@ -117,6 +111,8 @@ import { useRouter } from "vue-router";
import StakeMenu from "@/components/StakeMenu.vue";
import { waitForTransaction } from "@wagmi/core";
import LoadingComponent from "@/components/LoadingComponent.vue";
import TokenNamePrice from "@/components/TokenNamePrice.vue";
import TokenLogo from "@/components/TokenLogo.vue";
const clanRewards = ref(0);
const rewards = ref(0);
@@ -200,9 +196,8 @@ const stateClaimedComp = computed(() => {
gap: 8px
@media (min-width: 992px)
gap: 32px
div
flex: 1 1 50%
.rewards-wrapper
// div
// flex: 1 1 50%
margin-bottom: 16px
.rewards-divider
text-align: center
@@ -217,6 +212,8 @@ const stateClaimedComp = computed(() => {
display: flex
justify-content: space-between
text-align: left
box-sizing: content-box
height: 56px
.rewards-left
display: flex
flex-direction: column
+38 -19
View File
@@ -1,20 +1,31 @@
<template>
<div class="token-input">
<div class="sarcrifice-from-input">
<input @input="emit('update:modelValue', $event.target.value)" :value="props.modelValue" :placeholder="0" />
<div class="sacrifice-logo" v-if="props.logo">
<img :src="props.logo" alt="vampir" />
</div>
</div>
<div class="left-side">
<input
@input="emit('update:modelValue', $event.target.value)"
:value="props.modelValue"
:placeholder="0"
/>
<div class="value-adder">
<slot class="value-adder" name="message"></slot>
<slot name="message-end"></slot>
</div>
</div>
<div class="right-side">
<token-logo :img="props.logo" :alt="'vampir'"></token-logo>
<!-- <div class="sacrifice-logo" v-if="props.logo">
<img :src="props.logo" alt="vampir" />
</div> -->
</div>
</div>
</div>
</template>
<script setup>
import TokenLogo from "@/components/TokenLogo.vue";
const props = defineProps({
modelValue: [String, Number],
logo: String,
@@ -27,8 +38,12 @@ const emit = defineEmits(["update:modelValue"]);
.sarcrifice-from-input
display: flex
margin-bottom: 8px
@media (min-width: 992px)
height: 60px
gap: 8px
.left-side
display: flex
flex-direction: column
gap: 12px
flex: 1 1 auto
input
width: 100%
height: 45px
@@ -37,17 +52,6 @@ const emit = defineEmits(["update:modelValue"]);
padding: 0 16px
@media (min-width: 992px)
font-size: 24px
height: auto
.sacrifice-logo
margin-left: 16px
img
width: 45px
height: 45px
border-radius: 50%
pointer-events: none
@media (min-width: 992px)
height: 100%
width: auto
.value-adder
display: flex
gap: 8px
@@ -61,4 +65,19 @@ const emit = defineEmits(["update:modelValue"]);
&:hover,&:active, &:focus
background-color: var(--grey-light)
cursor: pointer
.right-side
display: flex
flex-direction: column
height: 45px
.sacrifice-logo
margin-left: 16px
height: 45px
img
width: 45px
height: 45px
border-radius: 50%
pointer-events: none
@media (min-width: 992px)
height: 100%
width: auto
</style>
+3 -2
View File
@@ -13,12 +13,13 @@ const props = defineProps({
<style lang="sass">
.token-logo
height: 100%
img
width: 45px
height: 45px
border-radius: 50%
pointer-events: none
@media (min-width: 992px)
width: 65px
height: 65px
width: auto
height: 100%
</style>
+2 -1
View File
@@ -16,5 +16,6 @@ const props = defineProps({
.token-price-wrapper
display: flex
flex-direction: column
gap: 4px
gap: 6px
text-align: left
</style>
+15
View File
@@ -167,6 +167,21 @@ watchContractEvent(
}
);
watchContractEvent(
{
address: rewardLockerStore.config.contractAddress,
abi: rewardLockerStore.config.abi,
eventName: "RoundCompleted",
},
async (log) => {
console.log("roundCompleted", log);
await roundsStore.fillRound(roundsStore.currentRound);
roundsStore.currentRound++;
await roundsStore.fillRound(roundsStore.currentRound);
}
);
watchAccount(async (account) => {
console.log("watchAccount", account);
+1 -1
View File
@@ -168,7 +168,7 @@ export const useRoundsStore = defineStore("rounds", {
rewards_clan: Number(rewards_clan),
rewards_staking: Number(rewards_staking),
rewards_sacrifice: Number(rewards_sacrifice),
rewards_total: Number(rewards_clan + rewards_sacrifice),
rewards_total: Number(rewards_clan) + Number(rewards_sacrifice) + Number(rewards_staking),
token: tokenArray,
};
console.log("this.rounds[roundNumber]", this.rounds[roundNumber]);
+1 -1
View File
@@ -221,7 +221,7 @@ function timeBetweenDates(expirationTimestamp) {
&.stuck
background: #2D2D2D
@media (min-width: 992px)
top: 127px
top: 96px
.slider-text
margin: 0 24px
margin-top: auto
+3 -1
View File
@@ -76,7 +76,7 @@ function openTutorialFunc(e) {
margin-top: 24px
margin-bottom: 48px
@media (min-width: 992px)
font-size: 64px
font-size: 48px
margin-top: 0px
line-height: unset
text-shadow: unset
@@ -115,6 +115,8 @@ function openTutorialFunc(e) {
margin-right: auto
pointer-events: none
user-select: none
@media (min-width: 992px)
width: 100%
.chart-wrapper
width: 600px
height: 600px
+2 -2
View File
@@ -253,10 +253,10 @@ const rounds = computed(() => {
background: var(--darkgrey, #202020)
display: flex
flex-direction: column
gap: 24px
gap: 18px
padding: 8px
@media (min-width: 992px)
padding: 32px 64px
padding: 24px 48px
.total-rewards-inner
border-radius: 16px
border: 2px solid var(--grey, #858585)