Snapchain / op-chain-deployment

2 stars 0 forks source link

fix: deploy contract in non-interactive #35

Closed lesterli closed 2 weeks ago

lesterli commented 2 weeks ago

Summary

This PR updates script to deploy L1 contracts in non-interactive mode, b/c when launching L2 on local L1 during the make l2-prepare step, a warning prompt appears:

Warning: Script contains a transaction to 0x9568d36E291c2C4c34fa5593fcE73715abEf6F9c which does not contain any code.
Do you wish to continue? [y/n]

it caused the ansible script to fail with the below error:

TASK [Prepare for running the OP chain] ***********************************************************************************************************************************************************************************************
fatal: [165.227.85.141]: FAILED! => {"changed": true, "cmd": "make l2-prepare", "delta": "0:00:47.667666", "end": "2024-11-06 08:25:47.340154", "msg": "non-zero return code", "rc": 2, "start": "2024-11-06 08:24:59.672488", "stderr": "forge install\nWarning: Script contains a transaction to 0x9568d36E291c2C4c34fa5593fcE73715abEf6F9c which does not contain any code.\nError: IO error: not a terminal\n\nContext:\n- not a terminal\nmake: *** [Makefile:60: l2-prepare] Error 1", "stderr_lines": ["forge install", "Warning: Script contains a transaction to 0x9568d36E291c2C4c34fa5593fcE73715abEf6F9c which does not contain any code.", "Error: IO error: not a terminal", "", "Context:", "- not a terminal", "make: *** [Makefile:60: l2-prepare] Error 1"],

Test Plan

Tested it on tohma-devnet-2

make l2-prepare
lesterli commented 2 weeks ago

i guess we don't deploy l2 on local l1 with anscible playbook before