Skip to content

Commit

Permalink
fix test and forge fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMustermann2 committed Oct 14, 2024
1 parent 20e14ec commit 6d470f3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
7 changes: 1 addition & 6 deletions script/18_SimulateReceive.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,7 @@ contract SimulateReceive is Script, StdCheats {
bytes memory extraData = "";
vm.startBroadcast();
bytes memory encoded = abi.encodeWithSelector(
IOAppCore(receiver).endpoint().lzReceive.selector,
origin,
receiver,
guid,
payload,
extraData
IOAppCore(receiver).endpoint().lzReceive.selector, origin, receiver, guid, payload, extraData
);
console.logBytes(encoded);
IOAppCore(receiver).endpoint().lzReceive(origin, receiver, guid, payload, extraData);
Expand Down
4 changes: 3 additions & 1 deletion script/19_DeployFaucet.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ contract DeployScript is BaseScript {
address exoEthProxyAdmin = address(new ProxyAdmin());
CombinedFaucet exoEthFaucetLogic = new CombinedFaucet();
CombinedFaucet exoEthFaucet = CombinedFaucet(
payable(address(new TransparentUpgradeableProxy(address(exoEthFaucetLogic), address(exoEthProxyAdmin), "")))
payable(
address(new TransparentUpgradeableProxy(address(exoEthFaucetLogic), address(exoEthProxyAdmin), ""))
)
);
// give 1 exoETH per request
exoEthFaucet.initialize(exocoreValidatorSet.addr, tokenAddr, 1 ether);
Expand Down
2 changes: 1 addition & 1 deletion src/core/CombinedFaucet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ contract CombinedFaucet is

function _withdraw(address dst) internal {
require(
block.timestamp >= lastRequestTime[dst] + ONE_DAY || lastRequestTime[msg.sender] == 0,
block.timestamp >= lastRequestTime[dst] + ONE_DAY || lastRequestTime[dst] == 0,
"CombinedFaucet: 24h rate limit breached"
);
lastRequestTime[dst] = block.timestamp;
Expand Down
4 changes: 2 additions & 2 deletions test/foundry/unit/CombinedFaucet.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ contract NativeTokenFaucetTest is Test {
vm.prank(owner);
faucet.withdraw(user1);

// Fast forward time by 24 hours
// // Fast forward time by 24 hours
vm.warp(block.timestamp + 1 days);

// Should work now
// // Should work now
vm.prank(owner);
faucet.withdraw(user1);
assertEq(user1.balance, tokenAmount * 2);
Expand Down

0 comments on commit 6d470f3

Please sign in to comment.