Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(explorer): handle tuples in interact form #3464

Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update cold-clocks-shout.md
karooolis authored Jan 31, 2025
commit 0b2ba53b41e38f5ea9cc67426455cc31c39813c3
2 changes: 1 addition & 1 deletion .changeset/cold-clocks-shout.md
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@
"@latticexyz/explorer": patch
---

In the Interact tab, function input fields now display the enum name when available and indicate tuple argument types.
In the Interact tab, function input fields now display the tuple name when available and indicate tuple argument types.

Unchanged files with check annotations Beta

asNumberArray,
} from "../postgres/columnTypes";
export function buildColumn(name: string, schemaAbiType: SchemaAbiType) {

Check warning on line 15 in packages/store-sync/src/postgres-decoded/buildColumn.ts

GitHub Actions / Run lint

Missing return type on function
switch (schemaAbiType) {
case "bool":
return boolean(name);
import superjson from "superjson";
import { Address, ByteArray, bytesToHex, getAddress, Hex, hexToBytes } from "viem";
export const asJson = <TData>(name: string) =>

Check warning on line 5 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: TData; driverData: string }>({
dataType() {
// TODO: move to json column type? if we do, we'll prob wanna choose something other than superjson since it adds one level of depth (json/meta keys)
},
})(name);
export const asNumber = (name: string, columnType: string) =>

Check warning on line 19 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: number; driverData: string }>({
dataType() {
return columnType;
},
})(name);
export const asBigInt = (name: string, columnType: string) =>

Check warning on line 32 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: bigint; driverData: string }>({
dataType() {
return columnType;
},
})(name);
export const asHex = (name: string) =>

Check warning on line 45 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: Hex; driverData: ByteArray }>({
dataType() {
return "bytea";
},
})(name);
export const asAddress = (name: string) =>

Check warning on line 58 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: Address; driverData: ByteArray }>({
dataType() {
return "bytea";
},
})(name);
export const asBoolArray = (name: string) =>

Check warning on line 71 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: boolean[]; driverData: string[] }>({
dataType() {
return "bool[]";
},
})(name);
export const asNumberArray = (name: string, columnType: string) =>

Check warning on line 84 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: number[]; driverData: string[] }>({
dataType() {
return columnType;
},
})(name);
export const asBigIntArray = (name: string, columnType: string) =>

Check warning on line 97 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: bigint[]; driverData: string[] }>({
dataType() {
return columnType;
};
export function SyncProvider({ chainId, adapter, children, ...syncOptions }: Props) {
const existingValue = useContext(SyncContext);

Check warning on line 17 in packages/store-sync/src/react/SyncProvider.tsx

GitHub Actions / Run lint

Missing return type on function
if (existingValue != null) {
throw new Error("A `SyncProvider` cannot be nested inside another.");
}