Skip to content

Commit 7fd242e

Browse files
karooolisfrolic
andauthored
chore(explorer): append base world ABI to API endpoint (#3653)
Co-authored-by: Kevin Ingersoll <kingersoll@gmail.com>
1 parent 13071c4 commit 7fd242e

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

‎.changeset/eleven-crabs-jump.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+
World ABI endpoint is now includes the base world ABI.

‎packages/explorer/src/app/(explorer)/api/world-abi/route.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { fetchBlockLogs } from "@latticexyz/block-logs-stream";
55
import { helloStoreEvent } from "@latticexyz/store";
66
import { getWorldAbi } from "@latticexyz/store-sync/world";
77
import { helloWorldEvent } from "@latticexyz/world";
8+
import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorld.abi.json";
89
import { supportedChainId, validateChainId } from "../../../../common";
910
import { getClient } from "../utils/getClient";
1011
import { getIndexerUrl } from "../utils/getIndexerUrl";
@@ -59,13 +60,14 @@ export async function GET(req: Request) {
5960
}
6061

6162
const { fromBlock, toBlock, isWorldDeployed } = await getParameters(chainId, worldAddress);
62-
const abi = await getWorldAbi({
63+
const worldAbi = await getWorldAbi({
6364
client,
6465
worldAddress,
6566
fromBlock,
6667
toBlock,
6768
chainId,
6869
});
70+
const abi = [...IBaseWorldAbi, ...worldAbi];
6971

7072
return Response.json({ abi, isWorldDeployed });
7173
} catch (error: unknown) {

0 commit comments

Comments
 (0)