start implementing frontend design

This commit is contained in:
Michel Fromme
2023-06-18 10:48:50 +02:00
parent 89f47b3692
commit db41b03456
27 changed files with 997 additions and 346 deletions
+22 -3
View File
@@ -2,13 +2,34 @@
import { onMounted } from "vue";
import { storeToRefs } from "pinia";
import Web3 from "web3";
import Navbar from "./components/Navbar.vue";
import { useWalletStore } from "@/stores/wallet";
const walletStore = useWalletStore();
import { useTokenStore } from "@/stores/tokens";
import { useContractStore } from "@/stores/contracts";
const tokenStore = useTokenStore();
const contractStore = useContractStore();
const { memeBurner } = storeToRefs(tokenStore);
const { list } = storeToRefs(contractStore);
onMounted(async () => {
var test = await walletStore.isConnected();
console.log("test", test);
let web3 = new Web3("https://eth-goerli.g.alchemy.com/v2/0-W9tOm6v_QP1PfRV8RuBCpWr-qoEbkN");
const contract = new web3.eth.Contract(memeBurner.value.config.abi, memeBurner.value.config.contractAddress);
list.value.memeBurnerPublic = new web3.eth.Contract(
memeBurner.value.config.abi,
memeBurner.value.config.contractAddress
);
console.log("list", list.value);
const currentRound = await contract.methods.currentRound().call();
const rounds = await contract.methods.rounds("0x0e349D42C125acA39ea58024FFC23ED0fE5feE32").call();
console.log("currentRound", currentRound);
console.log("rounds", rounds);
});
</script>
@@ -19,6 +40,4 @@ onMounted(async () => {
</div>
</template>
<style lang="sass">
.main
</style>
<style lang="sass"></style>