Skip to content

Commit

Permalink
Fix CI pipeline for Axelar branch
Browse files Browse the repository at this point in the history
  • Loading branch information
MattWong-ca committed Nov 17, 2024
1 parent 23ed373 commit f47f9e5
Show file tree
Hide file tree
Showing 20 changed files with 689 additions and 16 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,25 @@ jobs:
node-version: ${{ matrix.node }}
cache: yarn

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Install dependencies
run: yarn install --immutable

- name: Run hardhat node, deploy contracts (& generate contracts typescript output)
run: yarn chain & yarn deploy
- name: Compile contracts
run: |
cd packages/hardhat
yarn hardhat clean
yarn compile
- name: Run nextjs lint
run: yarn next:lint --max-warnings=0
run: yarn next:lint

- name: Check typings on nextjs
run: yarn next:check-types

- name: Run hardhat lint
run: yarn hardhat:lint --max-warnings=0
run: yarn hardhat:lint
45 changes: 39 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,46 @@
# fil-frame
Quickstart your Filecoin dApp using this open source dev stack.
# FIL-Frame 🚀

Tutorial video: https://youtu.be/dzg7ygwAp1Q
Welcome to FIL-Frame, a starter repository designed to help developers quickly get started with building decentralized applications (dApps) on the Filecoin network. This repository provides various integration options, including an example template using Lighthouse.

Axelarscan (testnet): https://testnet.axelarscan.io/gmp/search?sourceChain=filecoin-2
## Table of Contents 📚

Filecoin Calibration faucet: https://faucet.calibnet.chainsafe-fil.io/
- Overview
- Getting Started
- Prerequisites
- Installation
- Configuration
- Usage
- Deploying smart contracts
- Running the frontend
- Storage Onramp Options
- Lighthouse
- Storacha
- Project Structure
- Contribution guidelines
- License

# Getting Started
## Overview 🌐

FIL-Frame is a monorepo that includes two main packages:

`hardhat`: Manages the blockchain-related aspects, including smart contract development, deployment, and testing.

`nextjs`: Handles the frontend and API aspects of the project using Next.js.

This repository is designed to be a quickstart for developers new to the Filecoin ecosystem, providing various integration options to suit different needs.

## Getting Started 🚀

### Prerequisites 📋

Before you begin, ensure you have the following installed:
- [Node.js](https://nodejs.org/en/download/package-manager) (v20.9.0)
- [Yarn](https://yarnpkg.com/getting-started/install)
- [Hardhat](https://hardhat.org/hardhat-runner/docs/getting-started#installation)

### Installation 💻

### From source code

1. Clone the repository:

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
"fork": "yarn workspace @fil-frame/hardhat fork",
"generate": "yarn workspace @fil-frame/hardhat run scripts/generateAccount.ts",
"flatten": "yarn workspace @fil-frame/hardhat flatten",
"lint": "yarn workspace @fil-frame/hardhat eslint --config ./.eslintrc.json --ignore-path ./.eslintignore ./*.ts ./deploy/**/*.ts ./scripts/**/*.ts ./test/**/*.ts",
"next:lint": "yarn workspace @fil-frame/hardhat eslint --config ./.eslintrc.json --ignore-path ./.eslintignore ./*.ts ./deploy/**/*.ts ./scripts/**/*.ts ./test/**/*.ts",
"next:check-types": "yarn workspace @fil-frame/nextjs check-types",
"lint-staged": "yarn workspace @fil-frame/hardhat eslint --config ./.eslintrc.json --ignore-path ./.eslintignore",
"format": "yarn workspace @fil-frame/hardhat prettier --write ./*.ts ./deploy/**/*.ts ./scripts/**/*.ts ./test/**/*.ts",
"verify": "yarn workspace @fil-frame/hardhat etherscan-verify",
"hardhat-verify": "yarn workspace @fil-frame/hardhat verify",
"hardhat:lint": "yarn workspace @fil-frame/hardhat lint",
"deploy": "yarn workspace @fil-frame/hardhat deploy",
"deploy:verify": "yarn workspace @fil-frame/hardhat deploy:verify",
"chain": "yarn workspace @fil-frame/hardhat chain",
Expand Down
8 changes: 8 additions & 0 deletions packages/hardhat/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# folders
artifacts
cache
contracts
node_modules/
typechain-types
# files
**/*.json
20 changes: 20 additions & 0 deletions packages/hardhat/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"env": {
"node": true
},
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "off",
"prettier/prettier": [
"warn",
{
"endOfLine": "auto"
}
]
}
}
19 changes: 19 additions & 0 deletions packages/hardhat/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"arrowParens": "avoid",
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "all",
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 80,
"tabWidth": 4,
"useTabs": true,
"singleQuote": false,
"bracketSpacing": true,
"explicitTypes": "always"
}
}
]
}
5 changes: 5 additions & 0 deletions packages/nextjs/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@
# More info: https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables
NEXT_PUBLIC_ALCHEMY_API_KEY=
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=
<<<<<<< HEAD
=======
LIGHTHOUSE_API_KEY=
WEB3_STORAGE_API_TOKEN=
>>>>>>> 993d799 (Fix CI pipeline)
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ export const AddressComponent = ({
<div className="bg-base-100 border-base-300 border shadow-md shadow-secondary rounded-3xl px-6 lg:px-8 mb-6 space-y-1 py-4 overflow-x-auto">
<div className="flex">
<div className="flex flex-col gap-1">
<Address address={address} format="long" onlyEnsOrAddress />
<Address address={address as `0x${string}`} format="long" onlyEnsOrAddress />
<div className="flex gap-1 items-center">
<span className="font-bold text-sm">Balance:</span>
<Balance address={address} className="text" />
<Balance address={address as `0x${string}`} className="text" />
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const ContractTabs = ({ address, contractData }: PageProps) => {

useEffect(() => {
const checkIsContract = async () => {
const contractCode = await publicClient.getBytecode({ address: address });
const contractCode = await publicClient.getBytecode({ address: address as `0x${string}` });
setIsContract(contractCode !== undefined && contractCode !== "0x");
};

Expand Down Expand Up @@ -85,8 +85,8 @@ export const ContractTabs = ({ address, contractData }: PageProps) => {
{activeTab === "code" && contractData && (
<AddressCodeTab bytecode={contractData.bytecode} assembly={contractData.assembly} />
)}
{activeTab === "storage" && <AddressStorageTab address={address} />}
{activeTab === "logs" && <AddressLogsTab address={address} />}
{activeTab === "storage" && <AddressStorageTab address={address as `0x${string}`} />}
{activeTab === "logs" && <AddressLogsTab address={address as `0x${string}`} />}
</>
);
};
Loading

0 comments on commit f47f9e5

Please sign in to comment.