Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devcon RC1 #124

Open
wants to merge 57 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
e8e43c2
send and recieve envelop, fix sm and client tests (#112)
youngbbcoconut Sep 26, 2024
67a4c8f
inject wallet for testing in StoreProfile
youngbbcoconut Oct 11, 2024
352c6bc
separate authenticate from connect in client (#116)
youngbbcoconut Oct 14, 2024
3e1302a
separating subscription requests
youngbbcoconut Oct 15, 2024
e438c00
remove ObjectTypes from frontend
youngbbcoconut Oct 15, 2024
d0b1886
implement rainbowkit for create store page
youngbbcoconut Sep 26, 2024
aa393cb
adding success toast component
youngbbcoconut Oct 23, 2024
6ce5f5e
useChain for shopPublicClient (#118)
cryptix Oct 23, 2024
0dd5fba
UI frontend changes
youngbbcoconut Oct 23, 2024
637ad2e
convert to deno
wanderer Oct 24, 2024
76f4df1
clean up typing
cryptix Oct 27, 2024
46094fc
stateManager fixes
wanderer Oct 30, 2024
d1f66a0
various cleanup
cryptix Oct 31, 2024
67472af
various fixes
youngbbcoconut Nov 5, 2024
112c7ec
HACK: override viem's rpc url because sepolia is down
cryptix Nov 4, 2024
a9985a0
update usdc addresses
cryptix Nov 4, 2024
5272b87
glitchtip
cryptix Nov 4, 2024
91b8036
dont catch just to debug
cryptix Nov 4, 2024
d2b8bac
logging and error cleanup
cryptix Nov 4, 2024
7ac4ef6
various cleanup
cryptix Nov 5, 2024
dca50f3
replace npm:debug with simple function
cryptix Nov 5, 2024
ba349d3
small design updates
youngbbcoconut Nov 5, 2024
59d370f
rename item to listing
youngbbcoconut Nov 6, 2024
d16c3db
setting committed order ID
youngbbcoconut Nov 6, 2024
aba8946
adding payee for all accepted currency chains
youngbbcoconut Nov 6, 2024
070026d
use withClient to ensure clientSM exits
youngbbcoconut Nov 6, 2024
a8ec17a
merge whoops
cryptix Nov 6, 2024
fe943ae
use breadcrumbs for debug
cryptix Nov 6, 2024
c0c1523
fix CI
cryptix Nov 6, 2024
24f6249
await leveldb being loaded
cryptix Nov 6, 2024
b8c64e6
fix leveldb init race
cryptix Nov 6, 2024
105e348
This adds matomo analytics
wanderer Nov 6, 2024
ec6914f
add NEXT_PUBLIC_MATOMO_URL
cryptix Nov 6, 2024
a8cbca0
basic frontend tests working (#128)
wanderer Nov 10, 2024
fe81e41
resolving bad merges (#130)
youngbbcoconut Nov 10, 2024
3796688
run formatter (#139)
wanderer Nov 11, 2024
cfbe0f8
moved webstream pollyfill back to client/stream.ts
wanderer Nov 11, 2024
d97de17
Fix decimals on sepolia (#141)
cryptix Nov 11, 2024
0efc0eb
Linting (#143)
wanderer Nov 11, 2024
89bf922
order detail updates and fix lint (#145)
youngbbcoconut Nov 12, 2024
532cf61
updating guest products view
youngbbcoconut Nov 12, 2024
c03369f
add erc20 transfer to SendTransaction
cryptix Nov 12, 2024
4ca2224
using approve and pay
youngbbcoconut Nov 12, 2024
e83917d
use shopId from UserContext
youngbbcoconut Nov 12, 2024
942547c
typing PaymentArgs
youngbbcoconut Nov 12, 2024
da9a688
checkout testing: wait for confirmation from relay
cryptix Nov 12, 2024
ce4d524
move PaymentArgs
cryptix Nov 12, 2024
2f64c8e
started cleaning up blockchain;
wanderer Nov 12, 2024
8b6396b
products customer view updates
youngbbcoconut Nov 13, 2024
26072c8
fix getPayment functions
cryptix Nov 13, 2024
9c725d8
dynamic call args for console debugging calls
cryptix Nov 13, 2024
fd1c366
hide visibility for unpublished items
youngbbcoconut Nov 13, 2024
bfbe23f
statemanager not found error
youngbbcoconut Nov 13, 2024
0f9e19e
fixing case sensitive file name
youngbbcoconut Nov 13, 2024
0255c96
setting up loading state for checkout flow
youngbbcoconut Nov 13, 2024
ac3425e
link to etherscan for orderHash and txHash
youngbbcoconut Nov 13, 2024
6ed5bb1
show timestamp for paid orders
youngbbcoconut Nov 13, 2024
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
2 changes: 1 addition & 1 deletion .github/actions/checkout/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ inputs:
ssh-key:
description: SSH key used to fetch the repository
fallback-branch:
default: "main"
default: "shipping"
required: false
type: string

Expand Down
55 changes: 23 additions & 32 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,30 +59,36 @@ jobs:
with:
flake-lock-path: Tennessine/packages/client/flake.lock

- name: Build all packages
run: nix develop -c bash -c "pnpm i && tsc -b"
working-directory: Tennessine

- name: Check Formatting
run: nix develop -c bash -c "pnpm lint"
working-directory: Tennessine

- name: Check Linting
run: nix develop -c bash -c "pnpm lint"
working-directory: Tennessine/packages/client

- name: Extract branch name for other checkouts
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

- name: Installing deps
run: nix develop -c bash -c "deno install"
working-directory: Tennessine/

- name: Run Lint
run: nix develop -c bash -c "deno lint"
working-directory: Tennessine/

- name: Run fomating check
run: nix develop -c bash -c "deno fmt --check"
working-directory: Tennessine/

# TODO: add frontend to this
- name: Type Check packages
run: nix develop -c bash -c "deno check packages/{blockchain,client,contracts,schema,stateManager,utils}"
working-directory: Tennessine/

- name: git clone relay
uses: ./Tennessine/.github/actions/checkout
with:
repository: masslbs/relay
ssh-key: ${{ secrets.SSH_CHECKOUT_RELAY }}
ref: ${{ steps.extract_branch.outputs.branch }}
path: relay
fallback-branch: no-event-deduplication

- name: Compile relay
run: nix build '.#relay'
Expand Down Expand Up @@ -114,28 +120,13 @@ jobs:
curl http://localhost:5001/api/v0/version -X POST
curl http://localhost:8545/ -X POST -H 'content-type: application/json' --data-raw '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":0}'

- name: Run node tests on client
run: nix develop -c bash -c "pnpm exec vitest --watch=false"
working-directory: Tennessine/packages/client

- name: Run node tests on blockchain
run: nix develop -c bash -c "pnpm exec vitest --watch=false"
working-directory: Tennessine/packages/blockchain

- name: Run node tests on mmr
run: nix develop -c bash -c "pnpm exec vitest --watch=false"
working-directory: Tennessine/packages/mmr

- name: Run browser tests
run: nix develop -c bash -c "pnpm exec vitest --browser --watch=false"
working-directory: Tennessine/packages/client
- name: Run tests
# sentry logger needs homedir
run: nix develop -c bash -c "deno test -A packages/{blockchain,client,contracts,schema,stateManager,utils} --no-check"
working-directory: Tennessine/

- name: build frontend
run: nix develop -c bash -c "pnpm build"
working-directory: Tennessine/packages/frontend

- name: Run UI tests frontend
run: nix develop -c bash -c "pnpm exec vitest --watch=false"
run: nix develop -c bash -c "deno run -A --unstable-unsafe-proto npm:next build --no-lint"
working-directory: Tennessine/packages/frontend

- name: Upload frontend to Pinata
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dist-ssr
*.njsproj
*.sln
*.sw?
.zed

# direvn
.direnv
Expand All @@ -38,4 +39,4 @@ dist-ssr
packages/frontend/out

# test Level DB
packages/stateManager/tmpDb
packages/stateManager/tmpDb
6 changes: 0 additions & 6 deletions .prettierignore

This file was deleted.

13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# 2024-06-10

- Created a new Class "BlockchainClient" in @massmarket/client. This class contains the common functions needed to interact with the contacts. It is instantiated automatically when creating a new instance of the RelayClient as the `relayClient.blockchain` property.
- Created a new Class "BlockchainClient" in @massmarket/client. This class
contains the common functions needed to interact with the contacts. It is
instantiated automatically when creating a new instance of the RelayClient as
the `relayClient.blockchain` property.

- Created a new package @massmarket/tsconfig. This package contains the common typescript configuration for all the packages in the MassMarket project.
- Created a new package @massmarket/tsconfig. This package contains the common
typescript configuration for all the packages in the MassMarket project.

- Added [project references](https://www.typescriptlang.org/docs/handbook/project-references.html) to the root package.json. This allows us to build all the packages at once using `tsc -b`
- Added
[project references](https://www.typescriptlang.org/docs/handbook/project-references.html)
to the root package.json. This allows us to build all the packages at once
using `tsc -b`
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ SPDX-License-Identifier: Unlicense

# Tennessine

The newest type of [material](https://en.wikipedia.org/wiki/Tennessine) that builds around the [Mass Market](https://mass.market) system.
The newest type of [material](https://en.wikipedia.org/wiki/Tennessine) that
builds around the [Mass Market](https://mass.market) system.

# In this Repo

This repo is a pnpm workspace and contains three packages.

- [`client`](packages/client) - A network client to interact with a Mass Market Relay.
- [`contracts`](packages/client) - ABI wrappers for our [contracts](https://github.com/masslbs/contracts)
- [`schema`](packages/schema) - Generated encoder/decoders for the protocol buffer [definitions](https://github.com/masslbs/network-schema).
- [`client`](packages/client) - A network client to interact with a Mass Market
Relay.
- [`contracts`](packages/client) - ABI wrappers for our
[contracts](https://github.com/masslbs/contracts)
- [`schema`](packages/schema) - Generated encoder/decoders for the protocol
buffer [definitions](https://github.com/masslbs/network-schema).
- [`frontend`](packages/frontend) - A Next.js Frontend.

# Developing
Expand Down
20 changes: 20 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"nodeModulesDir": "manual",
"workspace": [
"./packages/utils",
"./packages/schema",
"./packages/stateManager",
"./packages/client",
"./packages/contracts",
"./packages/frontend",
"./packages/blockchain"
],
"lint": {
"rules": {
"exclude": ["no-slow-types"]
}
},
"fmt": {
"exclude": [".direnv", "node_modules", ".pre-commit-config.yaml"]
}
}
Loading
Loading