Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
dc43e0b
feat: 🎸 Initial commit
kostysh Apr 14, 2023
2a0f9c4
feat: 🎸 Added dev tools deps
kostysh Apr 17, 2023
077c583
feat: 🎸 Added .env example
kostysh Apr 17, 2023
19c543c
feat: 🎸 Updated Hardhat config
kostysh Apr 17, 2023
356d1eb
feat: 🎸 Added secrets workflow
kostysh Apr 17, 2023
e2ffa70
feat: 🎸 Added local network configuration
kostysh Apr 17, 2023
e478108
chore: 🤖 Added ./networks/volumes to gitignore
kostysh Apr 17, 2023
893ea81
chore: 🤖 Updated artifacts
kostysh Apr 17, 2023
296335a
chore: 🤖 Removed artifacts and cache
kostysh Apr 17, 2023
fff0893
chore: 🤖 Artifacts and cache added to gitignore
kostysh Apr 17, 2023
4cae03f
chore: 🤖 Updated repo linting configuration
kostysh Apr 17, 2023
aaf57b9
refactor: 💡 Added @matterlabs/hardhat-zksync-toolbox
kostysh Apr 17, 2023
f4f23df
test: 💍 Github test workflow updated
kostysh Apr 17, 2023
11bfa2e
chore: 🤖 Minor style changes
kostysh Apr 17, 2023
acd39e0
fix: 🐛 Fixed network configuration
kostysh Apr 17, 2023
14e71c3
feat: 🎸 Using non-upgradable oz version
kostysh Apr 17, 2023
1210a61
test: 💍 Tests for pausable
kostysh Apr 17, 2023
e55ef66
fix: 🐛 Fixed hardhat config
kostysh Apr 17, 2023
67ba495
fix: 🐛 NODE_ENV=test added to workflow env
kostysh Apr 17, 2023
28c47fb
chore: 🤖 Added test logs
kostysh Apr 17, 2023
2587944
fix: 🐛 Fixed testing error
kostysh Apr 17, 2023
13452a5
fix: 🐛 Removed NODE_ENV from test workflow script
kostysh Apr 17, 2023
590c3f2
fix: 🐛 Final test fix
kostysh Apr 17, 2023
19dcbe1
fix: 🐛 Fixed test:src command
kostysh Apr 17, 2023
6f57f74
test: 💍 Added tests template for test:src
kostysh Apr 17, 2023
09ac29e
Merge pull request #1 from kostysh/develop
kostysh Apr 17, 2023
6d4914e
feat: 🎸 Added DealsRegistry contracts and testing utils
kostysh Apr 19, 2023
7afb31a
Merge pull request #2 from kostysh/feat/deals-registry
kostysh Apr 19, 2023
b02c7c8
test: 💍 Added test for Deal creation (not finished)
kostysh Apr 20, 2023
524c24a
test: 💍 Updated tests for the DealsRegistry
kostysh Apr 21, 2023
e5d090f
Merge pull request #3 from kostysh/test/deals-registry
kostysh Apr 21, 2023
a528951
feat: 🎸 Added SuppliersREgistry contract
kostysh Apr 21, 2023
4c96823
Merge pull request #4 from kostysh/feat/suppliers-registry
kostysh Apr 21, 2023
ef3f9ab
test: 💍 Added tests for DealsRegistry and SuppliersRegistry
kostysh Apr 21, 2023
95d70cf
Merge pull request #5 from kostysh/test/deals-registry-2
kostysh Apr 21, 2023
e343ed5
test: 💍 More tests for SuppliersRegistry
kostysh Apr 24, 2023
4985ed7
Merge pull request #6 from kostysh/test/suppliers-tests2
kostysh Apr 24, 2023
878d800
feat: 🎸 Added `claim` feature with tests
kostysh Apr 26, 2023
2043cc6
Merge pull request #7 from kostysh/feat/deal-claim
kostysh Apr 26, 2023
dcabf8d
refactor: 💡 Fallback repo from zkSync to Hardhat
kostysh Apr 27, 2023
3064e9d
Merge pull request #8 from kostysh/refactor/remove-zksync
kostysh Apr 27, 2023
434e088
chore: 🤖 Minor repo config change
kostysh May 3, 2023
5fb7e77
feat: 🎸 Added deals redjection and cancellation functionality
kostysh May 3, 2023
1888eed
test: 💍 Added tests for deals rejection and cancellation
kostysh May 3, 2023
e51f1db
Merge pull request #9 from kostysh/feat/cancellation
kostysh May 3, 2023
b9a37a7
fix: 🐛 Fixed CheckedId typo, not CheckedIn
kostysh May 4, 2023
cbb1a5d
feat: 🎸 Added checkOut time to the offer
kostysh May 4, 2023
19bdcf0
feat: 🎸 Added refund and checkOut functions
kostysh May 4, 2023
43d1feb
test: 💍 Added tests for refund and checkOut functionality
kostysh May 4, 2023
5917514
Merge pull request #10 from kostysh/feat/checkout
kostysh May 4, 2023
9efe6df
chore: 🤖 Added more named accounts
kostysh May 5, 2023
bff822f
refactor: 💡 Refactored setup and utils
kostysh May 5, 2023
cf13f16
feat: 🎸 Implemented retailer flow
kostysh May 5, 2023
107ef44
test: 💍 Added tests for retailer flow
kostysh May 5, 2023
fedda58
Merge pull request #11 from kostysh/feat/retailers
kostysh May 5, 2023
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
5 changes: 5 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"@commitlint/config-conventional"
]
}
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# EditorConfig is awesome: https://EditorConfig.org

