Smart contracts for the Stabolut Ecosystem (USB Token), implementing the ERC-865 standard for zero-gas pre-signed meta-transactions on Arbitrum and XDC.
- 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.
- Node.js:
>= 18.x(nodejs.org) - Testnet ETH / XDC: For deploying and funding relayer accounts on Arbitrum Sepolia or XDC Apothem.
git clone https://github.com/Stabolut/smartcontracts.git
cd smartcontracts
npm installnpx hardhat compileCompilation artifacts and ABIs will be generated in artifacts/.
Create your .env file:
cp .env.example .envEdit .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.networknpm run deploy:arbitrum-sepolianpm run deploy:xdc-apothemAfter deployment, copy the contract address and update:
mobile/src/common/strings.js(contractAddress)backend/.env(ARB_CONTRACT_ADDRESS/XDC_CONTRACT_ADDRESS)
Contributions are welcome! Please see CONTRIBUTING.md for testing and development guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.