update new contracts
This commit is contained in:
+60
-4
@@ -13,6 +13,7 @@ import { useRoundsStore } from "@/stores/rounds";
|
||||
|
||||
import SlideoutPanel from "./components/SlideoutPanel.vue";
|
||||
import ConnectWallet from "./components/ConnectWallet.vue";
|
||||
import StakeComponent from "@/components/StakeComponent.vue";
|
||||
|
||||
import {
|
||||
watchAccount,
|
||||
@@ -36,6 +37,7 @@ const { memeBurner, token } = storeToRefs(tokenStore);
|
||||
const { list } = storeToRefs(contractStore);
|
||||
const isMobile = ref(false);
|
||||
const showPanel = ref(false);
|
||||
const showModal = ref(false);
|
||||
const eventWatch = ref(null);
|
||||
const netWorkEvent = ref(null);
|
||||
const memeSacrificedEvent = ref(null);
|
||||
@@ -80,6 +82,7 @@ function changeRoute(name) {
|
||||
}
|
||||
provide("isMobile", isMobile);
|
||||
provide("showPanel", showPanel);
|
||||
provide("showModal", showModal);
|
||||
|
||||
onMounted(async () => {
|
||||
console.log("onmounted");
|
||||
@@ -130,11 +133,32 @@ onMounted(async () => {
|
||||
<slideout-panel v-model="showPanel">
|
||||
<connect-wallet></connect-wallet>
|
||||
</slideout-panel>
|
||||
<div class="modal-overlay" v-show="showModal">
|
||||
<stake-component class="modal-card">
|
||||
<div class="body">
|
||||
<div class="header">
|
||||
<img alt="logo" class="logo" src="/assets/img/vampir.png" />
|
||||
</div>
|
||||
<div class="subheader low-mid-text">
|
||||
Success!<br />
|
||||
You turned your meme into:
|
||||
</div>
|
||||
<div class="amount-number">
|
||||
<div class="token-amount number-mobile">{{ tokenStore.activeToken.rewards }}</div>
|
||||
<div class="token-name">$Blood</div>
|
||||
</div>
|
||||
<div class="info low-mid-text">
|
||||
You can claim once the current cycle is finished and your clan bonus was calculated
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn btn-immortal" @click="showModal = false">Okay</div>
|
||||
</stake-component>
|
||||
</div>
|
||||
<div class="main" :class="{ 'no-scroll': showPanel, mobile: isMobile }">
|
||||
<RouterView />
|
||||
</div>
|
||||
<div class="footer">
|
||||
<!-- <div class="footer-inner">
|
||||
<div class="footer-inner">
|
||||
<div class="footer-headline">Follow Bloodline</div>
|
||||
<div class="footer-social-links">
|
||||
<div class="social-bloodline-badge">
|
||||
@@ -153,9 +177,9 @@ onMounted(async () => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="mobile-navigation-bar" v-if="isMobile">
|
||||
<div class="mobile-navigation-bar" v-if="isMobile && walletStore.connected">
|
||||
<div @click="changeRoute('home')" :class="{ active: route.name === 'home' }">
|
||||
<font-awesome-icon icon="fa-droplet" />
|
||||
</div>
|
||||
@@ -172,7 +196,6 @@ onMounted(async () => {
|
||||
.footer
|
||||
height: auto
|
||||
background-color: var(--midnight-black)
|
||||
min-height: 72px
|
||||
@media (min-width: 992px)
|
||||
height: 450px
|
||||
min-height: 450px
|
||||
@@ -206,6 +229,7 @@ onMounted(async () => {
|
||||
|
||||
.mobile-navigation-bar
|
||||
height: 72px
|
||||
z-index: 1
|
||||
width: 100%
|
||||
padding: 16px 48px
|
||||
border-radius: 16px 16px 0px 0px
|
||||
@@ -221,4 +245,36 @@ onMounted(async () => {
|
||||
cursor: pointer
|
||||
&.active
|
||||
color: var(--purple)
|
||||
|
||||
.modal-overlay
|
||||
background-color: rgb(15, 15, 15, 0.7)
|
||||
height: 100vh
|
||||
position: fixed
|
||||
left: 0
|
||||
bottom: 0
|
||||
width: 100%
|
||||
z-index: 10
|
||||
.modal-card
|
||||
min-width: 342px
|
||||
text-align: center
|
||||
position: absolute
|
||||
top: 50%
|
||||
left: 50%
|
||||
transform: translate(-50%, -50%)
|
||||
border: 2px solid var(--dark-purple, #4B0082)
|
||||
background: var(--midnight-black, #0F0F0F)
|
||||
z-index: 100
|
||||
gap: 16px
|
||||
.body
|
||||
display: flex
|
||||
flex-direction: column
|
||||
gap: 8px
|
||||
.amount-number
|
||||
display: flex
|
||||
justify-content: center
|
||||
align-items: end
|
||||
gap: 8px
|
||||
img
|
||||
width: 74px
|
||||
height: 74px
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,397 @@
|
||||
{
|
||||
"contractName": "Bloodline",
|
||||
"contractAddress": "0xda743950e70F9483ED1fDccb529c62a73BF80014",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_rewardLocker",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_weth",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_nfPositionManager",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint160[2]",
|
||||
"name": "_sqrtPricesX96",
|
||||
"type": "uint160[2]"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "NotAllowedToMint",
|
||||
"type": "error"
|
||||
},
|
||||
{
|
||||
"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": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "decimals",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint8",
|
||||
"name": "",
|
||||
"type": "uint8"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "account",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "mintBloodline",
|
||||
"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": "rewardLocker",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"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": "uniV3Pool",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"contractName": "LiquidityOwner",
|
||||
"contractAddress": "0x88E69D5CE691644F7cE151a2b085798194DAFEa1",
|
||||
"contractAddress": "0xB6B58b4fD73e6bc4fcA72Fa9d40255D60950ca4B",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
@@ -11,7 +11,7 @@
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_memeToken",
|
||||
"name": "_bloodline",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_memeBurner",
|
||||
"name": "_memeAltar",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
@@ -111,7 +111,7 @@
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amountMemeToken",
|
||||
"name": "amountBloodline",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
@@ -144,6 +144,19 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "bloodline",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "burn",
|
||||
@@ -188,6 +201,19 @@
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "collectedEthTotal",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "currentTokenIdToFill",
|
||||
@@ -244,7 +270,7 @@
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amountMemeToken",
|
||||
"name": "amountBloodline",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
@@ -255,20 +281,7 @@
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "memeBurner",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "memeToken",
|
||||
"name": "memeAltar",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
@@ -389,25 +402,6 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "round1",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"name": "provideLiquidity",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "ethSpentOnGas",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "rebalance",
|
||||
@@ -440,6 +434,25 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "collectedEthInRound",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "triggeredByMemeAltar",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "issuancePrice",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
@@ -456,14 +469,19 @@
|
||||
"internalType": "uint256",
|
||||
"name": "consumedGasByMemeAltar",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "collectedEthInRound",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "triggeredByMemeAltar",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
"internalType": "uint256",
|
||||
"name": "issuancePrice",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
|
||||
@@ -0,0 +1,818 @@
|
||||
{
|
||||
"contractName": "MemeAltar",
|
||||
"contractAddress": "0x6Def7896c714b77bD9BcD6BF5d88A1e7000C86dE",
|
||||
"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": "_bloodline",
|
||||
"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": "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 MemeAltar.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 MemeAltar.BM",
|
||||
"name": "newBM",
|
||||
"type": "tuple"
|
||||
}
|
||||
],
|
||||
"name": "adjustBM",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "newDefaultGoal",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "adjustDefaultGoal",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "newDurationLimit",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "adjustRoundDurationLimit",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "admin",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "bloodline",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "contract Bloodline",
|
||||
"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": "issuancePrice",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "ethUsedToBuy",
|
||||
"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": "uint256",
|
||||
"name": "minBLD",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "memeToSacrifice",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amountToSacrifice",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "sacrificeMemeAndBuyBLD",
|
||||
"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": [
|
||||
{
|
||||
"internalType": "int256",
|
||||
"name": "amount0Delta",
|
||||
"type": "int256"
|
||||
},
|
||||
{
|
||||
"internalType": "int256",
|
||||
"name": "amount1Delta",
|
||||
"type": "int256"
|
||||
},
|
||||
{
|
||||
"internalType": "bytes",
|
||||
"name": "_data",
|
||||
"type": "bytes"
|
||||
}
|
||||
],
|
||||
"name": "uniswapV3SwapCallback",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "weth",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"stateMutability": "payable",
|
||||
"type": "receive"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"contractName": "RewardLocker",
|
||||
"contractAddress": "0x7C3D5a19878d550D0c6c2b0BFC884ef410F6e440",
|
||||
"contractAddress": "0xc180014777BC1E0720dDD4CA5952c1Cd277f7afE",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
@@ -15,12 +15,7 @@
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "MemeAltarAlreadyInitialized",
|
||||
"type": "error"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "MemeTokenAlreadyInitialized",
|
||||
"name": "AlreadyInitialized",
|
||||
"type": "error"
|
||||
},
|
||||
{
|
||||
@@ -201,6 +196,19 @@
|
||||
"name": "UnstakeOrdered",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "bloodline",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "contract Bloodline",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
@@ -268,6 +276,40 @@
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "user",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "roundNumber",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "sacrificedToken",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "getRewards",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "stakeReward",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "sacrificeReward",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
@@ -311,35 +353,6 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "roundNumber",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "sacrificedToken",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "getSacrificedTokenTotalRewards",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "totalDefaultRewardsForToken",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "totalRewardsForToken",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
@@ -357,7 +370,36 @@
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "totalRewardsAmount",
|
||||
"name": "totalSacrificeRewards",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "totalStakeRewards",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "roundNumber",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "sacrificedToken",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "getTotalSacrificeRewardsForToken",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "totalSacrificeRewardsForToken",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
@@ -373,7 +415,7 @@
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_memeToken",
|
||||
"name": "_bloodline",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
@@ -408,19 +450,6 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "memeToken",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "contract MemeToken",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "orderUnstake",
|
||||
@@ -540,35 +569,6 @@
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "rewards",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
@@ -586,12 +586,12 @@
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "totalDefaultRewards",
|
||||
"name": "totalSacrificeCompetitionRewards",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "totalRewards",
|
||||
"name": "totalStakeRewards",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
[{"inputs":[{"internalType":"address","name":"meme","type":"address"},{"internalType":"address","name":"uniV2Pool","type":"address"}],"name":"addMemeToList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint8","name":"b1","type":"uint8"},{"internalType":"uint8","name":"m1","type":"uint8"},{"internalType":"uint8","name":"b2","type":"uint8"},{"internalType":"uint8","name":"m2","type":"uint8"},{"internalType":"uint8","name":"b3","type":"uint8"},{"internalType":"uint8","name":"m4","type":"uint8"}],"internalType":"struct MemeAltar.BM","name":"newBM","type":"tuple"}],"name":"adjustBM","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDefaultGoal","type":"uint256"}],"name":"adjustDefaultGoal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDurationLimit","type":"uint256"}],"name":"adjustRoundDurationLimit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"meme","type":"address"}],"name":"removeMemeFromList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"switchAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFixedPrice","type":"uint256"}],"name":"adjustFixedPrice","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
|
||||
@@ -3,9 +3,12 @@
|
||||
padding: 16px 24px
|
||||
gap: 8px
|
||||
border-radius: 14px
|
||||
&.btn--disabled
|
||||
background-color: #151515
|
||||
color: #808080
|
||||
border: none
|
||||
display: block
|
||||
width: 100%
|
||||
text-decoration: none
|
||||
&[disabled], &.btn--disabled
|
||||
background-color: darken($purple, 10%)
|
||||
cursor: not-allowed
|
||||
&.black
|
||||
background-color: var(--midnight-black)
|
||||
@@ -13,6 +16,9 @@
|
||||
background-color: $purple
|
||||
color: $button-color
|
||||
font-size: 24px
|
||||
&[disabled], &.btn--disabled
|
||||
background-color: darken($purple, 10%)
|
||||
cursor: not-allowed
|
||||
&:hover,&:focus,&:active
|
||||
background-color: darken($purple, 10%),
|
||||
cursor: pointer
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<swiper class="blood-chart-wrapper" :slidesPerView="'auto'" :centeredSlides="false" :spaceBetween="35">
|
||||
<swiper-slide class="blood-chart-element" v-for="coin in props.data.token" :key="coin.name">
|
||||
<swiper-slide class="blood-chart-element" v-for="coin in token" :key="coin.name">
|
||||
<div class="blood-chart-element-header">
|
||||
<div class="blood-chart-coin">
|
||||
<img :src="getImageUrl(coin.vamplogo)" alt="logo" />
|
||||
@@ -106,6 +106,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from "vue";
|
||||
import { getPercentage, compactNumber } from "@/helper/helper.js";
|
||||
import { useMemeburnerStore } from "@/stores/memeburner";
|
||||
import { Swiper, SwiperSlide } from "swiper/vue";
|
||||
@@ -128,6 +129,8 @@ function getImageUrl(url) {
|
||||
return new URL(url, import.meta.url).href;
|
||||
}
|
||||
|
||||
const token = computed(() => props.data?.token);
|
||||
|
||||
// const dataPoints = [
|
||||
// {
|
||||
// name: "$PEPE",
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
:name="tokenStore.getToken(walletStore.memeToken?.contractAddress)?.name"
|
||||
:price="walletStore.memeToken?.unclaimedRewards"
|
||||
></token-name-price>
|
||||
<token-logo img="/assets/img/token/bloodline.png" :alt="'todo'"></token-logo>
|
||||
<token-logo img="/assets/img/token/bloodline.png" :alt="'bloodline logo'"></token-logo>
|
||||
</template>
|
||||
<template v-slot:actions>
|
||||
<Transition name="smooth">
|
||||
|
||||
@@ -36,7 +36,11 @@
|
||||
}"
|
||||
>
|
||||
<div class="sarcrifice-from-input">
|
||||
<input @input="processChange" v-model="tokenNumber" :placeholder="0" />
|
||||
<input
|
||||
@input="($event) => getRewardsFor($event.target.value)"
|
||||
v-model="tokenNumber"
|
||||
:placeholder="0"
|
||||
/>
|
||||
<div class="sacrifice-logo">
|
||||
<img :src="activeToken.logo" alt="vampir" />
|
||||
</div>
|
||||
@@ -68,7 +72,7 @@
|
||||
<div class="sacrifice-to-output-rewards">{{ output }}</div>
|
||||
</div>
|
||||
<div class="sacrifice-logo">
|
||||
<img :src="activeToken.vamp.logo" :alt="activeToken.vamp.name" />
|
||||
<img :src="activeToken.vamp?.logo" :alt="activeToken.vamp.name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="sacrifice-staking-bonus">
|
||||
@@ -88,7 +92,7 @@
|
||||
<stake-component v-if="showStakingMenu" stakeonly class="variant1"></stake-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sacrificed-info">
|
||||
<div class="sacrificed-info" v-if="state === 4">
|
||||
<div class="left low-mid-text">You can claim your $BLOOD when the cycle is finished.</div>
|
||||
<div class="right">
|
||||
<img src="/assets/img/moon.png" alt="moon" />
|
||||
@@ -107,28 +111,36 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="sacrifice-buttons-function-wrapper">
|
||||
<div v-if="walletStore.connected">
|
||||
<template v-if="walletStore.connected">
|
||||
<div class="btn btn-immortal" disabled v-if="state === 0">Enter Amount</div>
|
||||
<div
|
||||
class="btn btn-immortal"
|
||||
v-if="activeToken.allowance > 0 && activeToken.allowance >= tokenNumber"
|
||||
@click="approvalData = memeburnerStore.sacrificeMeme(tokenNumber)"
|
||||
v-if="
|
||||
activeToken.allowance > 0 &&
|
||||
activeToken.allowance >= tokenNumber &&
|
||||
(state === 1 || state === 4)
|
||||
"
|
||||
@click="sacrificeToken(tokenNumber)"
|
||||
>
|
||||
<font-awesome-icon v-if="memeburnerStore.loading" icon="spinner" spin />
|
||||
Sacrifce {{ activeToken.name }}
|
||||
Sacrifce
|
||||
</div>
|
||||
<div
|
||||
class="btn btn-immortal"
|
||||
v-else
|
||||
@click="approvalData = tokenStore.approveToken(tokenNumber)"
|
||||
v-if="
|
||||
(!activeToken.allowance || activeToken.allowance < tokenNumber) &&
|
||||
(state === 1 || state === 4)
|
||||
"
|
||||
@click="approveToken(tokenNumber)"
|
||||
>
|
||||
<font-awesome-icon v-if="loading" icon="spinner" spin />
|
||||
Approve {{ activeToken.name }}
|
||||
Approve
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<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="walletStore.connectWallet">Connect</div> -->
|
||||
<div class="btn btn-immortal" @click="showPanel = true">Connect</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -142,9 +154,12 @@ import { useTokenStore } from "@/stores/tokens";
|
||||
import { useMemeburnerStore } from "@/stores/memeburner";
|
||||
import StakeComponent from "./StakeComponent.vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { waitForTransaction } from "@wagmi/core";
|
||||
|
||||
import Helper from "@/utils/helper.js";
|
||||
const isMobile = inject("isMobile");
|
||||
const showPanel = inject("showPanel");
|
||||
const showModal = inject("showModal");
|
||||
|
||||
const walletStore = useWalletStoreV2();
|
||||
// const { connected } = storeToRefs(walletStore);
|
||||
@@ -158,24 +173,71 @@ const props = defineProps({
|
||||
data: Array,
|
||||
});
|
||||
|
||||
watch(
|
||||
activeToken,
|
||||
() => {
|
||||
tokenNumber.value = null;
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
// watch(
|
||||
// activeToken,
|
||||
// () => {
|
||||
// tokenNumber.value = null;
|
||||
// },
|
||||
// { deep: true }
|
||||
// );
|
||||
|
||||
const tokenNumber = ref(0);
|
||||
const tokenNumber = ref(null);
|
||||
const output = ref(0);
|
||||
/**
|
||||
* state 0 enter amount
|
||||
* state 1 rdy to go
|
||||
* state 2 signing
|
||||
* state 3 loading
|
||||
* state 4 sacrificed
|
||||
*/
|
||||
const state = ref(0);
|
||||
const showStakingMenu = ref(false);
|
||||
const approvalData = ref(null);
|
||||
|
||||
const processChange = Helper.debounce((e) => getRewardsFor(e.target.value));
|
||||
// const processChange = Helper.debounce((e) => getRewardsFor(e.target.value));
|
||||
|
||||
async function sacrificeToken(amount) {
|
||||
try {
|
||||
state.value = 2;
|
||||
const hash = await memeburnerStore.sacrificeMeme(amount);
|
||||
console.log("hash", hash);
|
||||
state.value = 3;
|
||||
const data = await waitForTransaction({
|
||||
hash: hash,
|
||||
});
|
||||
console.log("data", data);
|
||||
activeToken.value.allowance = await tokenStore.allowance();
|
||||
state.value = 4;
|
||||
showModal.value = true;
|
||||
} catch (error) {
|
||||
state.value = 0;
|
||||
console.error(error);
|
||||
throw new Error(error);
|
||||
}
|
||||
}
|
||||
async function approveToken(amount) {
|
||||
try {
|
||||
state.value = 2;
|
||||
const hash = await tokenStore.approveToken(amount);
|
||||
state.value = 3;
|
||||
const data = await waitForTransaction({
|
||||
hash: hash,
|
||||
});
|
||||
activeToken.value.allowance = await tokenStore.allowance();
|
||||
console.log("data", data);
|
||||
state.value = 1;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
throw new Error(error);
|
||||
} finally {
|
||||
state.value = 1;
|
||||
}
|
||||
}
|
||||
|
||||
async function getRewardsFor(value) {
|
||||
if (!value || isNaN(value)) {
|
||||
output.value = 0;
|
||||
state.value = 0;
|
||||
return;
|
||||
}
|
||||
const rewardsForResult = await memeburnerStore.getRewardFor(
|
||||
@@ -184,7 +246,9 @@ async function getRewardsFor(value) {
|
||||
// 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;
|
||||
}
|
||||
|
||||
@@ -259,10 +323,12 @@ async function addTokens(value) {
|
||||
border: 2px dashed var(--grey)
|
||||
color: var(--grey)
|
||||
border-radius: 16px
|
||||
padding: 16px 24px
|
||||
padding: 16px
|
||||
font-size: 16px
|
||||
.sacrifice-fees-img
|
||||
flex: 0 0 15%
|
||||
img
|
||||
height: 46px
|
||||
.sacrifice-fees-body
|
||||
flex: 1 1 auto
|
||||
.sacrifice-fees-body-header
|
||||
|
||||
@@ -12,8 +12,15 @@
|
||||
</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">
|
||||
<div class="btn" disabled v-if="roundStore.activeRound === roundStore.currentRound">Stake</div>
|
||||
<div class="btn" v-else @click="openStake">Stake</div>
|
||||
<div
|
||||
v-if="
|
||||
(walletStore.memeToken?.staked === 0 && !stakeonly) ||
|
||||
roundStore.activeRound === roundStore.currentRound
|
||||
"
|
||||
class="btn btn-immortal btn--disabled"
|
||||
>
|
||||
Unstake
|
||||
</div>
|
||||
<div v-else-if="!stakeonly" class="btn btn-immortal" @click="openUnstake">Unstake</div>
|
||||
@@ -53,7 +60,10 @@
|
||||
</div>
|
||||
</Transition>
|
||||
<!-- todo v-if activeround -->
|
||||
<div class="connected-stake-first-round small-text text-center">
|
||||
<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>
|
||||
@@ -68,6 +78,7 @@ import StakeMenu from "@/components/StakeMenu.vue";
|
||||
import TokenNamePrice from "@/components/TokenNamePrice.vue";
|
||||
import TokenLogo from "@/components/TokenLogo.vue";
|
||||
|
||||
import { useRoundsStore } from "@/stores/rounds";
|
||||
import { useRewardLockerStore } from "@/stores/rewardlocker";
|
||||
import { useWalletStoreV2 } from "@/stores/walletV2";
|
||||
import { useTokenStore } from "@/stores/tokens";
|
||||
@@ -75,6 +86,7 @@ import { useTokenStore } from "@/stores/tokens";
|
||||
const walletStore = useWalletStoreV2();
|
||||
const tokenStore = useTokenStore();
|
||||
const rewardLockerStore = useRewardLockerStore();
|
||||
const roundStore = useRoundsStore();
|
||||
|
||||
const props = defineProps({
|
||||
stakeonly: {
|
||||
|
||||
@@ -34,13 +34,16 @@
|
||||
<div class="rewards-total-inner bloodline-border bloodline-border--variant1">
|
||||
<div class="rewards-body">
|
||||
<div class="rewards-coin">$BLOOD</div>
|
||||
<div class="rewards-amount">todo</div>
|
||||
<div class="rewards-amount" v-if="activeRound === currentRound">0</div>
|
||||
<div class="rewards-amount" v-else>todo</div>
|
||||
</div>
|
||||
<img class="bloodline-token" src="/assets/img/token/bloodline.png" alt="vampir" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="claim-button">
|
||||
<div v-if="activeRound === currentRound" class="btn btn-immortal btn--disabled">Cycle Active</div>
|
||||
<button v-if="activeRound === currentRound" class="btn btn-immortal" @click="router.push({ name: 'home' })">
|
||||
Sacrifice
|
||||
</button>
|
||||
<div class="stake-buttons" v-else-if="getCurrentRoundData?.rewards_total > 0">
|
||||
<div class="btn btn-immortal" @click="claimRewards">Claim</div>
|
||||
<div class="btn btn-immortal">Stake</div>
|
||||
@@ -57,6 +60,8 @@ import { inject, ref, onMounted } from "vue";
|
||||
import { useRewardLockerStore } from "@/stores/rewardlocker";
|
||||
import { useWalletStoreV2 } from "@/stores/walletV2";
|
||||
import { useRoundsStore } from "@/stores/rounds";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const clanRewards = ref(0);
|
||||
const rewards = ref(0);
|
||||
const isMobile = inject("isMobile");
|
||||
@@ -64,6 +69,8 @@ const rewardLockerStore = useRewardLockerStore();
|
||||
const walletStore = useWalletStoreV2();
|
||||
const roundStore = useRoundsStore();
|
||||
const { address } = storeToRefs(walletStore);
|
||||
const router = useRouter();
|
||||
|
||||
const { activeRound, currentRound, getCurrentRoundData } = storeToRefs(roundStore);
|
||||
|
||||
onMounted(async () => {});
|
||||
|
||||
+20
-20
@@ -127,21 +127,22 @@ walletStore.publicClient = publicClient;
|
||||
|
||||
const networkId = getNetwork()?.chain?.id;
|
||||
|
||||
watchWalletClient(
|
||||
{
|
||||
chainId: networkId,
|
||||
},
|
||||
async (walletClient) => {
|
||||
walletStore.walletClient = walletClient;
|
||||
}
|
||||
);
|
||||
// watchWalletClient(
|
||||
// {
|
||||
// chainId: networkId,
|
||||
// },
|
||||
// async (walletClient) => {
|
||||
// console.log("watchWalletClient", walletClient);
|
||||
// walletStore.walletClient = walletClient;
|
||||
// }
|
||||
// );
|
||||
|
||||
watchPublicClient(
|
||||
{
|
||||
chainId: networkId,
|
||||
},
|
||||
(publicClient) => console.log("publicClient", publicClient)
|
||||
);
|
||||
// watchPublicClient(
|
||||
// {
|
||||
// chainId: networkId,
|
||||
// },
|
||||
// (publicClient) => console.log("publicClient", publicClient)
|
||||
// );
|
||||
|
||||
watchContractEvent(
|
||||
{
|
||||
@@ -168,12 +169,12 @@ watchAccount(async (account) => {
|
||||
const { chain, chains } = getNetwork();
|
||||
chainObject = chain;
|
||||
}
|
||||
// var walletClient = await getWalletClient({
|
||||
// account: account.address,
|
||||
// chainId: chainObject.id,
|
||||
// });
|
||||
var walletClient = await getWalletClient({
|
||||
account: account.address,
|
||||
chainId: chainObject.id,
|
||||
});
|
||||
|
||||
// walletStore.walletClient = walletClient;
|
||||
walletStore.walletClient = walletClient;
|
||||
|
||||
await memeBurnerStore.init();
|
||||
await tokenStore.initV2();
|
||||
@@ -187,7 +188,6 @@ watchAccount(async (account) => {
|
||||
});
|
||||
|
||||
watchNetwork((network) => {
|
||||
console.log("network123", network);
|
||||
if (network.chain) {
|
||||
walletStore.chain = network.chain;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { defineStore } from "pinia";
|
||||
import MemeBurnerJson from "@/assets/contracts/MemeBurner.json";
|
||||
import MemeAltarJson from "@/assets/contracts/MemeAltar.json";
|
||||
import { useTokenStore } from "./tokens";
|
||||
import { useWalletStoreV2 } from "./walletV2";
|
||||
import { useRoundsStore } from "@/stores/rounds";
|
||||
@@ -9,7 +9,7 @@ import { multicall, getContract, fetchToken, waitForTransaction, getWalletClient
|
||||
|
||||
export const useMemeburnerStore = defineStore("memeburner", {
|
||||
state: () => ({
|
||||
config: MemeBurnerJson,
|
||||
config: MemeAltarJson,
|
||||
contract: null,
|
||||
loading: false,
|
||||
}),
|
||||
@@ -82,14 +82,12 @@ export const useMemeburnerStore = defineStore("memeburner", {
|
||||
console.log("amountDecimal", amountDecimal.toString());
|
||||
console.log("tokenStore.activeToken.contractAddress", tokenStore.activeToken.contractAddress);
|
||||
var hash = await this.contract.write
|
||||
.sacrificeMeme([tokenStore.activeToken.contractAddress, amountDecimal.toString()])
|
||||
console.log("hash", hash);
|
||||
const data = await waitForTransaction({
|
||||
hash: hash,
|
||||
});
|
||||
tokenStore.activeToken.allowance = await tokenStore.allowance();
|
||||
.sacrificeMeme([tokenStore.activeToken.contractAddress, amountDecimal.toString()])
|
||||
return hash;
|
||||
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
throw new Error(error)
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export const useRewardLockerStore = defineStore("rewardlocker", {
|
||||
console.log("acocunt", account);
|
||||
|
||||
const rounds = await roundsStore.getFinshedRoundNumbers();
|
||||
return await this.contract.write.claim([[1, 2]]);
|
||||
return await this.contract.write.claim([rounds]);
|
||||
},
|
||||
async getTotalRewardsOf(address, rounds) {
|
||||
return await this.contract.read.getTotalRewardsOf([address, rounds]);
|
||||
|
||||
@@ -55,7 +55,6 @@ export const useRoundsStore = defineStore("rounds", {
|
||||
const data = await multicall({
|
||||
contracts,
|
||||
});
|
||||
console.log("data123abc", data);
|
||||
// var test = await rewardLockerStore.getTotalRewardsOf(walletStore.address, rounds)
|
||||
for (let index = 0; index < data.length; index++) {
|
||||
const element = data[index];
|
||||
@@ -70,7 +69,6 @@ export const useRoundsStore = defineStore("rounds", {
|
||||
const tokenStore = useTokenStore();
|
||||
const memeBurnerStore = useMemeburnerStore();
|
||||
var data = await memeBurnerStore.getSacrificedRound(this.currentRound);
|
||||
console.log("data123", data);
|
||||
var tokenIndex = this.rounds[this.currentRound].token.findIndex(
|
||||
(tokenData) => tokenData.contractAddress === sacrificedToken
|
||||
);
|
||||
@@ -96,7 +94,6 @@ export const useRoundsStore = defineStore("rounds", {
|
||||
rewardData = await rewardLockerStore.getRewardsForAllToken(roundNumber);
|
||||
console.log("hier2", rewardData);
|
||||
}
|
||||
console.log("rewardData123", rewardData);
|
||||
|
||||
var goal = await memeBurnerStore.getGoal(roundNumber);
|
||||
console.log("goal", goal);
|
||||
@@ -144,15 +141,19 @@ export const useRoundsStore = defineStore("rounds", {
|
||||
} else {
|
||||
console.log("round already filled");
|
||||
}
|
||||
console.log("this.rounds123", this.rounds);
|
||||
},
|
||||
async getFinshedRoundNumbers() {
|
||||
const array = [];
|
||||
const rewardLockerStore = useRewardLockerStore();
|
||||
const lastCompletedRound = await rewardLockerStore.lastCompletedRound();
|
||||
for (let index = 1; index <= Number(lastCompletedRound) + 1; index++) {
|
||||
const lastCompletedRound = await rewardLockerStore.lastCompletedRound();
|
||||
console.log("lastCompletedRound", lastCompletedRound);
|
||||
for (let index = 0; index <= Number(lastCompletedRound); index++) {
|
||||
array.push(index);
|
||||
}
|
||||
}
|
||||
// for (let index = 1; index <= Number(lastCompletedRound) + 1; index++) {
|
||||
// array.push(index);
|
||||
// }
|
||||
console.log("array", array);
|
||||
return array;
|
||||
},
|
||||
/**
|
||||
|
||||
+13
-18
@@ -5,8 +5,7 @@ import { useContractStore } from "./contracts";
|
||||
import { useMemeburnerStore } from "./memeburner";
|
||||
import Meme1Json from "@/assets/contracts/Meme1.json";
|
||||
import Meme2Json from "@/assets/contracts/Meme2.json";
|
||||
import MemeToken from "@/assets/contracts/MemeToken.json";
|
||||
import MemeBurnerJson from "@/assets/contracts/MemeBurner.json";
|
||||
import BloodlineJson from "@/assets/contracts/Bloodline.json";
|
||||
import { multicall, getContract, fetchToken, getWalletClient, waitForTransaction } from "@wagmi/core";
|
||||
|
||||
|
||||
@@ -70,8 +69,8 @@ export const useTokenStore = defineStore("token", {
|
||||
contractAddress: Meme2Json.contractAddress,
|
||||
},
|
||||
{
|
||||
abi: MemeToken.abi,
|
||||
contractAddress: MemeToken.contractAddress,
|
||||
abi: BloodlineJson.abi,
|
||||
contractAddress: BloodlineJson.contractAddress,
|
||||
logo: "/assets/img/token/bloodline.png",
|
||||
},
|
||||
],
|
||||
@@ -81,13 +80,13 @@ export const useTokenStore = defineStore("token", {
|
||||
balance: null,
|
||||
contract: null,
|
||||
allowance: null,
|
||||
rewards: null,
|
||||
},
|
||||
loading: false,
|
||||
// memeToken: getTpelm
|
||||
}),
|
||||
getters: {
|
||||
memeToken: (state) => state.token.find((obj) => obj.contractAddress === MemeToken.contractAddress),
|
||||
sacrificeToken: (state) => state.token.filter((obj) => obj.contractAddress !== MemeToken.contractAddress),
|
||||
memeToken: (state) => state.token.find((obj) => obj.contractAddress === BloodlineJson.contractAddress),
|
||||
sacrificeToken: (state) => state.token.filter((obj) => obj.contractAddress !== BloodlineJson.contractAddress),
|
||||
},
|
||||
actions: {
|
||||
getToken(address) {
|
||||
@@ -101,7 +100,6 @@ export const useTokenStore = defineStore("token", {
|
||||
for (let index = 0; index < this.token.length; index++) {
|
||||
const contracts = [];
|
||||
const token = this.token[index];
|
||||
console.log("token123abc", token);
|
||||
token.contract = getContract({
|
||||
address: token.contractAddress,
|
||||
abi: token.abi,
|
||||
@@ -188,27 +186,24 @@ export const useTokenStore = defineStore("token", {
|
||||
// var approve = await this.contract.methods
|
||||
// .approve(memeBurnerStore.config.contractAddress, amount)
|
||||
// .send({ from: walletStore.address});
|
||||
console.log("approve");
|
||||
console.log("approve");
|
||||
console.log("this.activeToken.contract", this.activeToken.contract);
|
||||
var approveHash = await this.activeToken.contract.write.approve([
|
||||
memeBurnerStore.config.contractAddress,
|
||||
50000000000000000000,
|
||||
amount * Math.pow(10, this.activeToken.decimals),
|
||||
]);
|
||||
console.log("approveHash", approveHash);
|
||||
|
||||
const data = await waitForTransaction({
|
||||
hash: approveHash,
|
||||
});
|
||||
this.activeToken.allowance = await this.allowance();
|
||||
console.log("data", data);
|
||||
return data;
|
||||
return approveHash;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
console.error(error);
|
||||
throw new Error(error)
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
async nonces(userAddress) {
|
||||
return this.memeToken.contract.read.nonces([userAddress]);
|
||||
return this.BloodlineJson.contract.read.nonces([userAddress]);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
+15
-6
@@ -44,18 +44,24 @@ export const useWalletStoreV2 = defineStore("walletV2", {
|
||||
initialized1: false,
|
||||
}),
|
||||
getters: {
|
||||
sacrificeToken: (state) => state.token.filter((obj) => obj.contractAddress !== MemeToken.contractAddress),
|
||||
memeToken: (state) => state.token.find((obj) => obj.contractAddress === MemeToken.contractAddress),
|
||||
sacrificeToken: (state) => state.token.filter((obj) => {
|
||||
const tokenStore = useTokenStore();
|
||||
|
||||
return obj.contractAddress !== tokenStore.memeToken.contractAddress;
|
||||
}),
|
||||
memeToken: (state) => state.token.find((obj) => {
|
||||
const tokenStore = useTokenStore();
|
||||
|
||||
return obj.contractAddress === tokenStore.memeToken.contractAddress;
|
||||
}),
|
||||
},
|
||||
actions: {
|
||||
async init() {
|
||||
console.log("wallet init");
|
||||
|
||||
|
||||
console.log("hier123");
|
||||
const account = getAccount();
|
||||
|
||||
console.log("account123abc", account);
|
||||
if (account.address) {
|
||||
this.address = account.address;
|
||||
this.connected = true;
|
||||
@@ -141,11 +147,14 @@ export const useWalletStoreV2 = defineStore("walletV2", {
|
||||
await this.getTokenBalances();
|
||||
//MemeToken Staked
|
||||
const tokenStore = useTokenStore();
|
||||
|
||||
console.log("tokenStore.memeToken.decimals", tokenStore.memeToken.decimals);
|
||||
const staked = await rewardlockerStore.getStaked(this.address);
|
||||
console.log("staked", staked);
|
||||
console.log("ztrsdz", staked / BigInt(Math.pow(10, tokenStore.memeToken.decimals)));
|
||||
this.memeToken.staked = Number(staked / BigInt(Math.pow(10, tokenStore.memeToken.decimals)));
|
||||
const unclaimedRewards = await rewardlockerStore.getTotalRewards(this.address);
|
||||
const unclaimedRewardsArray = await rewardlockerStore.getTotalRewards(this.address);
|
||||
console.log("unclaimedRewardsArray", unclaimedRewardsArray);
|
||||
const unclaimedRewards = unclaimedRewardsArray[0] + unclaimedRewardsArray[1];
|
||||
this.memeToken.unclaimedRewards = Number(unclaimedRewards/ BigInt(Math.pow(10, tokenStore.memeToken.decimals)))
|
||||
|
||||
}
|
||||
|
||||
+25
-21
@@ -39,29 +39,34 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="bloodline-border bloodline-border__thin grey cycle-winner" v-if="roundsStore.getRoundWinner">
|
||||
<div class="cycle-winner-left">
|
||||
<div class="cycle-winner-headline">Clan Winner</div>
|
||||
<div class="cycle-winner-subheadline">+20% Clan Bonus</div>
|
||||
</div>
|
||||
<div class="cycle-winner-right">
|
||||
<div class="cycle-winner-logo">
|
||||
<img :src="roundsStore.getRoundWinner.vamplogo" alt="" />
|
||||
<template v-if="roundsStore.currentRound !== roundsStore.activeRound">
|
||||
<div
|
||||
class="bloodline-border bloodline-border__thin grey cycle-winner"
|
||||
v-if="roundsStore.getRoundWinner"
|
||||
>
|
||||
<div class="cycle-winner-left">
|
||||
<div class="cycle-winner-headline">Clan Winner</div>
|
||||
<div class="cycle-winner-subheadline">+20% Clan Bonus</div>
|
||||
</div>
|
||||
<div class="cycle-winner-name">{{ roundsStore.getRoundWinner.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bloodline-border bloodline-border__thin grey cycle-winner" v-else>
|
||||
<div class="cycle-winner-left">
|
||||
<div class="cycle-winner-headline">No Clan Winner</div>
|
||||
<div class="cycle-winner-subheadline">TODO time limit reached or activeround</div>
|
||||
</div>
|
||||
<div class="cycle-winner-right">
|
||||
<div class="cycle-winner-logo inactive">
|
||||
<img src="/assets/img/token/bloodline.png" alt="" />
|
||||
<div class="cycle-winner-right">
|
||||
<div class="cycle-winner-logo">
|
||||
<img :src="roundsStore.getRoundWinner.vamplogo" alt="" />
|
||||
</div>
|
||||
<div class="cycle-winner-name">{{ roundsStore.getRoundWinner.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bloodline-border bloodline-border__thin grey cycle-winner" v-else>
|
||||
<div class="cycle-winner-left">
|
||||
<div class="cycle-winner-headline">No Clan Winner</div>
|
||||
<div class="cycle-winner-subheadline">time limit reached or activeround</div>
|
||||
</div>
|
||||
<div class="cycle-winner-right">
|
||||
<div class="cycle-winner-logo inactive">
|
||||
<img src="/assets/img/token/bloodline.png" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<token-claim></token-claim>
|
||||
|
||||
@@ -123,7 +128,6 @@ const isMobile = inject("isMobile");
|
||||
|
||||
onMounted(async () => {
|
||||
console.log("onmounted", roundsStore.activeRound);
|
||||
console.log("roundsStore.activeRound123", roundsStore.activeRound);
|
||||
// await memeBurnerStore.init();
|
||||
// await rewardLockerStore.init();
|
||||
|
||||
|
||||
@@ -138,8 +138,6 @@ const isMobile = inject("isMobile");
|
||||
|
||||
.section-header-container
|
||||
margin: 24px 0
|
||||
@media (min-width: 992px)
|
||||
width: 655px
|
||||
.tutorial-header
|
||||
display: flex
|
||||
justify-content: center
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
import { onMounted, ref } from "vue";
|
||||
import Meme1Json from "@/assets/contracts/Meme1.json";
|
||||
import Meme2Json from "@/assets/contracts/Meme2.json";
|
||||
import MemeBurnerJson from "@/assets/contracts/MemeBurner.json";
|
||||
import MemeBurnerJson from "@/assets/contracts/Bloodline.json";
|
||||
import MemeTokenJson from "@/assets/contracts/MemeToken.json";
|
||||
import RewardLockerJson from "@/assets/contracts/RewardLocker.json";
|
||||
import { useTokenStore } from "@/stores/tokens";
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
<script setup>
|
||||
import { ref, toRaw, onMounted, onUnmounted } from "vue";
|
||||
import Meme1Json from "@/assets/contracts/Meme1.json";
|
||||
import { useWalletStore } from "@/stores/wallet";
|
||||
const walletStore = useWalletStore();
|
||||
|
||||
const fromAddress = ref(null);
|
||||
const showConnectors = ref(false);
|
||||
|
||||
Reference in New Issue
Block a user