We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5fbbf9 commit 1a831f5Copy full SHA for 1a831f5
lazer/evm/src/ExampleReceiver.sol
@@ -7,16 +7,15 @@ import {PythLazerLib} from "pyth-lazer/PythLazerLib.sol";
7
8
contract ExampleReceiver {
9
PythLazer pythLazer;
10
- uint256 verification_fee;
11
uint64 public price;
12
uint64 public timestamp;
13
14
constructor(address pythLazerAddress) {
15
pythLazer = PythLazer(pythLazerAddress);
16
- verification_fee = pythLazer.verification_fee();
17
}
18
19
function updatePrice(bytes calldata update) public payable {
+ uint256 verification_fee = pythLazer.verification_fee();
20
require(msg.value >= verification_fee, "Insufficient fee provided");
21
(bytes memory payload,) = pythLazer.verifyUpdate{value: verification_fee}(update);
22
if (msg.value > verification_fee) {
0 commit comments