Skip to content

Commit

Permalink
feat: migrate bitseed sdk (#2222)
Browse files Browse the repository at this point in the history
* feat: init bitseed sdk

* feat: rebase from main

* feat: add build & unit test

* feat: config e2e test

* feat: impl getBalance and getInscription for RoochDataSource

* feat: add impl getInscriptionUTXO for RoochDataSource

* feat: impl getInscriptions ok

* feat: impl get btc tx

* feat: impl getTransaction

* feat: add getSpendables method

* feat: test getSpendables

* feat: add getUnspents impl

* feat: update pnpm lock

* feat: rooch sdk gen btc_broadcastTX method

* feat: add rooch SDK add btc_broadcastTX

* feat: fix unit test fail

* feat: add relay test ok

* feat: config testcontainers for bitseed test

* feat: add bitcoin ord and rooch testcontainer

* feat: ok for bitseed e2e test

* feat: test bitseed deploy

* feat: update generator

* feat: config bitseed e2e

* feat: ok for Class extends value undefined is not a constructor or null

* feat: ok for FaucetBTC

* feat: test ok for deploy

* feat: config bitseed-sdk type as module

* feat: prepareGenerator

* feat: prepareGenerator

* feat: ok for deploy and generator

* feat: ok for mint e2e test

* feat: fix e2e fail

* feat: fix rooch_datasource.test.ts

* feat: fix all e2e

* refactor: use @roochnetwork/test-suite

* feat: github workflow add bitseed build and test

* feat: fix check_licenses fail

* feat: prettier code

* feat: fix some lint error

* feat: fix all lint error

* feat: add lint check for bitseed SDK

* feat: config playwright deps

* feat: fix install playwright fail

* feat: fix install playwright-deps fail

* feat: fix rooch sdk e2e test fail

* feat: fixbug for rooch sdk e2e test fail

* feat: update bitcoin wait strategy

* feat: debug bitcoin fail

* feat: debug bitcoin create dir no perm

* feat: change TMP dir

* feat: export env RUNNER_TEMP

* feat: log systemTempDir

* feat: test github action perm

* feat: config run docker with root user

* feat: add log for ord

* feat: enable rust test

* feat: debug bitseed sdk test

* feat: recover bitseed sdk test

* feat: fix rooch sdk e2e fail

* feat: fix lint error

* feat: debug bitseed sdk e2e test

* feat: restore github config

* feat: increase bitseed e2e timeout

* fix: fix bitseed unit test and e2e fail

* feat: fix lint error

* feat: fix rooch sdk e2e faill

* feat: fix test-suite build error
  • Loading branch information
yubing744 authored Sep 1, 2024
1 parent f58e0df commit fb00c93
Show file tree
Hide file tree
Showing 95 changed files with 11,200 additions and 110 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/check_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
docker --version
sleep 6
docker images
docker pull lncm/bitcoind:v25.1
docker pull bitseed/ord:0.18.0-burn
docker pull bitseed/bitseed:0.1.8
Expand All @@ -70,13 +71,12 @@ jobs:
run: ./scripts/pr.sh -t
- name: Build and test example projects
run: ./scripts/pr.sh -e


# web & sdk & dashboard
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20.x'
node-version: '20.3.1'
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand All @@ -87,6 +87,8 @@ jobs:
## Build and test app start
- name: Install pnpm dependencies
run: npm install pnpm@9.4.0 -g && pnpm install
- name: Install playwright browsers
run: pnpm bitseed-sdk playwright-deps
- name: Lint
run: pnpm lint
continue-on-error: true
Expand All @@ -101,6 +103,14 @@ jobs:
run: pnpm rooch-sdk-kit build
- name: Test SDK KIT
run: pnpm rooch-sdk-kit test
- name: Lint Bitseed SDK
run: pnpm bitseed-sdk lint
- name: Build Bitseed SDK
run: pnpm bitseed-sdk build
- name: Test Bitseed SDK
run: pnpm bitseed-sdk test
continue-on-error: true
timeout-minutes: 15

- uses: CatChen/check-git-status-action@v1
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ sdk/typescript/dist/
sdk/typescript/example/
sdk/typescript/src/generated/
*.out

# pnpm store
.pnpm-store/
6 changes: 5 additions & 1 deletion crates/rooch-rpc-server/src/metrics_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ use rooch_indexer::store::metrics::IndexerDBMetrics;
/// }
/// ```
pub fn start_basic_prometheus_server() -> Registry {
let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), METRICS_HOST_PORT);
let port = std::env::var("METRICS_HOST_PORT")
.ok()
.map(|s| s.parse().unwrap_or(METRICS_HOST_PORT))
.unwrap_or(METRICS_HOST_PORT);
let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), port);
start_prometheus_server(addr).default_registry()
}

Expand Down
16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
"scripts": {
"preinstall": "npx only-allow pnpm",
"dashboard": "pnpm --filter ./dashboard",
"test-suite": "pnpm --filter ./sdk/typescript/test-suite",
"test-suite": "pnpm --filter ./sdk/typescript/test-suite/",
"rooch-portal": "pnpm --filter ./rooch-portal-v1",
"rooch-create": "pnpm --filter ./sdk/typescript/rooch-create/",
"rooch-sdk": "pnpm --filter ./sdk/typescript/rooch-sdk/",
"rooch-sdk-kit": "pnpm --filter ./sdk/typescript/rooch-sdk-kit/",
"rooch-state": "pnpm --filter ./sdk/typescript/rooch-sdk/",
"bitseed-sdk": "pnpm --filter ./sdk/typescript/bitseed-sdk/",
"rooch-state": "pnpm --filter ./sdk/typescript/rooch-state/",
"rooch-game": "pnpm --filter ./sdk/typescript/rooch-game/",
"changeset-version": "pnpm changeset version && pnpm sdk codegen:version",
"prettier:check": "prettier -c --ignore-unknown .",
Expand All @@ -33,8 +34,10 @@
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"eslint": "^8.45.0",
"eslint-config-next": "13.2.4",
"eslint-config-prettier": "^8.8.0",
"eslint-config-react-app": "^7.0.1",
"eslint-import-resolver-alias": "1.1.2",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.27.5",
Expand All @@ -44,10 +47,11 @@
"eslint-plugin-unused-imports": "^3.0.0",
"prettier": "^3.0.0",
"prettier-plugin-tailwindcss": "^0.4.1",
"typescript": "^5.3.3",
"tsx": "^3.12.7",
"rimraf": "^5.0.7",
"eslint-config-next": "13.2.4",
"eslint-import-resolver-alias": "1.1.2"
"tsx": "^3.12.7",
"typescript": "^5.3.3"
},
"dependencies": {
"pnpm": "^9.4.0"
}
}
Loading

0 comments on commit fb00c93

Please sign in to comment.