iota_graphql_rpc/types/transaction_metadata.rs
1// Copyright (c) Mysten Labs, Inc.
2// Modifications Copyright (c) 2024 IOTA Stiftung
3// SPDX-License-Identifier: Apache-2.0
4
5use async_graphql::*;
6
7use crate::types::{iota_address::IotaAddress, object::ObjectRef, uint53::UInt53};
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
11/// list, it is substituted with a mock Coin object, `gasPrice` defaults to the
12/// reference gas price, `gasBudget` defaults to the max gas budget and
13/// `gasSponsor` defaults to the sender.
14#[derive(Clone, Debug, PartialEq, Eq, InputObject)]
15pub(crate) struct TransactionMetadata {
16 pub sender: Option<IotaAddress>,
17 pub gas_price: Option<UInt53>,
18 pub gas_objects: Option<Vec<ObjectRef>>,
19 pub gas_budget: Option<UInt53>,
20 pub gas_sponsor: Option<IotaAddress>,
21}