Skip to content

Commit a8e03c4

Browse files
Merge pull request #4 from rsksmart/fix/generales-fixes
fix: implement general fixes
2 parents 5aee227 + 71a0cce commit a8e03c4

File tree

6 files changed

+5242
-39
lines changed

6 files changed

+5242
-39
lines changed

.env.example

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
DATABASE_URL=postgresql://user:password@localhost:5432/eas-sepolia
2-
INFURA_API_KEY=
3-
INFURA_IPFS_USER=
4-
INFURA_IPFS_PASS=
5-
ALCHEMY_ARBITRUM_API_KEY=
6-
ALCHEMY_SEPOLIA_API_KEY=
7-
ALCHEMY_OPTIMISM_GOERLI_API_KEY=
1+
DATABASE_URL=postgresql://postgres:postgresPassword@eas-postgres:5432/eas-rootstock-testnet
2+
#INFURA_API_KEY=
3+
#INFURA_IPFS_USER=
4+
#INFURA_IPFS_PASS=
5+
#ALCHEMY_ARBITRUM_API_KEY=
6+
#ALCHEMY_SEPOLIA_API_KEY=
7+
#ALCHEMY_OPTIMISM_GOERLI_API_KEY=
88
ROOTSTOCK_TESTNET_API_KEY=
9-
ROOTSTOCK_API_KEY=
9+
#ROOTSTOCK_API_KEY=
1010
#POLLING_INTERVAL=60000
1111
#DISABLE_LISTENER=true
1212
#REQUEST_DELAY=500 # How many ms to wait before making a request to RPC (useful for free plans)

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# We don't want lockfiles in stacks, as people could use a different package manager
2-
# This part will be removed by `remix.init`
3-
package-lock.json
4-
yarn.lock
51
pnpm-lock.yaml
62
pnpm-lock.yml
73

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You'll need to create a `.env` file in the root directory of the project. This f
1414
which you can find in `.env.example` as well:
1515

1616
```dotenv
17-
DATABASE_URL=postgresql://user:password@localhost:5432/eas-sepolia
17+
DATABASE_URL=postgresql://user:password@localhost:5432/eas-rootstock-testnet
1818
INFURA_API_KEY=
1919
INFURA_IPFS_USER=
2020
INFURA_IPFS_PASS=
@@ -79,5 +79,9 @@ add a `.yarnrc.yml` file to the root of the project with the following contents:
7979
nodeLinker: node-modules
8080
```
8181

82+
## Db Configuration
83+
84+
For each blockchain network, a separate database must be created. For example, `eas-rootstock-testnet` should be used for the Rootstock Testnet, and `eas-rootstock-mainnet` for the Rootstock Mainnet.
85+
8286

8387

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
environment:
88
POSTGRES_USER: postgres
99
POSTGRES_PASSWORD: postgresPassword
10-
POSTGRES_DB: eas-index
10+
POSTGRES_DB: eas-rootstock-testnet
1111
volumes:
1212
- postgres_data:/var/lib/postgresql/data
1313
ports:
@@ -18,7 +18,7 @@ services:
1818
container_name: eas_indexer_container
1919
environment:
2020
CHAIN_ID: ${CHAIN_ID}
21-
DATABASE_URL: "postgresql://postgres:postgresPassword@eas-postgres:5432/eas-index"
21+
DATABASE_URL: ${DATABASE_URL}
2222
ROOTSTOCK_TESTNET_API_KEY: ${ROOTSTOCK_TESTNET_API_KEY}
2323
ROOTSTOCK_API_KEY: ${ROOTSTOCK_API_KEY}
2424
depends_on:
Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
BEGIN;
22
-- Schema
3-
ALTER TABLE "eas-sepolia"."Schema" ADD COLUMN "time_new" INTEGER;
4-
UPDATE "eas-sepolia"."Schema" SET "time_new" = CAST("time" AS integer);
5-
ALTER TABLE "eas-sepolia"."Schema" DROP COLUMN "time";
6-
ALTER TABLE "eas-sepolia"."Schema" RENAME COLUMN "time_new" TO "time";
3+
ALTER TABLE "eeas-rootstock-testnet"."Schema" ADD COLUMN "time_new" INTEGER;
4+
UPDATE "eeas-rootstock-testnet"."Schema" SET "time_new" = CAST("time" AS integer);
5+
ALTER TABLE "eeas-rootstock-testnet"."Schema" DROP COLUMN "time";
6+
ALTER TABLE "eeas-rootstock-testnet"."Schema" RENAME COLUMN "time_new" TO "time";
77

