How Does XeGram Work?
XeGram is powered entirely by a single smart contract written in Solidity and deployed on the decentralized XeChain blockchain. Every action—from account registration to posting, commenting, reacting, and following—is executed directly on-chain, ensuring complete transparency and immutability.
Permissionless & Adminless
There is no central authority controlling XeGram. All rules are enforced automatically by the smart contract code. This means every user has equal access, and no one can arbitrarily censor or ban content.
What Markdown Syntax is Supported?
XeGram supports a rich subset of Markdown to help you create engaging content. Key formatting rules include:
- Headings: Use one or more # symbols (e.g.,
# Heading
or## Subheading
). - Bold: Wrap text in double asterisks (e.g.,
**bold text**
). - Italics: Wrap text in single asterisks (e.g.,
*italic text*
). - Links: Format as
[Link text](https://example.com)
—all links open in a new tab. - Images: Embed images using

; images scale automatically. - Code Blocks: Use triple backticks (
```
) for multi-line code blocks. - Inline Code: Wrap inline code with single backticks (e.g.,
`code`
). - Lists: Create unordered lists using - or * and ordered lists using numbers.
- Blockquotes: Start a line with > for blockquotes.
Gas Fees & Costs
Using XeGram is free; however, every on-chain transaction (such as posting or commenting) requires a gas fee paid in the native XeChain token. These fees secure the network and help prevent spam.
Why Are There Gas Fees?
Gas fees compensate network validators and ensure that every transaction carries a real economic cost—protecting the network from abuse.
How Do I Register and Set Up My Profile?
To join XeGram, call the createAccount(nickname, username)
function with:
- Nickname: Your display name (cannot be empty).
- Username: Must be at least 5 characters long, contain only alphanumeric characters (a–z, 0–9), and is case-insensitive. Uppercase letters are automatically converted to lowercase. Usernames must be unique.
Once registered, you can update your profile fields (about, location, website, profile picture, cover picture, and pinned post) using dedicated update functions.
Username Requirements
The smart contract enforces strict username rules through an internal function:
- At least 5 characters long.
- Only lowercase letters (a–z) and digits (0–9) are allowed.
- Uppercase letters are automatically converted to lowercase.
- Usernames must be unique—once taken, no variant (regardless of case) can be used again.
Editing & Reposts
XeGram allows you to modify your on-chain content:
- Reposts: Share any post with an optional reposter note using
createRepost(globalPostId, reposterContent)
. - Editing: Update your content using
editPost(globalPostId, newContent)
for posts,editRepost(globalPostId, newReposterContent)
for reposts, andeditComment(globalPostId, commentId, newComment)
for comments.
Hiding Content
If you want to temporarily remove your content from public view without deleting it, use:
hidePost(globalPostId, true)
– to hide a post.hideComment(globalPostId, commentId, true)
– to hide a comment.
Hidden content is not permanently deleted and can be restored later.
Extra Profile Fields
Beyond your nickname and username, XeGram allows you to store additional profile details:
- About: A short bio or personal description.
- Location: Your geographical region.
- Website: A URL to your personal or business site.
- Profile & Cover Pictures: URLs to your images.
- Pinned Post: Feature one post on your profile.
Reactions
Express your approval or disapproval by “liking” or “disliking” posts and comments using:
reactToPost(globalPostId, reaction)
reactToComment(globalPostId, commentId, reaction)
The smart contract updates your reaction on-chain and adjusts like/dislike counts accordingly.
Pinning Posts
Pinning allows you to feature one of your posts at the top of your profile. Simply call pinPost(globalPostId)
to set or update your pinned post.
Following
To follow another user, use followUser(targetAddress, true)
and to unfollow, use followUser(targetAddress, false)
. The contract updates follower and following counts on-chain.
Note: The relationship is stored as a simple boolean value. For very large follower lists, future off-chain solutions may be introduced.
Adding XeChain to MetaMask
To add the XeChain network to your MetaMask wallet, follow the instructions on XeChain website.
XeChain Node & Wallet
To interact with XeGram, you need a Web3-compatible wallet (like MetaMask) connected to a XeChain node. This setup ensures that you can securely sign transactions and interact directly with the blockchain.
Censorship Resistance
XeGram is completely decentralized and adminless—no central authority can remove or censor your content. While you can hide your own posts or comments, no external party can delete or manipulate them.
Running Locally
XeGram is fully decentralized. You can clone the front-end repository and run it locally, or set up your own XeChain node with RPC enabled, ensuring that no central authority can block your access.
Contract Details
The XeGram smart contract is the backbone of the platform, handling user registration, posting, commenting, reactions, and social interactions—all directly on the XeChain blockchain.
Contract Address: 0xbdf9a7E50E824ef50D559090E905032Ae42FD1Db
Every state change and transaction is executed on-chain, ensuring transparency, security, and immutability.
User Comment History
XeGram tracks all your comments on-chain, maintaining a complete and transparent record of your interactions.