Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
blockscout/test/support/factories/internal_transaction_factor...

21 lines
725 B

defmodule Explorer.InternalTransactionFactory do
defmacro __using__(_opts) do
quote do
def internal_transaction_factory do
%Explorer.InternalTransaction{
index: Enum.random(0..9),
call_type: Enum.random(["call", "creates", "calldelegate"]),
trace_address: [Enum.random(0..4), Enum.random(0..4)],
from_address_id: insert(:address).id,
to_address_id: insert(:address).id,
transaction_id: insert(:transaction).id,
value: Enum.random(1..100_000),
gas: Enum.random(1..100_000),
gas_used: Enum.random(1..100_000),
input: sequence("0x"),
output: sequence("0x"),
}
end
end
end
end