Skip to content

Commit

Permalink
refactor pkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
mpjunior92 committed Jan 1, 2024
1 parent 579e908 commit 4abb759
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion beacon_constants.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

const slotsPerHistoricalRoot = uint64(8192)

Expand Down
7 changes: 4 additions & 3 deletions main.go → cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"flag"

eigenpodproofs "github.com/Layr-Labs/eigenpod-proofs-generation"

Check failure on line 6 in cmd/main.go

View workflow job for this annotation

GitHub Actions / Run Go Tests

no required module provides package github.com/Layr-Labs/eigenpod-proofs-generation; to add it:

Check failure on line 6 in cmd/main.go

View workflow job for this annotation

GitHub Actions / Run Go Tests

no required module provides package github.com/Layr-Labs/eigenpod-proofs-generation; to add it:
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
)
Expand Down Expand Up @@ -42,13 +43,13 @@ func main() {
// Handling commands based on the 'command' flag
switch *command {
case "ValidatorFieldsProof":
GenerateValidatorFieldsProof(*oracleBlockHeaderFile, *stateFile, *validatorIndex, *chainID, *outputFile)
eigenpodproofs.GenerateValidatorFieldsProof(*oracleBlockHeaderFile, *stateFile, *validatorIndex, *chainID, *outputFile)

case "WithdrawalFieldsProof":
GenerateWithdrawalFieldsProof(*oracleBlockHeaderFile, *stateFile, *historicalSummaryStateFile, *blockHeaderFile, *blockBodyFile, *validatorIndex, *withdrawalIndex, *historicalSummariesIndex, *blockHeaderIndex, *chainID, *outputFile)
eigenpodproofs.GenerateWithdrawalFieldsProof(*oracleBlockHeaderFile, *stateFile, *historicalSummaryStateFile, *blockHeaderFile, *blockBodyFile, *validatorIndex, *withdrawalIndex, *historicalSummariesIndex, *blockHeaderIndex, *chainID, *outputFile)

case "BalanceUpdateProof":
GenerateBalanceUpdateProof(*oracleBlockHeaderFile, *stateFile, *validatorIndex, *chainID, *outputFile)
eigenpodproofs.GenerateBalanceUpdateProof(*oracleBlockHeaderFile, *stateFile, *validatorIndex, *chainID, *outputFile)

default:
log.Debug().Str("Unknown command:", *command)
Expand Down
2 changes: 1 addition & 1 deletion eigen_pod_proofs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion generate_balance_update_proof.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"encoding/hex"
Expand Down
2 changes: 1 addition & 1 deletion generate_validator_proof.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"encoding/hex"
Expand Down
2 changes: 1 addition & 1 deletion generate_withdrawal_fields_proof.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"encoding/hex"
Expand Down
2 changes: 1 addition & 1 deletion merkle_util_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"encoding/binary"
Expand Down
2 changes: 1 addition & 1 deletion merkle_utils.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

//Adapted from https://github.com/ferranbt/fastssz/blob/main/tree.go
import (
Expand Down
2 changes: 1 addition & 1 deletion proof_utils.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"encoding/hex"
Expand Down
2 changes: 1 addition & 1 deletion proofs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion prove_validator.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"math/big"
Expand Down
2 changes: 1 addition & 1 deletion prove_withdrawal.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion utils.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"encoding/json"
Expand Down

0 comments on commit 4abb759

Please sign in to comment.