Skip to content

Commit 66b053c

Browse files
authored
feat(explorer): interact system calls (#3718)
1 parent 3baa3fd commit 66b053c

15 files changed

Lines changed: 1053 additions & 375 deletions

File tree

.changeset/rude-zebras-laugh.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@latticexyz/explorer": patch
3+
---
4+
5+
The Interact tab now supports system functions. The functions can be searched by namespace, system name, or function name.

packages/explorer/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"@latticexyz/world": "workspace:*",
4848
"@monaco-editor/react": "^4.6.0",
4949
"@radix-ui/react-checkbox": "^1.1.1",
50+
"@radix-ui/react-collapsible": "^1.1.11",
5051
"@radix-ui/react-dialog": "^1.1.1",
5152
"@radix-ui/react-dropdown-menu": "^2.1.2",
5253
"@radix-ui/react-label": "^2.1.0",
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { AbiFunction } from "viem";
2+
3+
export function encodeFunctionArgs(values: string[], functionAbi: AbiFunction) {
4+
return values.map((value, index) => {
5+
const type = functionAbi.inputs[index]?.type;
6+
if (type === "tuple") return JSON.parse(value);
7+
if (type === "bool") return value === "true";
8+
return value;
9+
});
10+
}

packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/interact/FunctionField.tsx

Lines changed: 0 additions & 281 deletions
This file was deleted.

0 commit comments

Comments
 (0)