updated contracts + install metamask if not installed
This commit is contained in:
@@ -109,9 +109,7 @@ onMounted(async () => {
|
|||||||
const rewardLockerStore = useRewardLockerStore();
|
const rewardLockerStore = useRewardLockerStore();
|
||||||
const roundsStore = useRoundsStore();
|
const roundsStore = useRoundsStore();
|
||||||
const walletStore = useWalletStoreV2();
|
const walletStore = useWalletStoreV2();
|
||||||
console.log("walletStore.initialized", walletStore.initialized);
|
|
||||||
walletStore.initialized = true;
|
walletStore.initialized = true;
|
||||||
console.log("hier");
|
|
||||||
// await walletStore.init();
|
// await walletStore.init();
|
||||||
// await tokenStore.initV2();
|
// await tokenStore.initV2();
|
||||||
// await memeBurnerStore.init();
|
// await memeBurnerStore.init();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"contractName": "Bloodline",
|
"contractName": "Bloodline",
|
||||||
"contractAddress": "0x00E5DAd5dA0FC4Da0baB7f0D99E28C07d8A88ee4",
|
"contractAddress": "0xBd6bB82108D5F27E8A8f081723408bF26d665a8c",
|
||||||
"abi": [
|
"abi": [
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"contractName": "LiquidityOwner",
|
"contractName": "LiquidityOwner",
|
||||||
"contractAddress": "0x947f05D74ac7dA0Eb0CA88eF9b579D196B178BaE",
|
"contractAddress": "0xEb898F92F7db3bbF807513C847bfDeE846E1b5Ff",
|
||||||
"abi": [
|
"abi": [
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@@ -19,24 +19,79 @@
|
|||||||
"name": "_weth",
|
"name": "_weth",
|
||||||
"type": "address"
|
"type": "address"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"internalType": "address",
|
|
||||||
"name": "_nfPositionManager",
|
|
||||||
"type": "address"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"internalType": "address",
|
"internalType": "address",
|
||||||
"name": "_memeAltar",
|
"name": "_memeAltar",
|
||||||
"type": "address"
|
"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",
|
"internalType": "uint256",
|
||||||
"name": "_chunk",
|
"name": "amountWETH",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"stateMutability": "payable",
|
"name": "LiquidityProvided",
|
||||||
"type": "constructor"
|
"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": [
|
"inputs": [
|
||||||
@@ -62,69 +117,6 @@
|
|||||||
"stateMutability": "pure",
|
"stateMutability": "pure",
|
||||||
"type": "function"
|
"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": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
@@ -133,12 +125,17 @@
|
|||||||
"type": "int48"
|
"type": "int48"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"name": "allRangesLinkedList",
|
"name": "_positions",
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"internalType": "int48",
|
"internalType": "uint112",
|
||||||
"name": "",
|
"name": "providedETH",
|
||||||
"type": "int48"
|
"type": "uint112"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint112",
|
||||||
|
"name": "unprovidedETH",
|
||||||
|
"type": "uint112"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
@@ -157,45 +154,30 @@
|
|||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"inputs": [],
|
|
||||||
"name": "burn",
|
|
||||||
"outputs": [],
|
|
||||||
"stateMutability": "nonpayable",
|
|
||||||
"type": "function"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"inputs": [],
|
|
||||||
"name": "chunk",
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "",
|
|
||||||
"type": "uint256"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"stateMutability": "view",
|
|
||||||
"type": "function"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
"internalType": "uint256[]",
|
"internalType": "int24",
|
||||||
"name": "liquidityTokenIds",
|
"name": "tickLower",
|
||||||
"type": "uint256[]"
|
"type": "int24"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int24",
|
||||||
|
"name": "tickUpper",
|
||||||
|
"type": "int24"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"name": "collectDeveloperFees",
|
"name": "collectDeveloperFees",
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint128",
|
||||||
"name": "amount0",
|
"name": "wethAmount",
|
||||||
"type": "uint256"
|
"type": "uint128"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint128",
|
||||||
"name": "amount1",
|
"name": "bloodlineAmount",
|
||||||
"type": "uint256"
|
"type": "uint128"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"stateMutability": "nonpayable",
|
"stateMutability": "nonpayable",
|
||||||
@@ -206,79 +188,14 @@
|
|||||||
"name": "collectedEthTotal",
|
"name": "collectedEthTotal",
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint112",
|
||||||
"name": "",
|
"name": "",
|
||||||
"type": "uint256"
|
"type": "uint112"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
"type": "function"
|
"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": [],
|
"inputs": [],
|
||||||
"name": "memeAltar",
|
"name": "memeAltar",
|
||||||
@@ -292,96 +209,15 @@
|
|||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
"type": "function"
|
"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": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "developerFee",
|
"name": "developerFee",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
},
|
|
||||||
{
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "amountOfETHToPaySender",
|
|
||||||
"type": "uint256"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"name": "payDeveloperFeeAndForGas",
|
"name": "payDeveloperFee",
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"stateMutability": "nonpayable",
|
"stateMutability": "nonpayable",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
@@ -405,15 +241,33 @@
|
|||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [],
|
||||||
|
"name": "pool",
|
||||||
|
"outputs": [
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "contract IUniswapV3Pool",
|
||||||
"name": "",
|
"name": "",
|
||||||
"type": "uint256"
|
"type": "address"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"name": "positions",
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "previousBLDTotalSupply",
|
||||||
"outputs": [
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint128",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint128"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
{
|
{
|
||||||
"internalType": "int24",
|
"internalType": "int24",
|
||||||
"name": "tickLower",
|
"name": "tickLower",
|
||||||
@@ -423,29 +277,37 @@
|
|||||||
"internalType": "int24",
|
"internalType": "int24",
|
||||||
"name": "tickUpper",
|
"name": "tickUpper",
|
||||||
"type": "int24"
|
"type": "int24"
|
||||||
},
|
|
||||||
{
|
|
||||||
"internalType": "uint128",
|
|
||||||
"name": "liquidity",
|
|
||||||
"type": "uint128"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"internalType": "uint80",
|
|
||||||
"name": "tokenId",
|
|
||||||
"type": "uint80"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"stateMutability": "view",
|
"name": "provideUnprovidedLiquidity",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"inputs": [],
|
"inputs": [
|
||||||
"name": "rebalance",
|
{
|
||||||
|
"internalType": "int24",
|
||||||
|
"name": "tickLower",
|
||||||
|
"type": "int24"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int24",
|
||||||
|
"name": "tickUpper",
|
||||||
|
"type": "int24"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "rageQuit",
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint128",
|
||||||
"name": "tokenId",
|
"name": "wethAmount",
|
||||||
"type": "uint256"
|
"type": "uint128"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint128",
|
||||||
|
"name": "bloodlineAmount",
|
||||||
|
"type": "uint128"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"stateMutability": "nonpayable",
|
"stateMutability": "nonpayable",
|
||||||
@@ -454,28 +316,9 @@
|
|||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint112",
|
||||||
"name": "",
|
|
||||||
"type": "uint256"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"name": "tokenIds",
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "",
|
|
||||||
"type": "uint256"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"stateMutability": "view",
|
|
||||||
"type": "function"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "collectedEthInRound",
|
"name": "collectedEthInRound",
|
||||||
"type": "uint256"
|
"type": "uint112"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"name": "triggerRoundCompleted",
|
"name": "triggerRoundCompleted",
|
||||||
@@ -489,38 +332,25 @@
|
|||||||
"stateMutability": "nonpayable",
|
"stateMutability": "nonpayable",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"inputs": [],
|
|
||||||
"name": "uniV3Pool",
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"internalType": "address",
|
|
||||||
"name": "",
|
|
||||||
"type": "address"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"stateMutability": "view",
|
|
||||||
"type": "function"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
"internalType": "int256",
|
"internalType": "uint256",
|
||||||
"name": "amount0Delta",
|
"name": "amount0Owed",
|
||||||
"type": "int256"
|
"type": "uint256"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "int256",
|
"internalType": "uint256",
|
||||||
"name": "amount1Delta",
|
"name": "amount1Owed",
|
||||||
"type": "int256"
|
"type": "uint256"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "bytes",
|
"internalType": "bytes",
|
||||||
"name": "_data",
|
"name": "",
|
||||||
"type": "bytes"
|
"type": "bytes"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"name": "uniswapV3SwapCallback",
|
"name": "uniswapV3MintCallback",
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"stateMutability": "nonpayable",
|
"stateMutability": "nonpayable",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
@@ -537,17 +367,6 @@
|
|||||||
],
|
],
|
||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
|
||||||
{
|
|
||||||
"inputs": [],
|
|
||||||
"name": "withdrawETH",
|
|
||||||
"outputs": [],
|
|
||||||
"stateMutability": "nonpayable",
|
|
||||||
"type": "function"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"stateMutability": "payable",
|
|
||||||
"type": "receive"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"contractName": "MemeAltar",
|
"contractName": "MemeAltar",
|
||||||
"contractAddress": "0x9842954639aF0c1d7A692222955868806287aeEA",
|
"contractAddress": "0x9fA80C0A942016A0a246402e97d30562CF93f5AE",
|
||||||
"abi": [
|
"abi": [
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@@ -484,6 +484,11 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "amountETHBase",
|
"name": "amountETHBase",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amountETHForSelling",
|
||||||
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
@@ -495,11 +500,6 @@
|
|||||||
"internalType": "address",
|
"internalType": "address",
|
||||||
"name": "memeToSacrifice",
|
"name": "memeToSacrifice",
|
||||||
"type": "address"
|
"type": "address"
|
||||||
},
|
|
||||||
{
|
|
||||||
"internalType": "bool",
|
|
||||||
"name": "buyFunc",
|
|
||||||
"type": "bool"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"name": "getAmountToReachGoal",
|
"name": "getAmountToReachGoal",
|
||||||
@@ -549,7 +549,12 @@
|
|||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "",
|
"name": "rewardCurrentCycle",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "rewardNextCycle",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"contractName": "RewardLocker",
|
"contractName": "RewardLocker",
|
||||||
"contractAddress": "0xc9f5F78320D0f75099eEA8f8F6FD35BF246f0916",
|
"contractAddress": "0xC21568120adc35AB0aA7460A4A5E1C3D4f845269",
|
||||||
"abi": [
|
"abi": [
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@@ -551,14 +551,14 @@
|
|||||||
"name": "rounds",
|
"name": "rounds",
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint32",
|
||||||
"name": "roundCompletedTimestamp",
|
"name": "roundCompletedTimestamp",
|
||||||
"type": "uint256"
|
"type": "uint32"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint224",
|
||||||
"name": "totalSacrificeCompetitionRewards",
|
"name": "totalSacrificeCompetitionRewards",
|
||||||
"type": "uint256"
|
"type": "uint224"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -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"}]
|
||||||
|
|||||||
@@ -11,7 +11,14 @@
|
|||||||
<div class="connector-icon">
|
<div class="connector-icon">
|
||||||
<img :src="`/assets/img/connectors/${connector.id}.svg`" :alt="`${connector.name} Logo`" />
|
<img :src="`/assets/img/connectors/${connector.id}.svg`" :alt="`${connector.name} Logo`" />
|
||||||
</div>
|
</div>
|
||||||
<div class="connector-name">{{ connector.name }}</div>
|
<div class="connector-name">
|
||||||
|
<template
|
||||||
|
v-if="connector.id !== 'metaMask' || (connector.id === 'metaMask' && isMetaMaskInstalled())"
|
||||||
|
>
|
||||||
|
{{ connector.name }}
|
||||||
|
</template>
|
||||||
|
<template v-else> Install {{ connector.name }} </template>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>Are you coming from Binance, Bybit, Kucoin or any other crypto exchange?</div>
|
<div>Are you coming from Binance, Bybit, Kucoin or any other crypto exchange?</div>
|
||||||
@@ -82,8 +89,8 @@ const fromAddress = ref(null);
|
|||||||
|
|
||||||
const accountSub = ref(null);
|
const accountSub = ref(null);
|
||||||
|
|
||||||
|
const metaMaskInstalled = ref(false);
|
||||||
const instance = getCurrentInstance();
|
const instance = getCurrentInstance();
|
||||||
|
|
||||||
async function disconnectWallet() {
|
async function disconnectWallet() {
|
||||||
console.log("disconnectWallet");
|
console.log("disconnectWallet");
|
||||||
try {
|
try {
|
||||||
@@ -96,6 +103,15 @@ async function disconnectWallet() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isMetaMaskInstalled() {
|
||||||
|
//metamask is not installed but showing true, is that a bug?
|
||||||
|
if (typeof window.ethereum !== "undefined" && window.ethereum?.isMetaMask && !window.ethereum.isBraveWallet) {
|
||||||
|
console.log("MetaMask is installed!", window.ethereum);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
function badgeClick(token) {
|
function badgeClick(token) {
|
||||||
var tokenData = tokenStore.getToken(token.contractAddress);
|
var tokenData = tokenStore.getToken(token.contractAddress);
|
||||||
tokenStore.activeToken = tokenData;
|
tokenStore.activeToken = tokenData;
|
||||||
@@ -113,9 +129,17 @@ function badgeClick(token) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function connectWallet(connector) {
|
async function connectWallet(connector) {
|
||||||
|
if (connector.id === "metaMask" && !isMetaMaskInstalled()) {
|
||||||
|
window.open(" https://metamask.io/", "_blank");
|
||||||
|
return;
|
||||||
|
}
|
||||||
instance.parent.emit("update:modelValue", false);
|
instance.parent.emit("update:modelValue", false);
|
||||||
await walletStore.connectWallet(toRaw(connector));
|
await walletStore.connectWallet(toRaw(connector));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
console.log("window.ethereum", window.ethereum);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="sass">
|
<style lang="sass">
|
||||||
|
|||||||
@@ -113,7 +113,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sacrifice-buttons-function-wrapper">
|
<div class="sacrifice-buttons-function-wrapper">
|
||||||
{{ stateComputed }}
|
|
||||||
<template v-if="walletStore.connected">
|
<template v-if="walletStore.connected">
|
||||||
<div class="btn btn-immortal sub-header" disabled v-if="stateComputed === 0">Enter Amount</div>
|
<div class="btn btn-immortal sub-header" disabled v-if="stateComputed === 0">Enter Amount</div>
|
||||||
<div
|
<div
|
||||||
@@ -341,29 +340,6 @@ async function getRewardsFor(value) {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
let variant = null;
|
let variant = null;
|
||||||
let newOutput = 0;
|
let newOutput = 0;
|
||||||
// if (activeToken.value.allowance >= value) {
|
|
||||||
// const amountDecimal = BigInt(value * Math.pow(10, tokenStore.activeToken.decimals));
|
|
||||||
|
|
||||||
// const hash = await readContract({
|
|
||||||
// address: memeburnerStore.contract.address,
|
|
||||||
// abi: memeburnerStore.contract.abi,
|
|
||||||
// functionName: "sacrificeMeme",
|
|
||||||
// args: [tokenStore.activeToken.contractAddress, amountDecimal.toString(), 0],
|
|
||||||
// account: walletStore.address,
|
|
||||||
// });
|
|
||||||
// console.log("hash", hash);
|
|
||||||
// // var hash = await memeburnerStore.contract.simulate.sacrificeMeme([
|
|
||||||
// // tokenStore.activeToken.contractAddress,
|
|
||||||
// // amountDecimal.toString(),
|
|
||||||
// // 0,
|
|
||||||
// // ]);
|
|
||||||
// // console.log("hash", hash);
|
|
||||||
// // state.value = 3;
|
|
||||||
// // const data = await waitForTransaction({
|
|
||||||
// // hash: hash,
|
|
||||||
// // });
|
|
||||||
// // console.log("datahash", data);
|
|
||||||
// }
|
|
||||||
try {
|
try {
|
||||||
if (!value || isNaN(value)) {
|
if (!value || isNaN(value)) {
|
||||||
output.value = 0;
|
output.value = 0;
|
||||||
@@ -373,12 +349,13 @@ async function getRewardsFor(value) {
|
|||||||
const rewardsForResult = await memeburnerStore.getRewardFor(
|
const rewardsForResult = await memeburnerStore.getRewardFor(
|
||||||
BigInt(value * Math.pow(10, activeToken.value.decimals))
|
BigInt(value * Math.pow(10, activeToken.value.decimals))
|
||||||
);
|
);
|
||||||
const rewardsForResultNumber = Number(rewardsForResult) / Math.pow(10, tokenStore.activeToken.decimals);
|
console.log("rewardsForResult", rewardsForResult);
|
||||||
|
const rewardsForResultNumber = Number(rewardsForResult[0]) / Math.pow(10, tokenStore.activeToken.decimals);
|
||||||
|
|
||||||
var quoteRewards = await uniswapStore.quoteExactInputSingle(
|
var quoteRewards = await uniswapStore.quoteExactInputSingle(
|
||||||
tokenNumber.value * Math.pow(10, tokenStore.activeToken.decimals)
|
tokenNumber.value * Math.pow(10, tokenStore.activeToken.decimals)
|
||||||
);
|
);
|
||||||
|
console.log("quoteRewards", quoteRewards);
|
||||||
let variant = "sacrifice";
|
let variant = "sacrifice";
|
||||||
if (quoteRewards.result) {
|
if (quoteRewards.result) {
|
||||||
console.log("quoteRewards", quoteRewards);
|
console.log("quoteRewards", quoteRewards);
|
||||||
@@ -444,49 +421,6 @@ async function getRewardsFor(value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (!walletStore.connected && variant === "sacrifice") {
|
|
||||||
// newOutput = rewardsForResultNumber;
|
|
||||||
// } else if (!walletStore.connected && variant === "buy") {
|
|
||||||
// newOutput = rewardsForResultNumber;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!walletStore.connected || (walletStore.connected && activeToken.value.allowance < tokenNumber.value)) {
|
|
||||||
// //case 1
|
|
||||||
// // user is not logged in or Allowance is less than Input, then I show getRewardsForSacrifice Value
|
|
||||||
|
|
||||||
// newOutput = rewardsForResultNumber;
|
|
||||||
// variant = "sacrifice";
|
|
||||||
// } else {
|
|
||||||
// const rewardsForResult = await memeburnerStore.getRewardFor(
|
|
||||||
// BigInt(value * Math.pow(10, activeToken.value.decimals))
|
|
||||||
// );
|
|
||||||
// console.log(
|
|
||||||
// "tokenNumber.value * Math.pow(10, tokenStore.activeToken.decimals)",
|
|
||||||
// tokenNumber.value * Math.pow(10, tokenStore.activeToken.decimals)
|
|
||||||
// );
|
|
||||||
// console.log("tokenNumber.value", tokenNumber.value);
|
|
||||||
// var quoteRewards = await uniswapStore.quoteExactInputSingle(
|
|
||||||
// tokenNumber.value * Math.pow(10, tokenStore.activeToken.decimals)
|
|
||||||
// );
|
|
||||||
// console.log("quoteRewards", quoteRewards);
|
|
||||||
// const rewardsForResultNumber = Number(rewardsForResult[0]) / Math.pow(10, tokenStore.activeToken.decimals);
|
|
||||||
// console.log("rewardsForResultNumber", rewardsForResultNumber);
|
|
||||||
// const quoteRewardsNumber = Number(quoteRewards) / Math.pow(10, tokenStore.activeToken.decimals);
|
|
||||||
// console.log("quoteRewardsNumber", quoteRewardsNumber);
|
|
||||||
// if (quoteRewardsNumber * 0.995 > rewardsForResultNumber) {
|
|
||||||
// //sacrificememe
|
|
||||||
// newOutput = quoteRewardsNumber;
|
|
||||||
// variant = "buy";
|
|
||||||
// // const hash = await memeburnerStore.sacrificeMeme(tokenNumber.value);
|
|
||||||
// } else {
|
|
||||||
// newOutput = rewardsForResultNumber;
|
|
||||||
// variant = "sacrifice";
|
|
||||||
// //sacrificeMemeAndBuyBLOOD
|
|
||||||
// // const hash = await memeburnerStore.sacrificeMeme(tokenNumber.value);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// console.log("variant", variant);
|
|
||||||
// tokenStore.activeToken.rewards = newOutput;
|
|
||||||
output.value = newOutput;
|
output.value = newOutput;
|
||||||
return { ouput: newOutput, variant: variant };
|
return { ouput: newOutput, variant: variant };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
+2
-1
@@ -18,7 +18,6 @@ import {
|
|||||||
getContract,
|
getContract,
|
||||||
connect,
|
connect,
|
||||||
disconnect,
|
disconnect,
|
||||||
InjectedConnector,
|
|
||||||
watchAccount,
|
watchAccount,
|
||||||
watchWalletClient,
|
watchWalletClient,
|
||||||
watchPublicClient,
|
watchPublicClient,
|
||||||
@@ -31,6 +30,7 @@ import {
|
|||||||
import { WalletConnectConnector } from "@wagmi/core/connectors/walletConnect";
|
import { WalletConnectConnector } from "@wagmi/core/connectors/walletConnect";
|
||||||
import { MetaMaskConnector } from "@wagmi/core/connectors/metaMask";
|
import { MetaMaskConnector } from "@wagmi/core/connectors/metaMask";
|
||||||
import { CoinbaseWalletConnector } from "@wagmi/core/connectors/coinbaseWallet";
|
import { CoinbaseWalletConnector } from "@wagmi/core/connectors/coinbaseWallet";
|
||||||
|
import { InjectedConnector } from "@wagmi/core/connectors/injected";
|
||||||
|
|
||||||
import { goerli, mainnet } from "@wagmi/core/chains";
|
import { goerli, mainnet } from "@wagmi/core/chains";
|
||||||
import { publicProvider } from "@wagmi/core/providers/public";
|
import { publicProvider } from "@wagmi/core/providers/public";
|
||||||
@@ -115,6 +115,7 @@ try {
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
new MetaMaskConnector({ chains }),
|
new MetaMaskConnector({ chains }),
|
||||||
|
// new InjectedConnector({ chains }),
|
||||||
new WalletConnectConnector({
|
new WalletConnectConnector({
|
||||||
chains,
|
chains,
|
||||||
options: {
|
options: {
|
||||||
|
|||||||
Reference in New Issue
Block a user