Skip to content

Commit

Permalink
Merge pull request #70 from FIL-Builders/update-akave-ci
Browse files Browse the repository at this point in the history
Feat: Add CI to Akave Integration
  • Loading branch information
xBalbinus authored Nov 25, 2024
2 parents e2e5160 + a1c2526 commit 32cc806
Show file tree
Hide file tree
Showing 16 changed files with 77 additions and 20 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Lint
on:
push:
branches:
- main
- '*'
pull_request:
branches:
- main
Expand All @@ -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
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"
}
}
]
}
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}`} />}
</>
);
};
2 changes: 1 addition & 1 deletion packages/nextjs/components/assets/BlueBox.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function BlueBox(props) {
export default function BlueBox(props: any) {
return (
<svg
{...props}
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/components/assets/Logo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function Logo(props) {
export default function Logo(props: any) {
return (
<svg
{...props}
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/components/assets/LogoLandscape.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function LogoLandscape(props) {
export default function LogoLandscape(props: any) {
return (
<svg
{...props}
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/components/assets/LogoWithText.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function LogoWithText(props) {
export default function LogoWithText(props: any) {
return (
<svg
{...props}
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/components/assets/RedArrow.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function RedArrow(props) {
export default function RedArrow(props: any) {
return (
<svg
{...props}
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/components/assets/RedPopBox.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function RedPopBox(props) {
export default function RedPopBox(props: any) {
return (
<svg
{...props}
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/components/assets/YellowCircle.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function YellowCircle(props) {
export default function YellowCircle(props: any) {
return (
<svg
{...props}
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/components/svg/Logo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function Logo(props) {
export default function Logo(props: any) {
return (
<svg
{...props}
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/components/svg/LogoLandscape.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function LogoLandscape(props) {
export default function LogoLandscape(props: any) {
return (
<svg
{...props}
Expand Down

0 comments on commit 32cc806

Please sign in to comment.