Skip to content

Commit

Permalink
SNS (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso authored Feb 27, 2024
1 parent c75c19f commit 407153f
Show file tree
Hide file tree
Showing 279 changed files with 149,513 additions and 6,210 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@ jobs:
run: |
DFXVM_INIT_YES=1 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
sudo cp $HOME/.local/share/dfx/bin/* /usr/bin
dfx extension install sns
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
target: wasm32-unknown-unknown
- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Unit Tests
run: cargo make test
- name: Deploy local
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: frontend

on: [push, pull_request]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: yarn --ignore-scripts
shell: bash
working-directory: ./src/ekoke_erc20_swap_frontend
- name: prettier
run: yarn prettier:check
working-directory: ./src/ekoke_erc20_swap_frontend
- name: lint
run: yarn lint
working-directory: ./src/ekoke_erc20_swap_frontend
- name: build
run: yarn build:release
working-directory: ./src/ekoke_erc20_swap_frontend
43 changes: 41 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ members = [
"src/did",
"src/dip721",
"src/deferred",
"src/ekoke",
"src/ekoke_erc20_swap",
"src/ekoke_liquidity_pool",
"src/ekoke_reward_pool",
"src/icrc",
"src/marketplace",
"src/xrc",
Expand All @@ -22,7 +24,6 @@ version = "0.1.0"
[workspace.dependencies]
anyhow = "1"
async-trait = "0.1"
bytes = "1.5"
candid = "0.10"
ethers-contract = { version = "2", default-features = false, features = [
"abigen",
Expand Down
36 changes: 26 additions & 10 deletions Makefile.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[env]
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true

[tasks.build]
[tasks.dfx-build]
description = "Build canisters"
dependencies = []
command = "dfx"
args = ["build"]
script = "./scripts/dfx-build.sh"
workspace = false

[tasks.run]
Expand All @@ -25,13 +24,13 @@ workspace = false
[tasks.integration-tests]
description = "Run integration tests"
script = "./scripts/integration-tests.sh"
dependencies = ["did", "build"]
dependencies = ["did", "dfx-build"]
workspace = false

[tasks.deploy-local]
description = "Deploy testnet with dfx"
script = "./scripts/deploy_local.sh"
dependencies = ["dfx-setup", "build", "did"]
dependencies = ["dfx-setup", "dfx-build", "did"]
workspace = false

[tasks.lint]
Expand All @@ -52,17 +51,34 @@ args = ["fmt", "--all", "--", "--check"]

[tasks.did]
description = "Generate did files"
dependencies = ["deferred-did", "ekoke-did", "marketplace-did", "dfx-generate"]
dependencies = [
"deferred-did",
"ekoke-erc20-swap-did",
"ekoke-liquidity-pool-did",
"ekoke-reward-pool-did",
"marketplace-did",
"dfx-generate",
]
workspace = false

[tasks.deferred-did]
description = "Generate did files for deferred"
script = "cargo run --bin deferred-did --features did > src/deferred/deferred.did"
workspace = false

[tasks.ekoke-did]
description = "Generate did files for ekoke"
script = "cargo run --bin ekoke-did --features did > src/ekoke/ekoke.did"
[tasks.ekoke-erc20-swap-did]
description = "Generate did files for ekoke-erc20-swap"
script = "cargo run --bin ekoke-erc20-swap-did --features did > src/ekoke_erc20_swap/ekoke-erc20-swap.did"
workspace = false

[tasks.ekoke-liquidity-pool-did]
description = "Generate did files for ekoke-liquidity-pool"
script = "cargo run --bin ekoke-liquidity-pool-did --features did > src/ekoke_liquidity_pool/ekoke-liquidity-pool.did"
workspace = false

[tasks.ekoke-reward-pool-did]
description = "Generate did files for ekoke-reward-pool"
script = "cargo run --bin ekoke-reward-pool-did --features did > src/ekoke_reward_pool/ekoke-reward-pool.did"
workspace = false

[tasks.marketplace-did]
Expand All @@ -78,5 +94,5 @@ workspace = false

[tasks.dfx-setup]
description = "setup dfx"
script = "dfx stop; dfx start --background; dfx canister create deferred; dfx canister create ekoke; dfx canister create marketplace"
script = "./scripts/dfx-setup.sh"
workspace = false
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,51 @@

![CI state](https://github.com/EKOKEtoken/ekoke/workflows/build-test/badge.svg)
![Ethereum](https://github.com/EKOKEtoken/ekoke/workflows/ethereum/badge.svg)
![Frontend](https://github.com/EKOKEtoken/ekoke/workflows/frontend/badge.svg)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)

<img src="./docs/images/logo.png" alt="deferred logo" width="128" />
<img src="./assets/images/deferred-logo.png" alt="deferred logo" width="128" />

<img src="./docs/images/ekoke-logo.png" alt="ekoke logo" width="128" />
<img src="./assets/images/ekoke-logo.png" alt="ekoke logo" width="128" />

<img src="./docs/images/icp-logo.svg" alt="icp-logo" width="128" />
<img src="./assets/images/icp-logo.svg" alt="icp-logo" width="128" />

Powered by **Internet Computer**

---

- [EKOKE](#ekoke)
- [Introduction](#introduction)
- [Project Purpose](#project-purpose)
- [Project components](#project-components)
- [Documentation](#documentation)
- [Get started](#get-started)
- [Project structure](#project-structure)
- [Changelog](#changelog)
- [License](#license)

---

## Introduction
## Documentation

### Project Purpose
Read the [Project Documentation](./docs/README.md)

The project aims to facilitate the sale of a property between two or more parties, referred to in this document as A (seller) and B (buyer/s), using NFTs that serve as promissory notes.
## Get started

### Project components

Deferred consists of three main canisters:

- **Deferred**: This NFT canister is used to define the sell of a real estate between two parts (the buyer and the seller).
- **EKOKE Token**: A fungible token ERC20-like, deflationary, used as an incentive to promote the buying of the NFTs and the adoption of the "Deferred method".
- **Marketplace**: A D-APP which permits to trade Deferred NFTs.
...

## Project structure

The project is composed by the following components:

- **deferred**: A DIP721 ICP canister which represents the Deferred NFTs.
- **Ekoke**: A ICRC-2 token ICP canister which represents the fungible token $EKOKE.
- **Marketplace**: A canister which manages the Deferred tokens sell.
- **RegisterUI**: A website for the real estate agency to register sell-contracts.
- **MarketplaceUI**: A website for the marketplace canister, where the users can buy and sell theirs Deferreds.
- **Ekoke-Swap**: A simple web canister to swap Ekoke tokens between ERC20 <> ICRC2 token
- **EKOKE**: A ICRC-2 token ICP canister which represents the fungible token $EKOKE.
- **ekoke-erc20-swap**: Canister to swap EKOKE between ICRC and ERC20
- **ekoke-erc20-swap-frontend**: Frontend for erc20-swap canister
- **ekoke-liquidity-pool**: Canister which manages the EKOKE liquidity pool
- **ekoke-reward-pool**: Canister which handles the reward pool for EKOKE
- **marketplace**: A canister which manages the Deferred tokens sell and $EKOKE rewards giveaway.

## Changelog

Read [CHANGELOG](./CHANGELOG.md)

## License

Expand Down
Loading

0 comments on commit 407153f

Please sign in to comment.