-
Notifications
You must be signed in to change notification settings - Fork 686
Open
Description
- SendRequest and SendResponse do not satisfy its specifications.
Lines 25 to 34 in 1b712d6
function SendRequest(string memory requestMessage) public { if (Requestor != msg.sender) { revert(); } RequestMessage = requestMessage; State = StateType.Request; }
Lines 37 to 44 in 1b712d6
| function SendResponse(string memory responseMessage) public | |
| { | |
| Responder = msg.sender; | |
| // call ContractUpdated() to record this action | |
| ResponseMessage = responseMessage; | |
| State = StateType.Respond; | |
| } |
As documented by its following specification, SendRequest is only available when previous message has been responded, a.k.a., Respond state while SendResponse is only available when there is a request message, a.k.a., Request state.
Lines 108 to 147 in 1b712d6
| "States": [ | |
| { | |
| "Name": "Request", | |
| "DisplayName": "Request", | |
| "Description": "...", | |
| "PercentComplete": 50, | |
| "Value": 0, | |
| "Style": "Success", | |
| "Transitions": [ | |
| { | |
| "AllowedRoles": ["Responder"], | |
| "AllowedInstanceRoles": [], | |
| "Description": "...", | |
| "Function": "SendResponse", | |
| "NextStates": [ "Respond" ], | |
| "DisplayName": "Send Response" | |
| } | |
| ] | |
| }, | |
| { | |
| "Name": "Respond", | |
| "DisplayName": "Respond", | |
| "Description": "...", | |
| "PercentComplete": 90, | |
| "Value": 1, | |
| "Style": "Success", | |
| "Transitions": [ | |
| { | |
| "AllowedRoles": [], | |
| "AllowedInstanceRoles": ["Requestor"], | |
| "Description": "...", | |
| "Function": "SendRequest", | |
| "NextStates": [ "Request" ], | |
| "DisplayName": "Send Request" | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| ] |
Metadata
Metadata
Assignees
Labels
No labels