Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
This repository uses a CLI tool for managing CAIP-19 contract metadata and icons.

**Main commands:**
- `npm run asset:set` - Add or update an asset
- `npm run asset:verify` - Verify asset files
- `npm run asset:list` - List assets in a namespace
- `yarn asset:set` - Add or update an asset
- `yarn asset:verify` - Verify asset files
- `yarn asset:list` - List assets in a namespace

For detailed usage, parameters, examples, and workflow, refer to the canonical documentation in `.github/copilot-instructions.md`.
22 changes: 12 additions & 10 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

This repository uses a CLI tool (`cli-update-asset.js`) to manage contract metadata and icons following the CAIP-19 standard.

Install dependencies first with `yarn` (the repo pins them via `yarn.lock`, which is what CI installs from).

### Available Commands

#### 1. Add or Update an Asset
Expand All @@ -12,33 +14,33 @@ Use the `set` command to add a new asset or update an existing one:

```bash
# Add a new asset with all required fields
npm run asset:set -- \
yarn asset:set \
--caip "eip155:1/erc20:0xTOKEN_ADDRESS" \
--name "Token Name" \
--symbol "SYMBOL" \
--decimals 18 \
--image ./path/to/logo.svg

# Add or update labels for an asset
npm run asset:set -- \
yarn asset:set \
--caip "eip155:1/erc20:0xTOKEN_ADDRESS" \
--labels "stable_coin,blue_chip"

# Or use a direct URL for the image
npm run asset:set -- \
yarn asset:set \
--caip "eip155:1/erc20:0xTOKEN_ADDRESS" \
--name "Token Name" \
--symbol "SYMBOL" \
--decimals 18 \
--image "https://example.com/logo.png"

# Update only specific fields of an existing asset
npm run asset:set -- \
yarn asset:set \
--caip "eip155:1/erc20:0xTOKEN_ADDRESS" \
--name "Updated Token Name"

# Update just the image
npm run asset:set -- \
yarn asset:set \
--caip "eip155:1/erc20:0xTOKEN_ADDRESS" \
--image ./new-logo.svg
```
Expand Down Expand Up @@ -67,7 +69,7 @@ npm run asset:set -- \
Check if an asset's metadata and icon files are valid:

```bash
npm run asset:verify -- \
yarn asset:verify \
--caip "eip155:1/erc20:0xTOKEN_ADDRESS"
```

Expand All @@ -77,16 +79,16 @@ List all assets in a specific namespace:

```bash
# List all Ethereum Mainnet assets
npm run asset:list -- --namespace "eip155:1"
yarn asset:list --namespace "eip155:1"

# List all Polygon assets
npm run asset:list -- --namespace "eip155:137"
yarn asset:list --namespace "eip155:137"
```

### Workflow

1. **Add or update** an asset using `npm run asset:set`
2. **Verify** the changes using `npm run asset:verify`
1. **Add or update** an asset using `yarn asset:set`
2. **Verify** the changes using `yarn asset:verify`
3. **Rebuild** the contract-map.json: `node buildindex.js`
4. **Review** the changes in git
5. **Commit and push** your changes
Expand Down
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
This repository uses a CLI tool for managing CAIP-19 contract metadata and icons.

**Main commands:**
- `npm run asset:set` - Add or update an asset
- `npm run asset:verify` - Verify asset files
- `npm run asset:list` - List assets in a namespace
- `yarn asset:set` - Add or update an asset
- `yarn asset:verify` - Verify asset files
- `yarn asset:list` - List assets in a namespace

For detailed usage, parameters, examples, and workflow, refer to the canonical documentation in `.github/copilot-instructions.md`.