Skip to content

Commit c279ecd

Browse files
authored
Nik/upgrade to the new grc-20 and new testnet (#583)
1 parent 22f24b0 commit c279ecd

38 files changed

+329
-361
lines changed

.claude/settings.local.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@
88
"Bash(pnpm test:*)",
99
"Bash(pnpm vitest:*)",
1010
"Bash(pnpm changeset:*)",
11-
"Bash(npx tsc:*)"
11+
"Bash(npx tsc:*)",
12+
"Bash(find:*)",
13+
"Bash(grep:*)",
14+
"WebFetch(domain:raw.githubusercontent.com)",
15+
"Bash(node -e:*)",
16+
"Bash(pnpm build:*)",
17+
"mcp__chrome-devtools__list_pages",
18+
"Bash(pnpm lint:*)"
1219
],
1320
"deny": [],
1421
"ask": []

apps/connect/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"dependencies": {
1717
"@base-ui-components/react": "1.0.0-beta.2",
18-
"@graphprotocol/grc-20": "^0.27.0",
18+
"@graphprotocol/grc-20": "^0.32.3",
1919
"@graphprotocol/hypergraph": "workspace:*",
2020
"@graphprotocol/hypergraph-react": "workspace:*",
2121
"@heroicons/react": "^2.2.0",

apps/events/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"test:script": "tsx test-script.ts"
1111
},
1212
"dependencies": {
13-
"@graphprotocol/grc-20": "^0.27.0",
13+
"@graphprotocol/grc-20": "^0.32.3",
1414
"@graphprotocol/hypergraph": "workspace:*",
1515
"@graphprotocol/hypergraph-react": "workspace:*",
1616
"@noble/hashes": "^1.8.0",

apps/events/src/Boot.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function Boot() {
1717
<HypergraphAppProvider
1818
syncServerUri="http://localhost:3030"
1919
appId="93bb8907085a4a0e83dd62b0dc98e793"
20-
apiOrigin="https://testnet-api.geobrowser.io"
20+
apiOrigin="https://testnet-api-staging.geobrowser.io"
2121
>
2222
<RouterProvider router={router} />
2323
</HypergraphAppProvider>

apps/events/src/components/create-events.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Graph, type Op } from '@graphprotocol/grc-20';
1+
import { Graph, type GrcOp } from '@graphprotocol/grc-20';
22
import type { Connect } from '@graphprotocol/hypergraph';
33
import { publishOps, useHypergraphApp } from '@graphprotocol/hypergraph-react';
44
import { mapping } from '../mapping';
@@ -12,15 +12,16 @@ const createEvents = async ({
1212
space: string;
1313
}) => {
1414
try {
15-
const ops: Array<Op> = [];
15+
const ops: Array<GrcOp> = [];
1616

1717
const { id: jobOfferTypeId, ops: createJobOfferTypeOps } = Graph.createEntity({
1818
name: 'My Test Job Offer',
1919
types: mapping.JobOffer.typeIds,
2020
values: [
2121
{
2222
property: mapping.JobOffer.properties?.salary as string,
23-
value: '80000',
23+
type: 'float64',
24+
value: 80000,
2425
},
2526
],
2627
});
@@ -32,7 +33,8 @@ const createEvents = async ({
3233
values: [
3334
{
3435
property: mapping.JobOffer.properties?.salary as string,
35-
value: '90000',
36+
type: 'float64',
37+
value: 90000,
3638
},
3739
],
3840
});

apps/events/src/components/create-properties-and-types-event.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Graph, type Op } from '@graphprotocol/grc-20';
1+
import { Graph, type GrcOp } from '@graphprotocol/grc-20';
22
import type { Connect } from '@graphprotocol/hypergraph';
33
import { publishOps, useHypergraphApp } from '@graphprotocol/hypergraph-react';
44
import { useState } from 'react';
@@ -12,9 +12,9 @@ const createPropertiesAndTypesEvent = async ({
1212
smartSessionClient: Connect.SmartSessionClient;
1313
space: string;
1414
}) => {
15-
const ops: Array<Op> = [];
15+
const ops: Array<GrcOp> = [];
1616
const { id: salaryPropertyId, ops: createSalaryPropertyOps } = Graph.createProperty({
17-
dataType: 'NUMBER',
17+
dataType: 'FLOAT64',
1818
name: 'Salary',
1919
});
2020
ops.push(...createSalaryPropertyOps);

apps/events/src/components/create-properties-and-types-todos.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Graph, type Op } from '@graphprotocol/grc-20';
1+
import { Graph, type GrcOp } from '@graphprotocol/grc-20';
22
import type { Connect } from '@graphprotocol/hypergraph';
33
import { publishOps, useHypergraphApp } from '@graphprotocol/hypergraph-react';
44
import { useState } from 'react';
@@ -12,7 +12,7 @@ const createPropertiesAndTypesTodos = async ({
1212
smartSessionClient: Connect.SmartSessionClient;
1313
space: string;
1414
}) => {
15-
const ops: Array<Op> = [];
15+
const ops: Array<GrcOp> = [];
1616
const { id: checkedPropertyId, ops: createCheckedPropertyOps } = Graph.createProperty({
1717
dataType: 'BOOLEAN',
1818
name: 'Checked',
@@ -44,13 +44,13 @@ const createPropertiesAndTypesTodos = async ({
4444
ops.push(...createPointPropertyOps);
4545

4646
const { id: amountPropertyId, ops: createAmountPropertyOps } = Graph.createProperty({
47-
dataType: 'NUMBER',
47+
dataType: 'FLOAT64',
4848
name: 'Amount',
4949
});
5050
ops.push(...createAmountPropertyOps);
5151

5252
const { id: websitePropertyId, ops: createWebsitePropertyOps } = Graph.createProperty({
53-
dataType: 'STRING',
53+
dataType: 'TEXT',
5454
name: 'Website',
5555
});
5656
ops.push(...createWebsitePropertyOps);

apps/events/src/routes/podcasts.lazy.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Person, PersonHostTest, Podcast, Topic } from '@/schema';
21
import { useEntities, useEntity, usePublicSpaces } from '@graphprotocol/hypergraph-react';
32
import { createLazyFileRoute } from '@tanstack/react-router';
3+
import { Person, PersonHostTest, Podcast, Topic } from '@/schema';
44

55
export const Route = createLazyFileRoute('/podcasts')({
66
component: RouteComponent,

apps/events/test-script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { SystemIds } from '@graphprotocol/grc-20';
22
import { Config, Entity, Id, Type } from '@graphprotocol/hypergraph';
33

4-
Config.setApiOrigin('https://testnet-api.geobrowser.io');
4+
Config.setApiOrigin('https://testnet-api-staging.geobrowser.io');
55

66
const BOUNTY_TYPE_ID = Id('327976dea5ad45769b83b7e7ec6337cf');
77
const REWARD_PROPERTY_ID = Id('e8e7301136354e84b46b767e7cd530a8');

apps/next-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"type": "module",
1313
"dependencies": {
14-
"@graphprotocol/grc-20": "^0.27.0",
14+
"@graphprotocol/grc-20": "^0.32.3",
1515
"@graphprotocol/hypergraph": "workspace:*",
1616
"@graphprotocol/hypergraph-react": "workspace:*",
1717
"next": "15.5.9",

0 commit comments

Comments
 (0)