Skip to content

Commit

Permalink
Add .DS_Store to .gitignore, add chainInfo.json, update file paths, a…
Browse files Browse the repository at this point in the history
…dd init_dir.sh script
  • Loading branch information
ComputerKeeda committed Dec 22, 2023
1 parent 60bcbcc commit 1078913
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ provingKey.txt
verificationKey.txt
verificationKey.json
.idea
.DS_Store
15 changes: 15 additions & 0 deletions config/chainInfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"chainInfo": {
"chainID": "aircosmic_2605-1107",
"key": "AccountName",
"moniker": "ChainName"
},
"daInfo": {
"daSelected": "Celestia",
"daWalletAddress": "0xaddress",
"daWalletKeypair": "0xaddress"
},
"sequencerInfo": {
"sequencerType": "Air Sequencer"
}
}
6 changes: 5 additions & 1 deletion handlers/settlement-client/addExecutionLayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func AddExecutionLayer() string {

verificationKeyContentsAsString := string(verificationKeyContents)

chainInfoFile, err := os.ReadFile("data/chainInfo.json")
chainInfoFile, err := os.ReadFile("config/chainInfo.json")
if err != nil {
fmt.Println("Error reading file:", err)
logs.Log.Error("Error reading chainInfo.json file")
Expand All @@ -54,6 +54,10 @@ func AddExecutionLayer() string {
}

chainInfoAsString, err := json.Marshal(chainInfo.ChainInfo)
if err != nil {
fmt.Println("Error marshalling chain info:", err)
return "nil"
}

postAddExecutionLayerStruct := PostAddExecutionLayerStruct{
VerificationKey: verificationKeyContentsAsString,
Expand Down
13 changes: 13 additions & 0 deletions scripts/init_dir.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sudo rm -rf data/leveldb
mkdir -p data/leveldb/batches
mkdir -p data/leveldb/blocks
mkdir -p data/leveldb/proof
mkdir -p data/leveldb/publicWitness
mkdir -p data/leveldb/static
mkdir -p data/leveldb/tx
touch data/blockCount.txt
touch data/transactionCount.txt
touch data/batchCount.txt
echo "0" > data/blockCount.txt
echo "0" > data/transactionCount.txt
echo "0" > data/batchCount.txt

0 comments on commit 1078913

Please sign in to comment.