-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add admin permission controller (#501)
* feat: add doc store * feat: merge sdk into db3 * fix: fix the contract test case * fix: fix the test case * fix: add protobuf generator * fix: add protobuf generator * feat: add record arweave tx to smart contract * fix: fix the case * feat: add new readme * fix: remove the test large case * feat: add arch png * feat: update docker cd
- Loading branch information
Showing
73 changed files
with
14,145 additions
and
387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Docker Release CD | ||
on: | ||
push: | ||
tags: | ||
- "[v]?[0-9]+.[0-9]+.[0-9]+" | ||
jobs: | ||
|
||
docker_image: | ||
name: build_pr_image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
profile: minimal | ||
override: true | ||
components: rustfmt | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: taiki-e/install-action@cargo-llvm-cov | ||
- uses: taiki-e/install-action@nextest | ||
- name: Setup build env | ||
run: | | ||
sudo apt-get install protobuf-compiler | ||
protoc --version | ||
ROOT_DIR=`pwd` | ||
cd ${ROOT_DIR}/metadata && yarn install && npx hardhat test | ||
ls ${ROOT_DIR}/metadata/artifacts/contracts/DB3MetaStore.sol/ | ||
cd ${ROOT_DIR} && cargo build --release | ||
cp ${ROOT_DIR}/target/release/db3 ${ROOT_DIR}/docker/ | ||
- name: docker login | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build Docker image | ||
run: | | ||
RELEASE_NAME=${GITHUB_REF/refs\/tags\//} | ||
cd docker && docker build . -t ghcr.io/dbpunk-labs/db3:$RELEASE_NAME | ||
docker push ghcr.io/dbpunk-labs/db3:$RELEASE_NAME | ||
echo "the image is ghcr.io/dbpunk-labs/db3:$RELEASE_NAME" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: CD | ||
on: | ||
push: | ||
tags: | ||
- "[v]?[0-9]+.[0-9]+.[0-9]+" | ||
jobs: | ||
npm_publish: | ||
name: Publish Package to npmjs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout db3.js | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- uses: actions/setup-node@v3.5.1 | ||
with: | ||
node-version: "16.x" | ||
- uses: CultureHQ/actions-yarn@v1.0.1 | ||
- run: | | ||
cd sdk && yarn && make && yarn build | ||
- uses: JS-DevTools/npm-publish@v1 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
package: ./sdk/package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# How to build | ||
|
||
## Prepare the environment | ||
|
||
* cmake >= 3.27.0 | ||
* protobuf | ||
* node >= 18 | ||
* yarn | ||
* arlocal | ||
* rust with nightly default | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#! /bin/bash | ||
|
||
WORKSPACE=`pwd` | ||
cargo fmt | ||
npx buf format -w src/proto/proto | ||
#cd metadata && npx prettier --write 'contracts/**/*.sol' | ||
|
||
|
||
cd ${WORKSPACE}/metadata && npx prettier --write 'contracts/**/*.sol' | ||
cd ${WORKSPACE}/sdk && yarn prettier --write src tests ./jest.setup.ts ./jest.config.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.