Skip to content

Commit 1a831f5

Browse files
committed
Pull fee from lazer contract
1 parent b5fbbf9 commit 1a831f5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lazer/evm/src/ExampleReceiver.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ import {PythLazerLib} from "pyth-lazer/PythLazerLib.sol";
77

88
contract ExampleReceiver {
99
PythLazer pythLazer;
10-
uint256 verification_fee;
1110
uint64 public price;
1211
uint64 public timestamp;
1312

1413
constructor(address pythLazerAddress) {
1514
pythLazer = PythLazer(pythLazerAddress);
16-
verification_fee = pythLazer.verification_fee();
1715
}
1816

1917
function updatePrice(bytes calldata update) public payable {
18+
uint256 verification_fee = pythLazer.verification_fee();
2019
require(msg.value >= verification_fee, "Insufficient fee provided");
2120
(bytes memory payload,) = pythLazer.verifyUpdate{value: verification_fee}(update);
2221
if (msg.value > verification_fee) {

0 commit comments

Comments
 (0)