update contracts+ desktop version

This commit is contained in:
EmberSpirit
2023-09-24 11:38:12 +02:00
parent 1b2ea9b2a2
commit 5c7053c0d9
40 changed files with 2327 additions and 2586 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

+46 -11
View File
@@ -1,5 +1,5 @@
<script setup>
import { onMounted, onUnmounted, provide, ref } from "vue";
import { onMounted, onUnmounted, provide, ref, watch } from "vue";
import { storeToRefs } from "pinia";
import { useRoute, useRouter } from "vue-router";
@@ -56,6 +56,17 @@ onUnmounted(() => {
clientClientEvent.value();
console.log("unsubscribe");
});
watch(showPanel, (newValue, oldValue) => {
console.log("document.body", document.body);
console.log("newValue", newValue);
if (newValue) {
document.body.classList.add("sideoutpanel-open");
} else {
document.body.classList.remove("sideoutpanel-open");
}
});
const handleWindowSizeChange = () => {
isMobile.value = isMobileFunc();
// your code
@@ -139,7 +150,7 @@ onMounted(async () => {
<div class="header">
<img alt="logo" class="logo" src="/assets/img/vampir.png" />
</div>
<div class="subheader low-mid-text">
<div class="subheader toast-header">
Success!<br />
You turned your meme into:
</div>
@@ -147,7 +158,7 @@ onMounted(async () => {
<div class="token-amount number-mobile">{{ tokenStore.activeToken.rewards }}</div>
<div class="token-name">$Blood</div>
</div>
<div class="info low-mid-text">
<div class="info toast-body">
You can claim once the current cycle is finished and your clan bonus was calculated
</div>
</div>
@@ -179,7 +190,7 @@ onMounted(async () => {
</div>
</div>
</div>
<div class="mobile-navigation-bar" v-if="isMobile && walletStore.connected">
<div class="mobile-navigation-bar" v-if="isMobile">
<div @click="changeRoute('home')" :class="{ active: route.name === 'home' }">
<font-awesome-icon icon="fa-droplet" />
</div>
@@ -193,10 +204,6 @@ onMounted(async () => {
</template>
<style lang="sass">
header
margin-bottom: 100px
@media (min-width: 992px)
margin-bottom: 200px
.footer
height: auto
@@ -235,7 +242,12 @@ header
.social-bloodline-badge-icon
font-size: 16px
.main
padding-top: 24px
// padding-top: 24px
margin-top: 82px
padding: 24px 0
@media (min-width: 992px)
margin-top: 128px
padding: 80px 0
&.mobile
&.no-scroll
overflow: hidden
@@ -263,13 +275,15 @@ header
.modal-overlay
background-color: rgb(15, 15, 15, 0.7)
height: 100vh
width: 100vw
position: fixed
left: 0
bottom: 0
width: 100%
z-index: 10
@media (min-width: 992px)
background-color: unset
.modal-card
min-width: 342px
width: 342px
text-align: center
position: absolute
top: 50%
@@ -279,6 +293,11 @@ header
background: var(--midnight-black, #0F0F0F)
z-index: 100
gap: 16px
@media (min-width: 992px)
top: 142px
right: 24px
left: unset
transform: unset
.body
display: flex
flex-direction: column
@@ -291,4 +310,20 @@ header
img
width: 74px
height: 74px
body::-webkit-scrollbar
width: 10px
body::-webkit-scrollbar-track
background: #202020
body::-webkit-scrollbar-thumb
background: #202020
body:hover::-webkit-scrollbar-thumb
background: grey
.toast-header, .toast-body
font-size: 16px
</style>
+1 -1
View File
@@ -1,6 +1,6 @@
{
"contractName": "Bloodline",
"contractAddress": "0xda743950e70F9483ED1fDccb529c62a73BF80014",
"contractAddress": "0x00E5DAd5dA0FC4Da0baB7f0D99E28C07d8A88ee4",
"abi": [
{
"inputs": [
+38 -36
View File
@@ -1,6 +1,6 @@
{
"contractName": "LiquidityOwner",
"contractAddress": "0xB6B58b4fD73e6bc4fcA72Fa9d40255D60950ca4B",
"contractAddress": "0x947f05D74ac7dA0Eb0CA88eF9b579D196B178BaE",
"abi": [
{
"inputs": [
@@ -368,6 +368,42 @@
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "developerFee",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountOfETHToPaySender",
"type": "uint256"
}
],
"name": "payDeveloperFeeAndForGas",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "uniswapPool",
"type": "address"
},
{
"internalType": "uint256",
"name": "extraAmount",
"type": "uint256"
}
],
"name": "payWETHToUniswapPool",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
@@ -442,41 +478,7 @@
"type": "uint256"
}
],
"name": "triggeredByMemeAltar",
"outputs": [
{
"internalType": "uint256",
"name": "issuancePrice",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "payForGas",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "memeAltarGasPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "consumedGasByMemeAltar",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "collectedEthInRound",
"type": "uint256"
}
],
"name": "triggeredByMemeAltar",
"name": "triggerRoundCompleted",
"outputs": [
{
"internalType": "uint256",
+368
View File
@@ -0,0 +1,368 @@
{
"contractName": "Meme",
"contractAddress": "0xC99B9d1693b71eF503c86B4cC05f141714176E5b",
"abi": [
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "address",
"name": "_weth",
"type": "address"
},
{
"internalType": "address",
"name": "_uniV2Factory",
"type": "address"
}
],
"stateMutability": "payable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [],
"name": "DOMAIN_SEPARATOR",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "burn",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "mint",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "nonces",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "permit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "uniV2Pool",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
}
+368
View File
@@ -0,0 +1,368 @@
{
"contractName": "Meme",
"contractAddress": "0xBCf48173f0767465Ef22fcDe2e1a099C8A5B4712",
"abi": [
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "address",
"name": "_weth",
"type": "address"
},
{
"internalType": "address",
"name": "_uniV2Factory",
"type": "address"
}
],
"stateMutability": "payable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [],
"name": "DOMAIN_SEPARATOR",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "burn",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "mint",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "nonces",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "permit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "uniV2Pool",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
}
+368
View File
@@ -0,0 +1,368 @@
{
"contractName": "Meme",
"contractAddress": "0xD563C6d061c5fc09eCf94c6Ce30CB400Ce2FD295",
"abi": [
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "address",
"name": "_weth",
"type": "address"
},
{
"internalType": "address",
"name": "_uniV2Factory",
"type": "address"
}
],
"stateMutability": "payable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [],
"name": "DOMAIN_SEPARATOR",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "burn",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "mint",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "nonces",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "permit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "uniV2Pool",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
}
+157 -85
View File
@@ -1,6 +1,6 @@
{
"contractName": "MemeAltar",
"contractAddress": "0x6Def7896c714b77bD9BcD6BF5d88A1e7000C86dE",
"contractAddress": "0x9842954639aF0c1d7A692222955868806287aeEA",
"abi": [
{
"inputs": [
@@ -19,11 +19,6 @@
"name": "_weth",
"type": "address"
},
{
"internalType": "address",
"name": "_developer",
"type": "address"
},
{
"internalType": "address",
"name": "_admin",
@@ -40,9 +35,9 @@
"type": "address"
},
{
"internalType": "uint256[]",
"name": "roundGoals",
"type": "uint256[]"
"internalType": "uint112",
"name": "_defaultGoal",
"type": "uint112"
}
],
"stateMutability": "nonpayable",
@@ -55,7 +50,7 @@
},
{
"inputs": [],
"name": "Impossible",
"name": "InsufficientOutputAmount",
"type": "error"
},
{
@@ -88,6 +83,11 @@
"name": "RoundCompletedRegistrationFailed",
"type": "error"
},
{
"inputs": [],
"name": "SwitchRequiresMemeBeSet",
"type": "error"
},
{
"inputs": [],
"name": "TokenIsNotInSacrificableList",
@@ -192,37 +192,37 @@
{
"components": [
{
"internalType": "uint8",
"internalType": "uint40",
"name": "b1",
"type": "uint8"
"type": "uint40"
},
{
"internalType": "uint8",
"internalType": "uint40",
"name": "m1",
"type": "uint8"
"type": "uint40"
},
{
"internalType": "uint8",
"internalType": "uint40",
"name": "b2",
"type": "uint8"
"type": "uint40"
},
{
"internalType": "uint8",
"internalType": "uint40",
"name": "m2",
"type": "uint8"
"type": "uint40"
},
{
"internalType": "uint8",
"internalType": "uint40",
"name": "b3",
"type": "uint8"
"type": "uint40"
},
{
"internalType": "uint8",
"internalType": "uint40",
"name": "m4",
"type": "uint8"
"type": "uint40"
}
],
"indexed": true,
"indexed": false,
"internalType": "struct MemeAltar.BM",
"name": "_bm",
"type": "tuple"
@@ -286,34 +286,34 @@
{
"components": [
{
"internalType": "uint8",
"internalType": "uint40",
"name": "b1",
"type": "uint8"
"type": "uint40"
},
{
"internalType": "uint8",
"internalType": "uint40",
"name": "m1",
"type": "uint8"
"type": "uint40"
},
{
"internalType": "uint8",
"internalType": "uint40",
"name": "b2",
"type": "uint8"
"type": "uint40"
},
{
"internalType": "uint8",
"internalType": "uint40",
"name": "m2",
"type": "uint8"
"type": "uint40"
},
{
"internalType": "uint8",
"internalType": "uint40",
"name": "b3",
"type": "uint8"
"type": "uint40"
},
{
"internalType": "uint8",
"internalType": "uint40",
"name": "m4",
"type": "uint8"
"type": "uint40"
}
],
"internalType": "struct MemeAltar.BM",
@@ -335,9 +335,9 @@
{
"inputs": [
{
"internalType": "uint256",
"internalType": "uint112",
"name": "newDefaultGoal",
"type": "uint256"
"type": "uint112"
}
],
"name": "adjustDefaultGoal",
@@ -354,9 +354,9 @@
{
"inputs": [
{
"internalType": "uint256",
"internalType": "uint32",
"name": "newDurationLimit",
"type": "uint256"
"type": "uint32"
}
],
"name": "adjustRoundDurationLimit",
@@ -401,34 +401,34 @@
"name": "bm",
"outputs": [
{
"internalType": "uint8",
"internalType": "uint40",
"name": "b1",
"type": "uint8"
"type": "uint40"
},
{
"internalType": "uint8",
"internalType": "uint40",
"name": "m1",
"type": "uint8"
"type": "uint40"
},
{
"internalType": "uint8",
"internalType": "uint40",
"name": "b2",
"type": "uint8"
"type": "uint40"
},
{
"internalType": "uint8",
"internalType": "uint40",
"name": "m2",
"type": "uint8"
"type": "uint40"
},
{
"internalType": "uint8",
"internalType": "uint40",
"name": "b3",
"type": "uint8"
"type": "uint40"
},
{
"internalType": "uint8",
"internalType": "uint40",
"name": "m4",
"type": "uint8"
"type": "uint40"
}
],
"stateMutability": "view",
@@ -439,9 +439,9 @@
"name": "currentRound",
"outputs": [
{
"internalType": "uint256",
"internalType": "uint112",
"name": "",
"type": "uint256"
"type": "uint112"
}
],
"stateMutability": "view",
@@ -452,8 +452,37 @@
"name": "defaultGoal",
"outputs": [
{
"internalType": "uint256",
"internalType": "uint112",
"name": "",
"type": "uint112"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "memeToSacrifice",
"type": "address"
},
{
"internalType": "uint256",
"name": "amountToSacrifice",
"type": "uint256"
},
{
"internalType": "bool",
"name": "roundParticipant",
"type": "bool"
}
],
"name": "getAmountETHBase",
"outputs": [
{
"internalType": "uint256",
"name": "amountETHBase",
"type": "uint256"
}
],
@@ -466,6 +495,11 @@
"internalType": "address",
"name": "memeToSacrifice",
"type": "address"
},
{
"internalType": "bool",
"name": "buyFunc",
"type": "bool"
}
],
"name": "getAmountToReachGoal",
@@ -482,12 +516,12 @@
{
"inputs": [
{
"internalType": "uint256",
"internalType": "uint112",
"name": "roundNumber",
"type": "uint256"
"type": "uint112"
}
],
"name": "getGoalInBLD",
"name": "getGoalInBLOOD",
"outputs": [
{
"internalType": "uint256",
@@ -511,7 +545,7 @@
"type": "uint256"
}
],
"name": "getRewardFor",
"name": "getRewardForSacrifice",
"outputs": [
{
"internalType": "uint256",
@@ -525,9 +559,9 @@
{
"inputs": [
{
"internalType": "uint256",
"internalType": "uint112",
"name": "roundNumber",
"type": "uint256"
"type": "uint112"
},
{
"internalType": "address",
@@ -652,9 +686,9 @@
"name": "roundDurationLimit",
"outputs": [
{
"internalType": "uint256",
"internalType": "uint32",
"name": "",
"type": "uint256"
"type": "uint32"
}
],
"stateMutability": "view",
@@ -663,27 +697,27 @@
{
"inputs": [
{
"internalType": "uint256",
"internalType": "uint112",
"name": "",
"type": "uint256"
"type": "uint112"
}
],
"name": "rounds",
"outputs": [
{
"internalType": "uint256",
"internalType": "uint112",
"name": "goal",
"type": "uint256"
"type": "uint112"
},
{
"internalType": "uint256",
"name": "expirationTimestamp",
"type": "uint256"
},
{
"internalType": "uint256",
"internalType": "uint112",
"name": "ethUsedToBuy",
"type": "uint256"
"type": "uint112"
},
{
"internalType": "uint32",
"name": "expirationTimestamp",
"type": "uint32"
}
],
"stateMutability": "view",
@@ -700,14 +734,19 @@
"internalType": "uint256",
"name": "amountToSacrifice",
"type": "uint256"
},
{
"internalType": "uint112",
"name": "minETH",
"type": "uint112"
}
],
"name": "sacrificeMeme",
"outputs": [
{
"internalType": "uint256",
"internalType": "uint128",
"name": "reward",
"type": "uint256"
"type": "uint128"
}
],
"stateMutability": "nonpayable",
@@ -715,11 +754,6 @@
},
{
"inputs": [
{
"internalType": "uint256",
"name": "minBLD",
"type": "uint256"
},
{
"internalType": "address",
"name": "memeToSacrifice",
@@ -729,9 +763,14 @@
"internalType": "uint256",
"name": "amountToSacrifice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minBLOOD",
"type": "uint256"
}
],
"name": "sacrificeMemeAndBuyBLD",
"name": "sacrificeMemeAndBuyBLOOD",
"outputs": [
{
"internalType": "uint256",
@@ -774,6 +813,43 @@
"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": [],
"name": "uniV3Pool",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
@@ -809,10 +885,6 @@
],
"stateMutability": "view",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
]
}
-736
View File
@@ -1,736 +0,0 @@
{
"contractName": "MemeBurner",
"contractAddress": "0xc9cC73C414f122f85EfE20382EB753d29C5a0351",
"abi": [
{
"inputs": [
{
"internalType": "address[]",
"name": "sacrificableList",
"type": "address[]"
},
{
"internalType": "address[]",
"name": "uniV2pools",
"type": "address[]"
},
{
"internalType": "address",
"name": "_weth",
"type": "address"
},
{
"internalType": "address",
"name": "_developer",
"type": "address"
},
{
"internalType": "address",
"name": "_admin",
"type": "address"
},
{
"internalType": "address",
"name": "_rewardLocker",
"type": "address"
},
{
"internalType": "address",
"name": "_memeToken",
"type": "address"
},
{
"internalType": "uint256[]",
"name": "roundGoals",
"type": "uint256[]"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "ArraysHaveDifferentLength",
"type": "error"
},
{
"inputs": [],
"name": "Impossible",
"type": "error"
},
{
"inputs": [],
"name": "LiquidityOwnerAlreadyInitialized",
"type": "error"
},
{
"inputs": [],
"name": "LiquidityOwnerTriggerFailed",
"type": "error"
},
{
"inputs": [],
"name": "MemeIsNotInAList",
"type": "error"
},
{
"inputs": [],
"name": "NextRoundRegistrationFailed",
"type": "error"
},
{
"inputs": [],
"name": "NothingToSacrifice",
"type": "error"
},
{
"inputs": [],
"name": "RewardRegistrationFailed",
"type": "error"
},
{
"inputs": [],
"name": "RoundCompletedRegistrationFailed",
"type": "error"
},
{
"inputs": [],
"name": "TokenIsNotInSacrificableList",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "uniV2Pool",
"type": "address"
}
],
"name": "UniV2PoolWithoutLiquidity",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "roundNumber",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "meme",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "memeMarket",
"type": "address"
}
],
"name": "MemeAddedToSacrificableList",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "roundNumber",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "meme",
"type": "address"
}
],
"name": "MemeRemovedFromSacrificableList",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sacrificer",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sacrificedToken",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "sacrificedAmount",
"type": "uint256"
}
],
"name": "MemeSacrificed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "newAdmin",
"type": "address"
}
],
"name": "NewAdmin",
"type": "event"
},
{
"anonymous": false,
"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"
}
],
"indexed": true,
"internalType": "struct MemeBurner.BM",
"name": "_bm",
"type": "tuple"
}
],
"name": "NewBM",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "newDefaultGoal",
"type": "uint256"
}
],
"name": "NewDefaultRoundGoal",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "newDurationLimit",
"type": "uint256"
}
],
"name": "NewRoundDurationLimit",
"type": "event"
},
{
"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 MemeBurner.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": [],
"name": "admin",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "bm",
"outputs": [
{
"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"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "currentRound",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "defaultGoal",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "memeToSacrifice",
"type": "address"
}
],
"name": "getAmountToReachGoal",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "roundNumber",
"type": "uint256"
}
],
"name": "getGoalInBLD",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "memeToSacrifice",
"type": "address"
},
{
"internalType": "uint256",
"name": "amountToSacrifice",
"type": "uint256"
}
],
"name": "getRewardFor",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "roundNumber",
"type": "uint256"
},
{
"internalType": "address",
"name": "meme",
"type": "address"
}
],
"name": "getSacrificedMeme",
"outputs": [
{
"internalType": "bool",
"name": "participation",
"type": "bool"
},
{
"internalType": "uint256",
"name": "amountAchieved",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "liquidityOwner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "memeList",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "memesUniV2Pools",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "meme",
"type": "address"
}
],
"name": "removeMemeFromList",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "rewardLocker",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "roundDurationLimit",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "rounds",
"outputs": [
{
"internalType": "uint256",
"name": "goal",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "expirationTimestamp",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "memeToSacrifice",
"type": "address"
},
{
"internalType": "uint256",
"name": "amountToSacrifice",
"type": "uint256"
}
],
"name": "sacrificeMeme",
"outputs": [
{
"internalType": "uint256",
"name": "reward",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_liquidityOwner",
"type": "address"
}
],
"name": "setLiquidityOwner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newAdmin",
"type": "address"
}
],
"name": "switchAdmin",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "weth",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
}
@@ -1,13 +1,36 @@
{
"contractName": "MemeToken",
"contractAddress": "0x9dcD7Cd83ED0Fe69DDfE3c2A265a1207F2Bc3219",
"Meme1": {
"address": "0x4435ABC578136e2Eca50b5EFf950F17CAF42485b",
"uniV2Pool": "0xdD84B97DbA213e1aAdFEFD3de7067fC4Ab357378"
},
"Meme2": {
"address": "0xa0B7b2a78dF87eDc70736f7ED9D40d86c37B533F",
"uniV2Pool": "0xe9428ba55920DAB804153E9c4E8910EF1564a2b9"
},
"Meme3": {
"address": "0xC99B9d1693b71eF503c86B4cC05f141714176E5b",
"uniV2Pool": "0x905F0FA7F878eB8bd50782F9a4B739fb50394715"
},
"Meme4": {
"address": "0xBCf48173f0767465Ef22fcDe2e1a099C8A5B4712",
"uniV2Pool": "0x32Ba68Da1d5Df661181C8CA420b96925bFc748AA"
},
"Meme5": {
"address": "0xD563C6d061c5fc09eCf94c6Ce30CB400Ce2FD295",
"uniV2Pool": "0xf51E0b3804945d05eC20a4a1a2B0F7eD5BFf0068"
},
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_rewardLocker",
"type": "address"
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "address",
@@ -16,23 +39,13 @@
},
{
"internalType": "address",
"name": "_nfPositionManager",
"name": "_uniV2Factory",
"type": "address"
},
{
"internalType": "uint160[2]",
"name": "_sqrtPricesX96",
"type": "uint160[2]"
}
],
"stateMutability": "nonpayable",
"stateMutability": "payable",
"type": "constructor"
},
{
"inputs": [],
"name": "NotAllowedToMint",
"type": "error"
},
{
"anonymous": false,
"inputs": [
@@ -191,18 +204,13 @@
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "mintMemeToken",
"name": "mint",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
@@ -282,19 +290,6 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "rewardLocker",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
@@ -376,7 +371,7 @@
},
{
"inputs": [],
"name": "uniV3Pool",
"name": "uniV2Pool",
"outputs": [
{
"internalType": "address",
+1 -30
View File
@@ -1,6 +1,6 @@
{
"contractName": "RewardLocker",
"contractAddress": "0xc180014777BC1E0720dDD4CA5952c1Cd277f7afE",
"contractAddress": "0xc9f5F78320D0f75099eEA8f8F6FD35BF246f0916",
"abi": [
{
"inputs": [
@@ -516,35 +516,6 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
},
{
"internalType": "address",
"name": "_sacrificedToken",
"type": "address"
},
{
"internalType": "uint256",
"name": "reward",
"type": "uint256"
}
],
"name": "registerRewardNextRound",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
File diff suppressed because one or more lines are too long
-992
View File
@@ -1,992 +0,0 @@
{
"contractName": "OurUniV3Pool",
"contractAddress": "0xCc08EECAD5cE5c47bD7B51385b701d00c8Bdfa90",
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"indexed": true,
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"indexed": false,
"internalType": "uint128",
"name": "amount",
"type": "uint128"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount0",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount1",
"type": "uint256"
}
],
"name": "Burn",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"indexed": true,
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"indexed": true,
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"indexed": false,
"internalType": "uint128",
"name": "amount0",
"type": "uint128"
},
{
"indexed": false,
"internalType": "uint128",
"name": "amount1",
"type": "uint128"
}
],
"name": "Collect",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"indexed": false,
"internalType": "uint128",
"name": "amount0",
"type": "uint128"
},
{
"indexed": false,
"internalType": "uint128",
"name": "amount1",
"type": "uint128"
}
],
"name": "CollectProtocol",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount0",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount1",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "paid0",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "paid1",
"type": "uint256"
}
],
"name": "Flash",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint16",
"name": "observationCardinalityNextOld",
"type": "uint16"
},
{
"indexed": false,
"internalType": "uint16",
"name": "observationCardinalityNextNew",
"type": "uint16"
}
],
"name": "IncreaseObservationCardinalityNext",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint160",
"name": "sqrtPriceX96",
"type": "uint160"
},
{
"indexed": false,
"internalType": "int24",
"name": "tick",
"type": "int24"
}
],
"name": "Initialize",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"indexed": true,
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"indexed": false,
"internalType": "uint128",
"name": "amount",
"type": "uint128"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount0",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount1",
"type": "uint256"
}
],
"name": "Mint",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "feeProtocol0Old",
"type": "uint8"
},
{
"indexed": false,
"internalType": "uint8",
"name": "feeProtocol1Old",
"type": "uint8"
},
{
"indexed": false,
"internalType": "uint8",
"name": "feeProtocol0New",
"type": "uint8"
},
{
"indexed": false,
"internalType": "uint8",
"name": "feeProtocol1New",
"type": "uint8"
}
],
"name": "SetFeeProtocol",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"indexed": false,
"internalType": "int256",
"name": "amount0",
"type": "int256"
},
{
"indexed": false,
"internalType": "int256",
"name": "amount1",
"type": "int256"
},
{
"indexed": false,
"internalType": "uint160",
"name": "sqrtPriceX96",
"type": "uint160"
},
{
"indexed": false,
"internalType": "uint128",
"name": "liquidity",
"type": "uint128"
},
{
"indexed": false,
"internalType": "int24",
"name": "tick",
"type": "int24"
}
],
"name": "Swap",
"type": "event"
},
{
"inputs": [
{
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"internalType": "uint128",
"name": "amount",
"type": "uint128"
}
],
"name": "burn",
"outputs": [
{
"internalType": "uint256",
"name": "amount0",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount1",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"internalType": "uint128",
"name": "amount0Requested",
"type": "uint128"
},
{
"internalType": "uint128",
"name": "amount1Requested",
"type": "uint128"
}
],
"name": "collect",
"outputs": [
{
"internalType": "uint128",
"name": "amount0",
"type": "uint128"
},
{
"internalType": "uint128",
"name": "amount1",
"type": "uint128"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint128",
"name": "amount0Requested",
"type": "uint128"
},
{
"internalType": "uint128",
"name": "amount1Requested",
"type": "uint128"
}
],
"name": "collectProtocol",
"outputs": [
{
"internalType": "uint128",
"name": "amount0",
"type": "uint128"
},
{
"internalType": "uint128",
"name": "amount1",
"type": "uint128"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "factory",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "fee",
"outputs": [
{
"internalType": "uint24",
"name": "",
"type": "uint24"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "feeGrowthGlobal0X128",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "feeGrowthGlobal1X128",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount0",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount1",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "flash",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint16",
"name": "observationCardinalityNext",
"type": "uint16"
}
],
"name": "increaseObservationCardinalityNext",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint160",
"name": "sqrtPriceX96",
"type": "uint160"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "liquidity",
"outputs": [
{
"internalType": "uint128",
"name": "",
"type": "uint128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "maxLiquidityPerTick",
"outputs": [
{
"internalType": "uint128",
"name": "",
"type": "uint128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"internalType": "uint128",
"name": "amount",
"type": "uint128"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "mint",
"outputs": [
{
"internalType": "uint256",
"name": "amount0",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount1",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "observations",
"outputs": [
{
"internalType": "uint32",
"name": "blockTimestamp",
"type": "uint32"
},
{
"internalType": "int56",
"name": "tickCumulative",
"type": "int56"
},
{
"internalType": "uint160",
"name": "secondsPerLiquidityCumulativeX128",
"type": "uint160"
},
{
"internalType": "bool",
"name": "initialized",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32[]",
"name": "secondsAgos",
"type": "uint32[]"
}
],
"name": "observe",
"outputs": [
{
"internalType": "int56[]",
"name": "tickCumulatives",
"type": "int56[]"
},
{
"internalType": "uint160[]",
"name": "secondsPerLiquidityCumulativeX128s",
"type": "uint160[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "positions",
"outputs": [
{
"internalType": "uint128",
"name": "liquidity",
"type": "uint128"
},
{
"internalType": "uint256",
"name": "feeGrowthInside0LastX128",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "feeGrowthInside1LastX128",
"type": "uint256"
},
{
"internalType": "uint128",
"name": "tokensOwed0",
"type": "uint128"
},
{
"internalType": "uint128",
"name": "tokensOwed1",
"type": "uint128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "protocolFees",
"outputs": [
{
"internalType": "uint128",
"name": "token0",
"type": "uint128"
},
{
"internalType": "uint128",
"name": "token1",
"type": "uint128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "feeProtocol0",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "feeProtocol1",
"type": "uint8"
}
],
"name": "setFeeProtocol",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "slot0",
"outputs": [
{
"internalType": "uint160",
"name": "sqrtPriceX96",
"type": "uint160"
},
{
"internalType": "int24",
"name": "tick",
"type": "int24"
},
{
"internalType": "uint16",
"name": "observationIndex",
"type": "uint16"
},
{
"internalType": "uint16",
"name": "observationCardinality",
"type": "uint16"
},
{
"internalType": "uint16",
"name": "observationCardinalityNext",
"type": "uint16"
},
{
"internalType": "uint8",
"name": "feeProtocol",
"type": "uint8"
},
{
"internalType": "bool",
"name": "unlocked",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
}
],
"name": "snapshotCumulativesInside",
"outputs": [
{
"internalType": "int56",
"name": "tickCumulativeInside",
"type": "int56"
},
{
"internalType": "uint160",
"name": "secondsPerLiquidityInsideX128",
"type": "uint160"
},
{
"internalType": "uint32",
"name": "secondsInside",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "bool",
"name": "zeroForOne",
"type": "bool"
},
{
"internalType": "int256",
"name": "amountSpecified",
"type": "int256"
},
{
"internalType": "uint160",
"name": "sqrtPriceLimitX96",
"type": "uint160"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "swap",
"outputs": [
{
"internalType": "int256",
"name": "amount0",
"type": "int256"
},
{
"internalType": "int256",
"name": "amount1",
"type": "int256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "int16",
"name": "",
"type": "int16"
}
],
"name": "tickBitmap",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "tickSpacing",
"outputs": [
{
"internalType": "int24",
"name": "",
"type": "int24"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "int24",
"name": "",
"type": "int24"
}
],
"name": "ticks",
"outputs": [
{
"internalType": "uint128",
"name": "liquidityGross",
"type": "uint128"
},
{
"internalType": "int128",
"name": "liquidityNet",
"type": "int128"
},
{
"internalType": "uint256",
"name": "feeGrowthOutside0X128",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "feeGrowthOutside1X128",
"type": "uint256"
},
{
"internalType": "int56",
"name": "tickCumulativeOutside",
"type": "int56"
},
{
"internalType": "uint160",
"name": "secondsPerLiquidityOutsideX128",
"type": "uint160"
},
{
"internalType": "uint32",
"name": "secondsOutside",
"type": "uint32"
},
{
"internalType": "bool",
"name": "initialized",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "token0",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "token1",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
}
+2 -1
View File
@@ -7,6 +7,8 @@
display: block
width: 100%
text-decoration: none
&:hover,&:focus,&:active
cursor: pointer
&[disabled], &.btn--disabled
background-color: darken($purple, 10%)
cursor: not-allowed
@@ -20,4 +22,3 @@
cursor: not-allowed
&:hover,&:focus,&:active
background-color: darken($purple, 10%),
cursor: pointer
+8 -5
View File
@@ -17,11 +17,15 @@ body
background-color: #2D2D2D
color: $white
font-family: 'Inter', sans-serif
&.sideoutpanel-open
&:not(.mobile)
overflow-y: hidden
padding-right: 10px
.navbar
padding-right: 10px
html
font-size: var(--font-size-main)
html, body, #app
height: 100%
body
margin: 0
@@ -29,10 +33,9 @@ body
#app
display: flex
flex-direction: column
height: 100vh
.footer
margin-top: auto
@media (min-width: 992px)
margin-top: 80px
.container
margin-right: auto
@@ -44,7 +47,7 @@ body
// max-width: 800px
// padding: 24px 64px
@media (min-width: 992px)
max-width: 800px
max-width: 860px
h1
font-weight: 700
+6 -2
View File
@@ -10,7 +10,8 @@ $tertiary-light: lighten($tertiary, 20%)
$white: #F9F9FA
$black: #0F0F0F
$grey: #808080
$grey: #858585
$grey-light: lighten($grey, 20%)
$red: #8B0000
$purple: #4B0082
$midnight-black: #0F0F0F
@@ -31,7 +32,8 @@ $button-background-color: $black
--tertiary-light: #{$tertiary-light}
--tertiary-dark: #{$tertiary-dark}
--white: #{#F9F9FA}
--grey: #{#858585}
--grey: #{$grey}
--grey-light: #{$grey-light}
--grey2: #{$grey2}
--dark-grey: #{$dark-grey}
--purple: #{$purple}
@@ -69,6 +71,8 @@ $button-background-color: $black
font-style: normal
font-weight: 400
line-height: normal
@media (min-width: 992px)
font-size: 18px
.number-mobile
font-family: Inter
font-size: 24px
+40 -28
View File
@@ -1,5 +1,5 @@
<template>
<stake-component v-if="walletStore.memeToken?.unclaimedRewards > 0">
<stake-component>
<template v-slot:headline> Unclaimed </template>
<template v-slot:body>
<token-name-price
@@ -9,36 +9,46 @@
<token-logo img="/assets/img/token/bloodline.png" :alt="'bloodline logo'"></token-logo>
</template>
<template v-slot:actions>
<Transition name="smooth">
<div class="connected-stake-buttons" v-show="!stakeMenu">
<div class="btn btn-immortal" @click="rewardLockerStore.claimAll">Claim</div>
<div class="btn btn-immortal" @click="openStake">Stake</div>
<template v-if="walletStore.memeToken?.unclaimedRewards > 0">
<Transition name="smooth">
<div class="connected-stake-buttons" v-show="!stakeMenu">
<div class="btn btn-immortal mid-mid-text" @click="rewardLockerStore.claimAll">Claim</div>
<div class="btn btn-immortal mid-mid-text" @click="openStake">Stake</div>
</div>
</Transition>
<Transition name="smooth">
<stake-menu
v-model="tokenNumber"
@close="stakeMenu = false"
:amount="walletStore.memeToken?.unclaimedRewards"
:stake="stake"
v-if="stakeMenu"
>
<template v-slot:body>
<div class="btn btn-immortal stake-button" @click="stakeAndClaimAllRounds">
Stake & Claim Rest
</div>
<div
class="btn transparent small-text cancel-button text-center"
@click="stakeMenu = false"
>
Cancel
</div>
</template>
</stake-menu>
</Transition>
<div class="connected-stake-first-round small-text text-center">
You can claim, once the cycle is over.
</div>
</Transition>
<Transition name="smooth">
<stake-menu
v-model="tokenNumber"
@close="stakeMenu = false"
:amount="walletStore.memeToken?.unclaimedRewards"
:stake="stake"
v-if="stakeMenu"
>
<template v-slot:body>
<div class="btn btn-immortal stake-button" @click="stakeAndClaimAllRounds">
Stake & Claim Rest
</div>
<div class="btn transparent small-text cancel-button text-center" @click="stakeMenu = false">
Cancel
</div>
</template>
</stake-menu>
</Transition>
<div class="connected-stake-first-round small-text text-center">You can claim, once the cycle is over.</div>
</template>
<template v-else>
<div class="btn btn-immortal mid-mid-text text-center" @click="router.push({ name: 'home' })">
Go to Sacrifice
</div>
<div class="small-text text-center">Sacrifice to earn $BLOOD</div>
</template>
</template>
</stake-component>
<stake-component dense v-else>
<div class="text-center">All Claimed</div>
</stake-component>
</template>
<script setup>
@@ -51,10 +61,12 @@ import TokenLogo from "@/components/TokenLogo.vue";
import { useWalletStoreV2 } from "@/stores/walletV2";
import { useTokenStore } from "@/stores/tokens";
import { useRewardLockerStore } from "@/stores/rewardlocker";
import { useRouter } from "vue-router";
const rewardLockerStore = useRewardLockerStore();
const walletStore = useWalletStoreV2();
const tokenStore = useTokenStore();
const router = useRouter();
const props = defineProps({
stakeonly: {
+104 -115
View File
@@ -1,75 +1,58 @@
<template>
<div class="connect-wallet-headline">Connect Wallet</div>
<div class="connectors-wrapper" v-if="!walletStore.connected">
<div
class="connectors-element"
v-for="connector in walletStore.config?.connectors"
@click="connectWallet(connector)"
>
<div class="connector-icon">
<img :src="`/assets/img/connectors/${connector.id}.svg`" :alt="`${connector.name} Logo`" />
<div class="connect-wallet-wrapper">
<template v-if="!walletStore.connected">
<div class="connect-wallet-headline low-mid-text">Connect your wallet</div>
<div class="connectors-wrapper">
<div
class="connectors-element card"
v-for="connector in walletStore.config?.connectors"
@click="connectWallet(connector)"
>
<div class="connector-icon">
<img :src="`/assets/img/connectors/${connector.id}.svg`" :alt="`${connector.name} Logo`" />
</div>
<div class="connector-name">{{ connector.name }}</div>
</div>
</div>
<div class="connector-name">{{ connector.name }}</div>
</div>
<div>
Are you coming from Binance, Poloniex, Kucoin or any other CEX?<br />
<br />
You don't have a wallet yet?<br /><br />
Follow these instructions first.
</div>
</div>
<div v-else>
<div class="connected-header">
<div class="connected-header-avatar">
<img :src="getblocky(walletStore.address)" alt="avatar" />
<div>Are you coming from Binance, Bybit, Kucoin or any other crypto exchange?</div>
<div>Follow these instructions first.</div>
</template>
<template v-else>
<div class="connected-header">
<div class="connected-header-avatar">
<img :src="getblocky(walletStore.address)" alt="avatar" />
</div>
<div class="connected-header-address">
{{ getAddressShortName(walletStore.address) }}
</div>
<div class="connected-header-logout" @click="disconnectWallet">
<font-awesome-icon :icon="['fas', 'fa-arrow-right-from-bracket']" />
</div>
</div>
<div class="connected-header-address">
{{ getAddressShortName(walletStore.address) }}
</div>
<div class="connected-header-logout" @click="disconnectWallet">
<font-awesome-icon :icon="['fas', 'fa-arrow-right-from-bracket']" />
</div>
</div>
<div class="connected-tokens-headline">Your Tokens</div>
<div class="connected-tokens">
<div class="connected-token" v-for="token in walletStore.token">
<token-name-price
:name="tokenStore.getToken(token.contractAddress).name"
:price="token.balanceOf"
></token-name-price>
<div class="connected-token-button">
<div class="bloodline-badge grey" @click="badgeClick(token)">
<div
class="bloodline-badge-text"
v-if="tokenStore.memeToken.contractAddress === token.contractAddress"
>
Buy
<div class="connected-tokens-headline">Your Tokens</div>
<div class="connected-tokens">
<div class="connected-token" v-for="token in walletStore.token">
<token-name-price
:name="tokenStore.getToken(token.contractAddress).name"
:price="token.balanceOf"
></token-name-price>
<div class="connected-token-button">
<div class="bloodline-badge grey" @click="badgeClick(token)">
<div
class="bloodline-badge-text"
v-if="tokenStore.memeToken.contractAddress === token.contractAddress"
>
Buy
</div>
<div v-else class="bloodline-badge-text">Sacrifice</div>
</div>
<div v-else class="bloodline-badge-text">Sacrifice</div>
</div>
<token-logo :img="tokenStore.getToken(token.contractAddress).logo" :alt="'test'"></token-logo>
</div>
<token-logo :img="tokenStore.getToken(token.contractAddress).logo" :alt="'test'"></token-logo>
</div>
</div>
<!-- <stake-component>
<template v-slot:headline> Staked </template>
<template v-slot:subheadline>
Stake for a 25% bonus on your sacrifice. Upper limit is your stake.
</template>
<template v-slot:actions>
<div class="connected-stake-buttons" v-if="!stakeMenu">
<div class="btn btn-immortal" @click="openStake">Stake</div>
<div
v-if="walletStore.memeToken?.staked === 0 && !stakeonly"
class="btn btn-immortal btn--disabled"
>
Unstake
</div>
<div v-else-if="!stakeonly" class="btn btn-immortal" @click="openUnstake">Unstake</div>
</div>
</template>
</stake-component> -->
<stake-component-v1></stake-component-v1>
<stake-component-v1 :variant="3"></stake-component-v1>
</template>
</div>
</template>
@@ -129,65 +112,71 @@ async function connectWallet(connector) {
</script>
<style lang="sass">
.connect-wallet-headline
font-family: Inter
font-size: 18px
font-style: normal
font-weight: 400
line-height: normal
.connectors-wrapper
.connect-wallet-wrapper
display: flex
flex-direction: column
gap: 8px
margin: 24px 0
.connectors-element
gap: 24px
.connectors-wrapper
display: flex
padding: 12px
border: 1px solid rgba(152, 161, 192, 0.24)
background-color: #202020
&:hover, &:active, &:focus
background-color: lighten(#202020, 20%)
cursor: pointer
.connector-icon
border-radius: 12px
width: 40px
overflow: hidden
height: 40px
.connector-name
padding: 0 8px
align-self: center
flex-direction: column
gap: 8px
.connectors-element
display: flex
padding: 12px
border: 1px solid rgba(152, 161, 192, 0.24)
background: var(--grey, #858585)
color: var(--midnight-black, #0F0F0F)
&:hover, &:active, &:focus
background-color: lighten(#858585, 20%)
cursor: pointer
.connector-icon
border-radius: 12px
width: 40px
overflow: hidden
height: 40px
.connector-name
padding: 0 8px
align-self: center
font-size: 16px
@media (min-width: 992px)
font-size: 18px
.connected-header
margin-bottom: 24px
display: flex
gap: 16px
align-items: center
.connected-header-avatar
img
border-radius: 8px
.connected-header-logout
margin-left: auto
svg
font-size: 25px
.connected-tokens-headline
font-size: 18px
margin-bottom: 16px
.connected-tokens
display: flex
flex-direction: column
gap: 16px
margin-bottom: 24px
.connected-token
.connected-header
margin-bottom: 24px
display: flex
gap: 16px
align-items: center
.connected-token-button
.connected-header-avatar
img
border-radius: 8px
.connected-header-logout
margin-left: auto
.bloodline-badge
padding: 4px 16px
color: black
font-size: 14px
svg
font-size: 25px
.connected-tokens-headline
font-size: 18px
margin-bottom: 16px
.connected-tokens
display: flex
flex-direction: column
gap: 16px
margin-bottom: 24px
.connected-token
display: flex
gap: 16px
align-items: center
.connected-token-button
margin-left: auto
.bloodline-badge
padding: 4px 16px
color: black
font-size: 14px
&:hover, &:active, &:focus
cursor: pointer
background-color: var(--grey-light)
</style>
+43
View File
@@ -0,0 +1,43 @@
<template>
<div class="loading-container">
<div class="blood"></div>
<div class="blood"></div>
<div class="blood"></div>
</div>
</template>
<style lang="sass">
.loading-container
display: flex
align-items: center
justify-content: center
gap: 10px
.blood
width: 15px
height: 15px
border: 1px solid black
border-radius: 0% 100% 100% 100%
transform: rotate(45deg)
animation: blink 1s infinite
@media (min-width: 992px)
width: 20px
height: 20px
.blood
&:nth-child(1)
animation-delay: -.2s
&:nth-child(2)
animation-delay: 0.2s
&:nth-child(3)
animation-delay: 0.5s
@keyframes blink
0%
background-color: transparent
50%
background-color: red
</style>
+141 -121
View File
@@ -1,17 +1,16 @@
<template>
<header>
<div class="navbar" :class="{ 'navbar--hidden': !showNavbar }">
<div class="navbar-inner">
<div class="navbar-icon">
<router-link to="/">
<img alt="logo" class="logo" src="/assets/img/vampir.png" />
</router-link>
</div>
<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="navbar" :class="{ 'navbar--hidden': !showNavbar }">
<div class="navbar-inner">
<div class="navbar-icon">
<router-link to="/">
<img alt="logo" class="logo" src="/assets/img/vampir.png" />
</router-link>
</div>
<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" />
@@ -31,45 +30,50 @@
<div class="social-bloodline-badge-text">Twitter</div>
</div>
</div> -->
</div>
<div class="navbar-end">
<div class="navbar-navigation mid-text" v-if="!isMobile">
<div
class="navbar-navigation-link"
v-for="link in links"
:key="link.name"
:class="{ active: link.name === route.name }"
@click="router.push(link.path)"
>
<div class="icon">
<img :src="link.icon" alt="" />
</div>
<div class="text">{{ link.title }}</div>
</div>
</div>
<div class="navbar-end">
<div class="navbar-navigation mid-text" v-if="!isMobile && connected">
<div
class="navbar-navigation-link"
v-for="link in links"
:key="link.name"
:class="{ active: link.name === route.name }"
@click="router.push(link.path)"
>
<div class="icon">
<img :src="link.icon" alt="" />
</div>
<div class="text">{{ link.title }}</div>
</div>
<div v-if="!isMobile">
<!-- <div v-if="!connected" class="btn btn-immortal" @click="walletStore.connectWallet">connect</div> -->
<div v-if="!address" class="btn btn-immortal mid-text" @click="showPanel = true">connect</div>
<!-- <span v-else @click="showPanel = true"> test</span> -->
<div class="login-icon-desktop mid-text" v-else @click="showPanel = true">
<img :src="getblocky(address)" alt="avatar" />
<div>{{ getAddressShortName(walletStore.address) }}</div>
</div>
<div v-if="!isMobile">
<!-- <div v-if="!connected" class="btn btn-immortal" @click="walletStore.connectWallet">connect</div> -->
<div v-if="!address" class="btn btn-immortal mid-text" @click="showPanel = true">connect</div>
<!-- <span v-else @click="showPanel = true"> test</span> -->
<div v-else @click="showPanel = true"><img :src="getblocky(address)" alt="avatar" /></div>
</div>
<div v-else @click="showPanel = true">
<div class="login-icon" v-if="!address">
<font-awesome-icon :icon="['fas', 'fa-arrow-right-to-bracket']" />
</div>
<div v-else @click="showPanel = true">
<div class="login-icon" v-if="!address">
<font-awesome-icon :icon="['fas', 'fa-arrow-right-to-bracket']" />
</div>
<div v-else><img :src="getblocky(address)" alt="avatar" /></div>
<div v-else>
<img :src="getblocky(address)" alt="avatar" />
</div>
</div>
</div>
</div>
</header>
</div>
</template>
<script setup>
import { storeToRefs } from "pinia";
import { ref, onMounted, onBeforeUnmount, inject } from "vue";
import { useWalletStoreV2 } from "@/stores/walletV2";
import { getblocky } from "@/helper/helper.js";
import { getblocky, getAddressShortName } from "@/helper/helper.js";
import { useRoute, useRouter } from "vue-router";
const emit = defineEmits(["showPanel"]);
@@ -124,99 +128,115 @@ onBeforeUnmount(() => {
</script>
<style lang="sass" scoped>
header
// margin-bottom: 82px
// @media (min-width: 992px)
// margin-bottom: 128px
// margin-bottom: 82px
// @media (min-width: 992px)
// margin-bottom: 128px
.navbar
position: fixed
z-index: 3
.navbar
position: fixed
z-index: 3
box-sizing: border-box
background-color: #202020
width: 100%
transform: translate3d(0,0,0)
transition: transform .3s ease,visibility 0s .3s linear
height: 82px
@media (min-width: 992px)
height: 128px
// &.navbar--hidden
// transform: translate3d(0,-100%,0)
.navbar-inner
display: flex
padding: 16px 24px
box-sizing: border-box
background-color: #202020
width: 100%
transform: translate3d(0,0,0)
transition: transform .3s ease,visibility 0s .3s linear
height: 82px
height: 100%
align-items: center
@media (min-width: 992px)
height: 128px
// &.navbar--hidden
// transform: translate3d(0,-100%,0)
.navbar-inner
display: flex
padding: 16px 24px
box-sizing: border-box
height: 100%
align-items: center
@media (min-width: 992px)
padding: 16px 24px
.navbar-icon
img
height: 50px
width: 50px
.navbar-text
font-family: 'Vampire', sans-serif
font-size: 36px
margin-left: 16px
letter-spacing: 0.138em
line-height: 73.107px
.navbar-icon
img
height: 50px
width: 50px
@media (min-width: 992px)
font-size: 64px
a
text-decoration: none
color: white
.navbar-center
height: 75px
width: 75px
.navbar-text
font-family: 'Vampire', sans-serif
font-size: 36px
margin-left: 16px
letter-spacing: 0.138em
line-height: 73.107px
@media (min-width: 992px)
font-size: 64px
a
text-decoration: none
color: white
.navbar-center
display: flex
margin-left: auto
.navbar-social-links
display: flex
margin-left: auto
.navbar-social-links
gap: 18px
.social-bloodline-badge
font-size: 16px
padding: 8px 16px 8px 16px
border-radius: 14px
background-color: #0F0F0F
display: flex
gap: 18px
.social-bloodline-badge
font-size: 16px
padding: 8px 16px 8px 16px
border-radius: 14px
background-color: #0F0F0F
display: flex
&:hover,&:active,&:focus
background-color: lighten(#0F0F0F, 10%)
cursor: pointer
.social-bloodline-badge-icon
margin-right: 8px
.navbar-end
&:hover,&:active,&:focus
background-color: lighten(#0F0F0F, 10%)
cursor: pointer
.social-bloodline-badge-icon
margin-right: 8px
.navbar-end
display: flex
margin-left: auto
gap: 80px
.navbar-navigation
display: flex
margin-left: auto
gap: 80px
.navbar-navigation
align-items: center
gap: 48px
.navbar-navigation-link
display: flex
align-items: center
gap: 48px
.navbar-navigation-link
display: flex
gap: 8px
&.active
border-bottom: 2px solid white
&:active, &:hover, &:focus
cursor: pointer
.icon
img
width: 20px
height: 20px
gap: 8px
border-bottom: 2px solid transparent
&.active
border-bottom: 2px solid white
&:active, &:hover, &:focus
cursor: pointer
.icon
img
width: 20px
height: 20px
.login-icon
color: var(--white)
background-color: var(--purple)
padding: 8px
font-size: 25px
border-radius: 8px
width: 44px
height: 44px
display: flex
justify-content: center
align-items: center
.login-icon
color: var(--white)
background-color: var(--purple)
padding: 8px
font-size: 25px
border-radius: 8px
width: 44px
height: 44px
display: flex
justify-content: center
align-items: center
img
width: 32px
height: 32px
border-radius: 8px
.login-icon-desktop
display: flex
padding: 8px
align-items: center
gap: 16px
border-radius: 16px
background: var(--Background-grey, #2D2D2D)
&:hover,&:active,&:focus
cursor: pointer
img
width: 32px
height: 32px
border-radius: 8px
width: 45px
height: 45px
</style>
+244 -217
View File
@@ -1,161 +1,162 @@
<template>
<div class="sacrifice-wrapper card card--glow bloodline-wrapper">
<!-- {{ activeToken.allowance }} -->
<div class="sacrifice-inner">
<div class="sacrifice-headline">Select Sacrifice</div>
<div class="sacrifice-select-tokens">
<div class="sacrifice-tokens">
<div
class="sacrifice-token"
:class="[
{
'sacrifice-token--active': token.contractAddress === activeToken.contractAddress,
'bloodline-border': token.contractAddress === activeToken.contractAddress,
'bloodline-border--variant1': token.contractAddress === activeToken.contractAddress,
},
]"
v-for="token in props.data"
:key="token.contractAddress"
@click="tokenStore.changeActiveToken(token)"
>
<div class="sacrifice-token-logo">
<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-headline">Select Sacrifice</div>
<div class="sacrifice-select-tokens">
<div class="sacrifice-tokens">
<div
class="sacrifice-token"
:class="[
{
'sacrifice-token--active': token.contractAddress === activeToken.contractAddress,
'bloodline-border': token.contractAddress === activeToken.contractAddress,
'bloodline-border--variant1': token.contractAddress === activeToken.contractAddress,
},
]"
v-for="token in props.data"
:key="token.contractAddress"
@click="tokenStore.changeActiveToken(token)"
>
<div class="sacrifice-token-logo">
<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>
</div>
<div class="sacrifice-from-to-wrapper" v-if="activeToken.contractAddress">
<div
:class="{
'sacrifice-from-wrapper': true,
'bloodline-border': true,
'bloodline-border--variant1': true,
purple: true,
}"
</div>
<div class="sacrifice-from-to-wrapper" v-if="activeToken.contractAddress">
<div
:class="{
'sacrifice-from-wrapper': true,
'bloodline-border': true,
'bloodline-border--variant1': true,
purple: true,
}"
>
<token-input
:modelValue="tokenNumber"
@input="
($event) => {
tokenNumber = $event.target.value;
return getRewardsFor($event.target.value);
}
"
:logo="activeToken.logo"
>
<div class="sarcrifice-from-input">
<input
@input="($event) => getRewardsFor($event.target.value)"
v-model="tokenNumber"
:placeholder="0"
/>
<div class="sacrifice-logo">
<img :src="activeToken.logo" alt="vampir" />
</div>
</div>
<div class="value-adder">
<template v-slot:message>
<div class="sacrifice-adder-step bloodline-badge" @click="addTokens(10000000)">+10m</div>
<div class="sacrifice-adder-step bloodline-badge" @click="addTokens(100000000)">+100m</div>
<div class="sacrifice-adder-step bloodline-badge" @click="addTokens(1000000000)">+1b</div>
<!-- <div class="sacrifice-adder-balance">Balance: {{ parseFloat(activeToken.balance) }}</div>
<div class="sacrifice-adder-max" @click="tokenNumber = parseFloat(activeToken.balance)">
Max
</div> -->
</div>
</div>
<div class="sacrifice-divider bloodline-devider">
<font-awesome-icon :icon="['fas', 'arrow-down']" />
</div>
<div
:class="{
'sacrifice-from-wrapper': true,
'bloodline-border': true,
'bloodline-border--variant1': true,
purple: output && output > 0,
}"
>
<div class="sarcrifice-from-input">
<div class="sacrifice-to-output">
<div class="sacrifice-to-output-coin">$BLOOD</div>
<div class="sacrifice-to-output-rewards">{{ output }}</div>
</div>
<div class="sacrifice-logo">
<img :src="activeToken.vamp?.logo" :alt="activeToken.vamp.name" />
</template>
</token-input>
</div>
<div class="sacrifice-divider bloodline-devider">
<font-awesome-icon :icon="['fas', 'arrow-down']" />
</div>
<div
:class="{
'sacrifice-to-wrapper': true,
'bloodline-border': true,
'bloodline-border--variant1': true,
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 }}
</div>
</div>
<div class="sacrifice-staking-bonus">
<div
class="sacrifice-staking-bonus-inner"
@click="
(e) => {
showStakingMenu = !showStakingMenu;
}
"
>
<div class="mid-mid-text">+ Staking Bonus</div>
<div class="icon">
<font-awesome-icon icon="chevron-down" />
</div>
<div class="sacrifice-logo">
<img :src="activeToken.vamp?.logo" :alt="activeToken.vamp.name" />
</div>
</div>
<div class="sacrifice-staking-bonus">
<div
class="sacrifice-staking-bonus-inner"
@click="
(e) => {
showStakingMenu = !showStakingMenu;
}
"
>
<div class="mid-mid-text">+ Staking Bonus</div>
<div class="icon">
<font-awesome-icon icon="chevron-down" />
</div>
<stake-component-v1 :variant="1" v-if="showStakingMenu">
<template v-slot:headline> {{ null }}</template>
</stake-component-v1>
</div>
<stake-component-v1 :variant="1" v-if="showStakingMenu">
<template v-slot:headline> {{ null }}</template>
</stake-component-v1>
<!-- <stake-component v-if="showStakingMenu" stakeonly class="variant1"></stake-component> -->
</div>
<!-- <stake-component v-if="showStakingMenu" stakeonly class="variant1"></stake-component> -->
</div>
<div class="sacrificed-info" v-if="state === 4">
<div class="left low-mid-text">You can claim your $BLOOD when the cycle is finished.</div>
<div class="right">
<img src="/assets/img/moon.png" alt="moon" />
</div>
</div>
<div class="sacrificed-info" v-if="state === 4">
<div class="left low-mid-text">You can claim your $BLOOD when the cycle is finished.</div>
<div class="right">
<img src="/assets/img/moon.png" alt="moon" />
</div>
<div class="sacrifice-fees-info-wrapper">
<div class="sacrifice-fees-img">
<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-title">Gas Subsidy</div>
<div class="sacrifice-fees-body-header-amount">≤30 Gwei</div>
</div>
<div class="sacrifice-fees-body-subheader">The clan pays your transaction.</div>
</div>
</div>
<div class="sacrifice-fees-info-wrapper">
<div class="sacrifice-fees-img">
<img src="/assets/img/fuel-noozle.png" alt="fuel noozle" />
</div>
<div class="sacrifice-buttons-function-wrapper">
<template v-if="walletStore.connected">
<div class="btn btn-immortal sub-header" disabled v-if="state === 0">Enter Amount</div>
<div
class="btn btn-immortal"
v-if="
activeToken.allowance > 0 &&
activeToken.allowance >= tokenNumber &&
(state === 1 || state === 4)
"
@click="sacrificeToken(tokenNumber)"
>
Sacrifce
</div>
<div
class="btn btn-immortal sub-header"
v-if="
(!activeToken.allowance || activeToken.allowance < tokenNumber) &&
(state === 1 || state === 4)
"
@click="approveToken(tokenNumber)"
>
Approve Token
</div>
<div class="btn btn-immortal" disabled v-if="state === 2">Sign Transaction</div>
<div class="btn btn-immortal" disabled v-if="state === 3">Loading...</div>
</template>
<template v-else>
<div class="btn btn-immortal" @click="showPanel = true">Connect</div>
</template>
<div class="sacrifice-fees-body">
<div class="sacrifice-fees-body-header">
<div class="sacrifice-fees-body-header-title">Gas Subsidy</div>
<div class="sacrifice-fees-body-header-amount">≤30 Gwei</div>
</div>
<div class="sacrifice-fees-body-subheader">The clan pays your transaction.</div>
</div>
</div>
<div class="sacrifice-buttons-function-wrapper">
<template v-if="walletStore.connected">
<div class="btn btn-immortal sub-header" disabled v-if="state === 0">Enter Amount</div>
<div
class="btn btn-immortal sub-header"
v-if="
activeToken.allowance > 0 &&
activeToken.allowance >= tokenNumber &&
(state === 1 || state === 4)
"
@click="sacrificeToken(tokenNumber)"
>
Sacrifice 🩸
</div>
<div
class="btn btn-immortal sub-header"
v-if="
(!activeToken.allowance || activeToken.allowance < tokenNumber) &&
(state === 1 || state === 4)
"
@click="approveToken(tokenNumber)"
>
Approve Token
</div>
<div class="btn btn-immortal sub-header" disabled v-if="state === 2">Sign Transaction</div>
<div class="btn btn-immortal sub-header" disabled v-if="state === 3">
<loading-component></loading-component>
</div>
</template>
<template v-else>
<div class="btn btn-immortal sub-header" @click="showPanel = true">Connect</div>
</template>
</div>
</div>
</div>
</template>
<script setup>
import { ref, defineProps, watch, inject, computed } from "vue";
import { ref, defineProps, watch, inject, nextTick } from "vue";
import { useWalletStoreV2 } from "@/stores/walletV2";
import { useTokenStore } from "@/stores/tokens";
import { useMemeburnerStore } from "@/stores/memeburner";
import StakeComponentV1 from "@/components/StakeComponentV1.vue";
import LoadingComponent from "@/components/LoadingComponent.vue";
import TokenInput from "@/components/TokenInput.vue";
import { storeToRefs } from "pinia";
import { waitForTransaction } from "@wagmi/core";
@@ -169,7 +170,7 @@ const walletStore = useWalletStoreV2();
// const { connected } = storeToRefs(walletStore);
const tokenStore = useTokenStore();
const { activeToken, loading } = storeToRefs(tokenStore);
const { activeToken } = storeToRefs(tokenStore);
const memeburnerStore = useMemeburnerStore();
@@ -187,6 +188,7 @@ const props = defineProps({
const tokenNumber = ref(null);
const output = ref(0);
const loading = ref(false);
/**
* state 0 enter amount
* state 1 rdy to go
@@ -227,8 +229,8 @@ async function approveToken(amount) {
const data = await waitForTransaction({
hash: hash,
});
activeToken.value.allowance = await tokenStore.allowance();
console.log("data", data);
activeToken.value.allowance = await tokenStore.allowance();
state.value = 1;
} catch (error) {
console.error(error);
@@ -239,21 +241,25 @@ async function approveToken(amount) {
}
async function getRewardsFor(value) {
if (!value || isNaN(value)) {
output.value = 0;
state.value = 0;
return;
loading.value = true;
try {
if (!value || isNaN(value)) {
output.value = 0;
state.value = 0;
return;
}
const rewardsForResult = await memeburnerStore.getRewardFor(
BigInt(value * Math.pow(10, activeToken.value.decimals))
);
state.value = 1;
output.value = rewardsForResult / BigInt(Math.pow(10, tokenStore.memeToken.decimals));
tokenStore.activeToken.rewards = output.value;
return output.value;
} catch (error) {
console.log("error", error);
} finally {
loading.value = false;
}
const rewardsForResult = await memeburnerStore.getRewardFor(
BigInt(value * Math.pow(10, activeToken.value.decimals))
);
// var test = await memeburnerStore.getRewardsFor(10000);
// console.log("test", test);
// const rewardsForResult = await tokenStore.getRewardsFor(10000);
state.value = 1;
output.value = rewardsForResult / BigInt(Math.pow(10, tokenStore.memeToken.decimals));
tokenStore.activeToken.rewards = output.value;
return output.value;
}
async function addTokens(value) {
@@ -271,88 +277,89 @@ async function addTokens(value) {
background-color: var(--primary)
padding: 24px
align-items: center
.sacrifice-inner
@media (min-width: 992px)
padding: 48px 64px
.sacrifice-headline
text-align: center
font-size: 24px
margin-bottom: 32px
@media (min-width: 992px)
padding: 48px 64px
.sacrifice-headline
text-align: center
font-size: 24px
margin-bottom: 32px
@media (min-width: 992px)
font-size: 36px
.sacrifice-select-tokens
display: flex
margin-bottom: 32px
.sacrifice-tokens
display: flex
width: 100%
justify-content: center
flex-wrap: wrap
gap: 12px
font-size: 36px
.sacrifice-select-tokens
display: flex
margin-bottom: 32px
.sacrifice-tokens
display: flex
width: 100%
justify-content: center
flex-wrap: wrap
gap: 12px
.sacrifice-token
border-radius: 16px
padding: 12px
cursor: pointer
background-color: #0F0F0F
text-align: center
user-select: none
border: 4px solid transparent
.sacrifice-token-logo
pointer-events: none
// @media (min-width: 992px)
// 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
justify-content: center
display: block
@media (min-width: 992px)
display: flex
.btn
padding: 16px 64px
.sacrifice-fees-info-wrapper
display: flex
border: 2px dashed var(--grey)
color: var(--grey)
.sacrifice-token
border-radius: 16px
padding: 16px
font-size: 16px
gap: 16px
.sacrifice-fees-img
img
height: 46px
.sacrifice-fees-body
flex: 1 1 auto
.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
padding: 12px
cursor: pointer
background-color: #0F0F0F
text-align: center
user-select: none
border: 4px solid transparent
.sacrifice-token-logo
pointer-events: none
// @media (min-width: 992px)
// 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
justify-content: center
display: block
@media (min-width: 992px)
display: flex
.btn
padding: 16px 64px
.sacrifice-fees-info-wrapper
display: flex
border: 2px dashed var(--grey)
color: var(--grey)
border-radius: 16px
padding: 16px
font-size: 16px
gap: 16px
.sacrifice-fees-img
img
height: 46px
.sacrifice-fees-body
flex: 1 1 auto
.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
display: flex
flex-direction: column
gap: 16px
width: 100%
@media (min-width: 992px)
gap: 32px
.sacrifice-from-wrapper,.sacrifice-to-wrapper
.sacrifice-from-wrapper
.sarcrifice-from-input
display: flex
margin-bottom: 8px
// height: 60px
@media (min-width: 992px)
height: 60px
input
width: 100%
height: 45px
@@ -370,7 +377,7 @@ async function addTokens(value) {
border-radius: 50%
pointer-events: none
@media (min-width: 992px)
height: 83px
height: 100%
width: auto
.sacrifice-to-output
flex: 1 1 auto
@@ -388,10 +395,14 @@ async function addTokens(value) {
gap: 6px
.sacrifice-adder-step
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(--secondary)
background-color: var(--grey-light)
cursor: pointer
// .sacrifice-adder-balance
// margin-left: auto
@@ -404,6 +415,22 @@ async function addTokens(value) {
// color: darken(red, 10%)
// transform: scale(1.1)
// transition: transform 0s
.sacrifice-to-wrapper
display: flex
flex-direction: column
gap: 24px
.sarcrifice-to-input
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
.sacrificed-info
display: flex
padding: 8px 24px
+4 -3
View File
@@ -32,6 +32,7 @@ function testClick(e) {
height: 100%
width: 100%
position: fixed
background-color: rgb(15, 15, 15, 0.7)
.slideout-wrapper
z-index: 100
height: 100svh
@@ -48,12 +49,12 @@ function testClick(e) {
margin-right: -400px
transition: margin-right 250ms ease 0s
width: auto
right: 0
bottom: unset
right: -30px
top: 0
&.open
margin-bottom: -82px
@media (min-width: 992px)
margin-right: 0
margin-right: 30px
.slideout-panel
width: 100%
height: 100%
+5 -2
View File
@@ -1,7 +1,7 @@
<!-- zukünftig card component -->
<template>
<div
class="connected-stake bloodline-border white card"
class="connected-stake bloodline-border card"
:class="{ 'card--dense': dense }"
@click="
(e) => {
@@ -77,6 +77,10 @@ function openUnstake() {
display: flex
flex-direction: column
gap: 16px
border: 2px solid var(--grey, #858585)
border-color: var(--grey, #858585)
@media (min-width: 992px)
padding: 8px 12px
&.connected-stake--variant1
background-color: transparent
border: none
@@ -97,5 +101,4 @@ function openUnstake() {
gap: 16px
div
flex: 1 1 50%
font-size: 18px
</style>
+132 -82
View File
@@ -1,94 +1,108 @@
<template>
<div
class="connected-stake bloodline-border white card"
:class="{ 'card--dense': dense, 'connected-stake--variant1': variant === 1 }"
@click="
(e) => {
e.preventDefault();
e.stopPropagation();
}
"
:class="{
'stake-component--variant1': props.variant === 1,
'stake-component--variant2': props.variant === 2,
'stake-component--variant3': props.variant === 3,
}"
>
<div class="connected-stake-headline mid-mid-text">
<div class="mid-text text-center" v-if="props.variant === 2">
<slot name="headline">Staked</slot>
</div>
<div class="low-mid-text text-center">
<slot name="subheadline">Stake for a 25% bonus on your sacrifice. Upper limit is your stake.</slot>
</div>
<div class="connected-stake-body">
<slot name="body">
<token-name-price
:name="tokenStore.getToken(walletStore.memeToken?.contractAddress)?.name"
:price="walletStore.memeToken?.staked"
></token-name-price>
<token-logo img="/assets/img/token/bloodline.png" :alt="'^y '"></token-logo>
<token-name-price class="stake-reward" name="Extra Reward" price="+20%"></token-name-price>
</slot>
</div>
<slot name="actions">
<div class="connected-stake-buttons" v-if="!stakeMenu">
<div class="btn btn-immortal" disabled v-if="roundStore.currentRound === 1">Stake</div>
<div class="btn btn-immortal" v-else @click="openStake">Stake</div>
<div
class="connected-stake bloodline-border card"
:class="{ 'card--dense': dense, 'connected-stake--variant1': variant === 1 }"
@click="
(e) => {
e.preventDefault();
e.stopPropagation();
}
"
>
<div class="connected-stake-headline mid-mid-text">
<slot name="headline" v-if="variant !== 2">Staked</slot>
</div>
<div class="connected-stake-subheadline">
<slot name="subheadline"
>Stake for a 25% bonus on your sacrifice.<br />
Upper limit is your stake.</slot
>
</div>
<div class="connected-stake-body">
<slot name="body">
<token-name-price
:name="tokenStore.getToken(walletStore.memeToken?.contractAddress)?.name"
:price="walletStore.memeToken?.staked"
></token-name-price>
<token-logo img="/assets/img/token/bloodline.png" :alt="'^y '"></token-logo>
<token-name-price class="stake-reward" name="Extra Reward" price="+20%"></token-name-price>
</slot>
</div>
<slot name="actions">
<div class="connected-stake-buttons" v-if="!stakeMenu">
<div class="btn btn-immortal mid-mid-text" disabled v-if="roundStore.currentRound === 1">Stake</div>
<div class="btn btn-immortal mid-mid-text" v-else @click="openStake">Stake</div>
<div
v-if="(walletStore.memeToken?.staked === 0 && !stakeonly) || roundStore.currentRound === 1"
class="btn btn-immortal btn--disabled mid-mid-text"
>
Unstake
</div>
<div v-else-if="!stakeonly" class="btn btn-immortal mid-mid-text" @click="openUnstake">Unstake</div>
</div>
<Transition name="smooth">
<stake-menu
v-model="tokenNumber"
@close="stakeMenu = false"
:stake="stake"
v-if="stakeMenu & !unstakeMenu"
>
<template v-slot:body>
<div
class="btn btn-immortal stake-button"
@click="rewardLockerStore.stakeBloodline(tokenNumber)"
>
Stake
</div>
<div
class="btn transparent small-text cancel-button text-center"
@click="stakeMenu = false"
>
Cancel
</div>
</template>
</stake-menu>
<div class="unstake-menu" v-else-if="stakeMenu & unstakeMenu">
<div class="low-mid-text text-center">
To prevent users from farming rewards you can claim your stake next cycle.
</div>
<div class="unstake-menu-actions">
<div class="btn btn-immortal stake-button" v-if="!loading" @click="orderUnstake">
Unstake Next Cycle
</div>
<div class="btn btn--disabled" v-else>Sign Transaction</div>
<div
class="btn transparent small-text cancel-button text-center"
@click="stakeMenu = false"
>
Cancel
</div>
</div>
</div>
</Transition>
<!-- todo v-if activeround -->
<div
v-if="(walletStore.memeToken?.staked === 0 && !stakeonly) || roundStore.currentRound === 1"
class="btn btn-immortal btn--disabled"
class="connected-stake-first-round small-text text-center"
v-if="roundStore.currentRound === roundStore.activeRound"
>
Unstake
No $BLOOD on the market. Staking is activated after the first cycle is finished.
</div>
<div v-else-if="!stakeonly" class="btn btn-immortal" @click="openUnstake">Unstake</div>
</div>
<Transition name="smooth">
<stake-menu
v-model="tokenNumber"
@close="stakeMenu = false"
:stake="stake"
v-if="stakeMenu & !unstakeMenu"
>
<template v-slot:body>
<div
class="btn btn-immortal stake-button"
@click="rewardLockerStore.stakeBloodline(tokenNumber)"
>
Stake
</div>
<div class="btn transparent small-text cancel-button text-center" @click="stakeMenu = false">
Cancel
</div>
</template>
</stake-menu>
<div class="unstake-menu" v-else-if="stakeMenu & unstakeMenu">
<div class="low-mid-text text-center">
To prevent users from farming rewards you can claim your stake next cycle.
</div>
<div class="unstake-menu-actions">
<div class="btn btn-immortal stake-button" v-if="!loading" @click="orderUnstake">
Unstake Next Cycle
</div>
<div class="btn btn--disabled" v-else>Sign Transaction</div>
<div class="btn transparent small-text cancel-button text-center" @click="stakeMenu = false">
Cancel
</div>
</div>
<div class="connected-stake-claim-info low-mid-text text-center">
You can claim your stake next cycle.
</div>
</Transition>
<!-- todo v-if activeround -->
<div
class="connected-stake-first-round small-text text-center"
v-if="roundStore.currentRound === roundStore.activeRound"
>
No $BLOOD on the market. Staking is activated after the first cycle is finished.
</div>
<div class="low-mid-text text-center">You can claim your stake next cycle.</div>
</slot>
<slot></slot>
<!-- <div class="connected-stake-buttons" v-if="!stakeMenu">
<div class="btn btn-immortal" @click="openStake">Stake</div>
<div v-if="walletStore.memeToken?.staked === 0 && !stakeonly" class="btn btn-immortal btn--disabled">
Unstake
</div>
<div v-else-if="!stakeonly" class="btn btn-immortal" @click="openUnstake">Unstake</div>
</div> -->
</slot>
<slot></slot>
</div>
</div>
</template>
@@ -149,6 +163,21 @@ async function orderUnstake() {
</script>
<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
padding: 8px
@media (min-width: 992px)
padding: 32px 64px
.unstake-menu
display: flex
flex-direction: column
@@ -157,4 +186,25 @@ async function orderUnstake() {
display: flex
flex-direction: column
gap: 8px
.stake-component--variant3
.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
font-size: 14px
.token-price
font-size: 24px
.connected-stake-buttons
.btn
font-size: 18px
.connected-stake-first-round
font-size: 14px
.connected-stake-claim-info
font-size: 14px
</style>
+3 -19
View File
@@ -1,35 +1,19 @@
<template>
<div class="stake-menu">
<div class="token-input">
<div class="sarcrifice-from-input">
<input
@input="emit('update:modelValue', Number($event.target.value))"
:value="props.modelValue"
:placeholder="0"
/>
</div>
<div class="value-adder">
<div class="stake-adder-step bloodline-badge grey" @click="addTokensPercent(25)">25%</div>
<div class="stake-adder-step bloodline-badge grey" @click="addTokensPercent(50)">50%</div>
<div class="stake-adder-step bloodline-badge grey" @click="addTokensPercent(75)">75%</div>
<div class="stake-adder-step bloodline-badge grey" @click="addTokensPercent(100)">100%</div>
</div>
</div>
<!-- <token-input v-model="tokenNumber">
<token-input :modelValue="props.modelValue" @input="emit('update:modelValue', Number($event.target.value))">
<template v-slot:message>
<div class="stake-adder-step bloodline-badge grey" @click="addTokensPercent(25)">25%</div>
<div class="stake-adder-step bloodline-badge grey" @click="addTokensPercent(50)">50%</div>
<div class="stake-adder-step bloodline-badge grey" @click="addTokensPercent(75)">75%</div>
<div class="stake-adder-step bloodline-badge grey" @click="addTokensPercent(100)">100%</div>
</template>
</token-input> -->
</token-input>
<div class="stake-menu-actions">
<slot name="body">
<div class="input-balance">Balance: {{ walletStore.memeToken.balanceOf }}</div>
<div class="btn btn-immortal stake-button" @click="stakeBloodline" v-if="props.stake">Stake</div>
<div class="btn btn-immortal stake-button" @click="unstakeBloodline" v-else>Unstake for Next Cycle</div>
<div class="btn btn-immortal black cancel-button" @click="emit('close')">Cancel</div>
<div class="btn btn-immortal black" @click="emit('close')">Cancel</div>
</slot>
</div>
</div>
+5 -1
View File
@@ -62,7 +62,10 @@
<div v-else class="btn btn-immortal btn--disabled">Nothing to claim</div>
</div> -->
<div class="claim-button">
<template v-if="activeRound === currentRound">
<template v-if="!walletStore.connected">
<button class="btn btn-immortal sub-header" @click="showPanel = true">Connect</button>
</template>
<template v-else-if="activeRound === currentRound">
<button class="btn btn-immortal sub-header" @click="router.push({ name: 'home' })">Sacrifice</button>
</template>
<template v-else-if="getCurrentRoundData?.rewards_total > 0">
@@ -112,6 +115,7 @@ import StakeMenu from "@/components/StakeMenu.vue";
const clanRewards = ref(0);
const rewards = ref(0);
const isMobile = inject("isMobile");
const showPanel = inject("showPanel");
const rewardLockerStore = useRewardLockerStore();
const walletStore = useWalletStoreV2();
const roundStore = useRoundsStore();
+20 -5
View File
@@ -6,7 +6,11 @@
v-model="props.modelValue"
:placeholder="0"
/>
<div class="sacrifice-logo" v-if="props.logo">
<img :src="props.logo" alt="vampir" />
</div>
</div>
<div class="value-adder">
<slot class="value-adder" name="message"></slot>
</div>
@@ -16,6 +20,7 @@
<script setup>
const props = defineProps({
modelValue: Number,
logo: String,
});
const emit = defineEmits(["update:modelValue"]);
@@ -25,7 +30,8 @@ const emit = defineEmits(["update:modelValue"]);
.sarcrifice-from-input
display: flex
margin-bottom: 8px
// height: 60px
@media (min-width: 992px)
height: 60px
input
width: 100%
height: 45px
@@ -33,8 +39,18 @@ const emit = defineEmits(["update:modelValue"]);
border-radius: 16px
padding: 0 16px
@media (min-width: 992px)
font-size: 32px
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
@@ -46,7 +62,6 @@ const emit = defineEmits(["update:modelValue"]);
border-color: transparent
border-style: solid
&:hover,&:active, &:focus
color: var(--white)
border-color: var(--white)
background-color: var(--black)
background-color: var(--grey-light)
cursor: pointer
</style>
+3
View File
@@ -18,4 +18,7 @@ const props = defineProps({
height: 45px
border-radius: 50%
pointer-events: none
@media (min-width: 992px)
width: 65px
height: 65px
</style>
+4 -3
View File
@@ -1,7 +1,7 @@
<template>
<div class="token-price-wrapper">
<div class="token-name small-text">{{ props.name }}</div>
<div class="token-price number-mobile">{{ props.price }}</div>
<div class="token-price sub-header">{{ props.price }}</div>
</div>
</template>
@@ -14,6 +14,7 @@ const props = defineProps({
<style lang="sass">
.token-price-wrapper
.token-name
margin-bottom: 4px
display: flex
flex-direction: column
gap: 4px
</style>
+88
View File
@@ -0,0 +1,88 @@
<script>
export default {
name: `TransitionExpand`,
functional: true,
render(createElement, context) {
const data = {
props: {
name: `expand`,
},
on: {
afterEnter(element) {
// eslint-disable-next-line no-param-reassign
element.style.height = `auto`;
},
enter(element) {
const { width } = getComputedStyle(element);
/* eslint-disable no-param-reassign */
element.style.width = width;
element.style.position = `absolute`;
element.style.visibility = `hidden`;
element.style.height = `auto`;
/* eslint-enable */
const { height } = getComputedStyle(element);
/* eslint-disable no-param-reassign */
element.style.width = null;
element.style.position = null;
element.style.visibility = null;
element.style.height = 0;
/* eslint-enable */
// Force repaint to make sure the
// animation is triggered correctly.
// eslint-disable-next-line no-unused-expressions
getComputedStyle(element).height;
requestAnimationFrame(() => {
// eslint-disable-next-line no-param-reassign
element.style.height = height;
});
},
leave(element) {
const { height } = getComputedStyle(element);
// eslint-disable-next-line no-param-reassign
element.style.height = height;
// Force repaint to make sure the
// animation is triggered correctly.
// eslint-disable-next-line no-unused-expressions
getComputedStyle(element).height;
requestAnimationFrame(() => {
// eslint-disable-next-line no-param-reassign
element.style.height = 0;
});
},
},
};
return createElement(`transition`, data, context.children);
},
};
</script>
<style scoped>
* {
will-change: height;
transform: translateZ(0);
backface-visibility: hidden;
perspective: 1000px;
}
</style>
<style>
.expand-enter-active,
.expand-leave-active {
transition: height 1s ease-in-out;
overflow: hidden;
}
.expand-enter,
.expand-leave-to {
height: 0;
}
</style>
+1 -1
View File
@@ -23,7 +23,7 @@ export function getAddressShortName(address) {
}
export function numberWithCommas(x) {
export function numberWithCommas(x, ) {
x = x.toString();
var pattern = /(-?\d+)(\d{3})/;
while (pattern.test(x)) x = x.replace(pattern, "$1,$2");
+5 -6
View File
@@ -53,13 +53,12 @@ router.beforeEach(async (to, from) => {
const walletStore = useWalletStoreV2();
//middleware
if (to.meta.middleware) {
if (!walletStore.connected) {
return false;
}
}
// if (to.meta.middleware) {
// if (!walletStore.connected) {
// return '/';
// }
// }
return true;
});
+32 -26
View File
@@ -19,21 +19,21 @@ export const useMemeburnerStore = defineStore("memeburner", {
console.log("-----------init memeburner-------------");
const walletStore = useWalletStoreV2();
// const roundsStore = useRoundsStore();
console.log("walletStore.walletClient", walletStore.walletClient);
console.log("walletStore.walletClient", walletStore.walletClient);
this.contract = getContract({
address: this.config.contractAddress,
abi: this.config.abi,
walletClient: walletStore.walletClient || walletStore.publicClient,
});
console.log("this.contract", this.contract);
abi: this.config.abi,
walletClient: walletStore.walletClient || walletStore.publicClient,
});
console.log("this.contract", this.contract);
},
async getRewardFor(amount) {
const tokenStore = useTokenStore();
// var rewards = await this.contract.methods
// .getRewardFor(tokenStore.activeToken.contractAddress, amount)
// .call();
const rewards = await this.contract.read.getRewardFor([tokenStore.activeToken.contractAddress, amount]);
console.log("rewards", rewards);
const rewards = await this.contract.read.getRewardForSacrifice([
tokenStore.activeToken.contractAddress,
amount,
]);
console.log("rewards", rewards);
return rewards;
},
async getCurrentRound() {
@@ -47,7 +47,7 @@ export const useMemeburnerStore = defineStore("memeburner", {
return await this.contract.read.getSacrificedMeme([roundnumber, tokenAddress]);
},
async getAmountToReachGoal(tokenAddress) {
return await this.contract.read.getAmountToReachGoal([tokenAddress]);
return await this.contract.read.getAmountToReachGoal([tokenAddress, 0]);
},
async getSacrificedRound(roundnumber) {
console.log("getSacrificedRound", roundnumber);
@@ -58,15 +58,19 @@ export const useMemeburnerStore = defineStore("memeburner", {
console.log("token.contractAddress", token.contractAddress);
console.log("roundnumber", roundnumber);
// contracts.push(this.contract.methods.getSacrificedMeme(roundnumber, token.contractAddress));
contracts.push({ ...this.contract, functionName: "getSacrificedMeme", args: [roundnumber, token.contractAddress] });
contracts.push({
...this.contract,
functionName: "getSacrificedMeme",
args: [roundnumber, token.contractAddress],
});
}
// console.log("this.contract", this.contract);
// const multicallStore = useMultiCallStore();
// return await multicallStore.aggregate(calls);
const data = await multicall({
const data = await multicall({
contracts,
});
return data;
});
return data;
},
async sacrificeMeme(amount) {
const tokenStore = useTokenStore();
@@ -75,25 +79,27 @@ export const useMemeburnerStore = defineStore("memeburner", {
//todo error
console.error("amount is 0 or null or undefined");
return;
}
}
this.loading = true;
const amountDecimal = BigInt(amount * Math.pow(10, tokenStore.activeToken.decimals));
console.log("this.contract", this.contract);
console.log("amountDecimal", amountDecimal.toString());
console.log("tokenStore.activeToken.contractAddress", tokenStore.activeToken.contractAddress);
var hash = await this.contract.write
.sacrificeMeme([tokenStore.activeToken.contractAddress, amountDecimal.toString()])
return hash;
console.log("this.contract", this.contract);
console.log("amountDecimal", amountDecimal.toString());
console.log("tokenStore.activeToken.contractAddress", tokenStore.activeToken.contractAddress);
var hash = await this.contract.write.sacrificeMeme([
tokenStore.activeToken.contractAddress,
amountDecimal.toString(),
0
]);
return hash;
} catch (error) {
console.error(error);
throw new Error(error)
throw new Error(error);
} finally {
this.loading = false;
}
},
async getGoalInBLD(roundNumber) {
return await this.contract.read.getGoalInBLD([roundNumber]);
async getGoalInBLOOD(roundNumber) {
return await this.contract.read.getGoalInBLOOD([roundNumber]);
},
},
});
+15 -7
View File
@@ -66,14 +66,22 @@ export const useRoundsStore = defineStore("rounds", {
// this.rounds[index].rewards_total = element.result;
}
},
async updateCurrentRound(sacrificedToken) {
async updateCurrentRound(sacrificedToken) {
console.log("updateCurrentRound");
const tokenStore = useTokenStore();
const memeBurnerStore = useMemeburnerStore();
var data = await memeBurnerStore.getSacrificedRound(this.currentRound);
var tokenIndex = this.rounds[this.currentRound].token.findIndex(
(tokenData) => tokenData.contractAddress === sacrificedToken
);
this.rounds[this.currentRound].token[tokenIndex].amount = data[tokenIndex].result[1];
);
const token = tokenStore.getToken(sacrificedToken);
// console.log(
// "this.rounds[this.currentRound].token[tokenIndex].amount",
// this.rounds[this.currentRound].token[tokenIndex].amount
// );
// console.log("Number(data[tokenIndex].result[1] / BigInt(Math.pow(10, token.decimals))", Number(data[tokenIndex].result[1] / BigInt(Math.pow(10, token.decimals))));
this.rounds[this.currentRound].token[tokenIndex].amount =
Number(data[tokenIndex].result[1] / BigInt(Math.pow(10, token.decimals)))
},
async fillRound(roundNumber) {
console.log("fillRound");
@@ -117,9 +125,9 @@ export const useRoundsStore = defineStore("rounds", {
tokenData.vampname = token.vamp.name;
// tokenData.amount = data[index].result[1];
tokenData.amount = Number(data[index].result[1]) / Math.pow(10, token.decimals);
tokenData.getAmountToReachGoal =
Number(await memeBurnerStore.getAmountToReachGoal(token.contractAddress)) /
Math.pow(10, token.decimals);
// tokenData.getAmountToReachGoal =
// Number(await memeBurnerStore.getAmountToReachGoal(token.contractAddress)) /
// Math.pow(10, token.decimals);
if (this.currentRound !== roundNumber && walletStore.connected) {
console.log("index", index);
console.log("rewardData[index]", rewardData[index]);
@@ -145,7 +153,7 @@ export const useRoundsStore = defineStore("rounds", {
tokenArray.push(tokenData);
}
console.log("clanwin123", rewards_clan);
const goalInBLD = await memeBurnerStore.getGoalInBLD(roundNumber);
const goalInBLD = await memeBurnerStore.getGoalInBLOOD(roundNumber);
this.rounds[roundNumber] = {
goal: Number(goal[0]) / Math.pow(10, tokenStore.memeToken.decimals),
goalInBLD: Number(goalInBLD / BigInt(Math.pow(10, tokenStore.memeToken.decimals))),
-1
View File
@@ -2,7 +2,6 @@ import { defineStore } from "pinia";
import { markRaw } from "vue";
import { useTokenStore } from "./tokens";
import { useRewardLockerStore } from "./rewardlocker";
import MemeToken from "@/assets/contracts/MemeToken.json";
import {
createConfig,
+26 -6
View File
@@ -1,10 +1,9 @@
<template>
<div class="cycle-page">
<div class="cycle-header container container--variant1">
<div class="bloodline-page-headline header">Bloodline Cycle</div>
<div class="bloodline-page-headline header" ref="observerElement">Bloodline Cycle</div>
<div class="bloodline-page-description low-mid-text">
Claim and trade your $BLOOD at each cycle's end. Become the most powerful meme clan each cycle to win
extra rewards.
Claim and trade your $BDL at each cycle's end. Become the most powerful bloodline and win extra rewards.
</div>
</div>
<div class="slider-wrapper" :class="{ sticking: sticking }" ref="target">
@@ -116,6 +115,8 @@ const timer = ref(null);
const difference = ref(null);
const target = ref();
const sticking = ref(false);
const observer = ref(null);
const observerElement = ref(null);
const memeBurnerStore = useMemeburnerStore();
const rewardLockerStore = useRewardLockerStore();
@@ -140,10 +141,30 @@ onMounted(async () => {
timeBetweenDates(expirationTimestamp);
}, 1000);
}
const headerEl = document.querySelector(".slider-wrapper");
const handler = (entries) => {
console.log(entries);
// entries is an array of observed dom nodes
// we're only interested in the first one at [0]
// because that's our .sentinal node.
// Here observe whether or not that node is in the viewport
if (!entries[0].isIntersecting) {
headerEl.classList.add("stuck");
} else {
headerEl.classList.remove("stuck");
}
};
// create the observer
observer.value = new window.IntersectionObserver(handler);
// give the observer some dom nodes to keep an eye on
observer.value.observe(observerElement.value);
});
onBeforeUnmount(() => {
clearInterval(timer.value);
observer.value.unobserve(observerElement.value);
});
async function prevSlide() {
@@ -206,10 +227,9 @@ function timeBetweenDates(expirationTimestamp) {
position: sticky
top: 82px
z-index: 3
background: #2D2D2D
padding: 16px 0
&:stuck
background-color: red
&.stuck
background: #2D2D2D
@media (min-width: 992px)
top: 127px
.slider-text
+15 -3
View File
@@ -2,7 +2,7 @@
<div class="profile-page container">
<div class="profile-header">
<div class="profile-headline header">Profile</div>
<div class="profile-subheader">
<div class="profile-subheader" v-if="walletStore.connected">
<div class="profile-subheader-logo"><img :src="getblocky(walletStore.address)" alt="" /></div>
<div class="mid-mid-text">{{ getAddressShortName(walletStore.address) }}</div>
</div>
@@ -11,7 +11,12 @@
<div class="total-rewards-headline mid-text text-center">Total Rewards</div>
<claim-component></claim-component>
</div>
<stake-component-v1></stake-component-v1>
<template v-if="!isMobile">
<stake-component-v1 :variant="2"> </stake-component-v1>
</template>
<template v-else>
<stake-component-v1> </stake-component-v1>
</template>
<div class="profile-stake">
<!-- <stake-component>
<template v-slot:headline> Staked </template>
@@ -158,7 +163,7 @@
</template>
<script setup>
import { ref, onMounted, computed } from "vue";
import { ref, onMounted, computed, inject } from "vue";
import { useRoundsStore } from "@/stores/rounds";
import { useWalletStoreV2 } from "@/stores/walletV2";
@@ -174,6 +179,7 @@ const roundsStore = useRoundsStore();
const walletStore = useWalletStoreV2();
const rewardLockerStore = useRewardLockerStore();
const memeBurnerStore = useMemeburnerStore();
const isMobile = inject("isMobile");
const activeRound = ref(null);
const openCycleElement = ref(false);
@@ -237,6 +243,10 @@ const rounds = computed(() => {
width: 21px
height: 21px
border-radius: 20%
@media (min-width: 992px)
width: 32px
height: 32px
.total-rewards-wrapper
border-radius: 16px
background: var(--darkgrey, #202020)
@@ -244,6 +254,8 @@ const rounds = computed(() => {
flex-direction: column
gap: 24px
padding: 8px
@media (min-width: 992px)
padding: 32px 64px
.total-rewards-inner
border-radius: 16px
border: 2px solid var(--grey, #858585)
-2
View File
@@ -17,7 +17,6 @@ import { onMounted, ref } from "vue";
import Meme1Json from "@/assets/contracts/Meme1.json";
import Meme2Json from "@/assets/contracts/Meme2.json";
import MemeBurnerJson from "@/assets/contracts/Bloodline.json";
import MemeTokenJson from "@/assets/contracts/MemeToken.json";
import RewardLockerJson from "@/assets/contracts/RewardLocker.json";
import { useTokenStore } from "@/stores/tokens";
import { useWalletStoreV2 } from "@/stores/walletV2";
@@ -33,7 +32,6 @@ const memeBurnerStore = useMemeburnerStore();
console.log("Meme1Json", Meme1Json);
console.log("Meme2Json", Meme2Json);
console.log("MemeBurnerJson", MemeBurnerJson);
console.log("MemeTokenJson", MemeTokenJson);
console.log("RewardLockerJson", RewardLockerJson);
const contractMeme2 = ref(null);