Skip to content

Commit

Permalink
felt like working, might delete later
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilIvanichkovv committed Jul 8, 2024
1 parent b284d3d commit b375012
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 14 deletions.
1 change: 1 addition & 0 deletions beacon-light-client/plonky2/input_fetchers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"devDependencies": {
"@types/circomlibjs": "^0",
"@types/json-bigint": "^1",
"@types/node": "^18.0.0",
"@types/yargs": "^17.0.32",
"tsx": "^4.7.1"
},
Expand Down
6 changes: 5 additions & 1 deletion beacon-light-client/plonky2/input_fetchers/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"extends": "../../../tsconfig.json"
"extends": "../../../tsconfig.json",
"references": [
{
"path":"../../../relay"
}],
}
7 changes: 7 additions & 0 deletions beacon-light-client/solidity/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
require('dotenv').config();

require('tsconfig-paths').register({
baseUrl: './',
paths: {
'@/*': ['../../relay/*'],
},
});

// Disabled due to compatibility issues with pnpapi
// TODO: Replace with modern alternative
// import 'hardhat-gas-reporter';
Expand Down
1 change: 1 addition & 0 deletions beacon-light-client/solidity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"chai-as-promised": "^7.1.2",
"dotenv": "^16.4.4",
"env-paths": "^3.0.0",
"tsconfig-paths": "^4.2.0",
"typescript": "5.2.2"
},
"exports": {
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@
"clean:normal": "yarn clean:jest && EXCL_NM='-e node_modules' yarn clean:untracked_artifacts",
"clean:jest": "jest --clear-cache",
"clean:untracked_artifacts": "git clean -fdx -e .env -e .direnv -e .yarn -e .vscode $EXCL_NM -- $(git rev-parse --show-toplevel)",
"check:build": "cd beacon-light-client/solidity/ && yarn build:sol && cd ../../ && yarn tsc",
"check:build": "cd beacon-light-client/solidity/ && yarn build:sol && cd ../../ && yarn tsc -b ./tsconfig.json",
"format:check": "prettier --check . && alejandra --exclude ./.yarn --exclude ./node_modules --exclude ./yarn-project.nix --check .",
"format:write": "prettier --write . && alejandra --exclude ./.yarn --exclude ./node_modules --exclude ./yarn-project.nix .",
"test": "jest --verbose --silent -i",
"test-emcc": "USE_EMCC=1 jest --verbose --silent",
"ts": "yarn node --import tsx",
"build-plonky-2": "tsc -p beacon-light-client/plonky2/input_fetchers/tsconfig.json"
"build-plonky-2": "yarn tsc -b beacon-light-client/plonky2/input_fetchers/tsconfig.json"
},
"dependencies": {
"@chainsafe/bls": "^6.0.3",
Expand Down Expand Up @@ -109,6 +109,9 @@
"get-changed-validators": "dist/beacon-light-client/plonky2/validators_commitment_mapper_tree/get_changed_validators.js"
},
"dependenciesMeta": {
"@lodestar/[email protected]": {
"unplugged": true
},
"@openzeppelin/[email protected]": {
"unplugged": true
},
Expand Down
2 changes: 0 additions & 2 deletions relay/implementations/eos-contract.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { ISmartContract } from '@/abstraction/smart-contract-abstraction';
import { promisify } from 'node:util';
import { exec as exec_ } from 'node:child_process';
import { compileVerifierParseDataTool } from '../../tests/helpers/helpers';
import { getDataFromPrintHeaderResult } from '@dendreth/utils/cosmos-utils/cosmos-utils';
import { formatHex } from '@dendreth/utils/ts-utils/bls';
import { getGenericLogger } from '@dendreth/utils/ts-utils/logger';

Expand Down
5 changes: 3 additions & 2 deletions relay/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
"@/*": ["./*"],
"@/x": ["../.yarn/unplugged/@lodestar-types-npm-1.17.0-1607a25762/node_modules/@lodestar/types/lib/utils/executionAddress"]
}
}
},
}
20 changes: 15 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* Visit https://aka.ms/tsconfig to read more about this file */
/* Projects */
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
"composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
Expand All @@ -24,7 +24,7 @@
/* Modules */
"module": "ESNext", /* Specify what module code is generated. */
"moduleResolution": "Bundler", /* Specify how TypeScript looks up a file from a given module specifier. */
// "rootDir": "./", /* Specify the root folder within your source files. */
"rootDir": "./", /* Specify the root folder within your source files. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
Expand All @@ -41,8 +41,8 @@
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declarationMap": true, /* Create sourcemaps for d.ts files. */
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
Expand Down Expand Up @@ -97,5 +97,15 @@
"exclude": [
"node_modules",
"vendor",
]
"dist"
],
"references": [
{
"path":"./relay"
}],
"files": ["vendor/eth2-light-client-updates/mainnet/bootstrap.json",
"vendor/eth2-light-client-updates/mainnet/updates/00290.json",
"vendor/eth2-light-client-updates/prater/capella-updates-94/update_5601823_5609044.json"],
"include": ["**/*.ts", "**/*.json"]

}
2 changes: 1 addition & 1 deletion yarn-project.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ let
rm $out/.gitignore
'';
outputHashMode = "recursive";
outputHash = "sha512-8jmYm01fpJ6mAmJjdI4q8rXx/jNlyNjRj62R2X28yw+HgxXs/QdhMnFaFYvzbkYQicMHEEJvXUkEvIgf6trkRQ==";
outputHash = "sha512-XnZrzm0RE8x/CgIUUmGGlw9H8QV6UfeVj/+GJ5+/QGZ0cE/b3TgjQJRqQY4fAPd6fT4CUi5KGh1v3jmSQ0TaPQ==";
};

