forked from cerc-io/stack-orchestrator
Replace laconicd with optimism in mobymask-v2 stack (#272)
* Remove laconicd to use optimism endpoint
* Use fixturenet-optimism stack for mobymask-v2-watcher
* Fix setting L1 account private key in mobymask-v2 stack
Former-commit-id: b266ac78b4
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Read the private key of L1 account to deploy contract
|
||||
# TODO: Take from env if /geth-accounts volume doesn't exist to allow using separately running L1
|
||||
L1_PRIV_KEY=$(head -n 1 /geth-accounts/accounts.csv | cut -d ',' -f 3)
|
||||
|
||||
# Set the private key
|
||||
jq --arg privateKey "$L1_PRIV_KEY" '.privateKey = ($privateKey)' secrets-template.json > secrets.json
|
||||
|
||||
npm start
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rpcUrl": "http://op-geth:8545",
|
||||
"privateKey": "",
|
||||
"baseURI": "http://127.0.0.1:3002/#"
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"rpcUrl": "http://laconicd:8545",
|
||||
"privateKey": "GENESIS_ACCOUNT_PRIVATE_KEY",
|
||||
"baseURI": "http://127.0.0.1:3002/#"
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Assign deployed contract address from server config
|
||||
CONTRACT_ADDRESS=`jq '.address' /server/config.json`
|
||||
CONTRACT_ADDRESS=$(jq -r '.address' /server/config.json | tr -d '"')
|
||||
L1_PRIV_KEY_2=$(awk -F, 'NR==2{print $NF}' /geth-accounts/accounts.csv)
|
||||
|
||||
sed "s/REPLACE_WITH_CONTRACT_ADDRESS/${CONTRACT_ADDRESS}/" environments/watcher-config-template.toml > environments/local.toml
|
||||
sed "s/REPLACE_WITH_PRIVATE_KEY/${L1_PRIV_KEY_2}/" environments/watcher-config-template.toml > environments/local.toml
|
||||
sed -i "s/REPLACE_WITH_CONTRACT_ADDRESS/${CONTRACT_ADDRESS}/" environments/local.toml
|
||||
|
||||
echo 'yarn server'
|
||||
yarn server
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
enableDebugInfo = true
|
||||
|
||||
[server.p2p.peer.l2TxConfig]
|
||||
privateKey = ''
|
||||
contractAddress = REPLACE_WITH_CONTRACT_ADDRESS
|
||||
privateKey = 'REPLACE_WITH_PRIVATE_KEY'
|
||||
contractAddress = 'REPLACE_WITH_CONTRACT_ADDRESS'
|
||||
|
||||
[metrics]
|
||||
host = "0.0.0.0"
|
||||
@@ -59,7 +59,7 @@
|
||||
[upstream]
|
||||
[upstream.ethServer]
|
||||
gqlApiEndpoint = "http://ipld-eth-server:8083/graphql"
|
||||
rpcProviderEndpoint = "http://laconicd:8545"
|
||||
rpcProviderEndpoint = "http://op-geth:8545"
|
||||
blockDelayInMilliSecs = 60000
|
||||
|
||||
[upstream.cache]
|
||||
|
||||
Reference in New Issue
Block a user