Skip to content

Commit

Permalink
Explain that no struct can be created as transaction input other than…
Browse files Browse the repository at this point in the history
… some exceptions (#91)
  • Loading branch information
nikos-terzo authored Aug 27, 2024
1 parent b2860f3 commit 7f76864
Showing 1 changed file with 18 additions and 0 deletions.
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

0 comments on commit 7f76864

Please sign in to comment.