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> <script setup>
import { onMounted, onUnmounted, provide, ref } from "vue"; import { onMounted, onUnmounted, provide, ref, watch } from "vue";
import { storeToRefs } from "pinia"; import { storeToRefs } from "pinia";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
@@ -56,6 +56,17 @@ onUnmounted(() => {
clientClientEvent.value(); clientClientEvent.value();
console.log("unsubscribe"); 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 = () => { const handleWindowSizeChange = () => {
isMobile.value = isMobileFunc(); isMobile.value = isMobileFunc();
// your code // your code
@@ -139,7 +150,7 @@ onMounted(async () => {
<div class="header"> <div class="header">
<img alt="logo" class="logo" src="/assets/img/vampir.png" /> <img alt="logo" class="logo" src="/assets/img/vampir.png" />
</div> </div>
<div class="subheader low-mid-text"> <div class="subheader toast-header">
Success!<br /> Success!<br />
You turned your meme into: You turned your meme into:
</div> </div>
@@ -147,7 +158,7 @@ onMounted(async () => {
<div class="token-amount number-mobile">{{ tokenStore.activeToken.rewards }}</div> <div class="token-amount number-mobile">{{ tokenStore.activeToken.rewards }}</div>
<div class="token-name">$Blood</div> <div class="token-name">$Blood</div>
</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 You can claim once the current cycle is finished and your clan bonus was calculated
</div> </div>
</div> </div>
@@ -179,7 +190,7 @@ onMounted(async () => {
</div> </div>
</div> </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' }"> <div @click="changeRoute('home')" :class="{ active: route.name === 'home' }">
<font-awesome-icon icon="fa-droplet" /> <font-awesome-icon icon="fa-droplet" />
</div> </div>
@@ -193,10 +204,6 @@ onMounted(async () => {
</template> </template>
<style lang="sass"> <style lang="sass">
header
margin-bottom: 100px
@media (min-width: 992px)
margin-bottom: 200px
.footer .footer
height: auto height: auto
@@ -235,7 +242,12 @@ header
.social-bloodline-badge-icon .social-bloodline-badge-icon
font-size: 16px font-size: 16px
.main .main
padding-top: 24px // padding-top: 24px
margin-top: 82px
padding: 24px 0
@media (min-width: 992px)
margin-top: 128px
padding: 80px 0
&.mobile &.mobile
&.no-scroll &.no-scroll
overflow: hidden overflow: hidden
@@ -263,13 +275,15 @@ header
.modal-overlay .modal-overlay
background-color: rgb(15, 15, 15, 0.7) background-color: rgb(15, 15, 15, 0.7)
height: 100vh height: 100vh
width: 100vw
position: fixed position: fixed
left: 0 left: 0
bottom: 0 bottom: 0
width: 100%
z-index: 10 z-index: 10
@media (min-width: 992px)
background-color: unset
.modal-card .modal-card
min-width: 342px width: 342px
text-align: center text-align: center
position: absolute position: absolute
top: 50% top: 50%
@@ -279,6 +293,11 @@ header
background: var(--midnight-black, #0F0F0F) background: var(--midnight-black, #0F0F0F)
z-index: 100 z-index: 100
gap: 16px gap: 16px
@media (min-width: 992px)
top: 142px
right: 24px
left: unset
transform: unset
.body .body
display: flex display: flex
flex-direction: column flex-direction: column
@@ -291,4 +310,20 @@ header
img img
width: 74px width: 74px
height: 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> </style>
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"contractName": "Bloodline", "contractName": "Bloodline",
"contractAddress": "0xda743950e70F9483ED1fDccb529c62a73BF80014", "contractAddress": "0x00E5DAd5dA0FC4Da0baB7f0D99E28C07d8A88ee4",
"abi": [ "abi": [
{ {
"inputs": [ "inputs": [
+38 -36
View File
@@ -1,6 +1,6 @@
{ {
"contractName": "LiquidityOwner", "contractName": "LiquidityOwner",
"contractAddress": "0xB6B58b4fD73e6bc4fcA72Fa9d40255D60950ca4B", "contractAddress": "0x947f05D74ac7dA0Eb0CA88eF9b579D196B178BaE",
"abi": [ "abi": [
{ {
"inputs": [ "inputs": [
@@ -368,6 +368,42 @@
"stateMutability": "pure", "stateMutability": "pure",
"type": "function" "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": [ "inputs": [
{ {
@@ -442,41 +478,7 @@
"type": "uint256" "type": "uint256"
} }
], ],
"name": "triggeredByMemeAltar", "name": "triggerRoundCompleted",
"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",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "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", "contractName": "MemeAltar",
"contractAddress": "0x6Def7896c714b77bD9BcD6BF5d88A1e7000C86dE", "contractAddress": "0x9842954639aF0c1d7A692222955868806287aeEA",
"abi": [ "abi": [
{ {
"inputs": [ "inputs": [
@@ -19,11 +19,6 @@
"name": "_weth", "name": "_weth",
"type": "address" "type": "address"
}, },
{
"internalType": "address",
"name": "_developer",
"type": "address"
},
{ {
"internalType": "address", "internalType": "address",
"name": "_admin", "name": "_admin",
@@ -40,9 +35,9 @@
"type": "address" "type": "address"
}, },
{ {
"internalType": "uint256[]", "internalType": "uint112",
"name": "roundGoals", "name": "_defaultGoal",
"type": "uint256[]" "type": "uint112"
} }
], ],
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
@@ -55,7 +50,7 @@
}, },
{ {
"inputs": [], "inputs": [],
"name": "Impossible", "name": "InsufficientOutputAmount",
"type": "error" "type": "error"
}, },
{ {
@@ -88,6 +83,11 @@
"name": "RoundCompletedRegistrationFailed", "name": "RoundCompletedRegistrationFailed",
"type": "error" "type": "error"
}, },
{
"inputs": [],
"name": "SwitchRequiresMemeBeSet",
"type": "error"
},
{ {
"inputs": [], "inputs": [],
"name": "TokenIsNotInSacrificableList", "name": "TokenIsNotInSacrificableList",
@@ -192,37 +192,37 @@
{ {
"components": [ "components": [
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "b1", "name": "b1",
"type": "uint8" "type": "uint40"
}, },
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "m1", "name": "m1",
"type": "uint8" "type": "uint40"
}, },
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "b2", "name": "b2",
"type": "uint8" "type": "uint40"
}, },
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "m2", "name": "m2",
"type": "uint8" "type": "uint40"
}, },
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "b3", "name": "b3",
"type": "uint8" "type": "uint40"
}, },
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "m4", "name": "m4",
"type": "uint8" "type": "uint40"
} }
], ],
"indexed": true, "indexed": false,
"internalType": "struct MemeAltar.BM", "internalType": "struct MemeAltar.BM",
"name": "_bm", "name": "_bm",
"type": "tuple" "type": "tuple"
@@ -286,34 +286,34 @@
{ {
"components": [ "components": [
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "b1", "name": "b1",
"type": "uint8" "type": "uint40"
}, },
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "m1", "name": "m1",
"type": "uint8" "type": "uint40"
}, },
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "b2", "name": "b2",
"type": "uint8" "type": "uint40"
}, },
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "m2", "name": "m2",
"type": "uint8" "type": "uint40"
}, },
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "b3", "name": "b3",
"type": "uint8" "type": "uint40"
}, },
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "m4", "name": "m4",
"type": "uint8" "type": "uint40"
} }
], ],
"internalType": "struct MemeAltar.BM", "internalType": "struct MemeAltar.BM",
@@ -335,9 +335,9 @@
{ {
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint112",
"name": "newDefaultGoal", "name": "newDefaultGoal",
"type": "uint256" "type": "uint112"
} }
], ],
"name": "adjustDefaultGoal", "name": "adjustDefaultGoal",
@@ -354,9 +354,9 @@
{ {
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint32",
"name": "newDurationLimit", "name": "newDurationLimit",
"type": "uint256" "type": "uint32"
} }
], ],
"name": "adjustRoundDurationLimit", "name": "adjustRoundDurationLimit",
@@ -401,34 +401,34 @@
"name": "bm", "name": "bm",
"outputs": [ "outputs": [
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "b1", "name": "b1",
"type": "uint8" "type": "uint40"
}, },
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "m1", "name": "m1",
"type": "uint8" "type": "uint40"
}, },
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "b2", "name": "b2",
"type": "uint8" "type": "uint40"
}, },
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "m2", "name": "m2",
"type": "uint8" "type": "uint40"
}, },
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "b3", "name": "b3",
"type": "uint8" "type": "uint40"
}, },
{ {
"internalType": "uint8", "internalType": "uint40",
"name": "m4", "name": "m4",
"type": "uint8" "type": "uint40"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
@@ -439,9 +439,9 @@
"name": "currentRound", "name": "currentRound",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint112",
"name": "", "name": "",
"type": "uint256" "type": "uint112"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
@@ -452,8 +452,37 @@
"name": "defaultGoal", "name": "defaultGoal",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint112",
"name": "", "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" "type": "uint256"
} }
], ],
@@ -466,6 +495,11 @@
"internalType": "address", "internalType": "address",
"name": "memeToSacrifice", "name": "memeToSacrifice",
"type": "address" "type": "address"
},
{
"internalType": "bool",
"name": "buyFunc",
"type": "bool"
} }
], ],
"name": "getAmountToReachGoal", "name": "getAmountToReachGoal",
@@ -482,12 +516,12 @@
{ {
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint112",
"name": "roundNumber", "name": "roundNumber",
"type": "uint256" "type": "uint112"
} }
], ],
"name": "getGoalInBLD", "name": "getGoalInBLOOD",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
@@ -511,7 +545,7 @@
"type": "uint256" "type": "uint256"
} }
], ],
"name": "getRewardFor", "name": "getRewardForSacrifice",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
@@ -525,9 +559,9 @@
{ {
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint112",
"name": "roundNumber", "name": "roundNumber",
"type": "uint256" "type": "uint112"
}, },
{ {
"internalType": "address", "internalType": "address",
@@ -652,9 +686,9 @@
"name": "roundDurationLimit", "name": "roundDurationLimit",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint32",
"name": "", "name": "",
"type": "uint256" "type": "uint32"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
@@ -663,27 +697,27 @@
{ {
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint112",
"name": "", "name": "",
"type": "uint256" "type": "uint112"
} }
], ],
"name": "rounds", "name": "rounds",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint112",
"name": "goal", "name": "goal",
"type": "uint256" "type": "uint112"
}, },
{ {
"internalType": "uint256", "internalType": "uint112",
"name": "expirationTimestamp",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "ethUsedToBuy", "name": "ethUsedToBuy",
"type": "uint256" "type": "uint112"
},
{
"internalType": "uint32",
"name": "expirationTimestamp",
"type": "uint32"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
@@ -700,14 +734,19 @@
"internalType": "uint256", "internalType": "uint256",
"name": "amountToSacrifice", "name": "amountToSacrifice",
"type": "uint256" "type": "uint256"
},
{
"internalType": "uint112",
"name": "minETH",
"type": "uint112"
} }
], ],
"name": "sacrificeMeme", "name": "sacrificeMeme",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint128",
"name": "reward", "name": "reward",
"type": "uint256" "type": "uint128"
} }
], ],
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
@@ -715,11 +754,6 @@
}, },
{ {
"inputs": [ "inputs": [
{
"internalType": "uint256",
"name": "minBLD",
"type": "uint256"
},
{ {
"internalType": "address", "internalType": "address",
"name": "memeToSacrifice", "name": "memeToSacrifice",
@@ -729,9 +763,14 @@
"internalType": "uint256", "internalType": "uint256",
"name": "amountToSacrifice", "name": "amountToSacrifice",
"type": "uint256" "type": "uint256"
},
{
"internalType": "uint256",
"name": "minBLOOD",
"type": "uint256"
} }
], ],
"name": "sacrificeMemeAndBuyBLD", "name": "sacrificeMemeAndBuyBLOOD",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
@@ -774,6 +813,43 @@
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"type": "function" "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": [ "inputs": [
{ {
@@ -809,10 +885,6 @@
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "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", "Meme1": {
"contractAddress": "0x9dcD7Cd83ED0Fe69DDfE3c2A265a1207F2Bc3219", "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": [ "abi": [
{ {
"inputs": [ "inputs": [
{ {
"internalType": "address", "internalType": "string",
"name": "_rewardLocker", "name": "name",
"type": "address" "type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
}, },
{ {
"internalType": "address", "internalType": "address",
@@ -16,23 +39,13 @@
}, },
{ {
"internalType": "address", "internalType": "address",
"name": "_nfPositionManager", "name": "_uniV2Factory",
"type": "address" "type": "address"
},
{
"internalType": "uint160[2]",
"name": "_sqrtPricesX96",
"type": "uint160[2]"
} }
], ],
"stateMutability": "nonpayable", "stateMutability": "payable",
"type": "constructor" "type": "constructor"
}, },
{
"inputs": [],
"name": "NotAllowedToMint",
"type": "error"
},
{ {
"anonymous": false, "anonymous": false,
"inputs": [ "inputs": [
@@ -191,18 +204,13 @@
}, },
{ {
"inputs": [ "inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "amount", "name": "amount",
"type": "uint256" "type": "uint256"
} }
], ],
"name": "mintMemeToken", "name": "mint",
"outputs": [], "outputs": [],
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"type": "function" "type": "function"
@@ -282,19 +290,6 @@
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"type": "function" "type": "function"
}, },
{
"inputs": [],
"name": "rewardLocker",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{ {
"inputs": [], "inputs": [],
"name": "symbol", "name": "symbol",
@@ -376,7 +371,7 @@
}, },
{ {
"inputs": [], "inputs": [],
"name": "uniV3Pool", "name": "uniV2Pool",
"outputs": [ "outputs": [
{ {
"internalType": "address", "internalType": "address",
+1 -30
View File
@@ -1,6 +1,6 @@
{ {
"contractName": "RewardLocker", "contractName": "RewardLocker",
"contractAddress": "0xc180014777BC1E0720dDD4CA5952c1Cd277f7afE", "contractAddress": "0xc9f5F78320D0f75099eEA8f8F6FD35BF246f0916",
"abi": [ "abi": [
{ {
"inputs": [ "inputs": [
@@ -516,35 +516,6 @@
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"type": "function" "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": [ "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 display: block
width: 100% width: 100%
text-decoration: none text-decoration: none
&:hover,&:focus,&:active
cursor: pointer
&[disabled], &.btn--disabled &[disabled], &.btn--disabled
background-color: darken($purple, 10%) background-color: darken($purple, 10%)
cursor: not-allowed cursor: not-allowed
@@ -20,4 +22,3 @@
cursor: not-allowed cursor: not-allowed
&:hover,&:focus,&:active &:hover,&:focus,&:active
background-color: darken($purple, 10%), background-color: darken($purple, 10%),
cursor: pointer
+8 -5
View File
@@ -17,11 +17,15 @@ body
background-color: #2D2D2D background-color: #2D2D2D
color: $white color: $white
font-family: 'Inter', sans-serif font-family: 'Inter', sans-serif
&.sideoutpanel-open
&:not(.mobile)
overflow-y: hidden
padding-right: 10px
.navbar
padding-right: 10px
html html
font-size: var(--font-size-main) font-size: var(--font-size-main)
html, body, #app
height: 100%
body body
margin: 0 margin: 0
@@ -29,10 +33,9 @@ body
#app #app
display: flex display: flex
flex-direction: column flex-direction: column
height: 100vh
.footer .footer
margin-top: auto margin-top: auto
@media (min-width: 992px)
margin-top: 80px
.container .container
margin-right: auto margin-right: auto
@@ -44,7 +47,7 @@ body
// max-width: 800px // max-width: 800px
// padding: 24px 64px // padding: 24px 64px
@media (min-width: 992px) @media (min-width: 992px)
max-width: 800px max-width: 860px
h1 h1
font-weight: 700 font-weight: 700
+6 -2
View File
@@ -10,7 +10,8 @@ $tertiary-light: lighten($tertiary, 20%)
$white: #F9F9FA $white: #F9F9FA
$black: #0F0F0F $black: #0F0F0F
$grey: #808080 $grey: #858585
$grey-light: lighten($grey, 20%)
$red: #8B0000 $red: #8B0000
$purple: #4B0082 $purple: #4B0082
$midnight-black: #0F0F0F $midnight-black: #0F0F0F
@@ -31,7 +32,8 @@ $button-background-color: $black
--tertiary-light: #{$tertiary-light} --tertiary-light: #{$tertiary-light}
--tertiary-dark: #{$tertiary-dark} --tertiary-dark: #{$tertiary-dark}
--white: #{#F9F9FA} --white: #{#F9F9FA}
--grey: #{#858585} --grey: #{$grey}
--grey-light: #{$grey-light}
--grey2: #{$grey2} --grey2: #{$grey2}
--dark-grey: #{$dark-grey} --dark-grey: #{$dark-grey}
--purple: #{$purple} --purple: #{$purple}
@@ -69,6 +71,8 @@ $button-background-color: $black
font-style: normal font-style: normal
font-weight: 400 font-weight: 400
line-height: normal line-height: normal
@media (min-width: 992px)
font-size: 18px
.number-mobile .number-mobile
font-family: Inter font-family: Inter
font-size: 24px font-size: 24px
+40 -28
View File
@@ -1,5 +1,5 @@
<template> <template>
<stake-component v-if="walletStore.memeToken?.unclaimedRewards > 0"> <stake-component>
<template v-slot:headline> Unclaimed </template> <template v-slot:headline> Unclaimed </template>
<template v-slot:body> <template v-slot:body>
<token-name-price <token-name-price
@@ -9,36 +9,46 @@
<token-logo img="/assets/img/token/bloodline.png" :alt="'bloodline logo'"></token-logo> <token-logo img="/assets/img/token/bloodline.png" :alt="'bloodline logo'"></token-logo>
</template> </template>
<template v-slot:actions> <template v-slot:actions>
<Transition name="smooth"> <template v-if="walletStore.memeToken?.unclaimedRewards > 0">
<div class="connected-stake-buttons" v-show="!stakeMenu"> <Transition name="smooth">
<div class="btn btn-immortal" @click="rewardLockerStore.claimAll">Claim</div> <div class="connected-stake-buttons" v-show="!stakeMenu">
<div class="btn btn-immortal" @click="openStake">Stake</div> <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> </div>
</Transition> </template>
<Transition name="smooth"> <template v-else>
<stake-menu <div class="btn btn-immortal mid-mid-text text-center" @click="router.push({ name: 'home' })">
v-model="tokenNumber" Go to Sacrifice
@close="stakeMenu = false" </div>
:amount="walletStore.memeToken?.unclaimedRewards" <div class="small-text text-center">Sacrifice to earn $BLOOD</div>
:stake="stake" </template>
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>
</stake-component> </stake-component>
<stake-component dense v-else>
<div class="text-center">All Claimed</div>
</stake-component>
</template> </template>
<script setup> <script setup>
@@ -51,10 +61,12 @@ import TokenLogo from "@/components/TokenLogo.vue";
import { useWalletStoreV2 } from "@/stores/walletV2"; import { useWalletStoreV2 } from "@/stores/walletV2";
import { useTokenStore } from "@/stores/tokens"; import { useTokenStore } from "@/stores/tokens";
import { useRewardLockerStore } from "@/stores/rewardlocker"; import { useRewardLockerStore } from "@/stores/rewardlocker";
import { useRouter } from "vue-router";
const rewardLockerStore = useRewardLockerStore(); const rewardLockerStore = useRewardLockerStore();
const walletStore = useWalletStoreV2(); const walletStore = useWalletStoreV2();
const tokenStore = useTokenStore(); const tokenStore = useTokenStore();
const router = useRouter();
const props = defineProps({ const props = defineProps({
stakeonly: { stakeonly: {
+104 -115
View File
@@ -1,75 +1,58 @@
<template> <template>
<div class="connect-wallet-headline">Connect Wallet</div> <div class="connect-wallet-wrapper">
<div class="connectors-wrapper" v-if="!walletStore.connected"> <template v-if="!walletStore.connected">
<div <div class="connect-wallet-headline low-mid-text">Connect your wallet</div>
class="connectors-element" <div class="connectors-wrapper">
v-for="connector in walletStore.config?.connectors" <div
@click="connectWallet(connector)" class="connectors-element card"
> v-for="connector in walletStore.config?.connectors"
<div class="connector-icon"> @click="connectWallet(connector)"
<img :src="`/assets/img/connectors/${connector.id}.svg`" :alt="`${connector.name} Logo`" /> >
<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>
<div class="connector-name">{{ connector.name }}</div> <div>Are you coming from Binance, Bybit, Kucoin or any other crypto exchange?</div>
</div> <div>Follow these instructions first.</div>
<div> </template>
Are you coming from Binance, Poloniex, Kucoin or any other CEX?<br />
<br /> <template v-else>
You don't have a wallet yet?<br /><br /> <div class="connected-header">
Follow these instructions first. <div class="connected-header-avatar">
</div> <img :src="getblocky(walletStore.address)" alt="avatar" />
</div> </div>
<div v-else> <div class="connected-header-address">
<div class="connected-header"> {{ getAddressShortName(walletStore.address) }}
<div class="connected-header-avatar"> </div>
<img :src="getblocky(walletStore.address)" alt="avatar" /> <div class="connected-header-logout" @click="disconnectWallet">
<font-awesome-icon :icon="['fas', 'fa-arrow-right-from-bracket']" />
</div>
</div> </div>
<div class="connected-header-address"> <div class="connected-tokens-headline">Your Tokens</div>
{{ getAddressShortName(walletStore.address) }} <div class="connected-tokens">
</div> <div class="connected-token" v-for="token in walletStore.token">
<div class="connected-header-logout" @click="disconnectWallet"> <token-name-price
<font-awesome-icon :icon="['fas', 'fa-arrow-right-from-bracket']" /> :name="tokenStore.getToken(token.contractAddress).name"
</div> :price="token.balanceOf"
</div> ></token-name-price>
<div class="connected-tokens-headline">Your Tokens</div> <div class="connected-token-button">
<div class="connected-tokens"> <div class="bloodline-badge grey" @click="badgeClick(token)">
<div class="connected-token" v-for="token in walletStore.token"> <div
<token-name-price class="bloodline-badge-text"
:name="tokenStore.getToken(token.contractAddress).name" v-if="tokenStore.memeToken.contractAddress === token.contractAddress"
:price="token.balanceOf" >
></token-name-price> Buy
<div class="connected-token-button"> </div>
<div class="bloodline-badge grey" @click="badgeClick(token)"> <div v-else class="bloodline-badge-text">Sacrifice</div>
<div
class="bloodline-badge-text"
v-if="tokenStore.memeToken.contractAddress === token.contractAddress"
>
Buy
</div> </div>
<div v-else class="bloodline-badge-text">Sacrifice</div>
</div> </div>
<token-logo :img="tokenStore.getToken(token.contractAddress).logo" :alt="'test'"></token-logo>
</div> </div>
<token-logo :img="tokenStore.getToken(token.contractAddress).logo" :alt="'test'"></token-logo>
</div> </div>
</div> <stake-component-v1 :variant="3"></stake-component-v1>
<!-- <stake-component> </template>
<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>
</div> </div>
</template> </template>
@@ -129,65 +112,71 @@ async function connectWallet(connector) {
</script> </script>
<style lang="sass"> <style lang="sass">
.connect-wallet-headline .connect-wallet-wrapper
font-family: Inter
font-size: 18px
font-style: normal
font-weight: 400
line-height: normal
.connectors-wrapper
display: flex display: flex
flex-direction: column flex-direction: column
gap: 8px gap: 24px
margin: 24px 0 .connectors-wrapper
.connectors-element
display: flex display: flex
padding: 12px flex-direction: column
border: 1px solid rgba(152, 161, 192, 0.24) gap: 8px
background-color: #202020 .connectors-element
&:hover, &:active, &:focus display: flex
background-color: lighten(#202020, 20%) padding: 12px
cursor: pointer border: 1px solid rgba(152, 161, 192, 0.24)
.connector-icon background: var(--grey, #858585)
border-radius: 12px color: var(--midnight-black, #0F0F0F)
width: 40px &:hover, &:active, &:focus
overflow: hidden background-color: lighten(#858585, 20%)
height: 40px cursor: pointer
.connector-name .connector-icon
padding: 0 8px border-radius: 12px
align-self: center 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 .connected-header
margin-bottom: 16px margin-bottom: 24px
.connected-tokens
display: flex
flex-direction: column
gap: 16px
margin-bottom: 24px
.connected-token
display: flex display: flex
gap: 16px gap: 16px
align-items: center align-items: center
.connected-token-button .connected-header-avatar
img
border-radius: 8px
.connected-header-logout
margin-left: auto margin-left: auto
.bloodline-badge svg
padding: 4px 16px font-size: 25px
color: black
font-size: 14px .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> </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> <template>
<header> <div class="navbar" :class="{ 'navbar--hidden': !showNavbar }">
<div class="navbar" :class="{ 'navbar--hidden': !showNavbar }"> <div class="navbar-inner">
<div class="navbar-inner"> <div class="navbar-icon">
<div class="navbar-icon"> <router-link to="/">
<router-link to="/"> <img alt="logo" class="logo" src="/assets/img/vampir.png" />
<img alt="logo" class="logo" src="/assets/img/vampir.png" /> </router-link>
</router-link> </div>
</div> <div class="navbar-text">
<div class="navbar-text"> <router-link to="/">Bloodline</router-link>
<router-link to="/">Bloodline</router-link> </div>
</div> <div class="navbar-center" v-if="!isMobile">
<div class="navbar-center" v-if="!isMobile"> <!-- <div class="navbar-social-links">
<!-- <div class="navbar-social-links">
<div class="social-bloodline-badge"> <div class="social-bloodline-badge">
<div class="social-bloodline-badge-icon"> <div class="social-bloodline-badge-icon">
<font-awesome-icon icon="fa-brands fa-discord" /> <font-awesome-icon icon="fa-brands fa-discord" />
@@ -31,45 +30,50 @@
<div class="social-bloodline-badge-text">Twitter</div> <div class="social-bloodline-badge-text">Twitter</div>
</div> </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>
<div class="navbar-end"> <div v-if="!isMobile">
<div class="navbar-navigation mid-text" v-if="!isMobile && connected"> <!-- <div v-if="!connected" class="btn btn-immortal" @click="walletStore.connectWallet">connect</div> -->
<div <div v-if="!address" class="btn btn-immortal mid-text" @click="showPanel = true">connect</div>
class="navbar-navigation-link" <!-- <span v-else @click="showPanel = true"> test</span> -->
v-for="link in links" <div class="login-icon-desktop mid-text" v-else @click="showPanel = true">
:key="link.name" <img :src="getblocky(address)" alt="avatar" />
:class="{ active: link.name === route.name }" <div>{{ getAddressShortName(walletStore.address) }}</div>
@click="router.push(link.path)"
>
<div class="icon">
<img :src="link.icon" alt="" />
</div>
<div class="text">{{ link.title }}</div>
</div>
</div> </div>
<div v-if="!isMobile"> </div>
<!-- <div v-if="!connected" class="btn btn-immortal" @click="walletStore.connectWallet">connect</div> --> <div v-else @click="showPanel = true">
<div v-if="!address" class="btn btn-immortal mid-text" @click="showPanel = true">connect</div> <div class="login-icon" v-if="!address">
<!-- <span v-else @click="showPanel = true"> test</span> --> <font-awesome-icon :icon="['fas', 'fa-arrow-right-to-bracket']" />
<div v-else @click="showPanel = true"><img :src="getblocky(address)" alt="avatar" /></div>
</div> </div>
<div v-else @click="showPanel = true"> <div v-else>
<div class="login-icon" v-if="!address"> <img :src="getblocky(address)" alt="avatar" />
<font-awesome-icon :icon="['fas', 'fa-arrow-right-to-bracket']" />
</div>
<div v-else><img :src="getblocky(address)" alt="avatar" /></div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</header> </div>
</template> </template>
<script setup> <script setup>
import { storeToRefs } from "pinia"; import { storeToRefs } from "pinia";
import { ref, onMounted, onBeforeUnmount, inject } from "vue"; import { ref, onMounted, onBeforeUnmount, inject } from "vue";
import { useWalletStoreV2 } from "@/stores/walletV2"; import { useWalletStoreV2 } from "@/stores/walletV2";
import { getblocky } from "@/helper/helper.js"; import { getblocky, getAddressShortName } from "@/helper/helper.js";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
const emit = defineEmits(["showPanel"]); const emit = defineEmits(["showPanel"]);
@@ -124,99 +128,115 @@ onBeforeUnmount(() => {
</script> </script>
<style lang="sass" scoped> <style lang="sass" scoped>
header // margin-bottom: 82px
// margin-bottom: 82px // @media (min-width: 992px)
// @media (min-width: 992px) // margin-bottom: 128px
// margin-bottom: 128px
.navbar .navbar
position: fixed position: fixed
z-index: 3 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 box-sizing: border-box
background-color: #202020 height: 100%
width: 100% align-items: center
transform: translate3d(0,0,0)
transition: transform .3s ease,visibility 0s .3s linear
height: 82px
@media (min-width: 992px) @media (min-width: 992px)
height: 128px
// &.navbar--hidden
// transform: translate3d(0,-100%,0)
.navbar-inner
display: flex
padding: 16px 24px padding: 16px 24px
box-sizing: border-box .navbar-icon
height: 100% img
align-items: center height: 50px
@media (min-width: 992px) width: 50px
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
@media (min-width: 992px) @media (min-width: 992px)
font-size: 64px height: 75px
a width: 75px
text-decoration: none
color: white .navbar-text
.navbar-center 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 display: flex
margin-left: auto gap: 18px
.navbar-social-links .social-bloodline-badge
font-size: 16px
padding: 8px 16px 8px 16px
border-radius: 14px
background-color: #0F0F0F
display: flex display: flex
gap: 18px &:hover,&:active,&:focus
.social-bloodline-badge background-color: lighten(#0F0F0F, 10%)
font-size: 16px cursor: pointer
padding: 8px 16px 8px 16px .social-bloodline-badge-icon
border-radius: 14px margin-right: 8px
background-color: #0F0F0F .navbar-end
display: flex display: flex
&:hover,&:active,&:focus margin-left: auto
background-color: lighten(#0F0F0F, 10%) gap: 80px
cursor: pointer .navbar-navigation
.social-bloodline-badge-icon
margin-right: 8px
.navbar-end
display: flex display: flex
margin-left: auto align-items: center
gap: 80px gap: 48px
.navbar-navigation .navbar-navigation-link
display: flex display: flex
align-items: center gap: 8px
gap: 48px border-bottom: 2px solid transparent
.navbar-navigation-link &.active
display: flex border-bottom: 2px solid white
gap: 8px &:active, &:hover, &:focus
&.active cursor: pointer
border-bottom: 2px solid white .icon
&:active, &:hover, &:focus img
cursor: pointer width: 20px
.icon height: 20px
img
width: 20px
height: 20px
.login-icon .login-icon
color: var(--white) color: var(--white)
background-color: var(--purple) background-color: var(--purple)
padding: 8px padding: 8px
font-size: 25px font-size: 25px
border-radius: 8px border-radius: 8px
width: 44px width: 44px
height: 44px height: 44px
display: flex display: flex
justify-content: center justify-content: center
align-items: 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 img
width: 32px width: 45px
height: 32px height: 45px
border-radius: 8px
</style> </style>
+244 -217
View File
@@ -1,161 +1,162 @@
<template> <template>
<div class="sacrifice-wrapper card card--glow bloodline-wrapper"> <div class="sacrifice-wrapper card card--glow bloodline-wrapper">
<!-- {{ activeToken.allowance }} --> <!-- {{ activeToken.allowance }} -->
<div class="sacrifice-inner"> <div class="sacrifice-headline">Select Sacrifice</div>
<div class="sacrifice-headline">Select Sacrifice</div> <div class="sacrifice-select-tokens">
<div class="sacrifice-select-tokens"> <div class="sacrifice-tokens">
<div class="sacrifice-tokens"> <div
<div class="sacrifice-token"
class="sacrifice-token" :class="[
:class="[ {
{ 'sacrifice-token--active': token.contractAddress === activeToken.contractAddress,
'sacrifice-token--active': token.contractAddress === activeToken.contractAddress, 'bloodline-border': token.contractAddress === activeToken.contractAddress,
'bloodline-border': token.contractAddress === activeToken.contractAddress, 'bloodline-border--variant1': token.contractAddress === activeToken.contractAddress,
'bloodline-border--variant1': token.contractAddress === activeToken.contractAddress, },
}, ]"
]" v-for="token in props.data"
v-for="token in props.data" :key="token.contractAddress"
:key="token.contractAddress" @click="tokenStore.changeActiveToken(token)"
@click="tokenStore.changeActiveToken(token)" >
> <div class="sacrifice-token-logo">
<div class="sacrifice-token-logo"> <img v-if="isMobile" :src="token.logoMobile" alt="token logo" />
<img v-if="isMobile" :src="token.logoMobile" alt="token logo" /> <img v-if="!isMobile" :src="token.logo" 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-token-name">{{ token.name }}</div>
</div> </div>
</div> </div>
<div class="sacrifice-from-to-wrapper" v-if="activeToken.contractAddress"> </div>
<div <div class="sacrifice-from-to-wrapper" v-if="activeToken.contractAddress">
:class="{ <div
'sacrifice-from-wrapper': true, :class="{
'bloodline-border': true, 'sacrifice-from-wrapper': true,
'bloodline-border--variant1': true, 'bloodline-border': true,
purple: 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"> <template v-slot:message>
<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">
<div class="sacrifice-adder-step bloodline-badge" @click="addTokens(10000000)">+10m</div> <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(100000000)">+100m</div>
<div class="sacrifice-adder-step bloodline-badge" @click="addTokens(1000000000)">+1b</div> <div class="sacrifice-adder-step bloodline-badge" @click="addTokens(1000000000)">+1b</div>
<!-- <div class="sacrifice-adder-balance">Balance: {{ parseFloat(activeToken.balance) }}</div> </template>
<div class="sacrifice-adder-max" @click="tokenNumber = parseFloat(activeToken.balance)"> </token-input>
Max </div>
</div> --> <div class="sacrifice-divider bloodline-devider">
</div> <font-awesome-icon :icon="['fas', 'arrow-down']" />
</div> </div>
<div class="sacrifice-divider bloodline-devider"> <div
<font-awesome-icon :icon="['fas', 'arrow-down']" /> :class="{
</div> 'sacrifice-to-wrapper': true,
<div 'bloodline-border': true,
:class="{ 'bloodline-border--variant1': true,
'sacrifice-from-wrapper': true, purple: output && output > 0,
'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="sarcrifice-from-input"> <div class="sacrifice-to-output-rewards header">
<div class="sacrifice-to-output"> {{ 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" />
</div> </div>
</div> </div>
<div class="sacrifice-staking-bonus"> <div class="sacrifice-logo">
<div <img :src="activeToken.vamp?.logo" :alt="activeToken.vamp.name" />
class="sacrifice-staking-bonus-inner" </div>
@click=" </div>
(e) => { <div class="sacrifice-staking-bonus">
showStakingMenu = !showStakingMenu; <div
} class="sacrifice-staking-bonus-inner"
" @click="
> (e) => {
<div class="mid-mid-text">+ Staking Bonus</div> showStakingMenu = !showStakingMenu;
<div class="icon"> }
<font-awesome-icon icon="chevron-down" /> "
</div> >
<div class="mid-mid-text">+ Staking Bonus</div>
<div class="icon">
<font-awesome-icon icon="chevron-down" />
</div> </div>
<stake-component-v1 :variant="1" v-if="showStakingMenu"> </div>
<template v-slot:headline> {{ null }}</template> <stake-component-v1 :variant="1" v-if="showStakingMenu">
</stake-component-v1> <template v-slot:headline> {{ null }}</template>
</stake-component-v1>
<!-- <stake-component v-if="showStakingMenu" stakeonly class="variant1"></stake-component> --> <!-- <stake-component v-if="showStakingMenu" stakeonly class="variant1"></stake-component> -->
</div>
</div> </div>
<div class="sacrificed-info" v-if="state === 4"> </div>
<div class="left low-mid-text">You can claim your $BLOOD when the cycle is finished.</div> <div class="sacrificed-info" v-if="state === 4">
<div class="right"> <div class="left low-mid-text">You can claim your $BLOOD when the cycle is finished.</div>
<img src="/assets/img/moon.png" alt="moon" /> <div class="right">
</div> <img src="/assets/img/moon.png" alt="moon" />
</div> </div>
<div class="sacrifice-fees-info-wrapper"> </div>
<div class="sacrifice-fees-img"> <div class="sacrifice-fees-info-wrapper">
<img src="/assets/img/fuel-noozle.png" alt="fuel noozle" /> <div class="sacrifice-fees-img">
</div> <img src="/assets/img/fuel-noozle.png" alt="fuel noozle" />
<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>
<div class="sacrifice-buttons-function-wrapper"> <div class="sacrifice-fees-body">
<template v-if="walletStore.connected"> <div class="sacrifice-fees-body-header">
<div class="btn btn-immortal sub-header" disabled v-if="state === 0">Enter Amount</div> <div class="sacrifice-fees-body-header-title">Gas Subsidy</div>
<div <div class="sacrifice-fees-body-header-amount">≤30 Gwei</div>
class="btn btn-immortal" </div>
v-if=" <div class="sacrifice-fees-body-subheader">The clan pays your transaction.</div>
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> </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>
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, defineProps, watch, inject, computed } from "vue"; import { ref, defineProps, watch, inject, nextTick } from "vue";
import { useWalletStoreV2 } from "@/stores/walletV2"; import { useWalletStoreV2 } from "@/stores/walletV2";
import { useTokenStore } from "@/stores/tokens"; import { useTokenStore } from "@/stores/tokens";
import { useMemeburnerStore } from "@/stores/memeburner"; import { useMemeburnerStore } from "@/stores/memeburner";
import StakeComponentV1 from "@/components/StakeComponentV1.vue"; import StakeComponentV1 from "@/components/StakeComponentV1.vue";
import LoadingComponent from "@/components/LoadingComponent.vue";
import TokenInput from "@/components/TokenInput.vue";
import { storeToRefs } from "pinia"; import { storeToRefs } from "pinia";
import { waitForTransaction } from "@wagmi/core"; import { waitForTransaction } from "@wagmi/core";
@@ -169,7 +170,7 @@ const walletStore = useWalletStoreV2();
// const { connected } = storeToRefs(walletStore); // const { connected } = storeToRefs(walletStore);
const tokenStore = useTokenStore(); const tokenStore = useTokenStore();
const { activeToken, loading } = storeToRefs(tokenStore); const { activeToken } = storeToRefs(tokenStore);
const memeburnerStore = useMemeburnerStore(); const memeburnerStore = useMemeburnerStore();
@@ -187,6 +188,7 @@ const props = defineProps({
const tokenNumber = ref(null); const tokenNumber = ref(null);
const output = ref(0); const output = ref(0);
const loading = ref(false);
/** /**
* state 0 enter amount * state 0 enter amount
* state 1 rdy to go * state 1 rdy to go
@@ -227,8 +229,8 @@ async function approveToken(amount) {
const data = await waitForTransaction({ const data = await waitForTransaction({
hash: hash, hash: hash,
}); });
activeToken.value.allowance = await tokenStore.allowance();
console.log("data", data); console.log("data", data);
activeToken.value.allowance = await tokenStore.allowance();
state.value = 1; state.value = 1;
} catch (error) { } catch (error) {
console.error(error); console.error(error);
@@ -239,21 +241,25 @@ async function approveToken(amount) {
} }
async function getRewardsFor(value) { async function getRewardsFor(value) {
if (!value || isNaN(value)) { loading.value = true;
output.value = 0; try {
state.value = 0; if (!value || isNaN(value)) {
return; 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) { async function addTokens(value) {
@@ -271,88 +277,89 @@ async function addTokens(value) {
background-color: var(--primary) background-color: var(--primary)
padding: 24px padding: 24px
align-items: center 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) @media (min-width: 992px)
padding: 48px 64px font-size: 36px
.sacrifice-headline .sacrifice-select-tokens
text-align: center display: flex
font-size: 24px margin-bottom: 32px
margin-bottom: 32px .sacrifice-tokens
@media (min-width: 992px) display: flex
font-size: 36px width: 100%
.sacrifice-select-tokens justify-content: center
display: flex flex-wrap: wrap
margin-bottom: 32px gap: 12px
.sacrifice-tokens
display: flex
width: 100%
justify-content: center
flex-wrap: wrap
gap: 12px
.sacrifice-token .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)
border-radius: 16px border-radius: 16px
padding: 16px padding: 12px
font-size: 16px cursor: pointer
gap: 16px background-color: #0F0F0F
.sacrifice-fees-img text-align: center
img user-select: none
height: 46px border: 4px solid transparent
.sacrifice-fees-body .sacrifice-token-logo
flex: 1 1 auto pointer-events: none
.sacrifice-fees-body-header // @media (min-width: 992px)
display: flex // padding: 0
flex-direction: row // background-color: unset
justify-content: space-between &.sacrifice-token--active
margin-bottom: 8px border-color: var(--purple)
@media (min-width: 992px)
font-size: 24px .sacrifice-token-name
margin-bottom: 0 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 .sacrifice-from-to-wrapper
display: flex display: flex
flex-direction: column flex-direction: column
gap: 16px gap: 16px
width: 100%
@media (min-width: 992px) @media (min-width: 992px)
gap: 32px gap: 32px
.sacrifice-from-wrapper,.sacrifice-to-wrapper .sacrifice-from-wrapper
.sarcrifice-from-input .sarcrifice-from-input
display: flex display: flex
margin-bottom: 8px margin-bottom: 8px
// height: 60px @media (min-width: 992px)
height: 60px
input input
width: 100% width: 100%
height: 45px height: 45px
@@ -370,7 +377,7 @@ async function addTokens(value) {
border-radius: 50% border-radius: 50%
pointer-events: none pointer-events: none
@media (min-width: 992px) @media (min-width: 992px)
height: 83px height: 100%
width: auto width: auto
.sacrifice-to-output .sacrifice-to-output
flex: 1 1 auto flex: 1 1 auto
@@ -388,10 +395,14 @@ async function addTokens(value) {
gap: 6px gap: 6px
.sacrifice-adder-step .sacrifice-adder-step
font-size: 14px font-size: 14px
background: var(--grey, #858585)
color: var(--midnight-black, #0F0F0F)
@media (min-width: 992px)
font-size: 16px
&:hover, &:hover,
&:active, &:active,
&:focus &:focus
background-color: var(--secondary) background-color: var(--grey-light)
cursor: pointer cursor: pointer
// .sacrifice-adder-balance // .sacrifice-adder-balance
// margin-left: auto // margin-left: auto
@@ -404,6 +415,22 @@ async function addTokens(value) {
// color: darken(red, 10%) // color: darken(red, 10%)
// transform: scale(1.1) // transform: scale(1.1)
// transition: transform 0s // 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 .sacrificed-info
display: flex display: flex
padding: 8px 24px padding: 8px 24px
+4 -3
View File
@@ -32,6 +32,7 @@ function testClick(e) {
height: 100% height: 100%
width: 100% width: 100%
position: fixed position: fixed
background-color: rgb(15, 15, 15, 0.7)
.slideout-wrapper .slideout-wrapper
z-index: 100 z-index: 100
height: 100svh height: 100svh
@@ -48,12 +49,12 @@ function testClick(e) {
margin-right: -400px margin-right: -400px
transition: margin-right 250ms ease 0s transition: margin-right 250ms ease 0s
width: auto width: auto
right: 0 right: -30px
bottom: unset top: 0
&.open &.open
margin-bottom: -82px margin-bottom: -82px
@media (min-width: 992px) @media (min-width: 992px)
margin-right: 0 margin-right: 30px
.slideout-panel .slideout-panel
width: 100% width: 100%
height: 100% height: 100%
+5 -2
View File
@@ -1,7 +1,7 @@
<!-- zukünftig card component --> <!-- zukünftig card component -->
<template> <template>
<div <div
class="connected-stake bloodline-border white card" class="connected-stake bloodline-border card"
:class="{ 'card--dense': dense }" :class="{ 'card--dense': dense }"
@click=" @click="
(e) => { (e) => {
@@ -77,6 +77,10 @@ function openUnstake() {
display: flex display: flex
flex-direction: column flex-direction: column
gap: 16px gap: 16px
border: 2px solid var(--grey, #858585)
border-color: var(--grey, #858585)
@media (min-width: 992px)
padding: 8px 12px
&.connected-stake--variant1 &.connected-stake--variant1
background-color: transparent background-color: transparent
border: none border: none
@@ -97,5 +101,4 @@ function openUnstake() {
gap: 16px gap: 16px
div div
flex: 1 1 50% flex: 1 1 50%
font-size: 18px
</style> </style>
+132 -82
View File
@@ -1,94 +1,108 @@
<template> <template>
<div <div
class="connected-stake bloodline-border white card" :class="{
:class="{ 'card--dense': dense, 'connected-stake--variant1': variant === 1 }" 'stake-component--variant1': props.variant === 1,
@click=" 'stake-component--variant2': props.variant === 2,
(e) => { 'stake-component--variant3': props.variant === 3,
e.preventDefault(); }"
e.stopPropagation();
}
"
> >
<div class="connected-stake-headline mid-mid-text"> <div class="mid-text text-center" v-if="props.variant === 2">
<slot name="headline">Staked</slot> <slot name="headline">Staked</slot>
</div> </div>
<div class="low-mid-text text-center"> <div
<slot name="subheadline">Stake for a 25% bonus on your sacrifice. Upper limit is your stake.</slot> class="connected-stake bloodline-border card"
</div> :class="{ 'card--dense': dense, 'connected-stake--variant1': variant === 1 }"
<div class="connected-stake-body"> @click="
<slot name="body"> (e) => {
<token-name-price e.preventDefault();
:name="tokenStore.getToken(walletStore.memeToken?.contractAddress)?.name" e.stopPropagation();
: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> <div class="connected-stake-headline mid-mid-text">
</slot> <slot name="headline" v-if="variant !== 2">Staked</slot>
</div> </div>
<slot name="actions"> <div class="connected-stake-subheadline">
<div class="connected-stake-buttons" v-if="!stakeMenu"> <slot name="subheadline"
<div class="btn btn-immortal" disabled v-if="roundStore.currentRound === 1">Stake</div> >Stake for a 25% bonus on your sacrifice.<br />
<div class="btn btn-immortal" v-else @click="openStake">Stake</div> 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 <div
v-if="(walletStore.memeToken?.staked === 0 && !stakeonly) || roundStore.currentRound === 1" class="connected-stake-first-round small-text text-center"
class="btn btn-immortal btn--disabled" v-if="roundStore.currentRound === roundStore.activeRound"
> >
Unstake No $BLOOD on the market. Staking is activated after the first cycle is finished.
</div> </div>
<div v-else-if="!stakeonly" class="btn btn-immortal" @click="openUnstake">Unstake</div> <div class="connected-stake-claim-info low-mid-text text-center">
</div> You can claim your stake next cycle.
<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> </div>
</Transition> </slot>
<!-- todo v-if activeround --> <slot></slot>
<div </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> -->
</div> </div>
</template> </template>
@@ -149,6 +163,21 @@ async function orderUnstake() {
</script> </script>
<style lang="sass"> <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 .unstake-menu
display: flex display: flex
flex-direction: column flex-direction: column
@@ -157,4 +186,25 @@ async function orderUnstake() {
display: flex display: flex
flex-direction: column flex-direction: column
gap: 8px 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> </style>
+3 -19
View File
@@ -1,35 +1,19 @@
<template> <template>
<div class="stake-menu"> <div class="stake-menu">
<div class="token-input"> <token-input :modelValue="props.modelValue" @input="emit('update:modelValue', Number($event.target.value))">
<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">
<template v-slot:message> <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(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(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(75)">75%</div>
<div class="stake-adder-step bloodline-badge grey" @click="addTokensPercent(100)">100%</div> <div class="stake-adder-step bloodline-badge grey" @click="addTokensPercent(100)">100%</div>
</template> </template>
</token-input> --> </token-input>
<div class="stake-menu-actions"> <div class="stake-menu-actions">
<slot name="body"> <slot name="body">
<div class="input-balance">Balance: {{ walletStore.memeToken.balanceOf }}</div> <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="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 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> </slot>
</div> </div>
</div> </div>
+5 -1
View File
@@ -62,7 +62,10 @@
<div v-else class="btn btn-immortal btn--disabled">Nothing to claim</div> <div v-else class="btn btn-immortal btn--disabled">Nothing to claim</div>
</div> --> </div> -->
<div class="claim-button"> <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> <button class="btn btn-immortal sub-header" @click="router.push({ name: 'home' })">Sacrifice</button>
</template> </template>
<template v-else-if="getCurrentRoundData?.rewards_total > 0"> <template v-else-if="getCurrentRoundData?.rewards_total > 0">
@@ -112,6 +115,7 @@ import StakeMenu from "@/components/StakeMenu.vue";
const clanRewards = ref(0); const clanRewards = ref(0);
const rewards = ref(0); const rewards = ref(0);
const isMobile = inject("isMobile"); const isMobile = inject("isMobile");
const showPanel = inject("showPanel");
const rewardLockerStore = useRewardLockerStore(); const rewardLockerStore = useRewardLockerStore();
const walletStore = useWalletStoreV2(); const walletStore = useWalletStoreV2();
const roundStore = useRoundsStore(); const roundStore = useRoundsStore();
+20 -5
View File
@@ -6,7 +6,11 @@
v-model="props.modelValue" v-model="props.modelValue"
:placeholder="0" :placeholder="0"
/> />
<div class="sacrifice-logo" v-if="props.logo">
<img :src="props.logo" alt="vampir" />
</div>
</div> </div>
<div class="value-adder"> <div class="value-adder">
<slot class="value-adder" name="message"></slot> <slot class="value-adder" name="message"></slot>
</div> </div>
@@ -16,6 +20,7 @@
<script setup> <script setup>
const props = defineProps({ const props = defineProps({
modelValue: Number, modelValue: Number,
logo: String,
}); });
const emit = defineEmits(["update:modelValue"]); const emit = defineEmits(["update:modelValue"]);
@@ -25,7 +30,8 @@ const emit = defineEmits(["update:modelValue"]);
.sarcrifice-from-input .sarcrifice-from-input
display: flex display: flex
margin-bottom: 8px margin-bottom: 8px
// height: 60px @media (min-width: 992px)
height: 60px
input input
width: 100% width: 100%
height: 45px height: 45px
@@ -33,8 +39,18 @@ const emit = defineEmits(["update:modelValue"]);
border-radius: 16px border-radius: 16px
padding: 0 16px padding: 0 16px
@media (min-width: 992px) @media (min-width: 992px)
font-size: 32px font-size: 24px
height: auto 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 .value-adder
display: flex display: flex
gap: 8px gap: 8px
@@ -46,7 +62,6 @@ const emit = defineEmits(["update:modelValue"]);
border-color: transparent border-color: transparent
border-style: solid border-style: solid
&:hover,&:active, &:focus &:hover,&:active, &:focus
color: var(--white) background-color: var(--grey-light)
border-color: var(--white) cursor: pointer
background-color: var(--black)
</style> </style>
+3
View File
@@ -18,4 +18,7 @@ const props = defineProps({
height: 45px height: 45px
border-radius: 50% border-radius: 50%
pointer-events: none pointer-events: none
@media (min-width: 992px)
width: 65px
height: 65px
</style> </style>
+4 -3
View File
@@ -1,7 +1,7 @@
<template> <template>
<div class="token-price-wrapper"> <div class="token-price-wrapper">
<div class="token-name small-text">{{ props.name }}</div> <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> </div>
</template> </template>
@@ -14,6 +14,7 @@ const props = defineProps({
<style lang="sass"> <style lang="sass">
.token-price-wrapper .token-price-wrapper
.token-name display: flex
margin-bottom: 4px flex-direction: column
gap: 4px
</style> </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(); x = x.toString();
var pattern = /(-?\d+)(\d{3})/; var pattern = /(-?\d+)(\d{3})/;
while (pattern.test(x)) x = x.replace(pattern, "$1,$2"); 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(); const walletStore = useWalletStoreV2();
//middleware //middleware
if (to.meta.middleware) { // if (to.meta.middleware) {
if (!walletStore.connected) { // if (!walletStore.connected) {
return false; // return '/';
} // }
} // }
return true; return true;
}); });
+32 -26
View File
@@ -19,21 +19,21 @@ export const useMemeburnerStore = defineStore("memeburner", {
console.log("-----------init memeburner-------------"); console.log("-----------init memeburner-------------");
const walletStore = useWalletStoreV2(); const walletStore = useWalletStoreV2();
// const roundsStore = useRoundsStore(); // const roundsStore = useRoundsStore();
console.log("walletStore.walletClient", walletStore.walletClient); console.log("walletStore.walletClient", walletStore.walletClient);
this.contract = getContract({ this.contract = getContract({
address: this.config.contractAddress, address: this.config.contractAddress,
abi: this.config.abi, abi: this.config.abi,
walletClient: walletStore.walletClient || walletStore.publicClient, walletClient: walletStore.walletClient || walletStore.publicClient,
}); });
console.log("this.contract", this.contract); console.log("this.contract", this.contract);
}, },
async getRewardFor(amount) { async getRewardFor(amount) {
const tokenStore = useTokenStore(); const tokenStore = useTokenStore();
// var rewards = await this.contract.methods const rewards = await this.contract.read.getRewardForSacrifice([
// .getRewardFor(tokenStore.activeToken.contractAddress, amount) tokenStore.activeToken.contractAddress,
// .call(); amount,
const rewards = await this.contract.read.getRewardFor([tokenStore.activeToken.contractAddress, amount]); ]);
console.log("rewards", rewards); console.log("rewards", rewards);
return rewards; return rewards;
}, },
async getCurrentRound() { async getCurrentRound() {
@@ -47,7 +47,7 @@ export const useMemeburnerStore = defineStore("memeburner", {
return await this.contract.read.getSacrificedMeme([roundnumber, tokenAddress]); return await this.contract.read.getSacrificedMeme([roundnumber, tokenAddress]);
}, },
async getAmountToReachGoal(tokenAddress) { async getAmountToReachGoal(tokenAddress) {
return await this.contract.read.getAmountToReachGoal([tokenAddress]); return await this.contract.read.getAmountToReachGoal([tokenAddress, 0]);
}, },
async getSacrificedRound(roundnumber) { async getSacrificedRound(roundnumber) {
console.log("getSacrificedRound", roundnumber); console.log("getSacrificedRound", roundnumber);
@@ -58,15 +58,19 @@ export const useMemeburnerStore = defineStore("memeburner", {
console.log("token.contractAddress", token.contractAddress); console.log("token.contractAddress", token.contractAddress);
console.log("roundnumber", roundnumber); console.log("roundnumber", roundnumber);
// contracts.push(this.contract.methods.getSacrificedMeme(roundnumber, token.contractAddress)); // 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); // console.log("this.contract", this.contract);
// const multicallStore = useMultiCallStore(); // const multicallStore = useMultiCallStore();
// return await multicallStore.aggregate(calls); // return await multicallStore.aggregate(calls);
const data = await multicall({ const data = await multicall({
contracts, contracts,
}); });
return data; return data;
}, },
async sacrificeMeme(amount) { async sacrificeMeme(amount) {
const tokenStore = useTokenStore(); const tokenStore = useTokenStore();
@@ -75,25 +79,27 @@ export const useMemeburnerStore = defineStore("memeburner", {
//todo error //todo error
console.error("amount is 0 or null or undefined"); console.error("amount is 0 or null or undefined");
return; return;
} }
this.loading = true; this.loading = true;
const amountDecimal = BigInt(amount * Math.pow(10, tokenStore.activeToken.decimals)); const amountDecimal = BigInt(amount * Math.pow(10, tokenStore.activeToken.decimals));
console.log("this.contract", this.contract); console.log("this.contract", this.contract);
console.log("amountDecimal", amountDecimal.toString()); console.log("amountDecimal", amountDecimal.toString());
console.log("tokenStore.activeToken.contractAddress", tokenStore.activeToken.contractAddress); console.log("tokenStore.activeToken.contractAddress", tokenStore.activeToken.contractAddress);
var hash = await this.contract.write var hash = await this.contract.write.sacrificeMeme([
.sacrificeMeme([tokenStore.activeToken.contractAddress, amountDecimal.toString()]) tokenStore.activeToken.contractAddress,
return hash; amountDecimal.toString(),
0
]);
return hash;
} catch (error) { } catch (error) {
console.error(error); console.error(error);
throw new Error(error) throw new Error(error);
} finally { } finally {
this.loading = false; this.loading = false;
} }
}, },
async getGoalInBLD(roundNumber) { async getGoalInBLOOD(roundNumber) {
return await this.contract.read.getGoalInBLD([roundNumber]); return await this.contract.read.getGoalInBLOOD([roundNumber]);
}, },
}, },
}); });
+16 -8
View File
@@ -66,14 +66,22 @@ export const useRoundsStore = defineStore("rounds", {
// this.rounds[index].rewards_total = element.result; // this.rounds[index].rewards_total = element.result;
} }
}, },
async updateCurrentRound(sacrificedToken) { async updateCurrentRound(sacrificedToken) {
console.log("updateCurrentRound");
const tokenStore = useTokenStore(); const tokenStore = useTokenStore();
const memeBurnerStore = useMemeburnerStore(); const memeBurnerStore = useMemeburnerStore();
var data = await memeBurnerStore.getSacrificedRound(this.currentRound); var data = await memeBurnerStore.getSacrificedRound(this.currentRound);
var tokenIndex = this.rounds[this.currentRound].token.findIndex( var tokenIndex = this.rounds[this.currentRound].token.findIndex(
(tokenData) => tokenData.contractAddress === sacrificedToken (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) { async fillRound(roundNumber) {
console.log("fillRound"); console.log("fillRound");
@@ -117,10 +125,10 @@ export const useRoundsStore = defineStore("rounds", {
tokenData.vampname = token.vamp.name; tokenData.vampname = token.vamp.name;
// tokenData.amount = data[index].result[1]; // tokenData.amount = data[index].result[1];
tokenData.amount = Number(data[index].result[1]) / Math.pow(10, token.decimals); tokenData.amount = Number(data[index].result[1]) / Math.pow(10, token.decimals);
tokenData.getAmountToReachGoal = // tokenData.getAmountToReachGoal =
Number(await memeBurnerStore.getAmountToReachGoal(token.contractAddress)) / // Number(await memeBurnerStore.getAmountToReachGoal(token.contractAddress)) /
Math.pow(10, token.decimals); // Math.pow(10, token.decimals);
if (this.currentRound !== roundNumber && walletStore.connected) { if (this.currentRound !== roundNumber && walletStore.connected) {
console.log("index", index); console.log("index", index);
console.log("rewardData[index]", rewardData[index]); console.log("rewardData[index]", rewardData[index]);
const stakeReward = Number(rewardData[index].result[0]); const stakeReward = Number(rewardData[index].result[0]);
@@ -145,7 +153,7 @@ export const useRoundsStore = defineStore("rounds", {
tokenArray.push(tokenData); tokenArray.push(tokenData);
} }
console.log("clanwin123", rewards_clan); console.log("clanwin123", rewards_clan);
const goalInBLD = await memeBurnerStore.getGoalInBLD(roundNumber); const goalInBLD = await memeBurnerStore.getGoalInBLOOD(roundNumber);
this.rounds[roundNumber] = { this.rounds[roundNumber] = {
goal: Number(goal[0]) / Math.pow(10, tokenStore.memeToken.decimals), goal: Number(goal[0]) / Math.pow(10, tokenStore.memeToken.decimals),
goalInBLD: Number(goalInBLD / BigInt(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 { markRaw } from "vue";
import { useTokenStore } from "./tokens"; import { useTokenStore } from "./tokens";
import { useRewardLockerStore } from "./rewardlocker"; import { useRewardLockerStore } from "./rewardlocker";
import MemeToken from "@/assets/contracts/MemeToken.json";
import { import {
createConfig, createConfig,
+26 -6
View File
@@ -1,10 +1,9 @@
<template> <template>
<div class="cycle-page"> <div class="cycle-page">
<div class="cycle-header container container--variant1"> <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"> <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 Claim and trade your $BDL at each cycle's end. Become the most powerful bloodline and win extra rewards.
extra rewards.
</div> </div>
</div> </div>
<div class="slider-wrapper" :class="{ sticking: sticking }" ref="target"> <div class="slider-wrapper" :class="{ sticking: sticking }" ref="target">
@@ -116,6 +115,8 @@ const timer = ref(null);
const difference = ref(null); const difference = ref(null);
const target = ref(); const target = ref();
const sticking = ref(false); const sticking = ref(false);
const observer = ref(null);
const observerElement = ref(null);
const memeBurnerStore = useMemeburnerStore(); const memeBurnerStore = useMemeburnerStore();
const rewardLockerStore = useRewardLockerStore(); const rewardLockerStore = useRewardLockerStore();
@@ -140,10 +141,30 @@ onMounted(async () => {
timeBetweenDates(expirationTimestamp); timeBetweenDates(expirationTimestamp);
}, 1000); }, 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(() => { onBeforeUnmount(() => {
clearInterval(timer.value); clearInterval(timer.value);
observer.value.unobserve(observerElement.value);
}); });
async function prevSlide() { async function prevSlide() {
@@ -206,10 +227,9 @@ function timeBetweenDates(expirationTimestamp) {
position: sticky position: sticky
top: 82px top: 82px
z-index: 3 z-index: 3
background: #2D2D2D
padding: 16px 0 padding: 16px 0
&:stuck &.stuck
background-color: red background: #2D2D2D
@media (min-width: 992px) @media (min-width: 992px)
top: 127px top: 127px
.slider-text .slider-text
+15 -3
View File
@@ -2,7 +2,7 @@
<div class="profile-page container"> <div class="profile-page container">
<div class="profile-header"> <div class="profile-header">
<div class="profile-headline header">Profile</div> <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="profile-subheader-logo"><img :src="getblocky(walletStore.address)" alt="" /></div>
<div class="mid-mid-text">{{ getAddressShortName(walletStore.address) }}</div> <div class="mid-mid-text">{{ getAddressShortName(walletStore.address) }}</div>
</div> </div>
@@ -11,7 +11,12 @@
<div class="total-rewards-headline mid-text text-center">Total Rewards</div> <div class="total-rewards-headline mid-text text-center">Total Rewards</div>
<claim-component></claim-component> <claim-component></claim-component>
</div> </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"> <div class="profile-stake">
<!-- <stake-component> <!-- <stake-component>
<template v-slot:headline> Staked </template> <template v-slot:headline> Staked </template>
@@ -158,7 +163,7 @@
</template> </template>
<script setup> <script setup>
import { ref, onMounted, computed } from "vue"; import { ref, onMounted, computed, inject } from "vue";
import { useRoundsStore } from "@/stores/rounds"; import { useRoundsStore } from "@/stores/rounds";
import { useWalletStoreV2 } from "@/stores/walletV2"; import { useWalletStoreV2 } from "@/stores/walletV2";
@@ -174,6 +179,7 @@ const roundsStore = useRoundsStore();
const walletStore = useWalletStoreV2(); const walletStore = useWalletStoreV2();
const rewardLockerStore = useRewardLockerStore(); const rewardLockerStore = useRewardLockerStore();
const memeBurnerStore = useMemeburnerStore(); const memeBurnerStore = useMemeburnerStore();
const isMobile = inject("isMobile");
const activeRound = ref(null); const activeRound = ref(null);
const openCycleElement = ref(false); const openCycleElement = ref(false);
@@ -237,6 +243,10 @@ const rounds = computed(() => {
width: 21px width: 21px
height: 21px height: 21px
border-radius: 20% border-radius: 20%
@media (min-width: 992px)
width: 32px
height: 32px
.total-rewards-wrapper .total-rewards-wrapper
border-radius: 16px border-radius: 16px
background: var(--darkgrey, #202020) background: var(--darkgrey, #202020)
@@ -244,6 +254,8 @@ const rounds = computed(() => {
flex-direction: column flex-direction: column
gap: 24px gap: 24px
padding: 8px padding: 8px
@media (min-width: 992px)
padding: 32px 64px
.total-rewards-inner .total-rewards-inner
border-radius: 16px border-radius: 16px
border: 2px solid var(--grey, #858585) 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 Meme1Json from "@/assets/contracts/Meme1.json";
import Meme2Json from "@/assets/contracts/Meme2.json"; import Meme2Json from "@/assets/contracts/Meme2.json";
import MemeBurnerJson from "@/assets/contracts/Bloodline.json"; import MemeBurnerJson from "@/assets/contracts/Bloodline.json";
import MemeTokenJson from "@/assets/contracts/MemeToken.json";
import RewardLockerJson from "@/assets/contracts/RewardLocker.json"; import RewardLockerJson from "@/assets/contracts/RewardLocker.json";
import { useTokenStore } from "@/stores/tokens"; import { useTokenStore } from "@/stores/tokens";
import { useWalletStoreV2 } from "@/stores/walletV2"; import { useWalletStoreV2 } from "@/stores/walletV2";
@@ -33,7 +32,6 @@ const memeBurnerStore = useMemeburnerStore();
console.log("Meme1Json", Meme1Json); console.log("Meme1Json", Meme1Json);
console.log("Meme2Json", Meme2Json); console.log("Meme2Json", Meme2Json);
console.log("MemeBurnerJson", MemeBurnerJson); console.log("MemeBurnerJson", MemeBurnerJson);
console.log("MemeTokenJson", MemeTokenJson);
console.log("RewardLockerJson", RewardLockerJson); console.log("RewardLockerJson", RewardLockerJson);
const contractMeme2 = ref(null); const contractMeme2 = ref(null);