Skip to content

Commit

Permalink
feat(app): self-hosted phala computation squid
Browse files Browse the repository at this point in the history
  • Loading branch information
kingsleydon committed Oct 7, 2023
1 parent e51a03e commit e3bd8ef
Show file tree
Hide file tree
Showing 9 changed files with 1,526 additions and 88 deletions.
4 changes: 2 additions & 2 deletions apps/analytics/src/lib/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export const phatSquidClient = new GraphQLClient(
)

export const phalaSquidClient = new GraphQLClient(
'https://squid.subsquid.io/phala-computation/graphql',
'https://subsquid.phala.network/phala-computation/graphql',
)

export const khalaSquidClient = new GraphQLClient(
'https://squid.subsquid.io/khala-computation/graphql',
'https://subsquid.phala.network/khala-computation/graphql',
)
1 change: 0 additions & 1 deletion apps/app/components/BasePool/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ const BasePoolList: FC<{
const [subsquidClient] = useAtom(subsquidClientAtom)
const {data, isLoading, fetchNextPage, hasNextPage} =
useInfiniteBasePoolsConnectionQuery(
'after',
subsquidClient,
{
first: 20,
Expand Down
1 change: 0 additions & 1 deletion apps/app/components/Delegation/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ const DelegationList: FC<{
const [subsquidClient] = useAtom(subsquidClientAtom)
const {data, isLoading, fetchNextPage, hasNextPage} =
useInfiniteDelegationsConnectionQuery(
'after',
subsquidClient,
{
first: 20,
Expand Down
4 changes: 2 additions & 2 deletions apps/app/components/TopBar/Chain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Property from '../Property'

const ChainSelect: FC = () => {
const api = usePolkadotApi()
const [chain, setChain] = useAtom(chainAtom)
const [chain] = useAtom(chainAtom)
const isKhala = chain === 'khala'

const color = `${isKhala ? '#03ffff' : colors.main[400]} !important`
Expand Down Expand Up @@ -64,7 +64,7 @@ const ChainSelect: FC = () => {
inputProps={{sx: {py: '6.5px'}}}
onChange={(e) => {
const nextValue = e.target.value as Chain
setChain(nextValue)
location.replace(`/${nextValue}`)
}}
>
{['khala', 'phala'].map((value) => (
Expand Down
2 changes: 1 addition & 1 deletion apps/app/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export const PHALA_ENDPOINTS = [
'wss://phala.api.onfinality.io/public-ws',
]
export const PHALA_SUBSQUID_URL =
'https://squid.subsquid.io/phala-computation/graphql'
'https://subsquid.phala.network/phala-computation/graphql'
export const phalaSubsquidClient = new GraphQLClient(PHALA_SUBSQUID_URL)
export const WPHA_ASSET_ID = 10000
784 changes: 748 additions & 36 deletions apps/app/lib/subsquidQuery.ts

Large diffs are not rendered by default.

758 changes: 743 additions & 15 deletions apps/app/lib/subsquidSdk.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@total-typescript/ts-reset": "^0.5.1",
"@types/node": "^18.17.19",
"husky": "^8.0.3",
"turbo": "^1.10.14",
"turbo": "latest",
"typescript": "^5.2.2"
},
"packageManager": "[email protected]"
Expand Down
58 changes: 29 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13985,7 +13985,7 @@ __metadata:
"@total-typescript/ts-reset": ^0.5.1
"@types/node": ^18.17.19
husky: ^8.0.3
turbo: ^1.10.14
turbo: latest
typescript: ^5.2.2
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -17600,58 +17600,58 @@ __metadata:
languageName: node
linkType: hard

"turbo-darwin-64@npm:1.10.14":
version: 1.10.14
resolution: "turbo-darwin-64@npm:1.10.14"
"turbo-darwin-64@npm:1.10.15":
version: 1.10.15
resolution: "turbo-darwin-64@npm:1.10.15"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard

"turbo-darwin-arm64@npm:1.10.14":
version: 1.10.14
resolution: "turbo-darwin-arm64@npm:1.10.14"
"turbo-darwin-arm64@npm:1.10.15":
version: 1.10.15
resolution: "turbo-darwin-arm64@npm:1.10.15"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard

"turbo-linux-64@npm:1.10.14":
version: 1.10.14
resolution: "turbo-linux-64@npm:1.10.14"
"turbo-linux-64@npm:1.10.15":
version: 1.10.15
resolution: "turbo-linux-64@npm:1.10.15"
conditions: os=linux & cpu=x64
languageName: node
linkType: hard

"turbo-linux-arm64@npm:1.10.14":
version: 1.10.14
resolution: "turbo-linux-arm64@npm:1.10.14"
"turbo-linux-arm64@npm:1.10.15":
version: 1.10.15
resolution: "turbo-linux-arm64@npm:1.10.15"
conditions: os=linux & cpu=arm64
languageName: node
linkType: hard

"turbo-windows-64@npm:1.10.14":
version: 1.10.14
resolution: "turbo-windows-64@npm:1.10.14"
"turbo-windows-64@npm:1.10.15":
version: 1.10.15
resolution: "turbo-windows-64@npm:1.10.15"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard

"turbo-windows-arm64@npm:1.10.14":
version: 1.10.14
resolution: "turbo-windows-arm64@npm:1.10.14"
"turbo-windows-arm64@npm:1.10.15":
version: 1.10.15
resolution: "turbo-windows-arm64@npm:1.10.15"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard

"turbo@npm:^1.10.14":
version: 1.10.14
resolution: "turbo@npm:1.10.14"
"turbo@npm:latest":
version: 1.10.15
resolution: "turbo@npm:1.10.15"
dependencies:
turbo-darwin-64: 1.10.14
turbo-darwin-arm64: 1.10.14
turbo-linux-64: 1.10.14
turbo-linux-arm64: 1.10.14
turbo-windows-64: 1.10.14
turbo-windows-arm64: 1.10.14
turbo-darwin-64: 1.10.15
turbo-darwin-arm64: 1.10.15
turbo-linux-64: 1.10.15
turbo-linux-arm64: 1.10.15
turbo-windows-64: 1.10.15
turbo-windows-arm64: 1.10.15
dependenciesMeta:
turbo-darwin-64:
optional: true
Expand All @@ -17667,7 +17667,7 @@ __metadata:
optional: true
bin:
turbo: bin/turbo
checksum: 219d245bb5cc32a9f76b136b81e86e179228d93a44cab4df3e3d487a55dd2688b5b85f4d585b66568ac53166145352399dd2d7ed0cd47f1aae63d08beb814ebb
checksum: b494c8bf79355874919e76ee0e4a0a53616e0ae5c7126eb1add50e67d4cd1e445ed9aecf99cb6d81c592b7a43ba91cd7dbf30df70410a44cecedba8b5126095d
languageName: node
linkType: hard

Expand Down

0 comments on commit e3bd8ef

Please sign in to comment.