MCPcopy Create free account
hub / github.com/base/base / deploy_script

Function deploy_script

etc/systems/src/deployer/base_deployer.rs:198–243  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

196}
197
198fn deploy_script() -> String {
199 format!(
200 r#"set -e
201
202WORKDIR="{WORKDIR}"
203OUTPUT_DIR="{OUTPUT_DIR}"
204INTENT_PATH="{INTENT_PATH}"
205
206mkdir -p "$WORKDIR" "$OUTPUT_DIR"
207
208if [ -f "$OUTPUT_DIR/genesis.json" ] && [ -f "$OUTPUT_DIR/rollup.json" ] && [ -f "$OUTPUT_DIR/l1-addresses.json" ]; then
209 echo "Deployment artifacts already exist, skipping op-deployer"
210 exit 0
211fi
212
213op-deployer init \
214 --l1-chain-id "$L1_CHAIN_ID" \
215 --l2-chain-ids "$L2_CHAIN_ID" \
216 --intent-type custom \
217 --workdir "$WORKDIR"
218
219cp "$INTENT_PATH" "$WORKDIR/intent.toml"
220
221op-deployer apply \
222 --workdir "$WORKDIR" \
223 --deployment-target live \
224 --l1-rpc-url "$L1_RPC_URL" \
225 --private-key "$DEPLOYER_KEY"
226
227op-deployer inspect genesis \
228 --workdir "$WORKDIR" \
229 "$L2_CHAIN_ID" \
230 > "$OUTPUT_DIR/genesis.json"
231
232op-deployer inspect rollup \
233 --workdir "$WORKDIR" \
234 "$L2_CHAIN_ID" \
235 > "$OUTPUT_DIR/rollup.json"
236
237op-deployer inspect l1 \
238 --workdir "$WORKDIR" \
239 "$L2_CHAIN_ID" \
240 > "$OUTPUT_DIR/l1-addresses.json"
241"#,
242 )
243}
244
245fn replace_address(input: String, from: Address, to: Address) -> String {
246 input.replace(&format_address(from), &format_address(to))

Callers 1

deployMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected