19 std::shared_ptr<InstanceEnvironmentFactory> env_factory,
20 std::shared_ptr<storage::trie::TrieStorage> storage,
21 std::shared_ptr<crypto::Hasher> hasher)
22 : env_factory_{std::move(env_factory)},
30 gsl::span<const uint8_t> code)
const {
31 std::vector<uint8_t> code_vec{code.begin(), code.end()};
34 if (res.has_value()) {
35 return std::unique_ptr<Module>(std::move(res.value()));
std::shared_ptr< InstanceEnvironmentFactory > env_factory_
std::shared_ptr< storage::trie::TrieStorage > storage_
outcome::result< std::unique_ptr< Module > > make(gsl::span< const uint8_t > code) const override
ModuleFactoryImpl(std::shared_ptr< InstanceEnvironmentFactory > env_factory, std::shared_ptr< storage::trie::TrieStorage > storage, std::shared_ptr< crypto::Hasher > hasher)
std::shared_ptr< crypto::Hasher > hasher_
static outcome::result< std::unique_ptr< ModuleImpl > > createFromCode(const std::vector< uint8_t > &code, std::shared_ptr< const InstanceEnvironmentFactory > env_factory_, const common::Hash256 &code_hash)