Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
eth_address.cpp
Go to the documentation of this file.
1
#include "
barretenberg/avm_fuzzer/mutations/basic_types/eth_address.hpp
"
2
3
#include "
barretenberg/avm_fuzzer/mutations/basic_types/field.hpp
"
4
#include "
barretenberg/vm2/common/aztec_types.hpp
"
5
6
using
bb::avm2::EthAddress
;
7
using
bb::avm2::FF
;
8
9
namespace
{
10
11
EthAddress
ff_to_eth_address(
const
FF
& field)
12
{
13
return
EthAddress
(
static_cast<
uint256_t
>
(field).
slice
(0,
MAX_ETH_ADDRESS_BIT_SIZE
));
14
}
15
16
}
// namespace
17
18
EthAddress
generate_random_eth_address
(
std::mt19937_64
& rng)
19
{
20
return
ff_to_eth_address(
generate_random_field
(rng));
21
}
generate_random_field
FF generate_random_field(std::mt19937_64 &rng)
Definition
field.cpp:25
field.hpp
MAX_ETH_ADDRESS_BIT_SIZE
#define MAX_ETH_ADDRESS_BIT_SIZE
Definition
aztec_constants.hpp:4
aztec_types.hpp
bb::numeric::uint256_t
Definition
uint256.hpp:32
generate_random_eth_address
EthAddress generate_random_eth_address(std::mt19937_64 &rng)
Definition
eth_address.cpp:18
eth_address.hpp
bb::avm2::FF
AvmFlavorSettings::FF FF
Definition
field.hpp:10
bb::avm2::EthAddress
FF EthAddress
Definition
aztec_types.hpp:23
bb::slice
C slice(C const &container, size_t start)
Definition
container.hpp:9
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
bb::field< bb::Bn254FrParams >
src
barretenberg
avm_fuzzer
mutations
basic_types
eth_address.cpp
Generated by
1.9.8