Created
June 20, 2019 16:48
-
-
Save pedroduartecosta/e025e6241197ec37f2dbda31c67dc2a6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 createRequest ( | |
string memory _urlToQuery, | |
string memory _attributeToFetch | |
) | |
public | |
{ | |
uint lenght = requests.push(Request(currentId, _urlToQuery, _attributeToFetch, "")); | |
Request storage r = requests[lenght-1]; | |
// Hardcoded oracles address | |
r.quorum[address(0x6c2339b46F41a06f09CA0051ddAD54D1e582bA77)] = 1; | |
r.quorum[address(0xb5346CF224c02186606e5f89EACC21eC25398077)] = 1; | |
r.quorum[address(0xa2997F1CA363D11a0a35bB1Ac0Ff7849bc13e914)] = 1; | |
// launch an event to be detected by oracle outside of blockchain | |
emit NewRequest ( | |
currentId, | |
_urlToQuery, | |
_attributeToFetch | |
); | |
// increase request id | |
currentId++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment