Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
instance_sol_gen.hpp
Go to the documentation of this file.
1
#pragma once
5
inline
void
output_instance
(std::ostream& os,
6
std::string
const
& vk_class_name,
7
std::string
const
& base_class_name,
8
std::string
const
& class_name)
9
{
10
11
std::string vk_filename =
"../keys/"
+ vk_class_name +
".sol"
;
12
std::string base_filename =
"../"
+ base_class_name +
".sol"
;
13
14
// clang-format off
15
os <<
16
"// SPDX-License-Identifier: Apache-2.0\n"
17
"// Copyright 2023 Aztec\n"
18
"pragma solidity >=0.8.4;\n\n"
19
"import {"
<< vk_class_name <<
" as VK} from \""
<< vk_filename <<
"\";\n"
20
"import {"
<< base_class_name <<
" as BASE} from \""
<< base_filename <<
"\";\n\n"
21
"contract "
<< class_name <<
" is BASE {\n"
22
" function getVerificationKeyHash() public pure override(BASE) returns (bytes32) {\n"
23
" return VK.verificationKeyHash();\n"
24
" }\n\n"
25
" function loadVerificationKey(uint256 vk, uint256 _omegaInverseLoc) internal pure virtual override(BASE) {\n"
26
" VK.loadVerificationKey(vk, _omegaInverseLoc);\n"
27
" }\n"
28
"}\n"
;
29
30
os <<
std::flush
;
31
}
output_instance
void output_instance(std::ostream &os, std::string const &vk_class_name, std::string const &base_class_name, std::string const &class_name)
Definition
instance_sol_gen.hpp:5
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
src
barretenberg
solidity_helpers
utils
instance_sol_gen.hpp
Generated by
1.9.8