diff --git a/.changeset/itchy-fireants-yell.md b/.changeset/itchy-fireants-yell.md new file mode 100644 index 0000000..470a4e6 --- /dev/null +++ b/.changeset/itchy-fireants-yell.md @@ -0,0 +1,5 @@ +--- +"create-arweave-app": patch +--- + +Update README & contract deploy script diff --git a/apps/cli/README.md b/apps/cli/README.md index 21fafa0..50b807c 100644 --- a/apps/cli/README.md +++ b/apps/cli/README.md @@ -93,7 +93,7 @@ bunx create-arweave-app@latest my-arweave-app --noGit --default ## Getting Started -First, run the development: +After creating a new project and installing the dependencies, run the development server: ```bash npm run dev @@ -107,7 +107,7 @@ bun dev ## Preview -After creating a new project and installing the dependencies, open [http://localhost:3000](http://localhost:3000) in your browser to see the result. +Open [http://localhost:3000](http://localhost:3000) in your browser to see the result. **Landing Page:** A form that allows users to upload Atomic assets on Arweave, complete with various metadata configurations. @@ -131,6 +131,15 @@ Building DApps from scratch can be a daunting task. From setting up the environm - **Atomic Assets and Contracts:** Each asset is paired with an associated contract, enabling alterations to the metadata and transfer of ownership. + The created project is initialized with a contract which is located at `src/contracts`. You can make necessary modifications to the contract code according to your needs and run the script `deploy-contracts` to automatically update the contract linked functionality to the new one. + + ```bash + # With wallet.json keyfile present at root + yarn deploy-contracts + # With keyfile present at a custom path + yarn deploy-contracts /Users/arweave/Documents/keys/wallet.json + ``` + - **View Page:** A space to showcase assets and metadata, augmented with features like [Stamps](https://stamps.arweave.dev/#/en/main) (Arweave's version of 'likes') and [on-chain comments](https://specs.ar-io.dev/#/view/SYCrxZYzhP_L_iwmxS7niejyeJ_XhJtN4EArplCPHGQ). ## Leverage Modularity diff --git a/apps/cli/template/next/common/README.md b/apps/cli/template/next/common/README.md index 915f38e..eff6363 100644 --- a/apps/cli/template/next/common/README.md +++ b/apps/cli/template/next/common/README.md @@ -40,6 +40,15 @@ Building DApps from scratch can be a daunting task. From setting up the environm - **Atomic Assets and Contracts:** Each asset is paired with an associated contract, enabling alterations to the metadata and transfer of ownership. + The created project is initialized with a contract which is located at `src/contracts`. You can make necessary modifications to the contract code according to your needs and run the script `deploy-contracts` to automatically update the contract linked functionality to the new one. + + ```bash + # With wallet.json keyfile present at root + yarn deploy-contracts + # With keyfile present at a custom path + yarn deploy-contracts /Users/arweave/Documents/keys/wallet.json + ``` + - **View Page:** A space to showcase assets and metadata, augmented with features like [Stamps](https://stamps.arweave.dev/#/en/main) (Arweave's version of 'likes') and [on-chain comments](https://specs.ar-io.dev/#/view/SYCrxZYzhP_L_iwmxS7niejyeJ_XhJtN4EArplCPHGQ). ## Leverage Modularity diff --git a/apps/cli/template/next/common/scripts/deploy.mjs b/apps/cli/template/next/common/scripts/deploy.mjs index 295ebc9..886c7fc 100644 --- a/apps/cli/template/next/common/scripts/deploy.mjs +++ b/apps/cli/template/next/common/scripts/deploy.mjs @@ -8,12 +8,14 @@ import replace from "replace-in-file"; import path from "path"; (async () => { + // *store with name 'wallet.json' in root direstory of project if needed + const walletPath = process.argv[2] ?? "wallet.json"; + // intiating new warp instance for mainnet const warp = WarpFactory.forMainnet().use(new DeployPlugin()); // read private key file - // *store with name 'wallet.json' in root direstory of project if needed - const key = JSON.parse(fs.readFileSync("wallet.json").toString()); + const key = JSON.parse(fs.readFileSync(walletPath).toString()); // get absolute path for project directory const __dirname = path.resolve(); diff --git a/apps/web/README.md b/apps/web/README.md index 915f38e..eff6363 100644 --- a/apps/web/README.md +++ b/apps/web/README.md @@ -40,6 +40,15 @@ Building DApps from scratch can be a daunting task. From setting up the environm - **Atomic Assets and Contracts:** Each asset is paired with an associated contract, enabling alterations to the metadata and transfer of ownership. + The created project is initialized with a contract which is located at `src/contracts`. You can make necessary modifications to the contract code according to your needs and run the script `deploy-contracts` to automatically update the contract linked functionality to the new one. + + ```bash + # With wallet.json keyfile present at root + yarn deploy-contracts + # With keyfile present at a custom path + yarn deploy-contracts /Users/arweave/Documents/keys/wallet.json + ``` + - **View Page:** A space to showcase assets and metadata, augmented with features like [Stamps](https://stamps.arweave.dev/#/en/main) (Arweave's version of 'likes') and [on-chain comments](https://specs.ar-io.dev/#/view/SYCrxZYzhP_L_iwmxS7niejyeJ_XhJtN4EArplCPHGQ). ## Leverage Modularity diff --git a/apps/web/scripts/deploy.mjs b/apps/web/scripts/deploy.mjs index 295ebc9..886c7fc 100644 --- a/apps/web/scripts/deploy.mjs +++ b/apps/web/scripts/deploy.mjs @@ -8,12 +8,14 @@ import replace from "replace-in-file"; import path from "path"; (async () => { + // *store with name 'wallet.json' in root direstory of project if needed + const walletPath = process.argv[2] ?? "wallet.json"; + // intiating new warp instance for mainnet const warp = WarpFactory.forMainnet().use(new DeployPlugin()); // read private key file - // *store with name 'wallet.json' in root direstory of project if needed - const key = JSON.parse(fs.readFileSync("wallet.json").toString()); + const key = JSON.parse(fs.readFileSync(walletPath).toString()); // get absolute path for project directory const __dirname = path.resolve();