Open holic opened 1 year ago
For me the ideal API is:
batchCall([
{
resource: { type: "system", namespace: "", name: "RegisterSystem" },
functionName: "register",
args: [match]
},
{
resource: { type: "system", namespace: "", name: "NameSystem" },
functionName: "setName",
args: [name]
},
]);
done here: https://github.com/latticexyz/mud/pull/1745
edit: nevermind, these helpers are just for single system calls, not batch calls
@holic They are for batch calls! https://github.com/latticexyz/skystrife-public/blob/main/packages/client/src/app/amalgema-ui/SummonIsland/Footer.tsx#L79-L97
The encodeSystemCalls
name is somewhat misleading, should maybe be encodeBatchCall
there's several places in #1611 that I avoided wiring up
batchCall
because it was trickier to useit would be nice if we had a typed helper for
batchCall
that would take in a list of abi-typed calls (likewriteContract
) and execute them throughbatchCall