Gugupay is a decentralized payment solution on the Sui blockchain that enables merchants to easily receive payments from customers via QR codes. Customers can pay directly with their Sui wallet using Sui tokens, which are automatically converted to stablecoin-equivalent amounts based on live exchange rates from the Pyth oracle. This approach removes the need for customers to hold stablecoins, simplifying the payment process while ensuring the merchant receives a stable value. With Gugupay, merchants can offer a seamless, crypto-based payment method that's accessible and straightforward for customers.
This monorepo contains three main components:
gugupay2/
βββ contracts/ # Sui Move smart contracts
βββ sdk/ # TypeScript SDK for developers
βββ web/ # Web application (Astro + Svelte + React)
βββ package.json # Monorepo workspace configuration
Sui Move smart contracts built with Pyth Network integration for real-time price feeds.
Key Features:
- Shared object design for scalability
- Merchant registration and management
- Invoice creation with USD pricing
- Automatic SUI/USD conversion using Pyth oracles
- Payment processing and balance withdrawal
- Real-time payment events
Tech Stack:
- Sui Move (2024 edition)
- Pyth Network oracle integration
- Wormhole for cross-chain messaging
Commands:
cd contracts
sui move build # Build contracts
sui move test # Run tests
sui client publish # Deploy to networkView detailed contract documentation β
TypeScript SDK for integrating Gugupay payments into applications.
Key Features:
- Simple API for merchant and invoice management
- Automatic price conversion using Pyth
- Support for testnet and mainnet
- Type-safe interfaces
- Real-time price updates from Hermes
Installation:
npm install @gugupay/sdkQuick Example:
import { GugupayClient } from '@gugupay/sdk';
const client = new GugupayClient('testnet');
const txb = new Transaction();
// Create merchant
await client.createMerchantObject({
txb,
name: 'My Shop',
imageURL: 'https://example.com/logo.png',
callbackURL: 'https://myshop.com/callback',
description: 'My awesome shop'
});
// Create invoice
await client.createInvoice({
txb,
merchantId: 'merchant_id',
amount_usd: 10.0,
description: 'Product purchase'
});Tech Stack:
- TypeScript
- @mysten/sui SDK
- @pythnetwork/pyth-sui-js
Commands:
npm run sdk:build # Build SDKView detailed SDK documentation β
Modern web application providing merchant dashboard and payment interface.
Key Features:
- Merchant dashboard for managing payments
- QR code generation for payment links
- Real-time payment status updates
- Wallet integration (Sui wallets)
- Documentation site built-in
- Mobile-responsive payment interface
Tech Stack:
- Astro 4.x (Static site generation)
- Svelte 5.x (UI components)
- React 18.x (Some components)
- TailwindCSS + DaisyUI (Styling)
- Starlight (Documentation)
- Mersui (Sui wallet integration)
Pages:
/- Landing page/app- Merchant dashboard/pay- Payment interface/donate- Donation page with Mersui integration/docs- Full documentation
Commands:
npm run web # Start dev server
npm run web:build # Build for productionView web application README β
- Node.js 18+ and npm
- Sui CLI (for contract development)
- Git
- Clone the repository:
git clone https://github.com/yourusername/gugupay2.git
cd gugupay2- Install dependencies:
npm install- Build the SDK:
npm run sdk:build- Start the web application:
npm run webThe web app will be available at http://localhost:4321
cd contracts
sui move build
sui move testnpm run sdk:build # Build SDK after changesnpm run web # Hot reload enabled- Smart Contracts: See contracts/README.md
- SDK Documentation: See sdk/README.md
- Web App: See web/README.md
- Live Docs: Available at
/docswhen running the web app
Key environment variables are defined in:
sdk/src/const.ts- SDK constantscontracts/README.md- Contract addresses
Create .env in the web/ directory:
# See web/.env.example for required variables| Component | Technologies |
|---|---|
| Blockchain | Sui, Pyth Oracle, Wormhole |
| Smart Contracts | Sui Move |
| SDK | TypeScript, @mysten/sui |
| Frontend | Astro, Svelte, React, TailwindCSS |
| UI Framework | DaisyUI |
| Wallet | Mersui, @suiet/wallet-sdk |
| Documentation | Starlight |
βββββββββββββββββββββββββββββββββββββββββββββββ
β Web Application (Astro) β
β βββββββββββββββββββββββββββββββββββββββ β
β β Merchant Dashboard β Payment UI β β
β βββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββ
β Gugupay SDK (TypeScript) β
β βββββββββββββββββββββββββββββββββββββββ β
β β Client API β Type Definitions β β
β βββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββ
β Sui Blockchain + Smart Contracts β
β βββββββββββββββββββββββββββββββββββββββ β
β β Payment Store β Merchants β Inv. β β
β βββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββ
β Pyth Oracle (Price Feeds) β
βββββββββββββββββββββββββββββββββββββββββββββββ
Contributions are welcome! Please feel free to submit a Pull Request.
Apache-2.0
- Website: gugupay.io
- Documentation: Available at
/docsin the web app - GitHub: GitHub Repository