Merge branch 'master' of https://github.com/microsoft/vscode-azure-blockchain-ethereum
This commit is contained in:
Коммит
a40021cf4f
|
@ -6,8 +6,7 @@ contract Base {
|
|||
address public Responder;
|
||||
}
|
||||
|
||||
contract HelloBlockchain is Base
|
||||
{
|
||||
contract HelloBlockchain is Base {
|
||||
enum StateType { Request, Respond }
|
||||
enum SwitcherEnum { On, Off }
|
||||
|
||||
|
@ -16,23 +15,19 @@ contract HelloBlockchain is Base
|
|||
string public RequestMessage;
|
||||
string public ResponseMessage;
|
||||
|
||||
constructor(string memory message) public
|
||||
{
|
||||
constructor(string memory message) public {
|
||||
Requestor = msg.sender;
|
||||
RequestMessage = message;
|
||||
State = StateType.Request;
|
||||
}
|
||||
|
||||
function SendRequest(string memory requestMessage, StateType state) public
|
||||
{
|
||||
function SendRequest(string memory requestMessage, StateType state) public {
|
||||
RequestMessage = requestMessage;
|
||||
State = state;
|
||||
}
|
||||
|
||||
function SendResponse(StateType state, SwitcherEnum flag) public
|
||||
{
|
||||
if (flag == SwitcherEnum.On)
|
||||
{
|
||||
function SendResponse(StateType state, SwitcherEnum flag) public {
|
||||
if (flag == SwitcherEnum.On) {
|
||||
Responder = msg.sender;
|
||||
}
|
||||
|
||||
|
@ -40,8 +35,7 @@ contract HelloBlockchain is Base
|
|||
}
|
||||
|
||||
function SwitcheToOff(uint completed) public {
|
||||
if(completed > 0)
|
||||
{
|
||||
if(completed > 0) {
|
||||
Flag = SwitcherEnum.Off;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче