Skip to content

Commit

Permalink
Merge pull request #761 from aitos-io/release-v2.2.0
Browse files Browse the repository at this point in the history
Candidate for BoAT-X-Framework V2.2.0
  • Loading branch information
flyfft authored May 13, 2022
2 parents 70ceba9 + edf920b commit d84d1e0
Show file tree
Hide file tree
Showing 107 changed files with 11,988 additions and 477 deletions.
11 changes: 9 additions & 2 deletions Makefile
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ BOAT_PROTOCOL_USE_HWBCS ?= 1
BOAT_PROTOCOL_USE_CHAINMAKER ?= 1
BOAT_DISCOVERY_PEER_QUERY ?= 1
BOAT_PROTOCOL_USE_VENACHAIN ?= 1
BOAT_PROTOCOL_USE_QUORUM ?= 1

# Chain config check
ifeq ($(BOAT_PROTOCOL_USE_ETHEREUM)_$(BOAT_PROTOCOL_USE_PLATON)_$(BOAT_PROTOCOL_USE_PLATONE)_$(BOAT_PROTOCOL_USE_FISCOBCOS)_$(BOAT_PROTOCOL_USE_HLFABRIC)_$(BOAT_PROTOCOL_USE_HWBCS)_$(BOAT_PROTOCOL_USE_CHAINMAKER)_$(BOAT_PROTOCOL_USE_VENACHAIN), 0_0_0_0_0_0_0)
ifeq ($(BOAT_PROTOCOL_USE_ETHEREUM)_$(BOAT_PROTOCOL_USE_PLATON)_$(BOAT_PROTOCOL_USE_PLATONE)_$(BOAT_PROTOCOL_USE_FISCOBCOS)_$(BOAT_PROTOCOL_USE_HLFABRIC)_$(BOAT_PROTOCOL_USE_HWBCS)_$(BOAT_PROTOCOL_USE_CHAINMAKER)_$(BOAT_PROTOCOL_USE_VENACHAIN)_$(BOAT_PROTOCOL_USE_QUORUM), 0_0_0_0_0_0_0_0)
$(error Select at least one chain)
endif
ifeq ($(BOAT_PROTOCOL_USE_ETHEREUM)_$(BOAT_PROTOCOL_USE_FISCOBCOS), 0_1)
Expand All @@ -35,6 +36,9 @@ endif
ifeq ($(BOAT_PROTOCOL_USE_ETHEREUM)_$(BOAT_PROTOCOL_USE_VENACHAIN), 0_1)
$(error VENACHAIN depends on ETHEREUM, set 'BOAT_PROTOCOL_USE_ETHEREUM' to 1 if enable VENACHAIN)
endif
ifeq ($(BOAT_PROTOCOL_USE_ETHEREUM)_$(BOAT_PROTOCOL_USE_QUORUM), 0_1)
$(error QUORUM depends on ETHEREUM, set 'BOAT_PROTOCOL_USE_QUORUM' to 1 if enable QUORUM)
endif


# Set parameter to scripts
Expand All @@ -46,7 +50,8 @@ SCRIPTS_PARAM += "BOAT_PROTOCOL_USE_ETHEREUM=$(BOAT_PROTOCOL_USE_ETHEREUM)" \
"BOAT_PROTOCOL_USE_HWBCS=$(BOAT_PROTOCOL_USE_HWBCS)" \
"BOAT_PROTOCOL_USE_CHAINMAKER=$(BOAT_PROTOCOL_USE_CHAINMAKER)" \
"BOAT_DISCOVERY_PEER_QUERY=$(BOAT_DISCOVERY_PEER_QUERY)" \
"BOAT_PROTOCOL_USE_VENACHAIN=$(BOAT_PROTOCOL_USE_VENACHAIN)"
"BOAT_PROTOCOL_USE_VENACHAIN=$(BOAT_PROTOCOL_USE_VENACHAIN)" \
"BOAT_PROTOCOL_USE_QUORUM=$(BOAT_PROTOCOL_USE_QUORUM)"


# Platform target
Expand Down Expand Up @@ -107,6 +112,7 @@ BOAT_INCLUDE := -I$(BOAT_BASE_DIR)/include \
-I$(BOAT_SDK_DIR)/protocol/boatplatone \
-I$(BOAT_SDK_DIR)/protocol/boatvenachain \
-I$(BOAT_SDK_DIR)/protocol/boatfiscobcos \
-I$(BOAT_SDK_DIR)/protocol/boatquorum \
-I$(BOAT_SDK_DIR)/third-party/nghttp2/include \
-I$(BOAT_SDK_DIR)/third-party/protobuf-c/include \
-I$(BOAT_BASE_DIR)/vendor/platform/include \
Expand Down Expand Up @@ -231,6 +237,7 @@ export BOAT_PROTOCOL_USE_HLFABRIC
export BOAT_PROTOCOL_USE_HWBCS
export BOAT_PROTOCOL_USE_CHAINMAKER
export BOAT_PROTOCOL_USE_VENACHAIN
export BOAT_PROTOCOL_USE_QUORUM
export BOAT_DISCOVERY_PEER_QUERY
export BOAT_USE_DEFAULT_CJSON

