Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Commit 410feec

Browse files
author
Albert
committed
first commit
1 parent 47cdf64 commit 410feec

5 files changed

Lines changed: 153 additions & 0 deletions

File tree

Makefile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# include .env file and export its env vars
2+
# (-include to ignore error if it does not exist)
3+
-include .env
4+
5+
all: clean install build foundry-test
6+
7+
# Install proper solc version.
8+
solc:; nix-env -f https://github.com/dapphub/dapptools/archive/master.tar.gz -iA solc-static-versions.solc_0_8_10
9+
10+
# Clean the repo
11+
clean :; forge clean
12+
13+
# Install the Modules
14+
install :; forge install --no-commit
15+
16+
# Update Dependencies
17+
update:; forge update
18+
19+
# Builds
20+
build :; forge build
21+
22+
# chmod scripts
23+
scripts :; chmod +x ./scripts/*
24+
25+
# Tests
26+
foundry-test :; forge clean && forge test --optimize --optimizer-runs 200 -v # --ffi # enable if you need the `ffi` cheat code on HEVM
27+
28+
# Run solhint
29+
check :; solhint "{contracts,test,scripts}/**/*.sol"
30+
31+
# slither
32+
slither :; slither .
33+
34+
# Lints
35+
lint :; prettier --write "{contracts,test,scripts}/**/*.{sol,ts}"
36+
37+
# Generate Gas Snapshots
38+
snapshot :; forge clean && forge snapshot
39+
40+
# Rename all instances of femplate with the new repo name
41+
rename :; chmod +x ./scripts/* && ./scripts/rename.sh

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# crossbell-bridge

hardhat.config.ts

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import { HardhatUserConfig } from "hardhat/config";
2+
import "@nomiclabs/hardhat-etherscan";
3+
import "@nomiclabs/hardhat-waffle";
4+
import "@typechain/hardhat";
5+
import "hardhat-gas-reporter";
6+
import "hardhat-contract-sizer";
7+
import "solidity-docgen";
8+
import * as dotenv from "dotenv";
9+
10+
dotenv.config();
11+
12+
module.exports = {
13+
solidity: {
14+
version: "0.8.10",
15+
settings: {
16+
optimizer: {
17+
enabled: true,
18+
runs: 200,
19+
},
20+
},
21+
},
22+
docgen: {
23+
output: "docs",
24+
pages: "files",
25+
},
26+
paths: {
27+
sources: "./contracts",
28+
cache: "./cache_hardhat",
29+
artifacts: "./artifacts_hardhat",
30+
},
31+
networks: {
32+
crossbell: {
33+
url: "https://rpc.crossbell.io",
34+
// accounts: [process.env.PRIVATE_KEY]
35+
},
36+
},
37+
38+
etherscan: {
39+
apiKey: {
40+
crossbell: "your API key",
41+
},
42+
customChains: [
43+
{
44+
network: "crossbell",
45+
chainId: 3737,
46+
urls: {
47+
apiURL: "https://scan.crossbell.io/api",
48+
browserURL: "https://scan.crossbell.io",
49+
},
50+
},
51+
],
52+
},
53+
} as HardhatUserConfig;

package.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "crossbell-bridge",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"setup": "make clean && make build",
8+
"sync": "make install",
9+
"test": "make foundry-test && npx hardhat test",
10+
"snapshot": "make snapshot",
11+
"lint": "make lint",
12+
"remap": "forge remappings > remappings.txt",
13+
"version": "auto-changelog -t keepachangelog --commit-limit false --ignore-commit-pattern 'chore:|test:|docs:' && git add CHANGELOG.md",
14+
"docgen": "hardhat docgen",
15+
"prepare": "husky install"
16+
},
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/Crossbell-Box/crossbell-bridge.git"
20+
},
21+
"author": "",
22+
"license": "MIT",
23+
"bugs": {
24+
"url": "https://github.com/Crossbell-Box/crossbell-bridge/issues"
25+
},
26+
"homepage": "https://github.com/Crossbell-Box/crossbell-bridge#readme",
27+
"devDependencies": {
28+
"@nomiclabs/hardhat-ethers": "^2.0.6",
29+
"@nomiclabs/hardhat-etherscan": "^3.1.0",
30+
"@nomiclabs/hardhat-waffle": "^2.0.3",
31+
"@openzeppelin/contracts": "4.7.3",
32+
"@typechain/ethers-v5": "^7.0.1",
33+
"@typechain/hardhat": "^2.3.0",
34+
"@types/mocha": "^10.0.0",
35+
"auto-changelog": "^2.4.0",
36+
"chai": "^4.3.6",
37+
"dotenv": "^10.0.0",
38+
"ethereum-waffle": "^3.4.4",
39+
"ethers": "^5.6.9",
40+
"hardhat": "^2.10.1",
41+
"hardhat-contract-sizer": "^2.5.1",
42+
"hardhat-gas-reporter": "^1.0.4",
43+
"husky": "^8.0.0",
44+
"lint-staged": "^13.0.3",
45+
"prettier": "^2.3.1",
46+
"prettier-plugin-solidity": "^1.0.0-beta.13",
47+
"solidity-docgen": "^0.6.0-beta.16",
48+
"ts-node": "^10.9.1",
49+
"typechain": "^5.1.2",
50+
"typescript": "^4.7.4"
51+
}
52+
}

remappings.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@ensdomains/=node_modules/@ensdomains/
2+
@openzeppelin/=node_modules/@openzeppelin/
3+
ds-test/=lib/forge-std/lib/ds-test/src/
4+
eth-gas-reporter/=node_modules/eth-gas-reporter/
5+
forge-std/=lib/forge-std/src/
6+
hardhat/=node_modules/hardhat/

0 commit comments

Comments
 (0)