Add token data
This guide explains how to add token images and metadata for the Shibarium token repository, which supports tokens on Ethereum, Sepolia, Shibarium, and Puppynet networks.
To contribute, refer to the official repository here.
Overview
The Shibarium Token Repository is structured to help manage token images and data across multiple networks within the Shiba Inu ecosystem. Each network has its own folder for token images and data, making it easy to find and update token information.
Repository Structure
The Shibarium token repository is organized by network, with subdirectories for images and data files. Below is the standard structure:
assets/
├── images/
│ ├── ethereum/
│ │ └── {tokenAddress}.png
│ ├── sepolia/
│ │ └── {tokenAddress}.png
│ ├── shibarium/
│ │ └── {tokenAddress}.png
│ └── puppynet/
│ └── {tokenAddress}.png
├── data/
│ ├── ethereum/
│ │ └── {tokenAddress}.json
│ ├── sepolia/
│ │ └── {tokenAddress}.json
│ ├── shibarium/
│ │ └── {tokenAddress}.json
│ └── puppynet/
│ └── {tokenAddress}.json
Each network directory (such as ethereum
, sepolia
, shibarium
, and puppynet
) has two main subdirectories:
- images/: Holds token images in PNG format.
- data/: Contains JSON files with token metadata.
Adding a New Token
To add a new token to the repository, follow these steps:
Step 1: Choose the Appropriate Network
Determine which network the token belongs to: Ethereum, Sepolia, Shibarium, or Puppynet.
Step 2: Prepare and Add the Token Image
- Location: Place the image in the appropriate directory under
assets/images/{network}/
. - File Naming: The image file should be named using the token's contract address in lowercase, followed by
.png
(e.g.,0x1234567890abcdef.png
). - File Size: Ensure the image file size is under 200 KB.
Step 3: Add Token Details (JSON)
-
Location: Place the JSON metadata file in the
assets/data/{network}/
directory. -
File Naming: Use the token contract address in lowercase as the file name, followed by
.json
(e.g.,0x1234567890abcdef.json
). -
File Format: The JSON file should follow the structure below:
{
"parentName": "BONE SHIBASWAP",
"parentSymbol": "BONE",
"parentContract": "0x9813037ee2218799597d83d4a5b6f3b6778218d9",
"childName": "Bone Token",
"childSymbol": "BONE",
"childContract": "0x0000000000000000000000000000000000001010",
"bridgeType": "plasma", // Type of bridge (e.g., plasma, pos)
"tokenWebsite": "https://example.com",
"projectDescription": "A token built to enhance decentralized finance on the Shiba ecosystem."
}
Step 4: Submit a Pull Request (PR)
Once you have added the image and JSON file, submit a pull request (PR) to the main branch of the repository with your changes. You can do this directly through the repository on GitHub. For more details on creating a PR, refer to GitHub's pull request guide.
Accessing Token Images and Data
After the PR is reviewed, approved, and merged, the token images and data will be accessible using the following URL formats:
-
Image URL:
https://cdn.shib.io/tokens/images/{network}/{contractAddress}.png
-
Data URL:
https://cdn.shib.io/tokens/data/{network}/{contractAddress}.json
Replace {network}
with one of ethereum
, sepolia
, shibarium
, or puppynet
, and {contractAddress}
with the token’s contract address in lowercase.
Example
For a token with the contract address 0x9813037ee2218799597d83d4a5b6f3b6778218d9
on Ethereum:
- Image:
https://cdn.shib.io/tokens/images/ethereum/0x9813037ee2218799597d83d4a5b6f3b6778218d9.png
- Data:
https://cdn.shib.io/tokens/data/ethereum/0x9813037ee2218799597d83d4a5b6f3b6778218d9.json
Contribution Guidelines
We encourage community contributions to the Shibarium Token Assets Repository and appreciate your attention to detail.
To ensure consistent token management, please follow these guidelines:
- Folder Naming: Use network names such as
ethereum
,sepolia
,shibarium
, andpuppynet
. - Image Naming: Name image files with the token address in lowercase, ending with
.png
. - Image Size: Ensure images are under 200 KB.
- JSON Format: Follow the specified JSON structure for each token metadata file.
- Contract Addresses: Double-check the contract addresses for accuracy and correct formatting.
Following these guidelines helps maintain uniformity and makes the review process smoother.