File tree Expand file tree Collapse file tree 3 files changed +25
-15
lines changed
Expand file tree Collapse file tree 3 files changed +25
-15
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,10 @@ func main() {
147147 Aliases : []string {"u" },
148148 Description : "Spins up Blockscout stack" ,
149149 Action : func (c * cli.Context ) error {
150- return framework .BlockScoutUp (c .String ("rpc" ))
150+ return framework .BlockScoutUp (
151+ c .String ("rpc" ),
152+ c .String ("chain-id" ),
153+ )
151154 },
152155 },
153156 {
@@ -169,7 +172,10 @@ func main() {
169172 if err := framework .BlockScoutDown (rpc ); err != nil {
170173 return err
171174 }
172- return framework .BlockScoutUp (rpc )
175+ return framework .BlockScoutUp (
176+ c .String ("rpc" ),
177+ c .String ("chain-id" ),
178+ )
173179 },
174180 },
175181 },
Original file line number Diff line number Diff line change @@ -78,12 +78,13 @@ func extractAllFiles(embeddedDir string) error {
7878 return err
7979}
8080
81- func BlockScoutUp (url string ) error {
81+ func BlockScoutUp (url , chainID string ) error {
8282 L .Info ().Msg ("Creating local Blockscout stack" )
8383 if err := extractAllFiles ("observability" ); err != nil {
8484 return err
8585 }
8686 os .Setenv ("BLOCKSCOUT_RPC_URL" , url )
87+ os .Setenv ("BLOCKSCOUT_CHAID_ID" , chainID )
8788 // old migrations for v15 is still applied somehow, cleaning up DB helps
8889 if err := RunCommand ("bash" , "-c" , fmt .Sprintf (`
8990 cd %s && \
@@ -117,14 +118,7 @@ func BlockScoutDown(url string) error {
117118 if err != nil {
118119 return err
119120 }
120- return RunCommand ("bash" , "-c" , fmt .Sprintf (`
121- cd %s && \
122- rm -rf blockscout-db-data && \
123- rm -rf logs && \
124- rm -rf redis-data && \
125- rm -rf stats-db-data && \
126- rm -rf dets
127- ` , filepath .Join ("blockscout" , "services" )))
121+ return RunCommand ("bash" , "-c" , "rm -rf blockscout/" )
128122}
129123
130124func ObservabilityUp () error {
Original file line number Diff line number Diff line change @@ -17,6 +17,13 @@ services:
1717 file : ./services/db.yml
1818 service : db
1919
20+ sc-verifier :
21+ extends :
22+ file : ./services/smart-contract-verifier.yml
23+ service : smart-contract-verifier
24+ ports :
25+ - 8082:8050
26+
2027 backend :
2128 depends_on :
2229 - db
@@ -32,10 +39,12 @@ services:
3239 links :
3340 - db:database
3441 environment :
35- ETHEREUM_JSONRPC_HTTP_URL : http://host.docker.internal:8545/
36- ETHEREUM_JSONRPC_TRACE_URL : http://host.docker.internal:8545/
37- ETHEREUM_JSONRPC_WS_URL : ws://host.docker.internal:8545/
38- CHAIN_ID : ' 1337'
42+ ETHEREUM_JSONRPC_HTTP_URL : ${BLOCKSCOUT_RPC_URL:-http://host.docker.internal:8555}
43+ ETHEREUM_JSONRPC_TRACE_URL : ${BLOCKSCOUT_RPC_URL:-http://host.docker.internal:8555}
44+ MICROSERVICE_SC_VERIFIER_ENABLED : true
45+ MICROSERVICE_SC_VERIFIER_URL : http://smart-contract-verifier:8050/
46+ MICROSERVICE_SC_VERIFIER_TYPE : sc_verifier
47+ CHAIN_ID : ${BLOCKSCOUT_CHAIN_ID:-1337}
3948
4049 nft_media_handler :
4150 depends_on :
@@ -103,3 +112,4 @@ services:
103112 extends :
104113 file : ./services/nginx.yml
105114 service : proxy
115+
You can’t perform that action at this time.
0 commit comments