Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Challenge-base last Version Scaffold Stark #99

Merged
merged 51 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d3b75e7
Add postinstall (#187)
jrcarlos2000 Jul 11, 2024
bf86a2e
feat: Add cyberpunk style (#181)
GabrielaDelPilarR Jul 12, 2024
0954e0a
Fix correctly display wallet connectors (#189)
danielcdz Jul 14, 2024
8659c38
Changes in styles (#191)
GabrielaDelPilarR Jul 16, 2024
1c9aa03
Add correctly display wallet connectors in new style (#192)
Nadai2010 Jul 17, 2024
fe7eaae
Removed all mention of Goerli and all associated packages (#193)
Ugo-X Jul 17, 2024
df5f867
Update README.md
GabrielaDelPilarR Jul 17, 2024
bb0c32e
workflow to update create-stark in every PR (#195)
edulanasca Jul 18, 2024
dcf1e5c
chore(release): 0.0.3 [skip ci]
github-actions[bot] Jul 18, 2024
051bec6
update: wallet not deployed in ui & deploy.ts (#196) [minor]
edulanasca Jul 19, 2024
0525ed0
chore(release): 0.1.0 [skip ci]
github-actions[bot] Jul 19, 2024
5c1b40e
devops(demo): support scaffol-stark-demo workflow (#199)
oceanlvr Jul 20, 2024
b51c207
Update CONTRIBUTING.md (#201)
0xquantum3labs Jul 21, 2024
ffeb461
chore(release): 0.1.1 [skip ci]
github-actions[bot] Jul 21, 2024
d1097a2
Fix botton Wallet Not Deployed (#203)
Nadai2010 Jul 23, 2024
cba6bc4
Update package.json (#204)
jrcarlos2000 Jul 23, 2024
5621fa2
chore(release): 0.1.2 [skip ci]
github-actions[bot] Jul 23, 2024
2ad3b6a
lint to validate deployContract (#198)
edulanasca Jul 23, 2024
ed0b2ba
chore(release): 0.1.3 [skip ci]
github-actions[bot] Jul 23, 2024
783a64e
Support for latest versions : v2 Release (#165) [minor]
0xquantum3labs Jul 28, 2024
f3b9656
chore(release): 0.2.0 [skip ci]
github-actions[bot] Jul 28, 2024
4a8d170
Update rpc (#206)
0xquantum3labs Jul 28, 2024
b12b6e9
chore(release): 0.2.1 [skip ci]
github-actions[bot] Jul 28, 2024
8ba39e2
chore : remove submodule (#207)
0xquantum3labs Jul 28, 2024
5fee13e
chore(release): 0.2.2 [skip ci]
github-actions[bot] Jul 28, 2024
63ccf8f
Update readme (#208)
0xquantum3labs Jul 28, 2024
7149cb4
chore(release): 0.2.3 [skip ci]
github-actions[bot] Jul 28, 2024
21a9edc
Update readme (#221)
GabrielaDelPilarR Jul 30, 2024
9f65b18
chore(release): 0.2.4 [skip ci]
github-actions[bot] Jul 30, 2024
57494b3
feat: improved faucet functionality and added sepolia faucets (#222)
Ayoazeez26 Jul 31, 2024
cd4ab1a
Feat/set and integrate blockexplorer (#225)
Ayoazeez26 Aug 1, 2024
3918641
Improve deploy function on deploy-contract.ts (#231)
ikemHood Aug 3, 2024
6bb817c
fix : format
jrcarlos2000 Aug 6, 2024
35efe94
feat: add support for STRK balance (#226) [skip ci]
raizo07 Aug 7, 2024
1b910bd
Update readme (#240) [skip ci]
gianalarcon Aug 8, 2024
77f50dc
chore(release): 0.2.5 [skip ci]
github-actions[bot] Aug 8, 2024
9265529
Added yarn deploy:reset script to reset deployments (#233)
josephchimebuka Aug 8, 2024
c222129
Improve contract (#242)
gianalarcon Aug 8, 2024
c436d25
chore(release): 0.2.6 [skip ci]
github-actions[bot] Aug 8, 2024
ff68a53
Update integration base-challenge
Nadai2010 Aug 9, 2024
3119596
Update format test
Nadai2010 Aug 9, 2024
c65a684
Update Readme
Nadai2010 Aug 9, 2024
761c086
Sync Branch
Nadai2010 Aug 9, 2024
2a9e205
Update fixed in file format
Nadai2010 Aug 9, 2024
3a070da
Update fixed duplicate
Nadai2010 Aug 9, 2024
86fb48f
Remove file
Nadai2010 Aug 9, 2024
407031f
Update last PR232 ClassHash
Nadai2010 Aug 10, 2024
6684b95
Add Contracts and update Readme
Nadai2010 Aug 10, 2024
8af7620
fixed format
Nadai2010 Aug 10, 2024
e2a98a4
Update path logo Header
Nadai2010 Aug 11, 2024
55631dd
Remove TestContact
Nadai2010 Aug 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ jobs:
run: yarn install --immutable
working-directory: ./packages/nextjs

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

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

- name: Run Next.js lint
run: yarn next:lint --max-warnings=0
working-directory: ./packages/nextjs
Expand All @@ -50,4 +44,4 @@ jobs:

- name: Build Next.js project
run: yarn build
working-directory: ./packages/nextjs
working-directory: ./packages/nextjs
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Before you begin, you need to install the following tools:

### Compatible versions

- Scarb - v2.5.4
- Snforge - v0.25.0
- Cairo - v2.5.4
- Scarb - v2.6.5
- Snforge - v0.27.0
- Cairo - v2.6.4

Make sure you have the compatible versions otherwise refer to [Scaffold-Stark Requirements](https://github.com/Quantum3-Labs/scaffold-stark-2?.tab=readme-ov-file#requirements)

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ss-2",
"version": "0.2.3",
"version": "0.2.6",
"author": "Q3 Labs",
"license": "MIT",
"private": true,
Expand All @@ -13,6 +13,7 @@
"scripts": {
"chain": "yarn workspace @ss-2/snfoundry chain",
"deploy": "yarn workspace @ss-2/snfoundry deploy",
"deploy:reset": "yarn workspace @ss-2/snfoundry deploy:reset",
"test": "yarn workspace @ss-2/snfoundry test",
"compile": "yarn workspace @ss-2/snfoundry compile",
"start": "yarn workspace @ss-2/nextjs dev",
Expand Down
14 changes: 11 additions & 3 deletions packages/nextjs/app/debug/_components/contract/ContractUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ 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";
import { ContractWriteMethods } from "./ContractWriteMethods";
import { ClassHash } from "~~/components/scaffold-stark/ClassHash";

type ContractUIProps = {
contractName: ContractName;
Expand Down Expand Up @@ -51,13 +55,17 @@ 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}
size="xs"
/>
<div className="flex gap-1 items-center">
<span className="font-bold text-sm">Balance:</span>
<Balance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export const ReadOnlyFunctionForm = ({
</div>
)}
</div>

<div
className={`flex ${
formErrorMessage &&
Expand Down
10 changes: 10 additions & 0 deletions packages/nextjs/app/debug/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ const Debug: NextPage = () => {
return (
<>
<DebugContracts />
{/* <div className="text-center mt-8 bg-secondary p-10">
<h1 className="text-4xl my-0">Debug Contracts</h1>
<p className="text-neutral">
You can debug & interact with your deployed contracts here.
<br /> Check{" "}
<code className="italic bg-base-300 text-base font-bold [word-spacing:-0.5rem] px-1">
packages / nextjs / app / debug / page.tsx
</code>{" "}
</p>
</div> */}
</>
);
};
Expand Down
72 changes: 49 additions & 23 deletions packages/nextjs/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import React from "react";
import Link from "next/link";

import {
CurrencyDollarIcon,
MagnifyingGlassIcon,
} from "@heroicons/react/24/outline";
import { CurrencyDollarIcon } from "@heroicons/react/24/outline";
import { useTargetNetwork } from "~~/hooks/scaffold-stark/useTargetNetwork";
import { useGlobalState } from "~~/services/store/store";
import { devnet } from "@starknet-react/chains";
import { Faucet } from "./scaffold-stark";
import { getBlockExplorerLink } from "~~/utils/scaffold-stark";
import { devnet, sepolia, mainnet } from "@starknet-react/chains";
import { Faucet } from "~~/components/scaffold-stark/Faucet";
import { FaucetSepolia } from "~~/components/scaffold-stark/FaucetSepolia";
import { BlockExplorerSepolia } from "./scaffold-stark/BlockExplorerSepolia";
import { BlockExplorer } from "./scaffold-stark/BlockExplorer";

/**
* Site footer
Expand All @@ -20,12 +18,14 @@ export const Footer = () => {
);
const { targetNetwork } = useTargetNetwork();
const isLocalNetwork = targetNetwork.id === devnet.id;
const isSepoliaNetwork = targetNetwork.id === sepolia.id;
const isMainnetNetwork = targetNetwork.id === mainnet.id;

return (
<div className="min-h-0 py-5 px-1 mb-11 lg:mb-0 bg-base-100">
<div>
<div className="fixed flex justify-between items-center w-full z-10 p-4 bottom-0 left-0 pointer-events-none ">
<div className="flex md:flex-row gap-2 pointer-events-auto text-[12px] sm:text-[16px]">
<div className="fixed flex justify-between items-center w-full z-10 p-4 bottom-0 left-0 pointer-events-none">
<div className="flex flex-col md:flex-row gap-2 pointer-events-auto">
{nativeCurrencyPrice > 0 && (
<div>
<div className="btn btn-sm font-normal gap-1 cursor-auto border border-[#32BAC4] shadow-none">
Expand All @@ -34,27 +34,28 @@ export const Footer = () => {
</div>
</div>
)}
{isSepoliaNetwork && (
<>
<FaucetSepolia />
<BlockExplorerSepolia />
</>
)}
{isLocalNetwork && (
<>
<Faucet />
<Link
href={getBlockExplorerLink(targetNetwork)}
target={"_blank"}
rel={"noopener noreferrer"}
passHref
className="btn btn-sm font-normal gap-1 border border-[#32BAC4] shadow-none"
>
<MagnifyingGlassIcon className="h-4 w-4 text-[#32BAC4]" />
<span>Block Explorer</span>
</Link>
</>
)}
{isMainnetNetwork && (
<>
<BlockExplorer />
</>
)}
</div>
</div>
</div>
<div className="w-full ">
<ul className="menu menu-horizontal w-full ">
<div className="flex justify-center items-center gap-2 text-sm w-full ">
<div className="w-full">
<ul className="menu menu-horizontal w-full">
<div className="flex justify-center items-center gap-2 text-sm w-full">
<div className="text-center">
<a
href="https://github.com/Quantum3-Labs/scaffold-stark-2"
Expand All @@ -66,6 +67,31 @@ export const Footer = () => {
</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
4 changes: 2 additions & 2 deletions packages/nextjs/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { devnet } from "@starknet-react/chains";
import { SwitchTheme } from "./SwitchTheme";
import { useAccount, useProvider } from "@starknet-react/core";

export type HeaderMenuLink = {
type HeaderMenuLink = {
label: string;
href: string;
icon?: React.ReactNode;
Expand Down Expand Up @@ -71,13 +71,13 @@ export const HeaderMenuLinks = () => {
export const Header = () => {
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
const burgerMenuRef = useRef<HTMLDivElement>(null);

useOutsideClick(
burgerMenuRef,
useCallback(() => setIsDrawerOpen(false), []),
);
const { targetNetwork } = useTargetNetwork();
const isLocalNetwork = targetNetwork.id === devnet.id;

const { provider } = useProvider();
const { address, status } = useAccount();
const [isDeployed, setIsDeployed] = useState(true);
Expand Down
30 changes: 0 additions & 30 deletions packages/nextjs/components/MenuItem/MenuItem.tsx

This file was deleted.

7 changes: 7 additions & 0 deletions packages/nextjs/components/SwitchTheme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ export const SwitchTheme = ({ className }: { className?: string }) => {
<div
className={`flex space-x-2 h-5 items-center justify-center text-sm border-l border-neutral px-4 ${className}`}
>
{/* <input
id="theme-toggle"
type="checkbox"
className="toggle toggle-primary bg-primary hover:bg-primary border-primary"
onChange={handleToggle}
checked={isDarkMode}
/> */}
{
<label
htmlFor="theme-toggle"
Expand Down
Loading