init functions for the storage
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user