Line data Source code
1 : /**
2 : * Copyright Soramitsu Co., Ltd. All Rights Reserved.
3 : * SPDX-License-Identifier: Apache-2.0
4 : */
5 :
6 : #include "interfaces/commands/transfer_asset.hpp"
7 :
8 : namespace shared_model {
9 : namespace interface {
10 :
11 : std::string TransferAsset::toString() const {
12 3 : return detail::PrettyStringBuilder()
13 3 : .init("TransferAsset")
14 3 : .append("src_account_id", srcAccountId())
15 3 : .append("dest_account_id", destAccountId())
16 3 : .append("asset_id", assetId())
17 3 : .append("description", description())
18 3 : .append("amount", amount().toString())
19 3 : .finalize();
20 0 : }
21 :
22 : bool TransferAsset::operator==(const ModelType &rhs) const {
23 0 : return srcAccountId() == rhs.srcAccountId()
24 0 : and destAccountId() == rhs.destAccountId()
25 0 : and assetId() == rhs.assetId() and amount() == rhs.amount()
26 0 : and description() == rhs.description();
27 : }
28 :
29 : } // namespace interface
30 : } // namespace shared_model
|