|
|
@@ -26,7 +26,8 @@ contract PythLazerTest is Test {
|
|
|
address trustedSigner = 0xEfEf56cD66896f6799A90A4e4d512C330c094e44;
|
|
|
vm.prank(address(1));
|
|
|
pythLazer.updateTrustedSigner(trustedSigner, 3000000000000000);
|
|
|
- bytes memory update = hex"2a22999a577d3cc0202197939d736bc0dcf71b9dde7b9470e4d16fa8e2120c0787a1c0d744d0c39cc372af4d1ecf2d09e84160ca905f3f597d20e2eec144a446a0459ad600001c93c7d3750006240af373971c01010000000201000000000005f5e100";
|
|
|
+ bytes
|
|
|
+ memory update = hex"2a22999a577d3cc0202197939d736bc0dcf71b9dde7b9470e4d16fa8e2120c0787a1c0d744d0c39cc372af4d1ecf2d09e84160ca905f3f597d20e2eec144a446a0459ad600001c93c7d3750006240af373971c01010000000201000000000005f5e100";
|
|
|
|
|
|
uint256 fee = pythLazer.verification_fee();
|
|
|
|
|
|
@@ -37,12 +38,12 @@ contract PythLazerTest is Test {
|
|
|
|
|
|
// Alice provides appropriate fee
|
|
|
vm.prank(alice);
|
|
|
- pythLazer.verifyUpdate{ value: fee }(update);
|
|
|
+ pythLazer.verifyUpdate{value: fee}(update);
|
|
|
assertEq(alice.balance, 1 ether - fee);
|
|
|
|
|
|
// Alice overpays and is refunded
|
|
|
vm.prank(alice);
|
|
|
- pythLazer.verifyUpdate{ value: 0.5 ether }(update);
|
|
|
+ pythLazer.verifyUpdate{value: 0.5 ether}(update);
|
|
|
assertEq(alice.balance, 1 ether - fee - fee);
|
|
|
|
|
|
// Bob does not attach a fee
|
|
|
@@ -54,7 +55,7 @@ contract PythLazerTest is Test {
|
|
|
// Bob does not attach enough fees
|
|
|
vm.prank(bob);
|
|
|
vm.expectRevert("Insufficient fee provided");
|
|
|
- pythLazer.verifyUpdate{ value: 1 wei }(update);
|
|
|
+ pythLazer.verifyUpdate{value: 1 wei}(update);
|
|
|
assertEq(bob.balance, 1 ether);
|
|
|
}
|
|
|
}
|