Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
abi_data_handler.hpp
Go to the documentation of this file.
1#pragma once
2
6
7namespace sysio {
8 namespace chain {
9 struct abi_serializer;
10 }
11
12 namespace trace_api {
13
20 public:
21 explicit abi_data_handler( exception_handler except_handler )
22 :except_handler( std::move( except_handler ) )
23 {
24 }
25
31 void add_abi( const chain::name& name, const chain::abi_def& abi );
32
40 std::tuple<fc::variant, std::optional<fc::variant>> serialize_to_variant(const std::variant<action_trace_v0, action_trace_v1> & action, const yield_function& yield );
41
46 public:
47 explicit shared_provider(const std::shared_ptr<abi_data_handler>& handler)
49 {}
50
51 std::tuple<fc::variant, std::optional<fc::variant>> serialize_to_variant( const std::variant<action_trace_v0, action_trace_v1> & action, const yield_function& yield ) {
52 return handler->serialize_to_variant(action, yield);
53 }
54
55 std::shared_ptr<abi_data_handler> handler;
56 };
57
58 private:
59 std::map<chain::name, std::shared_ptr<chain::abi_serializer>> abi_serializer_by_account;
60 exception_handler except_handler;
61 };
62} }
shared_provider(const std::shared_ptr< abi_data_handler > &handler)
std::tuple< fc::variant, std::optional< fc::variant > > serialize_to_variant(const std::variant< action_trace_v0, action_trace_v1 > &action, const yield_function &yield)
abi_data_handler(exception_handler except_handler)
void add_abi(const chain::name &name, const chain::abi_def &abi)
std::tuple< fc::variant, std::optional< fc::variant > > serialize_to_variant(const std::variant< action_trace_v0, action_trace_v1 > &action, const yield_function &yield)
Definition name.hpp:106
Immutable except for fc::from_variant.
Definition name.hpp:43