diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7f8f9a2a75..60f3d728e6 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -15,7 +15,7 @@ /solana/ @kcsongor @a5-pickle /sui/ @kcsongor @a5-pickle @gator-boi /terra/ @kcsongor @a5-pickle -/wormchain/ @nik-suri +/wormchain/ @nik-suri @johnsaigle @mdulin2 @jtieri # Utilities diff --git a/node/cmd/guardiand/node.go b/node/cmd/guardiand/node.go index fffe74c890..c9211b50b3 100644 --- a/node/cmd/guardiand/node.go +++ b/node/cmd/guardiand/node.go @@ -178,10 +178,8 @@ var ( xlayerRPC *string xlayerContract *string - lineaRPC *string - lineaContract *string - lineaRollUpUrl *string - lineaRollUpContract *string + lineaRPC *string + lineaContract *string berachainRPC *string berachainContract *string @@ -389,8 +387,6 @@ func init() { lineaRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "lineaRPC", "Linea RPC URL", "ws://eth-devnet:8545", []string{"ws", "wss"}) lineaContract = NodeCmd.Flags().String("lineaContract", "", "Linea contract address") - lineaRollUpUrl = NodeCmd.Flags().String("lineaRollUpUrl", "", "Linea roll up URL") - lineaRollUpContract = NodeCmd.Flags().String("lineaRollUpContract", "", "Linea roll up contract address") berachainRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "berachainRPC", "Berachain RPC URL", "ws://eth-devnet:8545", []string{"ws", "wss"}) berachainContract = NodeCmd.Flags().String("berachainContract", "", "Berachain contract address") @@ -619,6 +615,9 @@ func runNode(cmd *cobra.Command, args []string) { // Verify flags + if *nodeName == "" { + logger.Fatal("Please specify --nodeName") + } if *nodeKeyPath == "" && env != common.UnsafeDevNet { // In devnet mode, keys are deterministically generated. logger.Fatal("Please specify --nodeKey") } @@ -643,6 +642,100 @@ func runNode(cmd *cobra.Command, args []string) { logger.Fatal("Please specify --ethRPC") } + // In devnet mode, we generate a deterministic guardian key and write it to disk. + if env == common.UnsafeDevNet { + err := devnet.GenerateAndStoreDevnetGuardianKey(*guardianKeyPath) + if err != nil { + logger.Fatal("failed to generate devnet guardian key", zap.Error(err)) + } + } + + // Load guardian key + gk, err := common.LoadGuardianKey(*guardianKeyPath, env == common.UnsafeDevNet) + if err != nil { + logger.Fatal("failed to load guardian key", zap.Error(err)) + } + + logger.Info("Loaded guardian key", zap.String( + "address", ethcrypto.PubkeyToAddress(gk.PublicKey).String())) + + // Load p2p private key + var p2pKey libp2p_crypto.PrivKey + if env == common.UnsafeDevNet { + idx, err := devnet.GetDevnetIndex() + if err != nil { + logger.Fatal("Failed to parse hostname - are we running in devnet?") + } + p2pKey = devnet.DeterministicP2PPrivKeyByIndex(int64(idx)) + + if idx != 0 { + firstGuardianName, err := devnet.GetFirstGuardianNameFromBootstrapPeers(*p2pBootstrap) + if err != nil { + logger.Fatal("failed to get first guardian name from bootstrap peers", zap.String("bootstrapPeers", *p2pBootstrap), zap.Error(err)) + } + // try to connect to guardian-0 + for { + _, err := net.LookupIP(firstGuardianName) + if err == nil { + break + } + logger.Info(fmt.Sprintf("Error resolving %s. Trying again...", firstGuardianName)) + time.Sleep(time.Second) + } + // TODO this is a hack. If this is not the bootstrap Guardian, we wait 10s such that the bootstrap Guardian has enough time to start. + // This may no longer be necessary because now the p2p.go ensures that it can connect to at least one bootstrap peer and will + // exit the whole guardian if it is unable to. Sleeping here for a bit may reduce overall startup time by preventing unnecessary restarts, though. + logger.Info("This is not a bootstrap Guardian. Waiting another 10 seconds for the bootstrap guardian to come online.") + time.Sleep(time.Second * 10) + } + } else { + p2pKey, err = common.GetOrCreateNodeKey(logger, *nodeKeyPath) + if err != nil { + logger.Fatal("Failed to load node key", zap.Error(err)) + } + } + + // Set up telemetry if it is enabled. We can't do this until we have the p2p key and the guardian key. + // Telemetry is enabled by default in mainnet/testnet. In devnet it is disabled by default. + usingLoki := *telemetryLokiURL != "" + if !*disableTelemetry && (env != common.UnsafeDevNet || (env == common.UnsafeDevNet && usingLoki)) { + if !usingLoki { + logger.Fatal("Please specify --telemetryLokiURL or set --disableTelemetry=false") + } + + // Get libp2p peer ID from private key + pk := p2pKey.GetPublic() + peerID, err := peer.IDFromPublicKey(pk) + if err != nil { + logger.Fatal("Failed to get peer ID from private key", zap.Error(err)) + } + + labels := map[string]string{ + "node_name": *nodeName, + "node_key": peerID.String(), + "guardian_addr": ethcrypto.PubkeyToAddress(gk.PublicKey).String(), + "network": *p2pNetworkID, + "version": version.Version(), + } + + skipPrivateLogs := !*publicRpcLogToTelemetry + + var tm *telemetry.Telemetry + if usingLoki { + logger.Info("Using Loki telemetry logger", + zap.String("publicRpcLogDetail", *publicRpcLogDetailStr), + zap.Bool("logPublicRpcToTelemetry", *publicRpcLogToTelemetry)) + + tm, err = telemetry.NewLokiCloudLogger(context.Background(), logger, *telemetryLokiURL, "wormhole", skipPrivateLogs, labels) + if err != nil { + logger.Fatal("Failed to initialize telemetry", zap.Error(err)) + } + } + + defer tm.Close() + logger = tm.WrapLogger(logger) // Wrap logger with telemetry logger + } + // Validate the args for all the EVM chains. The last flag indicates if the chain is allowed in mainnet. *ethContract = checkEvmArgs(logger, *ethRPC, *ethContract, "eth", true) *bscContract = checkEvmArgs(logger, *bscRPC, *bscContract, "bsc", true) @@ -662,6 +755,7 @@ func runNode(cmd *cobra.Command, args []string) { *mantleContract = checkEvmArgs(logger, *mantleRPC, *mantleContract, "mantle", true) *blastContract = checkEvmArgs(logger, *blastRPC, *blastContract, "blast", true) *xlayerContract = checkEvmArgs(logger, *xlayerRPC, *xlayerContract, "xlayer", true) + *lineaContract = checkEvmArgs(logger, *lineaRPC, *lineaContract, "linea", true) *berachainContract = checkEvmArgs(logger, *berachainRPC, *berachainContract, "berachain", false) *snaxchainContract = checkEvmArgs(logger, *snaxchainRPC, *snaxchainContract, "snaxchain", true) @@ -673,12 +767,6 @@ func runNode(cmd *cobra.Command, args []string) { *holeskyContract = checkEvmArgs(logger, *holeskyRPC, *holeskyContract, "holesky", false) *polygonSepoliaContract = checkEvmArgs(logger, *polygonSepoliaRPC, *polygonSepoliaContract, "polygonSepolia", false) - // Linea requires a couple of additional parameters. - *lineaContract = checkEvmArgs(logger, *lineaRPC, *lineaContract, "linea", false) - if (*lineaRPC != "") && (*lineaRollUpUrl == "" || *lineaRollUpContract == "") && env != common.UnsafeDevNet { - logger.Fatal("If --lineaRPC is specified, --lineaRollUpUrl and --lineaRollUpContract must also be specified") - } - if !argsConsistent([]string{*solanaContract, *solanaRPC}) { logger.Fatal("Both --solanaContract and --solanaRPC must be set or both unset") } @@ -743,10 +831,6 @@ func runNode(cmd *cobra.Command, args []string) { logger.Fatal("--publicRpcLogDetail should be one of (none, minimal, full)") } - if *nodeName == "" { - logger.Fatal("Please specify --nodeName") - } - // Complain about Infura on mainnet. // // As it turns out, Infura has a bug where it would sometimes incorrectly round @@ -770,63 +854,6 @@ func runNode(cmd *cobra.Command, args []string) { logger.Fatal("Infura is known to send incorrect blocks - please use your own nodes") } - // In devnet mode, we generate a deterministic guardian key and write it to disk. - if env == common.UnsafeDevNet { - err := devnet.GenerateAndStoreDevnetGuardianKey(*guardianKeyPath) - if err != nil { - logger.Fatal("failed to generate devnet guardian key", zap.Error(err)) - } - } - - // Database - db := db.OpenDb(logger, dataDir) - defer db.Close() - - // Guardian key - gk, err := common.LoadGuardianKey(*guardianKeyPath, env == common.UnsafeDevNet) - if err != nil { - logger.Fatal("failed to load guardian key", zap.Error(err)) - } - - logger.Info("Loaded guardian key", zap.String( - "address", ethcrypto.PubkeyToAddress(gk.PublicKey).String())) - - // Load p2p private key - var p2pKey libp2p_crypto.PrivKey - if env == common.UnsafeDevNet { - idx, err := devnet.GetDevnetIndex() - if err != nil { - logger.Fatal("Failed to parse hostname - are we running in devnet?") - } - p2pKey = devnet.DeterministicP2PPrivKeyByIndex(int64(idx)) - - if idx != 0 { - firstGuardianName, err := devnet.GetFirstGuardianNameFromBootstrapPeers(*p2pBootstrap) - if err != nil { - logger.Fatal("failed to get first guardian name from bootstrap peers", zap.String("bootstrapPeers", *p2pBootstrap), zap.Error(err)) - } - // try to connect to guardian-0 - for { - _, err := net.LookupIP(firstGuardianName) - if err == nil { - break - } - logger.Info(fmt.Sprintf("Error resolving %s. Trying again...", firstGuardianName)) - time.Sleep(time.Second) - } - // TODO this is a hack. If this is not the bootstrap Guardian, we wait 10s such that the bootstrap Guardian has enough time to start. - // This may no longer be necessary because now the p2p.go ensures that it can connect to at least one bootstrap peer and will - // exit the whole guardian if it is unable to. Sleeping here for a bit may reduce overall startup time by preventing unnecessary restarts, though. - logger.Info("This is not a bootstrap Guardian. Waiting another 10 seconds for the bootstrap guardian to come online.") - time.Sleep(time.Second * 10) - } - } else { - p2pKey, err = common.GetOrCreateNodeKey(logger, *nodeKeyPath) - if err != nil { - logger.Fatal("Failed to load node key", zap.Error(err)) - } - } - rpcMap := make(map[string]string) rpcMap["acalaRPC"] = *acalaRPC rpcMap["accountantWS"] = *accountantWS @@ -898,55 +925,16 @@ func runNode(cmd *cobra.Command, args []string) { rootCtxCancel() }() - usingLoki := *telemetryLokiURL != "" - - var hasTelemetryCredential bool = usingLoki - - // Telemetry is enabled by default in mainnet/testnet. In devnet it is disabled by default - if !*disableTelemetry && (env != common.UnsafeDevNet || (env == common.UnsafeDevNet && hasTelemetryCredential)) { - if !hasTelemetryCredential { - logger.Fatal("Please specify --telemetryLokiURL or set --disableTelemetry=false") - } - - // Get libp2p peer ID from private key - pk := p2pKey.GetPublic() - peerID, err := peer.IDFromPublicKey(pk) - if err != nil { - logger.Fatal("Failed to get peer ID from private key", zap.Error(err)) - } - - labels := map[string]string{ - "node_name": *nodeName, - "node_key": peerID.String(), - "guardian_addr": ethcrypto.PubkeyToAddress(gk.PublicKey).String(), - "network": *p2pNetworkID, - "version": version.Version(), - } - - skipPrivateLogs := !*publicRpcLogToTelemetry - - var tm *telemetry.Telemetry - if usingLoki { - logger.Info("Using Loki telemetry logger", - zap.String("publicRpcLogDetail", *publicRpcLogDetailStr), - zap.Bool("logPublicRpcToTelemetry", *publicRpcLogToTelemetry)) - - tm, err = telemetry.NewLokiCloudLogger(context.Background(), logger, *telemetryLokiURL, "wormhole", skipPrivateLogs, labels) - if err != nil { - logger.Fatal("Failed to initialize telemetry", zap.Error(err)) - } - } - - defer tm.Close() - logger = tm.WrapLogger(logger) // Wrap logger with telemetry logger - } - // log golang version logger.Info("golang version", zap.String("golang_version", runtime.Version())) // Redirect ipfs logs to plain zap ipfslog.SetPrimaryCore(logger.Core()) + // Database + db := db.OpenDb(logger.With(zap.String("component", "badgerDb")), dataDir) + defer db.Close() + wormchainId := "wormchain" if env == common.TestNet { wormchainId = "wormchain-testnet-0" @@ -1312,13 +1300,11 @@ func runNode(cmd *cobra.Command, args []string) { if shouldStart(lineaRPC) { wc := &evm.WatcherConfig{ - NetworkID: "linea", - ChainID: vaa.ChainIDLinea, - Rpc: *lineaRPC, - Contract: *lineaContract, - CcqBackfillCache: *ccqBackfillCache, - LineaRollUpUrl: *lineaRollUpUrl, - LineaRollUpContract: *lineaRollUpContract, + NetworkID: "linea", + ChainID: vaa.ChainIDLinea, + Rpc: *lineaRPC, + Contract: *lineaContract, + CcqBackfillCache: *ccqBackfillCache, } watcherConfigs = append(watcherConfigs, wc) diff --git a/node/hack/repair_solana/repair.go b/node/hack/repair_solana/repair.go index 74a3c1c0fd..99ac2f53be 100644 --- a/node/hack/repair_solana/repair.go +++ b/node/hack/repair_solana/repair.go @@ -166,7 +166,7 @@ func main() { offset := firstSeq - p.Sequence - 10 log.Printf("repairing: %d (offset %d)", p.Sequence, offset) - var tx *rpc.TransactionWithMeta + var tx *rpc.GetTransactionResult var nseq uint64 var err error @@ -243,8 +243,14 @@ func main() { } } -func fetchTxSeq(ctx context.Context, c *rpc.Client, sig solana.Signature) (*rpc.TransactionWithMeta, uint64, error) { - out, err := c.GetConfirmedTransaction(ctx, sig) +func fetchTxSeq(ctx context.Context, c *rpc.Client, sig solana.Signature) (*rpc.GetTransactionResult, uint64, error) { + maxSupportedTransactionVersion := uint64(0) + params := rpc.GetTransactionOpts{ + Encoding: solana.EncodingBase64, + Commitment: rpc.CommitmentConfirmed, + MaxSupportedTransactionVersion: &maxSupportedTransactionVersion, + } + out, err := c.GetTransaction(ctx, sig, ¶ms) if err != nil { return nil, 0, fmt.Errorf("GetConfirmedTransaction: %v", err) } @@ -262,14 +268,14 @@ func fetchTxSeq(ctx context.Context, c *rpc.Client, sig solana.Signature) (*rpc. return nil, 0, nil } -func process(txRpc *rpc.TransactionWithMeta) (*solana.PublicKey, error) { +func process(out *rpc.GetTransactionResult) (*solana.PublicKey, error) { program, err := solana.PublicKeyFromBase58(*solanaAddr) if err != nil { log.Fatalf("Invalid program address: %v", err) return nil, err } - tx, err := txRpc.GetTransaction() + tx, err := out.Transaction.GetTransaction() if err != nil { log.Fatalf("Failed to unmarshal transaction: %v", err) return nil, err @@ -290,7 +296,7 @@ func process(txRpc *rpc.TransactionWithMeta) (*solana.PublicKey, error) { txs := make([]solana.CompiledInstruction, 0, len(tx.Message.Instructions)) txs = append(txs, tx.Message.Instructions...) - for _, inner := range txRpc.Meta.InnerInstructions { + for _, inner := range out.Meta.InnerInstructions { txs = append(txs, inner.Instructions...) } diff --git a/node/pkg/db/accountant_test.go b/node/pkg/db/accountant_test.go index 93f5e29ea4..c79728bc1b 100644 --- a/node/pkg/db/accountant_test.go +++ b/node/pkg/db/accountant_test.go @@ -53,13 +53,10 @@ func TestAcctIsPendingTransfer(t *testing.T) { func TestAcctStoreAndDeletePendingTransfers(t *testing.T) { dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } + db := OpenDb(zap.NewNop(), &dbPath) defer db.Close() - tokenBridgeAddr, _ := vaa.StringToAddress("0x0290fb167208af455bb137780163b7b7a9a10c16") + tokenBridgeAddr, err := vaa.StringToAddress("0x0290fb167208af455bb137780163b7b7a9a10c16") require.NoError(t, err) msg1 := &common.MessagePublication{ @@ -118,33 +115,25 @@ func TestAcctStoreAndDeletePendingTransfers(t *testing.T) { } func TestAcctGetEmptyData(t *testing.T) { + logger := zap.NewNop() dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } + db := OpenDb(logger, &dbPath) defer db.Close() - logger, _ := zap.NewDevelopment() - pendings, err := db.AcctGetData(logger) require.NoError(t, err) assert.Equal(t, 0, len(pendings)) } func TestAcctGetData(t *testing.T) { + logger := zap.NewNop() dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } + db := OpenDb(logger, &dbPath) defer db.Close() - logger, _ := zap.NewDevelopment() - // Store some unrelated junk in the db to make sure it gets skipped. junk := []byte("ABC123") - err = db.db.Update(func(txn *badger.Txn) error { + err := db.db.Update(func(txn *badger.Txn) error { if err := txn.Set(junk, junk); err != nil { return err } @@ -202,10 +191,7 @@ func TestAcctGetData(t *testing.T) { func TestAcctLoadingWhereOldPendingsGetDropped(t *testing.T) { dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } + db := OpenDb(zap.NewNop(), &dbPath) defer db.Close() defer os.Remove(dbPath) diff --git a/node/pkg/db/db.go b/node/pkg/db/db.go index 04cc806fc9..6bdfb70115 100644 --- a/node/pkg/db/db.go +++ b/node/pkg/db/db.go @@ -83,17 +83,6 @@ func (i *VAAID) EmitterPrefixBytes() []byte { return []byte(fmt.Sprintf("signed/%d/%s", i.EmitterChain, i.EmitterAddress)) } -// TODO: Deprecate in favor of OpenDb -func Open(path string) (*Database, error) { - db, err := badger.Open(badger.DefaultOptions(path)) - if err != nil { - return nil, fmt.Errorf("failed to open database: %w", err) - } - return &Database{ - db: db, - }, nil -} - func (d *Database) Close() error { return d.db.Close() } @@ -237,7 +226,6 @@ func (d *Database) FindEmitterSequenceGap(prefix VAAID) (resp []uint64, firstSeq // Figure out gaps. for i := firstSeq; i <= lastSeq; i++ { if !seqs[i] { - fmt.Printf("missing: %d\n", i) resp = append(resp, i) } } diff --git a/node/pkg/db/db_test.go b/node/pkg/db/db_test.go index 5fde4c07d4..e58f7dfc04 100644 --- a/node/pkg/db/db_test.go +++ b/node/pkg/db/db_test.go @@ -1,304 +1,130 @@ -package db +package processor import ( - "bytes" - "crypto/ecdsa" - "crypto/rand" - "fmt" - math_rand "math/rand" - "os" - "runtime" - "sync" - "sync/atomic" - - "github.com/dgraph-io/badger/v3" - "github.com/ethereum/go-ethereum/crypto" - "github.com/wormhole-foundation/wormhole/sdk/vaa" - - "testing" + "encoding/hex" "time" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func getVAA() vaa.VAA { - return getVAAWithSeqNum(1) -} - -func getVAAWithSeqNum(seqNum uint64) vaa.VAA { - var payload = []byte{97, 97, 97, 97, 97, 97} - var governanceEmitter = vaa.Address{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4} - - return vaa.VAA{ - Version: uint8(1), - GuardianSetIndex: uint32(1), - Signatures: nil, - Timestamp: time.Unix(0, 0), - Nonce: uint32(1), - Sequence: seqNum, - ConsistencyLevel: uint8(32), - EmitterChain: vaa.ChainIDSolana, - EmitterAddress: governanceEmitter, - Payload: payload, - } -} - -// Testing the expected default behavior of a CreateGovernanceVAA -func TestVaaIDFromString(t *testing.T) { - vaaIdString := "1/0000000000000000000000000000000000000000000000000000000000000004/1" - vaaID, _ := VaaIDFromString(vaaIdString) - expectAddr := vaa.Address{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4} - - assert.Equal(t, vaa.ChainIDSolana, vaaID.EmitterChain) - assert.Equal(t, expectAddr, vaaID.EmitterAddress) - assert.Equal(t, uint64(1), vaaID.Sequence) -} - -func TestVaaIDFromVAA(t *testing.T) { - testVaa := getVAA() - vaaID := VaaIDFromVAA(&testVaa) - expectAddr := vaa.Address{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4} - - assert.Equal(t, vaa.ChainIDSolana, vaaID.EmitterChain) - assert.Equal(t, expectAddr, vaaID.EmitterAddress) - assert.Equal(t, uint64(1), vaaID.Sequence) -} - -func TestBytes(t *testing.T) { - vaaIdString := "1/0000000000000000000000000000000000000000000000000000000000000004/1" - vaaID, _ := VaaIDFromString(vaaIdString) - expected := []byte{0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x2f, 0x31, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x34, 0x2f, 0x31} - - assert.Equal(t, expected, vaaID.Bytes()) -} - -func TestEmitterPrefixBytesWithChainIDAndAddress(t *testing.T) { - vaaIdString := "1/0000000000000000000000000000000000000000000000000000000000000004/1" - vaaID, _ := VaaIDFromString(vaaIdString) - expected := []byte{0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x2f, 0x31, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x34} - - assert.Equal(t, expected, vaaID.EmitterPrefixBytes()) -} - -func TestEmitterPrefixBytesWithOnlyChainID(t *testing.T) { - vaaID := VAAID{EmitterChain: vaa.ChainID(26)} - assert.Equal(t, []byte("signed/26"), vaaID.EmitterPrefixBytes()) -} - -func TestStoreSignedVAAUnsigned(t *testing.T) { - dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } - defer db.Close() - defer os.Remove(dbPath) - - testVaa := getVAA() - - // Should panic because the VAA is not signed - assert.Panics(t, func() { db.StoreSignedVAA(&testVaa) }, "The code did not panic") //nolint:errcheck -} - -func TestStoreSignedVAASigned(t *testing.T) { - dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } - defer db.Close() - defer os.Remove(dbPath) - - testVaa := getVAA() - - privKey, _ := ecdsa.GenerateKey(crypto.S256(), rand.Reader) - testVaa.AddSignature(privKey, 0) - - err2 := db.StoreSignedVAA(&testVaa) - assert.NoError(t, err2) -} - -func TestStoreSignedVAABatch(t *testing.T) { - dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } - defer db.Close() - defer os.Remove(dbPath) - - privKey, err := ecdsa.GenerateKey(crypto.S256(), rand.Reader) - require.NoError(t, err) + "github.com/mr-tron/base58" - require.Less(t, int64(0), db.db.MaxBatchCount()) // In testing this was 104857. - require.Less(t, int64(0), db.db.MaxBatchSize()) // In testing this was 10066329. + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" - // Make sure we exceed the max batch size. - numVAAs := uint64(db.db.MaxBatchCount() + 1) - - // Build the VAA batch. - vaaBatch := make([]*vaa.VAA, 0, numVAAs) - for seqNum := uint64(0); seqNum < numVAAs; seqNum++ { - v := getVAAWithSeqNum(seqNum) - v.AddSignature(privKey, 0) - vaaBatch = append(vaaBatch, &v) - } + ethCommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" - // Store the batch in the database. - err = db.StoreSignedVAABatch(vaaBatch) - require.NoError(t, err) + "github.com/certusone/wormhole/node/pkg/common" + "github.com/wormhole-foundation/wormhole/sdk/vaa" +) - // Verify all the VAAs are in the database. - for _, v := range vaaBatch { - storedBytes, err := db.GetSignedVAABytes(*VaaIDFromVAA(v)) - require.NoError(t, err) +var ( + // SECURITY: source_chain/target_chain are untrusted uint8 values. An attacker could cause a maximum of 255**2 label + // pairs to be created, which is acceptable. - origBytes, err := v.Marshal() - require.NoError(t, err) + messagesObservedTotal = promauto.NewCounterVec( + prometheus.CounterOpts{ + Name: "wormhole_message_observations_total", + Help: "Total number of messages observed", + }, + []string{"emitter_chain"}) +) - assert.True(t, bytes.Equal(origBytes, storedBytes)) +// handleMessage processes a message received from a chain and instantiates our deterministic copy of the VAA. An +// event may be received multiple times and must be handled in an idempotent fashion. +func (p *Processor) handleMessage(k *common.MessagePublication) { + if p.gs == nil { + p.logger.Warn("dropping observation since we haven't initialized our guardian set yet", + zap.String("message_id", k.MessageIDString()), + zap.Uint32("nonce", k.Nonce), + zap.Stringer("txhash", k.TxHash), + zap.Time("timestamp", k.Timestamp), + ) + return } - // Verify that updates work as well by tweaking the VAAs and rewriting them. - for _, v := range vaaBatch { - v.Nonce += 1 + messagesObservedTotal.WithLabelValues(k.EmitterChain.String()).Inc() + + // All nodes will create the exact same VAA and sign its digest. + // Consensus is established on this digest. + + v := &VAA{ + VAA: vaa.VAA{ + Version: vaa.SupportedVAAVersion, + GuardianSetIndex: p.gs.Index, + Signatures: nil, + Timestamp: k.Timestamp, + Nonce: k.Nonce, + EmitterChain: k.EmitterChain, + EmitterAddress: k.EmitterAddress, + Payload: k.Payload, + Sequence: k.Sequence, + ConsistencyLevel: k.ConsistencyLevel, + }, + Unreliable: k.Unreliable, + Reobservation: k.IsReobservation, } - // Store the updated batch in the database. - err = db.StoreSignedVAABatch(vaaBatch) - require.NoError(t, err) - - // Verify all the updated VAAs are in the database. - for _, v := range vaaBatch { - storedBytes, err := db.GetSignedVAABytes(*VaaIDFromVAA(v)) - require.NoError(t, err) + // Generate digest of the unsigned VAA. + digest := v.SigningDigest() + hash := hex.EncodeToString(digest.Bytes()) - origBytes, err := v.Marshal() - require.NoError(t, err) - - assert.True(t, bytes.Equal(origBytes, storedBytes)) - } -} - -func TestGetSignedVAABytes(t *testing.T) { - dbPath := t.TempDir() - db, err := Open(dbPath) + // Sign the digest using our node's guardian key. + signature, err := crypto.Sign(digest.Bytes(), p.gk) if err != nil { - t.Error("failed to open database") + panic(err) } - defer db.Close() - defer os.Remove(dbPath) - - testVaa := getVAA() - - vaaID := VaaIDFromVAA(&testVaa) - - privKey, _ := ecdsa.GenerateKey(crypto.S256(), rand.Reader) - testVaa.AddSignature(privKey, 0) - - // Store full VAA - err2 := db.StoreSignedVAA(&testVaa) - assert.NoError(t, err2) - - // Retrieve it using vaaID - vaaBytes, err2 := db.GetSignedVAABytes(*vaaID) - assert.NoError(t, err2) - - testVaaBytes, err3 := testVaa.Marshal() - assert.NoError(t, err3) - assert.Equal(t, testVaaBytes, vaaBytes) -} - -func TestFindEmitterSequenceGap(t *testing.T) { - dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") + shouldPublishImmediately := p.shouldPublishImmediately(&v.VAA) + + if p.logger.Core().Enabled(zapcore.DebugLevel) { + p.logger.Debug("observed and signed confirmed message publication", + zap.String("message_id", k.MessageIDString()), + zap.Stringer("txhash", k.TxHash), + zap.String("txhash_b58", base58.Encode(k.TxHash.Bytes())), + zap.String("hash", hash), + zap.Uint32("nonce", k.Nonce), + zap.Time("timestamp", k.Timestamp), + zap.Uint8("consistency_level", k.ConsistencyLevel), + zap.String("signature", hex.EncodeToString(signature)), + zap.Bool("shouldPublishImmediately", shouldPublishImmediately), + zap.Bool("isReobservation", k.IsReobservation), + ) } - defer db.Close() - defer os.Remove(dbPath) - - testVaa := getVAA() - - vaaID := VaaIDFromVAA(&testVaa) - privKey, _ := ecdsa.GenerateKey(crypto.S256(), rand.Reader) - testVaa.AddSignature(privKey, 0) + // Broadcast the signature. + ourObs, msg := p.broadcastSignature(v.MessageID(), k.TxHash.Bytes(), digest, signature, shouldPublishImmediately) - // Store full VAA - err2 := db.StoreSignedVAA(&testVaa) - assert.NoError(t, err2) + // Indicate that we observed this one. + observationsReceivedTotal.Inc() + observationsReceivedByGuardianAddressTotal.WithLabelValues(p.ourAddr.Hex()).Inc() - resp, firstSeq, lastSeq, err := db.FindEmitterSequenceGap(*vaaID) + // Get / create our state entry. + s := p.state.signatures[hash] + if s == nil { + s = &state{ + firstObserved: time.Now(), + nextRetry: time.Now().Add(nextRetryDuration(0)), + signatures: map[ethCommon.Address][]byte{}, + source: "loopback", + } - assert.Equal(t, []uint64{0x0}, resp) - assert.Equal(t, uint64(0x0), firstSeq) - assert.Equal(t, uint64(0x1), lastSeq) - assert.NoError(t, err) -} - -// BenchmarkVaaLookup benchmarks db.GetSignedVAABytes -// You need to set the environment variable WH_DBPATH to a path with a populated BadgerDB. -// You may want to play with the CONCURRENCY parameter. -func BenchmarkVaaLookup(b *testing.B) { - CONCURRENCY := runtime.NumCPU() - dbPath := os.Getenv("WH_DBPATH") - require.NotEqual(b, dbPath, "") - - // open DB - optionsDB := badger.DefaultOptions(dbPath) - optionsDB.Logger = nil - badgerDb, err := badger.Open(optionsDB) - require.NoError(b, err) - db := &Database{ - db: badgerDb, + p.state.signatures[hash] = s } - if err != nil { - b.Error("failed to open database") - } - defer db.Close() - - vaaIds := make(chan *VAAID, b.N) - - for i := 0; i < b.N; i++ { - randId := math_rand.Intn(250000) //nolint - randId = 250000 - (i / 18) - vaaId, err := VaaIDFromString(fmt.Sprintf("4/000000000000000000000000b6f6d86a8f9879a9c87f643768d9efc38c1da6e7/%d", randId)) - assert.NoError(b, err) - vaaIds <- vaaId - } - - b.ResetTimer() - - // actual timed code - var errCtr atomic.Int32 - var wg sync.WaitGroup - - for i := 0; i < CONCURRENCY; i++ { - wg.Add(1) - go func() { - for { - select { - case vaaId := <-vaaIds: - _, err = db.GetSignedVAABytes(*vaaId) - if err != nil { - fmt.Printf("error retrieving %s/%s/%d: %s\n", vaaId.EmitterChain, vaaId.EmitterAddress, vaaId.Sequence, err) - errCtr.Add(1) - } - default: - wg.Done() - return - } - } - }() - } - - wg.Wait() - - if int(errCtr.Load()) > b.N/3 { - b.Error("More than 1/3 of GetSignedVAABytes failed.") + // Update our state. + s.ourObservation = v + s.txHash = k.TxHash.Bytes() + s.source = v.GetEmitterChain().String() + s.gs = p.gs // guaranteed to match ourObservation - there's no concurrent access to p.gs + s.signatures[p.ourAddr] = signature + s.ourObs = ourObs + s.ourMsg = msg + + // Fast path for our own signature. + if !s.submitted { + start := time.Now() + p.checkForQuorum(ourObs, s, s.gs, hash) + timeToHandleObservation.Observe(float64(time.Since(start).Microseconds())) } } diff --git a/node/pkg/db/governor_test.go b/node/pkg/db/governor_test.go index 87b564c467..0b0b2d17b0 100644 --- a/node/pkg/db/governor_test.go +++ b/node/pkg/db/governor_test.go @@ -136,10 +136,7 @@ func TestIsPendingMsg(t *testing.T) { func TestGetChainGovernorData(t *testing.T) { dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } + db := OpenDb(zap.NewNop(), &dbPath) defer db.Close() logger := zap.NewNop() @@ -153,10 +150,7 @@ func TestGetChainGovernorData(t *testing.T) { func TestStoreTransfer(t *testing.T) { dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } + db := OpenDb(zap.NewNop(), &dbPath) defer db.Close() tokenAddr, err := vaa.StringToAddress("0x707f9118e33a9b8998bea41dd0d46f38bb963fc8") @@ -187,10 +181,7 @@ func TestStoreTransfer(t *testing.T) { func TestDeleteTransfer(t *testing.T) { dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } + db := OpenDb(zap.NewNop(), &dbPath) defer db.Close() tokenAddr, err := vaa.StringToAddress("0x707f9118e33a9b8998bea41dd0d46f38bb963fc8") @@ -230,10 +221,7 @@ func TestDeleteTransfer(t *testing.T) { func TestStorePendingMsg(t *testing.T) { dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } + db := OpenDb(zap.NewNop(), &dbPath) defer db.Close() tokenBridgeAddr, err2 := vaa.StringToAddress("0x0290fb167208af455bb137780163b7b7a9a10c16") @@ -258,10 +246,7 @@ func TestStorePendingMsg(t *testing.T) { func TestDeletePendingMsg(t *testing.T) { dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } + db := OpenDb(zap.NewNop(), &dbPath) defer db.Close() tokenBridgeAddr, err2 := vaa.StringToAddress("0x0290fb167208af455bb137780163b7b7a9a10c16") @@ -328,10 +313,7 @@ func TestSerializeAndDeserializeOfPendingTransfer(t *testing.T) { func TestStoreAndReloadTransfers(t *testing.T) { dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } + db := OpenDb(zap.NewNop(), &dbPath) defer db.Close() defer os.Remove(dbPath) @@ -617,10 +599,7 @@ func marshalOldMessagePublication(msg *common.MessagePublication) []byte { func TestLoadingOldPendingTransfers(t *testing.T) { dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } + db := OpenDb(zap.NewNop(), &dbPath) defer db.Close() defer os.Remove(dbPath) @@ -846,10 +825,7 @@ func TestDeserializeOfOldTransfer(t *testing.T) { func TestOldTransfersUpdatedWhenReloading(t *testing.T) { dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } + db := OpenDb(zap.NewNop(), &dbPath) defer db.Close() defer os.Remove(dbPath) diff --git a/node/pkg/db/purge_vaas_test.go b/node/pkg/db/purge_vaas_test.go index 83f70ec561..ef572434cb 100644 --- a/node/pkg/db/purge_vaas_test.go +++ b/node/pkg/db/purge_vaas_test.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/wormhole-foundation/wormhole/sdk/vaa" + "go.uber.org/zap" "testing" "time" @@ -63,10 +64,7 @@ func TestPurgingPythnetVAAs(t *testing.T) { var emitterAddress = vaa.Address{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4} dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } + db := OpenDb(zap.NewNop(), &dbPath) defer db.Close() defer os.Remove(dbPath) @@ -77,7 +75,7 @@ func TestPurgingPythnetVAAs(t *testing.T) { pythnetSeqNum := uint64(10000) solanaSeqNum := uint64(20000) for count := 0; count < 50; count++ { - err = storeVAA(db, &vaa.VAA{ + err := storeVAA(db, &vaa.VAA{ Version: uint8(1), GuardianSetIndex: uint32(1), Signatures: nil, @@ -111,7 +109,7 @@ func TestPurgingPythnetVAAs(t *testing.T) { // Create 75 VAAs each for Pythnet and Solana that are less than three days old. timeStamp = now.Add(-time.Hour * time.Duration(3*24-1)) for count := 0; count < 75; count++ { - err = storeVAA(db, &vaa.VAA{ + err := storeVAA(db, &vaa.VAA{ Version: uint8(1), GuardianSetIndex: uint32(1), Signatures: nil, @@ -168,10 +166,7 @@ func TestPurgingVAAsForOneEmitterAddress(t *testing.T) { var solanaEmitterAddress1 = vaa.Address{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1} dbPath := t.TempDir() - db, err := Open(dbPath) - if err != nil { - t.Error("failed to open database") - } + db := OpenDb(zap.NewNop(), &dbPath) defer db.Close() defer os.Remove(dbPath) @@ -182,7 +177,7 @@ func TestPurgingVAAsForOneEmitterAddress(t *testing.T) { pythnetSeqNum := uint64(10000) solanaSeqNum := uint64(20000) for count := 0; count < 50; count++ { - err = storeVAA(db, &vaa.VAA{ + err := storeVAA(db, &vaa.VAA{ Version: uint8(1), GuardianSetIndex: uint32(1), Signatures: nil, @@ -231,7 +226,7 @@ func TestPurgingVAAsForOneEmitterAddress(t *testing.T) { // Create 75 VAAs each for each emitter that are less than three days old. timeStamp = now.Add(-time.Hour * time.Duration(3*24-1)) for count := 0; count < 75; count++ { - err = storeVAA(db, &vaa.VAA{ + err := storeVAA(db, &vaa.VAA{ Version: uint8(1), GuardianSetIndex: uint32(1), Signatures: nil, diff --git a/node/pkg/governor/manual_tokens.go b/node/pkg/governor/manual_tokens.go index d09cc3731d..5dfcf764b3 100644 --- a/node/pkg/governor/manual_tokens.go +++ b/node/pkg/governor/manual_tokens.go @@ -3,16 +3,14 @@ package governor // manualTokenList() returns a list of mainnet tokens that are added manually because they cannot be auto generated. func manualTokenList() []tokenConfigEntry { return []tokenConfigEntry{ - {chain: 2, addr: "000000000000000000000000ef19f4e48830093ce5bc8b3ff7f903a0ae3e9fa1", symbol: "BOTX", coinGeckoId: "botxcoin", decimals: 8, price: 0.02053366}, {chain: 2, addr: "0000000000000000000000006c3ea9036406852006290770bedfcaba0e23a0e8", symbol: "PYUSD", coinGeckoId: "paypal-usd", decimals: 6, price: 1.00}, - {chain: 2, addr: "00000000000000000000000085f17cf997934a597031b2e18a9ab6ebd4b9f6a4", symbol: "NEAR", coinGeckoId: "near", decimals: 8, price: 4.34}, // Near on ethereum + {chain: 2, addr: "00000000000000000000000085f17cf997934a597031b2e18a9ab6ebd4b9f6a4", symbol: "NEAR", coinGeckoId: "near", decimals: 24, price: 4.34}, // Near on ethereum {chain: 8, addr: "000000000000000000000000000000000000000000000000000000000004c5c1", symbol: "USDt", coinGeckoId: "tether", decimals: 6, price: 1.002}, // Addr: 312769, Notional: 22.31747085 - {chain: 9, addr: "000000000000000000000000e4b9e004389d91e4134a28f19bd833cba1d994b6", symbol: "FRAX", coinGeckoId: "frax", decimals: 8, price: 1.00}, - {chain: 9, addr: "000000000000000000000000c42c30ac6cc15fac9bd938618bcaa1a1fae8501d", symbol: "NEAR", coinGeckoId: "near", decimals: 8, price: 4.34}, // Near on aurora. 24 decimals - {chain: 12, addr: "0000000000000000000000000000000000000000000100000000000000000002", symbol: "DOT", coinGeckoId: "polkadot", decimals: 8, price: 6.48}, - {chain: 13, addr: "0000000000000000000000005fff3a6c16c2208103f318f4713d4d90601a7313", symbol: "KLEVA", coinGeckoId: "kleva", decimals: 8, price: 0.086661}, - {chain: 13, addr: "0000000000000000000000005096db80b21ef45230c9e423c373f1fc9c0198dd", symbol: "WEMIX", coinGeckoId: "wemix-token", decimals: 8, price: 1.74}, - {chain: 15, addr: "0000000000000000000000000000000000000000000000000000000000000000", symbol: "NEAR", coinGeckoId: "near", decimals: 8, price: 4.34}, + {chain: 12, addr: "0000000000000000000000000000000000000000000100000000000000000002", symbol: "DOT", coinGeckoId: "polkadot", decimals: 10, price: 6.48}, + {chain: 12, addr: "0000000000000000000000000000000000000000000100000000000000000000", symbol: "ACA", coinGeckoId: "acala", decimals: 12, price: 0.05694}, + {chain: 13, addr: "0000000000000000000000005fff3a6c16c2208103f318f4713d4d90601a7313", symbol: "KLEVA", coinGeckoId: "kleva", decimals: 18, price: 0.086661}, + {chain: 13, addr: "0000000000000000000000005096db80b21ef45230c9e423c373f1fc9c0198dd", symbol: "WEMIX", coinGeckoId: "wemix-token", decimals: 18, price: 1.74}, + {chain: 15, addr: "0000000000000000000000000000000000000000000000000000000000000000", symbol: "NEAR", coinGeckoId: "near", decimals: 24, price: 4.34}, {chain: 22, addr: "93601512902fe46ad6c51440c23a1a7e166c4b60e773579eda639c113a81325a", symbol: "USDT", coinGeckoId: "tether", decimals: 6, price: 1.00}, {chain: 32, addr: "01881043998ff2b738519d444d2dd0da3da4545de08290c1076746538d5333df", symbol: "SEI", coinGeckoId: "sei-network", decimals: 6, price: 0.3}, // BLAST (tokens over $50,000 24h volume) diff --git a/node/pkg/p2p/gossip_cutover.go b/node/pkg/p2p/gossip_cutover.go index 8629644e84..bf607320c5 100644 --- a/node/pkg/p2p/gossip_cutover.go +++ b/node/pkg/p2p/gossip_cutover.go @@ -11,8 +11,8 @@ import ( // The format of this time is very picky. Please use the exact format specified by cutOverFmtStr! const mainnetCutOverTimeStr = "" -const testnetCutOverTimeStr = "" -const devnetCutOverTimeStr = "" +const testnetCutOverTimeStr = "2024-09-24T09:00:00-0500" +const devnetCutOverTimeStr = "2024-08-01T00:00:00-0500" const cutOverFmtStr = "2006-01-02T15:04:05-0700" // gossipCutoverCompleteFlag indicates if the cutover time has passed, meaning we should publish only on the new topics. diff --git a/node/pkg/processor/benchmark_test.go b/node/pkg/processor/benchmark_test.go new file mode 100644 index 0000000000..4acf840fea --- /dev/null +++ b/node/pkg/processor/benchmark_test.go @@ -0,0 +1,243 @@ +package processor + +import ( + "context" + "crypto/ecdsa" + "crypto/rand" + "fmt" + "os" + "runtime/pprof" + "testing" + "time" + + "github.com/certusone/wormhole/node/pkg/common" + "github.com/certusone/wormhole/node/pkg/db" + "github.com/certusone/wormhole/node/pkg/gwrelayer" + gossipv1 "github.com/certusone/wormhole/node/pkg/proto/gossip/v1" + + // gossipv1 "github.com/certusone/wormhole/node/pkg/proto/gossip/v1" + ethCommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "github.com/stretchr/testify/require" + "github.com/wormhole-foundation/wormhole/sdk/vaa" + "go.uber.org/zap" +) + +/* +No gwrelayer: +average time to do 1800000 observations: 51.246µs +there were 1100000 under quorum, taking an average time of 62.888µs +there were 100000 quorum reached, taking an average time of 68.049µs +there were 600000 over quorum, taking an average time of 27.101µs +there were 100000 handle message calls, taking an average time of 28.723µs + +With gwrelayer (where observations are not relayed): +average time to do 1800000 observations: 51.18µs +there were 1100000 under quorum, taking an average time of 62.713µs +there were 100000 quorum reached, taking an average time of 68.316µs +there were 600000 over quorum, taking an average time of 27.182µs +there were 100000 handle message calls, taking an average time of 28.704µs +*/ + +// go test -bench ^BenchmarkHandleObservation -benchtime=1x +func BenchmarkHandleObservation(b *testing.B) { + const NumObservations = 100000 + ctx := context.Background() + db := db.OpenDb(nil, nil) + defer db.Close() + p, pd := createProcessorForTest(b, NumObservations, ctx, db, false) + require.NotNil(b, p) + require.NotNil(b, pd) + + var totalTime, underQuorumTime, quorumReachedTime, overQuorumTime, handleMsgTime time.Duration + var totalCount, underQuorumCount, quorumReachedCount, overQuorumCount int + for count := 0; count < NumObservations; count++ { + k := pd.createMessagePublication(b, uint64(count)) + start := time.Now() + p.handleMessage(k) + handleMsgTime += time.Since(start) + + for guardianIdx := 1; guardianIdx < 19; guardianIdx++ { + start := time.Now() + p.handleSingleObservation(pd.guardianAddrs[guardianIdx], pd.createObservation(b, guardianIdx, k)) + duration := time.Since(start) + totalCount++ + totalTime += duration + if guardianIdx < 12 { + underQuorumCount++ + underQuorumTime += duration + } else if guardianIdx == 12 { + quorumReachedCount++ + quorumReachedTime += duration + } else { + overQuorumCount++ + overQuorumTime += duration + } + } + } + require.Equal(b, NumObservations, len(pd.gossipVaaSendC)) + // This won't work once batching is enabled. + // require.Equal(b, NumObservations, len(pd.gossipAttestationSendC)) + fmt.Println("average time to do ", totalCount, " observations: ", totalTime/time.Duration(totalCount)) + fmt.Println("there were ", underQuorumCount, " under quorum, taking an average time of ", underQuorumTime/time.Duration(underQuorumCount)) + fmt.Println("there were ", quorumReachedCount, " quorum reached, taking an average time of ", quorumReachedTime/time.Duration(quorumReachedCount)) + fmt.Println("there were ", overQuorumCount, " over quorum, taking an average time of ", overQuorumTime/time.Duration(overQuorumCount)) + fmt.Println("there were ", NumObservations, " handle message calls, taking an average time of ", handleMsgTime/time.Duration(NumObservations)) +} + +// go test -bench ^BenchmarkProfileHandleObservation -benchtime=1x +// To view profiling results: +// go install github.com/google/pprof@latest +// sudo apt install graphviz +// pprof -http=:8080 handleObs.prof + +func BenchmarkProfileHandleObservation(b *testing.B) { + // return + const NumObservations = 100000 + f, err := os.Create("handleObs.prof") + require.NoError(b, err) + err = pprof.StartCPUProfile(f) + require.NoError(b, err) + defer pprof.StopCPUProfile() + + ctx := context.Background() + db := db.OpenDb(nil, nil) + defer db.Close() + p, pd := createProcessorForTest(b, NumObservations, ctx, db, false) + require.NotNil(b, p) + require.NotNil(b, pd) + + for count := 0; count < NumObservations; count++ { + k := pd.createMessagePublication(b, uint64(count)) + p.handleMessage(k) + + for guardianIdx := 1; guardianIdx < 19; guardianIdx++ { + p.handleSingleObservation(pd.guardianAddrs[guardianIdx], pd.createObservation(b, guardianIdx, k)) + } + } + require.Equal(b, NumObservations, len(pd.gossipVaaSendC)) +} + +type ProcessorData struct { + gossipAttestationSendC chan []byte + gossipVaaSendC chan []byte + emitterChain vaa.ChainID + emitterAddress vaa.Address + guardianKeys []*ecdsa.PrivateKey + guardianAddrs [][]byte +} + +func (pd *ProcessorData) messageID(seqNum uint64) string { + return fmt.Sprintf("%d/%s/%d", pd.emitterChain, pd.emitterAddress, seqNum) +} + +// createProcessorForTest creates a processor for benchmarking. It assumes we are index zero in the guardian set. +func createProcessorForTest(b *testing.B, numVAAs int, ctx context.Context, db *db.Database, useBatching bool) (*Processor, *ProcessorData) { + b.Helper() + logger := zap.NewNop() + + var ourKey *ecdsa.PrivateKey + keys := []ethCommon.Address{} + guardianKeys := []*ecdsa.PrivateKey{} + guardianAddrs := [][]byte{} + + for count := 0; count < 19; count++ { + gk, err := ecdsa.GenerateKey(crypto.S256(), rand.Reader) + require.NoError(b, err) + keys = append(keys, crypto.PubkeyToAddress(gk.PublicKey)) + guardianKeys = append(guardianKeys, gk) + guardianAddrs = append(guardianAddrs, crypto.PubkeyToAddress(gk.PublicKey).Bytes()) + if ourKey == nil { + ourKey = gk + } + } + + gs := common.NewGuardianSet(keys, 0) + gst := common.NewGuardianSetState(nil) + gst.Set(gs) + + emitterAddress, err := vaa.StringToAddress("0x3ee18B2214AFF97000D974cf647E7C347E8fa585") + require.NoError(b, err) + + gwRelayer := gwrelayer.NewGatewayRelayer(ctx, logger, "wormhole14ejqjyq8um4p3xfqj74yld5waqljf88fz25yxnma0cngspxe3les00fpj", nil, common.MainNet) + require.NoError(b, gwRelayer.Start(ctx)) + + pd := &ProcessorData{ + gossipAttestationSendC: make(chan []byte, numVAAs+100), + gossipVaaSendC: make(chan []byte, numVAAs+100), + emitterChain: vaa.ChainIDEthereum, + emitterAddress: emitterAddress, + guardianKeys: guardianKeys, + guardianAddrs: guardianAddrs, + } + + p := &Processor{ + gossipAttestationSendC: pd.gossipAttestationSendC, + gossipVaaSendC: pd.gossipVaaSendC, + gk: ourKey, + gs: gs, + gst: gst, + db: db, + logger: logger, + state: &aggregationState{observationMap{}}, + ourAddr: crypto.PubkeyToAddress(ourKey.PublicKey), + pythnetVaas: make(map[string]PythNetVaaEntry), + updatedVAAs: make(map[string]*updateVaaEntry), + gatewayRelayer: gwRelayer, + } + + batchCutoverCompleteFlag.Store(useBatching) + + go func() { _ = p.vaaWriter(ctx) }() + go func() { _ = p.batchProcessor(ctx) }() + + return p, pd +} + +func (pd *ProcessorData) createMessagePublication(b *testing.B, sequence uint64) *common.MessagePublication { + b.Helper() + return &common.MessagePublication{ + TxHash: ethCommon.HexToHash(fmt.Sprintf("%064x", sequence)), + Timestamp: time.Now(), + Nonce: 42, + Sequence: sequence, + EmitterChain: pd.emitterChain, + EmitterAddress: pd.emitterAddress, + Payload: []byte{0x01, 0x02, 0x03, 0x04}, + ConsistencyLevel: 32, + } +} + +func (pd *ProcessorData) createObservation(b *testing.B, guardianIdx int, k *common.MessagePublication) *gossipv1.Observation { + b.Helper() + v := &VAA{ + VAA: vaa.VAA{ + Version: vaa.SupportedVAAVersion, + GuardianSetIndex: uint32(guardianIdx), + Signatures: nil, + Timestamp: k.Timestamp, + Nonce: k.Nonce, + EmitterChain: k.EmitterChain, + EmitterAddress: k.EmitterAddress, + Payload: k.Payload, + Sequence: k.Sequence, + ConsistencyLevel: k.ConsistencyLevel, + }, + Unreliable: k.Unreliable, + Reobservation: k.IsReobservation, + } + + // Generate digest of the unsigned VAA. + digest := v.SigningDigest() + + // Sign the digest using our node's guardian key. + signature, err := crypto.Sign(digest.Bytes(), pd.guardianKeys[guardianIdx]) + require.NoError(b, err) + + return &gossipv1.Observation{ + Hash: digest.Bytes(), + Signature: signature, + TxHash: k.TxHash.Bytes(), + MessageId: pd.messageID(k.Sequence), + } +} diff --git a/node/pkg/processor/cutover.go b/node/pkg/processor/cutover.go index 70a49685c7..7d7969796f 100644 --- a/node/pkg/processor/cutover.go +++ b/node/pkg/processor/cutover.go @@ -11,8 +11,8 @@ import ( // The format of this time is very picky. Please use the exact format specified by cutOverFmtStr! const mainnetCutOverTimeStr = "" -const testnetCutOverTimeStr = "" -const devnetCutOverTimeStr = "" +const testnetCutOverTimeStr = "2024-09-24T09:00:00-0500" +const devnetCutOverTimeStr = "2024-08-01T00:00:00-0500" const cutOverFmtStr = "2006-01-02T15:04:05-0700" // batchCutoverCompleteFlag indicates if the cutover time has passed, meaning we should publish observation batches. diff --git a/node/pkg/processor/message.go b/node/pkg/processor/message.go index 65e947678a..e58f7dfc04 100644 --- a/node/pkg/processor/message.go +++ b/node/pkg/processor/message.go @@ -95,6 +95,10 @@ func (p *Processor) handleMessage(k *common.MessagePublication) { // Broadcast the signature. ourObs, msg := p.broadcastSignature(v.MessageID(), k.TxHash.Bytes(), digest, signature, shouldPublishImmediately) + // Indicate that we observed this one. + observationsReceivedTotal.Inc() + observationsReceivedByGuardianAddressTotal.WithLabelValues(p.ourAddr.Hex()).Inc() + // Get / create our state entry. s := p.state.signatures[hash] if s == nil { diff --git a/node/pkg/watchers/evm/config.go b/node/pkg/watchers/evm/config.go index f69ea27303..9fe8dfa8b7 100644 --- a/node/pkg/watchers/evm/config.go +++ b/node/pkg/watchers/evm/config.go @@ -1,8 +1,6 @@ package evm import ( - "errors" - "github.com/certusone/wormhole/node/pkg/common" gossipv1 "github.com/certusone/wormhole/node/pkg/proto/gossip/v1" "github.com/certusone/wormhole/node/pkg/query" @@ -22,10 +20,6 @@ type WatcherConfig struct { L1FinalizerRequired watchers.NetworkID // (optional) l1Finalizer interfaces.L1Finalizer CcqBackfillCache bool - - // These parameters are currently only used for Linea and should be set via SetLineaParams() - LineaRollUpUrl string - LineaRollUpContract string } func (wc *WatcherConfig) GetNetworkID() watchers.NetworkID { @@ -63,12 +57,5 @@ func (wc *WatcherConfig) Create( watcher := NewEthWatcher(wc.Rpc, eth_common.HexToAddress(wc.Contract), string(wc.NetworkID), wc.ChainID, msgC, setWriteC, obsvReqC, queryReqC, queryResponseC, devMode, wc.CcqBackfillCache) watcher.SetL1Finalizer(wc.l1Finalizer) - if wc.ChainID == vaa.ChainIDLinea { - if err := watcher.SetLineaParams(wc.LineaRollUpUrl, wc.LineaRollUpContract); err != nil { - return nil, nil, err - } - } else if wc.LineaRollUpUrl != "" || wc.LineaRollUpContract != "" { - return nil, nil, errors.New("LineaRollUpUrl and LineaRollUpContract may only be specified for Linea") - } return watcher, watcher.Run, nil } diff --git a/node/pkg/watchers/evm/connectors/linea_poller.go b/node/pkg/watchers/evm/connectors/linea_poller.go deleted file mode 100644 index 0589377743..0000000000 --- a/node/pkg/watchers/evm/connectors/linea_poller.go +++ /dev/null @@ -1,218 +0,0 @@ -// A block is considered finalized on Linea when it is marked finalized by the LineaRollup contract on Ethereum. -// -// For a discussion of finality on Linea, see here: -// https://www.notion.so/wormholefoundation/Testnet-Info-V2-633e4aa64a634d56a7ce07a103789774?pvs=4#03513c2eb3654d33aff2206a562d25b1 -// -// The LineaRollup proxy contract on ethereum is available at the following addresses: -// Mainnet: 0xd19d4B5d358258f05D7B411E21A1460D11B0876F -// Testnet: 0xB218f8A4Bc926cF1cA7b3423c154a0D627Bdb7E5 -// -// To generate the golang abi for the LineaRollup contract: -// - Grab the ABIs from the LineaRollup contract (not the proxy) (0x934Dd4C63E285551CEceF8459103554D0096c179 on Ethereum mainnet) and put it in /tmp/LineaRollup.abi. -// - mkdir node/pkg/watchers/evm/connectors/lineaabi -// - Install abigen: go install github.com/ethereum/go-ethereum/cmd/abigen@latest -// - abigen --abi /tmp/LineaRollup.abi --pkg lineaabi --out node/pkg/watchers/evm/connectors/lineaabi/LineaRollup.go - -package connectors - -import ( - "context" - "fmt" - "time" - - "github.com/certusone/wormhole/node/pkg/common" - rollUpAbi "github.com/certusone/wormhole/node/pkg/watchers/evm/connectors/lineaabi" - - ethereum "github.com/ethereum/go-ethereum" - ethBind "github.com/ethereum/go-ethereum/accounts/abi/bind" - ethCommon "github.com/ethereum/go-ethereum/common" - ethTypes "github.com/ethereum/go-ethereum/core/types" - ethClient "github.com/ethereum/go-ethereum/ethclient" - ethRpc "github.com/ethereum/go-ethereum/rpc" - - "go.uber.org/zap" -) - -// LineaConnector listens for new finalized blocks for Linea by reading the roll up contract on Ethereum. -type LineaConnector struct { - Connector - logger *zap.Logger - - // These are used for querying the roll up contract. - rollUpRawClient *ethRpc.Client - rollUpClient *ethClient.Client - - // These are used to subscribe for new block finalized events from the roll up contract. - rollUpFilterer *rollUpAbi.LineaabiFilterer - rollUpCaller *rollUpAbi.LineaabiCaller - - latestBlockNum uint64 - latestFinalizedBlockNum uint64 -} - -// NewLineaConnector creates a new Linea poll connector using the specified roll up contract. -func NewLineaConnector( - ctx context.Context, - logger *zap.Logger, - baseConnector Connector, - rollUpUrl string, - rollUpAddress string, -) (*LineaConnector, error) { - - rollUpRawClient, err := ethRpc.DialContext(ctx, rollUpUrl) - if err != nil { - return nil, fmt.Errorf("failed to create roll up raw client for url %s: %w", rollUpUrl, err) - } - - rollUpClient := ethClient.NewClient(rollUpRawClient) - - addr := ethCommon.HexToAddress(rollUpAddress) - rollUpFilterer, err := rollUpAbi.NewLineaabiFilterer(addr, rollUpClient) - if err != nil { - return nil, fmt.Errorf("failed to create roll up filter for url %s: %w", rollUpUrl, err) - } - - rollUpCaller, err := rollUpAbi.NewLineaabiCaller(addr, rollUpClient) - if err != nil { - return nil, fmt.Errorf("failed to create roll up caller for url %s: %w", rollUpUrl, err) - } - - logger.Info("Using roll up for Linea", zap.String("rollUpUrl", rollUpUrl), zap.String("rollUpAddress", rollUpAddress)) - - connector := &LineaConnector{ - Connector: baseConnector, - logger: logger, - rollUpRawClient: rollUpRawClient, - rollUpClient: rollUpClient, - rollUpFilterer: rollUpFilterer, - rollUpCaller: rollUpCaller, - } - - return connector, nil -} - -// SubscribeForBlocks starts polling. It implements the standard connector interface. -func (c *LineaConnector) SubscribeForBlocks(ctx context.Context, errC chan error, sink chan<- *NewBlock) (ethereum.Subscription, error) { - timeout, cancel := context.WithTimeout(ctx, 15*time.Second) - defer cancel() - - // Use the standard geth head sink to get latest blocks. - headSink := make(chan *ethTypes.Header, 2) - headerSubscription, err := c.Connector.Client().SubscribeNewHead(ctx, headSink) - if err != nil { - return nil, fmt.Errorf("failed to subscribe for latest blocks: %w", err) - } - - // Subscribe to data finalized events from the roll up contract. - dataFinalizedChan := make(chan *rollUpAbi.LineaabiDataFinalized, 2) - dataFinalizedSub, err := c.rollUpFilterer.WatchDataFinalized(ðBind.WatchOpts{Context: timeout}, dataFinalizedChan, nil, nil, nil) - if err != nil { - return nil, fmt.Errorf("failed to subscribe for events from roll up contract: %w", err) - } - - // Get the current latest block on Linea. - latestBlock, err := GetBlockByFinality(timeout, c.logger, c.Connector, Latest) - if err != nil { - return nil, fmt.Errorf("failed to get current latest block: %w", err) - } - c.latestBlockNum = latestBlock.Number.Uint64() - - // Get and publish the current latest finalized block. - opts := ðBind.CallOpts{Context: timeout} - initialBlock, err := c.rollUpCaller.CurrentL2BlockNumber(opts) - if err != nil { - return nil, fmt.Errorf("failed to get initial block: %w", err) - } - c.latestFinalizedBlockNum = initialBlock.Uint64() - - if c.latestFinalizedBlockNum > c.latestBlockNum { - return nil, fmt.Errorf("latest finalized block reported by L1 (%d) is ahead of latest block reported by L2 (%d), L2 node seems to be stuck", - c.latestFinalizedBlockNum, c.latestBlockNum) - } - - c.logger.Info("queried initial finalized block", zap.Uint64("initialBlock", c.latestFinalizedBlockNum), zap.Uint64("latestBlock", c.latestBlockNum)) - if err = c.postFinalizedAndSafe(ctx, c.latestFinalizedBlockNum, sink); err != nil { - return nil, fmt.Errorf("failed to post initial block: %w", err) - } - - common.RunWithScissors(ctx, errC, "linea_block_poller", func(ctx context.Context) error { - for { - select { - case <-ctx.Done(): - dataFinalizedSub.Unsubscribe() - return nil - case err := <-dataFinalizedSub.Err(): - errC <- fmt.Errorf("finalized data watcher posted an error: %w", err) - dataFinalizedSub.Unsubscribe() - return nil - case evt := <-dataFinalizedChan: - if err := c.processDataFinalizedEvent(ctx, sink, evt); err != nil { - errC <- fmt.Errorf("failed to process block finalized event: %w", err) - dataFinalizedSub.Unsubscribe() - return nil - } - case ev := <-headSink: - if ev == nil { - c.logger.Error("new latest header event is nil") - continue - } - if ev.Number == nil { - c.logger.Error("new latest header block number is nil") - continue - } - c.latestBlockNum = ev.Number.Uint64() - sink <- &NewBlock{ - Number: ev.Number, - Time: ev.Time, - Hash: ev.Hash(), - Finality: Latest, - } - } - } - }) - - return headerSubscription, nil -} - -// processDataFinalizedEvent handles a DataFinalized event published by the roll up contract. -func (c *LineaConnector) processDataFinalizedEvent(ctx context.Context, sink chan<- *NewBlock, evt *rollUpAbi.LineaabiDataFinalized) error { - latestFinalizedBlockNum := evt.LastBlockFinalized.Uint64() - // Leaving this log info in for now because these events come very infrequently. - c.logger.Info("processing data finalized event", - zap.Uint64("latestFinalizedBlockNum", latestFinalizedBlockNum), - zap.Uint64("prevFinalizedBlockNum", c.latestFinalizedBlockNum), - ) - - if latestFinalizedBlockNum > c.latestBlockNum { - return fmt.Errorf("latest finalized block reported by L1 (%d) is ahead of latest block reported by L2 (%d), L2 node seems to be stuck", - latestFinalizedBlockNum, c.latestBlockNum) - } - - for blockNum := c.latestFinalizedBlockNum + 1; blockNum <= latestFinalizedBlockNum; blockNum++ { - if err := c.postFinalizedAndSafe(ctx, blockNum, sink); err != nil { - c.latestFinalizedBlockNum = blockNum - 1 - return fmt.Errorf("failed to post block %d: %w", blockNum, err) - } - } - - c.latestFinalizedBlockNum = latestFinalizedBlockNum - return nil -} - -// postFinalizedAndSafe publishes a block as finalized and safe. It takes a block number and looks it up on chain to publish the current values. -func (c *LineaConnector) postFinalizedAndSafe(ctx context.Context, blockNum uint64, sink chan<- *NewBlock) error { - timeout, cancel := context.WithTimeout(ctx, 15*time.Second) - defer cancel() - - block, err := GetBlockByNumberUint64(timeout, c.logger, c.Connector, blockNum, Finalized) - if err != nil { - return fmt.Errorf("failed to get block %d: %w", blockNum, err) - } - - // Publish the finalized block. - sink <- block - - // Publish same thing for the safe block. - sink <- block.Copy(Safe) - return nil -} diff --git a/node/pkg/watchers/evm/connectors/lineaabi/LineaRollup.go b/node/pkg/watchers/evm/connectors/lineaabi/LineaRollup.go deleted file mode 100644 index 2de603f547..0000000000 --- a/node/pkg/watchers/evm/connectors/lineaabi/LineaRollup.go +++ /dev/null @@ -1,5268 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package lineaabi - -import ( - "errors" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -// IL1MessageServiceClaimMessageWithProofParams is an auto generated low-level Go binding around an user-defined struct. -type IL1MessageServiceClaimMessageWithProofParams struct { - Proof [][32]byte - MessageNumber *big.Int - LeafIndex uint32 - From common.Address - To common.Address - Fee *big.Int - Value *big.Int - FeeRecipient common.Address - MerkleRoot [32]byte - Data []byte -} - -// ILineaRollupFinalizationData is an auto generated low-level Go binding around an user-defined struct. -type ILineaRollupFinalizationData struct { - ParentStateRootHash [32]byte - DataHashes [][32]byte - DataParentHash [32]byte - FinalBlockNumber *big.Int - LastFinalizedTimestamp *big.Int - FinalTimestamp *big.Int - L1RollingHash [32]byte - L1RollingHashMessageNumber *big.Int - L2MerkleRoots [][32]byte - L2MerkleTreesDepth *big.Int - L2MessagingBlocksOffsets []byte -} - -// ILineaRollupSubmissionData is an auto generated low-level Go binding around an user-defined struct. -type ILineaRollupSubmissionData struct { - ParentStateRootHash [32]byte - DataParentHash [32]byte - FinalStateRootHash [32]byte - FirstBlockInData *big.Int - FinalBlockInData *big.Int - SnarkHash [32]byte - CompressedData []byte -} - -// ILineaRollupSupportingSubmissionData is an auto generated low-level Go binding around an user-defined struct. -type ILineaRollupSupportingSubmissionData struct { - ParentStateRootHash [32]byte - DataParentHash [32]byte - FinalStateRootHash [32]byte - FirstBlockInData *big.Int - FinalBlockInData *big.Int - SnarkHash [32]byte -} - -// LineaabiMetaData contains all meta data concerning the Lineaabi contract. -var LineaabiMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"BytesLengthNotMultipleOf32\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"bytesLength\",\"type\":\"uint256\"}],\"name\":\"BytesLengthNotMultipleOfTwo\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"currentDataHash\",\"type\":\"bytes32\"}],\"name\":\"DataAlreadySubmitted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"}],\"name\":\"DataEndingBlockDoesNotMatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"value\",\"type\":\"bytes32\"}],\"name\":\"DataHashesNotInSequence\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DataParentHasEmptyShnarf\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"}],\"name\":\"DataStartingBlockDoesNotMatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EmptyBlobData\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EmptySubmissionData\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"FeePaymentFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FeeTooLow\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"finalBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastFinalizedBlock\",\"type\":\"uint256\"}],\"name\":\"FinalBlockNumberLessThanOrEqualToLastFinalizedBlock\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FinalBlockStateEqualsZeroHash\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"firstHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"secondHash\",\"type\":\"bytes32\"}],\"name\":\"FinalStateRootHashDoesNotMatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FinalizationDataMissing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"l2BlockTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"currentBlockTimestamp\",\"type\":\"uint256\"}],\"name\":\"FinalizationInTheFuture\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"firstBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"finalBlockNumber\",\"type\":\"uint256\"}],\"name\":\"FirstBlockGreaterThanFinalBlock\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"firstBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastFinalizedBlock\",\"type\":\"uint256\"}],\"name\":\"FirstBlockLessThanOrEqualToLastFinalizedBlock\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FirstByteIsNotZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMerkleProof\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProof\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProofType\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"pauseType\",\"type\":\"uint256\"}],\"name\":\"IsNotPaused\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"pauseType\",\"type\":\"uint256\"}],\"name\":\"IsPaused\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"L1L2MessageNotSent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"messageNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"rollingHash\",\"type\":\"bytes32\"}],\"name\":\"L1RollingHashDoesNotExistOnL1\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"}],\"name\":\"L2MerkleRootAlreadyAnchored\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2MerkleRootDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"LastFinalizedShnarfWrong\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LimitIsZero\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"messageIndex\",\"type\":\"uint256\"}],\"name\":\"MessageAlreadyClaimed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"MessageAlreadyReceived\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"MessageDoesNotExistOrHasAlreadyBeenClaimed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"MessageSendingFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rollingHash\",\"type\":\"bytes32\"}],\"name\":\"MissingMessageNumberForRollingHash\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"messageNumber\",\"type\":\"uint256\"}],\"name\":\"MissingRollingHashForMessageNumber\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"firstHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"secondHash\",\"type\":\"bytes32\"}],\"name\":\"ParentHashesDoesNotMatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PeriodIsZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PointEvaluationFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"fieldElements\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blsCurveModulus\",\"type\":\"uint256\"}],\"name\":\"PointEvaluationResponseInvalid\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"}],\"name\":\"PrecompileReturnDataLengthWrong\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ProofIsEmpty\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ProofLengthDifferentThanMerkleDepth\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RateLimitExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StartingRootHashDoesNotMatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"StateRootHashInvalid\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TimestampsNotInSequence\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueSentTooLow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"YPointGreaterThanCurveModulus\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"resettingAddress\",\"type\":\"address\"}],\"name\":\"AmountUsedInPeriodReset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"stateRootHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"finalizedWithProof\",\"type\":\"bool\"}],\"name\":\"BlockFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"lastBlockFinalized\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"startingRootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"finalRootHash\",\"type\":\"bytes32\"}],\"name\":\"BlocksVerificationDone\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"lastBlockFinalized\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"startingRootHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"finalRootHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"withProof\",\"type\":\"bool\"}],\"name\":\"DataFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"startBlock\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"endBlock\",\"type\":\"uint256\"}],\"name\":\"DataSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32[]\",\"name\":\"messageHashes\",\"type\":\"bytes32[]\"}],\"name\":\"L1L2MessagesReceivedOnL2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"L2L1MessageHashAddedToInbox\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"l2MerkleRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"treeDepth\",\"type\":\"uint256\"}],\"name\":\"L2MerkleRootAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"l2Block\",\"type\":\"uint256\"}],\"name\":\"L2MessagingBlockAnchored\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"amountChangeBy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"amountUsedLoweredToLimit\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"usedAmountResetToZero\",\"type\":\"bool\"}],\"name\":\"LimitAmountChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_messageHash\",\"type\":\"bytes32\"}],\"name\":\"MessageClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_calldata\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_messageHash\",\"type\":\"bytes32\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"messageSender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pauseType\",\"type\":\"uint256\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"periodInSeconds\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"limitInWei\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"currentPeriodEnd\",\"type\":\"uint256\"}],\"name\":\"RateLimitInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"messageNumber\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rollingHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"RollingHashUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"systemMigrationBlock\",\"type\":\"uint256\"}],\"name\":\"SystemMigrationBlockInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"messageSender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pauseType\",\"type\":\"uint256\"}],\"name\":\"UnPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"proofType\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"verifierSetBy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldVerifierAddress\",\"type\":\"address\"}],\"name\":\"VerifierAddressChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GENERAL_PAUSE_TYPE\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GENESIS_SHNARF\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"INBOX_STATUS_RECEIVED\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"INBOX_STATUS_UNKNOWN\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"L1_L2_PAUSE_TYPE\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"L2_L1_PAUSE_TYPE\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OPERATOR_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OUTBOX_STATUS_RECEIVED\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OUTBOX_STATUS_SENT\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OUTBOX_STATUS_UNKNOWN\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSE_MANAGER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROVING_SYSTEM_PAUSE_TYPE\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RATE_LIMIT_SETTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VERIFIER_SETTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"internalType\":\"addresspayable\",\"name\":\"_feeRecipient\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_calldata\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"claimMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"messageNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"leafIndex\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"addresspayable\",\"name\":\"feeRecipient\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structIL1MessageService.ClaimMessageWithProofParams\",\"name\":\"_params\",\"type\":\"tuple\"}],\"name\":\"claimMessageWithProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentFinalizedShnarf\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentL2BlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentL2StoredL1MessageNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentL2StoredL1RollingHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentPeriodAmountInWei\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentPeriodEnd\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"}],\"name\":\"dataEndingBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"endingBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"}],\"name\":\"dataFinalStateRootHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"finalStateRootHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"}],\"name\":\"dataParents\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"}],\"name\":\"dataShnarfHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"shnarfHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"}],\"name\":\"dataStartingBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"startingBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_aggregatedProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_proofType\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentStateRootHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"dataHashes\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"dataParentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"finalBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastFinalizedTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"finalTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"l1RollingHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"l1RollingHashMessageNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"l2MerkleRoots\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"l2MerkleTreesDepth\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"l2MessagingBlocksOffsets\",\"type\":\"bytes\"}],\"internalType\":\"structILineaRollup.FinalizationData\",\"name\":\"_finalizationData\",\"type\":\"tuple\"}],\"name\":\"finalizeCompressedBlocksWithProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentStateRootHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"dataHashes\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"dataParentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"finalBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastFinalizedTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"finalTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"l1RollingHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"l1RollingHashMessageNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"l2MerkleRoots\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"l2MerkleTreesDepth\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"l2MessagingBlocksOffsets\",\"type\":\"bytes\"}],\"internalType\":\"structILineaRollup.FinalizationData\",\"name\":\"_finalizationData\",\"type\":\"tuple\"}],\"name\":\"finalizeCompressedBlocksWithoutProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"inboxL2L1MessageStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"messageStatus\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_initialStateRootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_initialL2BlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_defaultVerifier\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_securityCouncil\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_operators\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_rateLimitPeriodInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_rateLimitAmountInWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_genesisTimestamp\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_lastFinalizedShnarf\",\"type\":\"bytes32\"}],\"name\":\"initializeLastFinalizedShnarf\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_messageNumber\",\"type\":\"uint256\"}],\"name\":\"isMessageClaimed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"_pauseType\",\"type\":\"uint8\"}],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"}],\"name\":\"l2MerkleRootsDepths\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"treeDepth\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"limitInWei\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextMessageNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"outboxL1L2MessageStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"messageStatus\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"_pauseType\",\"type\":\"uint8\"}],\"name\":\"pauseByType\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"pauseType\",\"type\":\"bytes32\"}],\"name\":\"pauseTypeStatuses\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"pauseStatus\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"periodInSeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resetAmountUsedInPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"resetRateLimitAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"messageNumber\",\"type\":\"uint256\"}],\"name\":\"rollingHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"rollingHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_calldata\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newVerifierAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_proofType\",\"type\":\"uint256\"}],\"name\":\"setVerifierAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"stateRootHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRootHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentStateRootHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"dataParentHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"finalStateRootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"firstBlockInData\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"finalBlockInData\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"snarkHash\",\"type\":\"bytes32\"}],\"internalType\":\"structILineaRollup.SupportingSubmissionData\",\"name\":\"_submissionData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"_dataEvaluationClaim\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_kzgCommitment\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_kzgProof\",\"type\":\"bytes\"}],\"name\":\"submitBlobData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentStateRootHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"dataParentHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"finalStateRootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"firstBlockInData\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"finalBlockInData\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"snarkHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"compressedData\",\"type\":\"bytes\"}],\"internalType\":\"structILineaRollup.SubmissionData\",\"name\":\"_submissionData\",\"type\":\"tuple\"}],\"name\":\"submitData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"systemMigrationBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"_pauseType\",\"type\":\"uint8\"}],\"name\":\"unPauseByType\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proofType\",\"type\":\"uint256\"}],\"name\":\"verifiers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", -} - -// LineaabiABI is the input ABI used to generate the binding from. -// Deprecated: Use LineaabiMetaData.ABI instead. -var LineaabiABI = LineaabiMetaData.ABI - -// Lineaabi is an auto generated Go binding around an Ethereum contract. -type Lineaabi struct { - LineaabiCaller // Read-only binding to the contract - LineaabiTransactor // Write-only binding to the contract - LineaabiFilterer // Log filterer for contract events -} - -// LineaabiCaller is an auto generated read-only Go binding around an Ethereum contract. -type LineaabiCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// LineaabiTransactor is an auto generated write-only Go binding around an Ethereum contract. -type LineaabiTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// LineaabiFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type LineaabiFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// LineaabiSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type LineaabiSession struct { - Contract *Lineaabi // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// LineaabiCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type LineaabiCallerSession struct { - Contract *LineaabiCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// LineaabiTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type LineaabiTransactorSession struct { - Contract *LineaabiTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// LineaabiRaw is an auto generated low-level Go binding around an Ethereum contract. -type LineaabiRaw struct { - Contract *Lineaabi // Generic contract binding to access the raw methods on -} - -// LineaabiCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type LineaabiCallerRaw struct { - Contract *LineaabiCaller // Generic read-only contract binding to access the raw methods on -} - -// LineaabiTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type LineaabiTransactorRaw struct { - Contract *LineaabiTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewLineaabi creates a new instance of Lineaabi, bound to a specific deployed contract. -func NewLineaabi(address common.Address, backend bind.ContractBackend) (*Lineaabi, error) { - contract, err := bindLineaabi(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Lineaabi{LineaabiCaller: LineaabiCaller{contract: contract}, LineaabiTransactor: LineaabiTransactor{contract: contract}, LineaabiFilterer: LineaabiFilterer{contract: contract}}, nil -} - -// NewLineaabiCaller creates a new read-only instance of Lineaabi, bound to a specific deployed contract. -func NewLineaabiCaller(address common.Address, caller bind.ContractCaller) (*LineaabiCaller, error) { - contract, err := bindLineaabi(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &LineaabiCaller{contract: contract}, nil -} - -// NewLineaabiTransactor creates a new write-only instance of Lineaabi, bound to a specific deployed contract. -func NewLineaabiTransactor(address common.Address, transactor bind.ContractTransactor) (*LineaabiTransactor, error) { - contract, err := bindLineaabi(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &LineaabiTransactor{contract: contract}, nil -} - -// NewLineaabiFilterer creates a new log filterer instance of Lineaabi, bound to a specific deployed contract. -func NewLineaabiFilterer(address common.Address, filterer bind.ContractFilterer) (*LineaabiFilterer, error) { - contract, err := bindLineaabi(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &LineaabiFilterer{contract: contract}, nil -} - -// bindLineaabi binds a generic wrapper to an already deployed contract. -func bindLineaabi(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := LineaabiMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_Lineaabi *LineaabiRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Lineaabi.Contract.LineaabiCaller.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_Lineaabi *LineaabiRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Lineaabi.Contract.LineaabiTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Lineaabi *LineaabiRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Lineaabi.Contract.LineaabiTransactor.contract.Transact(opts, method, params...) -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_Lineaabi *LineaabiCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Lineaabi.Contract.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_Lineaabi *LineaabiTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Lineaabi.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Lineaabi *LineaabiTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Lineaabi.Contract.contract.Transact(opts, method, params...) -} - -// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. -// -// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) -func (_Lineaabi *LineaabiCaller) DEFAULTADMINROLE(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "DEFAULT_ADMIN_ROLE") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. -// -// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) -func (_Lineaabi *LineaabiSession) DEFAULTADMINROLE() ([32]byte, error) { - return _Lineaabi.Contract.DEFAULTADMINROLE(&_Lineaabi.CallOpts) -} - -// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. -// -// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) -func (_Lineaabi *LineaabiCallerSession) DEFAULTADMINROLE() ([32]byte, error) { - return _Lineaabi.Contract.DEFAULTADMINROLE(&_Lineaabi.CallOpts) -} - -// GENERALPAUSETYPE is a free data retrieval call binding the contract method 0x6a637967. -// -// Solidity: function GENERAL_PAUSE_TYPE() view returns(uint8) -func (_Lineaabi *LineaabiCaller) GENERALPAUSETYPE(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "GENERAL_PAUSE_TYPE") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// GENERALPAUSETYPE is a free data retrieval call binding the contract method 0x6a637967. -// -// Solidity: function GENERAL_PAUSE_TYPE() view returns(uint8) -func (_Lineaabi *LineaabiSession) GENERALPAUSETYPE() (uint8, error) { - return _Lineaabi.Contract.GENERALPAUSETYPE(&_Lineaabi.CallOpts) -} - -// GENERALPAUSETYPE is a free data retrieval call binding the contract method 0x6a637967. -// -// Solidity: function GENERAL_PAUSE_TYPE() view returns(uint8) -func (_Lineaabi *LineaabiCallerSession) GENERALPAUSETYPE() (uint8, error) { - return _Lineaabi.Contract.GENERALPAUSETYPE(&_Lineaabi.CallOpts) -} - -// GENESISSHNARF is a free data retrieval call binding the contract method 0xe97a1e9e. -// -// Solidity: function GENESIS_SHNARF() view returns(bytes32) -func (_Lineaabi *LineaabiCaller) GENESISSHNARF(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "GENESIS_SHNARF") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// GENESISSHNARF is a free data retrieval call binding the contract method 0xe97a1e9e. -// -// Solidity: function GENESIS_SHNARF() view returns(bytes32) -func (_Lineaabi *LineaabiSession) GENESISSHNARF() ([32]byte, error) { - return _Lineaabi.Contract.GENESISSHNARF(&_Lineaabi.CallOpts) -} - -// GENESISSHNARF is a free data retrieval call binding the contract method 0xe97a1e9e. -// -// Solidity: function GENESIS_SHNARF() view returns(bytes32) -func (_Lineaabi *LineaabiCallerSession) GENESISSHNARF() ([32]byte, error) { - return _Lineaabi.Contract.GENESISSHNARF(&_Lineaabi.CallOpts) -} - -// INBOXSTATUSRECEIVED is a free data retrieval call binding the contract method 0x48922ab7. -// -// Solidity: function INBOX_STATUS_RECEIVED() view returns(uint8) -func (_Lineaabi *LineaabiCaller) INBOXSTATUSRECEIVED(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "INBOX_STATUS_RECEIVED") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// INBOXSTATUSRECEIVED is a free data retrieval call binding the contract method 0x48922ab7. -// -// Solidity: function INBOX_STATUS_RECEIVED() view returns(uint8) -func (_Lineaabi *LineaabiSession) INBOXSTATUSRECEIVED() (uint8, error) { - return _Lineaabi.Contract.INBOXSTATUSRECEIVED(&_Lineaabi.CallOpts) -} - -// INBOXSTATUSRECEIVED is a free data retrieval call binding the contract method 0x48922ab7. -// -// Solidity: function INBOX_STATUS_RECEIVED() view returns(uint8) -func (_Lineaabi *LineaabiCallerSession) INBOXSTATUSRECEIVED() (uint8, error) { - return _Lineaabi.Contract.INBOXSTATUSRECEIVED(&_Lineaabi.CallOpts) -} - -// INBOXSTATUSUNKNOWN is a free data retrieval call binding the contract method 0x7d1e8c55. -// -// Solidity: function INBOX_STATUS_UNKNOWN() view returns(uint8) -func (_Lineaabi *LineaabiCaller) INBOXSTATUSUNKNOWN(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "INBOX_STATUS_UNKNOWN") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// INBOXSTATUSUNKNOWN is a free data retrieval call binding the contract method 0x7d1e8c55. -// -// Solidity: function INBOX_STATUS_UNKNOWN() view returns(uint8) -func (_Lineaabi *LineaabiSession) INBOXSTATUSUNKNOWN() (uint8, error) { - return _Lineaabi.Contract.INBOXSTATUSUNKNOWN(&_Lineaabi.CallOpts) -} - -// INBOXSTATUSUNKNOWN is a free data retrieval call binding the contract method 0x7d1e8c55. -// -// Solidity: function INBOX_STATUS_UNKNOWN() view returns(uint8) -func (_Lineaabi *LineaabiCallerSession) INBOXSTATUSUNKNOWN() (uint8, error) { - return _Lineaabi.Contract.INBOXSTATUSUNKNOWN(&_Lineaabi.CallOpts) -} - -// L1L2PAUSETYPE is a free data retrieval call binding the contract method 0x11314d0f. -// -// Solidity: function L1_L2_PAUSE_TYPE() view returns(uint8) -func (_Lineaabi *LineaabiCaller) L1L2PAUSETYPE(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "L1_L2_PAUSE_TYPE") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// L1L2PAUSETYPE is a free data retrieval call binding the contract method 0x11314d0f. -// -// Solidity: function L1_L2_PAUSE_TYPE() view returns(uint8) -func (_Lineaabi *LineaabiSession) L1L2PAUSETYPE() (uint8, error) { - return _Lineaabi.Contract.L1L2PAUSETYPE(&_Lineaabi.CallOpts) -} - -// L1L2PAUSETYPE is a free data retrieval call binding the contract method 0x11314d0f. -// -// Solidity: function L1_L2_PAUSE_TYPE() view returns(uint8) -func (_Lineaabi *LineaabiCallerSession) L1L2PAUSETYPE() (uint8, error) { - return _Lineaabi.Contract.L1L2PAUSETYPE(&_Lineaabi.CallOpts) -} - -// L2L1PAUSETYPE is a free data retrieval call binding the contract method 0xabd6230d. -// -// Solidity: function L2_L1_PAUSE_TYPE() view returns(uint8) -func (_Lineaabi *LineaabiCaller) L2L1PAUSETYPE(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "L2_L1_PAUSE_TYPE") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// L2L1PAUSETYPE is a free data retrieval call binding the contract method 0xabd6230d. -// -// Solidity: function L2_L1_PAUSE_TYPE() view returns(uint8) -func (_Lineaabi *LineaabiSession) L2L1PAUSETYPE() (uint8, error) { - return _Lineaabi.Contract.L2L1PAUSETYPE(&_Lineaabi.CallOpts) -} - -// L2L1PAUSETYPE is a free data retrieval call binding the contract method 0xabd6230d. -// -// Solidity: function L2_L1_PAUSE_TYPE() view returns(uint8) -func (_Lineaabi *LineaabiCallerSession) L2L1PAUSETYPE() (uint8, error) { - return _Lineaabi.Contract.L2L1PAUSETYPE(&_Lineaabi.CallOpts) -} - -// OPERATORROLE is a free data retrieval call binding the contract method 0xf5b541a6. -// -// Solidity: function OPERATOR_ROLE() view returns(bytes32) -func (_Lineaabi *LineaabiCaller) OPERATORROLE(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "OPERATOR_ROLE") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// OPERATORROLE is a free data retrieval call binding the contract method 0xf5b541a6. -// -// Solidity: function OPERATOR_ROLE() view returns(bytes32) -func (_Lineaabi *LineaabiSession) OPERATORROLE() ([32]byte, error) { - return _Lineaabi.Contract.OPERATORROLE(&_Lineaabi.CallOpts) -} - -// OPERATORROLE is a free data retrieval call binding the contract method 0xf5b541a6. -// -// Solidity: function OPERATOR_ROLE() view returns(bytes32) -func (_Lineaabi *LineaabiCallerSession) OPERATORROLE() ([32]byte, error) { - return _Lineaabi.Contract.OPERATORROLE(&_Lineaabi.CallOpts) -} - -// OUTBOXSTATUSRECEIVED is a free data retrieval call binding the contract method 0x73bd07b7. -// -// Solidity: function OUTBOX_STATUS_RECEIVED() view returns(uint8) -func (_Lineaabi *LineaabiCaller) OUTBOXSTATUSRECEIVED(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "OUTBOX_STATUS_RECEIVED") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// OUTBOXSTATUSRECEIVED is a free data retrieval call binding the contract method 0x73bd07b7. -// -// Solidity: function OUTBOX_STATUS_RECEIVED() view returns(uint8) -func (_Lineaabi *LineaabiSession) OUTBOXSTATUSRECEIVED() (uint8, error) { - return _Lineaabi.Contract.OUTBOXSTATUSRECEIVED(&_Lineaabi.CallOpts) -} - -// OUTBOXSTATUSRECEIVED is a free data retrieval call binding the contract method 0x73bd07b7. -// -// Solidity: function OUTBOX_STATUS_RECEIVED() view returns(uint8) -func (_Lineaabi *LineaabiCallerSession) OUTBOXSTATUSRECEIVED() (uint8, error) { - return _Lineaabi.Contract.OUTBOXSTATUSRECEIVED(&_Lineaabi.CallOpts) -} - -// OUTBOXSTATUSSENT is a free data retrieval call binding the contract method 0x5b7eb4bd. -// -// Solidity: function OUTBOX_STATUS_SENT() view returns(uint8) -func (_Lineaabi *LineaabiCaller) OUTBOXSTATUSSENT(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "OUTBOX_STATUS_SENT") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// OUTBOXSTATUSSENT is a free data retrieval call binding the contract method 0x5b7eb4bd. -// -// Solidity: function OUTBOX_STATUS_SENT() view returns(uint8) -func (_Lineaabi *LineaabiSession) OUTBOXSTATUSSENT() (uint8, error) { - return _Lineaabi.Contract.OUTBOXSTATUSSENT(&_Lineaabi.CallOpts) -} - -// OUTBOXSTATUSSENT is a free data retrieval call binding the contract method 0x5b7eb4bd. -// -// Solidity: function OUTBOX_STATUS_SENT() view returns(uint8) -func (_Lineaabi *LineaabiCallerSession) OUTBOXSTATUSSENT() (uint8, error) { - return _Lineaabi.Contract.OUTBOXSTATUSSENT(&_Lineaabi.CallOpts) -} - -// OUTBOXSTATUSUNKNOWN is a free data retrieval call binding the contract method 0x986fcddd. -// -// Solidity: function OUTBOX_STATUS_UNKNOWN() view returns(uint8) -func (_Lineaabi *LineaabiCaller) OUTBOXSTATUSUNKNOWN(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "OUTBOX_STATUS_UNKNOWN") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// OUTBOXSTATUSUNKNOWN is a free data retrieval call binding the contract method 0x986fcddd. -// -// Solidity: function OUTBOX_STATUS_UNKNOWN() view returns(uint8) -func (_Lineaabi *LineaabiSession) OUTBOXSTATUSUNKNOWN() (uint8, error) { - return _Lineaabi.Contract.OUTBOXSTATUSUNKNOWN(&_Lineaabi.CallOpts) -} - -// OUTBOXSTATUSUNKNOWN is a free data retrieval call binding the contract method 0x986fcddd. -// -// Solidity: function OUTBOX_STATUS_UNKNOWN() view returns(uint8) -func (_Lineaabi *LineaabiCallerSession) OUTBOXSTATUSUNKNOWN() (uint8, error) { - return _Lineaabi.Contract.OUTBOXSTATUSUNKNOWN(&_Lineaabi.CallOpts) -} - -// PAUSEMANAGERROLE is a free data retrieval call binding the contract method 0xd84f91e8. -// -// Solidity: function PAUSE_MANAGER_ROLE() view returns(bytes32) -func (_Lineaabi *LineaabiCaller) PAUSEMANAGERROLE(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "PAUSE_MANAGER_ROLE") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// PAUSEMANAGERROLE is a free data retrieval call binding the contract method 0xd84f91e8. -// -// Solidity: function PAUSE_MANAGER_ROLE() view returns(bytes32) -func (_Lineaabi *LineaabiSession) PAUSEMANAGERROLE() ([32]byte, error) { - return _Lineaabi.Contract.PAUSEMANAGERROLE(&_Lineaabi.CallOpts) -} - -// PAUSEMANAGERROLE is a free data retrieval call binding the contract method 0xd84f91e8. -// -// Solidity: function PAUSE_MANAGER_ROLE() view returns(bytes32) -func (_Lineaabi *LineaabiCallerSession) PAUSEMANAGERROLE() ([32]byte, error) { - return _Lineaabi.Contract.PAUSEMANAGERROLE(&_Lineaabi.CallOpts) -} - -// PROVINGSYSTEMPAUSETYPE is a free data retrieval call binding the contract method 0xb4a5a4b7. -// -// Solidity: function PROVING_SYSTEM_PAUSE_TYPE() view returns(uint8) -func (_Lineaabi *LineaabiCaller) PROVINGSYSTEMPAUSETYPE(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "PROVING_SYSTEM_PAUSE_TYPE") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// PROVINGSYSTEMPAUSETYPE is a free data retrieval call binding the contract method 0xb4a5a4b7. -// -// Solidity: function PROVING_SYSTEM_PAUSE_TYPE() view returns(uint8) -func (_Lineaabi *LineaabiSession) PROVINGSYSTEMPAUSETYPE() (uint8, error) { - return _Lineaabi.Contract.PROVINGSYSTEMPAUSETYPE(&_Lineaabi.CallOpts) -} - -// PROVINGSYSTEMPAUSETYPE is a free data retrieval call binding the contract method 0xb4a5a4b7. -// -// Solidity: function PROVING_SYSTEM_PAUSE_TYPE() view returns(uint8) -func (_Lineaabi *LineaabiCallerSession) PROVINGSYSTEMPAUSETYPE() (uint8, error) { - return _Lineaabi.Contract.PROVINGSYSTEMPAUSETYPE(&_Lineaabi.CallOpts) -} - -// RATELIMITSETTERROLE is a free data retrieval call binding the contract method 0xbf3e7505. -// -// Solidity: function RATE_LIMIT_SETTER_ROLE() view returns(bytes32) -func (_Lineaabi *LineaabiCaller) RATELIMITSETTERROLE(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "RATE_LIMIT_SETTER_ROLE") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// RATELIMITSETTERROLE is a free data retrieval call binding the contract method 0xbf3e7505. -// -// Solidity: function RATE_LIMIT_SETTER_ROLE() view returns(bytes32) -func (_Lineaabi *LineaabiSession) RATELIMITSETTERROLE() ([32]byte, error) { - return _Lineaabi.Contract.RATELIMITSETTERROLE(&_Lineaabi.CallOpts) -} - -// RATELIMITSETTERROLE is a free data retrieval call binding the contract method 0xbf3e7505. -// -// Solidity: function RATE_LIMIT_SETTER_ROLE() view returns(bytes32) -func (_Lineaabi *LineaabiCallerSession) RATELIMITSETTERROLE() ([32]byte, error) { - return _Lineaabi.Contract.RATELIMITSETTERROLE(&_Lineaabi.CallOpts) -} - -// VERIFIERSETTERROLE is a free data retrieval call binding the contract method 0x6e673843. -// -// Solidity: function VERIFIER_SETTER_ROLE() view returns(bytes32) -func (_Lineaabi *LineaabiCaller) VERIFIERSETTERROLE(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "VERIFIER_SETTER_ROLE") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// VERIFIERSETTERROLE is a free data retrieval call binding the contract method 0x6e673843. -// -// Solidity: function VERIFIER_SETTER_ROLE() view returns(bytes32) -func (_Lineaabi *LineaabiSession) VERIFIERSETTERROLE() ([32]byte, error) { - return _Lineaabi.Contract.VERIFIERSETTERROLE(&_Lineaabi.CallOpts) -} - -// VERIFIERSETTERROLE is a free data retrieval call binding the contract method 0x6e673843. -// -// Solidity: function VERIFIER_SETTER_ROLE() view returns(bytes32) -func (_Lineaabi *LineaabiCallerSession) VERIFIERSETTERROLE() ([32]byte, error) { - return _Lineaabi.Contract.VERIFIERSETTERROLE(&_Lineaabi.CallOpts) -} - -// CurrentFinalizedShnarf is a free data retrieval call binding the contract method 0xcd9b9e9a. -// -// Solidity: function currentFinalizedShnarf() view returns(bytes32) -func (_Lineaabi *LineaabiCaller) CurrentFinalizedShnarf(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "currentFinalizedShnarf") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// CurrentFinalizedShnarf is a free data retrieval call binding the contract method 0xcd9b9e9a. -// -// Solidity: function currentFinalizedShnarf() view returns(bytes32) -func (_Lineaabi *LineaabiSession) CurrentFinalizedShnarf() ([32]byte, error) { - return _Lineaabi.Contract.CurrentFinalizedShnarf(&_Lineaabi.CallOpts) -} - -// CurrentFinalizedShnarf is a free data retrieval call binding the contract method 0xcd9b9e9a. -// -// Solidity: function currentFinalizedShnarf() view returns(bytes32) -func (_Lineaabi *LineaabiCallerSession) CurrentFinalizedShnarf() ([32]byte, error) { - return _Lineaabi.Contract.CurrentFinalizedShnarf(&_Lineaabi.CallOpts) -} - -// CurrentL2BlockNumber is a free data retrieval call binding the contract method 0x695378f5. -// -// Solidity: function currentL2BlockNumber() view returns(uint256) -func (_Lineaabi *LineaabiCaller) CurrentL2BlockNumber(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "currentL2BlockNumber") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// CurrentL2BlockNumber is a free data retrieval call binding the contract method 0x695378f5. -// -// Solidity: function currentL2BlockNumber() view returns(uint256) -func (_Lineaabi *LineaabiSession) CurrentL2BlockNumber() (*big.Int, error) { - return _Lineaabi.Contract.CurrentL2BlockNumber(&_Lineaabi.CallOpts) -} - -// CurrentL2BlockNumber is a free data retrieval call binding the contract method 0x695378f5. -// -// Solidity: function currentL2BlockNumber() view returns(uint256) -func (_Lineaabi *LineaabiCallerSession) CurrentL2BlockNumber() (*big.Int, error) { - return _Lineaabi.Contract.CurrentL2BlockNumber(&_Lineaabi.CallOpts) -} - -// CurrentL2StoredL1MessageNumber is a free data retrieval call binding the contract method 0x05861180. -// -// Solidity: function currentL2StoredL1MessageNumber() view returns(uint256) -func (_Lineaabi *LineaabiCaller) CurrentL2StoredL1MessageNumber(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "currentL2StoredL1MessageNumber") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// CurrentL2StoredL1MessageNumber is a free data retrieval call binding the contract method 0x05861180. -// -// Solidity: function currentL2StoredL1MessageNumber() view returns(uint256) -func (_Lineaabi *LineaabiSession) CurrentL2StoredL1MessageNumber() (*big.Int, error) { - return _Lineaabi.Contract.CurrentL2StoredL1MessageNumber(&_Lineaabi.CallOpts) -} - -// CurrentL2StoredL1MessageNumber is a free data retrieval call binding the contract method 0x05861180. -// -// Solidity: function currentL2StoredL1MessageNumber() view returns(uint256) -func (_Lineaabi *LineaabiCallerSession) CurrentL2StoredL1MessageNumber() (*big.Int, error) { - return _Lineaabi.Contract.CurrentL2StoredL1MessageNumber(&_Lineaabi.CallOpts) -} - -// CurrentL2StoredL1RollingHash is a free data retrieval call binding the contract method 0xd5d4b835. -// -// Solidity: function currentL2StoredL1RollingHash() view returns(bytes32) -func (_Lineaabi *LineaabiCaller) CurrentL2StoredL1RollingHash(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "currentL2StoredL1RollingHash") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// CurrentL2StoredL1RollingHash is a free data retrieval call binding the contract method 0xd5d4b835. -// -// Solidity: function currentL2StoredL1RollingHash() view returns(bytes32) -func (_Lineaabi *LineaabiSession) CurrentL2StoredL1RollingHash() ([32]byte, error) { - return _Lineaabi.Contract.CurrentL2StoredL1RollingHash(&_Lineaabi.CallOpts) -} - -// CurrentL2StoredL1RollingHash is a free data retrieval call binding the contract method 0xd5d4b835. -// -// Solidity: function currentL2StoredL1RollingHash() view returns(bytes32) -func (_Lineaabi *LineaabiCallerSession) CurrentL2StoredL1RollingHash() ([32]byte, error) { - return _Lineaabi.Contract.CurrentL2StoredL1RollingHash(&_Lineaabi.CallOpts) -} - -// CurrentPeriodAmountInWei is a free data retrieval call binding the contract method 0xc0729ab1. -// -// Solidity: function currentPeriodAmountInWei() view returns(uint256) -func (_Lineaabi *LineaabiCaller) CurrentPeriodAmountInWei(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "currentPeriodAmountInWei") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// CurrentPeriodAmountInWei is a free data retrieval call binding the contract method 0xc0729ab1. -// -// Solidity: function currentPeriodAmountInWei() view returns(uint256) -func (_Lineaabi *LineaabiSession) CurrentPeriodAmountInWei() (*big.Int, error) { - return _Lineaabi.Contract.CurrentPeriodAmountInWei(&_Lineaabi.CallOpts) -} - -// CurrentPeriodAmountInWei is a free data retrieval call binding the contract method 0xc0729ab1. -// -// Solidity: function currentPeriodAmountInWei() view returns(uint256) -func (_Lineaabi *LineaabiCallerSession) CurrentPeriodAmountInWei() (*big.Int, error) { - return _Lineaabi.Contract.CurrentPeriodAmountInWei(&_Lineaabi.CallOpts) -} - -// CurrentPeriodEnd is a free data retrieval call binding the contract method 0x58794456. -// -// Solidity: function currentPeriodEnd() view returns(uint256) -func (_Lineaabi *LineaabiCaller) CurrentPeriodEnd(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "currentPeriodEnd") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// CurrentPeriodEnd is a free data retrieval call binding the contract method 0x58794456. -// -// Solidity: function currentPeriodEnd() view returns(uint256) -func (_Lineaabi *LineaabiSession) CurrentPeriodEnd() (*big.Int, error) { - return _Lineaabi.Contract.CurrentPeriodEnd(&_Lineaabi.CallOpts) -} - -// CurrentPeriodEnd is a free data retrieval call binding the contract method 0x58794456. -// -// Solidity: function currentPeriodEnd() view returns(uint256) -func (_Lineaabi *LineaabiCallerSession) CurrentPeriodEnd() (*big.Int, error) { - return _Lineaabi.Contract.CurrentPeriodEnd(&_Lineaabi.CallOpts) -} - -// CurrentTimestamp is a free data retrieval call binding the contract method 0x1e2ff94f. -// -// Solidity: function currentTimestamp() view returns(uint256) -func (_Lineaabi *LineaabiCaller) CurrentTimestamp(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "currentTimestamp") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// CurrentTimestamp is a free data retrieval call binding the contract method 0x1e2ff94f. -// -// Solidity: function currentTimestamp() view returns(uint256) -func (_Lineaabi *LineaabiSession) CurrentTimestamp() (*big.Int, error) { - return _Lineaabi.Contract.CurrentTimestamp(&_Lineaabi.CallOpts) -} - -// CurrentTimestamp is a free data retrieval call binding the contract method 0x1e2ff94f. -// -// Solidity: function currentTimestamp() view returns(uint256) -func (_Lineaabi *LineaabiCallerSession) CurrentTimestamp() (*big.Int, error) { - return _Lineaabi.Contract.CurrentTimestamp(&_Lineaabi.CallOpts) -} - -// DataEndingBlock is a free data retrieval call binding the contract method 0x5ed73ceb. -// -// Solidity: function dataEndingBlock(bytes32 dataHash) view returns(uint256 endingBlock) -func (_Lineaabi *LineaabiCaller) DataEndingBlock(opts *bind.CallOpts, dataHash [32]byte) (*big.Int, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "dataEndingBlock", dataHash) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// DataEndingBlock is a free data retrieval call binding the contract method 0x5ed73ceb. -// -// Solidity: function dataEndingBlock(bytes32 dataHash) view returns(uint256 endingBlock) -func (_Lineaabi *LineaabiSession) DataEndingBlock(dataHash [32]byte) (*big.Int, error) { - return _Lineaabi.Contract.DataEndingBlock(&_Lineaabi.CallOpts, dataHash) -} - -// DataEndingBlock is a free data retrieval call binding the contract method 0x5ed73ceb. -// -// Solidity: function dataEndingBlock(bytes32 dataHash) view returns(uint256 endingBlock) -func (_Lineaabi *LineaabiCallerSession) DataEndingBlock(dataHash [32]byte) (*big.Int, error) { - return _Lineaabi.Contract.DataEndingBlock(&_Lineaabi.CallOpts, dataHash) -} - -// DataFinalStateRootHashes is a free data retrieval call binding the contract method 0x6078bfd8. -// -// Solidity: function dataFinalStateRootHashes(bytes32 dataHash) view returns(bytes32 finalStateRootHash) -func (_Lineaabi *LineaabiCaller) DataFinalStateRootHashes(opts *bind.CallOpts, dataHash [32]byte) ([32]byte, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "dataFinalStateRootHashes", dataHash) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// DataFinalStateRootHashes is a free data retrieval call binding the contract method 0x6078bfd8. -// -// Solidity: function dataFinalStateRootHashes(bytes32 dataHash) view returns(bytes32 finalStateRootHash) -func (_Lineaabi *LineaabiSession) DataFinalStateRootHashes(dataHash [32]byte) ([32]byte, error) { - return _Lineaabi.Contract.DataFinalStateRootHashes(&_Lineaabi.CallOpts, dataHash) -} - -// DataFinalStateRootHashes is a free data retrieval call binding the contract method 0x6078bfd8. -// -// Solidity: function dataFinalStateRootHashes(bytes32 dataHash) view returns(bytes32 finalStateRootHash) -func (_Lineaabi *LineaabiCallerSession) DataFinalStateRootHashes(dataHash [32]byte) ([32]byte, error) { - return _Lineaabi.Contract.DataFinalStateRootHashes(&_Lineaabi.CallOpts, dataHash) -} - -// DataParents is a free data retrieval call binding the contract method 0x4cdd389b. -// -// Solidity: function dataParents(bytes32 dataHash) view returns(bytes32 parentHash) -func (_Lineaabi *LineaabiCaller) DataParents(opts *bind.CallOpts, dataHash [32]byte) ([32]byte, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "dataParents", dataHash) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// DataParents is a free data retrieval call binding the contract method 0x4cdd389b. -// -// Solidity: function dataParents(bytes32 dataHash) view returns(bytes32 parentHash) -func (_Lineaabi *LineaabiSession) DataParents(dataHash [32]byte) ([32]byte, error) { - return _Lineaabi.Contract.DataParents(&_Lineaabi.CallOpts, dataHash) -} - -// DataParents is a free data retrieval call binding the contract method 0x4cdd389b. -// -// Solidity: function dataParents(bytes32 dataHash) view returns(bytes32 parentHash) -func (_Lineaabi *LineaabiCallerSession) DataParents(dataHash [32]byte) ([32]byte, error) { - return _Lineaabi.Contract.DataParents(&_Lineaabi.CallOpts, dataHash) -} - -// DataShnarfHashes is a free data retrieval call binding the contract method 0x66f96e98. -// -// Solidity: function dataShnarfHashes(bytes32 dataHash) view returns(bytes32 shnarfHash) -func (_Lineaabi *LineaabiCaller) DataShnarfHashes(opts *bind.CallOpts, dataHash [32]byte) ([32]byte, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "dataShnarfHashes", dataHash) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// DataShnarfHashes is a free data retrieval call binding the contract method 0x66f96e98. -// -// Solidity: function dataShnarfHashes(bytes32 dataHash) view returns(bytes32 shnarfHash) -func (_Lineaabi *LineaabiSession) DataShnarfHashes(dataHash [32]byte) ([32]byte, error) { - return _Lineaabi.Contract.DataShnarfHashes(&_Lineaabi.CallOpts, dataHash) -} - -// DataShnarfHashes is a free data retrieval call binding the contract method 0x66f96e98. -// -// Solidity: function dataShnarfHashes(bytes32 dataHash) view returns(bytes32 shnarfHash) -func (_Lineaabi *LineaabiCallerSession) DataShnarfHashes(dataHash [32]byte) ([32]byte, error) { - return _Lineaabi.Contract.DataShnarfHashes(&_Lineaabi.CallOpts, dataHash) -} - -// DataStartingBlock is a free data retrieval call binding the contract method 0x1f443da0. -// -// Solidity: function dataStartingBlock(bytes32 dataHash) view returns(uint256 startingBlock) -func (_Lineaabi *LineaabiCaller) DataStartingBlock(opts *bind.CallOpts, dataHash [32]byte) (*big.Int, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "dataStartingBlock", dataHash) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// DataStartingBlock is a free data retrieval call binding the contract method 0x1f443da0. -// -// Solidity: function dataStartingBlock(bytes32 dataHash) view returns(uint256 startingBlock) -func (_Lineaabi *LineaabiSession) DataStartingBlock(dataHash [32]byte) (*big.Int, error) { - return _Lineaabi.Contract.DataStartingBlock(&_Lineaabi.CallOpts, dataHash) -} - -// DataStartingBlock is a free data retrieval call binding the contract method 0x1f443da0. -// -// Solidity: function dataStartingBlock(bytes32 dataHash) view returns(uint256 startingBlock) -func (_Lineaabi *LineaabiCallerSession) DataStartingBlock(dataHash [32]byte) (*big.Int, error) { - return _Lineaabi.Contract.DataStartingBlock(&_Lineaabi.CallOpts, dataHash) -} - -// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. -// -// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) -func (_Lineaabi *LineaabiCaller) GetRoleAdmin(opts *bind.CallOpts, role [32]byte) ([32]byte, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "getRoleAdmin", role) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. -// -// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) -func (_Lineaabi *LineaabiSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { - return _Lineaabi.Contract.GetRoleAdmin(&_Lineaabi.CallOpts, role) -} - -// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. -// -// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) -func (_Lineaabi *LineaabiCallerSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { - return _Lineaabi.Contract.GetRoleAdmin(&_Lineaabi.CallOpts, role) -} - -// HasRole is a free data retrieval call binding the contract method 0x91d14854. -// -// Solidity: function hasRole(bytes32 role, address account) view returns(bool) -func (_Lineaabi *LineaabiCaller) HasRole(opts *bind.CallOpts, role [32]byte, account common.Address) (bool, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "hasRole", role, account) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// HasRole is a free data retrieval call binding the contract method 0x91d14854. -// -// Solidity: function hasRole(bytes32 role, address account) view returns(bool) -func (_Lineaabi *LineaabiSession) HasRole(role [32]byte, account common.Address) (bool, error) { - return _Lineaabi.Contract.HasRole(&_Lineaabi.CallOpts, role, account) -} - -// HasRole is a free data retrieval call binding the contract method 0x91d14854. -// -// Solidity: function hasRole(bytes32 role, address account) view returns(bool) -func (_Lineaabi *LineaabiCallerSession) HasRole(role [32]byte, account common.Address) (bool, error) { - return _Lineaabi.Contract.HasRole(&_Lineaabi.CallOpts, role, account) -} - -// InboxL2L1MessageStatus is a free data retrieval call binding the contract method 0x5c721a0c. -// -// Solidity: function inboxL2L1MessageStatus(bytes32 messageHash) view returns(uint256 messageStatus) -func (_Lineaabi *LineaabiCaller) InboxL2L1MessageStatus(opts *bind.CallOpts, messageHash [32]byte) (*big.Int, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "inboxL2L1MessageStatus", messageHash) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// InboxL2L1MessageStatus is a free data retrieval call binding the contract method 0x5c721a0c. -// -// Solidity: function inboxL2L1MessageStatus(bytes32 messageHash) view returns(uint256 messageStatus) -func (_Lineaabi *LineaabiSession) InboxL2L1MessageStatus(messageHash [32]byte) (*big.Int, error) { - return _Lineaabi.Contract.InboxL2L1MessageStatus(&_Lineaabi.CallOpts, messageHash) -} - -// InboxL2L1MessageStatus is a free data retrieval call binding the contract method 0x5c721a0c. -// -// Solidity: function inboxL2L1MessageStatus(bytes32 messageHash) view returns(uint256 messageStatus) -func (_Lineaabi *LineaabiCallerSession) InboxL2L1MessageStatus(messageHash [32]byte) (*big.Int, error) { - return _Lineaabi.Contract.InboxL2L1MessageStatus(&_Lineaabi.CallOpts, messageHash) -} - -// IsMessageClaimed is a free data retrieval call binding the contract method 0x9ee8b211. -// -// Solidity: function isMessageClaimed(uint256 _messageNumber) view returns(bool) -func (_Lineaabi *LineaabiCaller) IsMessageClaimed(opts *bind.CallOpts, _messageNumber *big.Int) (bool, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "isMessageClaimed", _messageNumber) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsMessageClaimed is a free data retrieval call binding the contract method 0x9ee8b211. -// -// Solidity: function isMessageClaimed(uint256 _messageNumber) view returns(bool) -func (_Lineaabi *LineaabiSession) IsMessageClaimed(_messageNumber *big.Int) (bool, error) { - return _Lineaabi.Contract.IsMessageClaimed(&_Lineaabi.CallOpts, _messageNumber) -} - -// IsMessageClaimed is a free data retrieval call binding the contract method 0x9ee8b211. -// -// Solidity: function isMessageClaimed(uint256 _messageNumber) view returns(bool) -func (_Lineaabi *LineaabiCallerSession) IsMessageClaimed(_messageNumber *big.Int) (bool, error) { - return _Lineaabi.Contract.IsMessageClaimed(&_Lineaabi.CallOpts, _messageNumber) -} - -// IsPaused is a free data retrieval call binding the contract method 0xbc61e733. -// -// Solidity: function isPaused(uint8 _pauseType) view returns(bool) -func (_Lineaabi *LineaabiCaller) IsPaused(opts *bind.CallOpts, _pauseType uint8) (bool, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "isPaused", _pauseType) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsPaused is a free data retrieval call binding the contract method 0xbc61e733. -// -// Solidity: function isPaused(uint8 _pauseType) view returns(bool) -func (_Lineaabi *LineaabiSession) IsPaused(_pauseType uint8) (bool, error) { - return _Lineaabi.Contract.IsPaused(&_Lineaabi.CallOpts, _pauseType) -} - -// IsPaused is a free data retrieval call binding the contract method 0xbc61e733. -// -// Solidity: function isPaused(uint8 _pauseType) view returns(bool) -func (_Lineaabi *LineaabiCallerSession) IsPaused(_pauseType uint8) (bool, error) { - return _Lineaabi.Contract.IsPaused(&_Lineaabi.CallOpts, _pauseType) -} - -// L2MerkleRootsDepths is a free data retrieval call binding the contract method 0x60e83cf3. -// -// Solidity: function l2MerkleRootsDepths(bytes32 merkleRoot) view returns(uint256 treeDepth) -func (_Lineaabi *LineaabiCaller) L2MerkleRootsDepths(opts *bind.CallOpts, merkleRoot [32]byte) (*big.Int, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "l2MerkleRootsDepths", merkleRoot) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// L2MerkleRootsDepths is a free data retrieval call binding the contract method 0x60e83cf3. -// -// Solidity: function l2MerkleRootsDepths(bytes32 merkleRoot) view returns(uint256 treeDepth) -func (_Lineaabi *LineaabiSession) L2MerkleRootsDepths(merkleRoot [32]byte) (*big.Int, error) { - return _Lineaabi.Contract.L2MerkleRootsDepths(&_Lineaabi.CallOpts, merkleRoot) -} - -// L2MerkleRootsDepths is a free data retrieval call binding the contract method 0x60e83cf3. -// -// Solidity: function l2MerkleRootsDepths(bytes32 merkleRoot) view returns(uint256 treeDepth) -func (_Lineaabi *LineaabiCallerSession) L2MerkleRootsDepths(merkleRoot [32]byte) (*big.Int, error) { - return _Lineaabi.Contract.L2MerkleRootsDepths(&_Lineaabi.CallOpts, merkleRoot) -} - -// LimitInWei is a free data retrieval call binding the contract method 0xad422ff0. -// -// Solidity: function limitInWei() view returns(uint256) -func (_Lineaabi *LineaabiCaller) LimitInWei(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "limitInWei") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// LimitInWei is a free data retrieval call binding the contract method 0xad422ff0. -// -// Solidity: function limitInWei() view returns(uint256) -func (_Lineaabi *LineaabiSession) LimitInWei() (*big.Int, error) { - return _Lineaabi.Contract.LimitInWei(&_Lineaabi.CallOpts) -} - -// LimitInWei is a free data retrieval call binding the contract method 0xad422ff0. -// -// Solidity: function limitInWei() view returns(uint256) -func (_Lineaabi *LineaabiCallerSession) LimitInWei() (*big.Int, error) { - return _Lineaabi.Contract.LimitInWei(&_Lineaabi.CallOpts) -} - -// NextMessageNumber is a free data retrieval call binding the contract method 0xb837dbe9. -// -// Solidity: function nextMessageNumber() view returns(uint256) -func (_Lineaabi *LineaabiCaller) NextMessageNumber(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "nextMessageNumber") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// NextMessageNumber is a free data retrieval call binding the contract method 0xb837dbe9. -// -// Solidity: function nextMessageNumber() view returns(uint256) -func (_Lineaabi *LineaabiSession) NextMessageNumber() (*big.Int, error) { - return _Lineaabi.Contract.NextMessageNumber(&_Lineaabi.CallOpts) -} - -// NextMessageNumber is a free data retrieval call binding the contract method 0xb837dbe9. -// -// Solidity: function nextMessageNumber() view returns(uint256) -func (_Lineaabi *LineaabiCallerSession) NextMessageNumber() (*big.Int, error) { - return _Lineaabi.Contract.NextMessageNumber(&_Lineaabi.CallOpts) -} - -// OutboxL1L2MessageStatus is a free data retrieval call binding the contract method 0x3fc08b65. -// -// Solidity: function outboxL1L2MessageStatus(bytes32 messageHash) view returns(uint256 messageStatus) -func (_Lineaabi *LineaabiCaller) OutboxL1L2MessageStatus(opts *bind.CallOpts, messageHash [32]byte) (*big.Int, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "outboxL1L2MessageStatus", messageHash) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// OutboxL1L2MessageStatus is a free data retrieval call binding the contract method 0x3fc08b65. -// -// Solidity: function outboxL1L2MessageStatus(bytes32 messageHash) view returns(uint256 messageStatus) -func (_Lineaabi *LineaabiSession) OutboxL1L2MessageStatus(messageHash [32]byte) (*big.Int, error) { - return _Lineaabi.Contract.OutboxL1L2MessageStatus(&_Lineaabi.CallOpts, messageHash) -} - -// OutboxL1L2MessageStatus is a free data retrieval call binding the contract method 0x3fc08b65. -// -// Solidity: function outboxL1L2MessageStatus(bytes32 messageHash) view returns(uint256 messageStatus) -func (_Lineaabi *LineaabiCallerSession) OutboxL1L2MessageStatus(messageHash [32]byte) (*big.Int, error) { - return _Lineaabi.Contract.OutboxL1L2MessageStatus(&_Lineaabi.CallOpts, messageHash) -} - -// PauseTypeStatuses is a free data retrieval call binding the contract method 0xcc5782f6. -// -// Solidity: function pauseTypeStatuses(bytes32 pauseType) view returns(bool pauseStatus) -func (_Lineaabi *LineaabiCaller) PauseTypeStatuses(opts *bind.CallOpts, pauseType [32]byte) (bool, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "pauseTypeStatuses", pauseType) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// PauseTypeStatuses is a free data retrieval call binding the contract method 0xcc5782f6. -// -// Solidity: function pauseTypeStatuses(bytes32 pauseType) view returns(bool pauseStatus) -func (_Lineaabi *LineaabiSession) PauseTypeStatuses(pauseType [32]byte) (bool, error) { - return _Lineaabi.Contract.PauseTypeStatuses(&_Lineaabi.CallOpts, pauseType) -} - -// PauseTypeStatuses is a free data retrieval call binding the contract method 0xcc5782f6. -// -// Solidity: function pauseTypeStatuses(bytes32 pauseType) view returns(bool pauseStatus) -func (_Lineaabi *LineaabiCallerSession) PauseTypeStatuses(pauseType [32]byte) (bool, error) { - return _Lineaabi.Contract.PauseTypeStatuses(&_Lineaabi.CallOpts, pauseType) -} - -// PeriodInSeconds is a free data retrieval call binding the contract method 0xc1dc0f07. -// -// Solidity: function periodInSeconds() view returns(uint256) -func (_Lineaabi *LineaabiCaller) PeriodInSeconds(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "periodInSeconds") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// PeriodInSeconds is a free data retrieval call binding the contract method 0xc1dc0f07. -// -// Solidity: function periodInSeconds() view returns(uint256) -func (_Lineaabi *LineaabiSession) PeriodInSeconds() (*big.Int, error) { - return _Lineaabi.Contract.PeriodInSeconds(&_Lineaabi.CallOpts) -} - -// PeriodInSeconds is a free data retrieval call binding the contract method 0xc1dc0f07. -// -// Solidity: function periodInSeconds() view returns(uint256) -func (_Lineaabi *LineaabiCallerSession) PeriodInSeconds() (*big.Int, error) { - return _Lineaabi.Contract.PeriodInSeconds(&_Lineaabi.CallOpts) -} - -// RollingHashes is a free data retrieval call binding the contract method 0x914e57eb. -// -// Solidity: function rollingHashes(uint256 messageNumber) view returns(bytes32 rollingHash) -func (_Lineaabi *LineaabiCaller) RollingHashes(opts *bind.CallOpts, messageNumber *big.Int) ([32]byte, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "rollingHashes", messageNumber) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// RollingHashes is a free data retrieval call binding the contract method 0x914e57eb. -// -// Solidity: function rollingHashes(uint256 messageNumber) view returns(bytes32 rollingHash) -func (_Lineaabi *LineaabiSession) RollingHashes(messageNumber *big.Int) ([32]byte, error) { - return _Lineaabi.Contract.RollingHashes(&_Lineaabi.CallOpts, messageNumber) -} - -// RollingHashes is a free data retrieval call binding the contract method 0x914e57eb. -// -// Solidity: function rollingHashes(uint256 messageNumber) view returns(bytes32 rollingHash) -func (_Lineaabi *LineaabiCallerSession) RollingHashes(messageNumber *big.Int) ([32]byte, error) { - return _Lineaabi.Contract.RollingHashes(&_Lineaabi.CallOpts, messageNumber) -} - -// Sender is a free data retrieval call binding the contract method 0x67e404ce. -// -// Solidity: function sender() view returns(address) -func (_Lineaabi *LineaabiCaller) Sender(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "sender") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Sender is a free data retrieval call binding the contract method 0x67e404ce. -// -// Solidity: function sender() view returns(address) -func (_Lineaabi *LineaabiSession) Sender() (common.Address, error) { - return _Lineaabi.Contract.Sender(&_Lineaabi.CallOpts) -} - -// Sender is a free data retrieval call binding the contract method 0x67e404ce. -// -// Solidity: function sender() view returns(address) -func (_Lineaabi *LineaabiCallerSession) Sender() (common.Address, error) { - return _Lineaabi.Contract.Sender(&_Lineaabi.CallOpts) -} - -// StateRootHashes is a free data retrieval call binding the contract method 0x8be745d1. -// -// Solidity: function stateRootHashes(uint256 blockNumber) view returns(bytes32 stateRootHash) -func (_Lineaabi *LineaabiCaller) StateRootHashes(opts *bind.CallOpts, blockNumber *big.Int) ([32]byte, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "stateRootHashes", blockNumber) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// StateRootHashes is a free data retrieval call binding the contract method 0x8be745d1. -// -// Solidity: function stateRootHashes(uint256 blockNumber) view returns(bytes32 stateRootHash) -func (_Lineaabi *LineaabiSession) StateRootHashes(blockNumber *big.Int) ([32]byte, error) { - return _Lineaabi.Contract.StateRootHashes(&_Lineaabi.CallOpts, blockNumber) -} - -// StateRootHashes is a free data retrieval call binding the contract method 0x8be745d1. -// -// Solidity: function stateRootHashes(uint256 blockNumber) view returns(bytes32 stateRootHash) -func (_Lineaabi *LineaabiCallerSession) StateRootHashes(blockNumber *big.Int) ([32]byte, error) { - return _Lineaabi.Contract.StateRootHashes(&_Lineaabi.CallOpts, blockNumber) -} - -// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. -// -// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) -func (_Lineaabi *LineaabiCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "supportsInterface", interfaceId) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. -// -// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) -func (_Lineaabi *LineaabiSession) SupportsInterface(interfaceId [4]byte) (bool, error) { - return _Lineaabi.Contract.SupportsInterface(&_Lineaabi.CallOpts, interfaceId) -} - -// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. -// -// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) -func (_Lineaabi *LineaabiCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { - return _Lineaabi.Contract.SupportsInterface(&_Lineaabi.CallOpts, interfaceId) -} - -// SystemMigrationBlock is a free data retrieval call binding the contract method 0x2c70645c. -// -// Solidity: function systemMigrationBlock() view returns(uint256) -func (_Lineaabi *LineaabiCaller) SystemMigrationBlock(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "systemMigrationBlock") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// SystemMigrationBlock is a free data retrieval call binding the contract method 0x2c70645c. -// -// Solidity: function systemMigrationBlock() view returns(uint256) -func (_Lineaabi *LineaabiSession) SystemMigrationBlock() (*big.Int, error) { - return _Lineaabi.Contract.SystemMigrationBlock(&_Lineaabi.CallOpts) -} - -// SystemMigrationBlock is a free data retrieval call binding the contract method 0x2c70645c. -// -// Solidity: function systemMigrationBlock() view returns(uint256) -func (_Lineaabi *LineaabiCallerSession) SystemMigrationBlock() (*big.Int, error) { - return _Lineaabi.Contract.SystemMigrationBlock(&_Lineaabi.CallOpts) -} - -// Verifiers is a free data retrieval call binding the contract method 0xac1eff68. -// -// Solidity: function verifiers(uint256 proofType) view returns(address verifierAddress) -func (_Lineaabi *LineaabiCaller) Verifiers(opts *bind.CallOpts, proofType *big.Int) (common.Address, error) { - var out []interface{} - err := _Lineaabi.contract.Call(opts, &out, "verifiers", proofType) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Verifiers is a free data retrieval call binding the contract method 0xac1eff68. -// -// Solidity: function verifiers(uint256 proofType) view returns(address verifierAddress) -func (_Lineaabi *LineaabiSession) Verifiers(proofType *big.Int) (common.Address, error) { - return _Lineaabi.Contract.Verifiers(&_Lineaabi.CallOpts, proofType) -} - -// Verifiers is a free data retrieval call binding the contract method 0xac1eff68. -// -// Solidity: function verifiers(uint256 proofType) view returns(address verifierAddress) -func (_Lineaabi *LineaabiCallerSession) Verifiers(proofType *big.Int) (common.Address, error) { - return _Lineaabi.Contract.Verifiers(&_Lineaabi.CallOpts, proofType) -} - -// ClaimMessage is a paid mutator transaction binding the contract method 0x491e0936. -// -// Solidity: function claimMessage(address _from, address _to, uint256 _fee, uint256 _value, address _feeRecipient, bytes _calldata, uint256 _nonce) returns() -func (_Lineaabi *LineaabiTransactor) ClaimMessage(opts *bind.TransactOpts, _from common.Address, _to common.Address, _fee *big.Int, _value *big.Int, _feeRecipient common.Address, _calldata []byte, _nonce *big.Int) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "claimMessage", _from, _to, _fee, _value, _feeRecipient, _calldata, _nonce) -} - -// ClaimMessage is a paid mutator transaction binding the contract method 0x491e0936. -// -// Solidity: function claimMessage(address _from, address _to, uint256 _fee, uint256 _value, address _feeRecipient, bytes _calldata, uint256 _nonce) returns() -func (_Lineaabi *LineaabiSession) ClaimMessage(_from common.Address, _to common.Address, _fee *big.Int, _value *big.Int, _feeRecipient common.Address, _calldata []byte, _nonce *big.Int) (*types.Transaction, error) { - return _Lineaabi.Contract.ClaimMessage(&_Lineaabi.TransactOpts, _from, _to, _fee, _value, _feeRecipient, _calldata, _nonce) -} - -// ClaimMessage is a paid mutator transaction binding the contract method 0x491e0936. -// -// Solidity: function claimMessage(address _from, address _to, uint256 _fee, uint256 _value, address _feeRecipient, bytes _calldata, uint256 _nonce) returns() -func (_Lineaabi *LineaabiTransactorSession) ClaimMessage(_from common.Address, _to common.Address, _fee *big.Int, _value *big.Int, _feeRecipient common.Address, _calldata []byte, _nonce *big.Int) (*types.Transaction, error) { - return _Lineaabi.Contract.ClaimMessage(&_Lineaabi.TransactOpts, _from, _to, _fee, _value, _feeRecipient, _calldata, _nonce) -} - -// ClaimMessageWithProof is a paid mutator transaction binding the contract method 0x6463fb2a. -// -// Solidity: function claimMessageWithProof((bytes32[],uint256,uint32,address,address,uint256,uint256,address,bytes32,bytes) _params) returns() -func (_Lineaabi *LineaabiTransactor) ClaimMessageWithProof(opts *bind.TransactOpts, _params IL1MessageServiceClaimMessageWithProofParams) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "claimMessageWithProof", _params) -} - -// ClaimMessageWithProof is a paid mutator transaction binding the contract method 0x6463fb2a. -// -// Solidity: function claimMessageWithProof((bytes32[],uint256,uint32,address,address,uint256,uint256,address,bytes32,bytes) _params) returns() -func (_Lineaabi *LineaabiSession) ClaimMessageWithProof(_params IL1MessageServiceClaimMessageWithProofParams) (*types.Transaction, error) { - return _Lineaabi.Contract.ClaimMessageWithProof(&_Lineaabi.TransactOpts, _params) -} - -// ClaimMessageWithProof is a paid mutator transaction binding the contract method 0x6463fb2a. -// -// Solidity: function claimMessageWithProof((bytes32[],uint256,uint32,address,address,uint256,uint256,address,bytes32,bytes) _params) returns() -func (_Lineaabi *LineaabiTransactorSession) ClaimMessageWithProof(_params IL1MessageServiceClaimMessageWithProofParams) (*types.Transaction, error) { - return _Lineaabi.Contract.ClaimMessageWithProof(&_Lineaabi.TransactOpts, _params) -} - -// FinalizeCompressedBlocksWithProof is a paid mutator transaction binding the contract method 0xd630280f. -// -// Solidity: function finalizeCompressedBlocksWithProof(bytes _aggregatedProof, uint256 _proofType, (bytes32,bytes32[],bytes32,uint256,uint256,uint256,bytes32,uint256,bytes32[],uint256,bytes) _finalizationData) returns() -func (_Lineaabi *LineaabiTransactor) FinalizeCompressedBlocksWithProof(opts *bind.TransactOpts, _aggregatedProof []byte, _proofType *big.Int, _finalizationData ILineaRollupFinalizationData) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "finalizeCompressedBlocksWithProof", _aggregatedProof, _proofType, _finalizationData) -} - -// FinalizeCompressedBlocksWithProof is a paid mutator transaction binding the contract method 0xd630280f. -// -// Solidity: function finalizeCompressedBlocksWithProof(bytes _aggregatedProof, uint256 _proofType, (bytes32,bytes32[],bytes32,uint256,uint256,uint256,bytes32,uint256,bytes32[],uint256,bytes) _finalizationData) returns() -func (_Lineaabi *LineaabiSession) FinalizeCompressedBlocksWithProof(_aggregatedProof []byte, _proofType *big.Int, _finalizationData ILineaRollupFinalizationData) (*types.Transaction, error) { - return _Lineaabi.Contract.FinalizeCompressedBlocksWithProof(&_Lineaabi.TransactOpts, _aggregatedProof, _proofType, _finalizationData) -} - -// FinalizeCompressedBlocksWithProof is a paid mutator transaction binding the contract method 0xd630280f. -// -// Solidity: function finalizeCompressedBlocksWithProof(bytes _aggregatedProof, uint256 _proofType, (bytes32,bytes32[],bytes32,uint256,uint256,uint256,bytes32,uint256,bytes32[],uint256,bytes) _finalizationData) returns() -func (_Lineaabi *LineaabiTransactorSession) FinalizeCompressedBlocksWithProof(_aggregatedProof []byte, _proofType *big.Int, _finalizationData ILineaRollupFinalizationData) (*types.Transaction, error) { - return _Lineaabi.Contract.FinalizeCompressedBlocksWithProof(&_Lineaabi.TransactOpts, _aggregatedProof, _proofType, _finalizationData) -} - -// FinalizeCompressedBlocksWithoutProof is a paid mutator transaction binding the contract method 0xf9f48284. -// -// Solidity: function finalizeCompressedBlocksWithoutProof((bytes32,bytes32[],bytes32,uint256,uint256,uint256,bytes32,uint256,bytes32[],uint256,bytes) _finalizationData) returns() -func (_Lineaabi *LineaabiTransactor) FinalizeCompressedBlocksWithoutProof(opts *bind.TransactOpts, _finalizationData ILineaRollupFinalizationData) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "finalizeCompressedBlocksWithoutProof", _finalizationData) -} - -// FinalizeCompressedBlocksWithoutProof is a paid mutator transaction binding the contract method 0xf9f48284. -// -// Solidity: function finalizeCompressedBlocksWithoutProof((bytes32,bytes32[],bytes32,uint256,uint256,uint256,bytes32,uint256,bytes32[],uint256,bytes) _finalizationData) returns() -func (_Lineaabi *LineaabiSession) FinalizeCompressedBlocksWithoutProof(_finalizationData ILineaRollupFinalizationData) (*types.Transaction, error) { - return _Lineaabi.Contract.FinalizeCompressedBlocksWithoutProof(&_Lineaabi.TransactOpts, _finalizationData) -} - -// FinalizeCompressedBlocksWithoutProof is a paid mutator transaction binding the contract method 0xf9f48284. -// -// Solidity: function finalizeCompressedBlocksWithoutProof((bytes32,bytes32[],bytes32,uint256,uint256,uint256,bytes32,uint256,bytes32[],uint256,bytes) _finalizationData) returns() -func (_Lineaabi *LineaabiTransactorSession) FinalizeCompressedBlocksWithoutProof(_finalizationData ILineaRollupFinalizationData) (*types.Transaction, error) { - return _Lineaabi.Contract.FinalizeCompressedBlocksWithoutProof(&_Lineaabi.TransactOpts, _finalizationData) -} - -// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. -// -// Solidity: function grantRole(bytes32 role, address account) returns() -func (_Lineaabi *LineaabiTransactor) GrantRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "grantRole", role, account) -} - -// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. -// -// Solidity: function grantRole(bytes32 role, address account) returns() -func (_Lineaabi *LineaabiSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _Lineaabi.Contract.GrantRole(&_Lineaabi.TransactOpts, role, account) -} - -// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. -// -// Solidity: function grantRole(bytes32 role, address account) returns() -func (_Lineaabi *LineaabiTransactorSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _Lineaabi.Contract.GrantRole(&_Lineaabi.TransactOpts, role, account) -} - -// Initialize is a paid mutator transaction binding the contract method 0x5355420e. -// -// Solidity: function initialize(bytes32 _initialStateRootHash, uint256 _initialL2BlockNumber, address _defaultVerifier, address _securityCouncil, address[] _operators, uint256 _rateLimitPeriodInSeconds, uint256 _rateLimitAmountInWei, uint256 _genesisTimestamp) returns() -func (_Lineaabi *LineaabiTransactor) Initialize(opts *bind.TransactOpts, _initialStateRootHash [32]byte, _initialL2BlockNumber *big.Int, _defaultVerifier common.Address, _securityCouncil common.Address, _operators []common.Address, _rateLimitPeriodInSeconds *big.Int, _rateLimitAmountInWei *big.Int, _genesisTimestamp *big.Int) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "initialize", _initialStateRootHash, _initialL2BlockNumber, _defaultVerifier, _securityCouncil, _operators, _rateLimitPeriodInSeconds, _rateLimitAmountInWei, _genesisTimestamp) -} - -// Initialize is a paid mutator transaction binding the contract method 0x5355420e. -// -// Solidity: function initialize(bytes32 _initialStateRootHash, uint256 _initialL2BlockNumber, address _defaultVerifier, address _securityCouncil, address[] _operators, uint256 _rateLimitPeriodInSeconds, uint256 _rateLimitAmountInWei, uint256 _genesisTimestamp) returns() -func (_Lineaabi *LineaabiSession) Initialize(_initialStateRootHash [32]byte, _initialL2BlockNumber *big.Int, _defaultVerifier common.Address, _securityCouncil common.Address, _operators []common.Address, _rateLimitPeriodInSeconds *big.Int, _rateLimitAmountInWei *big.Int, _genesisTimestamp *big.Int) (*types.Transaction, error) { - return _Lineaabi.Contract.Initialize(&_Lineaabi.TransactOpts, _initialStateRootHash, _initialL2BlockNumber, _defaultVerifier, _securityCouncil, _operators, _rateLimitPeriodInSeconds, _rateLimitAmountInWei, _genesisTimestamp) -} - -// Initialize is a paid mutator transaction binding the contract method 0x5355420e. -// -// Solidity: function initialize(bytes32 _initialStateRootHash, uint256 _initialL2BlockNumber, address _defaultVerifier, address _securityCouncil, address[] _operators, uint256 _rateLimitPeriodInSeconds, uint256 _rateLimitAmountInWei, uint256 _genesisTimestamp) returns() -func (_Lineaabi *LineaabiTransactorSession) Initialize(_initialStateRootHash [32]byte, _initialL2BlockNumber *big.Int, _defaultVerifier common.Address, _securityCouncil common.Address, _operators []common.Address, _rateLimitPeriodInSeconds *big.Int, _rateLimitAmountInWei *big.Int, _genesisTimestamp *big.Int) (*types.Transaction, error) { - return _Lineaabi.Contract.Initialize(&_Lineaabi.TransactOpts, _initialStateRootHash, _initialL2BlockNumber, _defaultVerifier, _securityCouncil, _operators, _rateLimitPeriodInSeconds, _rateLimitAmountInWei, _genesisTimestamp) -} - -// InitializeLastFinalizedShnarf is a paid mutator transaction binding the contract method 0x3631b669. -// -// Solidity: function initializeLastFinalizedShnarf(bytes32 _lastFinalizedShnarf) returns() -func (_Lineaabi *LineaabiTransactor) InitializeLastFinalizedShnarf(opts *bind.TransactOpts, _lastFinalizedShnarf [32]byte) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "initializeLastFinalizedShnarf", _lastFinalizedShnarf) -} - -// InitializeLastFinalizedShnarf is a paid mutator transaction binding the contract method 0x3631b669. -// -// Solidity: function initializeLastFinalizedShnarf(bytes32 _lastFinalizedShnarf) returns() -func (_Lineaabi *LineaabiSession) InitializeLastFinalizedShnarf(_lastFinalizedShnarf [32]byte) (*types.Transaction, error) { - return _Lineaabi.Contract.InitializeLastFinalizedShnarf(&_Lineaabi.TransactOpts, _lastFinalizedShnarf) -} - -// InitializeLastFinalizedShnarf is a paid mutator transaction binding the contract method 0x3631b669. -// -// Solidity: function initializeLastFinalizedShnarf(bytes32 _lastFinalizedShnarf) returns() -func (_Lineaabi *LineaabiTransactorSession) InitializeLastFinalizedShnarf(_lastFinalizedShnarf [32]byte) (*types.Transaction, error) { - return _Lineaabi.Contract.InitializeLastFinalizedShnarf(&_Lineaabi.TransactOpts, _lastFinalizedShnarf) -} - -// PauseByType is a paid mutator transaction binding the contract method 0xe196fb5d. -// -// Solidity: function pauseByType(uint8 _pauseType) returns() -func (_Lineaabi *LineaabiTransactor) PauseByType(opts *bind.TransactOpts, _pauseType uint8) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "pauseByType", _pauseType) -} - -// PauseByType is a paid mutator transaction binding the contract method 0xe196fb5d. -// -// Solidity: function pauseByType(uint8 _pauseType) returns() -func (_Lineaabi *LineaabiSession) PauseByType(_pauseType uint8) (*types.Transaction, error) { - return _Lineaabi.Contract.PauseByType(&_Lineaabi.TransactOpts, _pauseType) -} - -// PauseByType is a paid mutator transaction binding the contract method 0xe196fb5d. -// -// Solidity: function pauseByType(uint8 _pauseType) returns() -func (_Lineaabi *LineaabiTransactorSession) PauseByType(_pauseType uint8) (*types.Transaction, error) { - return _Lineaabi.Contract.PauseByType(&_Lineaabi.TransactOpts, _pauseType) -} - -// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. -// -// Solidity: function renounceRole(bytes32 role, address account) returns() -func (_Lineaabi *LineaabiTransactor) RenounceRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "renounceRole", role, account) -} - -// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. -// -// Solidity: function renounceRole(bytes32 role, address account) returns() -func (_Lineaabi *LineaabiSession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _Lineaabi.Contract.RenounceRole(&_Lineaabi.TransactOpts, role, account) -} - -// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. -// -// Solidity: function renounceRole(bytes32 role, address account) returns() -func (_Lineaabi *LineaabiTransactorSession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _Lineaabi.Contract.RenounceRole(&_Lineaabi.TransactOpts, role, account) -} - -// ResetAmountUsedInPeriod is a paid mutator transaction binding the contract method 0xaea4f745. -// -// Solidity: function resetAmountUsedInPeriod() returns() -func (_Lineaabi *LineaabiTransactor) ResetAmountUsedInPeriod(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "resetAmountUsedInPeriod") -} - -// ResetAmountUsedInPeriod is a paid mutator transaction binding the contract method 0xaea4f745. -// -// Solidity: function resetAmountUsedInPeriod() returns() -func (_Lineaabi *LineaabiSession) ResetAmountUsedInPeriod() (*types.Transaction, error) { - return _Lineaabi.Contract.ResetAmountUsedInPeriod(&_Lineaabi.TransactOpts) -} - -// ResetAmountUsedInPeriod is a paid mutator transaction binding the contract method 0xaea4f745. -// -// Solidity: function resetAmountUsedInPeriod() returns() -func (_Lineaabi *LineaabiTransactorSession) ResetAmountUsedInPeriod() (*types.Transaction, error) { - return _Lineaabi.Contract.ResetAmountUsedInPeriod(&_Lineaabi.TransactOpts) -} - -// ResetRateLimitAmount is a paid mutator transaction binding the contract method 0x557eac73. -// -// Solidity: function resetRateLimitAmount(uint256 _amount) returns() -func (_Lineaabi *LineaabiTransactor) ResetRateLimitAmount(opts *bind.TransactOpts, _amount *big.Int) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "resetRateLimitAmount", _amount) -} - -// ResetRateLimitAmount is a paid mutator transaction binding the contract method 0x557eac73. -// -// Solidity: function resetRateLimitAmount(uint256 _amount) returns() -func (_Lineaabi *LineaabiSession) ResetRateLimitAmount(_amount *big.Int) (*types.Transaction, error) { - return _Lineaabi.Contract.ResetRateLimitAmount(&_Lineaabi.TransactOpts, _amount) -} - -// ResetRateLimitAmount is a paid mutator transaction binding the contract method 0x557eac73. -// -// Solidity: function resetRateLimitAmount(uint256 _amount) returns() -func (_Lineaabi *LineaabiTransactorSession) ResetRateLimitAmount(_amount *big.Int) (*types.Transaction, error) { - return _Lineaabi.Contract.ResetRateLimitAmount(&_Lineaabi.TransactOpts, _amount) -} - -// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. -// -// Solidity: function revokeRole(bytes32 role, address account) returns() -func (_Lineaabi *LineaabiTransactor) RevokeRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "revokeRole", role, account) -} - -// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. -// -// Solidity: function revokeRole(bytes32 role, address account) returns() -func (_Lineaabi *LineaabiSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _Lineaabi.Contract.RevokeRole(&_Lineaabi.TransactOpts, role, account) -} - -// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. -// -// Solidity: function revokeRole(bytes32 role, address account) returns() -func (_Lineaabi *LineaabiTransactorSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _Lineaabi.Contract.RevokeRole(&_Lineaabi.TransactOpts, role, account) -} - -// SendMessage is a paid mutator transaction binding the contract method 0x9f3ce55a. -// -// Solidity: function sendMessage(address _to, uint256 _fee, bytes _calldata) payable returns() -func (_Lineaabi *LineaabiTransactor) SendMessage(opts *bind.TransactOpts, _to common.Address, _fee *big.Int, _calldata []byte) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "sendMessage", _to, _fee, _calldata) -} - -// SendMessage is a paid mutator transaction binding the contract method 0x9f3ce55a. -// -// Solidity: function sendMessage(address _to, uint256 _fee, bytes _calldata) payable returns() -func (_Lineaabi *LineaabiSession) SendMessage(_to common.Address, _fee *big.Int, _calldata []byte) (*types.Transaction, error) { - return _Lineaabi.Contract.SendMessage(&_Lineaabi.TransactOpts, _to, _fee, _calldata) -} - -// SendMessage is a paid mutator transaction binding the contract method 0x9f3ce55a. -// -// Solidity: function sendMessage(address _to, uint256 _fee, bytes _calldata) payable returns() -func (_Lineaabi *LineaabiTransactorSession) SendMessage(_to common.Address, _fee *big.Int, _calldata []byte) (*types.Transaction, error) { - return _Lineaabi.Contract.SendMessage(&_Lineaabi.TransactOpts, _to, _fee, _calldata) -} - -// SetVerifierAddress is a paid mutator transaction binding the contract method 0xc2116974. -// -// Solidity: function setVerifierAddress(address _newVerifierAddress, uint256 _proofType) returns() -func (_Lineaabi *LineaabiTransactor) SetVerifierAddress(opts *bind.TransactOpts, _newVerifierAddress common.Address, _proofType *big.Int) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "setVerifierAddress", _newVerifierAddress, _proofType) -} - -// SetVerifierAddress is a paid mutator transaction binding the contract method 0xc2116974. -// -// Solidity: function setVerifierAddress(address _newVerifierAddress, uint256 _proofType) returns() -func (_Lineaabi *LineaabiSession) SetVerifierAddress(_newVerifierAddress common.Address, _proofType *big.Int) (*types.Transaction, error) { - return _Lineaabi.Contract.SetVerifierAddress(&_Lineaabi.TransactOpts, _newVerifierAddress, _proofType) -} - -// SetVerifierAddress is a paid mutator transaction binding the contract method 0xc2116974. -// -// Solidity: function setVerifierAddress(address _newVerifierAddress, uint256 _proofType) returns() -func (_Lineaabi *LineaabiTransactorSession) SetVerifierAddress(_newVerifierAddress common.Address, _proofType *big.Int) (*types.Transaction, error) { - return _Lineaabi.Contract.SetVerifierAddress(&_Lineaabi.TransactOpts, _newVerifierAddress, _proofType) -} - -// SubmitBlobData is a paid mutator transaction binding the contract method 0x2d3c12e5. -// -// Solidity: function submitBlobData((bytes32,bytes32,bytes32,uint256,uint256,bytes32) _submissionData, uint256 _dataEvaluationClaim, bytes _kzgCommitment, bytes _kzgProof) returns() -func (_Lineaabi *LineaabiTransactor) SubmitBlobData(opts *bind.TransactOpts, _submissionData ILineaRollupSupportingSubmissionData, _dataEvaluationClaim *big.Int, _kzgCommitment []byte, _kzgProof []byte) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "submitBlobData", _submissionData, _dataEvaluationClaim, _kzgCommitment, _kzgProof) -} - -// SubmitBlobData is a paid mutator transaction binding the contract method 0x2d3c12e5. -// -// Solidity: function submitBlobData((bytes32,bytes32,bytes32,uint256,uint256,bytes32) _submissionData, uint256 _dataEvaluationClaim, bytes _kzgCommitment, bytes _kzgProof) returns() -func (_Lineaabi *LineaabiSession) SubmitBlobData(_submissionData ILineaRollupSupportingSubmissionData, _dataEvaluationClaim *big.Int, _kzgCommitment []byte, _kzgProof []byte) (*types.Transaction, error) { - return _Lineaabi.Contract.SubmitBlobData(&_Lineaabi.TransactOpts, _submissionData, _dataEvaluationClaim, _kzgCommitment, _kzgProof) -} - -// SubmitBlobData is a paid mutator transaction binding the contract method 0x2d3c12e5. -// -// Solidity: function submitBlobData((bytes32,bytes32,bytes32,uint256,uint256,bytes32) _submissionData, uint256 _dataEvaluationClaim, bytes _kzgCommitment, bytes _kzgProof) returns() -func (_Lineaabi *LineaabiTransactorSession) SubmitBlobData(_submissionData ILineaRollupSupportingSubmissionData, _dataEvaluationClaim *big.Int, _kzgCommitment []byte, _kzgProof []byte) (*types.Transaction, error) { - return _Lineaabi.Contract.SubmitBlobData(&_Lineaabi.TransactOpts, _submissionData, _dataEvaluationClaim, _kzgCommitment, _kzgProof) -} - -// SubmitData is a paid mutator transaction binding the contract method 0x7a776315. -// -// Solidity: function submitData((bytes32,bytes32,bytes32,uint256,uint256,bytes32,bytes) _submissionData) returns() -func (_Lineaabi *LineaabiTransactor) SubmitData(opts *bind.TransactOpts, _submissionData ILineaRollupSubmissionData) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "submitData", _submissionData) -} - -// SubmitData is a paid mutator transaction binding the contract method 0x7a776315. -// -// Solidity: function submitData((bytes32,bytes32,bytes32,uint256,uint256,bytes32,bytes) _submissionData) returns() -func (_Lineaabi *LineaabiSession) SubmitData(_submissionData ILineaRollupSubmissionData) (*types.Transaction, error) { - return _Lineaabi.Contract.SubmitData(&_Lineaabi.TransactOpts, _submissionData) -} - -// SubmitData is a paid mutator transaction binding the contract method 0x7a776315. -// -// Solidity: function submitData((bytes32,bytes32,bytes32,uint256,uint256,bytes32,bytes) _submissionData) returns() -func (_Lineaabi *LineaabiTransactorSession) SubmitData(_submissionData ILineaRollupSubmissionData) (*types.Transaction, error) { - return _Lineaabi.Contract.SubmitData(&_Lineaabi.TransactOpts, _submissionData) -} - -// UnPauseByType is a paid mutator transaction binding the contract method 0x1065a399. -// -// Solidity: function unPauseByType(uint8 _pauseType) returns() -func (_Lineaabi *LineaabiTransactor) UnPauseByType(opts *bind.TransactOpts, _pauseType uint8) (*types.Transaction, error) { - return _Lineaabi.contract.Transact(opts, "unPauseByType", _pauseType) -} - -// UnPauseByType is a paid mutator transaction binding the contract method 0x1065a399. -// -// Solidity: function unPauseByType(uint8 _pauseType) returns() -func (_Lineaabi *LineaabiSession) UnPauseByType(_pauseType uint8) (*types.Transaction, error) { - return _Lineaabi.Contract.UnPauseByType(&_Lineaabi.TransactOpts, _pauseType) -} - -// UnPauseByType is a paid mutator transaction binding the contract method 0x1065a399. -// -// Solidity: function unPauseByType(uint8 _pauseType) returns() -func (_Lineaabi *LineaabiTransactorSession) UnPauseByType(_pauseType uint8) (*types.Transaction, error) { - return _Lineaabi.Contract.UnPauseByType(&_Lineaabi.TransactOpts, _pauseType) -} - -// LineaabiAmountUsedInPeriodResetIterator is returned from FilterAmountUsedInPeriodReset and is used to iterate over the raw logs and unpacked data for AmountUsedInPeriodReset events raised by the Lineaabi contract. -type LineaabiAmountUsedInPeriodResetIterator struct { - Event *LineaabiAmountUsedInPeriodReset // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiAmountUsedInPeriodResetIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiAmountUsedInPeriodReset) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiAmountUsedInPeriodReset) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiAmountUsedInPeriodResetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiAmountUsedInPeriodResetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiAmountUsedInPeriodReset represents a AmountUsedInPeriodReset event raised by the Lineaabi contract. -type LineaabiAmountUsedInPeriodReset struct { - ResettingAddress common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAmountUsedInPeriodReset is a free log retrieval operation binding the contract event 0xba88c025b0cbb77022c0c487beef24f759f1e4be2f51a205bc427cee19c2eaa6. -// -// Solidity: event AmountUsedInPeriodReset(address indexed resettingAddress) -func (_Lineaabi *LineaabiFilterer) FilterAmountUsedInPeriodReset(opts *bind.FilterOpts, resettingAddress []common.Address) (*LineaabiAmountUsedInPeriodResetIterator, error) { - - var resettingAddressRule []interface{} - for _, resettingAddressItem := range resettingAddress { - resettingAddressRule = append(resettingAddressRule, resettingAddressItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "AmountUsedInPeriodReset", resettingAddressRule) - if err != nil { - return nil, err - } - return &LineaabiAmountUsedInPeriodResetIterator{contract: _Lineaabi.contract, event: "AmountUsedInPeriodReset", logs: logs, sub: sub}, nil -} - -// WatchAmountUsedInPeriodReset is a free log subscription operation binding the contract event 0xba88c025b0cbb77022c0c487beef24f759f1e4be2f51a205bc427cee19c2eaa6. -// -// Solidity: event AmountUsedInPeriodReset(address indexed resettingAddress) -func (_Lineaabi *LineaabiFilterer) WatchAmountUsedInPeriodReset(opts *bind.WatchOpts, sink chan<- *LineaabiAmountUsedInPeriodReset, resettingAddress []common.Address) (event.Subscription, error) { - - var resettingAddressRule []interface{} - for _, resettingAddressItem := range resettingAddress { - resettingAddressRule = append(resettingAddressRule, resettingAddressItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "AmountUsedInPeriodReset", resettingAddressRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiAmountUsedInPeriodReset) - if err := _Lineaabi.contract.UnpackLog(event, "AmountUsedInPeriodReset", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseAmountUsedInPeriodReset is a log parse operation binding the contract event 0xba88c025b0cbb77022c0c487beef24f759f1e4be2f51a205bc427cee19c2eaa6. -// -// Solidity: event AmountUsedInPeriodReset(address indexed resettingAddress) -func (_Lineaabi *LineaabiFilterer) ParseAmountUsedInPeriodReset(log types.Log) (*LineaabiAmountUsedInPeriodReset, error) { - event := new(LineaabiAmountUsedInPeriodReset) - if err := _Lineaabi.contract.UnpackLog(event, "AmountUsedInPeriodReset", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiBlockFinalizedIterator is returned from FilterBlockFinalized and is used to iterate over the raw logs and unpacked data for BlockFinalized events raised by the Lineaabi contract. -type LineaabiBlockFinalizedIterator struct { - Event *LineaabiBlockFinalized // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiBlockFinalizedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiBlockFinalized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiBlockFinalized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiBlockFinalizedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiBlockFinalizedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiBlockFinalized represents a BlockFinalized event raised by the Lineaabi contract. -type LineaabiBlockFinalized struct { - BlockNumber *big.Int - StateRootHash [32]byte - FinalizedWithProof bool - Raw types.Log // Blockchain specific contextual infos -} - -// FilterBlockFinalized is a free log retrieval operation binding the contract event 0x047c6ce79802b16b6527cedd89156bb59f2da26867b4f218fa60c9521ddcce55. -// -// Solidity: event BlockFinalized(uint256 indexed blockNumber, bytes32 indexed stateRootHash, bool indexed finalizedWithProof) -func (_Lineaabi *LineaabiFilterer) FilterBlockFinalized(opts *bind.FilterOpts, blockNumber []*big.Int, stateRootHash [][32]byte, finalizedWithProof []bool) (*LineaabiBlockFinalizedIterator, error) { - - var blockNumberRule []interface{} - for _, blockNumberItem := range blockNumber { - blockNumberRule = append(blockNumberRule, blockNumberItem) - } - var stateRootHashRule []interface{} - for _, stateRootHashItem := range stateRootHash { - stateRootHashRule = append(stateRootHashRule, stateRootHashItem) - } - var finalizedWithProofRule []interface{} - for _, finalizedWithProofItem := range finalizedWithProof { - finalizedWithProofRule = append(finalizedWithProofRule, finalizedWithProofItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "BlockFinalized", blockNumberRule, stateRootHashRule, finalizedWithProofRule) - if err != nil { - return nil, err - } - return &LineaabiBlockFinalizedIterator{contract: _Lineaabi.contract, event: "BlockFinalized", logs: logs, sub: sub}, nil -} - -// WatchBlockFinalized is a free log subscription operation binding the contract event 0x047c6ce79802b16b6527cedd89156bb59f2da26867b4f218fa60c9521ddcce55. -// -// Solidity: event BlockFinalized(uint256 indexed blockNumber, bytes32 indexed stateRootHash, bool indexed finalizedWithProof) -func (_Lineaabi *LineaabiFilterer) WatchBlockFinalized(opts *bind.WatchOpts, sink chan<- *LineaabiBlockFinalized, blockNumber []*big.Int, stateRootHash [][32]byte, finalizedWithProof []bool) (event.Subscription, error) { - - var blockNumberRule []interface{} - for _, blockNumberItem := range blockNumber { - blockNumberRule = append(blockNumberRule, blockNumberItem) - } - var stateRootHashRule []interface{} - for _, stateRootHashItem := range stateRootHash { - stateRootHashRule = append(stateRootHashRule, stateRootHashItem) - } - var finalizedWithProofRule []interface{} - for _, finalizedWithProofItem := range finalizedWithProof { - finalizedWithProofRule = append(finalizedWithProofRule, finalizedWithProofItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "BlockFinalized", blockNumberRule, stateRootHashRule, finalizedWithProofRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiBlockFinalized) - if err := _Lineaabi.contract.UnpackLog(event, "BlockFinalized", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseBlockFinalized is a log parse operation binding the contract event 0x047c6ce79802b16b6527cedd89156bb59f2da26867b4f218fa60c9521ddcce55. -// -// Solidity: event BlockFinalized(uint256 indexed blockNumber, bytes32 indexed stateRootHash, bool indexed finalizedWithProof) -func (_Lineaabi *LineaabiFilterer) ParseBlockFinalized(log types.Log) (*LineaabiBlockFinalized, error) { - event := new(LineaabiBlockFinalized) - if err := _Lineaabi.contract.UnpackLog(event, "BlockFinalized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiBlocksVerificationDoneIterator is returned from FilterBlocksVerificationDone and is used to iterate over the raw logs and unpacked data for BlocksVerificationDone events raised by the Lineaabi contract. -type LineaabiBlocksVerificationDoneIterator struct { - Event *LineaabiBlocksVerificationDone // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiBlocksVerificationDoneIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiBlocksVerificationDone) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiBlocksVerificationDone) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiBlocksVerificationDoneIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiBlocksVerificationDoneIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiBlocksVerificationDone represents a BlocksVerificationDone event raised by the Lineaabi contract. -type LineaabiBlocksVerificationDone struct { - LastBlockFinalized *big.Int - StartingRootHash [32]byte - FinalRootHash [32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterBlocksVerificationDone is a free log retrieval operation binding the contract event 0x5c885a794662ebe3b08ae0874fc2c88b5343b0223ba9cd2cad92b69c0d0c901f. -// -// Solidity: event BlocksVerificationDone(uint256 indexed lastBlockFinalized, bytes32 startingRootHash, bytes32 finalRootHash) -func (_Lineaabi *LineaabiFilterer) FilterBlocksVerificationDone(opts *bind.FilterOpts, lastBlockFinalized []*big.Int) (*LineaabiBlocksVerificationDoneIterator, error) { - - var lastBlockFinalizedRule []interface{} - for _, lastBlockFinalizedItem := range lastBlockFinalized { - lastBlockFinalizedRule = append(lastBlockFinalizedRule, lastBlockFinalizedItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "BlocksVerificationDone", lastBlockFinalizedRule) - if err != nil { - return nil, err - } - return &LineaabiBlocksVerificationDoneIterator{contract: _Lineaabi.contract, event: "BlocksVerificationDone", logs: logs, sub: sub}, nil -} - -// WatchBlocksVerificationDone is a free log subscription operation binding the contract event 0x5c885a794662ebe3b08ae0874fc2c88b5343b0223ba9cd2cad92b69c0d0c901f. -// -// Solidity: event BlocksVerificationDone(uint256 indexed lastBlockFinalized, bytes32 startingRootHash, bytes32 finalRootHash) -func (_Lineaabi *LineaabiFilterer) WatchBlocksVerificationDone(opts *bind.WatchOpts, sink chan<- *LineaabiBlocksVerificationDone, lastBlockFinalized []*big.Int) (event.Subscription, error) { - - var lastBlockFinalizedRule []interface{} - for _, lastBlockFinalizedItem := range lastBlockFinalized { - lastBlockFinalizedRule = append(lastBlockFinalizedRule, lastBlockFinalizedItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "BlocksVerificationDone", lastBlockFinalizedRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiBlocksVerificationDone) - if err := _Lineaabi.contract.UnpackLog(event, "BlocksVerificationDone", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseBlocksVerificationDone is a log parse operation binding the contract event 0x5c885a794662ebe3b08ae0874fc2c88b5343b0223ba9cd2cad92b69c0d0c901f. -// -// Solidity: event BlocksVerificationDone(uint256 indexed lastBlockFinalized, bytes32 startingRootHash, bytes32 finalRootHash) -func (_Lineaabi *LineaabiFilterer) ParseBlocksVerificationDone(log types.Log) (*LineaabiBlocksVerificationDone, error) { - event := new(LineaabiBlocksVerificationDone) - if err := _Lineaabi.contract.UnpackLog(event, "BlocksVerificationDone", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiDataFinalizedIterator is returned from FilterDataFinalized and is used to iterate over the raw logs and unpacked data for DataFinalized events raised by the Lineaabi contract. -type LineaabiDataFinalizedIterator struct { - Event *LineaabiDataFinalized // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiDataFinalizedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiDataFinalized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiDataFinalized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiDataFinalizedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiDataFinalizedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiDataFinalized represents a DataFinalized event raised by the Lineaabi contract. -type LineaabiDataFinalized struct { - LastBlockFinalized *big.Int - StartingRootHash [32]byte - FinalRootHash [32]byte - WithProof bool - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDataFinalized is a free log retrieval operation binding the contract event 0x1335f1a2b3ff25f07f5fef07dd35d8fb4312c3c73b138e2fad9347b3319ab53c. -// -// Solidity: event DataFinalized(uint256 indexed lastBlockFinalized, bytes32 indexed startingRootHash, bytes32 indexed finalRootHash, bool withProof) -func (_Lineaabi *LineaabiFilterer) FilterDataFinalized(opts *bind.FilterOpts, lastBlockFinalized []*big.Int, startingRootHash [][32]byte, finalRootHash [][32]byte) (*LineaabiDataFinalizedIterator, error) { - - var lastBlockFinalizedRule []interface{} - for _, lastBlockFinalizedItem := range lastBlockFinalized { - lastBlockFinalizedRule = append(lastBlockFinalizedRule, lastBlockFinalizedItem) - } - var startingRootHashRule []interface{} - for _, startingRootHashItem := range startingRootHash { - startingRootHashRule = append(startingRootHashRule, startingRootHashItem) - } - var finalRootHashRule []interface{} - for _, finalRootHashItem := range finalRootHash { - finalRootHashRule = append(finalRootHashRule, finalRootHashItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "DataFinalized", lastBlockFinalizedRule, startingRootHashRule, finalRootHashRule) - if err != nil { - return nil, err - } - return &LineaabiDataFinalizedIterator{contract: _Lineaabi.contract, event: "DataFinalized", logs: logs, sub: sub}, nil -} - -// WatchDataFinalized is a free log subscription operation binding the contract event 0x1335f1a2b3ff25f07f5fef07dd35d8fb4312c3c73b138e2fad9347b3319ab53c. -// -// Solidity: event DataFinalized(uint256 indexed lastBlockFinalized, bytes32 indexed startingRootHash, bytes32 indexed finalRootHash, bool withProof) -func (_Lineaabi *LineaabiFilterer) WatchDataFinalized(opts *bind.WatchOpts, sink chan<- *LineaabiDataFinalized, lastBlockFinalized []*big.Int, startingRootHash [][32]byte, finalRootHash [][32]byte) (event.Subscription, error) { - - var lastBlockFinalizedRule []interface{} - for _, lastBlockFinalizedItem := range lastBlockFinalized { - lastBlockFinalizedRule = append(lastBlockFinalizedRule, lastBlockFinalizedItem) - } - var startingRootHashRule []interface{} - for _, startingRootHashItem := range startingRootHash { - startingRootHashRule = append(startingRootHashRule, startingRootHashItem) - } - var finalRootHashRule []interface{} - for _, finalRootHashItem := range finalRootHash { - finalRootHashRule = append(finalRootHashRule, finalRootHashItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "DataFinalized", lastBlockFinalizedRule, startingRootHashRule, finalRootHashRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiDataFinalized) - if err := _Lineaabi.contract.UnpackLog(event, "DataFinalized", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseDataFinalized is a log parse operation binding the contract event 0x1335f1a2b3ff25f07f5fef07dd35d8fb4312c3c73b138e2fad9347b3319ab53c. -// -// Solidity: event DataFinalized(uint256 indexed lastBlockFinalized, bytes32 indexed startingRootHash, bytes32 indexed finalRootHash, bool withProof) -func (_Lineaabi *LineaabiFilterer) ParseDataFinalized(log types.Log) (*LineaabiDataFinalized, error) { - event := new(LineaabiDataFinalized) - if err := _Lineaabi.contract.UnpackLog(event, "DataFinalized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiDataSubmittedIterator is returned from FilterDataSubmitted and is used to iterate over the raw logs and unpacked data for DataSubmitted events raised by the Lineaabi contract. -type LineaabiDataSubmittedIterator struct { - Event *LineaabiDataSubmitted // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiDataSubmittedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiDataSubmitted) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiDataSubmitted) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiDataSubmittedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiDataSubmittedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiDataSubmitted represents a DataSubmitted event raised by the Lineaabi contract. -type LineaabiDataSubmitted struct { - DataHash [32]byte - StartBlock *big.Int - EndBlock *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDataSubmitted is a free log retrieval operation binding the contract event 0x174b4a2e83ebebaf6824e559d2bab7b7e229c80d211e98298a1224970b719a42. -// -// Solidity: event DataSubmitted(bytes32 indexed dataHash, uint256 indexed startBlock, uint256 indexed endBlock) -func (_Lineaabi *LineaabiFilterer) FilterDataSubmitted(opts *bind.FilterOpts, dataHash [][32]byte, startBlock []*big.Int, endBlock []*big.Int) (*LineaabiDataSubmittedIterator, error) { - - var dataHashRule []interface{} - for _, dataHashItem := range dataHash { - dataHashRule = append(dataHashRule, dataHashItem) - } - var startBlockRule []interface{} - for _, startBlockItem := range startBlock { - startBlockRule = append(startBlockRule, startBlockItem) - } - var endBlockRule []interface{} - for _, endBlockItem := range endBlock { - endBlockRule = append(endBlockRule, endBlockItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "DataSubmitted", dataHashRule, startBlockRule, endBlockRule) - if err != nil { - return nil, err - } - return &LineaabiDataSubmittedIterator{contract: _Lineaabi.contract, event: "DataSubmitted", logs: logs, sub: sub}, nil -} - -// WatchDataSubmitted is a free log subscription operation binding the contract event 0x174b4a2e83ebebaf6824e559d2bab7b7e229c80d211e98298a1224970b719a42. -// -// Solidity: event DataSubmitted(bytes32 indexed dataHash, uint256 indexed startBlock, uint256 indexed endBlock) -func (_Lineaabi *LineaabiFilterer) WatchDataSubmitted(opts *bind.WatchOpts, sink chan<- *LineaabiDataSubmitted, dataHash [][32]byte, startBlock []*big.Int, endBlock []*big.Int) (event.Subscription, error) { - - var dataHashRule []interface{} - for _, dataHashItem := range dataHash { - dataHashRule = append(dataHashRule, dataHashItem) - } - var startBlockRule []interface{} - for _, startBlockItem := range startBlock { - startBlockRule = append(startBlockRule, startBlockItem) - } - var endBlockRule []interface{} - for _, endBlockItem := range endBlock { - endBlockRule = append(endBlockRule, endBlockItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "DataSubmitted", dataHashRule, startBlockRule, endBlockRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiDataSubmitted) - if err := _Lineaabi.contract.UnpackLog(event, "DataSubmitted", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseDataSubmitted is a log parse operation binding the contract event 0x174b4a2e83ebebaf6824e559d2bab7b7e229c80d211e98298a1224970b719a42. -// -// Solidity: event DataSubmitted(bytes32 indexed dataHash, uint256 indexed startBlock, uint256 indexed endBlock) -func (_Lineaabi *LineaabiFilterer) ParseDataSubmitted(log types.Log) (*LineaabiDataSubmitted, error) { - event := new(LineaabiDataSubmitted) - if err := _Lineaabi.contract.UnpackLog(event, "DataSubmitted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Lineaabi contract. -type LineaabiInitializedIterator struct { - Event *LineaabiInitialized // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiInitializedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiInitializedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiInitializedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiInitialized represents a Initialized event raised by the Lineaabi contract. -type LineaabiInitialized struct { - Version uint8 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_Lineaabi *LineaabiFilterer) FilterInitialized(opts *bind.FilterOpts) (*LineaabiInitializedIterator, error) { - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return &LineaabiInitializedIterator{contract: _Lineaabi.contract, event: "Initialized", logs: logs, sub: sub}, nil -} - -// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_Lineaabi *LineaabiFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *LineaabiInitialized) (event.Subscription, error) { - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiInitialized) - if err := _Lineaabi.contract.UnpackLog(event, "Initialized", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_Lineaabi *LineaabiFilterer) ParseInitialized(log types.Log) (*LineaabiInitialized, error) { - event := new(LineaabiInitialized) - if err := _Lineaabi.contract.UnpackLog(event, "Initialized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiL1L2MessagesReceivedOnL2Iterator is returned from FilterL1L2MessagesReceivedOnL2 and is used to iterate over the raw logs and unpacked data for L1L2MessagesReceivedOnL2 events raised by the Lineaabi contract. -type LineaabiL1L2MessagesReceivedOnL2Iterator struct { - Event *LineaabiL1L2MessagesReceivedOnL2 // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiL1L2MessagesReceivedOnL2Iterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiL1L2MessagesReceivedOnL2) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiL1L2MessagesReceivedOnL2) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiL1L2MessagesReceivedOnL2Iterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiL1L2MessagesReceivedOnL2Iterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiL1L2MessagesReceivedOnL2 represents a L1L2MessagesReceivedOnL2 event raised by the Lineaabi contract. -type LineaabiL1L2MessagesReceivedOnL2 struct { - MessageHashes [][32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterL1L2MessagesReceivedOnL2 is a free log retrieval operation binding the contract event 0x95e84bb4317676921a29fd1d13f8f0153508473b899c12b3cd08314348801d64. -// -// Solidity: event L1L2MessagesReceivedOnL2(bytes32[] messageHashes) -func (_Lineaabi *LineaabiFilterer) FilterL1L2MessagesReceivedOnL2(opts *bind.FilterOpts) (*LineaabiL1L2MessagesReceivedOnL2Iterator, error) { - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "L1L2MessagesReceivedOnL2") - if err != nil { - return nil, err - } - return &LineaabiL1L2MessagesReceivedOnL2Iterator{contract: _Lineaabi.contract, event: "L1L2MessagesReceivedOnL2", logs: logs, sub: sub}, nil -} - -// WatchL1L2MessagesReceivedOnL2 is a free log subscription operation binding the contract event 0x95e84bb4317676921a29fd1d13f8f0153508473b899c12b3cd08314348801d64. -// -// Solidity: event L1L2MessagesReceivedOnL2(bytes32[] messageHashes) -func (_Lineaabi *LineaabiFilterer) WatchL1L2MessagesReceivedOnL2(opts *bind.WatchOpts, sink chan<- *LineaabiL1L2MessagesReceivedOnL2) (event.Subscription, error) { - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "L1L2MessagesReceivedOnL2") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiL1L2MessagesReceivedOnL2) - if err := _Lineaabi.contract.UnpackLog(event, "L1L2MessagesReceivedOnL2", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseL1L2MessagesReceivedOnL2 is a log parse operation binding the contract event 0x95e84bb4317676921a29fd1d13f8f0153508473b899c12b3cd08314348801d64. -// -// Solidity: event L1L2MessagesReceivedOnL2(bytes32[] messageHashes) -func (_Lineaabi *LineaabiFilterer) ParseL1L2MessagesReceivedOnL2(log types.Log) (*LineaabiL1L2MessagesReceivedOnL2, error) { - event := new(LineaabiL1L2MessagesReceivedOnL2) - if err := _Lineaabi.contract.UnpackLog(event, "L1L2MessagesReceivedOnL2", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiL2L1MessageHashAddedToInboxIterator is returned from FilterL2L1MessageHashAddedToInbox and is used to iterate over the raw logs and unpacked data for L2L1MessageHashAddedToInbox events raised by the Lineaabi contract. -type LineaabiL2L1MessageHashAddedToInboxIterator struct { - Event *LineaabiL2L1MessageHashAddedToInbox // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiL2L1MessageHashAddedToInboxIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiL2L1MessageHashAddedToInbox) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiL2L1MessageHashAddedToInbox) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiL2L1MessageHashAddedToInboxIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiL2L1MessageHashAddedToInboxIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiL2L1MessageHashAddedToInbox represents a L2L1MessageHashAddedToInbox event raised by the Lineaabi contract. -type LineaabiL2L1MessageHashAddedToInbox struct { - MessageHash [32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterL2L1MessageHashAddedToInbox is a free log retrieval operation binding the contract event 0x810484e22f73d8f099aaee1edb851ec6be6d84d43045d0a7803e5f7b3612edce. -// -// Solidity: event L2L1MessageHashAddedToInbox(bytes32 indexed messageHash) -func (_Lineaabi *LineaabiFilterer) FilterL2L1MessageHashAddedToInbox(opts *bind.FilterOpts, messageHash [][32]byte) (*LineaabiL2L1MessageHashAddedToInboxIterator, error) { - - var messageHashRule []interface{} - for _, messageHashItem := range messageHash { - messageHashRule = append(messageHashRule, messageHashItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "L2L1MessageHashAddedToInbox", messageHashRule) - if err != nil { - return nil, err - } - return &LineaabiL2L1MessageHashAddedToInboxIterator{contract: _Lineaabi.contract, event: "L2L1MessageHashAddedToInbox", logs: logs, sub: sub}, nil -} - -// WatchL2L1MessageHashAddedToInbox is a free log subscription operation binding the contract event 0x810484e22f73d8f099aaee1edb851ec6be6d84d43045d0a7803e5f7b3612edce. -// -// Solidity: event L2L1MessageHashAddedToInbox(bytes32 indexed messageHash) -func (_Lineaabi *LineaabiFilterer) WatchL2L1MessageHashAddedToInbox(opts *bind.WatchOpts, sink chan<- *LineaabiL2L1MessageHashAddedToInbox, messageHash [][32]byte) (event.Subscription, error) { - - var messageHashRule []interface{} - for _, messageHashItem := range messageHash { - messageHashRule = append(messageHashRule, messageHashItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "L2L1MessageHashAddedToInbox", messageHashRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiL2L1MessageHashAddedToInbox) - if err := _Lineaabi.contract.UnpackLog(event, "L2L1MessageHashAddedToInbox", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseL2L1MessageHashAddedToInbox is a log parse operation binding the contract event 0x810484e22f73d8f099aaee1edb851ec6be6d84d43045d0a7803e5f7b3612edce. -// -// Solidity: event L2L1MessageHashAddedToInbox(bytes32 indexed messageHash) -func (_Lineaabi *LineaabiFilterer) ParseL2L1MessageHashAddedToInbox(log types.Log) (*LineaabiL2L1MessageHashAddedToInbox, error) { - event := new(LineaabiL2L1MessageHashAddedToInbox) - if err := _Lineaabi.contract.UnpackLog(event, "L2L1MessageHashAddedToInbox", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiL2MerkleRootAddedIterator is returned from FilterL2MerkleRootAdded and is used to iterate over the raw logs and unpacked data for L2MerkleRootAdded events raised by the Lineaabi contract. -type LineaabiL2MerkleRootAddedIterator struct { - Event *LineaabiL2MerkleRootAdded // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiL2MerkleRootAddedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiL2MerkleRootAdded) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiL2MerkleRootAdded) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiL2MerkleRootAddedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiL2MerkleRootAddedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiL2MerkleRootAdded represents a L2MerkleRootAdded event raised by the Lineaabi contract. -type LineaabiL2MerkleRootAdded struct { - L2MerkleRoot [32]byte - TreeDepth *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterL2MerkleRootAdded is a free log retrieval operation binding the contract event 0x300e6f978eee6a4b0bba78dd8400dc64fd5652dbfc868a2258e16d0977be222b. -// -// Solidity: event L2MerkleRootAdded(bytes32 indexed l2MerkleRoot, uint256 indexed treeDepth) -func (_Lineaabi *LineaabiFilterer) FilterL2MerkleRootAdded(opts *bind.FilterOpts, l2MerkleRoot [][32]byte, treeDepth []*big.Int) (*LineaabiL2MerkleRootAddedIterator, error) { - - var l2MerkleRootRule []interface{} - for _, l2MerkleRootItem := range l2MerkleRoot { - l2MerkleRootRule = append(l2MerkleRootRule, l2MerkleRootItem) - } - var treeDepthRule []interface{} - for _, treeDepthItem := range treeDepth { - treeDepthRule = append(treeDepthRule, treeDepthItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "L2MerkleRootAdded", l2MerkleRootRule, treeDepthRule) - if err != nil { - return nil, err - } - return &LineaabiL2MerkleRootAddedIterator{contract: _Lineaabi.contract, event: "L2MerkleRootAdded", logs: logs, sub: sub}, nil -} - -// WatchL2MerkleRootAdded is a free log subscription operation binding the contract event 0x300e6f978eee6a4b0bba78dd8400dc64fd5652dbfc868a2258e16d0977be222b. -// -// Solidity: event L2MerkleRootAdded(bytes32 indexed l2MerkleRoot, uint256 indexed treeDepth) -func (_Lineaabi *LineaabiFilterer) WatchL2MerkleRootAdded(opts *bind.WatchOpts, sink chan<- *LineaabiL2MerkleRootAdded, l2MerkleRoot [][32]byte, treeDepth []*big.Int) (event.Subscription, error) { - - var l2MerkleRootRule []interface{} - for _, l2MerkleRootItem := range l2MerkleRoot { - l2MerkleRootRule = append(l2MerkleRootRule, l2MerkleRootItem) - } - var treeDepthRule []interface{} - for _, treeDepthItem := range treeDepth { - treeDepthRule = append(treeDepthRule, treeDepthItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "L2MerkleRootAdded", l2MerkleRootRule, treeDepthRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiL2MerkleRootAdded) - if err := _Lineaabi.contract.UnpackLog(event, "L2MerkleRootAdded", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseL2MerkleRootAdded is a log parse operation binding the contract event 0x300e6f978eee6a4b0bba78dd8400dc64fd5652dbfc868a2258e16d0977be222b. -// -// Solidity: event L2MerkleRootAdded(bytes32 indexed l2MerkleRoot, uint256 indexed treeDepth) -func (_Lineaabi *LineaabiFilterer) ParseL2MerkleRootAdded(log types.Log) (*LineaabiL2MerkleRootAdded, error) { - event := new(LineaabiL2MerkleRootAdded) - if err := _Lineaabi.contract.UnpackLog(event, "L2MerkleRootAdded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiL2MessagingBlockAnchoredIterator is returned from FilterL2MessagingBlockAnchored and is used to iterate over the raw logs and unpacked data for L2MessagingBlockAnchored events raised by the Lineaabi contract. -type LineaabiL2MessagingBlockAnchoredIterator struct { - Event *LineaabiL2MessagingBlockAnchored // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiL2MessagingBlockAnchoredIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiL2MessagingBlockAnchored) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiL2MessagingBlockAnchored) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiL2MessagingBlockAnchoredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiL2MessagingBlockAnchoredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiL2MessagingBlockAnchored represents a L2MessagingBlockAnchored event raised by the Lineaabi contract. -type LineaabiL2MessagingBlockAnchored struct { - L2Block *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterL2MessagingBlockAnchored is a free log retrieval operation binding the contract event 0x3c116827db9db3a30c1a25db8b0ee4bab9d2b223560209cfd839601b621c726d. -// -// Solidity: event L2MessagingBlockAnchored(uint256 indexed l2Block) -func (_Lineaabi *LineaabiFilterer) FilterL2MessagingBlockAnchored(opts *bind.FilterOpts, l2Block []*big.Int) (*LineaabiL2MessagingBlockAnchoredIterator, error) { - - var l2BlockRule []interface{} - for _, l2BlockItem := range l2Block { - l2BlockRule = append(l2BlockRule, l2BlockItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "L2MessagingBlockAnchored", l2BlockRule) - if err != nil { - return nil, err - } - return &LineaabiL2MessagingBlockAnchoredIterator{contract: _Lineaabi.contract, event: "L2MessagingBlockAnchored", logs: logs, sub: sub}, nil -} - -// WatchL2MessagingBlockAnchored is a free log subscription operation binding the contract event 0x3c116827db9db3a30c1a25db8b0ee4bab9d2b223560209cfd839601b621c726d. -// -// Solidity: event L2MessagingBlockAnchored(uint256 indexed l2Block) -func (_Lineaabi *LineaabiFilterer) WatchL2MessagingBlockAnchored(opts *bind.WatchOpts, sink chan<- *LineaabiL2MessagingBlockAnchored, l2Block []*big.Int) (event.Subscription, error) { - - var l2BlockRule []interface{} - for _, l2BlockItem := range l2Block { - l2BlockRule = append(l2BlockRule, l2BlockItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "L2MessagingBlockAnchored", l2BlockRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiL2MessagingBlockAnchored) - if err := _Lineaabi.contract.UnpackLog(event, "L2MessagingBlockAnchored", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseL2MessagingBlockAnchored is a log parse operation binding the contract event 0x3c116827db9db3a30c1a25db8b0ee4bab9d2b223560209cfd839601b621c726d. -// -// Solidity: event L2MessagingBlockAnchored(uint256 indexed l2Block) -func (_Lineaabi *LineaabiFilterer) ParseL2MessagingBlockAnchored(log types.Log) (*LineaabiL2MessagingBlockAnchored, error) { - event := new(LineaabiL2MessagingBlockAnchored) - if err := _Lineaabi.contract.UnpackLog(event, "L2MessagingBlockAnchored", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiLimitAmountChangedIterator is returned from FilterLimitAmountChanged and is used to iterate over the raw logs and unpacked data for LimitAmountChanged events raised by the Lineaabi contract. -type LineaabiLimitAmountChangedIterator struct { - Event *LineaabiLimitAmountChanged // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiLimitAmountChangedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiLimitAmountChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiLimitAmountChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiLimitAmountChangedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiLimitAmountChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiLimitAmountChanged represents a LimitAmountChanged event raised by the Lineaabi contract. -type LineaabiLimitAmountChanged struct { - AmountChangeBy common.Address - Amount *big.Int - AmountUsedLoweredToLimit bool - UsedAmountResetToZero bool - Raw types.Log // Blockchain specific contextual infos -} - -// FilterLimitAmountChanged is a free log retrieval operation binding the contract event 0xbc3dc0cb5c15c51c81316450d44048838bb478b9809447d01c766a06f3e9f2c8. -// -// Solidity: event LimitAmountChanged(address indexed amountChangeBy, uint256 amount, bool amountUsedLoweredToLimit, bool usedAmountResetToZero) -func (_Lineaabi *LineaabiFilterer) FilterLimitAmountChanged(opts *bind.FilterOpts, amountChangeBy []common.Address) (*LineaabiLimitAmountChangedIterator, error) { - - var amountChangeByRule []interface{} - for _, amountChangeByItem := range amountChangeBy { - amountChangeByRule = append(amountChangeByRule, amountChangeByItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "LimitAmountChanged", amountChangeByRule) - if err != nil { - return nil, err - } - return &LineaabiLimitAmountChangedIterator{contract: _Lineaabi.contract, event: "LimitAmountChanged", logs: logs, sub: sub}, nil -} - -// WatchLimitAmountChanged is a free log subscription operation binding the contract event 0xbc3dc0cb5c15c51c81316450d44048838bb478b9809447d01c766a06f3e9f2c8. -// -// Solidity: event LimitAmountChanged(address indexed amountChangeBy, uint256 amount, bool amountUsedLoweredToLimit, bool usedAmountResetToZero) -func (_Lineaabi *LineaabiFilterer) WatchLimitAmountChanged(opts *bind.WatchOpts, sink chan<- *LineaabiLimitAmountChanged, amountChangeBy []common.Address) (event.Subscription, error) { - - var amountChangeByRule []interface{} - for _, amountChangeByItem := range amountChangeBy { - amountChangeByRule = append(amountChangeByRule, amountChangeByItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "LimitAmountChanged", amountChangeByRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiLimitAmountChanged) - if err := _Lineaabi.contract.UnpackLog(event, "LimitAmountChanged", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseLimitAmountChanged is a log parse operation binding the contract event 0xbc3dc0cb5c15c51c81316450d44048838bb478b9809447d01c766a06f3e9f2c8. -// -// Solidity: event LimitAmountChanged(address indexed amountChangeBy, uint256 amount, bool amountUsedLoweredToLimit, bool usedAmountResetToZero) -func (_Lineaabi *LineaabiFilterer) ParseLimitAmountChanged(log types.Log) (*LineaabiLimitAmountChanged, error) { - event := new(LineaabiLimitAmountChanged) - if err := _Lineaabi.contract.UnpackLog(event, "LimitAmountChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiMessageClaimedIterator is returned from FilterMessageClaimed and is used to iterate over the raw logs and unpacked data for MessageClaimed events raised by the Lineaabi contract. -type LineaabiMessageClaimedIterator struct { - Event *LineaabiMessageClaimed // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiMessageClaimedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiMessageClaimed) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiMessageClaimed) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiMessageClaimedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiMessageClaimedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiMessageClaimed represents a MessageClaimed event raised by the Lineaabi contract. -type LineaabiMessageClaimed struct { - MessageHash [32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterMessageClaimed is a free log retrieval operation binding the contract event 0xa4c827e719e911e8f19393ccdb85b5102f08f0910604d340ba38390b7ff2ab0e. -// -// Solidity: event MessageClaimed(bytes32 indexed _messageHash) -func (_Lineaabi *LineaabiFilterer) FilterMessageClaimed(opts *bind.FilterOpts, _messageHash [][32]byte) (*LineaabiMessageClaimedIterator, error) { - - var _messageHashRule []interface{} - for _, _messageHashItem := range _messageHash { - _messageHashRule = append(_messageHashRule, _messageHashItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "MessageClaimed", _messageHashRule) - if err != nil { - return nil, err - } - return &LineaabiMessageClaimedIterator{contract: _Lineaabi.contract, event: "MessageClaimed", logs: logs, sub: sub}, nil -} - -// WatchMessageClaimed is a free log subscription operation binding the contract event 0xa4c827e719e911e8f19393ccdb85b5102f08f0910604d340ba38390b7ff2ab0e. -// -// Solidity: event MessageClaimed(bytes32 indexed _messageHash) -func (_Lineaabi *LineaabiFilterer) WatchMessageClaimed(opts *bind.WatchOpts, sink chan<- *LineaabiMessageClaimed, _messageHash [][32]byte) (event.Subscription, error) { - - var _messageHashRule []interface{} - for _, _messageHashItem := range _messageHash { - _messageHashRule = append(_messageHashRule, _messageHashItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "MessageClaimed", _messageHashRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiMessageClaimed) - if err := _Lineaabi.contract.UnpackLog(event, "MessageClaimed", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseMessageClaimed is a log parse operation binding the contract event 0xa4c827e719e911e8f19393ccdb85b5102f08f0910604d340ba38390b7ff2ab0e. -// -// Solidity: event MessageClaimed(bytes32 indexed _messageHash) -func (_Lineaabi *LineaabiFilterer) ParseMessageClaimed(log types.Log) (*LineaabiMessageClaimed, error) { - event := new(LineaabiMessageClaimed) - if err := _Lineaabi.contract.UnpackLog(event, "MessageClaimed", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiMessageSentIterator is returned from FilterMessageSent and is used to iterate over the raw logs and unpacked data for MessageSent events raised by the Lineaabi contract. -type LineaabiMessageSentIterator struct { - Event *LineaabiMessageSent // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiMessageSentIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiMessageSent) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiMessageSent) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiMessageSentIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiMessageSentIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiMessageSent represents a MessageSent event raised by the Lineaabi contract. -type LineaabiMessageSent struct { - From common.Address - To common.Address - Fee *big.Int - Value *big.Int - Nonce *big.Int - Calldata []byte - MessageHash [32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterMessageSent is a free log retrieval operation binding the contract event 0xe856c2b8bd4eb0027ce32eeaf595c21b0b6b4644b326e5b7bd80a1cf8db72e6c. -// -// Solidity: event MessageSent(address indexed _from, address indexed _to, uint256 _fee, uint256 _value, uint256 _nonce, bytes _calldata, bytes32 indexed _messageHash) -func (_Lineaabi *LineaabiFilterer) FilterMessageSent(opts *bind.FilterOpts, _from []common.Address, _to []common.Address, _messageHash [][32]byte) (*LineaabiMessageSentIterator, error) { - - var _fromRule []interface{} - for _, _fromItem := range _from { - _fromRule = append(_fromRule, _fromItem) - } - var _toRule []interface{} - for _, _toItem := range _to { - _toRule = append(_toRule, _toItem) - } - - var _messageHashRule []interface{} - for _, _messageHashItem := range _messageHash { - _messageHashRule = append(_messageHashRule, _messageHashItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "MessageSent", _fromRule, _toRule, _messageHashRule) - if err != nil { - return nil, err - } - return &LineaabiMessageSentIterator{contract: _Lineaabi.contract, event: "MessageSent", logs: logs, sub: sub}, nil -} - -// WatchMessageSent is a free log subscription operation binding the contract event 0xe856c2b8bd4eb0027ce32eeaf595c21b0b6b4644b326e5b7bd80a1cf8db72e6c. -// -// Solidity: event MessageSent(address indexed _from, address indexed _to, uint256 _fee, uint256 _value, uint256 _nonce, bytes _calldata, bytes32 indexed _messageHash) -func (_Lineaabi *LineaabiFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<- *LineaabiMessageSent, _from []common.Address, _to []common.Address, _messageHash [][32]byte) (event.Subscription, error) { - - var _fromRule []interface{} - for _, _fromItem := range _from { - _fromRule = append(_fromRule, _fromItem) - } - var _toRule []interface{} - for _, _toItem := range _to { - _toRule = append(_toRule, _toItem) - } - - var _messageHashRule []interface{} - for _, _messageHashItem := range _messageHash { - _messageHashRule = append(_messageHashRule, _messageHashItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "MessageSent", _fromRule, _toRule, _messageHashRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiMessageSent) - if err := _Lineaabi.contract.UnpackLog(event, "MessageSent", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseMessageSent is a log parse operation binding the contract event 0xe856c2b8bd4eb0027ce32eeaf595c21b0b6b4644b326e5b7bd80a1cf8db72e6c. -// -// Solidity: event MessageSent(address indexed _from, address indexed _to, uint256 _fee, uint256 _value, uint256 _nonce, bytes _calldata, bytes32 indexed _messageHash) -func (_Lineaabi *LineaabiFilterer) ParseMessageSent(log types.Log) (*LineaabiMessageSent, error) { - event := new(LineaabiMessageSent) - if err := _Lineaabi.contract.UnpackLog(event, "MessageSent", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Lineaabi contract. -type LineaabiPausedIterator struct { - Event *LineaabiPaused // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiPausedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiPausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiPausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiPaused represents a Paused event raised by the Lineaabi contract. -type LineaabiPaused struct { - MessageSender common.Address - PauseType *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterPaused is a free log retrieval operation binding the contract event 0xab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d. -// -// Solidity: event Paused(address messageSender, uint256 indexed pauseType) -func (_Lineaabi *LineaabiFilterer) FilterPaused(opts *bind.FilterOpts, pauseType []*big.Int) (*LineaabiPausedIterator, error) { - - var pauseTypeRule []interface{} - for _, pauseTypeItem := range pauseType { - pauseTypeRule = append(pauseTypeRule, pauseTypeItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "Paused", pauseTypeRule) - if err != nil { - return nil, err - } - return &LineaabiPausedIterator{contract: _Lineaabi.contract, event: "Paused", logs: logs, sub: sub}, nil -} - -// WatchPaused is a free log subscription operation binding the contract event 0xab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d. -// -// Solidity: event Paused(address messageSender, uint256 indexed pauseType) -func (_Lineaabi *LineaabiFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *LineaabiPaused, pauseType []*big.Int) (event.Subscription, error) { - - var pauseTypeRule []interface{} - for _, pauseTypeItem := range pauseType { - pauseTypeRule = append(pauseTypeRule, pauseTypeItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "Paused", pauseTypeRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiPaused) - if err := _Lineaabi.contract.UnpackLog(event, "Paused", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParsePaused is a log parse operation binding the contract event 0xab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d. -// -// Solidity: event Paused(address messageSender, uint256 indexed pauseType) -func (_Lineaabi *LineaabiFilterer) ParsePaused(log types.Log) (*LineaabiPaused, error) { - event := new(LineaabiPaused) - if err := _Lineaabi.contract.UnpackLog(event, "Paused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiRateLimitInitializedIterator is returned from FilterRateLimitInitialized and is used to iterate over the raw logs and unpacked data for RateLimitInitialized events raised by the Lineaabi contract. -type LineaabiRateLimitInitializedIterator struct { - Event *LineaabiRateLimitInitialized // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiRateLimitInitializedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiRateLimitInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiRateLimitInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiRateLimitInitializedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiRateLimitInitializedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiRateLimitInitialized represents a RateLimitInitialized event raised by the Lineaabi contract. -type LineaabiRateLimitInitialized struct { - PeriodInSeconds *big.Int - LimitInWei *big.Int - CurrentPeriodEnd *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRateLimitInitialized is a free log retrieval operation binding the contract event 0x8f805c372b66240792580418b7328c0c554ae235f0932475c51b026887fe26a9. -// -// Solidity: event RateLimitInitialized(uint256 periodInSeconds, uint256 limitInWei, uint256 currentPeriodEnd) -func (_Lineaabi *LineaabiFilterer) FilterRateLimitInitialized(opts *bind.FilterOpts) (*LineaabiRateLimitInitializedIterator, error) { - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "RateLimitInitialized") - if err != nil { - return nil, err - } - return &LineaabiRateLimitInitializedIterator{contract: _Lineaabi.contract, event: "RateLimitInitialized", logs: logs, sub: sub}, nil -} - -// WatchRateLimitInitialized is a free log subscription operation binding the contract event 0x8f805c372b66240792580418b7328c0c554ae235f0932475c51b026887fe26a9. -// -// Solidity: event RateLimitInitialized(uint256 periodInSeconds, uint256 limitInWei, uint256 currentPeriodEnd) -func (_Lineaabi *LineaabiFilterer) WatchRateLimitInitialized(opts *bind.WatchOpts, sink chan<- *LineaabiRateLimitInitialized) (event.Subscription, error) { - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "RateLimitInitialized") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiRateLimitInitialized) - if err := _Lineaabi.contract.UnpackLog(event, "RateLimitInitialized", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseRateLimitInitialized is a log parse operation binding the contract event 0x8f805c372b66240792580418b7328c0c554ae235f0932475c51b026887fe26a9. -// -// Solidity: event RateLimitInitialized(uint256 periodInSeconds, uint256 limitInWei, uint256 currentPeriodEnd) -func (_Lineaabi *LineaabiFilterer) ParseRateLimitInitialized(log types.Log) (*LineaabiRateLimitInitialized, error) { - event := new(LineaabiRateLimitInitialized) - if err := _Lineaabi.contract.UnpackLog(event, "RateLimitInitialized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiRoleAdminChangedIterator is returned from FilterRoleAdminChanged and is used to iterate over the raw logs and unpacked data for RoleAdminChanged events raised by the Lineaabi contract. -type LineaabiRoleAdminChangedIterator struct { - Event *LineaabiRoleAdminChanged // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiRoleAdminChangedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiRoleAdminChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiRoleAdminChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiRoleAdminChangedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiRoleAdminChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiRoleAdminChanged represents a RoleAdminChanged event raised by the Lineaabi contract. -type LineaabiRoleAdminChanged struct { - Role [32]byte - PreviousAdminRole [32]byte - NewAdminRole [32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRoleAdminChanged is a free log retrieval operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. -// -// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) -func (_Lineaabi *LineaabiFilterer) FilterRoleAdminChanged(opts *bind.FilterOpts, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (*LineaabiRoleAdminChangedIterator, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var previousAdminRoleRule []interface{} - for _, previousAdminRoleItem := range previousAdminRole { - previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) - } - var newAdminRoleRule []interface{} - for _, newAdminRoleItem := range newAdminRole { - newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) - if err != nil { - return nil, err - } - return &LineaabiRoleAdminChangedIterator{contract: _Lineaabi.contract, event: "RoleAdminChanged", logs: logs, sub: sub}, nil -} - -// WatchRoleAdminChanged is a free log subscription operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. -// -// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) -func (_Lineaabi *LineaabiFilterer) WatchRoleAdminChanged(opts *bind.WatchOpts, sink chan<- *LineaabiRoleAdminChanged, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (event.Subscription, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var previousAdminRoleRule []interface{} - for _, previousAdminRoleItem := range previousAdminRole { - previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) - } - var newAdminRoleRule []interface{} - for _, newAdminRoleItem := range newAdminRole { - newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiRoleAdminChanged) - if err := _Lineaabi.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseRoleAdminChanged is a log parse operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. -// -// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) -func (_Lineaabi *LineaabiFilterer) ParseRoleAdminChanged(log types.Log) (*LineaabiRoleAdminChanged, error) { - event := new(LineaabiRoleAdminChanged) - if err := _Lineaabi.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiRoleGrantedIterator is returned from FilterRoleGranted and is used to iterate over the raw logs and unpacked data for RoleGranted events raised by the Lineaabi contract. -type LineaabiRoleGrantedIterator struct { - Event *LineaabiRoleGranted // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiRoleGrantedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiRoleGranted) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiRoleGranted) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiRoleGrantedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiRoleGrantedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiRoleGranted represents a RoleGranted event raised by the Lineaabi contract. -type LineaabiRoleGranted struct { - Role [32]byte - Account common.Address - Sender common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRoleGranted is a free log retrieval operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. -// -// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) -func (_Lineaabi *LineaabiFilterer) FilterRoleGranted(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*LineaabiRoleGrantedIterator, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) - if err != nil { - return nil, err - } - return &LineaabiRoleGrantedIterator{contract: _Lineaabi.contract, event: "RoleGranted", logs: logs, sub: sub}, nil -} - -// WatchRoleGranted is a free log subscription operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. -// -// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) -func (_Lineaabi *LineaabiFilterer) WatchRoleGranted(opts *bind.WatchOpts, sink chan<- *LineaabiRoleGranted, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiRoleGranted) - if err := _Lineaabi.contract.UnpackLog(event, "RoleGranted", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseRoleGranted is a log parse operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. -// -// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) -func (_Lineaabi *LineaabiFilterer) ParseRoleGranted(log types.Log) (*LineaabiRoleGranted, error) { - event := new(LineaabiRoleGranted) - if err := _Lineaabi.contract.UnpackLog(event, "RoleGranted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiRoleRevokedIterator is returned from FilterRoleRevoked and is used to iterate over the raw logs and unpacked data for RoleRevoked events raised by the Lineaabi contract. -type LineaabiRoleRevokedIterator struct { - Event *LineaabiRoleRevoked // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiRoleRevokedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiRoleRevoked) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiRoleRevoked) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiRoleRevokedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiRoleRevokedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiRoleRevoked represents a RoleRevoked event raised by the Lineaabi contract. -type LineaabiRoleRevoked struct { - Role [32]byte - Account common.Address - Sender common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRoleRevoked is a free log retrieval operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. -// -// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) -func (_Lineaabi *LineaabiFilterer) FilterRoleRevoked(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*LineaabiRoleRevokedIterator, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) - if err != nil { - return nil, err - } - return &LineaabiRoleRevokedIterator{contract: _Lineaabi.contract, event: "RoleRevoked", logs: logs, sub: sub}, nil -} - -// WatchRoleRevoked is a free log subscription operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. -// -// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) -func (_Lineaabi *LineaabiFilterer) WatchRoleRevoked(opts *bind.WatchOpts, sink chan<- *LineaabiRoleRevoked, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiRoleRevoked) - if err := _Lineaabi.contract.UnpackLog(event, "RoleRevoked", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseRoleRevoked is a log parse operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. -// -// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) -func (_Lineaabi *LineaabiFilterer) ParseRoleRevoked(log types.Log) (*LineaabiRoleRevoked, error) { - event := new(LineaabiRoleRevoked) - if err := _Lineaabi.contract.UnpackLog(event, "RoleRevoked", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiRollingHashUpdatedIterator is returned from FilterRollingHashUpdated and is used to iterate over the raw logs and unpacked data for RollingHashUpdated events raised by the Lineaabi contract. -type LineaabiRollingHashUpdatedIterator struct { - Event *LineaabiRollingHashUpdated // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiRollingHashUpdatedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiRollingHashUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiRollingHashUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiRollingHashUpdatedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiRollingHashUpdatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiRollingHashUpdated represents a RollingHashUpdated event raised by the Lineaabi contract. -type LineaabiRollingHashUpdated struct { - MessageNumber *big.Int - RollingHash [32]byte - MessageHash [32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRollingHashUpdated is a free log retrieval operation binding the contract event 0xea3b023b4c8680d4b4824f0143132c95476359a2bb70a81d6c5a36f6918f6339. -// -// Solidity: event RollingHashUpdated(uint256 indexed messageNumber, bytes32 indexed rollingHash, bytes32 indexed messageHash) -func (_Lineaabi *LineaabiFilterer) FilterRollingHashUpdated(opts *bind.FilterOpts, messageNumber []*big.Int, rollingHash [][32]byte, messageHash [][32]byte) (*LineaabiRollingHashUpdatedIterator, error) { - - var messageNumberRule []interface{} - for _, messageNumberItem := range messageNumber { - messageNumberRule = append(messageNumberRule, messageNumberItem) - } - var rollingHashRule []interface{} - for _, rollingHashItem := range rollingHash { - rollingHashRule = append(rollingHashRule, rollingHashItem) - } - var messageHashRule []interface{} - for _, messageHashItem := range messageHash { - messageHashRule = append(messageHashRule, messageHashItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "RollingHashUpdated", messageNumberRule, rollingHashRule, messageHashRule) - if err != nil { - return nil, err - } - return &LineaabiRollingHashUpdatedIterator{contract: _Lineaabi.contract, event: "RollingHashUpdated", logs: logs, sub: sub}, nil -} - -// WatchRollingHashUpdated is a free log subscription operation binding the contract event 0xea3b023b4c8680d4b4824f0143132c95476359a2bb70a81d6c5a36f6918f6339. -// -// Solidity: event RollingHashUpdated(uint256 indexed messageNumber, bytes32 indexed rollingHash, bytes32 indexed messageHash) -func (_Lineaabi *LineaabiFilterer) WatchRollingHashUpdated(opts *bind.WatchOpts, sink chan<- *LineaabiRollingHashUpdated, messageNumber []*big.Int, rollingHash [][32]byte, messageHash [][32]byte) (event.Subscription, error) { - - var messageNumberRule []interface{} - for _, messageNumberItem := range messageNumber { - messageNumberRule = append(messageNumberRule, messageNumberItem) - } - var rollingHashRule []interface{} - for _, rollingHashItem := range rollingHash { - rollingHashRule = append(rollingHashRule, rollingHashItem) - } - var messageHashRule []interface{} - for _, messageHashItem := range messageHash { - messageHashRule = append(messageHashRule, messageHashItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "RollingHashUpdated", messageNumberRule, rollingHashRule, messageHashRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiRollingHashUpdated) - if err := _Lineaabi.contract.UnpackLog(event, "RollingHashUpdated", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseRollingHashUpdated is a log parse operation binding the contract event 0xea3b023b4c8680d4b4824f0143132c95476359a2bb70a81d6c5a36f6918f6339. -// -// Solidity: event RollingHashUpdated(uint256 indexed messageNumber, bytes32 indexed rollingHash, bytes32 indexed messageHash) -func (_Lineaabi *LineaabiFilterer) ParseRollingHashUpdated(log types.Log) (*LineaabiRollingHashUpdated, error) { - event := new(LineaabiRollingHashUpdated) - if err := _Lineaabi.contract.UnpackLog(event, "RollingHashUpdated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiSystemMigrationBlockInitializedIterator is returned from FilterSystemMigrationBlockInitialized and is used to iterate over the raw logs and unpacked data for SystemMigrationBlockInitialized events raised by the Lineaabi contract. -type LineaabiSystemMigrationBlockInitializedIterator struct { - Event *LineaabiSystemMigrationBlockInitialized // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiSystemMigrationBlockInitializedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiSystemMigrationBlockInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiSystemMigrationBlockInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiSystemMigrationBlockInitializedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiSystemMigrationBlockInitializedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiSystemMigrationBlockInitialized represents a SystemMigrationBlockInitialized event raised by the Lineaabi contract. -type LineaabiSystemMigrationBlockInitialized struct { - SystemMigrationBlock *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSystemMigrationBlockInitialized is a free log retrieval operation binding the contract event 0x405b3b16b9190c1e995514c13ab4e8e7d895d9103e91c3a8c8f12df6cd50aa2c. -// -// Solidity: event SystemMigrationBlockInitialized(uint256 systemMigrationBlock) -func (_Lineaabi *LineaabiFilterer) FilterSystemMigrationBlockInitialized(opts *bind.FilterOpts) (*LineaabiSystemMigrationBlockInitializedIterator, error) { - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "SystemMigrationBlockInitialized") - if err != nil { - return nil, err - } - return &LineaabiSystemMigrationBlockInitializedIterator{contract: _Lineaabi.contract, event: "SystemMigrationBlockInitialized", logs: logs, sub: sub}, nil -} - -// WatchSystemMigrationBlockInitialized is a free log subscription operation binding the contract event 0x405b3b16b9190c1e995514c13ab4e8e7d895d9103e91c3a8c8f12df6cd50aa2c. -// -// Solidity: event SystemMigrationBlockInitialized(uint256 systemMigrationBlock) -func (_Lineaabi *LineaabiFilterer) WatchSystemMigrationBlockInitialized(opts *bind.WatchOpts, sink chan<- *LineaabiSystemMigrationBlockInitialized) (event.Subscription, error) { - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "SystemMigrationBlockInitialized") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiSystemMigrationBlockInitialized) - if err := _Lineaabi.contract.UnpackLog(event, "SystemMigrationBlockInitialized", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseSystemMigrationBlockInitialized is a log parse operation binding the contract event 0x405b3b16b9190c1e995514c13ab4e8e7d895d9103e91c3a8c8f12df6cd50aa2c. -// -// Solidity: event SystemMigrationBlockInitialized(uint256 systemMigrationBlock) -func (_Lineaabi *LineaabiFilterer) ParseSystemMigrationBlockInitialized(log types.Log) (*LineaabiSystemMigrationBlockInitialized, error) { - event := new(LineaabiSystemMigrationBlockInitialized) - if err := _Lineaabi.contract.UnpackLog(event, "SystemMigrationBlockInitialized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiUnPausedIterator is returned from FilterUnPaused and is used to iterate over the raw logs and unpacked data for UnPaused events raised by the Lineaabi contract. -type LineaabiUnPausedIterator struct { - Event *LineaabiUnPaused // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiUnPausedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiUnPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiUnPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiUnPausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiUnPausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiUnPaused represents a UnPaused event raised by the Lineaabi contract. -type LineaabiUnPaused struct { - MessageSender common.Address - PauseType *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUnPaused is a free log retrieval operation binding the contract event 0xef04ba2036ccaeab3a59717b51d2b9146b0b0904077177f1148a5418bf1eae23. -// -// Solidity: event UnPaused(address messageSender, uint256 indexed pauseType) -func (_Lineaabi *LineaabiFilterer) FilterUnPaused(opts *bind.FilterOpts, pauseType []*big.Int) (*LineaabiUnPausedIterator, error) { - - var pauseTypeRule []interface{} - for _, pauseTypeItem := range pauseType { - pauseTypeRule = append(pauseTypeRule, pauseTypeItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "UnPaused", pauseTypeRule) - if err != nil { - return nil, err - } - return &LineaabiUnPausedIterator{contract: _Lineaabi.contract, event: "UnPaused", logs: logs, sub: sub}, nil -} - -// WatchUnPaused is a free log subscription operation binding the contract event 0xef04ba2036ccaeab3a59717b51d2b9146b0b0904077177f1148a5418bf1eae23. -// -// Solidity: event UnPaused(address messageSender, uint256 indexed pauseType) -func (_Lineaabi *LineaabiFilterer) WatchUnPaused(opts *bind.WatchOpts, sink chan<- *LineaabiUnPaused, pauseType []*big.Int) (event.Subscription, error) { - - var pauseTypeRule []interface{} - for _, pauseTypeItem := range pauseType { - pauseTypeRule = append(pauseTypeRule, pauseTypeItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "UnPaused", pauseTypeRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiUnPaused) - if err := _Lineaabi.contract.UnpackLog(event, "UnPaused", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseUnPaused is a log parse operation binding the contract event 0xef04ba2036ccaeab3a59717b51d2b9146b0b0904077177f1148a5418bf1eae23. -// -// Solidity: event UnPaused(address messageSender, uint256 indexed pauseType) -func (_Lineaabi *LineaabiFilterer) ParseUnPaused(log types.Log) (*LineaabiUnPaused, error) { - event := new(LineaabiUnPaused) - if err := _Lineaabi.contract.UnpackLog(event, "UnPaused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// LineaabiVerifierAddressChangedIterator is returned from FilterVerifierAddressChanged and is used to iterate over the raw logs and unpacked data for VerifierAddressChanged events raised by the Lineaabi contract. -type LineaabiVerifierAddressChangedIterator struct { - Event *LineaabiVerifierAddressChanged // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LineaabiVerifierAddressChangedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(LineaabiVerifierAddressChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(LineaabiVerifierAddressChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *LineaabiVerifierAddressChangedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LineaabiVerifierAddressChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LineaabiVerifierAddressChanged represents a VerifierAddressChanged event raised by the Lineaabi contract. -type LineaabiVerifierAddressChanged struct { - VerifierAddress common.Address - ProofType *big.Int - VerifierSetBy common.Address - OldVerifierAddress common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterVerifierAddressChanged is a free log retrieval operation binding the contract event 0x4a29db3fc6b42bda201e4b4d69ce8d575eeeba5f153509c0d0a342af0f1bd021. -// -// Solidity: event VerifierAddressChanged(address indexed verifierAddress, uint256 indexed proofType, address indexed verifierSetBy, address oldVerifierAddress) -func (_Lineaabi *LineaabiFilterer) FilterVerifierAddressChanged(opts *bind.FilterOpts, verifierAddress []common.Address, proofType []*big.Int, verifierSetBy []common.Address) (*LineaabiVerifierAddressChangedIterator, error) { - - var verifierAddressRule []interface{} - for _, verifierAddressItem := range verifierAddress { - verifierAddressRule = append(verifierAddressRule, verifierAddressItem) - } - var proofTypeRule []interface{} - for _, proofTypeItem := range proofType { - proofTypeRule = append(proofTypeRule, proofTypeItem) - } - var verifierSetByRule []interface{} - for _, verifierSetByItem := range verifierSetBy { - verifierSetByRule = append(verifierSetByRule, verifierSetByItem) - } - - logs, sub, err := _Lineaabi.contract.FilterLogs(opts, "VerifierAddressChanged", verifierAddressRule, proofTypeRule, verifierSetByRule) - if err != nil { - return nil, err - } - return &LineaabiVerifierAddressChangedIterator{contract: _Lineaabi.contract, event: "VerifierAddressChanged", logs: logs, sub: sub}, nil -} - -// WatchVerifierAddressChanged is a free log subscription operation binding the contract event 0x4a29db3fc6b42bda201e4b4d69ce8d575eeeba5f153509c0d0a342af0f1bd021. -// -// Solidity: event VerifierAddressChanged(address indexed verifierAddress, uint256 indexed proofType, address indexed verifierSetBy, address oldVerifierAddress) -func (_Lineaabi *LineaabiFilterer) WatchVerifierAddressChanged(opts *bind.WatchOpts, sink chan<- *LineaabiVerifierAddressChanged, verifierAddress []common.Address, proofType []*big.Int, verifierSetBy []common.Address) (event.Subscription, error) { - - var verifierAddressRule []interface{} - for _, verifierAddressItem := range verifierAddress { - verifierAddressRule = append(verifierAddressRule, verifierAddressItem) - } - var proofTypeRule []interface{} - for _, proofTypeItem := range proofType { - proofTypeRule = append(proofTypeRule, proofTypeItem) - } - var verifierSetByRule []interface{} - for _, verifierSetByItem := range verifierSetBy { - verifierSetByRule = append(verifierSetByRule, verifierSetByItem) - } - - logs, sub, err := _Lineaabi.contract.WatchLogs(opts, "VerifierAddressChanged", verifierAddressRule, proofTypeRule, verifierSetByRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LineaabiVerifierAddressChanged) - if err := _Lineaabi.contract.UnpackLog(event, "VerifierAddressChanged", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseVerifierAddressChanged is a log parse operation binding the contract event 0x4a29db3fc6b42bda201e4b4d69ce8d575eeeba5f153509c0d0a342af0f1bd021. -// -// Solidity: event VerifierAddressChanged(address indexed verifierAddress, uint256 indexed proofType, address indexed verifierSetBy, address oldVerifierAddress) -func (_Lineaabi *LineaabiFilterer) ParseVerifierAddressChanged(log types.Log) (*LineaabiVerifierAddressChanged, error) { - event := new(LineaabiVerifierAddressChanged) - if err := _Lineaabi.contract.UnpackLog(event, "VerifierAddressChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/node/pkg/watchers/evm/watcher.go b/node/pkg/watchers/evm/watcher.go index cb91502fa0..a6fbf4277a 100644 --- a/node/pkg/watchers/evm/watcher.go +++ b/node/pkg/watchers/evm/watcher.go @@ -2,7 +2,6 @@ package evm import ( "context" - "errors" "fmt" "math" "math/big" @@ -136,10 +135,6 @@ type ( ccqBatchSize int64 ccqBackfillCache bool ccqLogger *zap.Logger - - // These parameters are currently only used for Linea and should be set via SetLineaParams() - lineaRollUpUrl string - lineaRollUpContract string } pendingKey struct { @@ -246,19 +241,6 @@ func (w *Watcher) Run(parentCtx context.Context) error { p2p.DefaultRegistry.AddErrorCount(w.chainID, 1) return fmt.Errorf("dialing eth client failed: %w", err) } - } else if w.chainID == vaa.ChainIDLinea { - baseConnector, err := connectors.NewEthereumBaseConnector(timeout, w.networkName, w.url, w.contract, logger) - if err != nil { - ethConnectionErrors.WithLabelValues(w.networkName, "dial_error").Inc() - p2p.DefaultRegistry.AddErrorCount(w.chainID, 1) - return fmt.Errorf("dialing eth client failed: %w", err) - } - w.ethConn, err = connectors.NewLineaConnector(ctx, logger, baseConnector, w.lineaRollUpUrl, w.lineaRollUpContract) - if err != nil { - ethConnectionErrors.WithLabelValues(w.networkName, "dial_error").Inc() - p2p.DefaultRegistry.AddErrorCount(w.chainID, 1) - return fmt.Errorf("failed to create Linea poller: %w", err) - } } else { // Everything else is instant finality. logger.Info("assuming instant finality") @@ -556,6 +538,7 @@ func (w *Watcher) Run(parentCtx context.Context) error { zap.String("msgId", pLock.message.MessageIDString()), zap.Stringer("txHash", pLock.message.TxHash), zap.Stringer("blockHash", key.BlockHash), + zap.Uint64("target_blockNum", pLock.height), zap.Stringer("current_blockNum", ev.Number), zap.Stringer("finality", ev.Finality), zap.Stringer("current_blockHash", currentHash), @@ -573,6 +556,7 @@ func (w *Watcher) Run(parentCtx context.Context) error { zap.String("msgId", pLock.message.MessageIDString()), zap.Stringer("txHash", pLock.message.TxHash), zap.Stringer("blockHash", key.BlockHash), + zap.Uint64("target_blockNum", pLock.height), zap.Stringer("current_blockNum", ev.Number), zap.Stringer("finality", ev.Finality), zap.Stringer("current_blockHash", currentHash), @@ -602,6 +586,7 @@ func (w *Watcher) Run(parentCtx context.Context) error { zap.String("msgId", pLock.message.MessageIDString()), zap.Stringer("txHash", pLock.message.TxHash), zap.Stringer("blockHash", key.BlockHash), + zap.Uint64("target_blockNum", pLock.height), zap.Stringer("current_blockNum", ev.Number), zap.Stringer("finality", ev.Finality), zap.Stringer("current_blockHash", currentHash), @@ -618,6 +603,7 @@ func (w *Watcher) Run(parentCtx context.Context) error { zap.String("msgId", pLock.message.MessageIDString()), zap.Stringer("txHash", pLock.message.TxHash), zap.Stringer("blockHash", key.BlockHash), + zap.Uint64("target_blockNum", pLock.height), zap.Stringer("current_blockNum", ev.Number), zap.Stringer("finality", ev.Finality), zap.Stringer("current_blockHash", currentHash), @@ -631,6 +617,7 @@ func (w *Watcher) Run(parentCtx context.Context) error { zap.String("msgId", pLock.message.MessageIDString()), zap.Stringer("txHash", pLock.message.TxHash), zap.Stringer("blockHash", key.BlockHash), + zap.Uint64("target_blockNum", pLock.height), zap.Stringer("current_blockNum", ev.Number), zap.Stringer("finality", ev.Finality), zap.Stringer("current_blockHash", currentHash), @@ -745,8 +732,7 @@ func (w *Watcher) getFinality(ctx context.Context) (bool, bool, error) { safe = true // The following chains have their own specialized finalizers. - } else if w.chainID == vaa.ChainIDCelo || - w.chainID == vaa.ChainIDLinea { + } else if w.chainID == vaa.ChainIDCelo { return false, false, nil // Polygon now supports polling for finalized but not safe. @@ -759,6 +745,10 @@ func (w *Watcher) getFinality(ctx context.Context) (bool, bool, error) { } else if w.chainID == vaa.ChainIDScroll { finalized = true + // As of 9/06/2024 Linea supports polling for finalized but not safe. + } else if w.chainID == vaa.ChainIDLinea { + finalized = true + // The following chains support instant finality. } else if w.chainID == vaa.ChainIDAvalanche || w.chainID == vaa.ChainIDBerachain || // Berachain supports instant finality: https://docs.berachain.com/faq/ @@ -983,22 +973,3 @@ func (w *Watcher) waitForBlockTime(ctx context.Context, logger *zap.Logger, errC func msgIdFromLogEvent(chainID vaa.ChainID, ev *ethabi.AbiLogMessagePublished) string { return fmt.Sprintf("%v/%v/%v", uint16(chainID), PadAddress(ev.Sender), ev.Sequence) } - -// SetLineaParams is used to enable polling on Linea using the roll up contract on Ethereum. -func (w *Watcher) SetLineaParams(lineaRollUpUrl string, lineaRollUpContract string) error { - if w.chainID != vaa.ChainIDLinea { - return errors.New("function only allowed for Linea") - } - if w.unsafeDevMode && lineaRollUpUrl == "" && lineaRollUpContract == "" { - return nil - } - if lineaRollUpUrl == "" { - return fmt.Errorf("lineaRollUpUrl must be set") - } - if lineaRollUpContract == "" { - return fmt.Errorf("lineaRollUpContract must be set") - } - w.lineaRollUpUrl = lineaRollUpUrl - w.lineaRollUpContract = lineaRollUpContract - return nil -} diff --git a/node/pkg/watchers/solana/client.go b/node/pkg/watchers/solana/client.go index 9612d1337f..6dae0a2506 100644 --- a/node/pkg/watchers/solana/client.go +++ b/node/pkg/watchers/solana/client.go @@ -30,6 +30,7 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "github.com/wormhole-foundation/wormhole/sdk/vaa" "go.uber.org/zap" + "go.uber.org/zap/zapcore" "nhooyr.io/websocket" ) @@ -56,6 +57,12 @@ type ( // subscriber id subId string + // whLogPrefix is used to search for possible Wormhole messages. + whLogPrefix string + + // msgObservedLogLevel is used to log Pythnet observations as debugs but Solana observations as infos. + msgObservedLogLevel zapcore.Level + // latestFinalizedBlockNumber is the latest block processed by this watcher. latestBlockNumber uint64 latestBlockNumberMu sync.Mutex @@ -215,21 +222,27 @@ func NewSolanaWatcher( queryReqC <-chan *query.PerChainQueryInternal, queryResponseC chan<- *query.PerChainQueryResponseInternal, ) *SolanaWatcher { + msgObservedLogLevel := zapcore.InfoLevel + if chainID == vaa.ChainIDPythNet { + msgObservedLogLevel = zapcore.DebugLevel + } return &SolanaWatcher{ - rpcUrl: rpcUrl, - wsUrl: wsUrl, - contract: contractAddress, - rawContract: rawContract, - msgC: msgC, - obsvReqC: obsvReqC, - commitment: commitment, - rpcClient: rpc.New(rpcUrl), - readinessSync: common.MustConvertChainIdToReadinessSyncing(chainID), - chainID: chainID, - networkName: chainID.String(), - queryReqC: queryReqC, - queryResponseC: queryResponseC, - ccqConfig: query.GetPerChainConfig(chainID), + rpcUrl: rpcUrl, + wsUrl: wsUrl, + contract: contractAddress, + rawContract: rawContract, + whLogPrefix: fmt.Sprintf("Program %s", rawContract), + msgObservedLogLevel: msgObservedLogLevel, + msgC: msgC, + obsvReqC: obsvReqC, + commitment: commitment, + rpcClient: rpc.New(rpcUrl), + readinessSync: common.MustConvertChainIdToReadinessSyncing(chainID), + chainID: chainID, + networkName: chainID.String(), + queryReqC: queryReqC, + queryResponseC: queryResponseC, + ccqConfig: query.GetPerChainConfig(chainID), } } @@ -393,13 +406,15 @@ func (s *SolanaWatcher) Run(ctx context.Context) error { rangeStart := lastSlot + 1 rangeEnd := slot - logger.Debug("fetched current Solana height", - zap.String("commitment", string(s.commitment)), - zap.Uint64("slot", slot), - zap.Uint64("lastSlot", lastSlot), - zap.Uint64("pendingSlots", slot-lastSlot), - zap.Uint64("from", rangeStart), zap.Uint64("to", rangeEnd), - zap.Duration("took", time.Since(start))) + if logger.Level().Enabled(zapcore.DebugLevel) { + logger.Debug("fetched current Solana height", + zap.String("commitment", string(s.commitment)), + zap.Uint64("slot", slot), + zap.Uint64("lastSlot", lastSlot), + zap.Uint64("pendingSlots", slot-lastSlot), + zap.Uint64("from", rangeStart), zap.Uint64("to", rangeEnd), + zap.Duration("took", time.Since(start))) + } // Requesting each slot for slot := rangeStart; slot <= rangeEnd; slot++ { @@ -442,10 +457,12 @@ func (s *SolanaWatcher) retryFetchBlock(ctx context.Context, logger *zap.Logger, time.Sleep(retryDelay) - logger.Debug("retrying block", - zap.Uint64("slot", slot), - zap.String("commitment", string(s.commitment)), - zap.Uint("retry", retry)) + if logger.Level().Enabled(zapcore.DebugLevel) { + logger.Debug("retrying block", + zap.Uint64("slot", slot), + zap.String("commitment", string(s.commitment)), + zap.Uint("retry", retry)) + } common.RunWithScissors(ctx, s.errC, "retryFetchBlock", func(ctx context.Context) error { s.retryFetchBlock(ctx, logger, slot, retry+1, isReobservation) @@ -455,10 +472,12 @@ func (s *SolanaWatcher) retryFetchBlock(ctx context.Context, logger *zap.Logger, } func (s *SolanaWatcher) fetchBlock(ctx context.Context, logger *zap.Logger, slot uint64, emptyRetry uint, isReobservation bool) (ok bool) { - logger.Debug("requesting block", - zap.Uint64("slot", slot), - zap.String("commitment", string(s.commitment)), - zap.Uint("empty_retry", emptyRetry)) + if logger.Level().Enabled(zapcore.DebugLevel) { + logger.Debug("requesting block", + zap.Uint64("slot", slot), + zap.String("commitment", string(s.commitment)), + zap.Uint("empty_retry", emptyRetry)) + } rCtx, cancel := context.WithTimeout(ctx, rpcTimeout) defer cancel() start := time.Now() @@ -477,9 +496,11 @@ func (s *SolanaWatcher) fetchBlock(ctx context.Context, logger *zap.Logger, slot if err != nil { var rpcErr *jsonrpc.RPCError if errors.As(err, &rpcErr) && (rpcErr.Code == -32007 /* SLOT_SKIPPED */ || rpcErr.Code == -32004 /* BLOCK_NOT_AVAILABLE */) { - logger.Debug("empty slot", zap.Uint64("slot", slot), - zap.Int("code", rpcErr.Code), - zap.String("commitment", string(s.commitment))) + if logger.Level().Enabled(zapcore.DebugLevel) { + logger.Debug("empty slot", zap.Uint64("slot", slot), + zap.Int("code", rpcErr.Code), + zap.String("commitment", string(s.commitment))) + } // TODO(leo): clean this up once we know what's happening // https://github.com/solana-labs/solana/issues/20370 @@ -500,8 +521,10 @@ func (s *SolanaWatcher) fetchBlock(ctx context.Context, logger *zap.Logger, slot } return true } else { - logger.Debug("failed to request block", zap.Error(err), zap.Uint64("slot", slot), - zap.String("commitment", string(s.commitment))) + if logger.Level().Enabled(zapcore.DebugLevel) { + logger.Debug("failed to request block", zap.Error(err), zap.Uint64("slot", slot), + zap.String("commitment", string(s.commitment))) + } p2p.DefaultRegistry.AddErrorCount(s.chainID, 1) solanaConnectionErrors.WithLabelValues(s.networkName, string(s.commitment), "get_confirmed_block_error").Inc() } @@ -514,32 +537,33 @@ func (s *SolanaWatcher) fetchBlock(ctx context.Context, logger *zap.Logger, slot return false } - logger.Debug("fetched block", - zap.Uint64("slot", slot), - zap.Int("num_tx", len(out.Transactions)), - zap.Duration("took", time.Since(start)), - zap.String("commitment", string(s.commitment))) + if logger.Level().Enabled(zapcore.DebugLevel) { + logger.Debug("fetched block", + zap.Uint64("slot", slot), + zap.Int("num_tx", len(out.Transactions)), + zap.Duration("took", time.Since(start)), + zap.String("commitment", string(s.commitment))) + } s.updateLatestBlock(slot) for txNum, txRpc := range out.Transactions { if txRpc.Meta.Err != nil { - logger.Debug("Transaction failed, skipping it", - zap.Uint64("slot", slot), - zap.Int("txNum", txNum), - zap.String("err", fmt.Sprint(txRpc.Meta.Err)), - ) + if logger.Level().Enabled(zapcore.DebugLevel) { + logger.Debug("Transaction failed, skipping it", + zap.Uint64("slot", slot), + zap.Int("txNum", txNum), + zap.String("err", fmt.Sprint(txRpc.Meta.Err)), + ) + } continue } // If the logs don't contain the contract address, skip the transaction. // ex: "Program 3u8hJUVTA4jH1wYAyUur7FFZVQ8H635K3tSHHF4ssjQ5 invoke [2]", - var ( - possiblyWormhole bool - whLogPrefix = fmt.Sprintf("Program %s", s.rawContract) - ) + var possiblyWormhole bool for i := 0; i < len(txRpc.Meta.LogMessages) && !possiblyWormhole; i++ { - possiblyWormhole = strings.HasPrefix(txRpc.Meta.LogMessages[i], whLogPrefix) + possiblyWormhole = strings.HasPrefix(txRpc.Meta.LogMessages[i], s.whLogPrefix) } if !possiblyWormhole { continue @@ -577,10 +601,12 @@ func (s *SolanaWatcher) fetchBlock(ctx context.Context, logger *zap.Logger, slot continue } - logger.Debug("found Wormhole transaction", - zap.Stringer("signature", signature), - zap.Uint64("slot", slot), - zap.String("commitment", string(s.commitment))) + if logger.Level().Enabled(zapcore.DebugLevel) { + logger.Debug("found Wormhole transaction", + zap.Stringer("signature", signature), + zap.Uint64("slot", slot), + zap.String("commitment", string(s.commitment))) + } // Find top-level instructions for i, inst := range tx.Message.Instructions { @@ -594,11 +620,13 @@ func (s *SolanaWatcher) fetchBlock(ctx context.Context, logger *zap.Logger, slot zap.String("commitment", string(s.commitment)), zap.Binary("data", inst.Data)) } else if found { - logger.Debug("found a top-level Wormhole instruction", - zap.Int("idx", i), - zap.Stringer("signature", signature), - zap.Uint64("slot", slot), - zap.String("commitment", string(s.commitment))) + if logger.Level().Enabled(zapcore.DebugLevel) { + logger.Debug("found a top-level Wormhole instruction", + zap.Int("idx", i), + zap.Stringer("signature", signature), + zap.Uint64("slot", slot), + zap.String("commitment", string(s.commitment))) + } } } @@ -613,18 +641,20 @@ func (s *SolanaWatcher) fetchBlock(ctx context.Context, logger *zap.Logger, slot zap.Uint64("slot", slot), zap.String("commitment", string(s.commitment))) } else if found { - logger.Debug("found an inner Wormhole instruction", - zap.Int("idx", i), - zap.Stringer("signature", signature), - zap.Uint64("slot", slot), - zap.String("commitment", string(s.commitment))) + if logger.Level().Enabled(zapcore.DebugLevel) { + logger.Debug("found an inner Wormhole instruction", + zap.Int("idx", i), + zap.Stringer("signature", signature), + zap.Uint64("slot", slot), + zap.String("commitment", string(s.commitment))) + } } } } } - if emptyRetry > 0 { - logger.Warn("SOLANA BUG: skipped or unavailable block retrieved on retry attempt", + if emptyRetry > 0 && logger.Level().Enabled(zapcore.DebugLevel) { + logger.Debug("skipped or unavailable block retrieved on retry attempt", zap.Uint("empty_retry", emptyRetry), zap.Uint64("slot", slot), zap.String("commitment", string(s.commitment))) @@ -657,8 +687,10 @@ func (s *SolanaWatcher) processInstruction(ctx context.Context, logger *zap.Logg return false, fmt.Errorf("failed to deserialize instruction data: %w", err) } - logger.Debug("post message data", zap.Any("deserialized_data", data), - zap.Stringer("signature", signature), zap.Uint64("slot", slot), zap.Int("idx", idx)) + if logger.Level().Enabled(zapcore.DebugLevel) { + logger.Debug("post message data", zap.Any("deserialized_data", data), + zap.Stringer("signature", signature), zap.Uint64("slot", slot), zap.Int("idx", idx)) + } level, err := data.ConsistencyLevel.Commitment() if err != nil { @@ -672,8 +704,10 @@ func (s *SolanaWatcher) processInstruction(ctx context.Context, logger *zap.Logg // The second account in a well-formed Wormhole instruction is the VAA program account. acc := tx.Message.AccountKeys[inst.Accounts[1]] - logger.Debug("fetching VAA account", zap.Stringer("acc", acc), - zap.Stringer("signature", signature), zap.Uint64("slot", slot), zap.Int("idx", idx)) + if logger.Level().Enabled(zapcore.DebugLevel) { + logger.Debug("fetching VAA account", zap.Stringer("acc", acc), + zap.Stringer("signature", signature), zap.Uint64("slot", slot), zap.Int("idx", idx)) + } common.RunWithScissors(ctx, s.errC, "retryFetchMessageAccount", func(ctx context.Context) error { s.retryFetchMessageAccount(ctx, logger, acc, slot, 0, isReobservation) @@ -754,11 +788,13 @@ func (s *SolanaWatcher) fetchMessageAccount(ctx context.Context, logger *zap.Log return false } - logger.Debug("found valid VAA account", - zap.Uint64("slot", slot), - zap.String("commitment", string(s.commitment)), - zap.Stringer("account", acc), - zap.Binary("data", data)) + if logger.Level().Enabled(zapcore.DebugLevel) { + logger.Debug("found valid VAA account", + zap.Uint64("slot", slot), + zap.String("commitment", string(s.commitment)), + zap.Stringer("account", acc), + zap.Binary("data", data)) + } s.processMessageAccount(logger, data, acc, isReobservation) return false @@ -851,7 +887,9 @@ func (s *SolanaWatcher) processMessageAccount(logger *zap.Logger, data []byte, a zap.Stringer("account", acc), zap.String("message commitment", string(commitment)), zap.String("watcher commitment", string(s.commitment)), ) } else { - logger.Debug("skipping message which does not match the watcher commitment", zap.Stringer("account", acc), zap.String("message commitment", string(commitment)), zap.String("watcher commitment", string(s.commitment))) + if logger.Level().Enabled(zapcore.DebugLevel) { + logger.Debug("skipping message which does not match the watcher commitment", zap.Stringer("account", acc), zap.String("message commitment", string(commitment)), zap.String("watcher commitment", string(s.commitment))) + } return } } @@ -897,16 +935,19 @@ func (s *SolanaWatcher) processMessageAccount(logger *zap.Logger, data []byte, a solanaMessagesConfirmed.WithLabelValues(s.networkName).Inc() - logger.Debug("message observed", - zap.Stringer("account", acc), - zap.Time("timestamp", observation.Timestamp), - zap.Uint32("nonce", observation.Nonce), - zap.Uint64("sequence", observation.Sequence), - zap.Stringer("emitter_chain", observation.EmitterChain), - zap.Stringer("emitter_address", observation.EmitterAddress), - zap.Binary("payload", observation.Payload), - zap.Uint8("consistency_level", observation.ConsistencyLevel), - ) + if logger.Level().Enabled(s.msgObservedLogLevel) { + logger.Log(s.msgObservedLogLevel, "message observed", + zap.Stringer("account", acc), + zap.Time("timestamp", observation.Timestamp), + zap.Uint32("nonce", observation.Nonce), + zap.Uint64("sequence", observation.Sequence), + zap.Stringer("emitter_chain", observation.EmitterChain), + zap.Stringer("emitter_address", observation.EmitterAddress), + zap.Bool("isReobservation", isReobservation), + zap.Binary("payload", observation.Payload), + zap.Uint8("consistency_level", observation.ConsistencyLevel), + ) + } s.msgC <- observation } diff --git a/sdk/mainnet_consts.go b/sdk/mainnet_consts.go index 3afca58c6e..968a718842 100644 --- a/sdk/mainnet_consts.go +++ b/sdk/mainnet_consts.go @@ -12,12 +12,9 @@ import ( // // This list is duplicated a couple times across the codebase - make to to update all copies! var PublicRPCEndpoints = []string{ - "https://wormhole-v2-mainnet-api.certus.one", - "https://wormhole.inotel.ro", "https://wormhole-v2-mainnet-api.mcf.rocks", "https://wormhole-v2-mainnet-api.chainlayer.network", "https://wormhole-v2-mainnet-api.staking.fund", - "https://wormhole-v2-mainnet.01node.com", } type ( diff --git a/whitepapers/0001_generic_message_passing.md b/whitepapers/0001_generic_message_passing.md index 4c494e14d2..3a7c146b40 100644 --- a/whitepapers/0001_generic_message_passing.md +++ b/whitepapers/0001_generic_message_passing.md @@ -1,7 +1,5 @@ # Generic Message Passing -[TOC] - ## Objective To refactor Wormhole into a fully generic cross chain messaging protocol and remove any application-specific @@ -72,7 +70,7 @@ following problems, leaving them for future design iterations: ## Overview -We simplify the design of Wormhole to only provide generic **signed attestations of finalized chain state**. +We simplify the design of Wormhole to only provide generic **signed attestations of chain state**. Attestations can be requested by any contract by publishing a message, which is then picked up and signed by the Wormhole guardian set. The signed attestation will be published on the Wormhole P2P network. @@ -80,7 +78,7 @@ Delivering the message to a contract on the target chain is shifted to the highe ## Detailed Design -The new, generic VAA struct would look like this: +The following defines the generic VAA version 1 struct: ```go // VAA is a verifiable action approval of the Wormhole protocol. @@ -91,7 +89,7 @@ VAA struct { // carry metadata used to interpret the observation. It is not signed. // Protocol version of the entire VAA. - Version uint8 + Version uint8 = 1 // GuardianSetIndex is the index of the guardian set that signed this VAA. // Signatures are verified against the public keys in the guardian set. @@ -103,8 +101,8 @@ VAA struct { // Signatures contain a list of signatures made by the guardian set. Signatures []*Signature - // -------------------------------------------------------------------- - // OBSERVATION - these fields are *deterministically* set by the + // -------------------------------------------------------------------- + // BODY - these fields are *deterministically* set by the // Guardian nodes when making an observation. They uniquely identify // a message and are used for replay protection. // @@ -112,16 +110,12 @@ VAA struct { // // These fields are part of the signed digest. - // Timestamp of the observed message (for most chains, this - // identifies the block that contains the message transaction). - Timestamp time.Time + // Timestamp, in seconds, of the observed message. + // This timestamp is derived from the block, rather than the + // time the block was seen by the guardians. + Timestamp time.Time // uint32 - // Nonce of the VAA, must be set to random bytes. Nonces - // prevent collisions where one emitter publishes identical - // messages within one block (= timestamp). - // - // It is not suitable as a global identifier - - // use the (chain, emitter, sequence) tuple instead. + // Nonce (provided by the on-chain integrator). Nonce uint32 // <-- NEW // EmitterChain the VAA was emitted on. Set by the guardian node @@ -129,7 +123,8 @@ VAA struct { EmitterChain ChainID // <-- NEW // EmitterAddress of the contract that emitted the message. Set by - // the guardian node according to protocol metadata. + // the core contract and read by guardian node according to protocol + // metadata. EmitterAddress Address // <-- NEW // Sequence number of the message. Automatically set and @@ -139,20 +134,19 @@ VAA struct { // Tracked per (EmitterChain, EmitterAddress) tuple. Sequence uint64 // <-- NEW - // Level of consistency requested by the emitter. - // - // The semantic meaning of this field is specific to the target - // chain (like a commitment level on Solana, number of - // confirmations on Ethereum, or no meaning with instant finality). - ConsistencyLevel uint8 // <-- NEW + // Level of consistency requested by the emitter. + // + // The semantic meaning of this field is specific to the emitter + // chain. See Consistency Levels below. + ConsistencyLevel uint8 // <-- NEW - // Payload of the message. + // Payload of the message (provided by the on-chain integrator). Payload []byte // <-- NEW } // ChainID of a Wormhole chain. These are defined in the guardian node // for each chain it talks to. -ChainID uint8 +ChainID uint16 // Address is a Wormhole protocol address. It contains the native chain's address. // If the address data type of a chain is < 32 bytes, the value is zero-padded on the left. @@ -160,10 +154,10 @@ Address [32]byte // Signature of a single guardian. Signature struct { -// Index of the validator in the guardian set. -Index uint8 -// Signature bytes. -Signature [65]byte + // Index of the validator in the guardian set. + Index uint8 + // Signature bytes. + Signature [65]byte } ``` @@ -182,6 +176,46 @@ Governance operations are executed by calling a dedicated governance method on t All contracts will be expected to support online upgrades. This implies changes to the Ethereum and Terra contracts to make them upgradeable. +### Consistency Levels + +The consistency level represents the integrator's request to withhold from signing a message until a specified +commitment level is reached on a given chain, or alternatively to leverage faster-than-finality messaging. +This differentiation is critically important on chains which do not have instant finality, such as Ethereum, +to ensure that the transaction which resulted in a Wormhole message was not 'rolled back' due to a chain +reorganization. Each [guardian watcher](../node/pkg/watchers/README.md) is responsible for defining the consistency +level meanings and enforcing them. + +#### EVM + +- `200` - publish immediately +- `201` - `safe`, if available, otherwise falls back to `finalized` +- anything else is treated as `finalized` + +Historically, the EVM watcher specified the consistency level as the block depth (from `latest`) the transaction +should reach before publishing. However, since [The Merge](https://ethereum.org/en/roadmap/merge/), adoption of +`safe` and `finalized` block tags have become widespread and offer a more exact measure of commitment. + +#### Solana + +The Solana core contract provides an enum for `ConsistencyLevel` used by the instruction data: + +- `0` - Confirmed +- `1` - Finalized + +However, the resulting account and subsequent VAA will have: + +- `1` - Confirmed +- `32` - Finalized + +#### Others + +All other chains do not offer configurable consistency levels and this field will be `0`. + +## Caveats + +While the `//` is commonly used to identify VAAs, the hash of the observation body is used +to uniquely identify a VAA for replay protection. + ## Related Technologies In this section, Wormhole is compared to related technologies on the market. We have carefully evaluated all existing @@ -250,3 +284,59 @@ A peg zone is the closest analogy to Wormhole in the IBC model, with some import - Instead of relying on inclusion proofs, we use a multisig scheme which is easier to understand and audit and cheaper to verify on all connected chains. The extra guarantees offered by an inclusion proof are not needed in the Wormhole network, since it merely shuttles data between chains, each of which have provable and immutable history. + +## Security Considerations + +When integrating with Wormhole, it is important to understand the trust stack inherited based on each field of the VAA. + +```go +byte version // VAA Version +u32 guardian_set_index // Indicates which guardian set is signing +u8 len_signatures // Number of signatures stored +[]signature signatures // Collection of guardian signatures +``` + +These fields are **not** part of the signed observation but are used by the verifying core bridge to determine if the +designated guardian set is active and if the corresponding guardian signatures are valid. You always additionally +inherit the trust assumptions of any verification mechanism you use, such as the core bridge on a given chain and its +runtime. + +The following fields all inherit the [trust assumptions](../SECURITY.md#trust-assumptions) of the **Guardians**. + +```go +u16 emitter_chain // The id of the chain that emitted the message +``` + +The emitter chain is solely determined by the guardian. Only the chain RPC nodes which are connected by a quorum of +guardians for a given chain ID can emit verifiable messages with this chain ID. + +Therefore, the following fields inherit the trust assumptions of the **Guardians and the emitter chain**'s RPC node. + +```go +u32 timestamp // The timestamp of the block this message was published in +``` + +The timestamp is provided directly by the RPC node. + +Based on the particular chain implementation, the core bridge emits a message with the following properties, which +are interpreted by the guardian and inherit the trust assumptions of the **Guardians, emitter chain, and core bridge** +implementation. + +```go +[32]byte emitter_address // The contract address (wormhole formatted) that called the core contract +u64 sequence // The auto incrementing integer that represents the number of messages published by this emitter +``` + +The core bridge is responsible for identifying the calling contract address and incrementing its sequence number. + +The remaining fields are controlled by the calling contract, and therefore inherit **all of the above trust assumptions +in addition to those of the emitter contract**. + +```go +u32 nonce // +u8 consistency_level // The consistency level (finality) required by this emitter +[]byte payload // arbitrary bytes containing the data to be acted on +``` + +These five fields are interpreted by the guardian which must not proceed with the signing process until the specified +`consistency_level` has been reached, as applicable. diff --git a/whitepapers/0009_guardian_key.md b/whitepapers/0009_guardian_key.md index 7124755cd4..658bf07c4d 100644 --- a/whitepapers/0009_guardian_key.md +++ b/whitepapers/0009_guardian_key.md @@ -14,10 +14,16 @@ The Guardian Key is used to: 1. Sign gossip messages 1. heartbeat - 2. governor config and governor status - 3. observation request -2. Sign Observations + 1. governor config and governor status + 1. observation request +1. Sign Observations 1. Version 1 VAAs +1. Sign Guardian identification + 1. Wormchain account registration +1. Sign Accountant observations + 1. Token Bridge + 1. NTT +1. Sign Query responses ## Detailed Design @@ -35,3 +41,24 @@ Rationale - Gossip messages cannot be confused with other gossip messages because the message type prefix is prepended. - Gossip messages cannot be confused with observations because observations utilize a double-Keccak256 and the payload is enforced to be `>=34` bytes. + +## Prefixes Used + + + +```go +acct_sub_obsfig_000000000000000000| // token bridge accountant observation +ntt_acct_sub_obsfig_00000000000000| // ntt accountant observation +governor_config_000000000000000000| // gossip governor config +governor_status_000000000000000000| // gossip governor status +heartbeat| // gossip heartbeat +signed_observation_request| // gossip signed observation request +mainnet_query_request_000000000000| // query request (mainnet, not signed by guardian) +testnet_query_request_000000000000| // query request (testnet, not signed by guardian) +devnet_query_request_0000000000000| // query request (devnet, not signed by guardian) +query_response_0000000000000000000| // query response +query_response_0000000000000000000| // query response +signed_wormchain_address_00000000| // wormchain register account as guardian +``` + +