Pantra Contracts is a set of Lightlink smart contracts designed to provide users with a savings wallet that accumulates ETH on every transaction. These contracts powers the Pantra Smart Wallet mobile App. The contracts consists of three main components: PantraSavingWallet
, PantraWalletFactory
, and PantraSmartWalletNFT
. The Enterprise mode has been enabled for the PantraWalletFactory
and PantraSmartWalletNFT
contracts to allow for gassless wallet creation and NFT minting.
PantraSavingWallet
is the core contract responsible for storing ETH and managing user deposits and withdrawals.- Users can reset withdrawal intervals
DAILY
,WEEKLY
, orMONTHLY
. - Early withdrawals attracts a 1% fee.
PantraWalletFactory
is responsible forPantraSavingWallet
creation for each user.- Users interacts with the
PantraSavingWallet
contract through thePantraWalletFactory
. - Pegasus Deployment
PantraSmartWalletNFT
is an NFT (Non-Fungible Token) that gets minted by thePantraWalletFactory
on the user's first deposit into the savings wallet.- The NFT returns a
tokenURI
which contains an SVG representation of the user's wallet address and wallet balance from the associatedPantraSavingWallet
. - Pegasus Deployment
- Pegasus - 0x84A7BB3e3210F3F38eeF88615492f066917eCA37
- Phoenix - Coming Soon
- Pegasus - 0xF0c8355c1744532C1093f751847763191314992b
- Phoenix - Coming Soon
- Node.js installed on your machine
- Hardhat installation Link here
-
Clone the repository:
git clone <repository-url> cd pantra-contracts
-
Install dependencies:
npm install
Run Hardhat Tests:
npx hardhat test
Deploy contracts to a network (e.g., Lightlink Phoenix, Lightlink Pegasus):
- Create a .env file with the contents
PEGASUS_TESTNET_RPC_URL="https://replicator.pegasus.lightlink.io/rpc/v1"
PHEONIX_MAINNET_RPC_URL="https://replicator.phoenix.lightlink.io/rpc/v1"
PRIVATE_KEY=<PRIVATE_KEY OF THE CONTRACT DEPLOYER>
- Lightlink Testnet deployment
npx hardhat run scripts/deploy.ts --network testnet
- Lightlink Mainnet deployment
npx hardhat run scripts/deploy.ts --network mainnet
This project is licensed under the MIT License - see the LICENSE file for details.