Skip to content

Commit

Permalink
feat(besu): 🎸 OpenAPI support => arbitrary TX, contract deployments
Browse files Browse the repository at this point in the history
This brings the besu connector to feature parity with the quorum
connector which already had these features supported (the code is mostly
taken from the Quorum connector because both Besu and Quorum connectors
are using Web3 under the hood so they share most of the logic/OpenAPI
definitions, etc.\nDifferences between the two will come out once we
start implementing private transactions and the other features that are
unique to the ledgers are not present/supported by vanilla
Web3.\nPerhaps it would be good to somehow have a third package that
allows for both Besu and Quorum connectors to re-use the vanilla Web3
specific parts instead of copy pasting, but this is a shortcut that was
deemed acceptable for now as we are ramping up for the v0.2.0 release.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz committed Dec 1, 2020
1 parent ac19e49 commit 6d7e788
Show file tree
Hide file tree
Showing 23 changed files with 2,802 additions and 140 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"build:dev:common": "lerna exec --stream --scope '*/*common' -- 'del-cli dist/** && tsc --project ./tsconfig.json && webpack --env=dev --target=node --config ../../webpack.config.js'",
"build:dev:core-api": "lerna exec --stream --scope '*/*core-api' -- 'del-cli dist/** && tsc --project ./tsconfig.json && webpack --env=dev --target=node --config ../../webpack.config.js'",
"build:dev:test-tooling": "lerna exec --stream --scope '*/*test-tooling' -- 'del-cli dist/** && tsc --project ./tsconfig.json && webpack --env=dev --target=node --config ../../webpack.config.js'",
"build:dev:plugin-ledger-connector-besu": "lerna exec --stream --scope '*/*connector-besu' -- 'del-cli dist/** && tsc --project ./tsconfig.json && webpack --env=dev --target=node --config ../../webpack.config.js'",
"test:plugin-ledger-connector-besu": "tap --jobs=1 --timeout=60 \"packages/cactus-*-besu/src/test/typescript/{unit,integration}/\"",
"build:dev:plugin-ledger-connector-quorum": "lerna exec --stream --scope '*/*connector-quorum' -- 'del-cli dist/** && tsc --project ./tsconfig.json && webpack --env=dev --target=node --config ../../webpack.config.js'",
"test:plugin-ledger-connector-quorum": "tap --jobs=1 --timeout=60 \"packages/cactus-*-quorum/src/test/typescript/{unit,integration}/\"",
"build:dev:plugin-ledger-connector-fabric": "lerna exec --stream --scope '*/*connector-fabric' -- 'del-cli dist/** && tsc --project ./tsconfig.json && webpack --env=dev --target=node --config ../../webpack.config.js'",
Expand Down
88 changes: 88 additions & 0 deletions packages/cactus-plugin-ledger-connector-besu/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion packages/cactus-plugin-ledger-connector-besu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"dist/*"
],
"scripts": {
"export-open-api-spec": "ts-node src/main/typescript/openapi-spec.ts",
"pregenerate-sdk": "npm-run-all export-open-api-spec",
"generate-sdk": "openapi-generator generate --input-spec src/main/json/generated/openapi-spec.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/",
"pretsc": "npm run generate-sdk",
"tsc": "tsc --project ./tsconfig.json",
"webpack": "npm-run-all webpack:dev webpack:prod",
"webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web",
Expand Down Expand Up @@ -63,14 +67,19 @@
"homepage": "https://github.com/hyperledger/cactus#readme",
"dependencies": {
"@hyperledger/cactus-common": "0.2.0",
"@hyperledger/cactus-core": "^0.2.0",
"@hyperledger/cactus-core-api": "^0.2.0",
"axios": "0.20.0",
"express": "4.17.1",
"joi": "14.3.1",
"openapi-types": "7.0.1",
"typescript-optional": "2.0.1",
"web3": "1.2.7",
"web3-eea": "0.10.0"
},
"devDependencies": {
"@hyperledger/cactus-test-tooling": "0.2.0",
"@types/express": "4.17.8",
"@types/joi": "14.3.4"
}
}
}

0 comments on commit 6d7e788

Please sign in to comment.