Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<doc>(url): add gitee url in all github url, add urlPrefix config. #185

Merged
merged 2 commits into from
Mar 23, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/dev/interchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ WeCross提供了两个系统合约,分别是代理合约和桥接合约。代

WeCross提供了[Solidity版本](https://github.com/WeBankBlockchain/WeCross-BCOS2-Stub/blob/master/src/main/resources/WeCrossHub.sol)和[Golang版本](https://github.com/WeBankBlockchain/WeCross-Fabric1-Stub/blob/dev/src/main/resources/chaincode/WeCrossHub/hub.go)的桥接合约。

Solidity版本合约下载地址:
[GitHub访问链接](https://github.com/WeBankBlockchain/WeCross-BCOS2-Stub/blob/master/src/main/resources/WeCrossHub.sol)
[Gitee访问链接](https://gitee.com/WeBank/WeCross-BCOS2-Stub/raw/master/src/main/resources/WeCrossHub.sol)

Golang版本合约下载地址:
[GitHub访问链接](https://github.com/WeBankBlockchain/WeCross-Fabric1-Stub/blob/dev/src/main/resources/chaincode/WeCrossHub/hub.go)
[Gitee访问链接](https://gitee.com/WeBank/WeCross-Fabric1-Stub/raw/master/src/main/resources/chaincode/WeCrossHub/hub.go)

- Solidity版本

``` solidity
Expand Down Expand Up @@ -80,7 +88,8 @@ func (h *Hub) selectCallbackResult(
.. important::
- 调用的目标链的接口定义必须匹配: ``string[] func(string[] args)``
- 回调函数的接口定义必须匹配: ``string[] func(bool state, string[] result)``,state表示调用目标链是否成功,result是调用结果
- 实现跨链调用的业务合约编写规范可参考示例合约: `Solidity版 <https://github.com/WeBankBlockchain/WeCross-Console/blob/master/src/main/resources/contracts/solidity/InterchainSample.sol>`_ 和 `Golang版 <https://github.com/WeBankBlockchain/WeCross-Console/blob/master/src/main/resources/contracts/chaincode/interchain/interchainSample.go>`_
- 实现跨链调用的业务合约编写规范可参考示例合约,GitHub访问: `Solidity版 <https://github.com/WeBankBlockchain/WeCross-Console/blob/master/src/main/resources/contracts/solidity/InterchainSample.sol>`_ 和 `Golang版 <https://github.com/WeBankBlockchain/WeCross-Console/blob/master/src/main/resources/contracts/chaincode/interchain/interchainSample.go>`_
- Gitee访问: `Solidity版 <https://gitee.com/WeBank/WeCross-Console/blob/master/src/main/resources/contracts/solidity/InterchainSample.sol>`_ 和 `Golang版 <https://gitee.com/WeBank/WeCross-Console/blob/master/src/main/resources/contracts/chaincode/interchain/interchainSample.go>`_
```

## 操作示例
Expand Down
22 changes: 18 additions & 4 deletions docs/dev/stub.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,15 @@

示例:

- [Solidity版](https://github.com/WeBankBlockchain/WeCross-BCOS2-Stub/blob/master/src/main/resources/WeCrossProxy.sol)
- [Golang版](https://github.com/WeBankBlockchain/WeCross-Fabric1-Stub/blob/master/src/main/resources/chaincode/WeCrossProxy/proxy.go)
Solidity版:

- [GitHub访问链接](https://github.com/WeBankBlockchain/WeCross-BCOS2-Stub/blob/master/src/main/resources/WeCrossProxy.sol)
- [Gitee访问链接](https://gitee.com/WeBank/WeCross-BCOS2-Stub/blob/master/src/main/resources/WeCrossProxy.sol)

Golang版:

- [GitHub访问链接](https://github.com/WeBankBlockchain/WeCross-Fabric1-Stub/blob/master/src/main/resources/chaincode/WeCrossProxy/proxy.go)
- [Gitee访问链接](https://gitee.com/WeBank/WeCross-Fabric1-Stub/blob/master/src/main/resources/chaincode/WeCrossProxy/proxy.go)

以Solidity合约为例,接口列表:

Expand Down Expand Up @@ -138,8 +145,15 @@ function getXATransaction(

示例:

- [Solidity版](https://github.com/WeBankBlockchain/WeCross-BCOS2-Stub/blob/master/src/main/resources/WeCrossHub.sol)
- [Golang版](https://github.com/WeBankBlockchain/WeCross-Fabric1-Stub/blob/master/src/main/resources/chaincode/WeCrossHub/hub.go)
Solidity版:

- [GitHub访问链接](https://github.com/WeBankBlockchain/WeCross-BCOS2-Stub/blob/master/src/main/resources/WeCrossHub.sol)
- [Gitee访问链接](https://gitee.com/WeBank/WeCross-BCOS2-Stub/blob/master/src/main/resources/WeCrossHub.sol)

Golang版:

- [GitHub访问链接](https://github.com/WeBankBlockchain/WeCross-Fabric1-Stub/blob/master/src/main/resources/chaincode/WeCrossHub/hub.go)
- [Gitee访问链接](https://gitee.com/WeBank/WeCross-Fabric1-Stub/blob/master/src/main/resources/chaincode/WeCrossHub/hub.go)

以Solidity合约为例,接口列表:

Expand Down
10 changes: 8 additions & 2 deletions docs/faq/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@ macOS对下载的包权限要求较为严格,必须同一个进程下载的才
``` bash
# 清理环境
cd ~/wecross-demo/ && bash clear.sh && cd ~ && rm -rf demo
# 将三个步骤的命令拼成一条命令执行
bash <(curl -sL https://github.com/WeBankBlockchain/WeCross/releases/download/resources/download_demo.sh) && cd demo && bash build.sh
# 执行下载demo包
bash <(curl -sL https://github.com/WeBankBlockchain/WeCross/releases/download/resources/download_demo.sh)

# 若出现网络原因长时间无法下载,可执行以下命令下载demo包
bash <(curl -sL https://gitee.com/WeBank/WeCross/raw/master/scripts/download_demo.sh)

# 进入demo文件夹,执行构建逻辑
cd demo && bash build.sh
```

### 4. 问题:用户使用MySQL 8.0+ 社区版本时,出现WeCross-Account-Manager启动错误的情况
Expand Down
12 changes: 11 additions & 1 deletion docs/manual/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ WeCross Router的配置位于`conf`目录下,分为:
sslSwitch = 2 # disable ssl:2, SSL without client auth:1 , SSL with client and server auth: 0
webRoot = 'classpath:pages'
mimeTypesFile = 'classpath:conf/mime.types' # set the content-types of a file
# urlPrefix = '/wecross' # v1.1.1新增配置,使用该配置可收敛所有请求URL前缀

[p2p]
listenIP = '0.0.0.0'
Expand Down Expand Up @@ -102,6 +103,7 @@ WeCross Router的配置位于`conf`目录下,分为:
- sslSwitch:整型,SL加密配置,0:双向验证,1:验Router证书,0:无验证
- webRoot:字符串,网页管理平台页面存放位置
- mimeTypesFile:字符串网页管理平台的content-type映射文件存放位置
- urlPrefix: 用于收敛请求URL,若不配置则默认为空,若配置则必须配置正确,支持数字英文和特殊符号( -, _ ),长度1-18
- `[p2p]` 组网配置
- listenIP:字符串;P2P服务监听地址;一般为'0.0.0.0'
- listenPort :整型;P2P服务监听端口;WeCross Router之间交换消息的端口
Expand Down Expand Up @@ -150,7 +152,15 @@ WeCross Router的配置位于`conf`目录下,分为:

WeCross启动后会在`wecross.toml`中所指定的`chains`的根目录下去遍历所有的一级目录,目录名即为chain的名字,不同的目录代表不同的链,然后尝试读取每个目录下的`stub.toml`文件。

目前WeCross支持的Stub类型包括:[FISCO BCOS](https://github.com/FISCO-BCOS/FISCO-BCOS)和[Fabric](https://github.com/hyperledger/fabric)。
目前WeCross支持的Stub类型包括:FISCO BCOS 和Hyperledger Fabric。

FISCO BCOS访问链接:
[GitHub访问链接](https://github.com/FISCO-BCOS/FISCO-BCOS),
[Gitee访问链接](https://github.com/FISCO-BCOS/FISCO-BCOS)

Hyperledger Fabric访问链接:
[GitHub访问链接](https://github.com/hyperledger/fabric),
[Gitee访问链接](https://gitee.com/mirrors/hyperledger-fabric)

**配置FISCO BCOS**

Expand Down
Loading