This quick start guide will walk you through deploying and interacting with your own LoyaltyPoint contract. Follow the steps below to set up your loyalty points system quickly.Documentation Index
Fetch the complete documentation index at: https://docs.galxe.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, ensure you have the following tools and dependencies installed:- Foundry: Install Foundry by following the instructions at https://book.getfoundry.sh/getting-started/installation
Contract Deployment
Step 1: Clone the Repository
Step 2: Install Dependencies
Step 3: Compile Contracts
Step 4: Deploy your own LoyaltyPoint
Set up necessary environment variables:FACTORY_ADDRESSis the address of the deployed LoyaltyPointFactory contract on the network you are deploying to. For example, on Gravity Alpha Testnet Sepolia, the factory address is0x8a85eC5AE1ae2c757eEfBb10b1203C984120bf8c.PRIVATE_KEYis the private key of the owner address.OWNERis the owner address of the LoyaltyPoint contract.MINTERis the minter address of the LoyaltyPoint contract.
rpc-urlis the RPC URL of the network you are deploying to. For example, on Gravity Alpha Testnet Sepolia, the RPC URL ishttps://rpc-sepolia.gravity.xyz.- Example deployed contract: 0x6B08B2fC665F766193A0cB9a64bcfB8beaac03D4
Interacting with the LoyaltyPoint Contract
Mint Loyalty Points to user
Using theMINTER address, you can mint loyalty points to a user:
Set up necessary environment variables:
PRIVATE_KEYis the private key of the MINTER address.LOYALTY_POINT_ADDRESSis the address of the deployed LoyaltyPoint contract.USER_ADDRESSis the address of the user to mint points to.
- Example mint transaction: https://explorer.gravity.xyz/tx/0xc45af104acfc9f33df4a3ab877e114441113ad77cedb7044b789dad506970ac5