createRequest | Initiates a request with requested amount from the fund, token address, ultimate recipient of the funds requested, id of the funds requested from, a short description of the request, coordinates pointing to request location. Returns the id of the initiated request which is a _createRequest function call. |
approveCheck | Checks if fund is approvable or if fund is open. If not reverts. Checks for approver role. If not reverts. Checks if request’s pending check count 0, if so sets the status of request with one of Pending, Approved, Finalized, Excuted. If status is executed at the beginning of the function, it reverts. If status is Approved at the end of function request will be finalized. Returns a Boolean indicating the result of the operation. |
getStatus | Gets a request id as an input parameter and returns the status of request with this id. |
getPendingChecksCount | Gets a request id as an input parameter and returns pending check count parameter’s value. It shows remaining checks for a request. |
getSigner | Gets a request id and check id as input parameters and returns the signer address of that check for this request. |
callOracle | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
_isApprovable | Returns true if a request’s status is Pending and approval status of request’s signature for a specific check is false. |
_isFundOpen | Gets a FundV1 clone as an input parameter and returns the result of isOpen function of clone. It is a Boolean indicator shows that if a fund is donatable or not. |
_hasFundRole | Gets a clone contracts and a role as input parameters and returns a Boolean indicator that shows if message.sender account has been granted role input. |
_createRequest | Gets parameters from createRequest function. Allocates storage location for the new request and assign new request with parameters to the storage location. Emits a RequestCreated event with parameters and request checks. Returns request id. |
_approveCheck | Gets a request, check id and success as input parameters, requires pending check count is greater than 0. If success is true, decreases pending check count value by 1. Signs the request for that specific check. |
_bumpStatus | Checks if status of request is reached at maximum index, which is executed. If not, increases the status index, pending-to-approved, approved-to-finalized or finalized-to-executed. |
_getFund | Gets a fund id as an input parameter. Initialize a fund address value for fund manager. Returns a clone of FundV1 contract that has a fund address as an input parameter. |
_copyChecksFromFund | Gets a FundV1 contract as an input parameter. Returns all checks for that fund. |
_patchRequestWithCheck | Gets request id and check id as input parameters and returns encoded request id, status, location informations, recipient of request, fund id, amount and token. |
Modifiers | |
RequestCreated | def |
Signed | def |
OracleRequest | def |
StatusChange | def |