Skip to content

Commit

Permalink
Merge pull request #16 from labscommunity/chore/update-readme-contract
Browse files Browse the repository at this point in the history
chore: Update README for contract modifications and deployment
  • Loading branch information
pawanpaudel93 authored Nov 9, 2023
2 parents 8c02ed4 + a18cfb4 commit 5abd50e
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/itchy-fireants-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-arweave-app": patch
---

Update README & contract deploy script
13 changes: 11 additions & 2 deletions apps/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand Down
9 changes: 9 additions & 0 deletions apps/cli/template/next/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions apps/cli/template/next/common/scripts/deploy.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
9 changes: 9 additions & 0 deletions apps/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions apps/web/scripts/deploy.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 5abd50e

Please sign in to comment.