Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/templates/next-export-ui/src/lib/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ export function fnListIds(collectionName: string): string {
}

export function fnGet(collectionName: string): string {
// The generated contract overloads getC(uint256,bool) and getC(uint256).
// Use the full signature to disambiguate for viem encoding/decoding.
return `get${collectionName}(uint256)`;
// viem expects the function name (not full signature) and resolves overloads from args.
return `get${collectionName}`;
}

export function fnCreate(collectionName: string): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ async function assertRoute200(baseUrl, route) {
const u = `${baseUrl}${route}`;
const out = await fetchOrThrow(u);
assert.equal(out.status, 200, `Expected ${u} to return 200, got ${out.status}`);
assert.equal(
out.text.includes('not found on ABI'),
false,
`Route ${u} rendered an ABI lookup error. Check generated UI function names vs ABI overload handling.`
);
}

async function runLiveChecks(root, baseUrl, ths) {
Expand Down
Loading