Skip to content

hackmoney-uf/defi-statements

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BlockRep

Application URL: https://defi-statements-8hzeah.spheron.app/

Table of Contents

Description

BlockRep (Blockchain Reporting) is a set of applications which allow you to collect transaction details and use it for more advanced analytics or prepare tax declaration reports.

How to use

  1. Go to the app https://defi-statements-8hzeah.spheron.app/
  2. "Connect wallet"
  3. "Statements"
  4. Pick the date range and "Request statement"
  5. Approve transaction in your wallet
  6. Wait until transaction handled and new statement link appeared on the page
  7. Use link to get your statement

Architecture and used dependencies

Current state

BlockRep

Potential further improvements

  • Enhanced transaction details. Such as USD price for ERC20.
  • Multichain support (and not only EVM).
  • Tax declarations ready to use per country.
  • Analytics: PnL, market value etc.

Build and deploy

Frontend

All commands executed in frontend directory

Install dependencies:

yarn

Run local:

yarn dev

Backend

All commands executed in backend directory

Requirements:

  • Java 17
  • Docker
  1. Update config params in src/main/java/org/example/Main.java
public static final String COVALENT_API_KEY="covalent api key";
public static final String NODE_PROVIDER_URL="node provider url";
public static final String CONTRACT_ADDRESS="address of deployed contract";
public static final String APP_PRIVATE_KEY="private key of the app";
public static final int CHAIN_ID=80001; // id of the chain to work with
public static final String IPFS_USER="username for IPFS provider";
public static final String IPFS_PASSWORD="password for IPFS provider";
public static final String IPFS_UPLOAD_URL="IPFS upload url";
  1. To run locally
# build the app
./gradlew clean build shadowJar
# build docker image
docker build -f Dockerfile -t 'block-rep' ./
# run the app via docker
docker run block-rep java -jar app.jar

Contracts

All commands executed in contract directory Install dependencies:

yarn

Run tests:

yarn test

Compile:

yarn build

Deploy

yarn deploy --network [localhost|polygonMumbai]