|
|
vor 9 Monaten | |
|---|---|---|
| .. | ||
| lib | f68b5d5abc feat(lazer/contracts/evm): add deterministic deployment script (#2137) | vor 1 Jahr |
| script | 57c302d0bc pre-commit | vor 11 Monaten |
| src | 5ef46e4986 feat(lazer-protocol): Update EVM payload (#2314) | vor 9 Monaten |
| test | 5ef46e4986 feat(lazer-protocol): Update EVM payload (#2314) | vor 9 Monaten |
| .gitignore | 6ab44570b2 feat: add lazer contracts and sdks (#2119) | vor 1 Jahr |
| README.md | 1bf3ae1b42 Pre-commit... again?! | vor 11 Monaten |
| foundry.toml | f68b5d5abc feat(lazer/contracts/evm): add deterministic deployment script (#2137) | vor 1 Jahr |
| remappings.txt | 6ab44570b2 feat: add lazer contracts and sdks (#2119) | vor 1 Jahr |
This package is built using Foundry.
PythLazer is an EVM on-chain contract that keeps track of trusted signers of Pyth Lazer payloads. It allows consumers to easily check validity of Pyth Lazer signatures while enabling key rotation.
PythLazerReceiver contains utilities required to validate and parse Pyth Lazer payloads. Contracts should use PythLazerReceiver as the base contract (or one of the base contracts) of their contracts to gain access to the provided functions.
$ forge build
$ forge test
$ forge fmt
$ forge snapshot
Anvil does not come with CreateX by default. It can be deployed or an RPC which has the contract can be forked. The below command forks an RPC with a functional CreateX contract.
$ anvil --fork-url "https://eth-sepolia.public.blastapi.io"
$ forge script script/PythLazerDeploy.s.sol --rpc-url <your_rpc_url> --private-key <your_private_key> --broadcast
The UUPSUpgradeable feature adds functions to the cocntract which support upgrading through the use of an UUPS/ERC1967Proxy. A function can be defined to migrate state if needed. Be careful of changing storage slots when upgrading. See Documentation for more details. In addition, the private key is necessary or contracts will be deployed to different addresses than expected.
$ forge script script/PythLazerDeploy.s.sol --rpc-url <your_rpc_url> --private-key <your_private_key> --broadcast --sig "migrate()"
$ cast <subcommand>
$ forge --help
$ anvil --help
$ cast --help