fireodermatt / Payment_streaming

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Payment streaming V1

Payment/salary streaming solution for our customers and partners. Able to stream USDT or USDC to a wallet address specified by their team member (payee). The payee receives their tokens by claiming them at any point.

Installing:

In the root folder to install all dependencies in the console/terminal, enter the command npm install, and after everything necessary will be installed.

    npm install 

Commands:

The main commands that are used when interacting in a project.
For compile the contract:

    npm run compile  

For testing the contract:

    npm run test  

Shows the smart contract coverage;

    npm run coverage  

Functions of the smart contract:

Create open stream instance with the params paying amounts of USDT or USDC:
createOpenStream();

Payee can claim tokens that are proportional to elapsed time (exactly seconds):
claim();

Terminating the stream instance:
terminate();

Deposit tokens:
deposit();

Shows accumulated amount in USDT or USDC:
accumulation();

Changing address of the payer:
changePayerAddress();

Changing address of the commission:
changeCommissionAddress();

Hint :

    // .env.example
    
    PRIVATE_KEY=<your_private_key>
    POLYGONSCAN_API_KEY=<your_API_key>
  • API key can be any of the other test/main networks.
  • For deploying the contract use hardhat run --network <network_name> scripts/deploy.js.
  • For verefication of the contract use npx hardhat verify <contract_address> "<addr_payer>" --network <network_name>.

About


Languages

Language:TypeScript 71.9%Language:Solidity 28.1%