Skip to content

Commit

Permalink
add internal planet registries
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiker committed Dec 11, 2024
1 parent 8ea6444 commit 2f67b04
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 53 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/update-planets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
pull_request_target:
paths:
- planets/index.json
- planets/*.json
branches:
- main
types:
Expand All @@ -24,6 +24,27 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- uses: dorny/paths-filter@v3
id: paths
with:
list-files: shell
filters: |
planets: planets/*.json
- run: |
aws s3 cp planets/index.json s3://planets.nine-chronicles.com/planets/index.json
aws cloudfront create-invalidation --distribution-id EP1JH2OWQMIKM --paths "/*"
FILES=(${{ steps.paths.outputs.planets_files }})
for FILE in "${FILES[@]}"; do
REGISTRY=$(echo "$FILE" | sed -r 's/planets\/(.+)\.json$/\1/')
DIR="planets"
if [[ $REGISTRY == "mainnet" ]]; then
BUCKET="planets.nine-chronicles.com"
CF_DISTRIBUTION_ID="EP1JH2OWQMIKM"
else
BUCKET="planets-internal.nine-chronicles.com"
CF_DISTRIBUTION_ID="E2HIZ6JDZX0BEQ"
if [[ $REGISTRY == "preview" ]]; then
DIR="planets-preview"
fi
fi
aws s3 cp $FILE s3://$BUCKET/$DIR/index.json
aws cloudfront create-invalidation --distribution-id $CF_DISTRIBUTION_ID --paths "/$DIR"
done
4 changes: 2 additions & 2 deletions .github/workflows/validate-planets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:
pull_request:
paths:
- planets/index.json
- planets/*.json

jobs:
validate-planets-config:
Expand All @@ -14,4 +14,4 @@ jobs:
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- run: deno -A .github/scripts/validate-planets.js planets/index.json
- run: deno -A .github/scripts/validate-planets.js planets/*.json
29 changes: 29 additions & 0 deletions planets/internal.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[
{
"id": "0x100000000001",
"name": "heimdall (internal)",
"genesisUri": "https://planets.nine-chronicles.com/planets/0x000000000001/genesis",
"genesisHash": "729fa26958648a35b53e8e3905d11ec53b1b4929bf5f499884aed7df616f5913",
"9cscanUrl": "https://heimdall.9cscan.com",
"rpcEndpoints": {
"dp.gql": ["http://heimdall-internal-dp.9c.gg/graphql"],
"9cscan.rest": ["https://api-planet1.9cscan.com"],
"headless.gql": [
"https://heimdall-internal-validator-1.nine-chronicles.com/graphql"
],
"headless.grpc": [
"http://heimdall-internal-validator-1.nine-chronicles.com:31238"
],
"market.rest": ["http://heimdall-internal-market.9c.gg"],
"world-boss.rest": ["http://heimdall-internal-world-boss.9c.gg"],
"patrol-reward.gql": ["http://heimdall-internal-patrol.9c.gg/graphql"],
"arena.gql": ["http://heimdall-internal-arena.9c.gg/graphql"]
},
"bridges": {
"0x100000000000": {
"agent": "0x1c2ae97380CFB4F732049e454F6D9A25D4967c6f",
"avatar": "0x41aEFE4cdDFb57C9dFfd490e17e571705c593dDc"
}
}
}
]
64 changes: 16 additions & 48 deletions planets/index.json → planets/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,10 @@
"http://phx-nc-1.ninodes.com:31238",
"http://nld-nc-1.ninodes.com:31238"
],
"market.rest": [
"https://odin-market.9c.gg"
],
"world-boss.rest": [
"https://odin-world-boss.9c.gg"
],
"patrol-reward.gql": [
"https://odin-patrol.9c.gg/graphql"
],
"arena.gql": [
"http://odin-arena.9c.gg/graphql"
]
"market.rest": ["https://odin-market.9c.gg"],
"world-boss.rest": ["https://odin-world-boss.9c.gg"],
"patrol-reward.gql": ["https://odin-patrol.9c.gg/graphql"],
"arena.gql": ["http://odin-arena.9c.gg/graphql"]
},
"bridges": {
"0x000000000001": {
Expand All @@ -55,12 +47,8 @@
"genesisUri": "https://planets.nine-chronicles.com/planets/0x000000000001/genesis",
"9cscanUrl": "https://heimdall.9cscan.com",
"rpcEndpoints": {
"dp.gql": [
"http://heimdall-dp.9c.gg/graphql"
],
"9cscan.rest": [
"https://api-heimdall.9cscan.com"
],
"dp.gql": ["http://heimdall-dp.9c.gg/graphql"],
"9cscan.rest": ["https://api-heimdall.9cscan.com"],
"headless.gql": [
"https://heimdall-rpc-1.nine-chronicles.com/graphql",
"https://heimdall-rpc-2.nine-chronicles.com/graphql",
Expand All @@ -71,18 +59,10 @@
"http://heimdall-rpc-2.nine-chronicles.com:31238",
"http://heimdall-rpc-3.nine-chronicles.com:31238"
],
"market.rest": [
"http://heimdall-market.9c.gg"
],
"world-boss.rest": [
"http://heimdall-world-boss.9c.gg"
],
"patrol-reward.gql": [
"https://heimdall-patrol.9c.gg/graphql"
],
"arena.gql": [
"http://heimdall-arena.9c.gg/graphql"
]
"market.rest": ["http://heimdall-market.9c.gg"],
"world-boss.rest": ["http://heimdall-world-boss.9c.gg"],
"patrol-reward.gql": ["https://heimdall-patrol.9c.gg/graphql"],
"arena.gql": ["http://heimdall-arena.9c.gg/graphql"]
},
"bridges": {
"0x000000000000": {
Expand All @@ -98,12 +78,8 @@
"genesisHash": "bde462fd59de5ccba8495ebb163b124bf77ddc82cfc8b2f9fb57c00fc6e133b7",
"9cscanUrl": "https://thor.9cscan.com",
"rpcEndpoints": {
"dp.gql": [
"http://thor-dp.9c.gg/graphql"
],
"9cscan.rest": [
"https://api-thor.9cscan.com"
],
"dp.gql": ["http://thor-dp.9c.gg/graphql"],
"9cscan.rest": ["https://api-thor.9cscan.com"],
"headless.gql": [
"https://thor-rpc-1.nine-chronicles.com/graphql",
"https://thor-rpc-2.nine-chronicles.com/graphql"
Expand All @@ -112,18 +88,10 @@
"http://thor-rpc-1.nine-chronicles.com:31238",
"http://thor-rpc-2.nine-chronicles.com:31238"
],
"market.rest": [
"http://thor-market.9c.gg"
],
"world-boss.rest": [
"http://thor-world-boss.9c.gg"
],
"patrol-reward.gql": [
"http://thor-patrol.9c.gg/graphql"
],
"arena.gql": [
"http://thor-arena.9c.gg/graphql"
]
"market.rest": ["http://thor-market.9c.gg"],
"world-boss.rest": ["http://thor-world-boss.9c.gg"],
"patrol-reward.gql": ["http://thor-patrol.9c.gg/graphql"],
"arena.gql": ["http://thor-arena.9c.gg/graphql"]
},
"bridges": {
"0x000000000000": {
Expand Down
87 changes: 87 additions & 0 deletions planets/preview.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
[
{
"id": "0x100000000000",
"name": "odin (preview)",
"genesisHash": "4582250d0da33b06779a8475d283d5dd210c683b9b999d74d03fac4f58fa6bce",
"genesisUri": "https://release.nine-chronicles.com/genesis-block-9c-main",
"9cscanUrl": "https://preview.9cscan.com",
"rpcEndpoints": {
"dp.gql": ["http://odin-preview-dp.9c.gg/graphql"],
"9cscan.rest": ["https://api-odin-preview.9cscan.com"],
"headless.gql": [
"https://odin-preview-validator-5.nine-chronicles.com/graphql"
],
"headless.grpc": [
"http://odin-preview-validator-5.nine-chronicles.com:31238"
],
"market.rest": ["http://odin-preview-market.9c.gg"],
"world-boss.rest": ["https://odin-preview-world-boss.9c.gg"],
"patrol-reward.gql": ["http://odin-preview-patrol.9c.gg/graphql"],
"arena.gql": ["http://odin-preview-arena.9c.gg/graphql"]
},
"bridges": {
"0x100000000001": {
"agent": "0x1c2ae97380CFB4F732049e454F6D9A25D4967c6f",
"avatar": "0x41aEFE4cdDFb57C9dFfd490e17e571705c593dDc"
},
"0x100000000003": {
"agent": "0x3e498a6A5cDbE027769F9502026c37Cb8613186e",
"avatar": "0x41E9Dc57F04cC561B68378490528e22a386ba9e1"
}
}
},
{
"id": "0x100000000001",
"name": "heimdall (preview)",
"genesisUri": "https://planets.nine-chronicles.com/planets/0x000000000001/genesis",
"genesisHash": "729fa26958648a35b53e8e3905d11ec53b1b4929bf5f499884aed7df616f5913",
"9cscanUrl": "https://heimdall-preview.9cscan.com",
"rpcEndpoints": {
"dp.gql": ["http://heimdall-preview-dp.9c.gg/graphql"],
"9cscan.rest": ["https://api-heimdall-preview.9cscan.com"],
"headless.gql": [
"https://heimdall-preview-validator-1.nine-chronicles.com/graphql"
],
"headless.grpc": [
"http://heimdall-preview-validator-1.nine-chronicles.com:31238"
],
"market.rest": ["http://heimdall-preview-market.9c.gg"],
"world-boss.rest": ["http://heimdall-preview-world-boss.9c.gg"],
"patrol-reward.gql": ["http://heimdall-preview-patrol.9c.gg/graphql"],
"arena.gql": ["http://heimdall-preview-arena.9c.gg/graphql"]
},
"bridges": {
"0x100000000000": {
"agent": "0x1c2ae97380CFB4F732049e454F6D9A25D4967c6f",
"avatar": "0x41aEFE4cdDFb57C9dFfd490e17e571705c593dDc"
}
}
},
{
"id": "0x100000000003",
"name": "thor (preview)",
"genesisUri": "https://planets.nine-chronicles.com/planets/0x000000000003/genesis",
"genesisHash": "bde462fd59de5ccba8495ebb163b124bf77ddc82cfc8b2f9fb57c00fc6e133b7",
"9cscanUrl": "https://thor-preview.9cscan.com",
"rpcEndpoints": {
"dp.gql": ["http://thor-preview-dp.9c.gg/graphql"],
"9cscan.rest": ["https://api-thor-preview.9cscan.com"],
"headless.gql": [
"https://thor-preview-validator-1.nine-chronicles.com/graphql"
],
"headless.grpc": [
"http://thor-preview-validator-1.nine-chronicles.com:31238"
],
"market.rest": ["http://thor-preview-market.9c.gg"],
"world-boss.rest": ["http://thor-preview-world-boss.9c.gg"],
"patrol-reward.gql": ["http://thor-preview-patrol.9c.gg/graphql"],
"arena.gql": ["http://thor-preview-arena.9c.gg/graphql"]
},
"bridges": {
"0x100000000000": {
"agent": "0x3e498a6A5cDbE027769F9502026c37Cb8613186e",
"avatar": "0x41E9Dc57F04cC561B68378490528e22a386ba9e1"
}
}
}
]

0 comments on commit 2f67b04

Please sign in to comment.