Skip to content

Commit

Permalink
feat(satp-hermes): stage0, bug fixing and test e2e
Browse files Browse the repository at this point in the history
Co-authored-by: eduv09 <eduardovasques10@tecnico.ulisboa.pt>
Signed-off-by: Carlos Amaro <carlosrscamaro@tecnico.ulisboa.pt>

fix(satp-hermes): error messages in stage0

Signed-off-by: Carlos Amaro <carlosrscamaro@tecnico.ulisboa.pt>

feat(satp-hermes): service tests added stage0 and error handling

Signed-off-by: Carlos Amaro <carlosrscamaro@tecnico.ulisboa.pt>

feat(satp-hermes): test e2e

Signed-off-by: Carlos Amaro <carlosrscamaro@tecnico.ulisboa.pt>

fix(satp-hermes): fix bugs and test e2e working transfer

Signed-off-by: Carlos Amaro <carlosrscamaro@tecnico.ulisboa.pt>

fix(stap-hermes): bugs and 2 gateway test

Signed-off-by: Carlos Amaro <carlosrscamaro@tecnico.ulisboa.pt>
  • Loading branch information
LordKubaya authored and RafaelAPB committed Sep 3, 2024
1 parent c21957b commit a7fa53e
Show file tree
Hide file tree
Showing 66 changed files with 7,242 additions and 912 deletions.
19 changes: 14 additions & 5 deletions packages/cactus-plugin-satp-hermes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
],
"scripts": {
"preinstall": "curl -L https://foundry.paradigm.xyz | bash && foundryup",
"start-gateway": "ts-node satp-gateway-cli.ts",
"start-gateway": "ts-node /src/main/typescript/plugin-satp-hermes-gateway-cli.ts",
"build": "run-s codegen tsc",
"build-proto": "buf build --path src/main/proto --verbose",
"build:dev:backend:postbuild": "mkdir -p ./dist/lib/knex && cp -r ./src/knex/* ./dist/lib/knex",
Expand Down Expand Up @@ -86,11 +86,12 @@
}
},
"dependencies": {
"@connectrpc/connect": "1.3.0",
"@connectrpc/connect-express": "1.3.0",
"@connectrpc/connect-node": "1.3.0",
"@connectrpc/protoc-gen-connect-es": "1.3.0",
"@connectrpc/connect": "1.4.0",
"@connectrpc/connect-express": "1.4.0",
"@connectrpc/connect-node": "1.4.0",
"@connectrpc/protoc-gen-connect-es": "1.4.0",
"@foundry-rs/hardhat-forge": "0.1.17",
"@grpc/grpc-js": "1.11.1",
"@hyperledger/cactus-cmd-api-server": "2.0.0-rc.3",
"@hyperledger/cactus-common": "2.0.0-rc.3",
"@hyperledger/cactus-core": "2.0.0-rc.3",
Expand All @@ -112,11 +113,13 @@
"express": "4.17.2",
"fabric-network": "2.2.19",
"fs-extra": "11.2.0",
"google-protobuf": "3.21.2",
"hardhat": "2.22.5",
"knex": "2.4.0",
"kubo-rpc-client": "3.0.1",
"npm-run-all": "4.1.5",
"openzeppelin-solidity": "3.4.2",
"safe-stable-stringify": "^2.5.0",
"secp256k1": "4.0.3",
"socket.io": "4.6.2",
"sqlite3": "5.1.5",
Expand All @@ -131,11 +134,13 @@
"@bufbuild/buf": "1.29.0",
"@bufbuild/protobuf": "1.7.2",
"@bufbuild/protoc-gen-es": "1.7.2",
"@grpc/proto-loader": "0.7.8",
"@quobix/vacuum": "0.9.10",
"@types/body-parser": "1.19.4",
"@types/crypto-js": "4.0.1",
"@types/express": "4.17.21",
"@types/fs-extra": "11.0.4",
"@types/google-protobuf": "3.15.5",
"@types/node": "18.18.2",
"@types/swagger-ui-express": "4.1.6",
"@types/tape": "4.13.4",
Expand All @@ -144,7 +149,11 @@
"ethereum-abi-types-generator": "1.3.4",
"express": "4.19.2",
"fabric-network": "2.2.20",
"grpc-tools": "1.12.4",
"grpc_tools_node_protoc_ts": "5.3.3",
"kubo-rpc-client": "3.0.1",
"make-dir-cli": "3.1.0",
"protobufjs": "7.2.5",
"swagger-cli": "4.0.4",
"typescript": "5.5.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ configuration.go
docs/APIError.md
docs/Action.md
docs/AdminApi.md
docs/Asset.md
docs/AuthzJwtClaim.md
docs/AuthzScope.md
docs/BridgeInfo.md
Expand Down Expand Up @@ -59,13 +60,15 @@ docs/Transact200ResponseStatusResponseDestinationChain.md
docs/Transact200ResponseStatusResponseOriginChain.md
docs/TransactDefaultResponse.md
docs/TransactRequest.md
docs/TransactRequestSourceAsset.md
docs/TransactResponse.md
docs/TransactionApi.md
git_push.sh
go.mod
go.sum
model_action.go
model_api_error.go
model_asset.go
model_authz_jwt_claim.go
model_authz_scope.go
model_bridge_info.go
Expand Down Expand Up @@ -116,6 +119,7 @@ model_transact_200_response_status_response_destination_chain.go
model_transact_200_response_status_response_origin_chain.go
model_transact_default_response.go
model_transact_request.go
model_transact_request_source_asset.go
model_transact_response.go
response.go
utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ Class | Method | HTTP request | Description

- [APIError](docs/APIError.md)
- [Action](docs/Action.md)
- [Asset](docs/Asset.md)
- [AuthzJwtClaim](docs/AuthzJwtClaim.md)
- [AuthzScope](docs/AuthzScope.md)
- [BridgeInfo](docs/BridgeInfo.md)
Expand Down Expand Up @@ -153,6 +154,7 @@ Class | Method | HTTP request | Description
- [Transact200ResponseStatusResponseOriginChain](docs/Transact200ResponseStatusResponseOriginChain.md)
- [TransactDefaultResponse](docs/TransactDefaultResponse.md)
- [TransactRequest](docs/TransactRequest.md)
- [TransactRequestSourceAsset](docs/TransactRequestSourceAsset.md)
- [TransactResponse](docs/TransactResponse.md)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,20 +592,54 @@ components:
- sessionID
type: object
x-category: request
Asset:
description: An asset
properties:
owner:
type: string
ontology:
type: string
contractName:
type: string
contractAddress:
type: string
mspId:
type: string
channelName:
type: string
required:
- contractName
- ontology
- owner
type: object
TransactRequest:
description: "Request schema for initiating a transaction. Includes details\
\ such as the transaction context, mode (data or transfer), payload, and information\
\ about the source and destination DLT networks."
example:
mode: transfer
beneficiaryPubkey: beneficiaryPubkey
destinyAsset:
owner: owner
mspId: mspId
contractAddress: contractAddress
contractName: contractName
channelName: channelName
ontology: ontology
payload: "{\"data\":\"example payload\"}"
fromAmount: "100"
toAmount: "95"
sourceAsset:
owner: owner
mspId: mspId
contractAddress: contractAddress
contractName: contractName
channelName: channelName
ontology: ontology
originatorPubkey: originatorPubkey
contextID: 123e4567-e89b-12d3-a456-426614174000
toDLTNetworkID: network2
fromDLTNetworkID: network1
fromToken: TOKEN1
toToken: TOKEN2
properties:
contextID:
example: 123e4567-e89b-12d3-a456-426614174000
Expand All @@ -629,18 +663,28 @@ components:
fromAmount:
example: "100"
type: string
fromToken:
example: TOKEN1
type: string
toAmount:
example: "95"
type: string
toToken:
example: TOKEN2
beneficiaryPubkey:
type: string
originatorPubkey:
type: string
sourceAsset:
$ref: '#/components/schemas/Transact_request_sourceAsset'
destinyAsset:
$ref: '#/components/schemas/Transact_request_sourceAsset'
required:
- beneficiaryPubkey
- contextID
- destinyAsset
- fromAmount
- fromDLTNetworkID
- mode
- originatorPubkey
- sourceAsset
- toAmount
- toDLTNetworkID
type: object
TransactResponse:
description: Response schema for a transaction request. Includes the session
Expand Down Expand Up @@ -1181,6 +1225,33 @@ components:
token:
$ref: '#/components/schemas/GetRoutes_200_response_routes_inner_fromToken'
type: object
Transact_request_sourceAsset:
description: An asset
example:
owner: owner
mspId: mspId
contractAddress: contractAddress
contractName: contractName
channelName: channelName
ontology: ontology
properties:
owner:
type: string
ontology:
type: string
contractName:
type: string
contractAddress:
type: string
mspId:
type: string
channelName:
type: string
required:
- contractName
- ontology
- owner
type: object
Transact_request:
description: "Request schema for initiating a transaction. Includes details\
\ such as the transaction context, mode (data or transfer), payload, and information\
Expand Down Expand Up @@ -1208,18 +1279,28 @@ components:
fromAmount:
example: "100"
type: string
fromToken:
example: TOKEN1
type: string
toAmount:
example: "95"
type: string
toToken:
example: TOKEN2
beneficiaryPubkey:
type: string
originatorPubkey:
type: string
sourceAsset:
$ref: '#/components/schemas/Transact_request_sourceAsset'
destinyAsset:
$ref: '#/components/schemas/Transact_request_sourceAsset'
required:
- beneficiaryPubkey
- contextID
- destinyAsset
- fromAmount
- fromDLTNetworkID
- mode
- originatorPubkey
- sourceAsset
- toAmount
- toDLTNetworkID
type: object
Transact_200_response_statusResponse_originChain:
example:
Expand Down
Loading

0 comments on commit a7fa53e

Please sign in to comment.