Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
wighawag committed Nov 28, 2023
1 parent ce2f162 commit 10e3ca9
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 7 deletions.
11 changes: 10 additions & 1 deletion contracts/.env
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# this let ldenv know to load the parent foler .env too (the child folder's vars takes precedence though)
ENV_ROOT_FOLDER=..

# this let ldenv know to load the parent foler .env too (the child folder's vars takes precedence though)
ENV_ROOT_FOLDER=..

# if you want to deploy on a specific network and not expose your api key
# you just create a .env.local (or .env.<network>.local) with the following
# ETH_NODE_URI_<network>=<endpoint-url>
# MNEMONIC_<network>="<mnemonic>>"
# you can also add the etherscan api key for verification
# ETHERSCAN_API_KEY=<api-key>
# ETHERSCAN_API_KEY=<api-key>

ETH_NODE_URI_localhost="http://127.0.0.1:8545"
MNEMONIC_localhost="test test test test test test test test test test test junk"

ETH_NODE_URI_lan="http://ethereum.local:8545"
MNEMONIC_lan="test test test test test test test test test test test junk"
2 changes: 2 additions & 0 deletions contracts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ node_modules
# rocketh
generated
deployments/localhost
deployments/lan
_metadata

# hardhat
/coverage
Expand Down
6 changes: 5 additions & 1 deletion contracts/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ deployments/localhost
/coverage-data.json
cache
artifacts

docs
*.hbs

#############################################
deployments
package.json
pnpm-lock.yaml
pnpm-lock.yaml
7 changes: 7 additions & 0 deletions contracts/hardhat.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ const config = {
paths: {
sources: 'src',
},
docgen: {
templates: 'docs_templates',
pages: 'files',
},
mocha: {
require: 'named-logs-console',
},
};

module.exports = config;
5 changes: 4 additions & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
"deploy": "ldenv hardhat --network @@MODE deploy @@",
"deploy:watch": "as-soon -w generated -w deploy pnpm run deploy",
"test": "vitest",
"coverage": "hardhat compile-for-coverage && vitest run --coverage && hardhat compile",
"coverage:compile": "hardhat compile-for-coverage",
"coverage:watch:compile": "as-soon -w src pnpm coverage:compile",
"coverage:watch": "pnpm coverage:compile && vitest --coverage --no-threads",
"coverage": "pnpm coverage:compile && vitest run --coverage || pnpm compile",
"export": "rocketh-export",
"start": "zellij --layout zellij.kdl a $npm_package_name || zellij --layout zellij.kdl -s $npm_package_name",
"stop": "zellij kill-session $npm_package_name",
Expand Down
2 changes: 2 additions & 0 deletions indexer/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ node_modules
/dist
/ethereum-indexer-data
/src/contracts.ts
/indexed/

#############################################
package.json
pnpm-lock.yaml
5 changes: 3 additions & 2 deletions web/.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ PUBLIC_DEV_NODE_URI=http://localhost:8545

# This set the fallback (centralised node)
# Disabled by default: User need a wallet to read state
# PUBLIC_ETH_NODE_URI_LOCALHOST=${PUBLIC_DEV_NODE_URI}
PUBLIC_ETH_NODE_URI_LOCALHOST=
PUBLIC_ETH_NODE_URI=
PUBLIC_ETH_NODE_URI_LOCALHOST=
# for localhost, you can also set it to be the same as PUBLIC_DEV_NODE_URI
# PUBLIC_ETH_NODE_URI_LOCALHOST=${PUBLIC_DEV_NODE_URI}

# Can specify a block time for localhost
PUBLIC_LOCALHOST_BLOCK_TIME=${BLOCK_TIME}
2 changes: 2 additions & 0 deletions web/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ static/robots.txt

# generated from contracts
src/data/contracts.ts
static/indexed-state-*.json

#############################################
package.json
pnpm-lock.yaml
Expand Down
2 changes: 1 addition & 1 deletion web/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import adapter from '@sveltejs/adapter-static';
import {vitePreprocess} from '@sveltejs/kit/vite';
import {execSync} from 'child_process';

function getVersion() {
export function getVersion() {
try {
return execSync('git rev-parse --short HEAD').toString().trim();
} catch {
Expand Down
3 changes: 2 additions & 1 deletion web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true
"strict": true,
"outDir": "build"
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
//
Expand Down

0 comments on commit 10e3ca9

Please sign in to comment.