From 0f41b0eb9c7518ead850427fcc680425c0e8579e Mon Sep 17 00:00:00 2001 From: OliveDS Date: Fri, 3 Apr 2020 20:57:08 +0800 Subject: [PATCH] change contract in common --- bdledger/api/common.proto | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/bdledger/api/common.proto b/bdledger/api/common.proto index 47150ba..66a6d58 100644 --- a/bdledger/api/common.proto +++ b/bdledger/api/common.proto @@ -32,6 +32,30 @@ message Transaction { bytes s = 11; // ECDSA signature s } +message Contract { + bytes contractName = 1; //合约名称 + uint32 randomNum =2; //合约执行的节点数量 + bytes operation = 3; //合约方法 + bytes arg = 4; //合约方法参数 + bytes path = 5; //合约文件路径(合约在IDE工程的相对路径) + bytes content = 6; //合约内容(可为合约文件相对路径/合约脚本) + bytes pubkey = 7; //用户公钥 + + enum ContractUnitRequestType{ + START = 0; + STOP = 1; + EXECUTE = 2; + REPLY = 3; + REQUEST = 4; + PREPREPARE = 5; + PREPARE = 6; + COMMIT = 7; + ADDPEER = 8; + DROPPEER = 9; + STATESYNC = 10; + } +} + message Block { bytes hash = 1; // 区块的哈希,当区块处于待确认状态时为`null` repeated bytes parent_hashes = 2; // 父区块的哈希