diff --git a/package-lock.json b/package-lock.json index f54fdd7..d3d2c5d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,8 @@ "viem": "^1.4.1", "vue": "^3.3.2", "vue-collapsed": "^1.2.8", - "vue-router": "^4.2.0" + "vue-router": "^4.2.0", + "vue-toastification": "^2.0.0-rc.5" }, "devDependencies": { "@esbuild-plugins/node-globals-polyfill": "^0.2.3", @@ -5813,6 +5814,14 @@ "vue": "^3.2.0" } }, + "node_modules/vue-toastification": { + "version": "2.0.0-rc.5", + "resolved": "https://registry.npmjs.org/vue-toastification/-/vue-toastification-2.0.0-rc.5.tgz", + "integrity": "sha512-q73e5jy6gucEO/U+P48hqX+/qyXDozAGmaGgLFm5tXX4wJBcVsnGp4e/iJqlm9xzHETYOilUuwOUje2Qg1JdwA==", + "peerDependencies": { + "vue": "^3.0.2" + } + }, "node_modules/web3-eth-abi": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.1.tgz", diff --git a/package.json b/package.json index 7335e4e..b927824 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "viem": "^1.4.1", "vue": "^3.3.2", "vue-collapsed": "^1.2.8", - "vue-router": "^4.2.0" + "vue-router": "^4.2.0", + "vue-toastification": "^2.0.0-rc.5" }, "devDependencies": { "@esbuild-plugins/node-globals-polyfill": "^0.2.3", diff --git a/src/App.vue b/src/App.vue index a96cc24..1c131eb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -37,7 +37,6 @@ const { memeBurner, token } = storeToRefs(tokenStore); const { list } = storeToRefs(contractStore); const isMobile = ref(false); const showPanel = ref(false); -const showModal = ref(false); const eventWatch = ref(null); const netWorkEvent = ref(null); const memeSacrificedEvent = ref(null); @@ -93,7 +92,6 @@ function changeRoute(name) { } provide("isMobile", isMobile); provide("showPanel", showPanel); -provide("showModal", showModal); onMounted(async () => { console.log("onmounted"); @@ -144,27 +142,6 @@ onMounted(async () => { -
@@ -283,6 +260,8 @@ onMounted(async () => { @media (min-width: 992px) background-color: unset .modal-card + border-radius: 16px + padding: 16px width: 342px text-align: center position: absolute diff --git a/src/assets/contracts/Bloodline.json b/src/assets/contracts/Bloodline.json index e57d493..e4a7386 100644 --- a/src/assets/contracts/Bloodline.json +++ b/src/assets/contracts/Bloodline.json @@ -1,6 +1,6 @@ { "contractName": "Bloodline", - "contractAddress": "0x00E5DAd5dA0FC4Da0baB7f0D99E28C07d8A88ee4", + "contractAddress": "0xBd6bB82108D5F27E8A8f081723408bF26d665a8c", "abi": [ { "inputs": [ diff --git a/src/assets/contracts/LiquidityOwner.json b/src/assets/contracts/LiquidityOwner.json index 6f05eba..0917e82 100644 --- a/src/assets/contracts/LiquidityOwner.json +++ b/src/assets/contracts/LiquidityOwner.json @@ -1,6 +1,6 @@ { "contractName": "LiquidityOwner", - "contractAddress": "0x947f05D74ac7dA0Eb0CA88eF9b579D196B178BaE", + "contractAddress": "0xEb898F92F7db3bbF807513C847bfDeE846E1b5Ff", "abi": [ { "inputs": [ @@ -19,24 +19,79 @@ "name": "_weth", "type": "address" }, - { - "internalType": "address", - "name": "_nfPositionManager", - "type": "address" - }, { "internalType": "address", "name": "_memeAltar", "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CurrentPriceDisallowsToProvide", + "type": "error" + }, + { + "inputs": [], + "name": "NothingToProvide", + "type": "error" + }, + { + "inputs": [], + "name": "ProjectAlive", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "int24", + "name": "tickLower", + "type": "int24" }, { + "indexed": true, + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + }, + { + "indexed": true, "internalType": "uint256", - "name": "_chunk", + "name": "amountWETH", "type": "uint256" } ], - "stateMutability": "payable", - "type": "constructor" + "name": "LiquidityProvided", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "indexed": true, + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amountWETH", + "type": "uint256" + } + ], + "name": "LiquidityShouldBeProvidedLater", + "type": "event" }, { "inputs": [ @@ -62,69 +117,6 @@ "stateMutability": "pure", "type": "function" }, - { - "inputs": [ - { - "components": [ - { - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "internalType": "uint80", - "name": "tokenId", - "type": "uint80" - } - ], - "internalType": "struct LiquidityOwner.Position", - "name": "position", - "type": "tuple" - } - ], - "name": "addETHPositionToLinkedList", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "int24", - "name": "_tickLower", - "type": "int24" - }, - { - "internalType": "int24", - "name": "_tickUpper", - "type": "int24" - }, - { - "internalType": "uint256", - "name": "amountBloodline", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountWETH", - "type": "uint256" - } - ], - "name": "addNewPosition", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -133,12 +125,17 @@ "type": "int48" } ], - "name": "allRangesLinkedList", + "name": "_positions", "outputs": [ { - "internalType": "int48", - "name": "", - "type": "int48" + "internalType": "uint112", + "name": "providedETH", + "type": "uint112" + }, + { + "internalType": "uint112", + "name": "unprovidedETH", + "type": "uint112" } ], "stateMutability": "view", @@ -157,45 +154,30 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "chunk", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { - "internalType": "uint256[]", - "name": "liquidityTokenIds", - "type": "uint256[]" + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "internalType": "int24", + "name": "tickUpper", + "type": "int24" } ], "name": "collectDeveloperFees", "outputs": [ { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" + "internalType": "uint128", + "name": "wethAmount", + "type": "uint128" }, { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" + "internalType": "uint128", + "name": "bloodlineAmount", + "type": "uint128" } ], "stateMutability": "nonpayable", @@ -206,79 +188,14 @@ "name": "collectedEthTotal", "outputs": [ { - "internalType": "uint256", + "internalType": "uint112", "name": "", - "type": "uint256" + "type": "uint112" } ], "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "currentTokenIdToFill", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - } - ], - "name": "decreasePositionLiquidity", - "outputs": [ - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountWETH", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountBloodline", - "type": "uint256" - } - ], - "name": "increasePositionLiquidity", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "memeAltar", @@ -292,96 +209,15 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "positionsToCancel", - "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": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "pure", - "type": "function" - }, { "inputs": [ { "internalType": "uint256", "name": "developerFee", "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOfETHToPaySender", - "type": "uint256" } ], - "name": "payDeveloperFeeAndForGas", + "name": "payDeveloperFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -405,15 +241,33 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "pool", + "outputs": [ { - "internalType": "uint256", + "internalType": "contract IUniswapV3Pool", "name": "", - "type": "uint256" + "type": "address" } ], - "name": "positions", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "previousBLDTotalSupply", "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { "internalType": "int24", "name": "tickLower", @@ -423,29 +277,37 @@ "internalType": "int24", "name": "tickUpper", "type": "int24" - }, - { - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "internalType": "uint80", - "name": "tokenId", - "type": "uint80" } ], - "stateMutability": "view", + "name": "provideUnprovidedLiquidity", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "rebalance", + "inputs": [ + { + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + } + ], + "name": "rageQuit", "outputs": [ { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "uint128", + "name": "wethAmount", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "bloodlineAmount", + "type": "uint128" } ], "stateMutability": "nonpayable", @@ -454,28 +316,9 @@ { "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "tokenIds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", + "internalType": "uint112", "name": "collectedEthInRound", - "type": "uint256" + "type": "uint112" } ], "name": "triggerRoundCompleted", @@ -489,38 +332,25 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "uniV3Pool", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { - "internalType": "int256", - "name": "amount0Delta", - "type": "int256" + "internalType": "uint256", + "name": "amount0Owed", + "type": "uint256" }, { - "internalType": "int256", - "name": "amount1Delta", - "type": "int256" + "internalType": "uint256", + "name": "amount1Owed", + "type": "uint256" }, { "internalType": "bytes", - "name": "_data", + "name": "", "type": "bytes" } ], - "name": "uniswapV3SwapCallback", + "name": "uniswapV3MintCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -537,17 +367,6 @@ ], "stateMutability": "view", "type": "function" - }, - { - "inputs": [], - "name": "withdrawETH", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" } ] } diff --git a/src/assets/contracts/MemeAltar.json b/src/assets/contracts/MemeAltar.json index e7e56b7..147fee4 100644 --- a/src/assets/contracts/MemeAltar.json +++ b/src/assets/contracts/MemeAltar.json @@ -1,6 +1,6 @@ { "contractName": "MemeAltar", - "contractAddress": "0x9842954639aF0c1d7A692222955868806287aeEA", + "contractAddress": "0x9fA80C0A942016A0a246402e97d30562CF93f5AE", "abi": [ { "inputs": [ @@ -484,6 +484,11 @@ "internalType": "uint256", "name": "amountETHBase", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountETHForSelling", + "type": "uint256" } ], "stateMutability": "view", @@ -495,11 +500,6 @@ "internalType": "address", "name": "memeToSacrifice", "type": "address" - }, - { - "internalType": "bool", - "name": "buyFunc", - "type": "bool" } ], "name": "getAmountToReachGoal", @@ -549,7 +549,12 @@ "outputs": [ { "internalType": "uint256", - "name": "", + "name": "rewardCurrentCycle", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardNextCycle", "type": "uint256" } ], diff --git a/src/assets/contracts/RewardLocker.json b/src/assets/contracts/RewardLocker.json index f51346a..611fb30 100644 --- a/src/assets/contracts/RewardLocker.json +++ b/src/assets/contracts/RewardLocker.json @@ -1,6 +1,6 @@ { "contractName": "RewardLocker", - "contractAddress": "0xc9f5F78320D0f75099eEA8f8F6FD35BF246f0916", + "contractAddress": "0xC21568120adc35AB0aA7460A4A5E1C3D4f845269", "abi": [ { "inputs": [ @@ -551,14 +551,14 @@ "name": "rounds", "outputs": [ { - "internalType": "uint256", + "internalType": "uint32", "name": "roundCompletedTimestamp", - "type": "uint256" + "type": "uint32" }, { - "internalType": "uint256", + "internalType": "uint224", "name": "totalSacrificeCompetitionRewards", - "type": "uint256" + "type": "uint224" }, { "internalType": "uint256", diff --git a/src/assets/contracts/UniswapPool.json b/src/assets/contracts/UniswapPool.json index 3359ecf..47b29ee 100644 --- a/src/assets/contracts/UniswapPool.json +++ b/src/assets/contracts/UniswapPool.json @@ -1,992 +1,5 @@ { - "contractName": "OurUniV3Pool", - "contractAddress": "0xAbcc96a2cA1642B52AeCa81F3BCb25A92D7b9dDB", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "indexed": true, - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "indexed": true, - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount0", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount1", - "type": "uint128" - } - ], - "name": "Collect", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount0", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount1", - "type": "uint128" - } - ], - "name": "CollectProtocol", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "paid0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "paid1", - "type": "uint256" - } - ], - "name": "Flash", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "observationCardinalityNextOld", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint16", - "name": "observationCardinalityNextNew", - "type": "uint16" - } - ], - "name": "IncreaseObservationCardinalityNext", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint160", - "name": "sqrtPriceX96", - "type": "uint160" - }, - { - "indexed": false, - "internalType": "int24", - "name": "tick", - "type": "int24" - } - ], - "name": "Initialize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "indexed": true, - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "feeProtocol0Old", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "feeProtocol1Old", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "feeProtocol0New", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "feeProtocol1New", - "type": "uint8" - } - ], - "name": "SetFeeProtocol", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "int256", - "name": "amount0", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "amount1", - "type": "int256" - }, - { - "indexed": false, - "internalType": "uint160", - "name": "sqrtPriceX96", - "type": "uint160" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "int24", - "name": "tick", - "type": "int24" - } - ], - "name": "Swap", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "burn", - "outputs": [ - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "internalType": "uint128", - "name": "amount0Requested", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "amount1Requested", - "type": "uint128" - } - ], - "name": "collect", - "outputs": [ - { - "internalType": "uint128", - "name": "amount0", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "amount1", - "type": "uint128" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint128", - "name": "amount0Requested", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "amount1Requested", - "type": "uint128" - } - ], - "name": "collectProtocol", - "outputs": [ - { - "internalType": "uint128", - "name": "amount0", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "amount1", - "type": "uint128" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "factory", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "fee", - "outputs": [ - { - "internalType": "uint24", - "name": "", - "type": "uint24" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeGrowthGlobal0X128", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeGrowthGlobal1X128", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "flash", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "observationCardinalityNext", - "type": "uint16" - } - ], - "name": "increaseObservationCardinalityNext", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint160", - "name": "sqrtPriceX96", - "type": "uint160" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "liquidity", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxLiquidityPerTick", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "observations", - "outputs": [ - { - "internalType": "uint32", - "name": "blockTimestamp", - "type": "uint32" - }, - { - "internalType": "int56", - "name": "tickCumulative", - "type": "int56" - }, - { - "internalType": "uint160", - "name": "secondsPerLiquidityCumulativeX128", - "type": "uint160" - }, - { - "internalType": "bool", - "name": "initialized", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32[]", - "name": "secondsAgos", - "type": "uint32[]" - } - ], - "name": "observe", - "outputs": [ - { - "internalType": "int56[]", - "name": "tickCumulatives", - "type": "int56[]" - }, - { - "internalType": "uint160[]", - "name": "secondsPerLiquidityCumulativeX128s", - "type": "uint160[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "positions", - "outputs": [ - { - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "internalType": "uint256", - "name": "feeGrowthInside0LastX128", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeGrowthInside1LastX128", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "tokensOwed0", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "tokensOwed1", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "protocolFees", - "outputs": [ - { - "internalType": "uint128", - "name": "token0", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "token1", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "feeProtocol0", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "feeProtocol1", - "type": "uint8" - } - ], - "name": "setFeeProtocol", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "slot0", - "outputs": [ - { - "internalType": "uint160", - "name": "sqrtPriceX96", - "type": "uint160" - }, - { - "internalType": "int24", - "name": "tick", - "type": "int24" - }, - { - "internalType": "uint16", - "name": "observationIndex", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "observationCardinality", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "observationCardinalityNext", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "feeProtocol", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "unlocked", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - } - ], - "name": "snapshotCumulativesInside", - "outputs": [ - { - "internalType": "int56", - "name": "tickCumulativeInside", - "type": "int56" - }, - { - "internalType": "uint160", - "name": "secondsPerLiquidityInsideX128", - "type": "uint160" - }, - { - "internalType": "uint32", - "name": "secondsInside", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "bool", - "name": "zeroForOne", - "type": "bool" - }, - { - "internalType": "int256", - "name": "amountSpecified", - "type": "int256" - }, - { - "internalType": "uint160", - "name": "sqrtPriceLimitX96", - "type": "uint160" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "swap", - "outputs": [ - { - "internalType": "int256", - "name": "amount0", - "type": "int256" - }, - { - "internalType": "int256", - "name": "amount1", - "type": "int256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "int16", - "name": "", - "type": "int16" - } - ], - "name": "tickBitmap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "tickSpacing", - "outputs": [ - { - "internalType": "int24", - "name": "", - "type": "int24" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "int24", - "name": "", - "type": "int24" - } - ], - "name": "ticks", - "outputs": [ - { - "internalType": "uint128", - "name": "liquidityGross", - "type": "uint128" - }, - { - "internalType": "int128", - "name": "liquidityNet", - "type": "int128" - }, - { - "internalType": "uint256", - "name": "feeGrowthOutside0X128", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeGrowthOutside1X128", - "type": "uint256" - }, - { - "internalType": "int56", - "name": "tickCumulativeOutside", - "type": "int56" - }, - { - "internalType": "uint160", - "name": "secondsPerLiquidityOutsideX128", - "type": "uint160" - }, - { - "internalType": "uint32", - "name": "secondsOutside", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "initialized", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token0", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token1", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ] -} \ No newline at end of file + "contractName": "OurUniV3Pool", + "contractAddress": "0xAAC69F9d8A960eeda4F8211CA9F17aD6151D8F25", + "abi": [{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"int24","name":"tickLower","type":"int24"},{"indexed":true,"internalType":"int24","name":"tickUpper","type":"int24"},{"indexed":false,"internalType":"uint128","name":"amount","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"int24","name":"tickLower","type":"int24"},{"indexed":true,"internalType":"int24","name":"tickUpper","type":"int24"},{"indexed":false,"internalType":"uint128","name":"amount0","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"amount1","type":"uint128"}],"name":"Collect","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint128","name":"amount0","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"amount1","type":"uint128"}],"name":"CollectProtocol","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paid0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paid1","type":"uint256"}],"name":"Flash","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"observationCardinalityNextOld","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"observationCardinalityNextNew","type":"uint16"}],"name":"IncreaseObservationCardinalityNext","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"},{"indexed":false,"internalType":"int24","name":"tick","type":"int24"}],"name":"Initialize","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"int24","name":"tickLower","type":"int24"},{"indexed":true,"internalType":"int24","name":"tickUpper","type":"int24"},{"indexed":false,"internalType":"uint128","name":"amount","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"feeProtocol0Old","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"feeProtocol1Old","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"feeProtocol0New","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"feeProtocol1New","type":"uint8"}],"name":"SetFeeProtocol","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"int256","name":"amount0","type":"int256"},{"indexed":false,"internalType":"int256","name":"amount1","type":"int256"},{"indexed":false,"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"},{"indexed":false,"internalType":"uint128","name":"liquidity","type":"uint128"},{"indexed":false,"internalType":"int24","name":"tick","type":"int24"}],"name":"Swap","type":"event"},{"inputs":[{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint128","name":"amount","type":"uint128"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint128","name":"amount0Requested","type":"uint128"},{"internalType":"uint128","name":"amount1Requested","type":"uint128"}],"name":"collect","outputs":[{"internalType":"uint128","name":"amount0","type":"uint128"},{"internalType":"uint128","name":"amount1","type":"uint128"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint128","name":"amount0Requested","type":"uint128"},{"internalType":"uint128","name":"amount1Requested","type":"uint128"}],"name":"collectProtocol","outputs":[{"internalType":"uint128","name":"amount0","type":"uint128"},{"internalType":"uint128","name":"amount1","type":"uint128"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeGrowthGlobal0X128","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeGrowthGlobal1X128","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"flash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"observationCardinalityNext","type":"uint16"}],"name":"increaseObservationCardinalityNext","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"liquidity","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxLiquidityPerTick","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mint","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"observations","outputs":[{"internalType":"uint32","name":"blockTimestamp","type":"uint32"},{"internalType":"int56","name":"tickCumulative","type":"int56"},{"internalType":"uint160","name":"secondsPerLiquidityCumulativeX128","type":"uint160"},{"internalType":"bool","name":"initialized","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32[]","name":"secondsAgos","type":"uint32[]"}],"name":"observe","outputs":[{"internalType":"int56[]","name":"tickCumulatives","type":"int56[]"},{"internalType":"uint160[]","name":"secondsPerLiquidityCumulativeX128s","type":"uint160[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"positions","outputs":[{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint256","name":"feeGrowthInside0LastX128","type":"uint256"},{"internalType":"uint256","name":"feeGrowthInside1LastX128","type":"uint256"},{"internalType":"uint128","name":"tokensOwed0","type":"uint128"},{"internalType":"uint128","name":"tokensOwed1","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolFees","outputs":[{"internalType":"uint128","name":"token0","type":"uint128"},{"internalType":"uint128","name":"token1","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"feeProtocol0","type":"uint8"},{"internalType":"uint8","name":"feeProtocol1","type":"uint8"}],"name":"setFeeProtocol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slot0","outputs":[{"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"},{"internalType":"int24","name":"tick","type":"int24"},{"internalType":"uint16","name":"observationIndex","type":"uint16"},{"internalType":"uint16","name":"observationCardinality","type":"uint16"},{"internalType":"uint16","name":"observationCardinalityNext","type":"uint16"},{"internalType":"uint8","name":"feeProtocol","type":"uint8"},{"internalType":"bool","name":"unlocked","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"}],"name":"snapshotCumulativesInside","outputs":[{"internalType":"int56","name":"tickCumulativeInside","type":"int56"},{"internalType":"uint160","name":"secondsPerLiquidityInsideX128","type":"uint160"},{"internalType":"uint32","name":"secondsInside","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bool","name":"zeroForOne","type":"bool"},{"internalType":"int256","name":"amountSpecified","type":"int256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[{"internalType":"int256","name":"amount0","type":"int256"},{"internalType":"int256","name":"amount1","type":"int256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int16","name":"","type":"int16"}],"name":"tickBitmap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tickSpacing","outputs":[{"internalType":"int24","name":"","type":"int24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int24","name":"","type":"int24"}],"name":"ticks","outputs":[{"internalType":"uint128","name":"liquidityGross","type":"uint128"},{"internalType":"int128","name":"liquidityNet","type":"int128"},{"internalType":"uint256","name":"feeGrowthOutside0X128","type":"uint256"},{"internalType":"uint256","name":"feeGrowthOutside1X128","type":"uint256"},{"internalType":"int56","name":"tickCumulativeOutside","type":"int56"},{"internalType":"uint160","name":"secondsPerLiquidityOutsideX128","type":"uint160"},{"internalType":"uint32","name":"secondsOutside","type":"uint32"},{"internalType":"bool","name":"initialized","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}] +} diff --git a/src/assets/contracts/admin-altar.json b/src/assets/contracts/admin-altar.json index 71f34ce..68081f2 100644 --- a/src/assets/contracts/admin-altar.json +++ b/src/assets/contracts/admin-altar.json @@ -1 +1 @@ -[{"inputs":[{"internalType":"address","name":"meme","type":"address"},{"internalType":"address","name":"uniV2Pool","type":"address"}],"name":"addMemeToList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint8","name":"b1","type":"uint8"},{"internalType":"uint8","name":"m1","type":"uint8"},{"internalType":"uint8","name":"b2","type":"uint8"},{"internalType":"uint8","name":"m2","type":"uint8"},{"internalType":"uint8","name":"b3","type":"uint8"},{"internalType":"uint8","name":"m4","type":"uint8"}],"internalType":"struct MemeAltar.BM","name":"newBM","type":"tuple"}],"name":"adjustBM","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDefaultGoal","type":"uint256"}],"name":"adjustDefaultGoal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDurationLimit","type":"uint256"}],"name":"adjustRoundDurationLimit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"meme","type":"address"}],"name":"removeMemeFromList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"switchAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFixedPrice","type":"uint256"}],"name":"adjustFixedPrice","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}] +[{"inputs":[{"internalType":"address","name":"meme","type":"address"},{"internalType":"address","name":"uniV2Pool","type":"address"}],"name":"addMemeToList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint40","name":"b1","type":"uint40"},{"internalType":"uint40","name":"m1","type":"uint40"},{"internalType":"uint40","name":"b2","type":"uint40"},{"internalType":"uint40","name":"m2","type":"uint40"},{"internalType":"uint40","name":"b3","type":"uint40"},{"internalType":"uint40","name":"m4","type":"uint40"}],"internalType":"struct MemeAltar.BM","name":"newBM","type":"tuple"}],"name":"adjustBM","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint112","name":"newDefaultGoal","type":"uint112"}],"name":"adjustDefaultGoal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"newDurationLimit","type":"uint32"}],"name":"adjustRoundDurationLimit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"switchAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"meme","type":"address"},{"internalType":"address","name":"newUniV2Pool","type":"address"}],"name":"switchUniV2Pool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"meme","type":"address"}],"name":"removeMemeFromList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}] diff --git a/src/components/BloodChart.vue b/src/components/BloodChart.vue index 0879774..ec8d74d 100644 --- a/src/components/BloodChart.vue +++ b/src/components/BloodChart.vue @@ -6,6 +6,7 @@ src="/assets/img/blood-arrow-left.png" alt="left-arrow" @click="swiperInstance.slidePrev()" + v-if="token.length > 3" /> diff --git a/src/components/ClaimComponent.vue b/src/components/ClaimComponent.vue index 5b89351..5d3e8a9 100644 --- a/src/components/ClaimComponent.vue +++ b/src/components/ClaimComponent.vue @@ -12,7 +12,13 @@ diff --git a/src/components/ConnectWallet.vue b/src/components/ConnectWallet.vue index 6d23791..c8fe894 100644 --- a/src/components/ConnectWallet.vue +++ b/src/components/ConnectWallet.vue @@ -100,8 +100,16 @@ function badgeClick(token) { var tokenData = tokenStore.getToken(token.contractAddress); tokenStore.activeToken = tokenData; // router.push({ name: "home", hash: `#${tokenData.name}` }); - router.push({ name: "home" }); - instance.parent.emit("update:modelValue", false); + if (tokenStore.memeToken.contractAddress === token.contractAddress) { + //buy + window.open( + "https://app.uniswap.org/swap?inputCurrency=ETH&outputCurrency=0x00E5DAd5dA0FC4Da0baB7f0D99E28C07d8A88ee4&chain=goerli", + "_blank" + ); + } else { + router.push({ name: "home" }); + instance.parent.emit("update:modelValue", false); + } } async function connectWallet(connector) { diff --git a/src/components/SacrificeToken.vue b/src/components/SacrificeToken.vue index 2ed7f2e..c36a27a 100644 --- a/src/components/SacrificeToken.vue +++ b/src/components/SacrificeToken.vue @@ -68,7 +68,7 @@
{{ output.toFixed(5) }}
@@ -90,7 +90,7 @@
-
+
You can claim your $BLOOD when the cycle is finished.
moon @@ -109,14 +109,15 @@
+ {{ stateComputed }} @@ -154,14 +155,16 @@ import { useUniswapStore } from "@/stores/uniswap"; import StakeComponentV1 from "@/components/StakeComponentV1.vue"; import LoadingComponent from "@/components/LoadingComponent.vue"; import TokenInput from "@/components/TokenInput.vue"; +import StakeSuccessToast from "@/components/toasts/StakeSuccessToast.vue"; +import { useToast } from "vue-toastification"; +const toast = useToast(); import { storeToRefs } from "pinia"; import { waitForTransaction, readContract, watchBlockNumber } from "@wagmi/core"; import Helper from "@/utils/helper.js"; const isMobile = inject("isMobile"); const showPanel = inject("showPanel"); -const showModal = inject("showModal"); const walletStore = useWalletStoreV2(); // const { connected } = storeToRefs(walletStore); @@ -199,6 +202,19 @@ const state = ref(0); const showStakingMenu = ref(false); const approvalData = ref(null); +const stateComputed = computed(() => { + let returnState = 0; + if (tokenNumber.value === null || tokenNumber.value === "" || tokenNumber.value === 0) { + returnState = 0; + } else if (state.value === 2) { + returnState = 2; + } else if (state.value === 3) { + returnState = 3; + } else if (tokenNumber.value !== null || tokenNumber.value !== "" || tokenNumber.value > 0) { + returnState = 1; + } + return returnState; +}); const processChange = Helper.debounce((value) => getRewardsFor(value)); onMounted(() => { @@ -267,7 +283,12 @@ async function sacrificeToken(amount) { console.log("data", data); activeToken.value.allowance = await tokenStore.allowance(); state.value = 4; - showModal.value = true; + showSuccessToast( + tokenStore.activeToken.rewards?.toFixed(5), + "Success!", + "You turned your meme into:", + "You can claim once the current cycle is finished and your clan bonus was calculated." + ); } catch (error) { state.value = 0; console.error(error); @@ -288,8 +309,6 @@ async function approveToken(amount) { } catch (error) { console.error(error); throw new Error(error); - } finally { - state.value = 1; } } @@ -385,6 +404,36 @@ async function addTokens(value) { tokenNumber.value = Number(tokenNumber.value) + Number(value); output.value = await getRewardsFor(tokenNumber.value).output; } + +function showSuccessToast(value, header, subheader, info) { + // Define the content object with the component, props and listeners + const content = { + component: StakeSuccessToast, + // Any prop can be passed, but don't expect them to be reactive + props: { + // counter: this.counter, + // value: tokenStore.activeToken.rewards?.toFixed(5), + value: value, + header: header, + subheader: subheader, + info: info, + }, + // Listen and react to events using callbacks. In this case we listen for + // the "click" event emitted when clicking the toast button + listeners: {}, + }; + + // Render the toast and its contents + toast(content, { + position: "top-center", + icon: false, + closeOnClick: false, + toastClassName: "modal-overlay", + closeButton: false, + hideProgressBar: true, + timeout: false, + }); +} diff --git a/src/main.js b/src/main.js index 977616a..5275906 100644 --- a/src/main.js +++ b/src/main.js @@ -50,6 +50,10 @@ import { faArrowDown, faArrowRight, faSpinner, faPlus, faCaretLeft, faCaretRight import { faDiscord, faTwitter, faTelegram } from "@fortawesome/free-brands-svg-icons"; +import Toast from "vue-toastification"; +// Import the CSS or use your own! +import "vue-toastification/dist/index.css"; + /* add icons to the library */ library.add( faArrowDown, @@ -81,6 +85,10 @@ pinia.use(piniaPluginPersistedstate); app.use(pinia); + +app.use(Toast, {}); + + const walletStore = useWalletStoreV2(); const tokenStore = useTokenStore(); const memeBurnerStore = useMemeburnerStore(); diff --git a/src/stores/rewardlocker.js b/src/stores/rewardlocker.js index b87efb3..97dd7c0 100644 --- a/src/stores/rewardlocker.js +++ b/src/stores/rewardlocker.js @@ -123,14 +123,10 @@ export const useRewardLockerStore = defineStore("rewardlocker", { }); const { r, s, v } = getSignatureRSV(signature); - + console.log("value, deadline, v, r, s", value, deadline, v, r, s); const hash = await this.contract.write.stakeToBeSecured([value, deadline, v, r, s]); - console.log("hash", hash); - - const data = await waitForTransaction({ - hash: hash, - }); - console.log("data", data); + return hash; + }, async stakeAndClaimRound(stakeCoefficient, round) { // stakeCoefficient 25% = 2500, 50% = 5000 @@ -151,10 +147,11 @@ export const useRewardLockerStore = defineStore("rewardlocker", { const rounds = await roundsStore.getFinshedRoundNumbers(); const addresses = tokenStore.sacrificeToken.map((obj) => obj.contractAddress); console.log({ stakeCoefficient, rounds, addresses }); - const hash = await this.contract.write.stakeAndClaim([stakeCoefficient, rounds, addresses]); - // todo reload roundData and wallet data - const walletStore = useWalletStoreV2(); - await walletStore.loadWalletData(); + console.log("stakeCoefficient", stakeCoefficient); + var stakeCoefficientInt = Math.round(stakeCoefficient); + const hash = await this.contract.write.stakeAndClaim([stakeCoefficientInt, rounds, addresses]); + return hash; + }, }, }); diff --git a/src/stores/rounds.js b/src/stores/rounds.js index 546a5c3..1886eea 100644 --- a/src/stores/rounds.js +++ b/src/stores/rounds.js @@ -81,9 +81,9 @@ export const useRoundsStore = defineStore("rounds", { // ); // console.log("Number(data[tokenIndex].result[1] / BigInt(Math.pow(10, token.decimals))", Number(data[tokenIndex].result[1] / BigInt(Math.pow(10, token.decimals)))); this.rounds[this.currentRound].token[tokenIndex].amount = - Number(data[tokenIndex].result[1] / BigInt(Math.pow(10, token.decimals))) + Number(data[tokenIndex].result[1]) / Math.pow(10, token.decimals) }, - async fillRound(roundNumber) { + async fillRound(roundNumber, refillRound = false) { console.log("fillRound"); const memeBurnerStore = useMemeburnerStore(); const tokenStore = useTokenStore(); @@ -93,71 +93,78 @@ export const useRoundsStore = defineStore("rounds", { // if (this.activeRound === this.currentRound) { // console.log("activeRound is not completed"); // } else - if (!this.rounds[roundNumber]?.goal) { + if (!this.rounds[roundNumber]?.goal || refillRound) { console.log("round not filled --> fill round"); console.log("vor error"); var data = await memeBurnerStore.getSacrificedRound(roundNumber); let rewardData = null; if (walletStore.connected) { - console.log("hier1"); rewardData = await rewardLockerStore.getRewardsForAllToken(roundNumber); - console.log("hier2", rewardData); } - var goal = await memeBurnerStore.getGoal(roundNumber); + var goal = await memeBurnerStore.getGoal(roundNumber); + console.log("goal", goal); var tokenArray = []; var rewards_clan = 0; - var rewards_sacrifice = 0; - var rewards_staking = 0; - console.log("data", data); + var rewards_sacrifice = 0; + var rewards_staking = 0; + console.log("data", data); for (let index = 0; index < data.length; index++) { var tokenData = {}; const token = tokenStore.token[index]; var coefficent = await rewardLockerStore.getSacrificedTokenCoefficient( roundNumber, token.contractAddress - ); - console.log("coefficent", coefficent); + ); + console.log("coefficent", coefficent); tokenData.name = token.name; tokenData.contractAddress = token.contractAddress; tokenData.vamplogo = token.vamp.logo; tokenData.vampname = token.vamp.name; - // tokenData.amount = data[index].result[1]; - tokenData.amount = Number(data[index].result[1]) / Math.pow(10, token.decimals); + // tokenData.amount = data[index].result[1]; + tokenData.amount = Number(data[index].result[1]) / Math.pow(10, token.decimals); // tokenData.getAmountToReachGoal = // Number(await memeBurnerStore.getAmountToReachGoal(token.contractAddress)) / // Math.pow(10, token.decimals); - if (this.currentRound !== roundNumber && walletStore.connected) { - console.log("index", index); - console.log("rewardData[index]", rewardData[index]); + + + if (walletStore.connected) { const stakeReward = Number(rewardData[index].result[0]); const sacrificeClanReward = Number(rewardData[index].result[1]); - console.log("stakeReward", stakeReward); - console.log("sacrificeClanReward", sacrificeClanReward); - const clanwin = (Number(coefficent) / 10000 - 1) * sacrificeClanReward; - console.log("clanwin", clanwin); - const sacrificeRewards = Number(sacrificeClanReward) - clanwin; - console.log("sacrificeRewards", sacrificeRewards); - tokenData.rewards_ges = - Number(rewardData[index].result[1] / BigInt(Math.pow(10, token.decimals)) + - rewardData[index].result[0] / BigInt(Math.pow(10, token.decimals))); - tokenData.rewards_clan = clanwin / Math.pow(10, token.decimals);; - tokenData.rewards_staking = Number(rewardData[index].result[0] / BigInt(Math.pow(10, token.decimals))); - tokenData.rewards_sacrifice = sacrificeRewards / Math.pow(10, token.decimals); + let clanwin = 0; + if (this.activeRound !== this.currentRound) { + clanwin = (Number(coefficent) / 10000 - 1) * sacrificeClanReward; + console.log("clanwin", clanwin); + } + const sacrificeRewards = Number(sacrificeClanReward) - clanwin; - rewards_clan = rewards_clan + tokenData.rewards_clan; + tokenData.rewards_ges = Number( + rewardData[index].result[1] / BigInt(Math.pow(10, token.decimals)) + + rewardData[index].result[0] / BigInt(Math.pow(10, token.decimals)) + ); + + tokenData.rewards_clan = clanwin / Math.pow(10, token.decimals); + + tokenData.rewards_staking = Number( + rewardData[index].result[0] / BigInt(Math.pow(10, token.decimals)) + ); + tokenData.rewards_sacrifice = sacrificeRewards / Math.pow(10, token.decimals); + + rewards_clan = rewards_clan + tokenData.rewards_clan; rewards_sacrifice = rewards_sacrifice + tokenData.rewards_sacrifice; rewards_staking = rewards_staking + tokenData.rewards_staking; } + + tokenArray.push(tokenData); - } - console.log("clanwin123", rewards_clan); - const goalInBLD = await memeBurnerStore.getGoalInBLOOD(roundNumber); + } + console.log("clanwin123", rewards_clan); + const goalInBLD = await memeBurnerStore.getGoalInBLOOD(roundNumber); this.rounds[roundNumber] = { goal: Number(goal[0]) / Math.pow(10, tokenStore.memeToken.decimals), goalInBLD: Number(goalInBLD / BigInt(Math.pow(10, tokenStore.memeToken.decimals))), - expirationTimestamp: Number(goal[1]), + expirationTimestamp: Number(goal[2]), rewards_clan: Number(rewards_clan), rewards_staking: Number(rewards_staking), rewards_sacrifice: Number(rewards_sacrifice), diff --git a/src/stores/walletV2.js b/src/stores/walletV2.js index 5f39a30..90981c2 100644 --- a/src/stores/walletV2.js +++ b/src/stores/walletV2.js @@ -146,13 +146,9 @@ export const useWalletStoreV2 = defineStore("walletV2", { await this.getTokenBalances(); //MemeToken Staked const tokenStore = useTokenStore(); - console.log("tokenStore.memeToken.decimals", tokenStore.memeToken.decimals); const staked = await rewardlockerStore.getStaked(this.address); - console.log("staked", staked); - console.log("ztrsdz", staked / BigInt(Math.pow(10, tokenStore.memeToken.decimals))); this.memeToken.staked = Number(staked / BigInt(Math.pow(10, tokenStore.memeToken.decimals))); const unclaimedRewardsArray = await rewardlockerStore.getTotalRewards(this.address); - console.log("unclaimedRewardsArray", unclaimedRewardsArray); const unclaimedRewards = unclaimedRewardsArray[0] + unclaimedRewardsArray[1]; this.memeToken.unclaimedRewards = Number(unclaimedRewards/ BigInt(Math.pow(10, tokenStore.memeToken.decimals))) diff --git a/src/views/CycleView.vue b/src/views/CycleView.vue index abb1ef8..41d431a 100644 --- a/src/views/CycleView.vue +++ b/src/views/CycleView.vue @@ -40,7 +40,7 @@ >
Clan Winner
-
+20% Clan Bonus
+
+25% Clan Bonus