Skip to content

title: 教链部署 date: 2022-11-17 15:30:13

教链BCOS使用方法

启动:

  • cd && ./fisco/nodes/127.0.0.1/start_all.sh
  • cd webase-front && ./start.sh
  • ./status.sh # 检查webase-front启动状态
  • cd && cd ./WeBASE-Node-Manager/dist && ./start.sh
  • ./status.sh # 检查WeBASE-Node-Manager启动状态

停止:

  • cd && cd ./WeBASE-Node-Manager/dist && ./stop.sh
  • cd && cd webase-front && ./stop.sh
  • cd && ./fisco/nodes/127.0.0.1/stop_all.sh

部署合约:

  • deploy Permission $initiator $issuer $inspector

  • deploy PermissionrChange

  • call PermissionrChange $PermissionrChange setPermission $Permission

  • deploy PostgraduateCompetencyCert $CertType

  • deploy PostgraduateCompetencyCertController $PostgraduateCompetencyCert $Permission

  • deploy ControllerChange

  • call ControllerChange $ControllerChange setController $PostgraduateCompetencyCertController

  • call PostgraduateCompetencyCert $PostgraduateCompetencyCert setController $PostgraduateCompetencyCertController

部署合约时的命令与输出:

[group:1]> deploy Permission 0x07cd7e9a886d8b696e901e1ec09d2cef29e889d4 0x8a7dbb032254e29ddac43459afe85b02b0e44499 0x767563aac5c65721be85809123c81af3653bdbba
transaction hash: 0xd7a2554449911845cc9ca7f780a128854180a2c97a7e709af8754b9260d0b487
contract address: 0x22dfebc0400b19e265c28f5f5711f78358da87f4
currentAccount: 0x605a3e0d62350e87f677fb0e78a45b62453526b8

[group:1]> deploy PermissionrChange
transaction hash: 0x609a4d623ae64ac34a0ae7141f17d26ba5c091b5ea1c8bd14cbf5039847e94cb
contract address: 0x8e6142fefc7384c4092816680ea34201db89dd97
currentAccount: 0x605a3e0d62350e87f677fb0e78a45b62453526b8

[group:1]> call PermissionrChange 0x8e6142fefc7384c4092816680ea34201db89dd97 setPermission 0x22dfebc0400b19e265c28f5f5711f78358da87f4
transaction hash: 0x9a2c979e2a1043d998eaff5ef51c394a1d9a6430c18c77438b1f4463c7f7252e
---------------------------------------------------------------------------------------------
transaction status: 0x0
description: transaction executed successfully
---------------------------------------------------------------------------------------------
Transaction inputs:
Input value size:1
Input types: (ADDRESS)
Input values:(0x22dfebc0400b19e265c28f5f5711f78358da87f4)
---------------------------------------------------------------------------------------------
Receipt message: Success
Return message: Success
Return values:[]
---------------------------------------------------------------------------------------------
Event logs
Event: {}

[group:1]> deploy PostgraduateCompetencyCert 1
transaction hash: 0x44a4cf2fe11df493c565c30b3922a42fffe8c7b277ce1e75171b3113684e7adb
contract address: 0xd7b39297b3e1430c1e94f74693c46d46b3545347
currentAccount: 0x605a3e0d62350e87f677fb0e78a45b62453526b8

[group:1]> deploy PostgraduateCompetencyCertController 0xd7b39297b3e1430c1e94f74693c46d46b3545347 0x22dfebc0400b19e265c28f5f5711f78358da87f4
transaction hash: 0x568d9bda81d3bce695211a6c52f6958e97961f8a2f8e0eb7b36dbdedd10544a3
contract address: 0x3317686e6caef3c0d64f9cedbe36d35a3291a640
currentAccount: 0x605a3e0d62350e87f677fb0e78a45b62453526b8

[group:1]> deploy ControllerChange
transaction hash: 0xb77954f517d09d4246e56cc2200db7b3a62c58731012c584c13688e6a37c696b
contract address: 0x47c84cf750d08c04212addda3a46d8fad3628f2e
currentAccount: 0x605a3e0d62350e87f677fb0e78a45b62453526b8

[group:1]> call ControllerChange 0x47c84cf750d08c04212addda3a46d8fad3628f2e setController 0x3317686e6caef3c0d64f9cedbe36d35a3291a640
transaction hash: 0x88627c1e6c9335d2c3bdfbbd74338aad9c9a2914d71ab51446a616715342d72c
---------------------------------------------------------------------------------------------
transaction status: 0x0
description: transaction executed successfully
---------------------------------------------------------------------------------------------
Transaction inputs:
Input value size:1
Input types: (ADDRESS)
Input values:(0x3317686e6caef3c0d64f9cedbe36d35a3291a640)
---------------------------------------------------------------------------------------------
Receipt message: Success
Return message: Success
Return values:[]
---------------------------------------------------------------------------------------------
Event logs
Event: {}

All in one

启动:

  • cd && ./fisco/nodes/127.0.0.1/start_all.sh && cd webase-front && ./start.sh && cd && cd ./WeBASE-Node-Manager/dist && ./start.sh

停止:

  • cd && cd ./WeBASE-Node-Manager/dist && ./stop.sh && cd && cd webase-front && ./stop.sh && cd && ./fisco/nodes/127.0.0.1/stop_all.sh