# Create a derivation that builds a module in isolation.
Expand Down
24 changes: 23 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1598,6 +1598,7 @@ __metadata:
"@noble/bls12-381": "npm:^1.4.0"
"@types/circomlibjs": "npm:^0"
"@types/json-bigint": "npm:^1"
"@types/node": "npm:^18.0.0"
"@types/yargs": "npm:^17.0.32"
chalk: "npm:^4.1.2"
circom-pairing: "link:../../../vendor/circom-pairing/"
Expand Down Expand Up @@ -1684,6 +1685,7 @@ __metadata:
r1csfile: "npm:^0.0.40"
snarkjs: "https://github.com/metacraft-labs/snarkjs.git#commit=091ee9c3744c660b0ecd961f9197a8249a8f7d3b"
ts-node: "npm:^10.9.1"
tsconfig-paths: "npm:^4.2.0"
typescript: "npm:5.2.2"
web3: "npm:1.10.4"
languageName: unknown
Expand Down Expand Up @@ -5203,6 +5205,8 @@ __metadata:
winston: "npm:^3.10.0"
yargs: "npm:^17.7.2"
dependenciesMeta:
"@lodestar/[email protected]":
unplugged: true
"@openzeppelin/[email protected]":
unplugged: true
[email protected]:
Expand Down Expand Up @@ -10765,7 +10769,7 @@ __metadata:
languageName: node
linkType: hard

"json5@npm:^2.1.1, json5@npm:^2.2.3":
"json5@npm:^2.1.1, json5@npm:^2.2.2, json5@npm:^2.2.3":
version: 2.2.3
resolution: "json5@npm:2.2.3"
bin:
Expand Down Expand Up @@ -14222,6 +14226,13 @@ __metadata:
languageName: node
linkType: hard

"strip-bom@npm:^3.0.0":
version: 3.0.0
resolution: "strip-bom@npm:3.0.0"
checksum: 10/8d50ff27b7ebe5ecc78f1fe1e00fcdff7af014e73cf724b46fb81ef889eeb1015fc5184b64e81a2efe002180f3ba431bdd77e300da5c6685d702780fbf0c8d5b
languageName: node
linkType: hard

"strip-bom@npm:^4.0.0":
version: 4.0.0
resolution: "strip-bom@npm:4.0.0"
Expand Down Expand Up @@ -14650,6 +14661,17 @@ __metadata:
languageName: node
linkType: hard

"tsconfig-paths@npm:^4.2.0":
version: 4.2.0
resolution: "tsconfig-paths@npm:4.2.0"
dependencies:
json5: "npm:^2.2.2"
minimist: "npm:^1.2.6"
strip-bom: "npm:^3.0.0"
checksum: 10/5e55cc2fb6b800eb72011522e10edefccb45b1f9af055681a51354c9b597d1390c6fa9cc356b8c7529f195ac8a90a78190d563159f3a1eed10e01bbd4d01a8ab
languageName: node
linkType: hard

"tslib@npm:2.6.2, tslib@npm:^2.0.0, tslib@npm:^2.2.0, tslib@npm:^2.3.1, tslib@npm:^2.6.2":
version: 2.6.2
resolution: "tslib@npm:2.6.2"
Expand Down

0 comments on commit b375012

Please sign in to comment.