Skip to content

Commit

Permalink
Merge pull request #23 from NethermindEth/wmm/dev
Browse files Browse the repository at this point in the history
scaffolding
  • Loading branch information
WiseMrMusa authored Nov 20, 2024
2 parents 188a85a + fc8488d commit 6c0928f
Show file tree
Hide file tree
Showing 105 changed files with 2,406 additions and 41 deletions.
40 changes: 18 additions & 22 deletions app/playground/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
import { useAccount, useConnect, useDisconnect } from 'starkweb/react'

import { getConfig } from '@/wagmi'
import { testAbi } from '@/utils/testAbi'
import { createWalletClient } from 'starkweb'
import { custom } from 'starkweb'
import { sepolia } from 'starkweb/chains'

const config = getConfig()

Expand Down Expand Up @@ -49,7 +45,7 @@ function App() {
<div>{status}</div>
<div>{error?.message}</div>
</div>
<Example />
{/* <Example /> */}
</>
)
}
Expand Down Expand Up @@ -77,22 +73,22 @@ const wagmiAbi = [
] as const


export async function Example() {
const walletClient = createWalletClient({
chain: sepolia,
transport: custom((window as any).starknet),
})
const _tx = await walletClient.writeContract({
address:
'0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7',
abi: wagmiAbi,
functionName: 'mint',
})
return (
<div>
<h1>Example</h1>
</div>
)
}
// export async function Example() {
// const walletClient = createWalletClient({
// chain: sepolia,
// transport: custom((window as any).starknet),
// })
// const _tx = await walletClient.writeContract({
// address:
// '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7',
// abi: wagmiAbi,
// functionName: 'mint',
// })
// return (
// <div>
// <h1>Example</h1>
// </div>
// )
// }

export default App
37 changes: 32 additions & 5 deletions app/starkweb/docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,38 @@ import { HomePage } from 'vocs/components'

<HomePage.Root>
<HomePage.Logo />
<HomePage.Tagline>My Awesome Docs</HomePage.Tagline>
<HomePage.InstallPackage name="vocs" type="init" />
<HomePage.Description>This is a description of my documentation website.</HomePage.Description>
<HomePage.Tagline>Build Starknet dApps with ease</HomePage.Tagline>
<HomePage.Description>
A collection of React hooks and utilities for Starknet development.
Type-safe, testable, and optimized for the best developer experience.
</HomePage.Description>

<HomePage.InstallPackage
name="starkweb"
type="init"
/>

{/* <HomePage.Features>
<HomePage.Feature
title="Type Safe"
description="Built with TypeScript. Infer types from ABIs and contract interactions."
/>
<HomePage.Feature
title="Hooks First"
description="20+ React hooks for wallets, contracts, transactions, and more."
/>
<HomePage.Feature
title="Developer Experience"
description="Auto-refresh on network changes, caching, request deduplication, and more."
/>
</HomePage.Features> */}

<HomePage.Buttons>
<HomePage.Button href="/getting-started" variant="accent">Get started</HomePage.Button>
<HomePage.Button href="https://github.com/wevm/vocs">GitHub</HomePage.Button>
<HomePage.Button href="/docs/getting-started" variant="accent">
Get Started
</HomePage.Button>
<HomePage.Button href="https://github.com/NethermindEth/starkweb">
GitHub
</HomePage.Button>
</HomePage.Buttons>
</HomePage.Root>
3 changes: 2 additions & 1 deletion app/starkweb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "starkweb",
"name": "www-starkweb",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vocs dev",
Expand Down
1 change: 1 addition & 0 deletions packages/create-starkweb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
46 changes: 46 additions & 0 deletions packages/create-starkweb/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "create-starkweb",
"description": "Create StarkWeb apps with one command",
"version": "0.0.3",
"repository": {
"type": "git",
"url": "https://github.com/NethermindEth/starkweb.git",
"directory": "packages/create-starkweb"
},
"type": "module",
"exports": {
"./package.json": "./package.json"
},
"scripts": {
"build": "pnpm run clean && pnpm run build:esm+types",
"build:esm+types": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationMap --declarationDir ./dist/types",
"clean": "rm -rf dist tsconfig.tsbuildinfo",
"dev": "bun src/cli.ts",
"test:build": "publint --strict",
"typecheck": "tsc --noEmit"
},
"files": [
"dist",
"templates",
"README.md"
],
"bin": {
"starkweb": "./dist/esm/cli.js"
},
"sideEffects": false,
"keywords": [],
"license": "MIT",
"devDependencies": {
"@types/node": "^20.14.9",
"typescript": "^5.5.2",
"@types/cross-spawn": "^6.0.6",
"@types/prompts": "^2.4.9"
},
"dependencies": {
"cac": "^6.7.14",
"cross-spawn": "^7.0.3",
"picocolors": "^1.0.1",
"prompts": "^2.4.2"
},
"contributors": ["Okhai Omotuebe <[email protected]>"]
}
Loading

0 comments on commit 6c0928f

Please sign in to comment.