Created
May 14, 2021 23:32
-
-
Save beshup/9060296662a21449cd0e60569efd0fac to your computer and use it in GitHub Desktop.
not actually javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function requestDividendWorthyEntities(string memory request_uri) public onlyOwner { | |
Chainlink.Request memory request = buildChainlinkRequest(nba_JOBID, address(this), this.fulfill.selector); | |
// Set the URL to perform the request on | |
request.add("get", request_uri); | |
request.add("path", "to_send"); | |
bytes32 reqID = sendChainlinkRequestTo(nba_ORACLE, request, fee); | |
jobIdMapping[reqID] = msg.sender; | |
} | |
function fulfill(bytes32 reqID, uint256 payout) public recordChainlinkFulfillment(reqID) | |
{ | |
require(jobIdMapping[reqID] != address(0x0)); | |
payable(jobIdMapping[reqID]).transfer(payout); | |
jobIdMapping[reqID] = address(0x0); | |
//payout to jobIdMapping[randomID] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment