init functions for the storage

This commit is contained in:
EmberSpirit
2023-07-16 15:11:39 +02:00
parent 56454bef89
commit cb85a47a94
21 changed files with 7823 additions and 368 deletions
+9
View File
@@ -10,6 +10,15 @@ export const useMultiCallStore = defineStore("multicall", {
}),
getters: {},
actions: {
async init() {
console.log("-----------init multicall-------------");
const walletStore = useWalletStore();
this.contract = new walletStore.web3.eth.Contract(
this.config.abi,
this.config.contractAddress
);
},
async aggregate(calls, parameters = {}) {
const callRequests = calls.map((call) => {
const callData = call.encodeABI();