Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
191 changes: 178 additions & 13 deletions .openzeppelin/unknown-31337.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": "3.2",
"admin": {
"address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
"txHash": "0xce220e8020d14a3e0e60f8472cc63844fcc70bd437e13a41812bc141136fc41d"
"txHash": "0xd8d03d2166f28627da31822610ccf4c8905ce758bc0dd3eda1924d860a853818"
},
"proxies": [
{
Expand All @@ -15,16 +15,181 @@
"txHash": "0x278aba6f395750fac99dd0ac8035dec9717d15a1d714196ecfdf2e1cafcebcd4",
"kind": "transparent"
},
{
"address": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853",
"txHash": "0x1fd1fb8e5338853bcbccb1b741ea99184dca20a385ab86064c254a61de18137a",
"kind": "transparent"
},
{
"address": "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1",
"txHash": "0xa4ba84a87f706722411071dad0281fb565e6b58d4ed6982d7d2523b8780f20b1",
"kind": "transparent"
},
{
"address": "0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44",
"txHash": "0x30f29e23d1c12d52d4912c01917bcc888bc9198acec74a72960e504be0f9edf5",
"kind": "transparent"
},
{
"address": "0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690",
"txHash": "0x758d4bd5d0963eac83280b0c84cb9e6b78dc97d80826c47262961b68b80aebbe",
"kind": "transparent"
},
{
"address": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
"txHash": "0x0dd3450500fca5805bbf4cdb23ad616071c2aa7ba66773c505f719dc66e409ca",
"txHash": "0xea8eef7c48a5f99d626aa2ca3cfcb18815e6bcef10fe745721ecee3b64fe976f",
"kind": "transparent"
},
{
"address": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
"txHash": "0x5ea343306ce64e36df68ae4eded986ac89dab4b5662197f2437d4eca83f03160",
"kind": "transparent"
},
{
"address": "0x68B1D87F95878fE05B998F19b66F4baba5De1aed",
"txHash": "0x657c5dceffcae3cbf6532f444a71157292e392094a10c831f63c8e4b9b664c08",
"kind": "transparent"
},
{
"address": "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F",
"txHash": "0xca59ca400a25208132c3d2ca22593bdc072928a4caa834bdf1a69ea37bf99d6f",
"kind": "transparent"
},
{
"address": "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8",
"txHash": "0x0ae83d079c7ec542c40c5b054fbc4112e3407ec17f9586fb2850389c054b85b7",
"kind": "transparent"
},
{
"address": "0x70e0bA845a1A0F2DA3359C97E0285013525FFC49",
"txHash": "0xd5e6640a0c6c402c00b637f5b302181844242d026b6baac1f49b2177f9b024c6",
"kind": "transparent"
},
{
"address": "0x9d4454B023096f34B160D6B654540c56A1F81688",
"txHash": "0x573e38099e10e98d6bfe338a12d5f99fbb7054f2efb4215e4ff2a98d82f2799d",
"kind": "transparent"
},
{
"address": "0x1291Be112d480055DaFd8a610b7d1e203891C274",
"txHash": "0x57da3472363087a2e2fbf844811aefcc2e8f3eaf242eae0cc98fcd67d29b9fe4",
"kind": "transparent"
},
{
"address": "0x2bdCC0de6bE1f7D2ee689a0342D76F52E8EFABa3",
"txHash": "0x4bcad94e25a5804b0f5bc6c7e364dc0f14be0d09ec099c6577c8316ed540d891",
"kind": "transparent"
},
{
"address": "0xcbEAF3BDe82155F56486Fb5a1072cb8baAf547cc",
"txHash": "0xef9fc4dc7606d772b90aef7c9ddc04290644eeae3471eee54e6118c34d8b6049",
"kind": "transparent"
},
{
"address": "0x5081a39b8A5f0E35a8D959395a630b68B74Dd30f",
"txHash": "0xaed86bf928b19613c0e713deffb012d77505b1c82088b6ac8597ebb8762129d9",
"kind": "transparent"
},
{
"address": "0x21dF544947ba3E8b3c32561399E88B52Dc8b2823",
"txHash": "0xf8aa6127b0c1df55eaa01c6abac70d3baa3ab4ca2346f553b5a2445c80e6c1d4",
"kind": "transparent"
},
{
"address": "0x36b58F5C1969B7b6591D752ea6F5486D069010AB",
"txHash": "0x02b75c699e6c6386a448c22d369307f2db50b94b5749ccf20e4265896566efa4",
"kind": "transparent"
},
{
"address": "0x172076E0166D1F9Cc711C77Adf8488051744980C",
"txHash": "0xed012c16fa84ebe0e2ff56493f996a3154a5f8e79b3cc477ec1e15e8c69486a5",
"kind": "transparent"
},
{
"address": "0xfbC22278A96299D91d41C453234d97b4F5Eb9B2d",
"txHash": "0xac3ab8d3e5fbd89fcb390de02971d55b655a58ab06fbd0e9820bc3ca5aa9b671",
"kind": "transparent"
},
{
"address": "0x4C2F7092C2aE51D986bEFEe378e50BD4dB99C901",
"txHash": "0x73aade3f684bda97171656803aba5647ae2993f8966f505711aa82f4d6340817",
"kind": "transparent"
},
{
"address": "0xA4899D35897033b927acFCf422bc745916139776",
"txHash": "0x9113b18afa4bcc8a08a2e3e624ccb594bd352919ec3680b8da5469a615087b11",
"kind": "transparent"
},
{
"address": "0xe8D2A1E88c91DCd5433208d4152Cc4F399a7e91d",
"txHash": "0x495b4a792d37a3c0530d51e70584cb064d777562095f4a37ebab06a55142f515",
"kind": "transparent"
},
{
"address": "0xD5ac451B0c50B9476107823Af206eD814a2e2580",
"txHash": "0x0ec28c4a898d4f139cfb53add3f3cf4e8fe51899ec1dc1fa8114323050936c62",
"kind": "transparent"
},
{
"address": "0xD0141E899a65C95a556fE2B27e5982A6DE7fDD7A",
"txHash": "0xaea5778c734ed0340f2efc8105d466950c6a044c143f1560f469d21ac030b534",
"kind": "transparent"
},
{
"address": "0x276C216D241856199A83bf27b2286659e5b877D3",
"txHash": "0xf116c569a9e69d04ba635247b4c5714d610e726b84551d79261f7adadb7f5d20",
"kind": "transparent"
},
{
"address": "0x3aAde2dCD2Df6a8cAc689EE797591b2913658659",
"txHash": "0x3e9b5bf7a15f767e15769fe75c25ecd8dd4945e171d8db017df200c828c8fef2",
"kind": "transparent"
},
{
"address": "0x525C7063E7C20997BaaE9bDa922159152D0e8417",
"txHash": "0xe63299f25f06cc8cd3dbd6141d1741a86846a889eb050f16bb2bd8b9a0f95241",
"kind": "transparent"
},
{
"address": "0xb9bEECD1A582768711dE1EE7B0A1d582D9d72a6C",
"txHash": "0xfb04a6881ae9d103c94ddd0b46b0666a0d66918ac297b1fa7f8fc5942af6737a",
"kind": "transparent"
},
{
"address": "0x99dBE4AEa58E518C50a1c04aE9b48C9F6354612f",
"txHash": "0x3116082ec9ac6f87afca1effee6c9e6049eaffc454c54c870bd7b1e9d8741728",
"kind": "transparent"
},
{
"address": "0x976fcd02f7C4773dd89C309fBF55D5923B4c98a1",
"txHash": "0x9add148a16e4029cf3e73f36cca1adae994184a80c0194ebf102ccdbdd7a9ce4",
"kind": "transparent"
},
{
"address": "0x32EEce76C2C2e8758584A83Ee2F522D4788feA0f",
"txHash": "0xf55549e2eb69e041c656564ff54c4a4ef5769ede59af990c07aa9bc541358907",
"kind": "transparent"
},
{
"address": "0xFD6F7A6a5c21A3f503EBaE7a473639974379c351",
"txHash": "0xcd4b5230199454863b8748b5a37232045c4aa25f0b7d672081c8f0e38cb987b2",
"kind": "transparent"
},
{
"address": "0x40a42Baf86Fc821f972Ad2aC878729063CeEF403",
"txHash": "0x3ad40bdc4a5ad3d756840d453e7fffa91efb8a71892559b51c12de8cfdca81bd",
"kind": "transparent"
},
{
"address": "0x870526b7973b56163a6997bB7C886F5E4EA53638",
"txHash": "0x16397d2e6913b637e110795f87ac3e578b8edc59cd6ccc5151f01d23658cf698",
"kind": "transparent"
}
],
"impls": {
"0f4b9a3f9d630d5b52da0a5190186b3dfde9da16b53392ef06395e960527fe80": {
"654bf167561317abe8d63f12ac1eb9a7fe7defd758251c57ef6a326eb3bcedb1": {
"address": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
"txHash": "0x34c88d70b92d697d215b7f5954f808fda37c8bc89840051d40168ea489b9ce7e",
"txHash": "0xe17f8ee2e641fffc2fa99e6ba96310601d1929dc248eefc115ab9239ac906fc4",
"layout": {
"solcVersion": "0.8.17",
"storage": [
Expand Down Expand Up @@ -121,7 +286,7 @@
"label": "_requests",
"offset": 0,
"slot": "107",
"type": "t_mapping(t_uint256,t_struct(Request)1597_storage)",
"type": "t_mapping(t_uint256,t_struct(Request)1082_storage)",
"contract": "GrtPool",
"src": "contracts/GrtPool.sol:39"
},
Expand All @@ -139,7 +304,7 @@
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_struct(Offer)1606_storage)dyn_storage": {
"t_array(t_struct(Offer)1091_storage)dyn_storage": {
"label": "struct GrtPool.Offer[]",
"numberOfBytes": "32"
},
Expand Down Expand Up @@ -167,11 +332,11 @@
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_struct(Request)1597_storage)": {
"t_mapping(t_uint256,t_struct(Request)1082_storage)": {
"label": "mapping(uint256 => struct GrtPool.Request)",
"numberOfBytes": "32"
},
"t_struct(Offer)1606_storage": {
"t_struct(Offer)1091_storage": {
"label": "struct GrtPool.Offer",
"members": [
{
Expand Down Expand Up @@ -201,7 +366,7 @@
],
"numberOfBytes": "96"
},
"t_struct(Request)1597_storage": {
"t_struct(Request)1082_storage": {
"label": "struct GrtPool.Request",
"members": [
{
Expand All @@ -218,13 +383,13 @@
},
{
"label": "deposit",
"type": "t_struct(TokenInfo)1613_storage",
"type": "t_struct(TokenInfo)1098_storage",
"offset": 0,
"slot": "2"
},
{
"label": "request",
"type": "t_struct(TokenInfo)1613_storage",
"type": "t_struct(TokenInfo)1098_storage",
"offset": 0,
"slot": "5"
},
Expand All @@ -236,14 +401,14 @@
},
{
"label": "offers",
"type": "t_array(t_struct(Offer)1606_storage)dyn_storage",
"type": "t_array(t_struct(Offer)1091_storage)dyn_storage",
"offset": 0,
"slot": "9"
}
],
"numberOfBytes": "320"
},
"t_struct(TokenInfo)1613_storage": {
"t_struct(TokenInfo)1098_storage": {
"label": "struct GrtPool.TokenInfo",
"members": [
{
Expand Down
36 changes: 36 additions & 0 deletions contracts/GrtDispute.sol
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,42 @@ contract GrtDispute is OwnableUpgradeable {
chainIdOffer
));
}
// exposing functions to submit answers and commitments
function submitAnswerCommitment (
bytes32 _answer_hash,
bytes32 _questionId,
uint256 _maxPrevious
)
external payable {
require (msg.value > 0, "Bond must be greater than zero");
IRealityETH(_addrReality).submitAnswerCommitment{value: msg.value}(_questionId, _answer_hash, _maxPrevious, msg.sender);
}

function submitAnswerReveal (
string memory _answer,
uint256 nonce,
bytes32 _questionId,
uint256 bond
)
external {
bytes32 answer = keccak256(abi.encodePacked(_answer));
IRealityETH(_addrReality).submitAnswerReveal(_questionId, answer, nonce, bond);
}

function answerQuestion(
string memory _answer,
bytes32 _questionId,
uint256 _maxPrevious
) public payable {
require (msg.value > 0, "Bond must be greater than zero");
bytes32 answer = keccak256(abi.encodePacked(_answer));
IRealityETH(_addrReality).submitAnswerFor{value: msg.value}(_questionId, answer, _maxPrevious, msg.sender);
}

// Extra function for test purposes
function getBytes(string memory _str) public pure returns (bytes32) {
return keccak256(abi.encodePacked(_str));
}

function claimWinnings (
bytes32 questionId,
Expand Down
4 changes: 2 additions & 2 deletions contracts/GrtPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ contract GrtPool is OwnableUpgradeable, GrtDispute {
_requests[idRequest].offers[idOffer].isPaid = true;
}
return success;
}
} else revert('Incorrect answer');

return false;
// return false;
}

// Claim GRT without dispute
Expand Down
Loading