Skip to content

Commit

Permalink
Dex (#17)
Browse files Browse the repository at this point in the history
* refactor: 🎨 change domain and binary

* chore: lint issue fix

* feat: define proto and generate types

* feat: define poolmanager

* feat: create pool/add liquidity scaffold and types

* feat: ✨ create pool

* feat: implement swap function

* feat: integration toolsuit setup

* fix: 🎨 lint issue fix

* ci: 🧪 add ci/cd for golint and group testing

* test: 🧪 add message validation testcases

* chore: lint fix

* chore: decrease testgroup

* chore: decrease testgroup

* chore: remove docker image build

* chore: add release ci/cd

* chore: build yml

* chore: remove arm archietecture

* chore: add integration testcases

* chore: lint issue fix

* chore: stable swap

* feat: ✨ add stable swap algorithm

* chore: fix lint issue

* chore: fix testcase issue

* chore: address problems

* chore: add slippage confirmation in swap

* chore: fix lint issue

* chore: fix testcase issues

* chore: fix lint issue

* test: 🎨 update create/add liquidity testcases

* test: 🎨 add swap tests about stable pool

* chore: add all testcases

* chore: add pool queries
  • Loading branch information
soring323 authored Sep 14, 2023
1 parent d05ddca commit 7e3560c
Show file tree
Hide file tree
Showing 100 changed files with 12,279 additions and 225 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{sh,Makefile}]
indent_style = tab

[*.proto]
indent_style = space
indent_size = 2

37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build
# Tests runs different tests (test_abci_apps, test_abci_cli, test_apps)
# This workflow runs on every push to main or release branch and every pull requests
# All jobs will pass without running if no *{.go, .mod, .sum} files have been modified
on:
pull_request:
push:
branches:
- develop

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
goarch: ["amd64"]
goos: ["linux"]
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.20"
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/*.go
"!test/"
go.mod
go.sum
Makefile
- name: install
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} make build
if: "env.GIT_DIFF != ''"
35 changes: 0 additions & 35 deletions .github/workflows/docker-image.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Golang Linter
# Lint runs golangci-lint over the entire WMBFT repository.
#
# This workflow is run on every pull request and push to main.
#
# The `golangci` job will pass without running if no *.{go, mod, sum}
# files have been modified.
#
# To run this locally, simply run `make lint` from the root of the repo.

on:
pull_request:
push:
branches:
- develop

jobs:
golangci:
name: golangci-lint
runs-on: ubuntu-latest
timeout-minutes: 8
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: golangci/golangci-lint-action@v3
with:
version: v1.51
args: --timeout 10m
github-token: ${{ secrets.github_token }}
if: env.GIT_DIFF
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This workflow creates a release using goreleaser
# via the 'make release' command.

name: Create release
on:
push:
tags:
- v*
permissions:
contents: write
jobs:
release:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.inputs.release_tag }}
- name: Make release
run: |
sudo rm -rf dist
make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test
on:
pull_request:
push:
paths:
- "**.go"
branches:
- develop

jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
part: ["00", "01", "02"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.20"
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.go
"!test/"
go.mod
go.sum
Makefile
- name: Run Go Tests
run: |
make test-group-${{ matrix.part }} NUM_SPLIT=6
if: env.GIT_DIFF
48 changes: 0 additions & 48 deletions JOIN_TESTNEWORK.md

This file was deleted.

Loading

0 comments on commit 7e3560c

Please sign in to comment.