Skip to content

Commit

Permalink
Merge pull request #77 from BigWhaleLabs/use-hashes-by-api
Browse files Browse the repository at this point in the history
switch ketl hashes to invites backend
  • Loading branch information
MixailE authored Oct 24, 2023
2 parents 4f35502 + 66771fd commit 7631826
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ VITE_ETH_RPC=https://eth.example.com/rpc
VITE_KETL_ATTESTATION_CONTRACT_ADDRESS=000000000000000000000000000000000000000000
VITE_DEV_KETL_ATTESTATION_CONTRACT_ADDRESS=000000000000000000000000000000000000000000
VITE_VERIFY_URL=https://eth.example.com
VITE_KETL_HASHES_SOURCE=https://eth.example.com
VITE_KETL_INVITES_BACKEND=https://eth.example.com
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
| `VITE_ETH_RPC` | Ethereum node RPC URI (defaults to @bwl/constants) |
| `VITE_KETL_ATTESTATION_CONTRACT_ADDRESS` | Ketl Attestation contract address, that stores some app data |
| `VITE_DEV_KETL_ATTESTATION_CONTRACT_ADDRESS` | Ketl Attestation dev contract address, that stores some app data |
| `VITE_KETL_HASHES_SOURCE` | Link to merkle tree hashes for Ketl |
| `VITE_KETL_INVITES_BACKEND` | Link to merkle tree hashes for Ketl |

Also, please, consider looking at `.env.sample`.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
]
},
"dependencies": {
"@big-whale-labs/constants": "0.2.12",
"@big-whale-labs/constants": "0.2.26",
"@big-whale-labs/ketl-attestation-token": "0.1.0",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@rollup/plugin-inject": "^5.0.3",
Expand Down
6 changes: 3 additions & 3 deletions src/helpers/env.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
DEV_KETL_ATTESTATION_CONTRACT,
ETH_MUMBAI_NETWORK,
KETL_INVITES_BACKEND,
PROD_KETL_ATTESTATION_CONTRACT,
VERIFY_URL,
} from '@big-whale-labs/constants'
Expand All @@ -15,9 +16,8 @@ export default cleanEnv(import.meta.env, {
VITE_KETL_ATTESTATION_CONTRACT_ADDRESS: str({
default: PROD_KETL_ATTESTATION_CONTRACT,
}),
VITE_KETL_HASHES_SOURCE: str({
default:
'https://raw.githubusercontent.com/BigWhaleLabs/ketl-attestation-token/main',
VITE_KETL_INVITES_BACKEND: str({
default: KETL_INVITES_BACKEND,
}),
VITE_VERIFY_URL: str({ default: VERIFY_URL }),
})
2 changes: 1 addition & 1 deletion src/helpers/getHashes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import env from 'helpers/env'
export default async function getHashes(id: number) {
try {
const response = await fetch(
`${env.VITE_KETL_HASHES_SOURCE}/hashes/${id}.json`
`${env.VITE_KETL_INVITES_BACKEND}/merkle/hashes?attestationType=${id}`
)

return response.json()
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1570,10 +1570,10 @@ __metadata:
languageName: node
linkType: hard

"@big-whale-labs/constants@npm:0.2.12":
version: 0.2.12
resolution: "@big-whale-labs/constants@npm:0.2.12"
checksum: 9bc15041ac9819bfdf15cf068c6e440304b9bf65e65d0ab00169fd09f50581d077f6b32bf311be19019c75eb9aada411759ca763ac4c695365e18286fa0b1043
"@big-whale-labs/constants@npm:0.2.26":
version: 0.2.26
resolution: "@big-whale-labs/constants@npm:0.2.26"
checksum: 78cf8ad50032104184f8483d58ad0223dff3b4ab431192f833ca5053f9bfccd3785a16c8a74d1f508839b8a6d019718c5af48bc0d9e2fd5e6907731bc6cfc815
languageName: node
linkType: hard

Expand Down Expand Up @@ -5404,9 +5404,9 @@ __metadata:
linkType: hard

"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001426, caniuse-lite@npm:^1.0.30001449":
version: 1.0.30001456
resolution: "caniuse-lite@npm:1.0.30001456"
checksum: c2cc479962149abd09a25b64699ee7484d9c433db2bad0a489f7b51b09a463c991f6efd7b8e201bc1a1ccf3294263f88503a3adf0a57db9046939ee7e58b76a6
version: 1.0.30001553
resolution: "caniuse-lite@npm:1.0.30001553"
checksum: 45d6a2a3c3a098c8093a4c8883fceafb4bbf59d96f6fd5bb381ba4581d07eecbe0ede4f55383f0d49374154ff6a808bd90fbe32b17ccd1738034d2579787b33c
languageName: node
linkType: hard

Expand Down Expand Up @@ -10178,7 +10178,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "ketl-zk-frontend@workspace:."
dependencies:
"@big-whale-labs/constants": 0.2.12
"@big-whale-labs/constants": 0.2.26
"@big-whale-labs/eslint-config-bwl": ^2.1.5
"@big-whale-labs/ketl-attestation-token": 0.1.0
"@big-whale-labs/prettier-config": ^1.1.3
Expand Down

0 comments on commit 7631826

Please sign in to comment.