Skip to content

Commit 8f6e5da

Browse files
authored
refactor(lazer/contracts/evm): update README with more deployment details (#2734)
1 parent 8fa43cc commit 8f6e5da

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

lazer/contracts/evm/README.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,52 @@ This package is built using [Foundry](https://book.getfoundry.sh/).
99
### Build
1010

1111
```shell
12-
$ forge build
12+
forge build
1313
```
1414

1515
### Test
1616

1717
```shell
18-
$ forge test
18+
forge test
1919
```
2020

2121
### Format
2222

2323
```shell
24-
$ forge fmt
24+
forge fmt
2525
```
2626

2727
### Gas Snapshots
2828

2929
```shell
30-
$ forge snapshot
30+
forge snapshot
3131
```
3232

3333
### Anvil
3434

3535
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.
3636

3737
```shell
38-
$ anvil --fork-url "https://eth-sepolia.public.blastapi.io"
38+
anvil --fork-url "https://eth-sepolia.public.blastapi.io"
3939
```
4040

4141
### Deploy
4242

43+
Run the following commands to deploy the `PythLazer` contract to the target network. For the verification to work, you need to provide an API key (which is
44+
etherscan most of the times). If you can't make it work, you can always deploy the contract without verification and verify it manually later (using the
45+
standard input json format).
46+
47+
```shell
48+
export ETHERSCAN_API_KEY=<your_etherscan_api_key>
49+
forge script script/PythLazerDeploy.s.sol --rpc-url <your_rpc_url> --private-key <your_private_key> --broadcast --verify
50+
```
51+
52+
Then, run the following command to add the trusted signer to the `PythLazer` contract. The trusted signer is the address of the Pyth Lazer payload signer, and
53+
the expiration timestamp is the time when the signer will no longer be trusted.
54+
4355
```shell
44-
$ forge script script/PythLazerDeploy.s.sol --rpc-url <your_rpc_url> --private-key <your_private_key> --broadcast
56+
cast send --rpc-url <your_rpc_url> --private-key <your_private_key> 0xACeA761c27A909d4D3895128EBe6370FDE2dF481 "updateTrustedSigner(address,uint256)" \
57+
"<trusted_signer_address>" "<trusted_signer_expiration_timestamp>"
4558
```
4659

4760
### Upgrade
@@ -50,19 +63,19 @@ The UUPSUpgradeable feature adds functions to the cocntract which support upgrad
5063
In addition, the private key is necessary or contracts will be deployed to different addresses than expected.
5164

5265
```shell
53-
$ forge script script/PythLazerDeploy.s.sol --rpc-url <your_rpc_url> --private-key <your_private_key> --broadcast --sig "migrate()"
66+
forge script script/PythLazerDeploy.s.sol --rpc-url <your_rpc_url> --private-key <your_private_key> --broadcast --sig "migrate()"
5467
```
5568

5669
### Cast
5770

5871
```shell
59-
$ cast <subcommand>
72+
cast <subcommand>
6073
```
6174

6275
### Help
6376

6477
```shell
65-
$ forge --help
66-
$ anvil --help
67-
$ cast --help
78+
forge --help
79+
anvil --help
80+
cast --help
6881
```

0 commit comments

Comments
 (0)