Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/deploy-be-ethereum.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy Smart Contract to Goerli

on:
push:
branches:
- master # ou o nome da sua branch principal

jobs:
deploy-contract:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14' # ou a versão que você está usando

- name: Install Dependencies
run: npm install

- name: Compile and Test Contracts
run: npm run test

- name: Deploy Contract to Goerli
run: npx hardhat run ./scripts/deploy.js --network goerli --config hardhat.goerli.config.js
env:
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
22 changes: 22 additions & 0 deletions .github/workflows/deploy-fe-vercel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Deploy to Vercel

on:
push:
branches:
- master # ou o nome da sua branch principal

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Deploy to Vercel
uses: amondnet/vercel-action@v19
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: govinda777
vercel-project-id: dappazon
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ typechain-types
cache
artifacts

.vercel
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

echo "Running tests..."
yarn test
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: end-of-file-fixer
160 changes: 160 additions & 0 deletions MER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@

## Mapeamento dos Dados
---

**Data in Sanity CMS**:

* **Product**:
- Type
- Id
- Stock
- Price
- Category
- Seller_Id
- Description
- Banner
- ImageList (List of images)
- CreationDate
- UpdateDate
- Status

* **Storefront**:
- Seller_Id
- Category
- Id
- ProductList (List of Product IDs)

* **Seller**:
- Id
- Logo
- Banner
- Name
- Desc

---

**Data on the Blockchain**:

* **Seller**:
- Id
- Token_Id
- List[Payment_Method_Id]

* **Payment_Method**:
- Id
- Name
- Tax

* **Order**:
- Id
- List[Product_Ids]
- Seller_Id
- Buyer_Id

* **Dappazon.sol**:
- Id
- Product_Ids (Product IDs)
- Seller_Id
- Payment_Id
- Token_Id (opcional)
- Buyer_Id

* **Token**:
- Type (ERC20 | NFT)
- Id
- Quantity
- AnchorValue
- Seller_Id

---
erDiagram

Product ||--o{ Storefront : contains
Seller ||--o{ Product : sells
Seller ||--o{ Storefront : owns
Seller ||--o{ Order : sells
Seller ||--o{ Transaction : transacts
Seller ||--o{ Token : owns
Payment_Method ||--o{ Seller : usedBy
Order ||--o{ Transaction : initiates
Product ||--o{ Order : orderedIn
Product ||--o{ Transaction : transactedIn
Token ||--o{ Transaction : usedIn

Product {
string Type
string Id
int Stock
float Price
string Category
string Seller_Id
string Description
string Banner
List ImageList
datetime CreationDate
datetime UpdateDate
string Status
}

Storefront {
string Seller_Id
string Category
string Id
List ProductList
}

Seller {
string Id
string Logo
string Banner
string Name
string Desc
}

Seller {
string Id
string Token_Id
List Payment_Method_Id
}

Payment_Method {
string Id
string Name
float Tax
}

Order {
string Id
List Product_Ids
string Seller_Id
string Buyer_Id
}

Transaction {
string Id
string Product_Ids
string Seller_Id
string Payment_Id
string Token_Id
string Buyer_Id
}

Token {
string Type
string Id
int Quantity
float AnchorValue
string Seller_Id
}

---

- Cryptocurrency Exchange - Entidade onde o cliente irá trocar nossas moedas por REAL, REAL pelas moedas

* Fluxo

ETH
XPERIENCE COIN
XPERIENCE COIN - Seller Id

---
Loading