Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain that no struct can be created as transaction input other than some exceptions #91

Merged
merged 10 commits into from
Aug 27, 2024
18 changes: 18 additions & 0 deletions book/src/concepts/what-is-a-transaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,24 @@ Transactions consist of:
- a gas object - the `Coin` object used to pay for the transaction;
- gas price and budget - the cost of the transaction;

## Inputs

Transaction inputs are the arguments for the transaction and are split between 2 types:
- Pure arguments: These are mostly [primitive types](../move-basics/primitive-types.html) with some
extra additions. A pure argument can be:
- [`bool`](../move-basics/primitive-types.html#booleans).
- [integer](../move-basics/primitive-types.html#integers) (`u8`, `u16`, `u32`, `u64`, `u128`, `u256`).
- [`address`](../move-basics/address.html).
- [`std::string::String`](../move-basics/string.html), UTF8 strings.
- [`std::ascii::String`](../move-basics/string.html#ascii-strings), ASCII strings.
- [`vector<T>`](../move-basics/vector.html), where `T` is a pure type.
- [`std::option::Option<T>`](../move-basics/option.html), where `T` is a pure type.
- [`std::object::ID`](../storage/uid-and-id.html), typically points to an object. See also [What is an Object](../object/object-model.html).
- Object arguments: These are objects or references of objects that the transaction will access. An
object argument needs to be either a shared object, a frozen object, or an object that the
transaction sender owns, in order for the transaction to be successfull.
For more see [Object Model](../object/index.html).

## Commands

Sui transactions may consist of multiple commands. Each command is a single built-in command (like
Expand Down
Loading