Skip to content

Commit 792f88b

Browse files
committed
feat: empty pdc chaincode smart contract set
0 parents  commit 792f88b

28 files changed

+8068
-0
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.github
2+
Dockerfile

.env

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export CC_RUNTIME_LANGUAGE=node
2+
export CC_SRC_PATH=./dist
3+
export CC_NAME=assetTransferPDC
4+
export CC_VERSION=1.0
5+
export CC_SEQUENCE=1
6+
export CC_COLLECTIONS_CONFIG_PATH=./collections_config.json
7+
export CC_SIGNATURE_POLICY="OR('Org1MSP.member','Org2MSP.member')"
8+
# export CC_INIT_FCN=InitLedger
9+
# export CC_INIT_ARGS="[]"
10+
# export CC_CHANNEL="mychannel"

.eslintrc.js

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
node: true,
6+
},
7+
extends: [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/eslint-recommended",
10+
"plugin:@typescript-eslint/recommended",
11+
"plugin:promise/recommended",
12+
"prettier",
13+
],
14+
parser: "@typescript-eslint/parser",
15+
parserOptions: {
16+
ecmaVersion: 2020,
17+
sourceType: "module",
18+
},
19+
plugins: ["@typescript-eslint", "promise"],
20+
rules: {
21+
"@typescript-eslint/explicit-member-accessibility": "off",
22+
"@typescript-eslint/explicit-module-boundary-types": "off",
23+
"@typescript-eslint/explicit-function-return-type": "off",
24+
"@typescript-eslint/parameter-properties": "off",
25+
"@typescript-eslint/no-explicit-any": "off",
26+
},
27+
};

.github/labeler.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: v1
2+
3+
labels:
4+
- label: 'feat'
5+
matcher:
6+
title: '^feat:.*'
7+
- label: 'fix'
8+
matcher:
9+
title: '^fix:.*'
10+
- label: 'chore'
11+
matcher:
12+
title: '^chore:.*'
13+
- label: 'docs'
14+
matcher:
15+
title: '^docs:.*'

.github/release.yaml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
changelog:
2+
categories:
3+
- title: Breaking Changes 🛠
4+
labels:
5+
- breaking-change
6+
- title: Exciting New Features 🎉
7+
labels:
8+
- feat
9+
- title: Important Bug Fixes 🐛
10+
labels:
11+
- fix
12+
- title: Documentation 📚
13+
labels:
14+
- docs
15+
- title: Other changes 🏗️
16+
labels:
17+
- chore
18+
- title: Dependencies 📦
19+
labels:
20+
- dependencies

.github/renovate.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:recommended",
5+
":automergeMinor",
6+
":automergePr",
7+
":automergeRequireAllStatusChecks",
8+
":gitSignOff",
9+
":pinVersions",
10+
":semanticCommits",
11+
":semanticCommitTypeAll(chore)",
12+
":enableVulnerabilityAlerts",
13+
":combinePatchMinorReleases",
14+
":prConcurrentLimitNone",
15+
":prHourlyLimitNone",
16+
"security:openssf-scorecard",
17+
"schedule:nonOfficeHours",
18+
":disableDependencyDashboard"
19+
],
20+
"labels": ["dependencies"],
21+
"rebaseWhen": "conflicted",
22+
"packageRules": [],
23+
"hostRules": [
24+
{
25+
"timeout": 3000000
26+
}
27+
]
28+
}

