Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DaMandal0rian committed May 6, 2024
1 parent 037b776 commit cb5e0b5
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions apps/explorer/lib/explorer/chain/zksync/batch_transaction.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,19 @@ defmodule Explorer.Chain.ZkSync.BatchTransaction do

@required_attrs ~w(batch_number hash)a

@type t :: %__MODULE__{
batch_number: non_neg_integer(),
batch: %Ecto.Association.NotLoaded{} | TransactionBatch.t() | nil,
hash: Hash.t(),
l2_transaction: %Ecto.Association.NotLoaded{} | Transaction.t() | nil
}

@primary_key false
schema "zksync_batch_l2_transactions" do
belongs_to(:batch, TransactionBatch, foreign_key: :batch_number, references: :number, type: :integer)
belongs_to(:l2_transaction, Transaction, foreign_key: :hash, primary_key: true, references: :hash, type: Hash.Full)

belongs_to(:l2_transaction, Transaction,
foreign_key: :hash,
primary_key: true,
references: :hash,
type: Hash.Full,
null: false
)

timestamps(null: false)
timestamps()
end

@doc """
Expand Down

0 comments on commit cb5e0b5

Please sign in to comment.