88
-- Attestation
9-
ALTER TABLE "eas-sepolia"."Attestation" ADD COLUMN "time_new" INTEGER;
10-
UPDATE "eas-sepolia"."Attestation" SET "time_new" = CAST("time" AS integer);
11-
ALTER TABLE "eas-sepolia"."Attestation" DROP COLUMN "time";
12-
ALTER TABLE "eas-sepolia"."Attestation" RENAME COLUMN "time_new" TO "time";
9+
ALTER TABLE "eeas-rootstock-testnet"."Attestation" ADD COLUMN "time_new" INTEGER;
10+
UPDATE "eeas-rootstock-testnet"."Attestation" SET "time_new" = CAST("time" AS integer);
11+
ALTER TABLE "eeas-rootstock-testnet"."Attestation" DROP COLUMN "time";
12+
ALTER TABLE "eeas-rootstock-testnet"."Attestation" RENAME COLUMN "time_new" TO "time";
1313

14-
ALTER TABLE "eas-sepolia"."Attestation" ADD COLUMN "timeCreated_new" INTEGER;
15-
UPDATE "eas-sepolia"."Attestation" SET "timeCreated_new" = CAST("timeCreated" AS integer);
16-
ALTER TABLE "eas-sepolia"."Attestation" DROP COLUMN "timeCreated";
17-
ALTER TABLE "eas-sepolia"."Attestation" RENAME COLUMN "timeCreated_new" TO "timeCreated";
14+
ALTER TABLE "eeas-rootstock-testnet"."Attestation" ADD COLUMN "timeCreated_new" INTEGER;
15+
UPDATE "eeas-rootstock-testnet"."Attestation" SET "timeCreated_new" = CAST("timeCreated" AS integer);
16+
ALTER TABLE "eeas-rootstock-testnet"."Attestation" DROP COLUMN "timeCreated";
17+
ALTER TABLE "eeas-rootstock-testnet"."Attestation" RENAME COLUMN "timeCreated_new" TO "timeCreated";
1818

19-
ALTER TABLE "eas-sepolia"."Attestation" ADD COLUMN "expirationTime_new" INTEGER;
20-
UPDATE "eas-sepolia"."Attestation" SET "expirationTime_new" = CAST("expirationTime" AS integer);
21-
ALTER TABLE "eas-sepolia"."Attestation" DROP COLUMN "expirationTime";
22-
ALTER TABLE "eas-sepolia"."Attestation" RENAME COLUMN "expirationTime_new" TO "expirationTime";
19+
ALTER TABLE "eeas-rootstock-testnet"."Attestation" ADD COLUMN "expirationTime_new" INTEGER;
20+
UPDATE "eeas-rootstock-testnet"."Attestation" SET "expirationTime_new" = CAST("expirationTime" AS integer);
21+
ALTER TABLE "eeas-rootstock-testnet"."Attestation" DROP COLUMN "expirationTime";
22+
ALTER TABLE "eeas-rootstock-testnet"."Attestation" RENAME COLUMN "expirationTime_new" TO "expirationTime";
2323

24-
ALTER TABLE "eas-sepolia"."Attestation" ADD COLUMN "revocationTime_new" INTEGER;
25-
UPDATE "eas-sepolia"."Attestation" SET "revocationTime_new" = CAST("revocationTime" AS integer);
26-
ALTER TABLE "eas-sepolia"."Attestation" DROP COLUMN "revocationTime";
27-
ALTER TABLE "eas-sepolia"."Attestation" RENAME COLUMN "revocationTime_new" TO "revocationTime";
24+
ALTER TABLE "eeas-rootstock-testnet"."Attestation" ADD COLUMN "revocationTime_new" INTEGER;
25+
UPDATE "eeas-rootstock-testnet"."Attestation" SET "revocationTime_new" = CAST("revocationTime" AS integer);
26+
ALTER TABLE "eeas-rootstock-testnet"."Attestation" DROP COLUMN "revocationTime";
27+
ALTER TABLE "eeas-rootstock-testnet"."Attestation" RENAME COLUMN "revocationTime_new" TO "revocationTime";
2828

2929
-- SchemaName
30-
ALTER TABLE "eas-sepolia"."SchemaName" ADD COLUMN "time_new" INTEGER;
31-
UPDATE "eas-sepolia"."SchemaName" SET "time_new" = CAST("time" AS integer);
32-
ALTER TABLE "eas-sepolia"."SchemaName" DROP COLUMN "time";
33-
ALTER TABLE "eas-sepolia"."SchemaName" RENAME COLUMN "time_new" TO "time";
30+
ALTER TABLE "eeas-rootstock-testnet"."SchemaName" ADD COLUMN "time_new" INTEGER;
31+
UPDATE "eeas-rootstock-testnet"."SchemaName" SET "time_new" = CAST("time" AS integer);
32+
ALTER TABLE "eeas-rootstock-testnet"."SchemaName" DROP COLUMN "time";
33+
ALTER TABLE "eeas-rootstock-testnet"."SchemaName" RENAME COLUMN "time_new" TO "time";
3434

3535
COMMIT;

0 commit comments

Comments
 (0)