root = true

[*]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
17 changes: 17 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
NODE_ENV=test

# network specific node uri : `"ETH_NODE_URI_" + networkName.toUpperCase()`
ETH_NODE_URI_MAINNET=https://eth-mainnet.alchemyapi.io/v2/<apiKey>
# generic node uri (if no specific found) :
ETH_NODE_URI=https://{{networkName}}.infura.io/v3/<apiKey>

# network specific mnemonic : `"MNEMONIC_ " + networkName.toUpperCase()`
MNEMONIC_MAINNET=<mnemonic for mainnet>
# generic mnemonic (if no specific found):
MNEMONIC=<mnemonic>

# coinmarketcap api key for gas report
COINMARKETCAP_API_KEY=

# etherscan api key
ETHERSCAN_API_KEY=
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
node_modules
.github
dist
lib
build
coverage
typedoc
temp
artifacts-zk
cache-zk
artifacts
cache
./**/*.sol
14 changes: 14 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"plugins": ["@typescript-eslint"],
"parserOptions": {
"ecmaVersion": 2022,
"sourceType": "module",
"project": ["./tsconfig.json"]
},
"rules": {}
}
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.sol linguist-language=Solidity
*.ts linguist-language=Typescript
* text=auto eol=lf
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'triage needed'
assignees: ''
---

**⚠️ CAUTION: Any issue related to trading / price / not related with the code directly within this repository will be closed without comment**

**🆘 SECURITY: Any bug related to smart contract security should be addressed to security@windingtree.com**

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'triage needed'
assignees: ''
---

**⚠️ CAUTION: Any issue related to trading / price / not related with the code directly within this repository will be closed without comment**

**🆘 SECURITY: Any bug related to smart contract security should be addressed to security@windingtree.com**

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
Empty file.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release
on:
push:
branches:
- master
- beta
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Test
run: yarn test
- name: Build
run: yarn build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
17 changes: 17 additions & 0 deletions .github/workflows/secrets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Leaked Secrets Scan
on: [push, pull_request]
jobs:
TruffleHog:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: TruffleHog OSS
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: ${{ github.event.repository.default_branch }}
head: HEAD
extra_args: --debug --only-verified
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test
on:
push:
branches:
- develop
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Test
run: yarn test:src && yarn test:contracts
121 changes: 19 additions & 102 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,104 +1,21 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
.env*
!.env.example
node_modules
build
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port
lib
.eslintcache
.npmrc
*.log
temp
*.level
coverage
coverage.json
typedoc
artifacts-zk
cache-zk
artifacts
cache
typechain
network/volumes
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

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

npx lint-staged
4 changes: 4 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.{ts,js}": ["prettier --write", "eslint --cache --fix"],
"*.md": ["prettier --write"]
}
4 changes: 4 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extension": ["ts"],
"loader": "ts-node/register"
}
15 changes: 15 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
node_modules
.github
dist
lib
build
coverage
coverage.json
typedoc
temp
artifacts-zk
cache-zk
artifacts
cache
network
typechain
21 changes: 21 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"plugins": ["prettier-plugin-solidity", "prettier-plugin-jsdoc"],
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 90,
"tabWidth": 2,
"overrides": [
{
"files": "*.sol",
"options": {
"parser": "solidity-parse",
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
}
}
]
}
Loading