rounds implemented + over all improvements
This commit is contained in:
+21
-1
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<button @click="mintToken">mint</button>
|
||||
<button @click="mintToken2">mint2</button>
|
||||
<button @click="sacrificeMeme">sacrifice Meme</button>
|
||||
<button @click="approveMeme1">approve Meme1</button>
|
||||
<button @click="tokenStore.approveToken(MemeBurnerJson, 10)">wallet approve</button>
|
||||
@@ -30,6 +31,7 @@ console.log("RewardLockerJson", RewardLockerJson);
|
||||
// );
|
||||
// console.log("balanceOf", balanceOf);
|
||||
const web3 = ref(null);
|
||||
const contractMeme2 = ref(null);
|
||||
const contractMeme1 = ref(null);
|
||||
const contractBurner = ref(null);
|
||||
|
||||
@@ -42,6 +44,7 @@ onMounted(async () => {
|
||||
web3.value.eth.Contract.defaultAccount = accounts[0];
|
||||
|
||||
contractMeme1.value = new web3.value.eth.Contract(Meme1Json.abi, Meme1Json.contractAddress);
|
||||
contractMeme2.value = new web3.value.eth.Contract(Meme2Json.abi, Meme2Json.contractAddress);
|
||||
contractBurner.value = new web3.value.eth.Contract(MemeBurnerJson.abi, MemeBurnerJson.contractAddress);
|
||||
});
|
||||
|
||||
@@ -59,7 +62,24 @@ async function approveMeme1() {
|
||||
|
||||
async function mintToken() {
|
||||
try {
|
||||
var mint = await contractMeme1.value.methods.mint(10).send({ from: web3.value.eth.Contract.defaultAccount });
|
||||
var mint = await contractMeme1.value.methods
|
||||
.mint("100000000000000000000000")
|
||||
.send({ from: web3.value.eth.Contract.defaultAccount });
|
||||
console.log("mint", mint);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
// var balanceOf = await contract.methods.balanceOf("0x66422602B2f4885c57EE794174f98d9E4DDBBBC6").call();
|
||||
// console.log("balanceOf", balanceOf);
|
||||
// var totalSupply = await contract.methods.totalSupply().call();
|
||||
// console.log("totalSupply", totalSupply);
|
||||
}
|
||||
|
||||
async function mintToken2() {
|
||||
try {
|
||||
var mint = await contractMeme2.value.methods
|
||||
.mint("100000000000000000000")
|
||||
.send({ from: web3.value.eth.Contract.defaultAccount });
|
||||
console.log("mint", mint);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
||||
Reference in New Issue
Block a user