initial commit
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
<script setup>
|
||||
import { onMounted } from "vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
import Navbar from "./components/Navbar.vue";
|
||||
|
||||
import { useWalletStore } from "@/stores/wallet";
|
||||
const walletStore = useWalletStore();
|
||||
onMounted(async () => {
|
||||
var test = await walletStore.isConnected();
|
||||
console.log("test", test);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<navbar />
|
||||
<div class="main">
|
||||
<RouterView />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="sass">
|
||||
.main
|
||||
</style>
|
||||
@@ -0,0 +1,388 @@
|
||||
{
|
||||
"contractName": "LiquidityOwner",
|
||||
"contractAddress": "0xF58FC44A2862335F3577253EC544488006aF676A",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_developer",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_memeToken",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_weth",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_nfPositionManager",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_memeBurner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_chunk",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "payable",
|
||||
"type": "constructor"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "int24",
|
||||
"name": "_tickLower",
|
||||
"type": "int24"
|
||||
},
|
||||
{
|
||||
"internalType": "int24",
|
||||
"name": "_tickUpper",
|
||||
"type": "int24"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amountMemeToken",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amountWETH",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "addNewPosition",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "chunk",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256[]",
|
||||
"name": "tokenIds",
|
||||
"type": "uint256[]"
|
||||
}
|
||||
],
|
||||
"name": "collectDeveloperFees",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amount0",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amount1",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "currentTokenIdToFill",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "tokenId",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint128",
|
||||
"name": "liquidity",
|
||||
"type": "uint128"
|
||||
}
|
||||
],
|
||||
"name": "decreasePositionLiquidity",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amount0",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amount1",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "tokenId",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amountWETH",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amountMemeToken",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "increasePositionLiquidity",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "memeBurner",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "memeToken",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256[]",
|
||||
"name": "tokenIds",
|
||||
"type": "uint256[]"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amountOfWETHToUse",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "movePriceUP",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amount0Collected",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amount1Collected",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "nfPositionManager",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "contract INonfungiblePositionManager",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "operator",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "from",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "tokenId",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "bytes",
|
||||
"name": "data",
|
||||
"type": "bytes"
|
||||
}
|
||||
],
|
||||
"name": "onERC721Received",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bytes4",
|
||||
"name": "",
|
||||
"type": "bytes4"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "positions",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint128",
|
||||
"name": "liquidity",
|
||||
"type": "uint128"
|
||||
},
|
||||
{
|
||||
"internalType": "int24",
|
||||
"name": "tickLower",
|
||||
"type": "int24"
|
||||
},
|
||||
{
|
||||
"internalType": "int24",
|
||||
"name": "tickUpper",
|
||||
"type": "int24"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "round1",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"name": "provideLiquidity",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "tokenIds",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "uniV3Pool",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,368 @@
|
||||
{
|
||||
"contractName": "Meme",
|
||||
"contractAddress": "0x4435ABC578136e2Eca50b5EFf950F17CAF42485b",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,368 @@
|
||||
{
|
||||
"contractName": "Meme",
|
||||
"contractAddress": "0xa0B7b2a78dF87eDc70736f7ED9D40d86c37B533F",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,373 @@
|
||||
{
|
||||
"contractName": "MemeBurner",
|
||||
"contractAddress": "0x5c7077b0424c0e425B16363AdA59f1D72914C5c5",
|
||||
"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": "_rewardLocker",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_memeToken",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256[]",
|
||||
"name": "roundGoals",
|
||||
"type": "uint256[]"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_liquidityAmountLimit",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "ArraysHaveDifferentLength",
|
||||
"type": "error"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "Impossible",
|
||||
"type": "error"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "LiquidityOwnerAlreadyInitialized",
|
||||
"type": "error"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "NothingToSacrifice",
|
||||
"type": "error"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "TokenIsNotInSacrificableList",
|
||||
"type": "error"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "memeToTransfer",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "TokenTransferFailed",
|
||||
"type": "error"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "uniV2Pool",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "UniV2PoolWithoutLiquidity",
|
||||
"type": "error"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "address",
|
||||
"name": "meme",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "MemeAddedToSacrificeList",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "address",
|
||||
"name": "meme",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "MemeRemovedFromSacrificeList",
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "goal",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "achieved",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amountOfAsset",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "_calculateLinearDecreasingReward",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "reward",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "meme",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "uniV2Pool",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "addMemeToList",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "currentRound",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "liquidityAmountLimit",
|
||||
"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": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "rewardLocker",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "rounds",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "goal",
|
||||
"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": [],
|
||||
"name": "weth",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"stateMutability": "payable",
|
||||
"type": "receive"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,391 @@
|
||||
{
|
||||
"contractName": "MemeToken",
|
||||
"contractAddress": "0x0e349D42C125acA39ea58024FFC23ED0fE5feE32",
|
||||
"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": [],
|
||||
"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": "mintMemeToken",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,481 @@
|
||||
{
|
||||
"contractName": "RewardLocker",
|
||||
"contractAddress": "0x6749F75Ece2755d38f209Da1cBab07A1caD69554",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_developer",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "MemeBurnerAlreadyInitialized",
|
||||
"type": "error"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "MemeTokenAlreadyInitialized",
|
||||
"type": "error"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "claimer",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "amount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "ClaimedReward",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "user",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "uint256",
|
||||
"name": "reward",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "Rewarded",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "uint256",
|
||||
"name": "index",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "winnerToken",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "totalRoundRewards",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "RoundCompleted",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "uint256",
|
||||
"name": "index",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "RoundStarted",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_burnedToken",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "claim",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "claimedAmount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256[]",
|
||||
"name": "_rounds",
|
||||
"type": "uint256[]"
|
||||
},
|
||||
{
|
||||
"internalType": "address[]",
|
||||
"name": "_burnedTokens",
|
||||
"type": "address[]"
|
||||
}
|
||||
],
|
||||
"name": "claim",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "claimedAmount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address[]",
|
||||
"name": "_burnedTokens",
|
||||
"type": "address[]"
|
||||
}
|
||||
],
|
||||
"name": "claim",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "claimedAmount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_round",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "claim",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "claimedAmount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_round",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "address[]",
|
||||
"name": "_burnedTokens",
|
||||
"type": "address[]"
|
||||
}
|
||||
],
|
||||
"name": "claim",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "claimedAmount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "claim",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "claimedAmount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256[]",
|
||||
"name": "_rounds",
|
||||
"type": "uint256[]"
|
||||
}
|
||||
],
|
||||
"name": "claim",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "claimedAmount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256[]",
|
||||
"name": "_rounds",
|
||||
"type": "uint256[]"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_burnedToken",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "claim",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "claimedAmount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_round",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_burnedToken",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "claim",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "claimedAmount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_memeBurner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_memeToken",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "init",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "lastCompletedRound",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "memeBurner",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "memeToken",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "contract MemeToken",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "roundIndex",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "address[]",
|
||||
"name": "burnableTokens",
|
||||
"type": "address[]"
|
||||
}
|
||||
],
|
||||
"name": "registerNextRound",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "user",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_burnedToken",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "reward",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "registerReward",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "roundIndex",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "winnerToken",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "registerRoundCompleted",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"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": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "rounds",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "roundCompleted",
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "totalRewards",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,11 @@
|
||||
|
||||
.btn
|
||||
&.btn-immortal
|
||||
padding: 6px 24px
|
||||
background-color: $button-background-color
|
||||
color: $button-color
|
||||
font-size: 24px
|
||||
&:hover,&:focus,&:active
|
||||
background-color: lighten($button-background-color, 10%),
|
||||
color: darken($button-color, 10%),
|
||||
cursor: pointer
|
||||
@@ -0,0 +1,16 @@
|
||||
.card
|
||||
display: block
|
||||
overflow: hidden
|
||||
overflow-wrap: break-word
|
||||
position: relative
|
||||
padding: 0
|
||||
text-decoration: none
|
||||
transition-duration: .28s
|
||||
transition-property: box-shadow,opacity,background
|
||||
transition-timing-function: cubic-bezier(.4,0,.2,1)
|
||||
z-index: 0
|
||||
border-color: rgba(var(--v-border-color),var(--v-border-opacity))
|
||||
border-style: solid
|
||||
border-width: 0
|
||||
border-radius: 4px
|
||||
box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2),0 1px 1px 0rgba(0, 0, 0, .14),0 1px 3px 0 rgba(0, 0, 0, .12)
|
||||
@@ -0,0 +1,49 @@
|
||||
@import 'variables'
|
||||
@import 'buttons'
|
||||
@import 'cards'
|
||||
|
||||
body
|
||||
background-color: $secondary
|
||||
color: $color2
|
||||
|
||||
.main
|
||||
padding-top: 120px
|
||||
@media (min-width: 992px)
|
||||
padding-top: 208px
|
||||
html
|
||||
font-size: var(--font-size-main)
|
||||
html, body, #app
|
||||
height: 100%
|
||||
|
||||
body
|
||||
margin: 0
|
||||
padding: 0
|
||||
#app
|
||||
display: flex
|
||||
flex-direction: column
|
||||
.footer
|
||||
margin-top: auto
|
||||
|
||||
.container
|
||||
padding-right: 15px
|
||||
padding-left: 15px
|
||||
margin-right: auto
|
||||
margin-left: auto
|
||||
@media (min-width: 992px)
|
||||
max-width: 1140px
|
||||
|
||||
h1
|
||||
font-weight: 700
|
||||
font-size: 40px
|
||||
text-align: center
|
||||
@media (min-width: 992px)
|
||||
font-size: 60px
|
||||
@media (min-width: 1200px)
|
||||
|
||||
.page-head
|
||||
margin-bottom: 80px
|
||||
.page-body
|
||||
margin-bottom: 160px
|
||||
|
||||
p,a
|
||||
word-wrap: break-word
|
||||
@@ -0,0 +1,31 @@
|
||||
$primary: #1E1E1E
|
||||
$primary-dark: darken($primary, 20%)
|
||||
$primary-light: lighten($primary, 20%)
|
||||
$secondary: #636363
|
||||
$secondary-dark: darken($secondary, 20%)
|
||||
$secondary-light: lighten($secondary, 20%)
|
||||
$tertiary: #A8A8A8
|
||||
$tertiary-dark: darken($tertiary, 20%)
|
||||
$tertiary-light: lighten($tertiary, 20%)
|
||||
|
||||
$color2: white
|
||||
$color1: black
|
||||
|
||||
$button-color: $color2
|
||||
$button-background-color: $color1
|
||||
:root
|
||||
--primary: #{$primary}
|
||||
--primary-light: #{$primary-light}
|
||||
--primary-dark: #{$primary-dark}
|
||||
--secondary: #{$secondary}
|
||||
--secondary-light: #{$secondary-light}
|
||||
--secondary-dark: #{$secondary-dark}
|
||||
--tertiary: #{$tertiary}
|
||||
--tertiary-light: #{$tertiary-light}
|
||||
--tertiary-dark: #{$tertiary-dark}
|
||||
// :root
|
||||
// --font-size-text: 16px
|
||||
// --font-size-title: 32px
|
||||
// @media (min-width: 992px)
|
||||
// --font-size-text: 24px
|
||||
// --font-size-title: 36px
|
||||
@@ -0,0 +1,95 @@
|
||||
<template>
|
||||
<div class="blood-chart-wrapper">
|
||||
<div class="blood-chart-element" v-for="(coin, index) in dataPoints" :key="coin.name">
|
||||
<div class="blood-chart-element-header">
|
||||
<div class="blood-chart-coin">
|
||||
<div :class="[{ drop: true, ['variant' + index]: true }]"></div>
|
||||
</div>
|
||||
<div class="blood-chart-coin-title">{{ coin.name }}</div>
|
||||
</div>
|
||||
<div class="blood-chart-element-body">
|
||||
<div class="blood-chart-bar-wrapper">
|
||||
<div class="blood-chart-bar" :style="`height: ${coin.percentage}%`">{{ coin.percentage }}%</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const dataPoints = [
|
||||
{
|
||||
name: "PEPE",
|
||||
percentage: 34.4,
|
||||
},
|
||||
{
|
||||
name: "Shiba",
|
||||
percentage: 50.4,
|
||||
},
|
||||
{
|
||||
name: "Doge",
|
||||
percentage: 42.4,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<style lang="sass">
|
||||
.blood-chart-wrapper
|
||||
height: 500px
|
||||
display: inline-flex
|
||||
gap: 48px
|
||||
.blood-chart-element
|
||||
height: 100%
|
||||
width: 50px
|
||||
display: flex
|
||||
flex-direction: column
|
||||
.blood-chart-element-header
|
||||
flex: 0 0 100px
|
||||
.blood-chart-coin
|
||||
height: 50px
|
||||
width: 50px
|
||||
border-radius: 50px
|
||||
background-color: grey
|
||||
margin-left: auto
|
||||
margin-right: auto
|
||||
position: relative
|
||||
.blood-chart-element-body
|
||||
background-color: lightgrey
|
||||
flex: 1 1 auto
|
||||
.blood-chart-bar-wrapper
|
||||
height: 100%
|
||||
display: flex
|
||||
flex-direction: column
|
||||
.blood-chart-bar
|
||||
margin-top: auto
|
||||
background-color: red
|
||||
|
||||
.drop
|
||||
width: 1.1em
|
||||
height: 1.1em
|
||||
border-radius: 0 100% 100% 100%
|
||||
background-color: red
|
||||
position: absolute
|
||||
animation: drop 3s infinite both
|
||||
top: 32px
|
||||
&.variant0
|
||||
left: 14%
|
||||
animation-delay: -5.2s
|
||||
&.variant1
|
||||
left: 39%
|
||||
animation-delay: -.4s
|
||||
|
||||
&.variant2
|
||||
left: 55%
|
||||
animation-delay: -1.5s
|
||||
|
||||
@keyframes drop
|
||||
0%
|
||||
transform: translateY(0) scaleX(.85) rotate(45deg)
|
||||
animation-timing-function: ease-out
|
||||
60%
|
||||
transform: translateY(120%) scaleX(.85) rotate(45deg)
|
||||
animation-timing-function: ease-in
|
||||
80%, 100%
|
||||
transform: translateY(440px) scaleX(.85) rotate(45deg)
|
||||
</style>
|
||||
@@ -0,0 +1,90 @@
|
||||
<script setup>
|
||||
import { storeToRefs } from "pinia";
|
||||
import { ref, onMounted, onBeforeUnmount } from "vue";
|
||||
import { useWalletStore } from "@/stores/wallet";
|
||||
const walletStore = useWalletStore();
|
||||
const { connected, address } = storeToRefs(walletStore);
|
||||
|
||||
const showNavbar = ref(true);
|
||||
const lastScrollPosition = ref(0);
|
||||
|
||||
function onScroll() {
|
||||
const currentScrollPosition = window.pageYOffset || document.documentElement.scrollTop;
|
||||
if (currentScrollPosition < 0) {
|
||||
return;
|
||||
}
|
||||
showNavbar.value = currentScrollPosition < lastScrollPosition.value;
|
||||
lastScrollPosition.value = currentScrollPosition;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
window.addEventListener("scroll", onScroll);
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
window.removeEventListener("scroll");
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<header>
|
||||
<div class="navbar" :class="{ 'navbar--hidden': !showNavbar }">
|
||||
<div class="navbar-inner">
|
||||
<div class="navbar-icon">
|
||||
<router-link to="/">
|
||||
<!-- <img alt="Parry logo" class="logo" src="@/assets/img/logo.svg" /> -->
|
||||
<img alt="logo" class="logo" src="@/assets/img/vampir.png" />
|
||||
</router-link>
|
||||
</div>
|
||||
<div class="navbar-center"></div>
|
||||
<div class="navbar-end">
|
||||
<button v-if="!connected" @click="walletStore.connectWallet">connect</button>
|
||||
<span v-else> {{ address }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
header
|
||||
.navbar
|
||||
position: fixed
|
||||
z-index: 3
|
||||
box-sizing: border-box
|
||||
background-color: grey
|
||||
width: 100%
|
||||
transform: translate3d(0,0,0)
|
||||
transition: transform .3s ease,visibility 0s .3s linear
|
||||
&.navbar--hidden
|
||||
transform: translate3d(0,-100%,0)
|
||||
.navbar-inner
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
padding: 0 20px
|
||||
@media (min-width: 992px)
|
||||
padding: 10px 80px
|
||||
.navbar-center
|
||||
display: flex
|
||||
align-items: center
|
||||
.main-menu-links
|
||||
margin-right: 48px
|
||||
&:hover, &:active, &:focus
|
||||
color: lighten(black, 20%)
|
||||
.main-menu-link
|
||||
cursor: pointer
|
||||
.navbar-end
|
||||
display: flex
|
||||
align-items: center
|
||||
align-self: center
|
||||
a
|
||||
color: black
|
||||
&:hover,&:focus, &:active
|
||||
color: lighten(black, 20%)
|
||||
|
||||
.navbar-hamburger-open
|
||||
font-size: 35px
|
||||
.parry-twitter
|
||||
font-size: 30px
|
||||
margin-left: 32px
|
||||
</style>
|
||||
@@ -0,0 +1,194 @@
|
||||
<template>
|
||||
<div class="sacrifice-wrapper card">
|
||||
<div class="sacrifice-headline">Select Token</div>
|
||||
<div class="sacrifice-select-tokens">
|
||||
<div class="sacrifice-tokens">
|
||||
<div
|
||||
class="sacrifice-token"
|
||||
:class="[{ 'sacrifice-token--active': token.contractAddress === activeToken.contractAddress }]"
|
||||
v-for="token in props.data"
|
||||
:key="token.contractAddress"
|
||||
@click="tokenStore.changeActiveToken(token)"
|
||||
>
|
||||
{{ token.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sacrifice-from-to-wrapper" v-if="activeToken.contractAddress">
|
||||
<div class="sacrifice-from-wrapper">
|
||||
<div class="sarcrifice-from-input">
|
||||
<input type="number" v-model="tokenNumber" /><img src="@/assets/img/vampir.png" alt="vampir" />
|
||||
</div>
|
||||
<div class="value-adder">
|
||||
<div class="sacrifice-adder-step" @click="addTokens(1000000)">+1m</div>
|
||||
<div class="sacrifice-adder-step" @click="addTokens(10000000)">+10m</div>
|
||||
<div class="sacrifice-adder-step" @click="addTokens(100000000)">+100m</div>
|
||||
<div class="sacrifice-adder-balance">Balance: {{ parseFloat(activeToken.balance) }}</div>
|
||||
<div class="sacrifice-adder-max" @click="tokenNumber = parseFloat(activeToken.balance)">Max</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sacrifice-divider">
|
||||
<font-awesome-icon :icon="['fas', 'arrow-down']" />
|
||||
</div>
|
||||
<div class="sacrifice-to-wrapper">
|
||||
<div class="sarcrifice-from-input">
|
||||
<div class="sacrifice-to-output">
|
||||
<div class="sacrifice-to-output-coin">{{ activeToken.name }}</div>
|
||||
<div class="sacrifice-to-output-rewards">2.312.310</div>
|
||||
</div>
|
||||
<img src="@/assets/img/vampir.png" alt="vampir" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="sacrifice-buttons-function-wrapper">
|
||||
<div v-if="connected">
|
||||
<div
|
||||
class="btn btn-immortal"
|
||||
v-if="activeToken.allowance > 0"
|
||||
@click="approvalData = tokenStore.sacrificeToken(1)"
|
||||
>
|
||||
Sacrifce {{ activeToken.name }}
|
||||
</div>
|
||||
<div class="btn btn-immortal" v-else @click="approvalData = tokenStore.approveToken(1)">
|
||||
Approve {{ activeToken.name }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="btn btn-immortal" @click="walletStore.connectWallet">Connect Wallet</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sacrifice-fees-info-wrapper">
|
||||
<div class="sacrifice-feed-info">
|
||||
<div class="sacrifice-fees-state">Disabled</div>
|
||||
<div class="sacrifice-feed-amount">42Gwei</div>
|
||||
</div>
|
||||
<div class="sacrifice-feed-info-text">Increase amount to pay 97% less network fees.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, defineProps, watch } from "vue";
|
||||
import { useWalletStore } from "@/stores/wallet";
|
||||
import { useTokenStore } from "@/stores/tokens";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
const walletStore = useWalletStore();
|
||||
const { contract, connected } = storeToRefs(walletStore);
|
||||
|
||||
const tokenStore = useTokenStore();
|
||||
const { activeToken } = storeToRefs(tokenStore);
|
||||
|
||||
const props = defineProps({
|
||||
data: Array,
|
||||
});
|
||||
|
||||
watch(
|
||||
activeToken,
|
||||
() => {
|
||||
tokenNumber.value = 0;
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
const tokenNumber = ref(0);
|
||||
const approvalData = ref(null);
|
||||
|
||||
function addTokens(value) {
|
||||
tokenNumber.value = tokenNumber.value + value;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="sass">
|
||||
|
||||
.sacrifice-wrapper
|
||||
padding: 12px 24px
|
||||
width: 450px
|
||||
display: flex
|
||||
flex-direction: column
|
||||
margin-left: auto
|
||||
margin-right: auto
|
||||
background-color: var(--primary)
|
||||
.sacrifice-headline
|
||||
text-align: center
|
||||
font-size: 36px
|
||||
.sacrifice-select-tokens
|
||||
padding: 24px
|
||||
display: flex
|
||||
margin-bottom: 32px
|
||||
.sacrifice-tokens
|
||||
display: flex
|
||||
width: 100%
|
||||
justify-content: space-evenly
|
||||
.sacrifice-token
|
||||
width: 50px
|
||||
height: 50px
|
||||
padding: 12px
|
||||
border: 1px solid lightgrey
|
||||
cursor: pointer
|
||||
background-color: var(--tertiary)
|
||||
&:hover,
|
||||
&:active,
|
||||
&:focus
|
||||
background-color: var(--tertiary-dark)
|
||||
&.sacrifice-token--active
|
||||
background-color: var(--tertiary-dark)
|
||||
.sacrifice-buttons-function-wrapper
|
||||
text-align: center
|
||||
display: flex
|
||||
justify-content: center
|
||||
margin-top: 24px
|
||||
.sacrifice-fees-info-wrapper
|
||||
margin-top: 24px
|
||||
.sacrifice-feed-info
|
||||
display: flex
|
||||
.sacrifice-feed-amount
|
||||
margin-left: auto
|
||||
|
||||
.sacrifice-from-to-wrapper
|
||||
.sacrifice-divider
|
||||
text-align: center
|
||||
.sacrifice-from-wrapper,.sacrifice-to-wrapper
|
||||
border: 1px solid black
|
||||
padding: 16px 24px
|
||||
.sarcrifice-from-input
|
||||
display: flex
|
||||
margin-bottom: 8px
|
||||
height: 60px
|
||||
input
|
||||
width: 100%
|
||||
font-size: 32px
|
||||
img
|
||||
margin-left: 16px
|
||||
.sacrifice-to-output
|
||||
flex: 1 1 auto
|
||||
text-align: left
|
||||
.sacrifice-to-output-coin
|
||||
font-size: 24px
|
||||
.sacrifice-to-output-rewards
|
||||
font-size: 42px
|
||||
.value-adder
|
||||
display: flex
|
||||
gap: 6px
|
||||
.sacrifice-adder-step
|
||||
padding: 0 12px
|
||||
background-color: var(--tertiary)
|
||||
border: 1px solid var(--tertiary-dark)
|
||||
&:hover,
|
||||
&:active,
|
||||
&:focus
|
||||
background-color: var(--secondary)
|
||||
border: 1px solid var(--secondary-dark)
|
||||
cursor: pointer
|
||||
.sacrifice-adder-balance
|
||||
margin-left: auto
|
||||
.sacrifice-adder-max
|
||||
margin-left: 12px
|
||||
color: red
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active
|
||||
color: darken(red, 10%)
|
||||
transform: scale(1.1)
|
||||
transition: transform 0s
|
||||
</style>
|
||||
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor">
|
||||
<path
|
||||
d="M15 4a1 1 0 1 0 0 2V4zm0 11v-1a1 1 0 0 0-1 1h1zm0 4l-.707.707A1 1 0 0 0 16 19h-1zm-4-4l.707-.707A1 1 0 0 0 11 14v1zm-4.707-1.293a1 1 0 0 0-1.414 1.414l1.414-1.414zm-.707.707l-.707-.707.707.707zM9 11v-1a1 1 0 0 0-.707.293L9 11zm-4 0h1a1 1 0 0 0-1-1v1zm0 4H4a1 1 0 0 0 1.707.707L5 15zm10-9h2V4h-2v2zm2 0a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3v2zm1 1v6h2V7h-2zm0 6a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2zm-1 1h-2v2h2v-2zm-3 1v4h2v-4h-2zm1.707 3.293l-4-4-1.414 1.414 4 4 1.414-1.414zM11 14H7v2h4v-2zm-4 0c-.276 0-.525-.111-.707-.293l-1.414 1.414C5.42 15.663 6.172 16 7 16v-2zm-.707 1.121l3.414-3.414-1.414-1.414-3.414 3.414 1.414 1.414zM9 12h4v-2H9v2zm4 0a3 3 0 0 0 3-3h-2a1 1 0 0 1-1 1v2zm3-3V3h-2v6h2zm0-6a3 3 0 0 0-3-3v2a1 1 0 0 1 1 1h2zm-3-3H3v2h10V0zM3 0a3 3 0 0 0-3 3h2a1 1 0 0 1 1-1V0zM0 3v6h2V3H0zm0 6a3 3 0 0 0 3 3v-2a1 1 0 0 1-1-1H0zm3 3h2v-2H3v2zm1-1v4h2v-4H4zm1.707 4.707l.586-.586-1.414-1.414-.586.586 1.414 1.414z"
|
||||
/>
|
||||
</svg>
|
||||
</template>
|
||||
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" fill="currentColor">
|
||||
<path
|
||||
d="M11 2.253a1 1 0 1 0-2 0h2zm-2 13a1 1 0 1 0 2 0H9zm.447-12.167a1 1 0 1 0 1.107-1.666L9.447 3.086zM1 2.253L.447 1.42A1 1 0 0 0 0 2.253h1zm0 13H0a1 1 0 0 0 1.553.833L1 15.253zm8.447.833a1 1 0 1 0 1.107-1.666l-1.107 1.666zm0-14.666a1 1 0 1 0 1.107 1.666L9.447 1.42zM19 2.253h1a1 1 0 0 0-.447-.833L19 2.253zm0 13l-.553.833A1 1 0 0 0 20 15.253h-1zm-9.553-.833a1 1 0 1 0 1.107 1.666L9.447 14.42zM9 2.253v13h2v-13H9zm1.553-.833C9.203.523 7.42 0 5.5 0v2c1.572 0 2.961.431 3.947 1.086l1.107-1.666zM5.5 0C3.58 0 1.797.523.447 1.42l1.107 1.666C2.539 2.431 3.928 2 5.5 2V0zM0 2.253v13h2v-13H0zm1.553 13.833C2.539 15.431 3.928 15 5.5 15v-2c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM5.5 15c1.572 0 2.961.431 3.947 1.086l1.107-1.666C9.203 13.523 7.42 13 5.5 13v2zm5.053-11.914C11.539 2.431 12.928 2 14.5 2V0c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM14.5 2c1.573 0 2.961.431 3.947 1.086l1.107-1.666C18.203.523 16.421 0 14.5 0v2zm3.5.253v13h2v-13h-2zm1.553 12.167C18.203 13.523 16.421 13 14.5 13v2c1.573 0 2.961.431 3.947 1.086l1.107-1.666zM14.5 13c-1.92 0-3.703.523-5.053 1.42l1.107 1.666C11.539 15.431 12.928 15 14.5 15v-2z"
|
||||
/>
|
||||
</svg>
|
||||
</template>
|
||||
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" fill="currentColor">
|
||||
<path
|
||||
d="M11.447 8.894a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm0 1.789a1 1 0 1 0 .894-1.789l-.894 1.789zM7.447 7.106a1 1 0 1 0-.894 1.789l.894-1.789zM10 9a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0H8zm9.447-5.606a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm2 .789a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zM18 5a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0h-2zm-5.447-4.606a1 1 0 1 0 .894-1.789l-.894 1.789zM9 1l.447-.894a1 1 0 0 0-.894 0L9 1zm-2.447.106a1 1 0 1 0 .894 1.789l-.894-1.789zm-6 3a1 1 0 1 0 .894 1.789L.553 4.106zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zm-2-.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 2.789a1 1 0 1 0 .894-1.789l-.894 1.789zM2 5a1 1 0 1 0-2 0h2zM0 7.5a1 1 0 1 0 2 0H0zm8.553 12.394a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 1a1 1 0 1 0 .894 1.789l-.894-1.789zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zM8 19a1 1 0 1 0 2 0H8zm2-2.5a1 1 0 1 0-2 0h2zm-7.447.394a1 1 0 1 0 .894-1.789l-.894 1.789zM1 15H0a1 1 0 0 0 .553.894L1 15zm1-2.5a1 1 0 1 0-2 0h2zm12.553 2.606a1 1 0 1 0 .894 1.789l-.894-1.789zM17 15l.447.894A1 1 0 0 0 18 15h-1zm1-2.5a1 1 0 1 0-2 0h2zm-7.447-5.394l-2 1 .894 1.789 2-1-.894-1.789zm-1.106 1l-2-1-.894 1.789 2 1 .894-1.789zM8 9v2.5h2V9H8zm8.553-4.894l-2 1 .894 1.789 2-1-.894-1.789zm.894 0l-2-1-.894 1.789 2 1 .894-1.789zM16 5v2.5h2V5h-2zm-4.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zm-2.894-1l-2 1 .894 1.789 2-1L8.553.106zM1.447 5.894l2-1-.894-1.789-2 1 .894 1.789zm-.894 0l2 1 .894-1.789-2-1-.894 1.789zM0 5v2.5h2V5H0zm9.447 13.106l-2-1-.894 1.789 2 1 .894-1.789zm0 1.789l2-1-.894-1.789-2 1 .894 1.789zM10 19v-2.5H8V19h2zm-6.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zM2 15v-2.5H0V15h2zm13.447 1.894l2-1-.894-1.789-2 1 .894 1.789zM18 15v-2.5h-2V15h2z"
|
||||
/>
|
||||
</svg>
|
||||
</template>
|
||||
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor">
|
||||
<path
|
||||
d="M10 3.22l-.61-.6a5.5 5.5 0 0 0-7.666.105 5.5 5.5 0 0 0-.114 7.665L10 18.78l8.39-8.4a5.5 5.5 0 0 0-.114-7.665 5.5 5.5 0 0 0-7.666-.105l-.61.61z"
|
||||
/>
|
||||
</svg>
|
||||
</template>
|
||||
@@ -0,0 +1,19 @@
|
||||
<!-- This icon is from <https://github.com/Templarian/MaterialDesign>, distributed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0) license-->
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
aria-hidden="true"
|
||||
role="img"
|
||||
class="iconify iconify--mdi"
|
||||
width="24"
|
||||
height="24"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
d="M20 18v-4h-3v1h-2v-1H9v1H7v-1H4v4h16M6.33 8l-1.74 4H7v-1h2v1h6v-1h2v1h2.41l-1.74-4H6.33M9 5v1h6V5H9m12.84 7.61c.1.22.16.48.16.8V18c0 .53-.21 1-.6 1.41c-.4.4-.85.59-1.4.59H4c-.55 0-1-.19-1.4-.59C2.21 19 2 18.53 2 18v-4.59c0-.32.06-.58.16-.8L4.5 7.22C4.84 6.41 5.45 6 6.33 6H7V5c0-.55.18-1 .57-1.41C7.96 3.2 8.44 3 9 3h6c.56 0 1.04.2 1.43.59c.39.41.57.86.57 1.41v1h.67c.88 0 1.49.41 1.83 1.22l2.34 5.39z"
|
||||
fill="currentColor"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
import './assets/sass/main.sass'
|
||||
|
||||
import { createApp } from 'vue'
|
||||
import { createPinia } from 'pinia'
|
||||
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
|
||||
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
|
||||
/* import the fontawesome core */
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
|
||||
/* import font awesome icon component */
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
||||
|
||||
/* import specific icons */
|
||||
import { faArrowDown } from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
/* add icons to the library */
|
||||
library.add(faArrowDown);
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
const pinia = createPinia();
|
||||
pinia.use(piniaPluginPersistedstate);
|
||||
|
||||
app.use(pinia);
|
||||
|
||||
app.use(router)
|
||||
app.component('font-awesome-icon', FontAwesomeIcon)
|
||||
app.mount('#app')
|
||||
@@ -0,0 +1,28 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import HomeView from '../views/HomeView.vue'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes: [
|
||||
{
|
||||
path: "/",
|
||||
name: "home",
|
||||
component: HomeView,
|
||||
},
|
||||
// {
|
||||
// path: "/about",
|
||||
// name: "about",
|
||||
// // route level code-splitting
|
||||
// // this generates a separate chunk (About.[hash].js) for this route
|
||||
// // which is lazy-loaded when the route is visited.
|
||||
// component: () => import("../views/AboutView.vue"),
|
||||
// },
|
||||
{
|
||||
path: "/test",
|
||||
name: "Test",
|
||||
component: () => import("../views/TestView.vue"),
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
export default router
|
||||
@@ -0,0 +1,467 @@
|
||||
import { defineStore } from "pinia";
|
||||
import Web3 from "web3";
|
||||
import { useWalletStore } from "./wallet";
|
||||
import Meme1Json from "@/assets/contracts/Meme1.json";
|
||||
import Meme2Json from "@/assets/contracts/Meme2.json";
|
||||
import MemeBurnerJson from "@/assets/contracts/MemeBurner.json";
|
||||
|
||||
export const useTokenStore = defineStore("token", {
|
||||
state: () => ({
|
||||
token: [
|
||||
// {
|
||||
// name: "PEPE",
|
||||
// contractAddress: "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
|
||||
// abi: [
|
||||
// {
|
||||
// inputs: [{ internalType: "uint256", name: "_totalSupply", type: "uint256" }],
|
||||
// stateMutability: "nonpayable",
|
||||
// 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: "value", type: "uint256" },
|
||||
// ],
|
||||
// name: "Approval",
|
||||
// type: "event",
|
||||
// },
|
||||
// {
|
||||
// anonymous: false,
|
||||
// inputs: [
|
||||
// { indexed: true, internalType: "address", name: "previousOwner", type: "address" },
|
||||
// { indexed: true, internalType: "address", name: "newOwner", type: "address" },
|
||||
// ],
|
||||
// name: "OwnershipTransferred",
|
||||
// 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: "value", type: "uint256" },
|
||||
// ],
|
||||
// name: "Transfer",
|
||||
// type: "event",
|
||||
// },
|
||||
// {
|
||||
// inputs: [
|
||||
// { internalType: "address", name: "owner", type: "address" },
|
||||
// { internalType: "address", name: "spender", 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: "account", type: "address" }],
|
||||
// name: "balanceOf",
|
||||
// outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
||||
// stateMutability: "view",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [
|
||||
// { internalType: "address", name: "_address", type: "address" },
|
||||
// { internalType: "bool", name: "_isBlacklisting", type: "bool" },
|
||||
// ],
|
||||
// name: "blacklist",
|
||||
// outputs: [],
|
||||
// stateMutability: "nonpayable",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [{ internalType: "address", name: "", type: "address" }],
|
||||
// name: "blacklists",
|
||||
// outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
||||
// stateMutability: "view",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [{ internalType: "uint256", name: "value", type: "uint256" }],
|
||||
// name: "burn",
|
||||
// outputs: [],
|
||||
// stateMutability: "nonpayable",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [],
|
||||
// name: "decimals",
|
||||
// outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
|
||||
// stateMutability: "view",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [
|
||||
// { internalType: "address", name: "spender", type: "address" },
|
||||
// { internalType: "uint256", name: "subtractedValue", type: "uint256" },
|
||||
// ],
|
||||
// name: "decreaseAllowance",
|
||||
// outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
||||
// stateMutability: "nonpayable",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [
|
||||
// { internalType: "address", name: "spender", type: "address" },
|
||||
// { internalType: "uint256", name: "addedValue", type: "uint256" },
|
||||
// ],
|
||||
// name: "increaseAllowance",
|
||||
// outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
||||
// stateMutability: "nonpayable",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [],
|
||||
// name: "limited",
|
||||
// outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
||||
// stateMutability: "view",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [],
|
||||
// name: "maxHoldingAmount",
|
||||
// outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
||||
// stateMutability: "view",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [],
|
||||
// name: "minHoldingAmount",
|
||||
// outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
||||
// stateMutability: "view",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [],
|
||||
// name: "name",
|
||||
// outputs: [{ internalType: "string", name: "", type: "string" }],
|
||||
// stateMutability: "view",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [],
|
||||
// name: "owner",
|
||||
// outputs: [{ internalType: "address", name: "", type: "address" }],
|
||||
// stateMutability: "view",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [],
|
||||
// name: "renounceOwnership",
|
||||
// outputs: [],
|
||||
// stateMutability: "nonpayable",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [
|
||||
// { internalType: "bool", name: "_limited", type: "bool" },
|
||||
// { internalType: "address", name: "_uniswapV2Pair", type: "address" },
|
||||
// { internalType: "uint256", name: "_maxHoldingAmount", type: "uint256" },
|
||||
// { internalType: "uint256", name: "_minHoldingAmount", type: "uint256" },
|
||||
// ],
|
||||
// name: "setRule",
|
||||
// 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: "recipient", type: "address" },
|
||||
// { internalType: "uint256", name: "amount", type: "uint256" },
|
||||
// ],
|
||||
// name: "transfer",
|
||||
// outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
||||
// stateMutability: "nonpayable",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [
|
||||
// { internalType: "address", name: "sender", type: "address" },
|
||||
// { internalType: "address", name: "recipient", type: "address" },
|
||||
// { internalType: "uint256", name: "amount", type: "uint256" },
|
||||
// ],
|
||||
// name: "transferFrom",
|
||||
// outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
||||
// stateMutability: "nonpayable",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
|
||||
// name: "transferOwnership",
|
||||
// outputs: [],
|
||||
// stateMutability: "nonpayable",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [],
|
||||
// name: "uniswapV2Pair",
|
||||
// outputs: [{ internalType: "address", name: "", type: "address" }],
|
||||
// stateMutability: "view",
|
||||
// type: "function",
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// name: "SHIBA INU",
|
||||
// contractAddress: "0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE",
|
||||
// abi: [
|
||||
// {
|
||||
// constant: true,
|
||||
// inputs: [],
|
||||
// name: "name",
|
||||
// outputs: [{ name: "", type: "string" }],
|
||||
// payable: false,
|
||||
// stateMutability: "view",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// constant: false,
|
||||
// inputs: [
|
||||
// { name: "spender", type: "address" },
|
||||
// { name: "value", type: "uint256" },
|
||||
// ],
|
||||
// name: "approve",
|
||||
// outputs: [{ name: "", type: "bool" }],
|
||||
// payable: false,
|
||||
// stateMutability: "nonpayable",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// constant: true,
|
||||
// inputs: [],
|
||||
// name: "totalSupply",
|
||||
// outputs: [{ name: "", type: "uint256" }],
|
||||
// payable: false,
|
||||
// stateMutability: "view",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// constant: false,
|
||||
// inputs: [
|
||||
// { name: "sender", type: "address" },
|
||||
// { name: "recipient", type: "address" },
|
||||
// { name: "amount", type: "uint256" },
|
||||
// ],
|
||||
// name: "transferFrom",
|
||||
// outputs: [{ name: "", type: "bool" }],
|
||||
// payable: false,
|
||||
// stateMutability: "nonpayable",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// constant: true,
|
||||
// inputs: [],
|
||||
// name: "decimals",
|
||||
// outputs: [{ name: "", type: "uint8" }],
|
||||
// payable: false,
|
||||
// stateMutability: "view",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// constant: false,
|
||||
// inputs: [
|
||||
// { name: "spender", type: "address" },
|
||||
// { name: "addedValue", type: "uint256" },
|
||||
// ],
|
||||
// name: "increaseAllowance",
|
||||
// outputs: [{ name: "", type: "bool" }],
|
||||
// payable: false,
|
||||
// stateMutability: "nonpayable",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// constant: false,
|
||||
// inputs: [{ name: "value", type: "uint256" }],
|
||||
// name: "burn",
|
||||
// outputs: [],
|
||||
// payable: false,
|
||||
// stateMutability: "nonpayable",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// constant: true,
|
||||
// inputs: [{ name: "account", type: "address" }],
|
||||
// name: "balanceOf",
|
||||
// outputs: [{ name: "", type: "uint256" }],
|
||||
// payable: false,
|
||||
// stateMutability: "view",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// constant: true,
|
||||
// inputs: [],
|
||||
// name: "symbol",
|
||||
// outputs: [{ name: "", type: "string" }],
|
||||
// payable: false,
|
||||
// stateMutability: "view",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// constant: false,
|
||||
// inputs: [
|
||||
// { name: "spender", type: "address" },
|
||||
// { name: "subtractedValue", type: "uint256" },
|
||||
// ],
|
||||
// name: "decreaseAllowance",
|
||||
// outputs: [{ name: "", type: "bool" }],
|
||||
// payable: false,
|
||||
// stateMutability: "nonpayable",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// constant: false,
|
||||
// inputs: [
|
||||
// { name: "recipient", type: "address" },
|
||||
// { name: "amount", type: "uint256" },
|
||||
// ],
|
||||
// name: "transfer",
|
||||
// outputs: [{ name: "", type: "bool" }],
|
||||
// payable: false,
|
||||
// stateMutability: "nonpayable",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// constant: true,
|
||||
// inputs: [
|
||||
// { name: "owner", type: "address" },
|
||||
// { name: "spender", type: "address" },
|
||||
// ],
|
||||
// name: "allowance",
|
||||
// outputs: [{ name: "", type: "uint256" }],
|
||||
// payable: false,
|
||||
// stateMutability: "view",
|
||||
// type: "function",
|
||||
// },
|
||||
// {
|
||||
// inputs: [
|
||||
// { name: "name", type: "string" },
|
||||
// { name: "symbol", type: "string" },
|
||||
// { name: "decimals", type: "uint8" },
|
||||
// { name: "totalSupply", type: "uint256" },
|
||||
// { name: "feeReceiver", type: "address" },
|
||||
// { name: "tokenOwnerAddress", type: "address" },
|
||||
// ],
|
||||
// payable: true,
|
||||
// stateMutability: "payable",
|
||||
// type: "constructor",
|
||||
// },
|
||||
// {
|
||||
// anonymous: false,
|
||||
// inputs: [
|
||||
// { indexed: true, name: "from", type: "address" },
|
||||
// { indexed: true, name: "to", type: "address" },
|
||||
// { indexed: false, name: "value", type: "uint256" },
|
||||
// ],
|
||||
// name: "Transfer",
|
||||
// type: "event",
|
||||
// },
|
||||
// {
|
||||
// anonymous: false,
|
||||
// inputs: [
|
||||
// { indexed: true, name: "owner", type: "address" },
|
||||
// { indexed: true, name: "spender", type: "address" },
|
||||
// { indexed: false, name: "value", type: "uint256" },
|
||||
// ],
|
||||
// name: "Approval",
|
||||
// type: "event",
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
{
|
||||
name: "Meme1",
|
||||
abi: Meme1Json.abi,
|
||||
contractAddress: Meme1Json.contractAddress,
|
||||
},
|
||||
{
|
||||
name: "Meme2",
|
||||
abi: Meme2Json.abi,
|
||||
contractAddress: Meme2Json.contractAddress,
|
||||
},
|
||||
],
|
||||
activeToken: {
|
||||
address: null,
|
||||
abi: null,
|
||||
balance: null,
|
||||
contract: null,
|
||||
allowance: null
|
||||
},
|
||||
memeBurner: {
|
||||
config: MemeBurnerJson,
|
||||
contract: null
|
||||
}
|
||||
}),
|
||||
getters: {},
|
||||
actions: {
|
||||
async changeActiveToken(token) {
|
||||
this.activeToken = token;
|
||||
const web3 = new Web3(window.ethereum);
|
||||
this.contract = new web3.eth.Contract(token.abi, token.contractAddress);
|
||||
const walletStore = useWalletStore();
|
||||
if (walletStore.connected) {
|
||||
this.activeToken.balance = await walletStore.getTokenBalance(token);
|
||||
this.activeToken.allowance = await this.allowance();
|
||||
|
||||
}
|
||||
},
|
||||
async allowance() {
|
||||
const walletStore = useWalletStore();
|
||||
console.log("walletStore.address", walletStore.address);
|
||||
const allowance = await this.contract.methods.allowance(walletStore.address, MemeBurnerJson.contractAddress).call();
|
||||
console.log("allowance", allowance);
|
||||
return allowance;
|
||||
},
|
||||
async approveToken(amount) {
|
||||
const walletStore = useWalletStore();
|
||||
var approve = await this.contract.methods
|
||||
.approve(this.memeBurner.config.contractAddress, amount)
|
||||
.send({ from: walletStore.address });
|
||||
console.log("approve", approve);
|
||||
console.log("this.contract", this.contract);
|
||||
},
|
||||
async sacrificeToken(amount) {
|
||||
console.log("this.activeToken.", this.activeToken.contractAddress);
|
||||
const walletStore = useWalletStore();
|
||||
console.log("walletStore.address", walletStore.address);
|
||||
var reward = await this.memeBurner.contract.methods
|
||||
.sacrificeMeme(this.activeToken.contractAddress, "400000000000000000")
|
||||
.call({ from: walletStore.address });
|
||||
console.log("reward", reward);
|
||||
},
|
||||
getTokenContract(token) {
|
||||
const contractAddress = token.contractAddress;
|
||||
const activeToken = this.token.find((obj) => obj.contractAddress === contractAddress);
|
||||
console.log("activeToken", activeToken);
|
||||
const web3 = new Web3(window.ethereum);
|
||||
const contract = new web3.eth.Contract(activeToken.abi, contractAddress);
|
||||
return contract;
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,87 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { useTokenStore } from "./tokens";
|
||||
import Web3 from "web3";
|
||||
export const useWalletStore = defineStore("wallet", {
|
||||
state: () => ({
|
||||
count: 0,
|
||||
alchemy: null,
|
||||
connected: false,
|
||||
address: null,
|
||||
}),
|
||||
getters: {
|
||||
double: (state) => state.count * 2,
|
||||
},
|
||||
actions: {
|
||||
increment() {
|
||||
this.count++;
|
||||
},
|
||||
async disconnectWallet() {
|
||||
// const permissions = await window.ethereum.request({
|
||||
// method: 'wallet_requestPermissions',
|
||||
// params: [{
|
||||
// eth_accounts: {},
|
||||
// }]
|
||||
// });
|
||||
// console.log("permissions", permissions);
|
||||
this.connected = false;
|
||||
this.address = null;
|
||||
},
|
||||
connectWallet() {
|
||||
console.log("window.ethereum", window.ethereum);
|
||||
// if (window.ethereum) {
|
||||
window.ethereum
|
||||
.request({ method: "eth_requestAccounts" })
|
||||
.then((data) => {
|
||||
console.log("data", data);
|
||||
this.address = data[0];
|
||||
this.connected = true;
|
||||
const tokenStore = useTokenStore();
|
||||
if (tokenStore.activeToken.address) {
|
||||
//Token selected but not refreshed
|
||||
this.getTokenBalance(tokenStore.activeToken.address).then(
|
||||
(data) => (tokenStore.activeToken.balance = data)
|
||||
);
|
||||
}
|
||||
// console.log("permissions", permissions);
|
||||
})
|
||||
.catch((error) => {
|
||||
if (error.code === 4001) {
|
||||
// EIP-1193 userRejectedRequest error
|
||||
console.log("Please connect to MetaMask.");
|
||||
} else {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
// }
|
||||
},
|
||||
async getTokenBalance(token) {
|
||||
const tokenStore = useTokenStore();
|
||||
const contract = tokenStore.getTokenContract(token);
|
||||
const result = await contract.methods.balanceOf(this.address).call();
|
||||
return result;
|
||||
},
|
||||
async isConnected() {
|
||||
try {
|
||||
const accounts = await window.ethereum.request({ method: "eth_accounts" });
|
||||
if (accounts.length) {
|
||||
this.connected = true;
|
||||
|
||||
console.log(`You're connected to: ${accounts[0]}`);
|
||||
const web3 = new Web3(window.ethereum);
|
||||
const tokenStore = useTokenStore();
|
||||
tokenStore.memeBurner.contract = new web3.eth.Contract(
|
||||
tokenStore.memeBurner.config.abi,
|
||||
tokenStore.memeBurner.config.contractAddress
|
||||
);
|
||||
} else {
|
||||
this.disconnectWallet();
|
||||
console.log("Metamask is not connected");
|
||||
}
|
||||
} catch (error) {
|
||||
console.log("error", error);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
persist: true,
|
||||
});
|
||||
@@ -0,0 +1,54 @@
|
||||
<template>
|
||||
<div class="tube">
|
||||
<div class="tube__top"></div>
|
||||
<div class="tube__contents"></div>
|
||||
<div class="tube__outer-glass"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="sass">
|
||||
.tube
|
||||
margin: 50vh auto
|
||||
transform: translateY(-50%)
|
||||
height: 330px
|
||||
width: 60px
|
||||
position: relative
|
||||
overflow: visible
|
||||
background: linear-gradient(90deg, rgba(228, 225, 222, 0.3) 0%, rgba(216, 212, 208, 0.3) 0%, rgba(203, 198, 193, 0.3) 0%, rgba(188, 184, 179, 0.3) 6.79%, rgba(166, 162, 159, 0.3) 14.61%, rgba(216, 217, 217, 0.3) 48.07%, rgba(223, 224, 225, 0.3) 52.25%, rgba(210, 210, 210, 0.3) 62.52%, rgba(176, 173, 171, 0.3) 82.19%, rgba(166, 162, 159, 0.3) 87.64%, rgba(208, 210, 211, 0.3) 100%, rgba(166, 168, 171, 0.3) 100%)
|
||||
border-radius: 0px 0px 40px 40px
|
||||
&:before, .tube__outer-glass
|
||||
border-radius: 0px 0px 40px 40px
|
||||
position: absolute
|
||||
width: 100%
|
||||
height: 100%
|
||||
content: ""
|
||||
background: linear-gradient(90deg, rgba(174, 208, 237, 0.3) 0%, rgba(166, 204, 235, 0.3) 50%, rgba(81, 168, 220, 0.3) 100%)
|
||||
|
||||
.tube__top
|
||||
border: 3px solid #d8ebf6
|
||||
background: linear-gradient(to bottom, #a7d3ec 50%, #98bcde 51%, #98bcde 100%)
|
||||
position: absolute
|
||||
top: -6px
|
||||
border-radius: 50%
|
||||
height: 5px
|
||||
width: 60px
|
||||
left: -3px
|
||||
|
||||
.tube__contents
|
||||
border-radius: 0px 0px 40px 40px
|
||||
background: #b51e23
|
||||
width: 54px
|
||||
height: 80%
|
||||
left: 3px
|
||||
position: absolute
|
||||
bottom: 3px
|
||||
|
||||
&:before
|
||||
content: ""
|
||||
background: linear-gradient(to bottom, rgba(156, 82, 22, 0.5) 50%, rgba(156, 82, 22, 0.9) 51%, rgba(156, 82, 22, 0.9) 100%)
|
||||
position: absolute
|
||||
top: -1px
|
||||
border-radius: 50%
|
||||
height: 2px
|
||||
width: 54px
|
||||
</style>
|
||||
@@ -0,0 +1,133 @@
|
||||
<script setup>
|
||||
import { storeToRefs } from "pinia";
|
||||
import SacrificeToken from "@/components/SacrificeToken.vue";
|
||||
import BloodChart from "@/components/BloodChart.vue";
|
||||
// import Web3 from "web3";
|
||||
|
||||
// import { useWalletStore } from "@/stores/wallet";
|
||||
import { useTokenStore } from "@/stores/tokens";
|
||||
const tokenStore = useTokenStore();
|
||||
const { token } = storeToRefs(tokenStore);
|
||||
|
||||
// let web3 = new Web3(
|
||||
// "https://eth-goerli.g.alchemy.com/v2/0-W9tOm6v_QP1PfRV8RuBCpWr-qoEbkN"
|
||||
// );
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main>
|
||||
<div>
|
||||
<sacrifice-token :data="token"></sacrifice-token>
|
||||
|
||||
<section id="cycle-section" class="container">
|
||||
<div class="cycle">
|
||||
<h2>Cycle 1</h2>
|
||||
<p>Join the eternal cycle of the vampire sacrifice and claim your rewards at each cycle's end.</p>
|
||||
<div class="claim">
|
||||
<div class="claim-button">
|
||||
<div class="btn btn-immortal">Claim</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="theinput">Sacrafice Reward</label>
|
||||
<input type="text" name="whatever" id="theinput" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="theinput">Clan Reward</label>
|
||||
<input type="text" name="whatever" id="theinput" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Bloodline Clan</h2>
|
||||
<p>Become the most powerful clan in a cycle to receive extra rewards.</p>
|
||||
<table class="bonus-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">1st</th>
|
||||
<td>100% Bonus</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">2nd</th>
|
||||
<td>50% Bonus</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">3rd</th>
|
||||
<td>No Bonus</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div>
|
||||
<blood-chart></blood-chart>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="tokenomics" class="container">
|
||||
<h2>Tokenomics</h2>
|
||||
<p>100% clan owned. No team %, no pre-mine</p>
|
||||
<img src="@/assets/img/tokenomics.png" alt="tokenomics" />
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style lang="sass">
|
||||
.chart-wrapper-coin
|
||||
display: flex
|
||||
justify-content: space-evenly
|
||||
width: 600px
|
||||
.chart-coin
|
||||
height: 50px
|
||||
width: 50px
|
||||
background-color: red
|
||||
border-radius: 50px
|
||||
position: relative
|
||||
#cycle-section
|
||||
text-align: center
|
||||
margin-left: auto
|
||||
margin-right: auto
|
||||
.cycle
|
||||
.claim
|
||||
display: flex
|
||||
flex-direction: column
|
||||
margin-left: auto
|
||||
margin-right: auto
|
||||
border: 1px solid black
|
||||
padding: 12px 24px
|
||||
width: 300px
|
||||
.claim-button
|
||||
text-align: center
|
||||
label, input
|
||||
display: block
|
||||
input
|
||||
width: 100%
|
||||
.bonus-table
|
||||
border: 1px solid black
|
||||
padding: 8px
|
||||
text-align: left
|
||||
margin-left: auto
|
||||
margin-right: auto
|
||||
#tokenomics
|
||||
text-align: center
|
||||
img
|
||||
display: block
|
||||
margin-left: auto
|
||||
margin-right: auto
|
||||
width: 50%
|
||||
.chart-wrapper
|
||||
width: 600px
|
||||
height: 600px
|
||||
border: 1px solid blue
|
||||
display: flex
|
||||
justify-content: space-evenly
|
||||
.chart-element
|
||||
height: 100%
|
||||
background-color: #ddd
|
||||
display: flex
|
||||
position: relative
|
||||
.chart
|
||||
width: 75px
|
||||
color: white
|
||||
margin-top: auto
|
||||
text-align: center
|
||||
padding-top: 10px
|
||||
</style>
|
||||
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<div>
|
||||
<button @click="mintToken">mint</button>
|
||||
<button @click="sacrificeMeme">sacrifice Meme</button>
|
||||
<button @click="approveMeme1">approve Meme1</button>
|
||||
<button @click="tokenStore.approveToken(MemeBurnerJson, 10)">wallet approve</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
import Web3 from "web3";
|
||||
import Meme1Json from "@/assets/contracts/Meme1.json";
|
||||
import Meme2Json from "@/assets/contracts/Meme2.json";
|
||||
import MemeBurnerJson from "@/assets/contracts/MemeBurner.json";
|
||||
import MemeTokenJson from "@/assets/contracts/MemeToken.json";
|
||||
import RewardLockerJson from "@/assets/contracts/RewardLocker.json";
|
||||
import { useTokenStore } from "@/stores/tokens";
|
||||
|
||||
const tokenStore = useTokenStore();
|
||||
|
||||
console.log("Meme1Json", Meme1Json);
|
||||
console.log("Meme2Json", Meme2Json);
|
||||
console.log("MemeBurnerJson", MemeBurnerJson);
|
||||
console.log("MemeTokenJson", MemeTokenJson);
|
||||
console.log("RewardLockerJson", RewardLockerJson);
|
||||
|
||||
// let web3 = new Web3(
|
||||
// "https://eth-goerli.g.alchemy.com/v2/0-W9tOm6v_QP1PfRV8RuBCpWr-qoEbkN"
|
||||
// );
|
||||
// console.log("balanceOf", balanceOf);
|
||||
const web3 = ref(null);
|
||||
const contractMeme1 = ref(null);
|
||||
const contractBurner = ref(null);
|
||||
|
||||
onMounted(async () => {
|
||||
web3.value = new Web3(window.ethereum);
|
||||
// const contract = new web3.value.eth.Contract(Meme1Json.abi, Meme1Json.contractAddress);
|
||||
console.log("web3", web3.value);
|
||||
const accounts = await web3.value.eth.getAccounts();
|
||||
console.log("accounts", accounts);
|
||||
web3.value.eth.Contract.defaultAccount = accounts[0];
|
||||
|
||||
contractMeme1.value = new web3.value.eth.Contract(Meme1Json.abi, Meme1Json.contractAddress);
|
||||
contractBurner.value = new web3.value.eth.Contract(MemeBurnerJson.abi, MemeBurnerJson.contractAddress);
|
||||
});
|
||||
|
||||
async function approveMeme1() {
|
||||
var approve = await contractMeme1.value.methods
|
||||
.approve(MemeBurnerJson.contractAddress, 10)
|
||||
.send({ from: web3.value.eth.Contract.defaultAccount });
|
||||
console.log("approve", approve);
|
||||
}
|
||||
|
||||
// async function approveMeme2() {
|
||||
// var approve = await contractMeme1.value.methods.approve(web3.value.eth.Contract.defaultAccount, 10).send({ from: web3.value.eth.Contract.defaultAccount })
|
||||
// console.log("approve", approve);
|
||||
// }
|
||||
|
||||
async function mintToken() {
|
||||
try {
|
||||
var mint = await contractMeme1.value.methods.mint(10).send({ from: web3.value.eth.Contract.defaultAccount });
|
||||
console.log("mint", mint);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
// var balanceOf = await contract.methods.balanceOf("0x66422602B2f4885c57EE794174f98d9E4DDBBBC6").call();
|
||||
// console.log("balanceOf", balanceOf);
|
||||
// var totalSupply = await contract.methods.totalSupply().call();
|
||||
// console.log("totalSupply", totalSupply);
|
||||
}
|
||||
|
||||
async function sacrificeMeme() {
|
||||
const allowance = await contractMeme1.value.methods
|
||||
.allowance(web3.value.eth.Contract.defaultAccount, MemeBurnerJson.contractAddress)
|
||||
.call();
|
||||
console.log("allowance", allowance);
|
||||
var reward = await contractBurner.value.methods
|
||||
.sacrificeMeme(Meme1Json.contractAddress, "100000000000000000")
|
||||
.call({ from: web3.value.eth.Contract.defaultAccount });
|
||||
console.log("reward", reward);
|
||||
}
|
||||
// console.log("balanceOf", contract.mint(10));
|
||||
</script>
|
||||
Reference in New Issue
Block a user