Expand Down
4 changes: 3 additions & 1 deletion demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ if(BOAT_PROTOCOL_USE_HWBCS)
add_subdirectory(demo_hw_bcs)
endif()


if(BOAT_PROTOCOL_USE_VENACHAIN)
add_subdirectory(demo_venachain)
endif()
10 changes: 8 additions & 2 deletions demo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Generate sub-directory list
OBJECTS_DIR = $(BOAT_BUILD_DIR)/demo

.PHONY: all demo_ethereum demo_platon demo_platone demo_fiscobcos demo_fabric demo_hw_bcs demo_chainmaker demo_venachain
all: $(OBJECTS_DIR) demo_ethereum demo_platon demo_platone demo_fiscobcos demo_fabric demo_hw_bcs demo_chainmaker demo_venachain
.PHONY: all demo_ethereum demo_platon demo_platone demo_fiscobcos demo_fabric demo_hw_bcs demo_chainmaker demo_venachain demo_quorum
all: $(OBJECTS_DIR) demo_ethereum demo_platon demo_platone demo_fiscobcos demo_fabric demo_hw_bcs demo_chainmaker demo_venachain demo_quorum

demo_ethereum:
ifeq ($(BOAT_PROTOCOL_USE_ETHEREUM), 1)
Expand Down Expand Up @@ -46,6 +46,11 @@ ifeq ($(BOAT_PROTOCOL_USE_VENACHAIN), 1)
make -C $(BOAT_BASE_DIR)/demo/demo_venachain all
endif

demo_quorum:
ifeq ($(BOAT_PROTOCOL_USE_QUORUM), 1)
make -C $(BOAT_BASE_DIR)/demo/demo_quorum all
endif

$(OBJECTS_DIR):
$(BOAT_MKDIR) -p $(OBJECTS_DIR)

Expand All @@ -58,4 +63,5 @@ clean:
make -C $(BOAT_BASE_DIR)/demo/demo_hw_bcs clean
make -C $(BOAT_BASE_DIR)/demo/demo_chainmaker clean
make -C $(BOAT_BASE_DIR)/demo/demo_venachain clean
make -C $(BOAT_BASE_DIR)/demo/demo_quorum clean
-$(BOAT_RM) $(BOAT_BUILD_DIR)/demo
7 changes: 5 additions & 2 deletions demo/README_en.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### Compile and Run Demo
#### Ready
SDK provides Demo based on Ethereum, PlatON, PlatONE, FISCO-BCOS, Hyperledger Fabric and HW-BCS. Before running these demos, the corresponding blockchain node software is need to installed(or have known nodes) and deploy the smart contracts required by the demo.
SDK provides Demo based on Ethereum, PlatON, PlatONE, FISCO-BCOS, Hyperledger Fabric,Venachain and HW-BCS. Before running these demos, the corresponding blockchain node software is need to installed(or have known nodes) and deploy the smart contracts required by the demo.

The smart contract used by the demo and its ABI JSON file are placed in:

Expand All @@ -19,6 +19,8 @@ Before running the PlatON Demo, the PlatON node need to be installed. The specif

Before running the PlatONE Demo, you need to install the PlatONE node, as well as smart contract compilation and deployment tools,could visit this website: https://platone.wxblockchain.com .

Before running the Venachain Demo, you need to install the Venachain node, as well as smart contract compilation and deployment tools,could visit this website: https://github.com/Venachain/Venachain .

Before running the FISCO-BCOS Demo, you need to install the FISCO-BCOS node and contract deployment.
FISCO-BCOS source code and installation and deployment steps can visit this website: https://fisco-bcos-documentation.readthedocs.io

Expand All @@ -33,6 +35,7 @@ The Demo C code that calls the smart contract is placed in:
|\<SDKRoot\>/demo/demo_platon/demo_platon_transfer.c |PLATON transfer demo use case |
|\<SDKRoot\>/demo/demo_platone/demo_platone_mycontract.c |PLATONE demo use case |
|\<SDKRoot\>/demo/demo_fiscobcos/demo_fiscobcos_helloworld.c |FISCO-BCOS demo use case |
|\<SDKRoot\>/demo/demo_venachain/demo_venachain_mycontract.c |Venachain demo use case |

Before compiling the Demo, you need to modify the following parts of the Demo C code:
- For ETHEREUM, PLATON, FISCO-BCOS, PLATONE:
Expand All @@ -42,7 +45,7 @@ Before compiling the Demo, you need to modify the following parts of the Demo C
- For PlatON, there is no need to modify the private key in the Demo
- For PlatONE, there is no need to modify the private key in the Demo
- For FISCO-BCOS, set it to the native format private key corresponding to the private key under <FISCO-BCOS_ROOT>/console/accounts
3. If the demo needs to use the native private key, search for `pkcs_demoKey` and set the client private key as:
3. If the demo needs to use the PKCS format private key, search for `pkcs_demoKey` and set the client private key as:
- For Ethereum, set the PKCS format private key corresponding to the private key of any account generated by Ganache
- For PlatONE, there is no need to modify the private key in the Demo
- For PlatONE, there is no need to modify the private key in the Demo
Expand Down
Loading

0 comments on commit d84d1e0

Please sign in to comment.