sui_graphql_rpc/types/transaction_metadata.rs
1// Copyright (c) Mysten Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4use super::object::ObjectRef;
5use super::sui_address::SuiAddress;
6use super::uint53::UInt53;
7use async_graphql::*;
8
9/// The optional extra data a user can provide to a transaction dry run.
10/// `sender` defaults to `0x0`. If `gasObjects` is not present, or is an empty list,
11/// it is substituted with a mock Coin object, `gasPrice` defaults to the reference
12/// gas price, `gasBudget` defaults to the max gas budget and `gasSponsor` defaults
13/// to the sender.
14#[derive(Clone, Debug, PartialEq, Eq, InputObject)]
15pub(crate) struct TransactionMetadata {
16 pub sender: Option<SuiAddress>,
17 pub gas_price: Option<UInt53>,
18 pub gas_objects: Option<Vec<ObjectRef>>,
19 pub gas_budget: Option<UInt53>,
20 pub gas_sponsor: Option<SuiAddress>,
21}