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

6529 Migration #21

Merged
merged 2 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ https://YOUR.DOMAIN.NAME/oracle/address/0xADDRESS
Compare the response with

```bash
https://api.seize.io/oracle/address/0xADDRESS
https://api.6529.io/oracle/address/0xADDRESS
```

If you registered a new domain name, be sure to verify your email address within 15 days, as required by ICANN. Look for the subject "Verify your email address for..." in your inbox.
Expand Down Expand Up @@ -249,7 +249,7 @@ The database expects some initial data. Choose to load EITHER from the latest sn

## 3.2.1 Restore snapshot

The best option is usually to restore a recent seize.io snapshot.
The best option is usually to restore a recent 6529.io snapshot.

Populate your Prenode database from the latest snapshot using the following

Expand Down Expand Up @@ -365,7 +365,7 @@ https://YOUR-DOMAIN-NAME/oracle/address/0xADDRESS
Compare the response with

```bash
https://api.seize.io/oracle/address/0xADDRESS
https://api.6529.io/oracle/address/0xADDRESS
```

## 4 Updates
Expand Down
3 changes: 1 addition & 2 deletions src/api-serverless/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ info:

servers:
- url: '/oracle'
- url: 'https://api.seize.io/oracle'
- url: 'http://3.254.91.64:3000/oracle'
- url: 'https://api.6529.io/oracle'

paths:
/tdh/total:
Expand Down
2 changes: 1 addition & 1 deletion src/api-serverless/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "api-serverless",
"version": "1.0.0",
"description": "Seize Serverless API",
"description": "6529 Prenode Serverless API",
"main": "serverless.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
16 changes: 8 additions & 8 deletions src/prenode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ cron.schedule(
}
);

// ping seize every hour at 31 minutes
// ping 6529.io every hour at 31 minutes
cron.schedule(
'31 * * * *',
async () => {
await pingSeize();
await ping6529io();
},
{
timezone: 'Etc/UTC'
Expand All @@ -112,7 +112,7 @@ async function start() {

await runTDH();

await pingSeize();
await ping6529io();

const diff = start.diffFromNow().formatAsDuration();
logger.info(`[START SCRIPT COMPLETE IN ${diff}]`);
Expand Down Expand Up @@ -181,12 +181,12 @@ function runUpdate(restore?: boolean) {
});
}

async function pingSeize() {
async function ping6529io() {
try {
const info = await fetchPingInfo();
logger.info(`[PING SEIZE] : [INFO ${JSON.stringify(info)}]`);
logger.info(`[PING 6529.io] : [INFO ${JSON.stringify(info)}]`);
const response = await fetch(
'https://api.seize.io/oracle/register-prenode',
'https://api.6529.io/oracle/register-prenode',
{
method: 'POST',
headers: {
Expand All @@ -197,12 +197,12 @@ async function pingSeize() {
);
const body = await response.json();
logger.info(
`[PING SEIZE] : [STATUS ${response.status}] : [BODY ${JSON.stringify(
`[PING 6529.io] : [STATUS ${response.status}] : [BODY ${JSON.stringify(
body
)}]`
);
} catch (e: any) {
logger.error(`[PING SEIZE] : [ERROR ${e.message}]`);
logger.error(`[PING 6529.io] : [ERROR ${e.message}]`);
}
}

Expand Down
Loading