Open source progress | WeBASE has been updated, come and learn about new features!

WeBASE (WeBank Blockchain Application Software Extension) is a set of common components built between blockchain applications and the bottom layer of FISCO BCOS. Each module is designed around transactions, contracts, key management, data, and visual management, shielding the blockchain The complexity of the underlying layer greatly reduces the R&D threshold and speeds up the efficiency of blockchain application development.

WeBASE has been paying attention to the update iteration of FISCO BCOS, the underlying platform of the blockchain, and launched WeBASE v1.X version to adapt to FISCO BCOS v2.X version, and WeBASE v3.X version to adapt to FISCO BCOS v3.X version. Recently, WeBASE has successively released WeBASE v1.5.5 and WeBASE v3.0.2 to optimize and improve WeBASE so as to better adapt to FISCO BCOS and make it more convenient and quick for users to use.

In WeBASE v1.5.5, WeBASE further optimized the user experience: improved the compatibility of complex parameters such as Struct in the contract IDE environment, provided specific examples of Struct parameter input parameters; added directional prompts to the front-end error prompts, which is convenient for users to quickly Locate the cause of the error; update the version of the dependent component to avoid the risk of security vulnerabilities caused by the old version of the dependent package. WeBASE v3.0.2 version has also updated the above features synchronously, and is compatible with FISCO BCOS v3.2.0 and above.

Let's take a look at the update details!

  Optimize multiple user experiences of the contract IDE

Improve compatibility with complex parameters

WeBASE has improved the compatibility of complex parameters in the contract IDE (WeBASE management console and WeBASE-Front node front), such as Struct format, bytes32[][] format, etc. In the new version, the user's operation in the front-end IDE is consistent with the previous version. When sending a transaction, just follow the transaction pop-up window to fill in the parameters. As shown in Figure 1 below:

  • Array type parameters : Enclosed in square brackets and separated by commas. For example: set(uint32[] a) -> [1,2,3], non-numeric and Boolean types need to use double quotes, for example: set(bytes1[] a) -> ["0x12","0x34" ]; if the array parameter contains double quotes, escape them, for example: set(string[] s) -> ["aaa"bbb","ccc"]. 

  • bytesN type parameters : the format of the input parameter is a hexadecimal string, and the character length should be 2N. For example, the input parameter of bytes2 is: 0x1234, and the length is 4 except for 0x; if the length is insufficient, fill in the hexadecimal characters 0. 

  • Struct type parameter : The struct parameter type in the input box is displayed as a tuple type, and the input parameter content needs to be filled in according to the custom struct structure, and the input parameter format needs to be enclosed in square brackets outside the struct parameter, such as set(StructA a) -> StructA{bool a, string[] b} -> [true,"["test string"]"], here a is true, b is ["test string"], the array b in the struct needs to be placed in double quotes Inside, if the array element contains double quotes, it needs to be escaped, such as b is ["test quote\" string"].

b71d23260f8bf6d55b5f838e95a7a4a1.png

Figure 1 - Contract IDE transaction prompt

If we need to directly call the transaction interface in the background to send transactions, take the transaction interface of /trans/handleWithSign in front of the WeBASE-Front node as an example. In the new version, the funcParam parameter in the interface parameter has been changed from the `List<Object>`Json array Changed to `List<String>`String array, the change interface document description is shown in Figure 2 below:

0395c672c1ee65e46058ab2062f5a79e.png

Figure 2-Screenshot of contract IDE prompt

Optimize error message

In the new version, we have organized and optimized the error codes, and added directional error prompts to facilitate users to quickly locate the cause of errors. For example, when sending a transaction, the transaction parameter is a uint256[2] array, that is, a fixed-length uint256 array with a length of 2, as shown in Figure 3 below:

03b2ef02b60181dd2289b6e1a9519029.png

Figure 3 - Fixed-length array function

If the input parameter does not match the parameter format defined by ABI, the previous error message was "Contract parameter encoding failed", but the new version will prompt "Contract transaction parameter error, please check whether the number of parameters and input parameter value match the ABI", and at the same time A window will pop up at the top right of the page, displaying the original text of the error message "...param not match..." when encoding contract parameters, as shown in Figure 4 below:

ca1c7dabca69ac49a22784cad83997b7.png

Figure 4 - Error Prompt Diagram

For another example, when the consensus of the node group is abnormal in the WeBASE management console, there will be an error message "the current group has no available node front".

In the new version, WeBASE classifies the error messages into categories such as node errors, service errors, and node pre-errors. In the error prompts, "check errors in node logs" and "check errors in background logs" are further added to the error messages. ", "Please check the node front error log" and other directional error prompts, so that users can quickly locate the cause of the error in the corresponding subsystem when encountering an error.

The above optimizations have been updated synchronously in WeBASE v1.5.5 and WeBASE v3.0.2, and everyone is welcome to experience them.

  Optimization and fixes

  • WeBASE v3.0.2 adapts to FISCO BCOS v3.2.0 and above

  • WeBASE-Transaction transaction service v3.0.2 adapts to FISCO BCOS v3.2.0 and above

  • WeBASE v1.5.5 update The node version built into the fiscoorg/fisco-webase image in the visual deployment is updated to v2.9.1 (the image includes FISCO BCOS v2.9.1 and WeBASE-Front v1.5.5)

  • The application management SDK webase-app-sdk was upgraded to v1.5.5, and the security vulnerability of dependent packages was fixed

Every year WeBASE will bring improvements and new functions. In the process of evolution, community users' feedback and co-construction participation are crucial. In this update, many community users participated in the joint construction of the version, and I would like to thank all the friends who have contributed to this update.

WeBASE expects more developers to join. If you are interested in participating in community building, you can sign up for the Community Task Challenge. The challenge collects code or tutorials for developers, and provides a stage for those who love blockchain middleware and related technologies to explore blockchain technology and challenge technical problems. The 2023 Season 1 Task Challenge has officially started a few days ago, and nearly a hundred tasks are looking forward to your participation! Click here for event details

  use immediately

The latest code and technical documents involved in the above optimization and functions have been updated synchronously, and are located in the [master] and [master-3.0] branches of the WeBASE code warehouse. If you need to consult technical questions, welcome to reply [Little Assistant] in the dialog box of this official account to enter the technical exchange group.

WeBASE code repository:

https://github.com/WeBankBlockchain/WeBASE

Domestic image of WeBASE code warehouse :

https://gitee.com/WeBank/WeBASE

WeBASE technical documentation:

v1.5.5: https://webasedoc.readthedocs.io/zh_CN/latest

v3.0.2: https://webasedoc.readthedocs.io/zh_CN/lab

Domestic mirror of WeBASE technical documentation:

v1.5.5:https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/WeBASE/doc/index.html

v3.0.2:https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/WeBASE/doc/lab/index.html

For the first experience of WeBASE, please refer to the one-click deployment document:

https://webasedoc.readthedocs.io/zh_CN/latest/docs/WeBASE/install.html

Report problems to us, welcome to file an issue:

https://github.com/WeBankBlockchain/WeBASE/issues

7ba972b4da1783dc926bcfd028c7d845.png

Guess you like

Origin blog.csdn.net/webankblockchain/article/details/130633631