1
// Copyright © 2017-2020 Trust Wallet.
2
//
3
// This file is part of Trust. The full Trust copyright notice, including
4
// terms governing use, modification, and redistribution, is contained in the
5
// file LICENSE at the root of the source code distribution tree.
6

7
#pragma once
8

9
#include <cstdint>
10
#include <stdint.h>
11
#include <vector>
12

13
#include "Address.h"
14
#include "../uint256.h"
15

16
namespace TW::Harmony {
17

18 1
class Transaction {
19
  public:
20
    uint256_t nonce;
21
    uint256_t gasPrice;
22
    uint256_t gasLimit;
23
    uint256_t fromShardID;
24
    uint256_t toShardID;
25
    Address to;
26
    uint256_t amount;
27
    std::vector<uint8_t> payload;
28

29
    // Signature values
30 1
    uint256_t v = uint256_t();
31 1
    uint256_t r = uint256_t();
32 1
    uint256_t s = uint256_t();
33

34 1
    Transaction(uint256_t nonce, uint256_t gasPrice, uint256_t gasLimit, uint256_t fromShardID,
35
                uint256_t toShardID, Address to, uint256_t amount, const Data& payload)
36 1
        : nonce(std::move(nonce))
37 1
        , gasPrice(std::move(gasPrice))
38 1
        , gasLimit(std::move(gasLimit))
39 1
        , fromShardID(std::move(fromShardID))
40 1
        , toShardID(std::move(toShardID))
41 1
        , to(std::move(to))
42 1
        , amount(std::move(amount))
43 1
        , payload(std::move(payload)) {}
44
};
45

46
} // namespace TW::Harmony

Read our documentation on viewing source code .

Loading