parent
357a7d1a83
commit
d8fd9b2d20
@ -1,15 +1,15 @@ |
||||
defmodule Explorer.Chain.Zkevm.BatchTransaction do |
||||
defmodule Explorer.Chain.PolygonZkevm.BatchTransaction do |
||||
@moduledoc "Models a list of transactions related to a batch for zkEVM." |
||||
|
||||
use Explorer.Schema |
||||
|
||||
alias Explorer.Chain.{Hash, Transaction} |
||||
alias Explorer.Chain.Zkevm.TransactionBatch |
||||
alias Explorer.Chain.PolygonZkevm.TransactionBatch |
||||
|
||||
@required_attrs ~w(batch_number hash)a |
||||
|
||||
@primary_key false |
||||
typed_schema "zkevm_batch_l2_transactions" do |
||||
typed_schema "polygon_zkevm_batch_l2_transactions" do |
||||
belongs_to(:batch, TransactionBatch, foreign_key: :batch_number, references: :number, type: :integer, null: false) |
||||
|
||||
belongs_to(:l2_transaction, Transaction, |
@ -1,15 +1,15 @@ |
||||
defmodule Explorer.Chain.Zkevm.LifecycleTransaction do |
||||
defmodule Explorer.Chain.PolygonZkevm.LifecycleTransaction do |
||||
@moduledoc "Models an L1 lifecycle transaction for zkEVM." |
||||
|
||||
use Explorer.Schema |
||||
|
||||
alias Explorer.Chain.Hash |
||||
alias Explorer.Chain.Zkevm.TransactionBatch |
||||
alias Explorer.Chain.PolygonZkevm.TransactionBatch |
||||
|
||||
@required_attrs ~w(id hash is_verify)a |
||||
|
||||
@primary_key false |
||||
typed_schema "zkevm_lifecycle_l1_transactions" do |
||||
typed_schema "polygon_zkevm_lifecycle_l1_transactions" do |
||||
field(:id, :integer, primary_key: true, null: false) |
||||
field(:hash, Hash.Full, null: false) |
||||
field(:is_verify, :boolean, null: false) |
@ -1,17 +1,17 @@ |
||||
defmodule Explorer.Chain.Zkevm.TransactionBatch do |
||||
defmodule Explorer.Chain.PolygonZkevm.TransactionBatch do |
||||
@moduledoc "Models a batch of transactions for zkEVM." |
||||
|
||||
use Explorer.Schema |
||||
|
||||
alias Explorer.Chain.Hash |
||||
alias Explorer.Chain.Zkevm.{BatchTransaction, LifecycleTransaction} |
||||
alias Explorer.Chain.PolygonZkevm.{BatchTransaction, LifecycleTransaction} |
||||
|
||||
@optional_attrs ~w(sequence_id verify_id)a |
||||
|
||||
@required_attrs ~w(number timestamp l2_transactions_count global_exit_root acc_input_hash state_root)a |
||||
|
||||
@primary_key false |
||||
typed_schema "zkevm_transaction_batches" do |
||||
typed_schema "polygon_zkevm_transaction_batches" do |
||||
field(:number, :integer, primary_key: true, null: false) |
||||
field(:timestamp, :utc_datetime_usec) |
||||
field(:l2_transactions_count, :integer) |
Loading…
Reference in new issue