Skip to content

Commit

Permalink
fix: compilation fixes for localhost testing;
Browse files Browse the repository at this point in the history
  • Loading branch information
Igx22 committed Nov 12, 2024
1 parent 53382ce commit c216992
Show file tree
Hide file tree
Showing 10 changed files with 152 additions and 55 deletions.
12 changes: 12 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
VALIDATOR_RPC_ENDPOINT=http://localhost:8545
VALIDATOR_RPC_NETWORK=1337
VALIDATOR_PUSH_TOKEN_ADDRESS=0x5FbDB2315678afecb367f032d93F642f64180aa3
VALIDATOR_CONTRACT_ADDRESS=0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9
STORAGE_CONTRACT_ADDRESS=0x0165878A594ca255338adfa4d48449f69242Eb8F
DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/anode1
CONFIG_DIR=docker/a1
VALIDATOR_PRIVATE_KEY_FILE=validator_eth_key.json
VALIDATOR_PRIVATE_KEY_PASS=test
LOCALH=
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ app.log
.DS_Store
*.log
app.log
.idea
.idea
build/
log/
11 changes: 7 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
node_modules/
dist/
src/utilz/
src/modules/validator/
node_modules
public
build
dist
# these files come from push-vnode; don't reformat them please;
src/utilz/*.ts
src/services/messaging-common/*.ts
97 changes: 55 additions & 42 deletions docker/a1/ValidatorV1.json

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,13 @@
"@pushprotocol/node-core": "^0.0.8",
"@solana/web3.js": "^1.95.4",
"@types/bs58": "^4.0.4",
"@types/mysql": "^2.15.26",
"bs58": "^6.0.0",
"crypto-js": "^4.2.0",
"ethereum-cryptography": "^3.0.0",
"ethers": "^5.7.2",
"google-protobuf": "^3.21.4",
"mysql": "^2.18.1",
"node-schedule": "^2.1.1",
"object-hash": "^3.0.0",
"patch-package": "^8.0.0",
Expand Down
8 changes: 4 additions & 4 deletions src/utilz/blockUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import { ArrayUtil } from './arrayUtil'
import { BitUtil } from './bitUtil'
import { ChainUtil } from './chainUtil'
import { Check } from './check'
import DateUtil from './dateUtil'
import { DateUtil } from './dateUtil'
import { EnvLoader } from './envLoader'
import { EthUtil } from './EthUtil'
import { EthUtil } from './ethUtil'
import { HashUtil } from './hashUtil'
import { NumUtil } from './numUtil'
import { SolUtil } from './solUtil'
import { StarkNetUtil } from './starkNetUtil'
import StrUtil from './strUtil'
import {StrUtil} from './strUtil'
import { WinstonUtil } from './winstonUtil'
import { PushSdkUtil } from './pushSdkUtil'

Expand Down Expand Up @@ -535,4 +535,4 @@ export class CheckR {
static ok(): CheckR {
return {success: true, err: ''}
}
}
}
1 change: 1 addition & 0 deletions src/utilz/chainUtil.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {StrUtil} from './strUtil'
import {Check} from "./check";
import {BitUtil} from "./bitUtil";
import { Tuple } from './tuple';

export class ChainUtil {

Expand Down
2 changes: 1 addition & 1 deletion src/utilz/tuple.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
type Tuple<A, B> = [A, undefined?] | [undefined, B];
export type Tuple<A, B> = [A, undefined?] | [undefined, B];
11 changes: 8 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"ts-node": {
"transpileOnly": true
},
"compilerOptions": {
"outDir": "./dist",
"target": "ES2017",
"module": "commonjs",
"lib": ["es2017", "dom"],
"lib": ["es2017", "dom", "esnext.asynciterable"],
"typeRoots": ["./node_modules/@types", "./src/types", "./src/generated"],
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
Expand All @@ -18,6 +23,6 @@
"sourceMap": true, // Enable source maps for better error tracking
"types": ["jest", "node"], // Add 'node' types for compatibility
},
"include": ["src/**/*", "src/generated/**/*"], // Ensure generated files are included
"include": ["./src/**/*", "./src/generated/**/*"], // Ensure generated files are included
"exclude": ["node_modules", "dist"]
}
}

0 comments on commit c216992

Please sign in to comment.