Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Day committed Jan 20, 2025
1 parent 69c668c commit b4ea011
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 25 deletions.
42 changes: 42 additions & 0 deletions examples/demo-canvas/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "create-patchwork-canvas",
"version": "0.1.0",
"private": true,
"type": "commonjs",
"scripts": {
"dev": "pnpm www-dev && pnpm ponder-dev",
"build": "pnpm --filter ./www build",
"start": "pnpm next-start && pnpm ponder-start",
"ponder-dev": "pnpm --filter ./ponder dev",
"ponder-start": "pnpm --filter ./ponder start",
"www-dev": "pnpm --filter ./www dev",
"www-start": "pnpm --filter ./www start",
"lint": "pnpm -r lint",
"codegen": "pnpm --filter ./ponder codegen",
"typecheck": "tsc"
},
"workspaces": [
"ponder",
"www"
],
"dependencies": {},
"devDependencies": {
"@openzeppelin/contracts": "5.0.2",
"@patchworkdev/common": "0.3.2",
"@patchworkdev/contracts": "2.0.6",
"@patchworkdev/pdk": "0.3.0",
"@types/node": "^20.17.10",
"@wagmi/cli": "^2.1.18",
"chalk": "^5.3.0",
"eslint": "^8.53.0",
"eslint-config-next": "14.2.5",
"eslint-config-ponder": "^0.5.17",
"forge-std": "github:foundry-rs/forge-std",
"typescript": "^5.2.2",
"tsx": "^4.7.1",
"viem": "2.21.51"
},
"engines": {
"node": ">=18.14"
}
}
37 changes: 13 additions & 24 deletions examples/demo-canvas/patchwork.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/// <reference types="https://cdn.jsdelivr.net/npm/@patchworkdev/[email protected]/dist/types/index.d.ts" />

import { Feature } from '@patchworkdev/common/types';
import { ponder, react } from '@patchworkdev/pdk/plugins';
import { PatchworkProject } from '@patchworkdev/pdk/types';
import { Feature, ProjectConfig } from '@patchworkdev/common/types';

const projectConfig: PatchworkProject = {
const projectConfig: ProjectConfig = {
name: 'canvas',
contracts: {
Canvas: {
Expand Down Expand Up @@ -69,29 +67,20 @@ const projectConfig: PatchworkProject = {
},
],
networks: {
base: {
chainId: 8453,
local: {
chain: 'anvil',
rpc: 'http://anvil:8545',
},
},
plugins: [ponder(), react({})],
deployments: [
{
network: 'base',
contracts: {
Canvas: {
name: 'Canvas',
address: '0x4e110000000003FaC58d6F09DbA701181Bb67738',
block: 5302131,
},
Bubble: {
name: 'Bubble',
address: '0xB0Bb1eb0bb1E823D6eFfd2ED7Fdb67A78995AE7c',
block: 5302131,
},
},
testnet: {
chain: 'baseSepolia',
rpc: 'http://anvil:8545',
},
],
mainnet: {
chain: 'base',
rpc: 'http://anvil:8545',
},
},
plugins: [{ name: 'ponder' }, { name: 'react' }],
};

export default projectConfig;
2 changes: 1 addition & 1 deletion packages/create-patchwork/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async function createPatchwork(configFile: string | undefined, options: CreatePa
options: [
{ value: 'default', label: 'Default', hint: 'Basic starter template you can start customizing' },
{ value: 'demo-composable-pfp', label: 'Composable PFP demo', hint: 'Dynamic NFT app where users compose PFPs from minted traits' },
//{ value: 'demo-canvas', label: 'Canvas demo', hint: 'Collaborative NFT app where users attach elements to a single NFT' },
{ value: 'demo-canvas', label: 'Canvas demo', hint: 'Collaborative NFT app where users attach elements to a single NFT' },
{ value: 'custom', label: 'Custom config file', hint: 'Provide your own patchwork.config.ts file' },
],
});
Expand Down

0 comments on commit b4ea011

Please sign in to comment.