.github/workflows/branch.yml

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Branch
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
tags:
11+
- "v*"
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
permissions:
18+
actions: write
19+
checks: write
20+
contents: write
21+
deployments: write
22+
id-token: write
23+
issues: write
24+
discussions: write
25+
packages: write
26+
pages: write
27+
pull-requests: write
28+
repository-projects: write
29+
security-events: write
30+
statuses: write
31+
32+
jobs:
33+
check:
34+
strategy:
35+
fail-fast: true
36+
37+
name: Chaincode project
38+
runs-on: namespace-profile-fabric-chaincode
39+
steps:
40+
- name: Checkout
41+
uses: namespacelabs/nscloud-checkout-action@v2
42+
with:
43+
submodules: recursive
44+
45+
- name: Setup caches
46+
uses: namespacelabs/nscloud-cache-action@v1
47+
with:
48+
path: |
49+
cache
50+
out
51+
~/.node_modules
52+
53+
- name: Install Cosign
54+
uses: sigstore/cosign-installer@v3
55+
56+
- name: Login to GitHub Container Registry
57+
uses: docker/login-action@v3
58+
with:
59+
registry: ghcr.io
60+
username: ${{ github.repository_owner }}
61+
password: ${{ secrets.GITHUB_TOKEN }}
62+
63+
- name: Login to DockerHub
64+
uses: docker/login-action@v3
65+
with:
66+
username: ${{ secrets.DOCKERHUB_USER }}
67+
password: ${{ secrets.DOCKERHUB_PASS }}
68+
69+
- name: Docker meta
70+
id: docker_meta
71+
uses: docker/metadata-action@v5
72+
with:
73+
# list of Docker images to use as base name for tags
74+
images: |
75+
ghcr.io/settlemint/chaincode-typescript-empty-pdc
76+
# generate Docker tags based on the following events/attributes
77+
tags: |
78+
type=schedule
79+
type=ref,event=branch
80+
type=ref,event=pr
81+
type=semver,pattern={{version}}
82+
type=semver,pattern={{major}}.{{minor}}
83+
type=semver,pattern={{major}}
84+
type=sha
85+
86+
- name: Build and push
87+
uses: docker/build-push-action@v5
88+
id: build-and-push
89+
with:
90+
load: false
91+
provenance: true
92+
sbom: true
93+
push: true
94+
platforms: linux/amd64,linux/arm64
95+
tags: ${{ steps.docker_meta.outputs.tags }}
96+
labels: ${{ steps.docker_meta.outputs.labels }}
97+
no-cache: true
98+
99+
- name: Sign the images with GitHub OIDC Token
100+
env:
101+
DIGEST: ${{ steps.build-and-push.outputs.digest }}
102+
TAGS: ${{ steps.docker_meta.outputs.tags }}
103+
run: |
104+
images=""
105+
for tag in ${TAGS}; do
106+
images+="${tag}@${DIGEST} "
107+
done
108+
cosign sign --yes ${images}

.github/workflows/pr-labels.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: PR Labels
2+
3+
on:
4+
pull_request:
5+
types: [opened, closed]
6+
branches:
7+
- main
8+
9+
permissions:
10+
actions: write
11+
checks: write
12+
contents: write
13+
deployments: write
14+
id-token: write
15+
issues: write
16+
discussions: write
17+
packages: write
18+
pages: write
19+
pull-requests: write
20+
repository-projects: write
21+
security-events: write
22+
statuses: write
23+
24+
jobs:
25+
labels:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: fuxingloh/multi-labeler@v4

.gitignore

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
*.tar.gz
8+
9+
# dependencies
10+
/node_modules
11+
12+
# IDEs and editors
13+
/.idea
14+
.project
15+
.classpath
16+
.c9/
17+
*.launch
18+
.settings/
19+
*.sublime-workspace
20+
21+
# misc
22+
/.sass-cache
23+
/connect.lock
24+
/coverage
25+
/libpeerconnection.log
26+
npm-debug.log
27+
yarn-error.log
28+
testem.log
29+
/typings
30+
31+
# System Files
32+
.DS_Store
33+
Thumbs.db
34+
globalConfig.json
35+
36+
package-lock.json
37+
38+
cache
39+
lost+found
40+
yarn.lock
41+
log.txt

.gitmodules

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
[submodule "lib/btp-chaincode-lifecycle"]
3+
path = lib/btp-chaincode-lifecycle
4+
url = https://github.com/settlemint/btp-chaincode-lifecycle.git

.vscode/extensions.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"recommendations": [
3+
"nomicfoundation.hardhat-solidity",
4+
"miguelsolorio.fluent-icons",
5+
"vscode-icons-team.vscode-icons",
6+
"genieai.chatgpt-vscode",
7+
"esbenp.prettier-vscode",
8+
"dracula-theme.theme-dracula",
9+
"cnshenj.vscode-task-manager"
10+
]
11+
}

0 commit comments

Comments
 (0)