-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(prt-rollups): add integration test with fixes
- Loading branch information
1 parent
c4f1c08
commit 0c46830
Showing
56 changed files
with
1,233 additions
and
310 deletions.
There are no files selected for viewing
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,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
INITIAL_HASH=`xxd -p -c32 "${MACHINE_PATH}/hash"` | ||
|
||
export PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | ||
|
||
forge script \ | ||
script/DaveConsensus.s.sol \ | ||
--fork-url "http://127.0.0.1:8545" \ | ||
--broadcast \ | ||
--sig "run(bytes32)" \ | ||
"${INITIAL_HASH}" \ | ||
-vvvv |
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,26 @@ | ||
// (c) Cartesi and individual authors (see AUTHORS) | ||
// SPDX-License-Identifier: Apache-2.0 (see LICENSE) | ||
|
||
pragma solidity ^0.8.17; | ||
|
||
import {Script} from "forge-std/Script.sol"; | ||
|
||
import {Machine} from "prt-contracts/Machine.sol"; | ||
|
||
import "prt-contracts/tournament/factories/MultiLevelTournamentFactory.sol"; | ||
import "rollups-contracts/inputs/InputBox.sol"; | ||
import "src/DaveConsensus.sol"; | ||
|
||
contract DaveConcensusScript is Script { | ||
function run(Machine.Hash initialHash) external { | ||
vm.startBroadcast(vm.envUint("PRIVATE_KEY")); | ||
|
||
InputBox inputBox = new InputBox(); | ||
MultiLevelTournamentFactory factory = new MultiLevelTournamentFactory( | ||
new TopTournamentFactory(), new MiddleTournamentFactory(), new BottomTournamentFactory() | ||
); | ||
new DaveConsensus(inputBox, address(0x0), factory, initialHash); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
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
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
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
Oops, something went wrong.