Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Wrong L1 contract deployment command #1033

Open
JustAnotherDevv opened this issue Oct 28, 2024 · 2 comments
Open

[DOCS] Wrong L1 contract deployment command #1033

JustAnotherDevv opened this issue Oct 28, 2024 · 2 comments
Labels
community-request docs updates requested by community or OP collective documentation Improvements or additions to documentation

Comments

@JustAnotherDevv
Copy link

JustAnotherDevv commented Oct 28, 2024

Wrong L1 contract deployment command

Overview

In the docs page with tutorial for deploying L2 using OP stack the section for deploying L1 contracts is wrong. The command from the docs is:

forge script scripts/deploy/Deploy.s.sol:Deploy --private-key $GS_ADMIN_PRIVATE_KEY --broadcast --rpc-url $L1_RPC_URL --slow.

It should be forge script scripts/deploy/Deploy.s.sol:Deploy --private-key $GS_ADMIN_PRIVATE_KEY --broadcast --rpc-url $L1_RPC_URL --slow instead.

Now, after running this script I am getting error:

forge script scripts/Deploy.s.sol:Deploy --private-key $GS_ADMIN_PRIVATE_KEY --broadcast --rpc-url $L1_RPC_URL --slow 
[⠒] Compiling...
[⠢] Compiling 1 files with Solc 0.8.15
[⠘] Solc 0.8.15 finished in 75.04ms
No files changed, compilation skipped
Traces:
  [57372465] → new Deploy@0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519
    └─ ← [Return] 285705 bytes of code

  [2272650] Deploy::setUp()
    ├─ [0] VM::projectRoot() [staticcall]
    │   └─ ← [Return] "/Users/nevvdevv/optimism/packages/contracts-bedrock"
    ├─ [0] VM::envOr("DEPLOY_SCRIPT", "Deploy")
    │   └─ ← [Return] <env var value>
    ├─ [0] VM::envOr("DEPLOYMENT_CONTEXT", "")
    │   └─ ← [Return] <env var value>
    ├─ [0] VM::envOr("SIG", "run")
    │   └─ ← [Return] <env var value>
    ├─ [0] VM::envOr("DEPLOY_FILE", "run-latest.json")
    │   └─ ← [Return] <env var value>
    ├─ [0] VM::envOr("CHAIN_ID", 21322 [2.132e4])
    │   └─ ← [Return] <env var value>
    ├─ [0] VM::toString(21322 [2.132e4]) [staticcall]
    │   └─ ← [Return] "21322"
    ├─ [0] VM::createDir("/Users/nevvdevv/optimism/packages/contracts-bedrock/deployments/getting-started", true)
    │   └─ ← [Return] 
    ├─ [0] VM::readFile("/Users/nevvdevv/optimism/packages/contracts-bedrock/deployments/getting-started/.chainId") [staticcall]
    │   └─ ← [Revert] vm.readFile: failed to read from "/Users/nevvdevv/optimism/packages/contracts-bedrock/deployments/getting-started/.chainId": No such file or directory (os error 2)
    ├─ [0] VM::toString(21322 [2.132e4]) [staticcall]
    │   └─ ← [Return] "21322"
    ├─ [0] VM::writeFile("/Users/nevvdevv/optimism/packages/contracts-bedrock/deployments/getting-started/.chainId", "21322")
    │   └─ ← [Return] 
    ├─ [0] console::log("Connected to network with chainid %s", 21322 [2.132e4]) [staticcall]
    │   └─ ← [Stop] 
    ├─ [0] VM::readFile("/Users/nevvdevv/optimism/packages/contracts-bedrock/deployments/getting-started/.deploy") [staticcall]
    │   └─ ← [Revert] vm.readFile: failed to read from "/Users/nevvdevv/optimism/packages/contracts-bedrock/deployments/getting-started/.deploy": No such file or directory (os error 2)
    ├─ [0] VM::writeJson("<stringified JSON>", "/Users/nevvdevv/optimism/packages/contracts-bedrock/deployments/getting-started/.deploy")
    │   └─ ← [Return] 
    ├─ [0] console::log("Storing temp deployment data in %s", "/Users/nevvdevv/optimism/packages/contracts-bedrock/deployments/getting-started/.deploy") [staticcall]
    │   └─ ← [Stop] 
    ├─ [0] VM::envOr("CONTRACT_ADDRESSES_PATH", "")
    │   └─ ← [Return] <env var value>
    ├─ [0] VM::projectRoot() [staticcall]
    │   └─ ← [Return] "/Users/nevvdevv/optimism/packages/contracts-bedrock"
    ├─ [1893528] → new <unknown>@0xC7f2Cf4845C6db0e1a1e91ED41Bcd0FcC1b0E141
    │   ├─ [0] console::log("DeployConfig: reading file %s", "/Users/nevvdevv/optimism/packages/contracts-bedrock/deploy-config/getting-started.json") [staticcall]
    │   │   └─ ← [Stop] 
    │   ├─ [0] VM::readFile("/Users/nevvdevv/optimism/packages/contracts-bedrock/deploy-config/getting-started.json") [staticcall]
    │   │   └─ ← [Return] <file>
    │   ├─ [0] VM::parseJsonAddress("<stringified JSON>", "$.finalSystemOwner") [staticcall]
    │   │   └─ ← [Revert] vm.parseJsonAddress: failed parsing JSON: expected value at line 19 column 38
    │   └─ ← [Revert] vm.parseJsonAddress: failed parsing JSON: expected value at line 19 column 38
    └─ ← [Revert] vm.parseJsonAddress: failed parsing JSON: expected value at line 19 column 38

Update

It seems like in the file ./deploy-config/getting-started.json in the line 19 the value "l2OutputOracleStartingTimestamp": , is empty as you can see which is not correct json syntax but it's not explained in the docs how it should be generated.

I can create PR for it today but want to know before if it's worth changing and if it's gonna be merged.

@JustAnotherDevv JustAnotherDevv added community-request docs updates requested by community or OP collective documentation Improvements or additions to documentation labels Oct 28, 2024
@JustAnotherDevv JustAnotherDevv changed the title [DOCS] Add PR title [DOCS] Wrong L1 contract deployment command Oct 28, 2024
@sbvegan
Copy link
Collaborator

sbvegan commented Oct 28, 2024

Did you use the tutorials/chain branch for this tutorial?

@JustAnotherDevv
Copy link
Author

Did you use the tutorials/chain branch for this tutorial?

Yes, I have switched to the branch before following rest of the tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-request docs updates requested by community or OP collective documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants