generated from 0xPARC/circom-starter
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #377 from trifle-labs/just-reduce-times
Just reduce times
- Loading branch information
Showing
24 changed files
with
3,742 additions
and
26 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import './AnybodyProblemV3.sol'; | ||
|
||
contract AnybodyProblemV3Mock is AnybodyProblemV3 { | ||
bool public foo = true; | ||
|
||
constructor( | ||
address payable proceedRecipient_, | ||
address payable speedruns_, | ||
address externalMetadata_, | ||
address payable tournament_, | ||
address[] memory verifiers_, | ||
uint256[] memory verifiersTicks, | ||
uint256[] memory verifiersBodies, | ||
address payable previousAB_ | ||
) | ||
AnybodyProblemV3( | ||
proceedRecipient_, | ||
speedruns_, | ||
externalMetadata_, | ||
tournament_, | ||
verifiers_, | ||
verifiersTicks, | ||
verifiersBodies, | ||
previousAB_ | ||
) | ||
{} | ||
|
||
Body[6][5] public mockedBodyDataByLevel; | ||
|
||
function setRunData( | ||
uint256 runId, | ||
uint256 day, | ||
uint256 accumulativeTime, | ||
address owner | ||
) public { | ||
if (runs_[runId].day == 0) { | ||
counterForOrdering++; | ||
} | ||
runs_[runId].day = day; | ||
runs_[runId].accumulativeTime = accumulativeTime; | ||
runs_[runId].owner = owner; | ||
} | ||
|
||
function setMockedBodyDataByLevel( | ||
uint256 level, | ||
Body[6] memory bodyData | ||
) public { | ||
mockedBodyDataByLevel[level - 1] = bodyData; | ||
} | ||
|
||
function generateLevelData( | ||
uint256 day, | ||
uint256 level | ||
) | ||
public | ||
view | ||
override(AnybodyProblemV3) | ||
returns (AnybodyProblemV3.Body[6] memory bodyData, uint256 bodyCount) | ||
{ | ||
if (mockedBodyDataByLevel[level - 1][0].seed == bytes32(0)) { | ||
return super.generateLevelData(day, level); | ||
} | ||
return (mockedBodyDataByLevel[level - 1], level + 1); | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
async function main() { | ||
const { deployAnybodyProblemV3, saveAndVerifyContracts } = await import( | ||
'./utils.js' | ||
) | ||
const deployedContracts = await deployAnybodyProblemV3({ | ||
ignoreTesting: true | ||
}) | ||
await saveAndVerifyContracts(deployedContracts) | ||
} | ||
main() | ||
.then(() => process.exit(0)) | ||
.catch((error) => { | ||
console.error(error) | ||
process.exit(1) | ||
}) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"address": "0x0b62e06a8da04A42393960E240025319544BB168", | ||
"chain": { "chainId": 8453, "name": "unknown" } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"address": "0xEbbB276C1006f23B1A5878a5c76ad3d72B8A002A", | ||
"address": "0x7099E994d3Bf7fdc612EEDc1d1e3926084e7671d", | ||
"chain": { "chainId": 8453, "name": "unknown" } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"address": "0x6cc4950960b040FcDd22126E39554b5fA4F703ec", | ||
"address": "0xA1D33c2Ab764AB4eCcD7a3988be8dD009fdE06a7", | ||
"chain": { "chainId": 8453, "name": "unknown" } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"address": "0xF65797567fF1Fef98b46eF09FdF9eCA1d3B8a17b", | ||
"address": "0xbaD98B68D31Dc45Df1C3C3Bcd7b29aCe2B1d80cA", | ||
"chain": { "chainId": 8453, "name": "unknown" } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"address": "0x00a12198B91A7405503529DDD62ad1B34CE6b5d3", | ||
"address": "0x067fa869c9f10B895a2dC038E80970F5030c8017", | ||
"chain": { "chainId": 8453, "name": "unknown" } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"address": "0x75C39Ff24DCFEd0FEEbafd434a40Ec9dc615ebEf", | ||
"chain": { "chainId": 84532, "name": "unknown" } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"address": "0x7592abb3D48F083C1a2F4922DECF3Ec9D760c599", | ||
"address": "0x936134737c30187AbA50a2B2893Be55B2EEBbF45", | ||
"chain": { "chainId": 84532, "name": "unknown" } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"address": "0x2f17a2Dd686c843A1B298E853aaD0220A2ea7Fe6", | ||
"address": "0x375b74Eef30255689B56C213De1C70484c8261B9", | ||
"chain": { "chainId": 84532, "name": "unknown" } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"address": "0xf45a48f0B99D66723b5C5e12306218110a313140", | ||
"address": "0x50b9a3ba35C51D25BaBe6f2739aC5df2b41C6994", | ||
"chain": { "chainId": 84532, "name": "unknown" } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"address": "0x7F6A32C0EC2C3BC02144a184349AFBed88189CFE", | ||
"address": "0xa035D398d4Cfac0a53e3A8A8E8d1d387efeED28E", | ||
"chain": { "chainId": 84532, "name": "unknown" } | ||
} |
Oops, something went wrong.