Skip to content

Commit

Permalink
forge fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
capossele committed Feb 15, 2024
1 parent 8a58c2f commit 6c648d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
12 changes: 2 additions & 10 deletions script/BonsaiDeploy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,7 @@ contract BonsaiDeploy is Script, BonsaiCheats {
console2.log("Using IRiscZeroVerifier at ", address(verifierAddr));
verifier = IRiscZeroVerifier(verifierAddr);
} else {
verifier = new RiscZeroGroth16Verifier(
ControlID.CONTROL_ID_0,
ControlID.CONTROL_ID_1
);
verifier = new RiscZeroGroth16Verifier(ControlID.CONTROL_ID_0, ControlID.CONTROL_ID_1);
console2.log("Deployed RiscZeroGroth16Verifier to ", address(verifier));
}

Expand All @@ -107,12 +104,7 @@ contract BonsaiDeploy is Script, BonsaiCheats {
// Use a long and unweildy environment variable name for overriding
// the expected chain ID for the test relay so that it is hard to
// trigger without thinking about it.
bonsaiRelay = new BonsaiTestRelay(
vm.envOr(
"DEPLOY_BONSAI_TEST_RELAY_EXPECTED_CHAIN_ID",
uint256(31337)
)
);
bonsaiRelay = new BonsaiTestRelay(vm.envOr("DEPLOY_BONSAI_TEST_RELAY_EXPECTED_CHAIN_ID", uint256(31337)));
console2.log("Deployed BonsaiTestRelay to ", address(bonsaiRelay));
}
return bonsaiRelay;
Expand Down
10 changes: 2 additions & 8 deletions tests/BonsaiStarter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ contract BonsaiStarterTest is BonsaiTest {
function testOffChainMock() public {
bytes32 imageId = queryImageId("FIBONACCI");
// Deploy a new starter instance
BonsaiStarter starter = new BonsaiStarter(
IBonsaiRelay(bonsaiRelay),
imageId
);
BonsaiStarter starter = new BonsaiStarter(IBonsaiRelay(bonsaiRelay), imageId);

// Anticipate a callback invocation on the starter contract
vm.expectCall(address(starter), abi.encodeWithSelector(BonsaiStarter.storeResult.selector));
Expand All @@ -48,10 +45,7 @@ contract BonsaiStarterTest is BonsaiTest {
// Test the BonsaiStarter contract by mocking an on-chain callback request
function testOnChainMock() public {
// Deploy a new starter instance
BonsaiStarter starter = new BonsaiStarter(
IBonsaiRelay(bonsaiRelay),
queryImageId("FIBONACCI")
);
BonsaiStarter starter = new BonsaiStarter(IBonsaiRelay(bonsaiRelay), queryImageId("FIBONACCI"));

// Anticipate an on-chain callback request to the relay
vm.expectCall(address(bonsaiRelay), abi.encodeWithSelector(IBonsaiRelay.requestCallback.selector));
Expand Down

0 comments on commit 6c648d5

Please sign in to comment.