Send and recieve Tokens as a stream https://frontend-v2-fluxtream.vercel.app/dashboard
This repository contains code written in the Aptos Move language, implementing various functions and structures for managing streaming transactions. The Move language is utilized within the Aptos blockchain framework.
The codebase within this repository focuses on creating and managing streaming transactions using the Aptos Move language. It implements functionalities for initiating streams, managing sender and receiver details, calculating balances, and checking the existence of streams.
To utilize this code:
- Environment Setup: Ensure you have the necessary environment set up to execute Aptos Move code.
- Compilation: Compile the code using Aptos Move compiler.
- Deployment: Deploy the compiled code onto the Aptos blockchain or execute in a simulated environment.
- Initializes the module with necessary tables for sender streams, receiver streams, and user balances.
- Creates a stream transaction between a sender and receiver with specified parameters like flow rate and duration.
- Checks if sender streams are present for a particular user.
- Checks if receiver streams are present for a particular user.
- Retrieves a list of streams initiated by a specific sender.
- Retrieves a list of streams received by a specific receiver.
- Calculates the current balance considering active streams and their flow rates.
FluXtream_transaction
: Represents a streaming transaction with sender, receiver, flow rate, start and end times.DifferenceAmount
: Holds information about the difference in amounts, tagged as positive or negative.UserBalances
: Table structure for storing user balances.Sender_streams
andReceiver_streams
: Tables storing sender and receiver transactions respectively.FlowingBalance
: Structure to manage flowing balances, considering flow rates and stream activity.
Currently, the repository provides a commented-out test function (test_create_friend
) for creating a stream transaction. To test this function, follow the provided instructions within the code.
Contributions to enhance functionalities, fix bugs, or optimize code are welcome! Fork the repository, make your changes, and submit a pull request.