Skip to content

Commit

Permalink
Merge branch 'challenge-base' into nadai/simple-nft-update
Browse files Browse the repository at this point in the history
  • Loading branch information
gianalarcon committed Aug 13, 2024
2 parents e9f79d8 + 0262c90 commit c925ad1
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 385 deletions.
64 changes: 0 additions & 64 deletions .github/workflows/demo.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/deploy.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/lint.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ name: Next.js CI
on:
push:
paths:
- "packages/snfoundry/contracts/**"
- "packages/nextjs/**"
pull_request:
branches:
- main
paths:
- "packages/nextjs/**"
- "packages/snfoundry/contracts/**"

jobs:
ci:
Expand All @@ -23,6 +25,19 @@ jobs:
- name: Checkout
uses: actions/checkout@master

- name: Install scarb
run: curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v 2.6.5

- name: Install snfoundryup
run: curl -L https://raw.githubusercontent.com/foundry-rs/starknet-foundry/master/scripts/install.sh | sh

- name: Install snforge
run: snfoundryup -v 0.27.0

- name: Run snforge tests
run: snforge test
working-directory: ./packages/snfoundry/contracts

- name: Setup node env
uses: actions/setup-node@v3
with:
Expand All @@ -34,6 +49,9 @@ jobs:
run: yarn install --immutable
working-directory: ./packages/nextjs

- name: Check Code Format
run: yarn format:check

- name: Run Next.js lint
run: yarn next:lint --max-warnings=0
working-directory: ./packages/nextjs
Expand Down
114 changes: 0 additions & 114 deletions .github/workflows/release-create-stark.yaml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/test_contract.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ss-2",
"version": "0.2.6",
"version": "0.2.10",
"author": "Q3 Labs",
"license": "MIT",
"private": true,
Expand Down
9 changes: 6 additions & 3 deletions packages/nextjs/app/debug/_components/contract/ContractUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { useReducer } from "react";
import { ContractReadMethods } from "./ContractReadMethods";
// import { ContractWriteMethods } from "./ContractWriteMethods";
import { Address, Balance } from "~~/components/scaffold-stark";
import { useDeployedContractInfo } from "~~/hooks/scaffold-stark";
import {
useDeployedContractInfo,
useNetworkColor,
} from "~~/hooks/scaffold-stark";
import { useTargetNetwork } from "~~/hooks/scaffold-stark/useTargetNetwork";
import { ContractName } from "~~/utils/scaffold-stark/contract";
import { ContractVariables } from "./ContractVariables";
Expand Down Expand Up @@ -52,12 +55,12 @@ export const ContractUI = ({
<div
className={`grid grid-cols-1 lg:grid-cols-6 px-6 lg:px-10 lg:gap-12 w-full max-w-7xl my-0 ${className}`}
>
<div className="col-span-5 grid grid-cols-1 lg:grid-cols-3 gap-8 lg:gap-10 ">
<div className="col-span-5 grid grid-cols-1 lg:grid-cols-3 gap-8 lg:gap-10">
<div className="col-span-1 flex flex-col">
<div className="bg-transparent border-gradient rounded-[5px] px-6 lg:px-8 mb-6 space-y-1 py-4">
<div className="flex">
<div className="flex flex-col gap-1">
<span className="font-bold text-neutral">{contractName}</span>
<span className="font-bold">{contractName}</span>
<Address address={deployedContractData.address} />
<ClassHash
classHash={deployedContractData.classHash}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { useState, useRef, useEffect } from "react";
import { useState, useRef, useEffect, useCallback } from "react";
import { Abi } from "abi-wan-kanabi";
import { Address } from "@starknet-react/chains";
import {
Expand Down Expand Up @@ -38,7 +38,7 @@ export const ReadOnlyFunctionForm = ({
functionName: abiFunction.name,
abi: [...abi],
args: inputValue ? inputValue.flat(Infinity) : [],
enabled: false,
enabled: Boolean(inputValue),
parseArgs: false,
blockIdentifier: "pending" as BlockNumber,
});
Expand All @@ -59,14 +59,14 @@ export const ReadOnlyFunctionForm = ({
);
});

const handleRead = () => {
const handleRead = useCallback(() => {
const newInputValue = getParsedContractFunctionArgs(form, false);
if (JSON.stringify(form) !== JSON.stringify(lastForm.current)) {
setInputValue(newInputValue);
lastForm.current = form;
}
refetch();
};
}, [form, refetch]);

return (
<div className="flex flex-col gap-3 py-5 first:pt-0 last:pb-1">
Expand Down
27 changes: 1 addition & 26 deletions packages/nextjs/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,32 +66,7 @@ export const Footer = () => {
Fork me
</a>
</div>
<span>·</span>
{/* <div className="flex justify-center items-center gap-2">
<p className="m-0 text-center">
Built with <HeartIcon className="inline-block h-4 w-4" /> by
</p>
<a
className="flex justify-center items-center gap-1"
href="https://quantum3labs.com/"
target="_blank"
rel="noreferrer"
>
<BuidlGuidlLogo className="w-3 h-5 pb-1" />
<span className="link">Q3 Labs</span>
</a>
<p className="m-0 text-center">at</p>
<a
className="flex justify-center items-center gap-1"
href="https://buidlguidl.com/"
target="_blank"
rel="noreferrer"
>
<BuidlGuidlLogo className="w-3 h-5 pb-1" />
<span className="link">BuidlGuidl</span>
</a>
</div>
<span>·</span> */}

<div className="text-center">
<a
href="https://t.me/+wO3PtlRAreo4MDI9"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { useDisconnect, useNetwork, useConnect } from "@starknet-react/core";
import { getStarknetPFPIfExists } from "~~/utils/profile";
import useConditionalStarkProfile from "~~/hooks/useConditionalStarkProfile";
import { useTheme } from "next-themes";
import { useEffect } from "react";

const allowedNetworks = getTargetNetworks();

Expand Down
Loading

0 comments on commit c925ad1

Please sign in to comment.