Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stabolut Smart Contracts

License: MIT Solidity Hardhat

Smart contracts for the Stabolut Ecosystem (USB Token), implementing the ERC-865 standard for zero-gas pre-signed meta-transactions on Arbitrum and XDC.


🌟 Key Features

  • ERC-20 Compliant: Full balance, transfer, allowance, and event standard compliance.
  • ERC-865 Gasless Meta-Transactions:
    • transferPreSigned: Token holders sign transfers offline; a backend relayer submits the transaction on-chain and collects a small USB fee.
    • approvePreSigned: Gasless token spend approvals.
    • getTransferPreSignedHash: Helper function to construct EIP-712 compatible signing hashes.
  • Controlled Mint & Burn: Restricted minting and burning mechanisms for backing and staking reward distributions.

💻 Prerequisites

  • Node.js: >= 18.x (nodejs.org)
  • Testnet ETH / XDC: For deploying and funding relayer accounts on Arbitrum Sepolia or XDC Apothem.

🚀 Step-by-Step Setup Guide

1. Clone & Install Dependencies

git clone https://github.com/Stabolut/smartcontracts.git
cd smartcontracts
npm install

2. Compile Contracts

npx hardhat compile

Compilation artifacts and ABIs will be generated in artifacts/.


🚀 Deployment Guide

Step 1: Configure Deployment Secrets

Create your .env file:

cp .env.example .env

Edit .env with your deployer private key and RPC URLs:

PRIVATE_KEY=your_deployer_private_key_without_0x
ARB_RPC_URI=https://sepolia-rollup.arbitrum.io/rpc
XDC_RPC_URI=https://rpc.apothem.network

Step 2: Deploy to Arbitrum Sepolia Testnet

npm run deploy:arbitrum-sepolia

Step 3: Deploy to XDC Apothem Testnet

npm run deploy:xdc-apothem

After deployment, copy the contract address and update:

  1. mobile/src/common/strings.js (contractAddress)
  2. backend/.env (ARB_CONTRACT_ADDRESS / XDC_CONTRACT_ADDRESS)

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for testing and development guidelines.


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Smart contract repository for USB Token, designed to enable gasless transactions and secure transfers between wallets. Implements robust functionality to ensure efficient and reliable transactions on the blockchain.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages