diff --git a/.gitignore b/.gitignore index 8b5e6850c7d..30ecf96a717 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,8 @@ docs/content/references/framework/** lcov.info **/venv/ + +# iota-private-network +docker/iota-private-network/data +docker/iota-private-network/configs/validators/validator* +docker/iota-private-network/configs/genesis/genesis.blob \ No newline at end of file diff --git a/apps/wallet/configs/webpack/webpack.config.common.ts b/apps/wallet/configs/webpack/webpack.config.common.ts index 57c3c5c4a4c..4e59e3b9cde 100644 --- a/apps/wallet/configs/webpack/webpack.config.common.ts +++ b/apps/wallet/configs/webpack/webpack.config.common.ts @@ -33,7 +33,7 @@ function generateDateVersion(patch: number) { } const WALLET_BETA = process.env.WALLET_BETA === 'true'; -const PATCH_VERISON = Number(process.env.PATCH_VERSION) || 0; +const PATCH_VERSION = Number(process.env.PATCH_VERSION) || 0; const SDK_ROOT = resolve(__dirname, '..', '..', '..', '..', 'sdk'); const PROJECT_ROOT = resolve(__dirname, '..', '..'); @@ -99,7 +99,7 @@ async function generateAliasFromTs() { const commonConfig: () => Promise = async () => { const alias = await generateAliasFromTs(); - const walletVersionDetails = generateDateVersion(PATCH_VERISON); + const walletVersionDetails = generateDateVersion(PATCH_VERSION); const sentryAuthToken = process.env.SENTRY_AUTH_TOKEN; return { context: SRC_ROOT, diff --git a/apps/wallet/src/background/accounts-finder/accounts-finder.ts b/apps/wallet/src/background/accounts-finder/accounts-finder.ts index d523fe86773..7899b699194 100644 --- a/apps/wallet/src/background/accounts-finder/accounts-finder.ts +++ b/apps/wallet/src/background/accounts-finder/accounts-finder.ts @@ -31,7 +31,7 @@ export async function findAccounts( getBalance: GetBalanceCallback, gasTypeArg: string, ): Promise { - // TODO: first check that accounts: Account[] is correctly sorted, if not, throw exception or somethintg + // TODO: first check that accounts: Account[] is correctly sorted, if not, throw exception or something // Check new addresses for existing accounts if (addressGapLimit > 0) { for (const account of accounts) { diff --git a/apps/wallet/src/background/storage-migration.ts b/apps/wallet/src/background/storage-migration.ts index c5497cc95a9..a78813e380e 100644 --- a/apps/wallet/src/background/storage-migration.ts +++ b/apps/wallet/src/background/storage-migration.ts @@ -11,7 +11,7 @@ const MIGRATION_DONE_STORAGE_KEY = 'storage-migration-done'; let statusCache: Status | null = null; export async function getStatus() { - // placeholde for migration status, always returns ready + // placeholder for migration status, always returns ready if (statusCache) { return statusCache; } diff --git a/apps/wallet/src/ui/app/pages/accounts/manage/AccountGroup.tsx b/apps/wallet/src/ui/app/pages/accounts/manage/AccountGroup.tsx index 7df5077313c..403c85b4ae8 100644 --- a/apps/wallet/src/ui/app/pages/accounts/manage/AccountGroup.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/manage/AccountGroup.tsx @@ -41,7 +41,7 @@ export function getGroupTitle(aGroupAccount: SerializedUIAccount) { return ACCOUNT_TYPE_TO_LABEL[aGroupAccount?.type] || ''; } -// todo: we probbaly have some duplication here with the various FooterLink / ButtonOrLink +// todo: we probably have some duplication here with the various FooterLink / ButtonOrLink // components - we should look to add these to base components somewhere const FooterLink = forwardRef( ({ children, to, ...props }, ref) => { diff --git a/crates/iota-aws-orchestrator/assets/plot.py b/crates/iota-aws-orchestrator/assets/plot.py index d3cc090b244..a30f6f08511 100644 --- a/crates/iota-aws-orchestrator/assets/plot.py +++ b/crates/iota-aws-orchestrator/assets/plot.py @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/crates/iota-bridge/src/iota_syncer.rs b/crates/iota-bridge/src/iota_syncer.rs index 73dd6ccdb89..4c4b8c47457 100644 --- a/crates/iota-bridge/src/iota_syncer.rs +++ b/crates/iota-bridge/src/iota_syncer.rs @@ -81,7 +81,7 @@ where async fn run_event_listening_task( // The module where interested events are defined. - // Moudle is always of bridge package 0x9. + // Module is always of bridge package 0x9. module: Identifier, mut cursor: EventID, events_sender: mysten_metrics::metered_channel::Sender<(Identifier, Vec)>, diff --git a/crates/iota-bridge/src/orchestrator.rs b/crates/iota-bridge/src/orchestrator.rs index 03755adb099..6b178ae217a 100644 --- a/crates/iota-bridge/src/orchestrator.rs +++ b/crates/iota-bridge/src/orchestrator.rs @@ -217,7 +217,7 @@ mod tests { #[tokio::test] async fn test_iota_watcher_task() { - // Note: this test may fail beacuse of the following reasons: + // Note: this test may fail because of the following reasons: // the IotaEvent's struct tag does not match the ones in events.rs let (iota_events_tx, iota_events_rx, _eth_events_tx, eth_events_rx, iota_client, store) = @@ -268,7 +268,7 @@ mod tests { #[tokio::test] async fn test_eth_watcher_task() { - // Note: this test may fail beacuse of the following reasons: + // Note: this test may fail because of the following reasons: // 1. Log and BridgeAction returned from `get_test_log_and_action` are not in // sync // 2. Log returned from `get_test_log_and_action` is not parseable log (not diff --git a/crates/iota-config/src/node.rs b/crates/iota-config/src/node.rs index 8cdadcc76af..b3ecef25370 100644 --- a/crates/iota-config/src/node.rs +++ b/crates/iota-config/src/node.rs @@ -8,7 +8,6 @@ use std::{ path::{Path, PathBuf}, sync::Arc, time::Duration, - usize, }; use anyhow::Result; diff --git a/crates/iota-core/src/authority.rs b/crates/iota-core/src/authority.rs index 44d75f7769f..7a867e12274 100644 --- a/crates/iota-core/src/authority.rs +++ b/crates/iota-core/src/authority.rs @@ -3566,12 +3566,12 @@ impl AuthorityState { .rev() .skip_while(|d| cursor.is_some() && Some(*d) != cursor) .skip(usize::from(cursor.is_some())); - return Ok(iter.take(limit.unwrap_or(usize::max_value())).collect()); + return Ok(iter.take(limit.unwrap_or(usize::MAX)).collect()); } else { let iter = iter .skip_while(|d| cursor.is_some() && Some(*d) != cursor) .skip(usize::from(cursor.is_some())); - return Ok(iter.take(limit.unwrap_or(usize::max_value())).collect()); + return Ok(iter.take(limit.unwrap_or(usize::MAX)).collect()); } } self.get_indexes()? diff --git a/crates/iota-core/src/authority/test_authority_builder.rs b/crates/iota-core/src/authority/test_authority_builder.rs index da3f2b18d8e..0f411d826f2 100644 --- a/crates/iota-core/src/authority/test_authority_builder.rs +++ b/crates/iota-core/src/authority/test_authority_builder.rs @@ -223,10 +223,7 @@ impl<'a> TestAuthorityBuilder<'a> { None, ) .unwrap(); - let expensive_safety_checks = match self.expensive_safety_checks { - None => ExpensiveSafetyCheckConfig::default(), - Some(config) => config, - }; + let expensive_safety_checks = self.expensive_safety_checks.unwrap_or_default(); let cache = Arc::new(ExecutionCache::new_for_tests( authority_store.clone(), ®istry, diff --git a/crates/iota-core/src/transaction_manager.rs b/crates/iota-core/src/transaction_manager.rs index debf136ef28..b8fc4a6963b 100644 --- a/crates/iota-core/src/transaction_manager.rs +++ b/crates/iota-core/src/transaction_manager.rs @@ -68,6 +68,7 @@ pub struct TransactionManager { #[derive(Clone, Debug)] pub struct PendingCertificateStats { // The time this certificate enters transaction manager. + #[cfg(test)] pub enqueue_time: Instant, // The time this certificate becomes ready for execution. pub ready_time: Option, @@ -554,6 +555,7 @@ impl TransactionManager { expected_effects_digest, waiting_input_objects: input_object_keys, stats: PendingCertificateStats { + #[cfg(test)] enqueue_time: pending_cert_enqueue_time, ready_time: None, }, diff --git a/crates/iota-framework/docs/iota-framework/kiosk.md b/crates/iota-framework/docs/iota-framework/kiosk.md index 17d50068613..b4467450dae 100644 --- a/crates/iota-framework/docs/iota-framework/kiosk.md +++ b/crates/iota-framework/docs/iota-framework/kiosk.md @@ -276,7 +276,7 @@ A capability which locks an item and gives a permission to purchase it from a Kiosk for any price no less than min_price. Allows exclusive listing: only bearer of the PurchaseCap can -purchase the asset. However, the capablity should be used +purchase the asset. However, the capability should be used carefully as losing it would lock the asset in the Kiosk. The main application for the PurchaseCap is building extensions diff --git a/crates/iota-framework/packages/iota-framework/sources/kiosk/kiosk.move b/crates/iota-framework/packages/iota-framework/sources/kiosk/kiosk.move index 970dcf1dfb6..164d8c809a9 100644 --- a/crates/iota-framework/packages/iota-framework/sources/kiosk/kiosk.move +++ b/crates/iota-framework/packages/iota-framework/sources/kiosk/kiosk.move @@ -163,7 +163,7 @@ module iota::kiosk { /// purchase it from a `Kiosk` for any price no less than `min_price`. /// /// Allows exclusive listing: only bearer of the `PurchaseCap` can - /// purchase the asset. However, the capablity should be used + /// purchase the asset. However, the capability should be used /// carefully as losing it would lock the asset in the `Kiosk`. /// /// The main application for the `PurchaseCap` is building extensions diff --git a/crates/iota-framework/packages/move-stdlib/tests/vector_tests.move b/crates/iota-framework/packages/move-stdlib/tests/vector_tests.move index 4ff07ddd6c3..3c8b569fad5 100644 --- a/crates/iota-framework/packages/move-stdlib/tests/vector_tests.move +++ b/crates/iota-framework/packages/move-stdlib/tests/vector_tests.move @@ -433,9 +433,9 @@ module std::vector_tests { assert!(index == 1, 1); } - // index_of will return the index first occurence that is equal + // index_of will return the index first occurrence that is equal #[test] - fun index_of_nonempty_has_multiple_occurences() { + fun index_of_nonempty_has_multiple_occurrences() { let mut v = vector[]; v.push_back(false); v.push_back(true); diff --git a/crates/iota-graphql-rpc/docs/examples.md b/crates/iota-graphql-rpc/docs/examples.md index e04cf3a81cf..e186b5db8ef 100644 --- a/crates/iota-graphql-rpc/docs/examples.md +++ b/crates/iota-graphql-rpc/docs/examples.md @@ -32,32 +32,32 @@ ####   [Event Connection](#524280) ####   [Filter By Emitting Package Module And Event Type](#524281) ####   [Filter By Sender](#524282) -### [Name Service](#9) -####   [Name Service](#589815) -### [Object](#10) -####   [Object](#655350) -### [Object Connection](#11) -####   [Filter Object Ids](#720885) -####   [Filter On Generic Type](#720886) -####   [Filter On Type](#720887) -####   [Filter Owner](#720888) -####   [Object Connection](#720889) -### [Owner](#12) -####   [Dynamic Field](#786420) -####   [Dynamic Field Connection](#786421) -####   [Dynamic Object Field](#786422) -####   [Owner](#786423) -### [Protocol Configs](#13) -####   [Key Value](#851955) -####   [Key Value Feature Flag](#851956) -####   [Specific Config](#851957) -####   [Specific Feature Flag](#851958) -### [Service Config](#14) -####   [Service Config](#917490) -### [Stake Connection](#15) -####   [Stake Connection](#983025) -### [Iota System State Summary](#16) -####   [Iota System State Summary](#1048560) +### [Iota System State Summary](#9) +####   [Iota System State Summary](#589815) +### [Name Service](#10) +####   [Name Service](#655350) +### [Object](#11) +####   [Object](#720885) +### [Object Connection](#12) +####   [Filter Object Ids](#786420) +####   [Filter On Generic Type](#786421) +####   [Filter On Type](#786422) +####   [Filter Owner](#786423) +####   [Object Connection](#786424) +### [Owner](#13) +####   [Dynamic Field](#851955) +####   [Dynamic Field Connection](#851956) +####   [Dynamic Object Field](#851957) +####   [Owner](#851958) +### [Protocol Configs](#14) +####   [Key Value](#917490) +####   [Key Value Feature Flag](#917491) +####   [Specific Config](#917492) +####   [Specific Feature Flag](#917493) +### [Service Config](#15) +####   [Service Config](#983025) +### [Stake Connection](#16) +####   [Stake Connection](#1048560) ### [Transaction Block](#17) ####   [Transaction Block](#1114095) ####   [Transaction Block Kind](#1114096) @@ -748,8 +748,51 @@ >} ## -## Name Service +## Iota System State Summary ### +### Iota System State Summary +#### Get the latest iota system state data + +>
{
+>  epoch {
+>    storageFund {
+>      totalObjectStorageRebates
+>      nonRefundableBalance
+>    }
+>    safeMode {
+>      enabled
+>      gasSummary {
+>         computationCost
+>         storageCost
+>         storageRebate
+>         nonRefundableStorageFee
+>      }
+>    }
+>    systemStateVersion
+>    systemParameters {
+>      durationMs
+>      stakeSubsidyStartEpoch
+>      minValidatorCount
+>      maxValidatorCount
+>      minValidatorJoiningStake
+>      validatorLowStakeThreshold
+>      validatorVeryLowStakeThreshold
+>      validatorLowStakeGracePeriod
+>    }
+>    systemStakeSubsidy {
+>      balance
+>      distributionCounter
+>      currentDistributionAmount
+>      periodLength
+>      decreaseRate
+>
+>    }
+>  }
+>}
+ +## +## Name Service +### ### Name Service >
{
@@ -771,9 +814,9 @@
 >  }
 >}
-## +## ## Object -### +### ### Object >
{
@@ -808,9 +851,9 @@
 >  }
 >}
-## +## ## Object Connection -### +### ### Filter Object Ids #### Filter on objectIds @@ -844,7 +887,7 @@ > } >} -### +### ### Filter On Generic Type >
{
@@ -861,7 +904,7 @@
 >  }
 >}
-### +### ### Filter On Type >
{
@@ -880,7 +923,7 @@
 >  }
 >}
-### +### ### Filter Owner #### Filter on owner @@ -914,7 +957,7 @@ > } >} -### +### ### Object Connection >
{
@@ -938,9 +981,9 @@
 >  }
 >}
-## +## ## Owner -### +### ### Dynamic Field >
fragment DynamicFieldValueSelection on DynamicFieldValue {
@@ -995,7 +1038,7 @@
 >  }
 >}
-### +### ### Dynamic Field Connection >
fragment DynamicFieldValueSelection on DynamicFieldValue {
@@ -1052,7 +1095,7 @@
 >  }
 >}
-### +### ### Dynamic Object Field >
fragment DynamicFieldValueSelection on DynamicFieldValue {
@@ -1104,7 +1147,7 @@
 >  }
 >}
-### +### ### Owner >
{
@@ -1115,9 +1158,9 @@
 >  }
 >}
-## +## ## Protocol Configs -### +### ### Key Value #### Select the key and value of the protocol configuration @@ -1130,7 +1173,7 @@ > } >} -### +### ### Key Value Feature Flag #### Select the key and value of the feature flag @@ -1143,7 +1186,7 @@ > } >} -### +### ### Specific Config #### Select the key and value of the specific protocol configuration, in this case `max_move_identifier_len` @@ -1156,7 +1199,7 @@ > } >} -### +### ### Specific Feature Flag >
{
@@ -1168,9 +1211,9 @@
 >  }
 >}
-## +## ## Service Config -### +### ### Service Config #### Get the configuration of the running service @@ -1188,9 +1231,9 @@ > } >} -## +## ## Stake Connection -### +### ### Stake Connection #### Get all the staked objects for this address and all the active validators at the epoch when the stake became active @@ -1232,49 +1275,6 @@ > } >} -## -## Iota System State Summary -### -### Iota System State Summary -#### Get the latest iota system state data - ->
{
->  epoch {
->    storageFund {
->      totalObjectStorageRebates
->      nonRefundableBalance
->    }
->    safeMode {
->      enabled
->      gasSummary {
->         computationCost
->         storageCost
->         storageRebate
->         nonRefundableStorageFee
->      }
->    }
->    systemStateVersion
->    systemParameters {
->      durationMs
->      stakeSubsidyStartEpoch
->      minValidatorCount
->      maxValidatorCount
->      minValidatorJoiningStake
->      validatorLowStakeThreshold
->      validatorVeryLowStakeThreshold
->      validatorLowStakeGracePeriod
->    }
->    systemStakeSubsidy {
->      balance
->      distributionCounter
->      currentDistributionAmount
->      periodLength
->      decreaseRate
->
->    }
->  }
->}
- ## ## Transaction Block ### diff --git a/crates/iota-graphql-rpc/schema/current_progress_schema.graphql b/crates/iota-graphql-rpc/schema/current_progress_schema.graphql index a4aa2356361..1cb4669df03 100644 --- a/crates/iota-graphql-rpc/schema/current_progress_schema.graphql +++ b/crates/iota-graphql-rpc/schema/current_progress_schema.graphql @@ -4,7 +4,8 @@ type ActiveJwk { """ iss: String! """ - The string (Key ID) that identifies the JWK among a set of JWKs, (RFC 7517, Section 4.5). + The string (Key ID) that identifies the JWK among a set of JWKs, (RFC + 7517, Section 4.5). """ kid: String! """ @@ -59,7 +60,8 @@ type ActiveJwkEdge { } """ -The 32-byte address that is an account address (corresponding to a public key). +The 32-byte address that is an account address (corresponding to a public +key). """ type Address implements IOwner { address: IotaAddress! @@ -68,8 +70,8 @@ type Address implements IOwner { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this address. If type is not supplied, - it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this address. If + type is not supplied, it defaults to `0x2::iota::IOTA`. """ balance(type: String): Balance """ @@ -79,7 +81,8 @@ type Address implements IOwner { """ The coin objects for this address. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ @@ -87,17 +90,19 @@ type Address implements IOwner { """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this address. + The domain explicitly configured as the default domain pointing to this + address. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this address. These grant the owner the capability to - manage the associated domain. + The IotansRegistration NFTs owned by this address. These grant the owner + the capability to manage the associated domain. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! """ - Similar behavior to the `transactionBlocks` in Query but supporting the additional - `AddressTransactionBlockRelationship` filter, which defaults to `SIGN`. + Similar behavior to the `transactionBlocks` in Query but supporting the + additional `AddressTransactionBlockRelationship` filter, which + defaults to `SIGN`. """ transactionBlocks(first: Int, after: String, last: Int, before: String, relation: AddressTransactionBlockRelationship, filter: TransactionBlockFilter): TransactionBlockConnection! } @@ -134,14 +139,16 @@ type AddressEdge { """ An address-owned object is owned by a specific 32-byte address that is either an account address (derived from a particular signature scheme) or -an object ID. An address-owned object is accessible only to its owner and no others. +an object ID. An address-owned object is accessible only to its owner and no +others. """ type AddressOwner { owner: Owner } """ -The possible relationship types for a transaction block: sign, sent, received, or paid. +The possible relationship types for a transaction block: sign, sent, +received, or paid. """ enum AddressTransactionBlockRelationship { """ @@ -198,7 +205,8 @@ type AuthenticatorStateUpdateTransaction { } """ -Range of checkpoints that the RPC is guaranteed to produce a consistent response for. +Range of checkpoints that the RPC is guaranteed to produce a consistent +response for. """ type AvailableRange { first: Checkpoint @@ -224,7 +232,8 @@ type Balance { } """ -Effects to the balance (sum of coin values per coin type) owned by an address or object. +Effects to the balance (sum of coin values per coin type) owned by an +address or object. """ type BalanceChange { """ @@ -232,7 +241,8 @@ type BalanceChange { """ owner: Owner """ - The inner type of the coin whose balance has changed (e.g. `0x2::iota::IOTA`). + The inner type of the coin whose balance has changed (e.g. + `0x2::iota::IOTA`). """ coinType: MoveType """ @@ -311,9 +321,10 @@ scalar BigInt """ -A system transaction that updates epoch information on-chain (increments the current epoch). -Executed by the system once per epoch, without using gas. Epoch change transactions cannot be -submitted by users, because validators will refuse to sign them. +A system transaction that updates epoch information on-chain (increments the +current epoch). Executed by the system once per epoch, without using gas. +Epoch change transactions cannot be submitted by users, because validators +will refuse to sign them. This transaction kind is deprecated in favour of `EndOfEpochTransaction`. """ @@ -327,20 +338,23 @@ type ChangeEpochTransaction { """ protocolVersion: Int! """ - The total amount of gas charged for storage during the previous epoch (in MICROS). + The total amount of gas charged for storage during the previous epoch + (in MICROS). """ storageCharge: BigInt! """ - The total amount of gas charged for computation during the previous epoch (in MICROS). + The total amount of gas charged for computation during the previous + epoch (in MICROS). """ computationCharge: BigInt! """ - The IOTA returned to transaction senders for cleaning up objects (in MICROS). + The IOTA returned to transaction senders for cleaning up objects (in + MICROS). """ storageRebate: BigInt! """ - The total gas retained from storage fees, that will not be returned by storage rebates when - the relevant objects are cleaned up (in MICROS). + The total gas retained from storage fees, that will not be returned by + storage rebates when the relevant objects are cleaned up (in MICROS). """ nonRefundableStorageFee: BigInt! """ @@ -348,37 +362,39 @@ type ChangeEpochTransaction { """ startTimestamp: DateTime! """ - System packages (specifically framework and move stdlib) that are written before the new - epoch starts, to upgrade them on-chain. Validators write these packages out when running the - transaction. + System packages (specifically framework and move stdlib) that are + written before the new epoch starts, to upgrade them on-chain. + Validators write these packages out when running the transaction. """ systemPackages(first: Int, after: String, last: Int, before: String): MovePackageConnection! } """ -Checkpoints contain finalized transactions and are used for node synchronization -and global transaction ordering. +Checkpoints contain finalized transactions and are used for node +synchronization and global transaction ordering. """ type Checkpoint { """ - A 32-byte hash that uniquely identifies the checkpoint contents, encoded in Base58. This - hash can be used to verify checkpoint contents by checking signatures against the committee, - Hashing contents to match digest, and checking that the previous checkpoint digest matches. + A 32-byte hash that uniquely identifies the checkpoint contents, encoded + in Base58. This hash can be used to verify checkpoint contents by + checking signatures against the committee, Hashing contents to match + digest, and checking that the previous checkpoint digest matches. """ digest: String! """ - This checkpoint's position in the total order of finalized checkpoints, agreed upon by - consensus. + This checkpoint's position in the total order of finalized checkpoints, + agreed upon by consensus. """ sequenceNumber: Int! """ - The timestamp at which the checkpoint is agreed to have happened according to consensus. - Transactions that access time in this checkpoint will observe this timestamp. + The timestamp at which the checkpoint is agreed to have happened + according to consensus. Transactions that access time in this + checkpoint will observe this timestamp. """ timestamp: DateTime! """ - This is an aggregation of signatures from a quorum of validators for the checkpoint - proposal. + This is an aggregation of signatures from a quorum of validators for the + checkpoint proposal. """ validatorSignatures: Base64! """ @@ -386,13 +402,15 @@ type Checkpoint { """ previousCheckpointDigest: String """ - The total number of transaction blocks in the network by the end of this checkpoint. + The total number of transaction blocks in the network by the end of this + checkpoint. """ networkTotalTransactions: Int """ - The computation cost, storage cost, storage rebate, and non-refundable storage fee - accumulated during this epoch, up to and including this checkpoint. These values increase - monotonically across checkpoints in the same epoch, and reset on epoch boundaries. + The computation cost, storage cost, storage rebate, and non-refundable + storage fee accumulated during this epoch, up to and including this + checkpoint. These values increase monotonically across checkpoints + in the same epoch, and reset on epoch boundaries. """ rollingGasSummary: GasCostSummary """ @@ -435,7 +453,8 @@ type CheckpointEdge { } """ -Filter either by the digest, or the sequence number, or neither, to get the latest checkpoint. +Filter either by the digest, or the sequence number, or neither, to get the +latest checkpoint. """ input CheckpointId { digest: String @@ -452,8 +471,8 @@ type Coin implements IMoveObject & IObject & IOwner { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this object. If type is not supplied, - it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this object. If + type is not supplied, it defaults to `0x2::iota::IOTA`. """ balance(type: String): Balance """ @@ -463,7 +482,8 @@ type Coin implements IMoveObject & IObject & IOwner { """ The coin objects for this object. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ @@ -471,27 +491,31 @@ type Coin implements IMoveObject & IObject & IOwner { """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this object. + The domain explicitly configured as the default domain pointing to this + object. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this object. These grant the owner the capability to - manage the associated domain. + The IotansRegistration NFTs owned by this object. These grant the owner + the capability to manage the associated domain. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! version: Int! """ - The current status of the object as read from the off-chain store. The possible states are: - NOT_INDEXED, the object is loaded from serialized data, such as the contents of a genesis or - system package upgrade transaction. LIVE, the version returned is the most recent for the - object, and it is not deleted or wrapped at that version. HISTORICAL, the object was - referenced at a specific version or checkpoint, so is fetched from historical tables and may - not be the latest version of the object. WRAPPED_OR_DELETED, the object is deleted or - wrapped and only partial information can be loaded." + The current status of the object as read from the off-chain store. The + possible states are: NOT_INDEXED, the object is loaded from + serialized data, such as the contents of a genesis or system package + upgrade transaction. LIVE, the version returned is the most recent for + the object, and it is not deleted or wrapped at that version. + HISTORICAL, the object was referenced at a specific version or + checkpoint, so is fetched from historical tables and may not be the + latest version of the object. WRAPPED_OR_DELETED, the object is deleted + or wrapped and only partial information can be loaded." """ status: ObjectKind! """ - 32-byte hash that identifies the object's contents, encoded as a Base58 string. + 32-byte hash that identifies the object's contents, encoded as a Base58 + string. """ digest: String """ @@ -503,8 +527,9 @@ type Coin implements IMoveObject & IObject & IOwner { """ previousTransactionBlock: TransactionBlock """ - The amount of IOTA we would rebate if this object gets deleted or mutated. This number is - recalculated based on the present storage gas price. + The amount of IOTA we would rebate if this object gets deleted or + mutated. This number is recalculated based on the present storage + gas price. """ storageRebate: BigInt """ @@ -516,47 +541,49 @@ type Coin implements IMoveObject & IObject & IOwner { """ bcs: Base64 """ - Displays the contents of the Move object in a JSON string and through GraphQL types. Also - provides the flat representation of the type signature, and the BCS of the corresponding - data. + Displays the contents of the Move object in a JSON string and through + GraphQL types. Also provides the flat representation of the type + signature, and the BCS of the corresponding data. """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the TransferObjects - transaction command or `iota::transfer::public_transfer`, both of which require the object to + Determines whether a transaction can transfer this object, using the + TransferObjects transaction command or + `iota::transfer::public_transfer`, both of which require the object to have the `key` and `store` abilities. """ hasPublicTransfer: Boolean! """ - The set of named templates defined on-chain for the type of this object, to be handled - off-chain. The server substitutes data from the object into these templates to generate a - display string per template. + The set of named templates defined on-chain for the type of this object, + to be handled off-chain. The server substitutes data from the object + into these templates to generate a display string per template. """ display: [DisplayEntry!] """ - Access a dynamic field on an object using its name. Names are arbitrary Move values whose - type have `copy`, `drop`, and `store`, and are specified using their type, and their BCS - contents, Base64 encoded. + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have `copy`, `drop`, and `store`, and are + specified using their type, and their BCS contents, Base64 encoded. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicField(name: DynamicFieldName!): DynamicField """ - Access a dynamic object field on an object using its name. Names are arbitrary Move values - whose type have `copy`, `drop`, and `store`, and are specified using their type, and their - BCS contents, Base64 encoded. The value of a dynamic object field can also be accessed + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have `copy`, `drop`, and `store`, + and are specified using their type, and their BCS contents, Base64 + encoded. The value of a dynamic object field can also be accessed off-chain directly via its address (e.g. using `Query.object`). - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicObjectField(name: DynamicFieldName!): DynamicField """ The dynamic fields and dynamic object fields on an object. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! """ @@ -611,8 +638,8 @@ type CoinMetadata implements IMoveObject & IObject & IOwner { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this object. If type is not supplied, - it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this object. If + type is not supplied, it defaults to `0x2::iota::IOTA`. """ balance(type: String): Balance """ @@ -622,7 +649,8 @@ type CoinMetadata implements IMoveObject & IObject & IOwner { """ The coin objects for this object. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ @@ -630,27 +658,31 @@ type CoinMetadata implements IMoveObject & IObject & IOwner { """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this object. + The domain explicitly configured as the default domain pointing to this + object. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this object. These grant the owner the capability to - manage the associated domain. + The IotansRegistration NFTs owned by this object. These grant the owner + the capability to manage the associated domain. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! version: Int! """ - The current status of the object as read from the off-chain store. The possible states are: - NOT_INDEXED, the object is loaded from serialized data, such as the contents of a genesis or - system package upgrade transaction. LIVE, the version returned is the most recent for the - object, and it is not deleted or wrapped at that version. HISTORICAL, the object was - referenced at a specific version or checkpoint, so is fetched from historical tables and may - not be the latest version of the object. WRAPPED_OR_DELETED, the object is deleted or - wrapped and only partial information can be loaded." + The current status of the object as read from the off-chain store. The + possible states are: NOT_INDEXED, the object is loaded from + serialized data, such as the contents of a genesis or system package + upgrade transaction. LIVE, the version returned is the most recent for + the object, and it is not deleted or wrapped at that version. + HISTORICAL, the object was referenced at a specific version or + checkpoint, so is fetched from historical tables and may not be the + latest version of the object. WRAPPED_OR_DELETED, the object is deleted + or wrapped and only partial information can be loaded." """ status: ObjectKind! """ - 32-byte hash that identifies the object's contents, encoded as a Base58 string. + 32-byte hash that identifies the object's contents, encoded as a Base58 + string. """ digest: String """ @@ -662,8 +694,9 @@ type CoinMetadata implements IMoveObject & IObject & IOwner { """ previousTransactionBlock: TransactionBlock """ - The amount of IOTA we would rebate if this object gets deleted or mutated. This number is - recalculated based on the present storage gas price. + The amount of IOTA we would rebate if this object gets deleted or + mutated. This number is recalculated based on the present storage + gas price. """ storageRebate: BigInt """ @@ -675,47 +708,49 @@ type CoinMetadata implements IMoveObject & IObject & IOwner { """ bcs: Base64 """ - Displays the contents of the Move object in a JSON string and through GraphQL types. Also - provides the flat representation of the type signature, and the BCS of the corresponding - data. + Displays the contents of the Move object in a JSON string and through + GraphQL types. Also provides the flat representation of the type + signature, and the BCS of the corresponding data. """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the TransferObjects - transaction command or `iota::transfer::public_transfer`, both of which require the object to + Determines whether a transaction can transfer this object, using the + TransferObjects transaction command or + `iota::transfer::public_transfer`, both of which require the object to have the `key` and `store` abilities. """ hasPublicTransfer: Boolean! """ - The set of named templates defined on-chain for the type of this object, to be handled - off-chain. The server substitutes data from the object into these templates to generate a - display string per template. + The set of named templates defined on-chain for the type of this object, + to be handled off-chain. The server substitutes data from the object + into these templates to generate a display string per template. """ display: [DisplayEntry!] """ - Access a dynamic field on an object using its name. Names are arbitrary Move values whose - type have `copy`, `drop`, and `store`, and are specified using their type, and their BCS - contents, Base64 encoded. + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have `copy`, `drop`, and `store`, and are + specified using their type, and their BCS contents, Base64 encoded. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicField(name: DynamicFieldName!): DynamicField """ - Access a dynamic object field on an object using its name. Names are arbitrary Move values - whose type have `copy`, `drop`, and `store`, and are specified using their type, and their - BCS contents, Base64 encoded. The value of a dynamic object field can also be accessed + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have `copy`, `drop`, and `store`, + and are specified using their type, and their BCS contents, Base64 + encoded. The value of a dynamic object field can also be accessed off-chain directly via its address (e.g. using `Query.object`). - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicObjectField(name: DynamicFieldName!): DynamicField """ The dynamic fields and dynamic object fields on an object. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! """ @@ -742,8 +777,9 @@ type CoinMetadata implements IMoveObject & IObject & IOwner { } """ -System transaction that runs at the beginning of a checkpoint, and is responsible for setting -the current value of the clock, based on the timestamp from consensus. +System transaction that runs at the beginning of a checkpoint, and is +responsible for setting the current value of the clock, based on the +timestamp from consensus. """ type ConsensusCommitPrologueTransaction { """ @@ -759,8 +795,8 @@ type ConsensusCommitPrologueTransaction { """ commitTimestamp: DateTime! """ - Digest of consensus output, encoded as a Base58 string (only available from V2 of the - transaction). + Digest of consensus output, encoded as a Base58 string (only available + from V2 of the transaction). """ consensusCommitDigest: String } @@ -826,7 +862,8 @@ enum DomainFormat { type DryRunEffect { """ - Changes made to arguments that were mutably borrowed by each command in this transaction. + Changes made to arguments that were mutably borrowed by each command in + this transaction. """ mutatedReferences: [DryRunMutation!] """ @@ -847,8 +884,8 @@ type DryRunResult { """ error: String """ - The intermediate results for each command of the dry run execution, including - contents of mutated references and return values. + The intermediate results for each command of the dry run execution, + including contents of mutated references and return values. """ results: [DryRunEffect!] """ @@ -863,27 +900,30 @@ type DryRunReturn { } """ -Dynamic fields are heterogeneous fields that can be added or removed at runtime, -and can have arbitrary user-assigned names. There are two sub-types of dynamic -fields: +Dynamic fields are heterogeneous fields that can be added or removed at +runtime, and can have arbitrary user-assigned names. There are two sub-types +of dynamic fields: -1) Dynamic Fields can store any value that has the `store` ability, however an object -stored in this kind of field will be considered wrapped and will not be accessible -directly via its ID by external tools (explorers, wallets, etc) accessing storage. -2) Dynamic Object Fields values must be Iota objects (have the `key` and `store` -abilities, and id: UID as the first field), but will still be directly accessible off-chain -via their object ID after being attached. +1) Dynamic Fields can store any value that has the `store` ability, however +an object stored in this kind of field will be considered wrapped and +will not be accessible directly via its ID by external tools (explorers, +wallets, etc) accessing storage. +2) Dynamic Object Fields values must be Iota objects (have the `key` and +`store` abilities, and id: UID as the first field), but will still be +directly accessible off-chain via their object ID after being attached. """ type DynamicField { """ - The string type, data, and serialized value of the DynamicField's 'name' field. - This field is used to uniquely identify a child of the parent object. + The string type, data, and serialized value of the DynamicField's 'name' + field. This field is used to uniquely identify a child of the parent + object. """ name: MoveValue """ The actual data stored in the dynamic field. - The returned dynamic field is an object if its return type is MoveObject, - in which case it is also accessible off-chain via its address. + The returned dynamic field is an object if its return type is + MoveObject, in which case it is also accessible off-chain via its + address. """ value: DynamicFieldValue } @@ -920,7 +960,8 @@ type DynamicFieldEdge { input DynamicFieldName { """ The string type of the DynamicField's 'name' field. - A string representation of a Move primitive like 'u64', or a struct type like '0x2::kiosk::Listing' + A string representation of a Move primitive like 'u64', or a struct type + like '0x2::kiosk::Listing' """ type: String! """ @@ -932,13 +973,15 @@ input DynamicFieldName { union DynamicFieldValue = MoveObject | MoveValue """ -System transaction that supersedes `ChangeEpochTransaction` as the new way to run transactions -at the end of an epoch. Behaves similarly to `ChangeEpochTransaction` but can accommodate other -optional transactions to run at the end of the epoch. +System transaction that supersedes `ChangeEpochTransaction` as the new way +to run transactions at the end of an epoch. Behaves similarly to +`ChangeEpochTransaction` but can accommodate other optional transactions to +run at the end of the epoch. """ type EndOfEpochTransaction { """ - The list of system transactions that are allowed to run at the end of the epoch. + The list of system transactions that are allowed to run at the end of + the epoch. """ transactions(first: Int, before: String, last: Int, after: String): EndOfEpochTransactionKindConnection! } @@ -975,9 +1018,9 @@ type EndOfEpochTransactionKindEdge { } """ -Operation of the Iota network is temporally partitioned into non-overlapping epochs, -and the network aims to keep epochs roughly the same duration as each other. -During a particular epoch the following data is fixed: +Operation of the Iota network is temporally partitioned into non-overlapping +epochs, and the network aims to keep epochs roughly the same duration as +each other. During a particular epoch the following data is fixed: - the protocol version - the reference gas price @@ -985,11 +1028,13 @@ During a particular epoch the following data is fixed: """ type Epoch { """ - The epoch's id as a sequence number that starts at 0 and is incremented by one at every epoch change. + The epoch's id as a sequence number that starts at 0 and is incremented + by one at every epoch change. """ epochId: Int! """ - The minimum gas price that a quorum of validators are guaranteed to sign a transaction for. + The minimum gas price that a quorum of validators are guaranteed to sign + a transaction for. """ referenceGasPrice: BigInt """ @@ -1040,28 +1085,29 @@ type Epoch { """ fundInflow: BigInt """ - The storage fee rebates paid to users who deleted the data associated with past - transactions. + The storage fee rebates paid to users who deleted the data associated + with past transactions. """ fundOutflow: BigInt """ - The epoch's corresponding protocol configuration, including the feature flags and the - configuration options. + The epoch's corresponding protocol configuration, including the feature + flags and the configuration options. """ protocolConfigs: ProtocolConfigs! """ - IOTA set aside to account for objects stored on-chain, at the start of the epoch. - This is also used for storage rebates. + IOTA set aside to account for objects stored on-chain, at the start of + the epoch. This is also used for storage rebates. """ storageFund: StorageFund """ - Information about whether this epoch was started in safe mode, which happens if the full epoch - change logic fails for some reason. + Information about whether this epoch was started in safe mode, which + happens if the full epoch change logic fails for some reason. """ safeMode: SafeMode """ - The value of the `version` field of `0x5`, the `0x3::iota::IotaSystemState` object. This - version changes whenever the fields contained in the system state object (held in a dynamic + The value of the `version` field of `0x5`, the + `0x3::iota::IotaSystemState` object. This version changes whenever + the fields contained in the system state object (held in a dynamic field attached to `0x5`) change. """ systemStateVersion: Int @@ -1074,8 +1120,9 @@ type Epoch { """ systemStakeSubsidy: StakeSubsidy """ - A commitment by the committee at the end of epoch on the contents of the live object set at - that time. This can be used to verify state snapshots. + A commitment by the committee at the end of epoch on the contents of the + live object set at that time. This can be used to verify state + snapshots. """ liveObjectSetDigest: String """ @@ -1120,7 +1167,8 @@ type Event { """ Representation of a Move value in JSON, where: - - Addresses, IDs, and UIDs are represented in canonical form, as JSON strings. + - Addresses, IDs, and UIDs are represented in canonical form, as JSON + strings. - Bools are represented by JSON boolean literals. - u8, u16, and u32 are represented as JSON numbers. - u64, u128, and u256 are represented as JSON strings. @@ -1128,8 +1176,8 @@ type Event { - Structs are represented by JSON objects. - Empty optional values are represented by `null`. - This form is offered as a less verbose convenience in cases where the layout of the type is - known by the client. + This form is offered as a less verbose convenience in cases where the + layout of the type is known by the client. """ json: JSON! } @@ -1188,7 +1236,8 @@ input EventFilter { } """ -The result of an execution, including errors that occurred during said execution. +The result of an execution, including errors that occurred during said +execution. """ type ExecutionResult { """ @@ -1196,9 +1245,9 @@ type ExecutionResult { """ errors: [String!] """ - The effects of the executed transaction. Since the transaction was just executed - and not indexed yet, fields including `balance_changes`, `timestamp` and `checkpoint` - are not available. + The effects of the executed transaction. Since the transaction was just + executed and not indexed yet, fields including `balance_changes`, + `timestamp` and `checkpoint` are not available. """ effects: TransactionBlockEffects! } @@ -1218,12 +1267,13 @@ enum ExecutionStatus { } """ -Groups of features served by the RPC service. The GraphQL Service can be configured to enable -or disable these features. +Groups of features served by the RPC service. The GraphQL Service can be +configured to enable or disable these features. """ enum Feature { """ - Statistics about how the network was running (TPS, top packages, APY, etc) + Statistics about how the network was running (TPS, top packages, APY, + etc) """ ANALYTICS """ @@ -1251,8 +1301,9 @@ enum Feature { """ -Access to the gas inputs, after they have been smashed into one coin. The gas coin can only be -used by reference, except for with `TransferObjectsTransaction` that can accept it by value. +Access to the gas inputs, after they have been smashed into one coin. The +gas coin can only be used by reference, except for with +`TransferObjectsTransaction` that can accept it by value. """ type GasCoin { """ @@ -1274,20 +1325,22 @@ type GasCostSummary { """ storageCost: BigInt """ - Part of storage cost that can be reclaimed by cleaning up data created by this transaction - (when objects are deleted or an object is modified, which is treated as a deletion followed - by a creation) (in MICROS). + Part of storage cost that can be reclaimed by cleaning up data created + by this transaction (when objects are deleted or an object is + modified, which is treated as a deletion followed by a creation) (in + MICROS). """ storageRebate: BigInt """ - Part of storage cost that is not reclaimed when data created by this transaction is cleaned - up (in MICROS). + Part of storage cost that is not reclaimed when data created by this + transaction is cleaned up (in MICROS). """ nonRefundableStorageFee: BigInt } """ -Effects related to gas (costs incurred and the identity of the smashed gas object returned). +Effects related to gas (costs incurred and the identity of the smashed gas +object returned). """ type GasEffects { gasObject: Object @@ -1295,7 +1348,8 @@ type GasEffects { } """ -Configuration for this transaction's gas price and the coins used to pay for gas. +Configuration for this transaction's gas price and the coins used to pay for +gas. """ type GasInput { """ @@ -1307,18 +1361,20 @@ type GasInput { """ gasPayment(first: Int, after: String, last: Int, before: String): ObjectConnection! """ - An unsigned integer specifying the number of native tokens per gas unit this transaction - will pay (in MICROS). + An unsigned integer specifying the number of native tokens per gas unit + this transaction will pay (in MICROS). """ gasPrice: BigInt """ - The maximum number of gas units that can be expended by executing this transaction + The maximum number of gas units that can be expended by executing this + transaction """ gasBudget: BigInt } """ -System transaction that initializes the network and writes the initial set of objects on-chain. +System transaction that initializes the network and writes the initial set +of objects on-chain. """ type GenesisTransaction { """ @@ -1329,8 +1385,8 @@ type GenesisTransaction { """ -This interface is implemented by types that represent a Move object on-chain (A Move value whose -type has `key`). +This interface is implemented by types that represent a Move object on-chain +(A Move value whose type has `key`). """ interface IMoveObject { """ @@ -1366,8 +1422,8 @@ interface IMoveObject { } """ -Interface implemented by on-chain values that are addressable by an ID (also referred to as its -address). This includes Move objects and packages. +Interface implemented by on-chain values that are addressable by an ID (also +referred to as its address). This includes Move objects and packages. """ interface IObject { version: Int! @@ -1403,10 +1459,11 @@ interface IObject { } """ -Interface implemented by GraphQL types representing entities that can own objects. Object owners -are identified by an address which can represent either the public key of an account or another -object. The same address can only refer to an account or an object, never both, but it is not -possible to know which up-front. +Interface implemented by GraphQL types representing entities that can own +objects. Object owners are identified by an address which can represent +either the public key of an account or another object. The same address can +only refer to an account or an object, never both, but it is not possible to +know which up-front. """ interface IOwner { address: IotaAddress! @@ -1443,15 +1500,16 @@ interface IOwner { } """ -An immutable object is an object that can't be mutated, transferred, or deleted. -Immutable objects have no owner, so anyone can use them. +An immutable object is an object that can't be mutated, transferred, or +deleted. Immutable objects have no owner, so anyone can use them. """ type Immutable { _: Boolean } """ -One of the input objects or primitive values to the programmable transaction block. +One of the input objects or primitive values to the programmable transaction +block. """ type Input { """ @@ -1461,13 +1519,176 @@ type Input { } +""" +String containing 32B hex-encoded address, with a leading "0x". Leading zeroes can be omitted on input but will always appear in outputs (IotaAddress in output is guaranteed to be 66 characters long). +""" +scalar IotaAddress + +type IotansRegistration implements IMoveObject & IObject & IOwner { + address: IotaAddress! + """ + Objects owned by this object, optionally `filter`-ed. + """ + objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! + """ + Total balance of all coins with marker type owned by this object. If + type is not supplied, it defaults to `0x2::iota::IOTA`. + """ + balance(type: String): Balance + """ + The balances of all coin types owned by this object. + """ + balances(first: Int, after: String, last: Int, before: String): BalanceConnection! + """ + The coin objects for this object. + + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. + """ + coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! + """ + The `0x3::staking_pool::StakedIota` objects owned by this object. + """ + stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! + """ + The domain explicitly configured as the default domain pointing to this + object. + """ + defaultIotansName(format: DomainFormat): String + """ + The IotansRegistration NFTs owned by this object. These grant the owner + the capability to manage the associated domain. + """ + iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! + version: Int! + """ + The current status of the object as read from the off-chain store. The + possible states are: NOT_INDEXED, the object is loaded from + serialized data, such as the contents of a genesis or system package + upgrade transaction. LIVE, the version returned is the most recent for + the object, and it is not deleted or wrapped at that version. + HISTORICAL, the object was referenced at a specific version or + checkpoint, so is fetched from historical tables and may not be the + latest version of the object. WRAPPED_OR_DELETED, the object is deleted + or wrapped and only partial information can be loaded." + """ + status: ObjectKind! + """ + 32-byte hash that identifies the object's contents, encoded as a Base58 + string. + """ + digest: String + """ + The owner type of this object: Immutable, Shared, Parent, Address + """ + owner: ObjectOwner + """ + The transaction block that created this version of the object. + """ + previousTransactionBlock: TransactionBlock + """ + The amount of IOTA we would rebate if this object gets deleted or + mutated. This number is recalculated based on the present storage + gas price. + """ + storageRebate: BigInt + """ + The transaction blocks that sent objects to this object. + """ + receivedTransactionBlocks(first: Int, after: String, last: Int, before: String, filter: TransactionBlockFilter): TransactionBlockConnection! + """ + The Base64-encoded BCS serialization of the object's content. + """ + bcs: Base64 + """ + Displays the contents of the Move object in a JSON string and through + GraphQL types. Also provides the flat representation of the type + signature, and the BCS of the corresponding data. + """ + contents: MoveValue + """ + Determines whether a transaction can transfer this object, using the + TransferObjects transaction command or + `iota::transfer::public_transfer`, both of which require the object to + have the `key` and `store` abilities. + """ + hasPublicTransfer: Boolean! + """ + The set of named templates defined on-chain for the type of this object, + to be handled off-chain. The server substitutes data from the object + into these templates to generate a display string per template. + """ + display: [DisplayEntry!] + """ + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have `copy`, `drop`, and `store`, and are + specified using their type, and their BCS contents, Base64 encoded. + + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. + """ + dynamicField(name: DynamicFieldName!): DynamicField + """ + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have `copy`, `drop`, and `store`, + and are specified using their type, and their BCS contents, Base64 + encoded. The value of a dynamic object field can also be accessed + off-chain directly via its address (e.g. using `Query.object`). + + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. + """ + dynamicObjectField(name: DynamicFieldName!): DynamicField + """ + The dynamic fields and dynamic object fields on an object. + + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. + """ + dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! + """ + Domain name of the IotansRegistration object + """ + domain: String! +} + +type IotansRegistrationConnection { + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + """ + A list of edges. + """ + edges: [IotansRegistrationEdge!]! + """ + A list of nodes. + """ + nodes: [IotansRegistration!]! +} + +""" +An edge in a connection. +""" +type IotansRegistrationEdge { + """ + The item at the end of the edge + """ + node: IotansRegistration! + """ + A cursor for use in pagination + """ + cursor: String! +} + """ Arbitrary JSON data. """ scalar JSON """ -Information used by a package to link to a specific version of its dependency. +Information used by a package to link to a specific version of its +dependency. """ type Linkage { """ @@ -1475,7 +1696,8 @@ type Linkage { """ originalId: IotaAddress! """ - The ID on-chain of the version of the dependency that this package depends on. + The ID on-chain of the version of the dependency that this package + depends on. """ upgradedId: IotaAddress! """ @@ -1489,7 +1711,8 @@ Create a vector (possibly empty). """ type MakeMoveVecTransaction { """ - If the elements are not objects, or the vector is empty, a type must be supplied. + If the elements are not objects, or the vector is empty, a type must be + supplied. """ type: MoveType """ @@ -1513,7 +1736,8 @@ type MergeCoinsTransaction { } """ -Abilities are keywords in Iota Move that define how types behave at the compiler level. +Abilities are keywords in Iota Move that define how types behave at the +compiler level. """ enum MoveAbility { """ @@ -1609,20 +1833,21 @@ type MoveFunction { """ isEntry: Boolean """ - Constraints on the function's formal type parameters. Move bytecode does not name type - parameters, so when they are referenced (e.g. in parameter and return types) they are - identified by their index in this list. + Constraints on the function's formal type parameters. Move bytecode + does not name type parameters, so when they are referenced (e.g. in + parameter and return types) they are identified by their index in + this list. """ typeParameters: [MoveFunctionTypeParameter!] """ - The function's parameter types. These types can reference type parameters introduce by this - function (see `typeParameters`). + The function's parameter types. These types can reference type + parameters introduce by this function (see `typeParameters`). """ parameters: [OpenMoveType!] """ - The function's return types. There can be multiple because functions in Move can return - multiple values. These types can reference type parameters introduced by this function (see - `typeParameters`). + The function's return types. There can be multiple because functions in + Move can return multiple values. These types can reference type + parameters introduced by this function (see `typeParameters`). """ return: [OpenMoveType!] } @@ -1678,8 +1903,8 @@ type MoveModule { """ fileFormatVersion: Int! """ - Modules that this module considers friends (these modules can access `public(friend)` - functions from this module). + Modules that this module considers friends (these modules can access + `public(friend)` functions from this module). """ friends(first: Int, after: String, last: Int, before: String): MoveModuleConnection! """ @@ -1738,8 +1963,9 @@ type MoveModuleEdge { } """ -The representation of an object as a Move Object, which exposes additional information -(content, module that governs it, version, is transferrable, etc.) about this object. +The representation of an object as a Move Object, which exposes additional +information (content, module that governs it, version, is transferrable, +etc.) about this object. """ type MoveObject implements IMoveObject & IObject & IOwner { address: IotaAddress! @@ -1748,8 +1974,8 @@ type MoveObject implements IMoveObject & IObject & IOwner { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this object. If type is not supplied, - it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this object. If + type is not supplied, it defaults to `0x2::iota::IOTA`. """ balance(type: String): Balance """ @@ -1759,7 +1985,8 @@ type MoveObject implements IMoveObject & IObject & IOwner { """ The coin objects for this object. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ @@ -1767,27 +1994,31 @@ type MoveObject implements IMoveObject & IObject & IOwner { """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this object. + The domain explicitly configured as the default domain pointing to this + object. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this object. These grant the owner the capability to - manage the associated domain. + The IotansRegistration NFTs owned by this object. These grant the owner + the capability to manage the associated domain. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! version: Int! """ - The current status of the object as read from the off-chain store. The possible states are: - NOT_INDEXED, the object is loaded from serialized data, such as the contents of a genesis or - system package upgrade transaction. LIVE, the version returned is the most recent for the - object, and it is not deleted or wrapped at that version. HISTORICAL, the object was - referenced at a specific version or checkpoint, so is fetched from historical tables and may - not be the latest version of the object. WRAPPED_OR_DELETED, the object is deleted or - wrapped and only partial information can be loaded." + The current status of the object as read from the off-chain store. The + possible states are: NOT_INDEXED, the object is loaded from + serialized data, such as the contents of a genesis or system package + upgrade transaction. LIVE, the version returned is the most recent for + the object, and it is not deleted or wrapped at that version. + HISTORICAL, the object was referenced at a specific version or + checkpoint, so is fetched from historical tables and may not be the + latest version of the object. WRAPPED_OR_DELETED, the object is deleted + or wrapped and only partial information can be loaded." """ status: ObjectKind! """ - 32-byte hash that identifies the object's contents, encoded as a Base58 string. + 32-byte hash that identifies the object's contents, encoded as a Base58 + string. """ digest: String """ @@ -1799,8 +2030,9 @@ type MoveObject implements IMoveObject & IObject & IOwner { """ previousTransactionBlock: TransactionBlock """ - The amount of IOTA we would rebate if this object gets deleted or mutated. This number is - recalculated based on the present storage gas price. + The amount of IOTA we would rebate if this object gets deleted or + mutated. This number is recalculated based on the present storage + gas price. """ storageRebate: BigInt """ @@ -1812,47 +2044,49 @@ type MoveObject implements IMoveObject & IObject & IOwner { """ bcs: Base64 """ - Displays the contents of the Move object in a JSON string and through GraphQL types. Also - provides the flat representation of the type signature, and the BCS of the corresponding - data. + Displays the contents of the Move object in a JSON string and through + GraphQL types. Also provides the flat representation of the type + signature, and the BCS of the corresponding data. """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the TransferObjects - transaction command or `iota::transfer::public_transfer`, both of which require the object to + Determines whether a transaction can transfer this object, using the + TransferObjects transaction command or + `iota::transfer::public_transfer`, both of which require the object to have the `key` and `store` abilities. """ hasPublicTransfer: Boolean! """ - The set of named templates defined on-chain for the type of this object, to be handled - off-chain. The server substitutes data from the object into these templates to generate a - display string per template. + The set of named templates defined on-chain for the type of this object, + to be handled off-chain. The server substitutes data from the object + into these templates to generate a display string per template. """ display: [DisplayEntry!] """ - Access a dynamic field on an object using its name. Names are arbitrary Move values whose - type have `copy`, `drop`, and `store`, and are specified using their type, and their BCS - contents, Base64 encoded. + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have `copy`, `drop`, and `store`, and are + specified using their type, and their BCS contents, Base64 encoded. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicField(name: DynamicFieldName!): DynamicField """ - Access a dynamic object field on an object using its name. Names are arbitrary Move values - whose type have `copy`, `drop`, and `store`, and are specified using their type, and their - BCS contents, Base64 encoded. The value of a dynamic object field can also be accessed + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have `copy`, `drop`, and `store`, + and are specified using their type, and their BCS contents, Base64 + encoded. The value of a dynamic object field can also be accessed off-chain directly via its address (e.g. using `Query.object`). - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicObjectField(name: DynamicFieldName!): DynamicField """ The dynamic fields and dynamic object fields on an object. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! """ @@ -1860,7 +2094,8 @@ type MoveObject implements IMoveObject & IObject & IOwner { """ asCoin: Coin """ - Attempts to convert the Move object into a `0x3::staking_pool::StakedIota`. + Attempts to convert the Move object into a + `0x3::staking_pool::StakedIota`. """ asStakedIota: StakedIota """ @@ -1903,74 +2138,80 @@ type MoveObjectEdge { } """ -A MovePackage is a kind of Move object that represents code that has been published on chain. -It exposes information about its modules, type definitions, functions, and dependencies. +A MovePackage is a kind of Move object that represents code that has been +published on chain. It exposes information about its modules, type +definitions, functions, and dependencies. """ type MovePackage implements IObject & IOwner { address: IotaAddress! """ Objects owned by this package, optionally `filter`-ed. - Note that objects owned by a package are inaccessible, because packages are immutable and - cannot be owned by an address. + Note that objects owned by a package are inaccessible, because packages + are immutable and cannot be owned by an address. """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this package. If type is not supplied, - it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this package. If + type is not supplied, it defaults to `0x2::iota::IOTA`. - Note that coins owned by a package are inaccessible, because packages are immutable and - cannot be owned by an address. + Note that coins owned by a package are inaccessible, because packages + are immutable and cannot be owned by an address. """ balance(type: String): Balance """ The balances of all coin types owned by this package. - Note that coins owned by a package are inaccessible, because packages are immutable and - cannot be owned by an address. + Note that coins owned by a package are inaccessible, because packages + are immutable and cannot be owned by an address. """ balances(first: Int, after: String, last: Int, before: String): BalanceConnection! """ The coin objects owned by this package. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. - Note that coins owned by a package are inaccessible, because packages are immutable and - cannot be owned by an address. + Note that coins owned by a package are inaccessible, because packages + are immutable and cannot be owned by an address. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ The `0x3::staking_pool::StakedIota` objects owned by this package. - Note that objects owned by a package are inaccessible, because packages are immutable and - cannot be owned by an address. + Note that objects owned by a package are inaccessible, because packages + are immutable and cannot be owned by an address. """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this object. + The domain explicitly configured as the default domain pointing to this + object. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this package. These grant the owner the capability to - manage the associated domain. + The IotansRegistration NFTs owned by this package. These grant the owner + the capability to manage the associated domain. - Note that objects owned by a package are inaccessible, because packages are immutable and - cannot be owned by an address. + Note that objects owned by a package are inaccessible, because packages + are immutable and cannot be owned by an address. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! version: Int! """ - The current status of the object as read from the off-chain store. The possible states are: - NOT_INDEXED, the object is loaded from serialized data, such as the contents of a genesis or - system package upgrade transaction. LIVE, the version returned is the most recent for the - object, and it is not deleted or wrapped at that version. HISTORICAL, the object was - referenced at a specific version or checkpoint, so is fetched from historical tables and may - not be the latest version of the object. WRAPPED_OR_DELETED, the object is deleted or - wrapped and only partial information can be loaded." + The current status of the object as read from the off-chain store. The + possible states are: NOT_INDEXED, the object is loaded from + serialized data, such as the contents of a genesis or system package + upgrade transaction. LIVE, the version returned is the most recent for + the object, and it is not deleted or wrapped at that version. + HISTORICAL, the object was referenced at a specific version or + checkpoint, so is fetched from historical tables and may not be the + latest version of the object. WRAPPED_OR_DELETED, the object is deleted + or wrapped and only partial information can be loaded." """ status: ObjectKind! """ - 32-byte hash that identifies the package's contents, encoded as a Base58 string. + 32-byte hash that identifies the package's contents, encoded as a Base58 + string. """ digest: String """ @@ -1983,11 +2224,12 @@ type MovePackage implements IObject & IOwner { """ previousTransactionBlock: TransactionBlock """ - The amount of IOTA we would rebate if this object gets deleted or mutated. This number is - recalculated based on the present storage gas price. + The amount of IOTA we would rebate if this object gets deleted or + mutated. This number is recalculated based on the present storage + gas price. - Note that packages cannot be deleted or mutated, so this number is provided purely for - reference. + Note that packages cannot be deleted or mutated, so this number is + provided purely for reference. """ storageRebate: BigInt """ @@ -2001,8 +2243,8 @@ type MovePackage implements IObject & IOwner { """ bcs: Base64 """ - A representation of the module called `name` in this package, including the - structs and functions it defines. + A representation of the module called `name` in this package, including + the structs and functions it defines. """ module(name: String!): MoveModule """ @@ -2018,8 +2260,9 @@ type MovePackage implements IObject & IOwner { """ typeOrigins: [TypeOrigin!] """ - BCS representation of the package's modules. Modules appear as a sequence of pairs (module - name, followed by module bytes), in alphabetic order by module name. + BCS representation of the package's modules. Modules appear as a + sequence of pairs (module name, followed by module bytes), in + alphabetic order by module name. """ moduleBcs: Base64 } @@ -2070,14 +2313,15 @@ type MoveStruct { """ abilities: [MoveAbility!] """ - Constraints on the struct's formal type parameters. Move bytecode does not name type - parameters, so when they are referenced (e.g. in field types) they are identified by their - index in this list. + Constraints on the struct's formal type parameters. Move bytecode does + not name type parameters, so when they are referenced (e.g. in field + types) they are identified by their index in this list. """ typeParameters: [MoveStructTypeParameter!] """ - The names and types of the struct's fields. Field types reference type parameters, by their - index in the defining struct's `typeParameters` list. + The names and types of the struct's fields. Field types reference type + parameters, by their index in the defining struct's `typeParameters` + list. """ fields: [MoveField!] } @@ -2190,7 +2434,8 @@ type MoveValue { """ Representation of a Move value in JSON, where: - - Addresses, IDs, and UIDs are represented in canonical form, as JSON strings. + - Addresses, IDs, and UIDs are represented in canonical form, as JSON + strings. - Bools are represented by JSON boolean literals. - u8, u16, and u32 are represented as JSON numbers. - u64, u128, and u256 are represented as JSON strings. @@ -2198,15 +2443,16 @@ type MoveValue { - Structs are represented by JSON objects. - Empty optional values are represented by `null`. - This form is offered as a less verbose convenience in cases where the layout of the type is - known by the client. + This form is offered as a less verbose convenience in cases where the + layout of the type is known by the client. """ json: JSON! } """ -The visibility modifier describes which modules can access this module member. -By default, a module member can be called only within the same module. +The visibility modifier describes which modules can access this module +member. By default, a module member can be called only within the same +module. """ enum MoveVisibility { """ @@ -2218,8 +2464,9 @@ enum MoveVisibility { """ PRIVATE """ - A friend member can be accessed in the module it is defined in and any other module in - its package that is explicitly specified in its friend list. + A friend member can be accessed in the module it is defined in and any + other module in its package that is explicitly specified in its + friend list. """ FRIEND } @@ -2231,26 +2478,32 @@ type Mutation { """ Execute a transaction, committing its effects on chain. - - `txBytes` is a `TransactionData` struct that has been BCS-encoded and then Base64-encoded. - - `signatures` are a list of `flag || signature || pubkey` bytes, Base64-encoded. + - `txBytes` is a `TransactionData` struct that has been BCS-encoded and + then Base64-encoded. + - `signatures` are a list of `flag || signature || pubkey` bytes, + Base64-encoded. - Waits until the transaction has reached finality on chain to return its transaction digest, - or returns the error that prevented finality if that was not possible. A transaction is - final when its effects are guaranteed on chain (it cannot be revoked). + Waits until the transaction has reached finality on chain to return its + transaction digest, or returns the error that prevented finality if + that was not possible. A transaction is final when its effects are + guaranteed on chain (it cannot be revoked). - There may be a delay between transaction finality and when GraphQL requests (including the - request that issued the transaction) reflect its effects. As a result, queries that depend - on indexing the state of the chain (e.g. contents of output objects, address-level balance - information at the time of the transaction), must wait for indexing to catch up by polling - for the transaction digest using `Query.transactionBlock`. + There may be a delay between transaction finality and when GraphQL + requests (including the request that issued the transaction) reflect + its effects. As a result, queries that depend on indexing the state + of the chain (e.g. contents of output objects, address-level balance + information at the time of the transaction), must wait for indexing to + catch up by polling for the transaction digest using + `Query.transactionBlock`. """ executeTransactionBlock(txBytes: String!, signatures: [String!]!): ExecutionResult! } """ -An object in Iota is a package (set of Move bytecode modules) or object (typed data structure -with fields) with additional metadata detailing its id, version, transaction digest, owner -field indicating how this object can be accessed. +An object in Iota is a package (set of Move bytecode modules) or object +(typed data structure with fields) with additional metadata detailing its +id, version, transaction digest, owner field indicating how this object can +be accessed. """ type Object implements IObject & IOwner { address: IotaAddress! @@ -2259,8 +2512,8 @@ type Object implements IObject & IOwner { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this object. If type is not supplied, - it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this object. If + type is not supplied, it defaults to `0x2::iota::IOTA`. """ balance(type: String): Balance """ @@ -2270,7 +2523,8 @@ type Object implements IObject & IOwner { """ The coin objects for this object. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ @@ -2278,27 +2532,31 @@ type Object implements IObject & IOwner { """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this object. + The domain explicitly configured as the default domain pointing to this + object. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this object. These grant the owner the capability to - manage the associated domain. + The IotansRegistration NFTs owned by this object. These grant the owner + the capability to manage the associated domain. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! version: Int! """ - The current status of the object as read from the off-chain store. The possible states are: - NOT_INDEXED, the object is loaded from serialized data, such as the contents of a genesis or - system package upgrade transaction. LIVE, the version returned is the most recent for the - object, and it is not deleted or wrapped at that version. HISTORICAL, the object was - referenced at a specific version or checkpoint, so is fetched from historical tables and may - not be the latest version of the object. WRAPPED_OR_DELETED, the object is deleted or - wrapped and only partial information can be loaded." + The current status of the object as read from the off-chain store. The + possible states are: NOT_INDEXED, the object is loaded from + serialized data, such as the contents of a genesis or system package + upgrade transaction. LIVE, the version returned is the most recent for + the object, and it is not deleted or wrapped at that version. + HISTORICAL, the object was referenced at a specific version or + checkpoint, so is fetched from historical tables and may not be the + latest version of the object. WRAPPED_OR_DELETED, the object is deleted + or wrapped and only partial information can be loaded." """ status: ObjectKind! """ - 32-byte hash that identifies the object's current contents, encoded as a Base58 string. + 32-byte hash that identifies the object's current contents, encoded as a + Base58 string. """ digest: String """ @@ -2311,8 +2569,9 @@ type Object implements IObject & IOwner { """ previousTransactionBlock: TransactionBlock """ - The amount of IOTA we would rebate if this object gets deleted or mutated. This number is - recalculated based on the present storage gas price. + The amount of IOTA we would rebate if this object gets deleted or + mutated. This number is recalculated based on the present storage + gas price. """ storageRebate: BigInt """ @@ -2324,35 +2583,36 @@ type Object implements IObject & IOwner { """ bcs: Base64 """ - The set of named templates defined on-chain for the type of this object, to be handled - off-chain. The server substitutes data from the object into these templates to generate a - display string per template. + The set of named templates defined on-chain for the type of this object, + to be handled off-chain. The server substitutes data from the object + into these templates to generate a display string per template. """ display: [DisplayEntry!] """ - Access a dynamic field on an object using its name. Names are arbitrary Move values whose - type have `copy`, `drop`, and `store`, and are specified using their type, and their BCS - contents, Base64 encoded. + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have `copy`, `drop`, and `store`, and are + specified using their type, and their BCS contents, Base64 encoded. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicField(name: DynamicFieldName!): DynamicField """ - Access a dynamic object field on an object using its name. Names are arbitrary Move values - whose type have `copy`, `drop`, and `store`, and are specified using their type, and their - BCS contents, Base64 encoded. The value of a dynamic object field can also be accessed + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have `copy`, `drop`, and `store`, + and are specified using their type, and their BCS contents, Base64 + encoded. The value of a dynamic object field can also be accessed off-chain directly via its address (e.g. using `Query.object`). - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicObjectField(name: DynamicFieldName!): DynamicField """ The dynamic fields and dynamic object fields on an object. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! """ @@ -2450,23 +2710,25 @@ type ObjectEdge { } """ -Constrains the set of objects returned. All filters are optional, and the resulting set of -objects are ones whose +Constrains the set of objects returned. All filters are optional, and the +resulting set of objects are ones whose - Type matches the `type` filter, - AND, whose owner matches the `owner` filter, -- AND, whose ID is in `objectIds` OR whose ID and version is in `objectKeys`. +- AND, whose ID is in `objectIds` OR whose ID and version is in +`objectKeys`. """ input ObjectFilter { """ - This field is used to specify the type of objects that should be included in the query - results. + This field is used to specify the type of objects that should be + included in the query results. - Objects can be filtered by their type's package, package::module, or their fully qualified - type name. + Objects can be filtered by their type's package, package::module, or + their fully qualified type name. - Generic types can be queried by either the generic type name, e.g. `0x2::coin::Coin`, or by - the full type name, such as `0x2::coin::Coin<0x2::iota::IOTA>`. + Generic types can be queried by either the generic type name, e.g. + `0x2::coin::Coin`, or by the full type name, such as + `0x2::coin::Coin<0x2::iota::IOTA>`. """ type: String """ @@ -2478,7 +2740,8 @@ input ObjectFilter { """ objectIds: [IotaAddress!] """ - Filter for live or potentially historical objects by their ID and version. + Filter for live or potentially historical objects by their ID and + version. """ objectKeys: [ObjectKey!] } @@ -2490,7 +2753,8 @@ input ObjectKey { enum ObjectKind { """ - The object is loaded from serialized data, such as the contents of a transaction. + The object is loaded from serialized data, such as the contents of a + transaction. """ NOT_INDEXED """ @@ -2498,13 +2762,13 @@ enum ObjectKind { """ LIVE """ - The object is referenced at some version, and thus is fetched from the snapshot or - historical objects table. + The object is referenced at some version, and thus is fetched from the + snapshot or historical objects table. """ HISTORICAL """ - The object is deleted or wrapped and only partial information can be loaded from the - indexer. + The object is deleted or wrapped and only partial information can be + loaded from the indexer. """ WRAPPED_OR_DELETED } @@ -2530,8 +2794,9 @@ input ObjectRef { } """ -Represents types that could contain references or free type parameters. Such types can appear -as function parameters, in fields of structs, or as actual type parameter. +Represents types that could contain references or free type parameters. +Such types can appear as function parameters, in fields of structs, or as +actual type parameter. """ type OpenMoveType { """ @@ -2582,8 +2847,8 @@ type OwnedOrImmutable { """ version: Int! """ - 32-byte hash that identifies the object's contents at this version, encoded as a Base58 - string. + 32-byte hash that identifies the object's contents at this version, + encoded as a Base58 string. """ digest: String! """ @@ -2593,9 +2858,10 @@ type OwnedOrImmutable { } """ -An Owner is an entity that can own an object. Each Owner is identified by a IotaAddress which -represents either an Address (corresponding to a public key of an account) or an Object, but -never both (it is not known up-front whether a given Owner is an Address or an Object). +An Owner is an entity that can own an object. Each Owner is identified by a +IotaAddress which represents either an Address (corresponding to a public +key of an account) or an Object, but never both (it is not known up-front +whether a given Owner is an Address or an Object). """ type Owner implements IOwner { address: IotaAddress! @@ -2604,8 +2870,8 @@ type Owner implements IOwner { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this object or address. If type is not - supplied, it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this object or + address. If type is not supplied, it defaults to `0x2::iota::IOTA`. """ balance(type: String): Balance """ @@ -2615,45 +2881,52 @@ type Owner implements IOwner { """ The coin objects for this object or address. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ - The `0x3::staking_pool::StakedIota` objects owned by this object or address. + The `0x3::staking_pool::StakedIota` objects owned by this object or + address. """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this object or address. + The domain explicitly configured as the default domain pointing to this + object or address. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this object or address. These grant the owner the - capability to manage the associated domain. + The IotansRegistration NFTs owned by this object or address. These grant + the owner the capability to manage the associated domain. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! asAddress: Address asObject: Object """ - Access a dynamic field on an object using its name. Names are arbitrary Move values whose - type have `copy`, `drop`, and `store`, and are specified using their type, and their BCS - contents, Base64 encoded. + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have `copy`, `drop`, and `store`, and are + specified using their type, and their BCS contents, Base64 encoded. - This field exists as a convenience when accessing a dynamic field on a wrapped object. + This field exists as a convenience when accessing a dynamic field on a + wrapped object. """ dynamicField(name: DynamicFieldName!): DynamicField """ - Access a dynamic object field on an object using its name. Names are arbitrary Move values - whose type have `copy`, `drop`, and `store`, and are specified using their type, and their - BCS contents, Base64 encoded. The value of a dynamic object field can also be accessed + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have `copy`, `drop`, and `store`, + and are specified using their type, and their BCS contents, Base64 + encoded. The value of a dynamic object field can also be accessed off-chain directly via its address (e.g. using `Query.object`). - This field exists as a convenience when accessing a dynamic field on a wrapped object. + This field exists as a convenience when accessing a dynamic field on a + wrapped object. """ dynamicObjectField(name: DynamicFieldName!): DynamicField """ The dynamic fields and dynamic object fields on an object. - This field exists as a convenience when accessing a dynamic field on a wrapped object. + This field exists as a convenience when accessing a dynamic field on a + wrapped object. """ dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! } @@ -2681,9 +2954,10 @@ type PageInfo { } """ -If the object's owner is a Parent, this object is part of a dynamic field (it is the value of -the dynamic field, or the intermediate Field object itself). Also note that if the owner -is a parent, then it's guaranteed to be an object. +If the object's owner is a Parent, this object is part of a dynamic field +(it is the value of the dynamic field, or the intermediate Field object +itself). Also note that if the owner is a parent, then it's guaranteed to be +an object. """ type Parent { parent: Object @@ -2695,8 +2969,9 @@ A single transaction, or command, in the programmable transaction block. union ProgrammableTransaction = MoveCallTransaction | TransferObjectsTransaction | SplitCoinsTransaction | MergeCoinsTransaction | PublishTransaction | UpgradeTransaction | MakeMoveVecTransaction """ -A user transaction that allows the interleaving of native commands (like transfer, split coins, -merge coins, etc) and move calls, executed atomically. +A user transaction that allows the interleaving of native commands (like +transfer, split coins, merge coins, etc) and move calls, executed +atomically. """ type ProgrammableTransactionBlock { """ @@ -2757,23 +3032,27 @@ type ProtocolConfigFeatureFlag { """ Constants that control how the chain operates. -These can only change during protocol upgrades which happen on epoch boundaries. +These can only change during protocol upgrades which happen on epoch +boundaries. """ type ProtocolConfigs { """ - The protocol is not required to change on every epoch boundary, so the protocol version - tracks which change to the protocol these configs are from. + The protocol is not required to change on every epoch boundary, so the + protocol version tracks which change to the protocol these configs + are from. """ protocolVersion: Int! """ - List all available feature flags and their values. Feature flags are a form of boolean - configuration that are usually used to gate features while they are in development. Once a - flag has been enabled, it is rare for it to be disabled. + List all available feature flags and their values. Feature flags are a + form of boolean configuration that are usually used to gate features + while they are in development. Once a flag has been enabled, it is + rare for it to be disabled. """ featureFlags: [ProtocolConfigFeatureFlag!]! """ - List all available configurations and their values. These configurations can take any value - (but they will all be represented in string form), and do not include feature flags. + List all available configurations and their values. These + configurations can take any value (but they will all be represented + in string form), and do not include feature flags. """ configs: [ProtocolConfigAttr!]! """ @@ -2791,7 +3070,8 @@ Publishes a Move Package. """ type PublishTransaction { """ - Bytecode for the modules to be published, BCS serialized and Base64 encoded. + Bytecode for the modules to be published, BCS serialized and Base64 + encoded. """ modules: [Base64!]! """ @@ -2812,8 +3092,8 @@ type Pure { type Query { """ - First four bytes of the network's genesis checkpoint digest (uniquely identifies the - network). + First four bytes of the network's genesis checkpoint digest (uniquely + identifies the network). """ chainIdentifier: String! """ @@ -2847,8 +3127,8 @@ type Query { dryRunTransactionBlock(txBytes: String!, txMeta: TransactionMetadata, skipChecks: Boolean): DryRunResult! owner(address: IotaAddress!): Owner """ - The object corresponding to the given address at the (optionally) given version. - When no version is given, the latest version is returned. + The object corresponding to the given address at the (optionally) given + version. When no version is given, the latest version is returned. """ object(address: IotaAddress!, version: Int): Object """ @@ -2856,8 +3136,8 @@ type Query { """ address(address: IotaAddress!): Address """ - Fetch a structured representation of a concrete type, including its layout information. - Fails if the type is malformed. + Fetch a structured representation of a concrete type, including its + layout information. Fails if the type is malformed. """ type(type: String!): MoveType! """ @@ -2865,8 +3145,8 @@ type Query { """ epoch(id: Int): Epoch """ - Fetch checkpoint information by sequence number or digest (defaults to the latest available - checkpoint). + Fetch checkpoint information by sequence number or digest (defaults to + the latest available checkpoint). """ checkpoint(id: CheckpointId): Checkpoint """ @@ -2876,8 +3156,9 @@ type Query { """ The coin objects that exist in the network. - The type field is a string of the inner type of the coin by which to filter (e.g. - `0x2::iota::IOTA`). If no type is provided, it will default to `0x2::iota::IOTA`. + The type field is a string of the inner type of the coin by which to + filter (e.g. `0x2::iota::IOTA`). If no type is provided, it will + default to `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ @@ -2897,8 +3178,8 @@ type Query { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): ObjectConnection! """ - Fetch the protocol config by protocol version (defaults to the latest protocol - version known to the GraphQL service). + Fetch the protocol config by protocol version (defaults to the latest + protocol version known to the GraphQL service). """ protocolConfig(protocolVersion: Int): ProtocolConfigs! """ @@ -2910,17 +3191,20 @@ type Query { """ coinMetadata(coinType: String!): CoinMetadata """ - Verify a zkLogin signature based on the provided transaction or personal message - based on current epoch, chain id, and latest JWKs fetched on-chain. If the - signature is valid, the function returns a `ZkLoginVerifyResult` with success as - true and an empty list of errors. If the signature is invalid, the function returns + Verify a zkLogin signature based on the provided transaction or personal + message based on current epoch, chain id, and latest JWKs fetched + on-chain. If the signature is valid, the function returns a + `ZkLoginVerifyResult` with success as true and an empty list of + errors. If the signature is invalid, the function returns a `ZkLoginVerifyResult` with success as false with a list of errors. - - `bytes` is either the personal message in raw bytes or transaction data bytes in - BCS-encoded and then Base64-encoded. + - `bytes` is either the personal message in raw bytes or transaction + data bytes in BCS-encoded and then Base64-encoded. - `signature` is a serialized zkLogin signature that is Base64-encoded. - - `intentScope` is an enum that specifies the intent scope to be used to parse bytes. - - `author` is the address of the signer of the transaction or personal msg. + - `intentScope` is an enum that specifies the intent scope to be used to + parse bytes. + - `author` is the address of the signer of the transaction or personal + msg. """ verifyZkloginSignature(bytes: Base64!, signature: Base64!, intentScope: ZkLoginIntentScope!, author: IotaAddress!): ZkLoginVerifyResult! } @@ -2967,8 +3251,8 @@ type Receiving { """ version: Int! """ - 32-byte hash that identifies the object's contents at this version, encoded as a Base58 - string. + 32-byte hash that identifies the object's contents at this version, + encoded as a Base58 string. """ digest: String! """ @@ -2986,8 +3270,9 @@ type Result { """ cmd: Int! """ - If the previous command returns multiple values, this is the index of the individual result - among the multiple results from that command (also 0-indexed). + If the previous command returns multiple values, this is the index of + the individual result among the multiple results from that command + (also 0-indexed). """ ix: Int } @@ -2997,13 +3282,15 @@ Information about whether epoch changes are using safe mode. """ type SafeMode { """ - Whether safe mode was used for the last epoch change. The system will retry a full epoch - change on every epoch boundary and automatically reset this flag if so. + Whether safe mode was used for the last epoch change. The system will + retry a full epoch change on every epoch boundary and automatically + reset this flag if so. """ enabled: Boolean """ - Accumulated fees for computation and cost that have not been added to the various reward - pools, because the full epoch change did not happen. + Accumulated fees for computation and cost that have not been added to + the various reward pools, because the full epoch change did not + happen. """ gasSummary: GasCostSummary } @@ -3025,25 +3312,29 @@ type ServiceConfig { """ maxQueryDepth: Int! """ - The maximum number of nodes (field names) the service will accept in a single query. + The maximum number of nodes (field names) the service will accept in a + single query. """ maxQueryNodes: Int! """ The maximum number of output nodes in a GraphQL response. - Non-connection nodes have a count of 1, while connection nodes are counted as - the specified 'first' or 'last' number of items, or the default_page_size - as set by the server if those arguments are not set. + Non-connection nodes have a count of 1, while connection nodes are + counted as the specified 'first' or 'last' number of items, or the + default_page_size as set by the server if those arguments are not + set. - Counts accumulate multiplicatively down the query tree. For example, if a query starts - with a connection of first: 10 and has a field to a connection with last: 20, the count - at the second level would be 200 nodes. This is then summed to the count of 10 nodes - at the first level, for a total of 210 nodes. + Counts accumulate multiplicatively down the query tree. For example, if + a query starts with a connection of first: 10 and has a field to a + connection with last: 20, the count at the second level would be 200 + nodes. This is then summed to the count of 10 nodes at the first + level, for a total of 210 nodes. """ maxOutputNodes: Int! """ - Maximum estimated cost of a database query used to serve a GraphQL request. This is - measured in the same units that the database uses in EXPLAIN queries. + Maximum estimated cost of a database query used to serve a GraphQL + request. This is measured in the same units that the database uses + in EXPLAIN queries. """ maxDbQueryCost: BigInt! """ @@ -3063,28 +3354,31 @@ type ServiceConfig { """ maxQueryPayloadSize: Int! """ - Maximum nesting allowed in type arguments in Move Types resolved by this service. + Maximum nesting allowed in type arguments in Move Types resolved by this + service. """ maxTypeArgumentDepth: Int! """ - Maximum number of type arguments passed into a generic instantiation of a Move Type resolved - by this service. + Maximum number of type arguments passed into a generic instantiation of + a Move Type resolved by this service. """ maxTypeArgumentWidth: Int! """ - Maximum number of structs that need to be processed when calculating the layout of a single - Move Type. + Maximum number of structs that need to be processed when calculating the + layout of a single Move Type. """ maxTypeNodes: Int! """ - Maximum nesting allowed in struct fields when calculating the layout of a single Move Type. + Maximum nesting allowed in struct fields when calculating the layout of + a single Move Type. """ maxMoveValueDepth: Int! } """ -A shared object is an object that is shared using the 0x2::transfer::share_object function. -Unlike owned objects, once an object is shared, it stays mutable and is accessible by anyone. +A shared object is an object that is shared using the +0x2::transfer::share_object function. Unlike owned objects, once an object +is shared, it stays mutable and is accessible by anyone. """ type Shared { initialSharedVersion: Int! @@ -3100,18 +3394,19 @@ type SharedInput { """ initialSharedVersion: Int! """ - Controls whether the transaction block can reference the shared object as a mutable - reference or by value. This has implications for scheduling: Transactions that just read - shared objects at a certain version (mutable = false) can be executed concurrently, while - transactions that write shared objects (mutable = true) must be executed serially with - respect to each other. + Controls whether the transaction block can reference the shared object + as a mutable reference or by value. This has implications for + scheduling: Transactions that just read shared objects at a certain + version (mutable = false) can be executed concurrently, while + transactions that write shared objects (mutable = true) must be executed + serially with respect to each other. """ mutable: Boolean! } """ -The transaction accepted a shared object as input, but it was deleted before the transaction -executed. +The transaction accepted a shared object as input, but it was deleted before +the transaction executed. """ type SharedObjectDelete { """ @@ -3119,13 +3414,13 @@ type SharedObjectDelete { """ address: IotaAddress! """ - The version of the shared object that was assigned to this transaction during by consensus, - during sequencing. + The version of the shared object that was assigned to this transaction + during by consensus, during sequencing. """ version: Int! """ - Whether this transaction intended to use this shared object mutably or not. See - `SharedInput.mutable` for further details. + Whether this transaction intended to use this shared object mutably or + not. See `SharedInput.mutable` for further details. """ mutable: Boolean! } @@ -3143,8 +3438,8 @@ type SharedObjectRead { """ version: Int! """ - 32-byte hash that identifies the object's contents at this version, encoded as a Base58 - string. + 32-byte hash that identifies the object's contents at this version, + encoded as a Base58 string. """ digest: String! """ @@ -3154,8 +3449,8 @@ type SharedObjectRead { } """ -Splits off coins with denominations in `amounts` from `coin`, returning multiple results (as -many as there are amounts.) +Splits off coins with denominations in `amounts` from `coin`, returning +multiple results (as many as there are amounts.) """ type SplitCoinsTransaction { """ @@ -3173,7 +3468,8 @@ The stake's possible status: active, pending, or unstaked. """ enum StakeStatus { """ - The stake object is active in a staking pool and it is generating rewards. + The stake object is active in a staking pool and it is generating + rewards. """ ACTIVE """ @@ -3191,27 +3487,28 @@ Parameters that control the distribution of the stake subsidy. """ type StakeSubsidy { """ - IOTA set aside for stake subsidies -- reduces over time as stake subsidies are paid out over - time. + IOTA set aside for stake subsidies -- reduces over time as stake + subsidies are paid out over time. """ balance: BigInt """ - Number of times stake subsidies have been distributed subsidies are distributed with other - staking rewards, at the end of the epoch. + Number of times stake subsidies have been distributed subsidies are + distributed with other staking rewards, at the end of the epoch. """ distributionCounter: Int """ - Amount of stake subsidy deducted from the balance per distribution -- decays over time. + Amount of stake subsidy deducted from the balance per distribution -- + decays over time. """ currentDistributionAmount: BigInt """ - Maximum number of stake subsidy distributions that occur with the same distribution amount - (before the amount is reduced). + Maximum number of stake subsidy distributions that occur with the same + distribution amount (before the amount is reduced). """ periodLength: Int """ - Percentage of the current distribution amount to deduct at the end of the current subsidy - period, expressed in basis points. + Percentage of the current distribution amount to deduct at the end of + the current subsidy period, expressed in basis points. """ decreaseRate: Int } @@ -3226,8 +3523,8 @@ type StakedIota implements IMoveObject & IObject & IOwner { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this object. If type is not supplied, - it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this object. If + type is not supplied, it defaults to `0x2::iota::IOTA`. """ balance(type: String): Balance """ @@ -3237,7 +3534,8 @@ type StakedIota implements IMoveObject & IObject & IOwner { """ The coin objects for this object. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ @@ -3245,27 +3543,31 @@ type StakedIota implements IMoveObject & IObject & IOwner { """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this object. + The domain explicitly configured as the default domain pointing to this + object. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this object. These grant the owner the capability to - manage the associated domain. + The IotansRegistration NFTs owned by this object. These grant the owner + the capability to manage the associated domain. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! version: Int! """ - The current status of the object as read from the off-chain store. The possible states are: - NOT_INDEXED, the object is loaded from serialized data, such as the contents of a genesis or - system package upgrade transaction. LIVE, the version returned is the most recent for the - object, and it is not deleted or wrapped at that version. HISTORICAL, the object was - referenced at a specific version or checkpoint, so is fetched from historical tables and may - not be the latest version of the object. WRAPPED_OR_DELETED, the object is deleted or - wrapped and only partial information can be loaded." + The current status of the object as read from the off-chain store. The + possible states are: NOT_INDEXED, the object is loaded from + serialized data, such as the contents of a genesis or system package + upgrade transaction. LIVE, the version returned is the most recent for + the object, and it is not deleted or wrapped at that version. + HISTORICAL, the object was referenced at a specific version or + checkpoint, so is fetched from historical tables and may not be the + latest version of the object. WRAPPED_OR_DELETED, the object is deleted + or wrapped and only partial information can be loaded." """ status: ObjectKind! """ - 32-byte hash that identifies the object's contents, encoded as a Base58 string. + 32-byte hash that identifies the object's contents, encoded as a Base58 + string. """ digest: String """ @@ -3277,8 +3579,9 @@ type StakedIota implements IMoveObject & IObject & IOwner { """ previousTransactionBlock: TransactionBlock """ - The amount of IOTA we would rebate if this object gets deleted or mutated. This number is - recalculated based on the present storage gas price. + The amount of IOTA we would rebate if this object gets deleted or + mutated. This number is recalculated based on the present storage + gas price. """ storageRebate: BigInt """ @@ -3290,47 +3593,49 @@ type StakedIota implements IMoveObject & IObject & IOwner { """ bcs: Base64 """ - Displays the contents of the Move object in a JSON string and through GraphQL types. Also - provides the flat representation of the type signature, and the BCS of the corresponding - data. + Displays the contents of the Move object in a JSON string and through + GraphQL types. Also provides the flat representation of the type + signature, and the BCS of the corresponding data. """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the TransferObjects - transaction command or `iota::transfer::public_transfer`, both of which require the object to + Determines whether a transaction can transfer this object, using the + TransferObjects transaction command or + `iota::transfer::public_transfer`, both of which require the object to have the `key` and `store` abilities. """ hasPublicTransfer: Boolean! """ - The set of named templates defined on-chain for the type of this object, to be handled - off-chain. The server substitutes data from the object into these templates to generate a - display string per template. + The set of named templates defined on-chain for the type of this object, + to be handled off-chain. The server substitutes data from the object + into these templates to generate a display string per template. """ display: [DisplayEntry!] """ - Access a dynamic field on an object using its name. Names are arbitrary Move values whose - type have `copy`, `drop`, and `store`, and are specified using their type, and their BCS - contents, Base64 encoded. + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have `copy`, `drop`, and `store`, and are + specified using their type, and their BCS contents, Base64 encoded. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicField(name: DynamicFieldName!): DynamicField """ - Access a dynamic object field on an object using its name. Names are arbitrary Move values - whose type have `copy`, `drop`, and `store`, and are specified using their type, and their - BCS contents, Base64 encoded. The value of a dynamic object field can also be accessed + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have `copy`, `drop`, and `store`, + and are specified using their type, and their BCS contents, Base64 + encoded. The value of a dynamic object field can also be accessed off-chain directly via its address (e.g. using `Query.object`). - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicObjectField(name: DynamicFieldName!): DynamicField """ The dynamic fields and dynamic object fields on an object. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! """ @@ -3360,7 +3665,8 @@ type StakedIota implements IMoveObject & IObject & IOwner { Or 0, if this value is negative, where: - - `initial_stake_rate` is the stake rate at the epoch this stake was activated at. + - `initial_stake_rate` is the stake rate at the epoch this stake was + activated at. - `current_stake_rate` is the stake rate in the current epoch. This value is only available if the stake is active. @@ -3406,170 +3712,17 @@ type StorageFund { """ totalObjectStorageRebates: BigInt """ - The portion of the storage fund that will never be refunded through storage rebates. + The portion of the storage fund that will never be refunded through + storage rebates. - The system maintains an invariant that the sum of all storage fees into the storage fund is - equal to the sum of of all storage rebates out, the total storage rebates remaining, and the - non-refundable balance. + The system maintains an invariant that the sum of all storage fees into + the storage fund is equal to the sum of of all storage rebates out, + the total storage rebates remaining, and the non-refundable balance. """ nonRefundableBalance: BigInt } -""" -String containing 32B hex-encoded address, with a leading "0x". Leading zeroes can be omitted on input but will always appear in outputs (IotaAddress in output is guaranteed to be 66 characters long). -""" -scalar IotaAddress - -type IotansRegistration implements IMoveObject & IObject & IOwner { - address: IotaAddress! - """ - Objects owned by this object, optionally `filter`-ed. - """ - objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! - """ - Total balance of all coins with marker type owned by this object. If type is not supplied, - it defaults to `0x2::iota::IOTA`. - """ - balance(type: String): Balance - """ - The balances of all coin types owned by this object. - """ - balances(first: Int, after: String, last: Int, before: String): BalanceConnection! - """ - The coin objects for this object. - - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. - """ - coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! - """ - The `0x3::staking_pool::StakedIota` objects owned by this object. - """ - stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! - """ - The domain explicitly configured as the default domain pointing to this object. - """ - defaultIotansName(format: DomainFormat): String - """ - The IotansRegistration NFTs owned by this object. These grant the owner the capability to - manage the associated domain. - """ - iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! - version: Int! - """ - The current status of the object as read from the off-chain store. The possible states are: - NOT_INDEXED, the object is loaded from serialized data, such as the contents of a genesis or - system package upgrade transaction. LIVE, the version returned is the most recent for the - object, and it is not deleted or wrapped at that version. HISTORICAL, the object was - referenced at a specific version or checkpoint, so is fetched from historical tables and may - not be the latest version of the object. WRAPPED_OR_DELETED, the object is deleted or - wrapped and only partial information can be loaded." - """ - status: ObjectKind! - """ - 32-byte hash that identifies the object's contents, encoded as a Base58 string. - """ - digest: String - """ - The owner type of this object: Immutable, Shared, Parent, Address - """ - owner: ObjectOwner - """ - The transaction block that created this version of the object. - """ - previousTransactionBlock: TransactionBlock - """ - The amount of IOTA we would rebate if this object gets deleted or mutated. This number is - recalculated based on the present storage gas price. - """ - storageRebate: BigInt - """ - The transaction blocks that sent objects to this object. - """ - receivedTransactionBlocks(first: Int, after: String, last: Int, before: String, filter: TransactionBlockFilter): TransactionBlockConnection! - """ - The Base64-encoded BCS serialization of the object's content. - """ - bcs: Base64 - """ - Displays the contents of the Move object in a JSON string and through GraphQL types. Also - provides the flat representation of the type signature, and the BCS of the corresponding - data. - """ - contents: MoveValue - """ - Determines whether a transaction can transfer this object, using the TransferObjects - transaction command or `iota::transfer::public_transfer`, both of which require the object to - have the `key` and `store` abilities. - """ - hasPublicTransfer: Boolean! - """ - The set of named templates defined on-chain for the type of this object, to be handled - off-chain. The server substitutes data from the object into these templates to generate a - display string per template. - """ - display: [DisplayEntry!] - """ - Access a dynamic field on an object using its name. Names are arbitrary Move values whose - type have `copy`, `drop`, and `store`, and are specified using their type, and their BCS - contents, Base64 encoded. - - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. - """ - dynamicField(name: DynamicFieldName!): DynamicField - """ - Access a dynamic object field on an object using its name. Names are arbitrary Move values - whose type have `copy`, `drop`, and `store`, and are specified using their type, and their - BCS contents, Base64 encoded. The value of a dynamic object field can also be accessed - off-chain directly via its address (e.g. using `Query.object`). - - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. - """ - dynamicObjectField(name: DynamicFieldName!): DynamicField - """ - The dynamic fields and dynamic object fields on an object. - - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. - """ - dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! - """ - Domain name of the IotansRegistration object - """ - domain: String! -} - -type IotansRegistrationConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - """ - A list of edges. - """ - edges: [IotansRegistrationEdge!]! - """ - A list of nodes. - """ - nodes: [IotansRegistration!]! -} - -""" -An edge in a connection. -""" -type IotansRegistrationEdge { - """ - The item at the end of the edge - """ - node: IotansRegistration! - """ - A cursor for use in pagination - """ - cursor: String! -} - """ Details of the system that are decided during genesis. """ @@ -3595,18 +3748,20 @@ type SystemParameters { """ minValidatorJoiningStake: BigInt """ - Validators with stake below this threshold will enter the grace period (see - `validatorLowStakeGracePeriod`), after which they are removed from the active validator set. + Validators with stake below this threshold will enter the grace period + (see `validatorLowStakeGracePeriod`), after which they are removed + from the active validator set. """ validatorLowStakeThreshold: BigInt """ - Validators with stake below this threshold will be removed from the active validator set - at the next epoch boundary, without a grace period. + Validators with stake below this threshold will be removed from the + active validator set at the next epoch boundary, without a grace + period. """ validatorVeryLowStakeThreshold: BigInt """ - The number of epochs that a validator has to recover from having less than - `validatorLowStakeThreshold` stake. + The number of epochs that a validator has to recover from having less + than `validatorLowStakeThreshold` stake. """ validatorLowStakeGracePeriod: BigInt } @@ -3618,45 +3773,50 @@ union TransactionArgument = GasCoin | Input | Result type TransactionBlock { """ - A 32-byte hash that uniquely identifies the transaction block contents, encoded in Base58. - This serves as a unique id for the block on chain. + A 32-byte hash that uniquely identifies the transaction block contents, + encoded in Base58. This serves as a unique id for the block on + chain. """ digest: String """ - The address corresponding to the public key that signed this transaction. System - transactions do not have senders. + The address corresponding to the public key that signed this + transaction. System transactions do not have senders. """ sender: Address """ - The gas input field provides information on what objects were used as gas as well as the - owner of the gas object(s) and information on the gas price and budget. + The gas input field provides information on what objects were used as + gas as well as the owner of the gas object(s) and information on the + gas price and budget. - If the owner of the gas object(s) is not the same as the sender, the transaction block is a - sponsored transaction block. + If the owner of the gas object(s) is not the same as the sender, the + transaction block is a sponsored transaction block. """ gasInput: GasInput """ - The type of this transaction as well as the commands and/or parameters comprising the - transaction of this kind. + The type of this transaction as well as the commands and/or parameters + comprising the transaction of this kind. """ kind: TransactionBlockKind """ - A list of all signatures, Base64-encoded, from senders, and potentially the gas owner if - this is a sponsored transaction. + A list of all signatures, Base64-encoded, from senders, and potentially + the gas owner if this is a sponsored transaction. """ signatures: [Base64!] """ - The effects field captures the results to the chain of executing this transaction. + The effects field captures the results to the chain of executing this + transaction. """ effects: TransactionBlockEffects """ - This field is set by senders of a transaction block. It is an epoch reference that sets a - deadline after which validators will no longer consider the transaction valid. By default, - there is no deadline for when a transaction must execute. + This field is set by senders of a transaction block. It is an epoch + reference that sets a deadline after which validators will no longer + consider the transaction valid. By default, there is no deadline for + when a transaction must execute. """ expiration: Epoch """ - Serialized form of this transaction's `SenderSignedData`, BCS serialized and Base64 encoded. + Serialized form of this transaction's `SenderSignedData`, BCS serialized + and Base64 encoded. """ bcs: Base64 } @@ -3703,8 +3863,9 @@ type TransactionBlockEffects { """ status: ExecutionStatus """ - The latest version of all objects (apart from packages) that have been created or modified - by this transaction, immediately following this transaction. + The latest version of all objects (apart from packages) that have been + created or modified by this transaction, immediately following this + transaction. """ lamportVersion: Int! """ @@ -3720,7 +3881,8 @@ type TransactionBlockEffects { """ gasEffects: GasEffects """ - Shared objects that are referenced by but not changed by this transaction. + Shared objects that are referenced by but not changed by this + transaction. """ unchangedSharedObjects(first: Int, after: String, last: Int, before: String): UnchangedSharedObjectConnection! """ @@ -3728,8 +3890,8 @@ type TransactionBlockEffects { """ objectChanges(first: Int, after: String, last: Int, before: String): ObjectChangeConnection! """ - The effect this transaction had on the balances (sum of coin values per coin type) of - addresses and objects. + The effect this transaction had on the balances (sum of coin values per + coin type) of addresses and objects. """ balanceChanges(first: Int, after: String, last: Int, before: String): BalanceChangeConnection! """ @@ -3737,7 +3899,8 @@ type TransactionBlockEffects { """ events(first: Int, after: String, last: Int, before: String): EventConnection! """ - Timestamp corresponding to the checkpoint this transaction was finalized in. + Timestamp corresponding to the checkpoint this transaction was finalized + in. """ timestamp: DateTime """ @@ -3757,7 +3920,8 @@ type TransactionBlockEffects { input TransactionBlockFilter { function: String """ - An input filter selecting for either system or programmable transactions. + An input filter selecting for either system or programmable + transactions. """ kind: TransactionBlockKindInput afterCheckpoint: Int @@ -3771,7 +3935,8 @@ input TransactionBlockFilter { } """ -The kind of transaction block, either a programmable transaction or a system transaction. +The kind of transaction block, either a programmable transaction or a system +transaction. """ union TransactionBlockKind = ConsensusCommitPrologueTransaction | GenesisTransaction | ChangeEpochTransaction | ProgrammableTransactionBlock | AuthenticatorStateUpdateTransaction | RandomnessStateUpdateTransaction | EndOfEpochTransaction @@ -3823,10 +3988,10 @@ type TransactionInputEdge { """ The optional extra data a user can provide to a transaction dry run. -`sender` defaults to `0x0`. If gasObjects` is not present, or is an empty list, -it is substituted with a mock Coin object, `gasPrice` defaults to the reference -gas price, `gasBudget` defaults to the max gas budget and `gasSponsor` defaults -to the sender. +`sender` defaults to `0x0`. If gasObjects` is not present, or is an empty +list, it is substituted with a mock Coin object, `gasPrice` defaults to the +reference gas price, `gasBudget` defaults to the max gas budget and +`gasSponsor` defaults to the sender. """ input TransactionMetadata { sender: IotaAddress @@ -3837,8 +4002,8 @@ input TransactionMetadata { } """ -Transfers `inputs` to `address`. All inputs must have the `store` ability (allows public -transfer) and must not be previously immutable or shared. +Transfers `inputs` to `address`. All inputs must have the `store` ability +(allows public transfer) and must not be previously immutable or shared. """ type TransferObjectsTransaction { """ @@ -3870,10 +4035,10 @@ type TypeOrigin { } """ -Details pertaining to shared objects that are referenced by but not changed by a transaction. -This information is considered part of the effects, because although the transaction specifies -the shared object as input, consensus must schedule it and pick the version that is actually -used. +Details pertaining to shared objects that are referenced by but not changed +by a transaction. This information is considered part of the effects, +because although the transaction specifies the shared object as input, +consensus must schedule it and pick the version that is actually used. """ union UnchangedSharedObject = SharedObjectRead | SharedObjectDelete @@ -3911,7 +4076,8 @@ Upgrades a Move Package. """ type UpgradeTransaction { """ - Bytecode for the modules to be published, BCS serialized and Base64 encoded. + Bytecode for the modules to be published, BCS serialized and Base64 + encoded. """ modules: [Base64!]! """ @@ -3934,7 +4100,8 @@ type Validator { """ address: Address! """ - Validator's set of credentials such as public keys, network addresses and others. + Validator's set of credentials such as public keys, network addresses + and others. """ credentials: ValidatorCredentials """ @@ -3959,18 +4126,20 @@ type Validator { projectUrl: String """ The validator's current valid `Cap` object. Validators can delegate - the operation ability to another address. The address holding this `Cap` object - can then update the reference gas price and tallying rule on behalf of the validator. + the operation ability to another address. The address holding this `Cap` + object can then update the reference gas price and tallying rule on + behalf of the validator. """ operationCap: MoveObject """ - The validator's current staking pool object, used to track the amount of stake - and to compound staking rewards. + The validator's current staking pool object, used to track the amount of + stake and to compound staking rewards. """ stakingPool: MoveObject """ - The validator's current exchange object. The exchange rate is used to determine - the amount of IOTA tokens that each past IOTA staker can withdraw in the future. + The validator's current exchange object. The exchange rate is used to + determine the amount of IOTA tokens that each past IOTA staker can + withdraw in the future. """ exchangeRates: MoveObject """ @@ -3998,15 +4167,18 @@ type Validator { """ pendingStake: BigInt """ - Pending stake withdrawn during the current epoch, emptied at epoch boundaries. + Pending stake withdrawn during the current epoch, emptied at epoch + boundaries. """ pendingTotalIotaWithdraw: BigInt """ - Pending pool token withdrawn during the current epoch, emptied at epoch boundaries. + Pending pool token withdrawn during the current epoch, emptied at epoch + boundaries. """ pendingPoolTokenWithdraw: BigInt """ - The voting power of this validator in basis points (e.g., 100 = 1% voting power). + The voting power of this validator in basis points (e.g., 100 = 1% + voting power). """ votingPower: Int """ @@ -4094,16 +4266,18 @@ Representation of `0x3::validator_set::ValidatorSet`. """ type ValidatorSet { """ - Total amount of stake for all active validators at the beginning of the epoch. + Total amount of stake for all active validators at the beginning of the + epoch. """ totalStake: BigInt """ - Validators that are pending removal from the active validator set, expressed as indices in - to `activeValidators`. + Validators that are pending removal from the active validator set, + expressed as indices in to `activeValidators`. """ pendingRemovals: [Int!] """ - Object ID of the wrapped object `TableVec` storing the pending active validators. + Object ID of the wrapped object `TableVec` storing the pending active + validators. """ pendingActiveValidatorsId: IotaAddress """ @@ -4111,9 +4285,10 @@ type ValidatorSet { """ pendingActiveValidatorsSize: Int """ - Object ID of the `Table` storing the mapping from staking pool ids to the addresses - of the corresponding validators. This is needed because a validator's address - can potentially change but the object ID of its pool will not. + Object ID of the `Table` storing the mapping from staking pool ids to + the addresses of the corresponding validators. This is needed + because a validator's address can potentially change but the object + ID of its pool will not. """ stakingPoolMappingsId: IotaAddress """ @@ -4143,8 +4318,8 @@ type ValidatorSet { } """ -An enum that specifies the intent scope to be used to parse the bytes for signature -verification. +An enum that specifies the intent scope to be used to parse the bytes for +signature verification. """ enum ZkLoginIntentScope { """ diff --git a/crates/iota-graphql-rpc/schema/draft_target_schema.graphql b/crates/iota-graphql-rpc/schema/draft_target_schema.graphql index 9a78bf006ac..ff077416b9a 100644 --- a/crates/iota-graphql-rpc/schema/draft_target_schema.graphql +++ b/crates/iota-graphql-rpc/schema/draft_target_schema.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/crates/iota-graphql-rpc/src/types/cursor.rs b/crates/iota-graphql-rpc/src/types/cursor.rs index 8c2563651ac..c0477618d17 100644 --- a/crates/iota-graphql-rpc/src/types/cursor.rs +++ b/crates/iota-graphql-rpc/src/types/cursor.rs @@ -46,7 +46,7 @@ pub(crate) struct Page { /// In case there are more than `limit` entries in the range described by /// `(after, before)`, this field states whether the entries up to limit - /// are taken fron the `Front` or `Back` of that range. + /// are taken from the `Front` or `Back` of that range. end: End, } diff --git a/crates/iota-graphql-rpc/src/types/move_object.rs b/crates/iota-graphql-rpc/src/types/move_object.rs index cafc12eff87..fe4ad9fbf20 100644 --- a/crates/iota-graphql-rpc/src/types/move_object.rs +++ b/crates/iota-graphql-rpc/src/types/move_object.rs @@ -50,6 +50,7 @@ pub(crate) enum MoveObjectDowncastError { /// This interface is implemented by types that represent a Move object on-chain /// (A Move value whose type has `key`). +#[allow(clippy::duplicated_attributes)] #[derive(Interface)] #[graphql( name = "IMoveObject", diff --git a/crates/iota-graphql-rpc/src/types/object.rs b/crates/iota-graphql-rpc/src/types/object.rs index 3e550d1ca00..14e65a3f0ae 100644 --- a/crates/iota-graphql-rpc/src/types/object.rs +++ b/crates/iota-graphql-rpc/src/types/object.rs @@ -227,6 +227,7 @@ pub(crate) struct HistoricalObjectCursor { /// Interface implemented by on-chain values that are addressable by an ID (also /// referred to as its address). This includes Move objects and packages. +#[allow(clippy::duplicated_attributes)] #[derive(Interface)] #[graphql( name = "IObject", diff --git a/crates/iota-graphql-rpc/src/types/owner.rs b/crates/iota-graphql-rpc/src/types/owner.rs index 4b24775b561..136ebef4357 100644 --- a/crates/iota-graphql-rpc/src/types/owner.rs +++ b/crates/iota-graphql-rpc/src/types/owner.rs @@ -49,6 +49,7 @@ pub(crate) struct OwnerImpl { /// either the public key of an account or another object. The same address can /// only refer to an account or an object, never both, but it is not possible to /// know which up-front. +#[allow(clippy::duplicated_attributes)] #[derive(Interface)] #[graphql( name = "IOwner", diff --git a/crates/iota-graphql-rpc/tests/snapshots/snapshot_tests__schema_sdl_export.snap b/crates/iota-graphql-rpc/tests/snapshots/snapshot_tests__schema_sdl_export.snap index 752ce4a67ed..d6cf62b6d09 100644 --- a/crates/iota-graphql-rpc/tests/snapshots/snapshot_tests__schema_sdl_export.snap +++ b/crates/iota-graphql-rpc/tests/snapshots/snapshot_tests__schema_sdl_export.snap @@ -8,7 +8,8 @@ type ActiveJwk { """ iss: String! """ - The string (Key ID) that identifies the JWK among a set of JWKs, (RFC 7517, Section 4.5). + The string (Key ID) that identifies the JWK among a set of JWKs, (RFC + 7517, Section 4.5). """ kid: String! """ @@ -63,7 +64,8 @@ type ActiveJwkEdge { } """ -The 32-byte address that is an account address (corresponding to a public key). +The 32-byte address that is an account address (corresponding to a public +key). """ type Address implements IOwner { address: IotaAddress! @@ -72,8 +74,8 @@ type Address implements IOwner { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this address. If type is not supplied, - it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this address. If + type is not supplied, it defaults to `0x2::iota::IOTA`. """ balance(type: String): Balance """ @@ -83,7 +85,8 @@ type Address implements IOwner { """ The coin objects for this address. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ @@ -91,17 +94,19 @@ type Address implements IOwner { """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this address. + The domain explicitly configured as the default domain pointing to this + address. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this address. These grant the owner the capability to - manage the associated domain. + The IotansRegistration NFTs owned by this address. These grant the owner + the capability to manage the associated domain. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! """ - Similar behavior to the `transactionBlocks` in Query but supporting the additional - `AddressTransactionBlockRelationship` filter, which defaults to `SIGN`. + Similar behavior to the `transactionBlocks` in Query but supporting the + additional `AddressTransactionBlockRelationship` filter, which + defaults to `SIGN`. """ transactionBlocks(first: Int, after: String, last: Int, before: String, relation: AddressTransactionBlockRelationship, filter: TransactionBlockFilter): TransactionBlockConnection! } @@ -138,14 +143,16 @@ type AddressEdge { """ An address-owned object is owned by a specific 32-byte address that is either an account address (derived from a particular signature scheme) or -an object ID. An address-owned object is accessible only to its owner and no others. +an object ID. An address-owned object is accessible only to its owner and no +others. """ type AddressOwner { owner: Owner } """ -The possible relationship types for a transaction block: sign, sent, received, or paid. +The possible relationship types for a transaction block: sign, sent, +received, or paid. """ enum AddressTransactionBlockRelationship { """ @@ -202,7 +209,8 @@ type AuthenticatorStateUpdateTransaction { } """ -Range of checkpoints that the RPC is guaranteed to produce a consistent response for. +Range of checkpoints that the RPC is guaranteed to produce a consistent +response for. """ type AvailableRange { first: Checkpoint @@ -228,7 +236,8 @@ type Balance { } """ -Effects to the balance (sum of coin values per coin type) owned by an address or object. +Effects to the balance (sum of coin values per coin type) owned by an +address or object. """ type BalanceChange { """ @@ -236,7 +245,8 @@ type BalanceChange { """ owner: Owner """ - The inner type of the coin whose balance has changed (e.g. `0x2::iota::IOTA`). + The inner type of the coin whose balance has changed (e.g. + `0x2::iota::IOTA`). """ coinType: MoveType """ @@ -315,9 +325,10 @@ scalar BigInt """ -A system transaction that updates epoch information on-chain (increments the current epoch). -Executed by the system once per epoch, without using gas. Epoch change transactions cannot be -submitted by users, because validators will refuse to sign them. +A system transaction that updates epoch information on-chain (increments the +current epoch). Executed by the system once per epoch, without using gas. +Epoch change transactions cannot be submitted by users, because validators +will refuse to sign them. This transaction kind is deprecated in favour of `EndOfEpochTransaction`. """ @@ -331,20 +342,23 @@ type ChangeEpochTransaction { """ protocolVersion: Int! """ - The total amount of gas charged for storage during the previous epoch (in MICROS). + The total amount of gas charged for storage during the previous epoch + (in MICROS). """ storageCharge: BigInt! """ - The total amount of gas charged for computation during the previous epoch (in MICROS). + The total amount of gas charged for computation during the previous + epoch (in MICROS). """ computationCharge: BigInt! """ - The IOTA returned to transaction senders for cleaning up objects (in MICROS). + The IOTA returned to transaction senders for cleaning up objects (in + MICROS). """ storageRebate: BigInt! """ - The total gas retained from storage fees, that will not be returned by storage rebates when - the relevant objects are cleaned up (in MICROS). + The total gas retained from storage fees, that will not be returned by + storage rebates when the relevant objects are cleaned up (in MICROS). """ nonRefundableStorageFee: BigInt! """ @@ -352,37 +366,39 @@ type ChangeEpochTransaction { """ startTimestamp: DateTime! """ - System packages (specifically framework and move stdlib) that are written before the new - epoch starts, to upgrade them on-chain. Validators write these packages out when running the - transaction. + System packages (specifically framework and move stdlib) that are + written before the new epoch starts, to upgrade them on-chain. + Validators write these packages out when running the transaction. """ systemPackages(first: Int, after: String, last: Int, before: String): MovePackageConnection! } """ -Checkpoints contain finalized transactions and are used for node synchronization -and global transaction ordering. +Checkpoints contain finalized transactions and are used for node +synchronization and global transaction ordering. """ type Checkpoint { """ - A 32-byte hash that uniquely identifies the checkpoint contents, encoded in Base58. This - hash can be used to verify checkpoint contents by checking signatures against the committee, - Hashing contents to match digest, and checking that the previous checkpoint digest matches. + A 32-byte hash that uniquely identifies the checkpoint contents, encoded + in Base58. This hash can be used to verify checkpoint contents by + checking signatures against the committee, Hashing contents to match + digest, and checking that the previous checkpoint digest matches. """ digest: String! """ - This checkpoint's position in the total order of finalized checkpoints, agreed upon by - consensus. + This checkpoint's position in the total order of finalized checkpoints, + agreed upon by consensus. """ sequenceNumber: Int! """ - The timestamp at which the checkpoint is agreed to have happened according to consensus. - Transactions that access time in this checkpoint will observe this timestamp. + The timestamp at which the checkpoint is agreed to have happened + according to consensus. Transactions that access time in this + checkpoint will observe this timestamp. """ timestamp: DateTime! """ - This is an aggregation of signatures from a quorum of validators for the checkpoint - proposal. + This is an aggregation of signatures from a quorum of validators for the + checkpoint proposal. """ validatorSignatures: Base64! """ @@ -390,13 +406,15 @@ type Checkpoint { """ previousCheckpointDigest: String """ - The total number of transaction blocks in the network by the end of this checkpoint. + The total number of transaction blocks in the network by the end of this + checkpoint. """ networkTotalTransactions: Int """ - The computation cost, storage cost, storage rebate, and non-refundable storage fee - accumulated during this epoch, up to and including this checkpoint. These values increase - monotonically across checkpoints in the same epoch, and reset on epoch boundaries. + The computation cost, storage cost, storage rebate, and non-refundable + storage fee accumulated during this epoch, up to and including this + checkpoint. These values increase monotonically across checkpoints + in the same epoch, and reset on epoch boundaries. """ rollingGasSummary: GasCostSummary """ @@ -439,7 +457,8 @@ type CheckpointEdge { } """ -Filter either by the digest, or the sequence number, or neither, to get the latest checkpoint. +Filter either by the digest, or the sequence number, or neither, to get the +latest checkpoint. """ input CheckpointId { digest: String @@ -456,8 +475,8 @@ type Coin implements IMoveObject & IObject & IOwner { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this object. If type is not supplied, - it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this object. If + type is not supplied, it defaults to `0x2::iota::IOTA`. """ balance(type: String): Balance """ @@ -467,7 +486,8 @@ type Coin implements IMoveObject & IObject & IOwner { """ The coin objects for this object. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ @@ -475,27 +495,31 @@ type Coin implements IMoveObject & IObject & IOwner { """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this object. + The domain explicitly configured as the default domain pointing to this + object. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this object. These grant the owner the capability to - manage the associated domain. + The IotansRegistration NFTs owned by this object. These grant the owner + the capability to manage the associated domain. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! version: Int! """ - The current status of the object as read from the off-chain store. The possible states are: - NOT_INDEXED, the object is loaded from serialized data, such as the contents of a genesis or - system package upgrade transaction. LIVE, the version returned is the most recent for the - object, and it is not deleted or wrapped at that version. HISTORICAL, the object was - referenced at a specific version or checkpoint, so is fetched from historical tables and may - not be the latest version of the object. WRAPPED_OR_DELETED, the object is deleted or - wrapped and only partial information can be loaded." + The current status of the object as read from the off-chain store. The + possible states are: NOT_INDEXED, the object is loaded from + serialized data, such as the contents of a genesis or system package + upgrade transaction. LIVE, the version returned is the most recent for + the object, and it is not deleted or wrapped at that version. + HISTORICAL, the object was referenced at a specific version or + checkpoint, so is fetched from historical tables and may not be the + latest version of the object. WRAPPED_OR_DELETED, the object is deleted + or wrapped and only partial information can be loaded." """ status: ObjectKind! """ - 32-byte hash that identifies the object's contents, encoded as a Base58 string. + 32-byte hash that identifies the object's contents, encoded as a Base58 + string. """ digest: String """ @@ -507,8 +531,9 @@ type Coin implements IMoveObject & IObject & IOwner { """ previousTransactionBlock: TransactionBlock """ - The amount of IOTA we would rebate if this object gets deleted or mutated. This number is - recalculated based on the present storage gas price. + The amount of IOTA we would rebate if this object gets deleted or + mutated. This number is recalculated based on the present storage + gas price. """ storageRebate: BigInt """ @@ -520,47 +545,49 @@ type Coin implements IMoveObject & IObject & IOwner { """ bcs: Base64 """ - Displays the contents of the Move object in a JSON string and through GraphQL types. Also - provides the flat representation of the type signature, and the BCS of the corresponding - data. + Displays the contents of the Move object in a JSON string and through + GraphQL types. Also provides the flat representation of the type + signature, and the BCS of the corresponding data. """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the TransferObjects - transaction command or `iota::transfer::public_transfer`, both of which require the object to + Determines whether a transaction can transfer this object, using the + TransferObjects transaction command or + `iota::transfer::public_transfer`, both of which require the object to have the `key` and `store` abilities. """ hasPublicTransfer: Boolean! """ - The set of named templates defined on-chain for the type of this object, to be handled - off-chain. The server substitutes data from the object into these templates to generate a - display string per template. + The set of named templates defined on-chain for the type of this object, + to be handled off-chain. The server substitutes data from the object + into these templates to generate a display string per template. """ display: [DisplayEntry!] """ - Access a dynamic field on an object using its name. Names are arbitrary Move values whose - type have `copy`, `drop`, and `store`, and are specified using their type, and their BCS - contents, Base64 encoded. + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have `copy`, `drop`, and `store`, and are + specified using their type, and their BCS contents, Base64 encoded. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicField(name: DynamicFieldName!): DynamicField """ - Access a dynamic object field on an object using its name. Names are arbitrary Move values - whose type have `copy`, `drop`, and `store`, and are specified using their type, and their - BCS contents, Base64 encoded. The value of a dynamic object field can also be accessed + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have `copy`, `drop`, and `store`, + and are specified using their type, and their BCS contents, Base64 + encoded. The value of a dynamic object field can also be accessed off-chain directly via its address (e.g. using `Query.object`). - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicObjectField(name: DynamicFieldName!): DynamicField """ The dynamic fields and dynamic object fields on an object. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! """ @@ -615,8 +642,8 @@ type CoinMetadata implements IMoveObject & IObject & IOwner { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this object. If type is not supplied, - it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this object. If + type is not supplied, it defaults to `0x2::iota::IOTA`. """ balance(type: String): Balance """ @@ -626,7 +653,8 @@ type CoinMetadata implements IMoveObject & IObject & IOwner { """ The coin objects for this object. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ @@ -634,27 +662,31 @@ type CoinMetadata implements IMoveObject & IObject & IOwner { """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this object. + The domain explicitly configured as the default domain pointing to this + object. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this object. These grant the owner the capability to - manage the associated domain. + The IotansRegistration NFTs owned by this object. These grant the owner + the capability to manage the associated domain. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! version: Int! """ - The current status of the object as read from the off-chain store. The possible states are: - NOT_INDEXED, the object is loaded from serialized data, such as the contents of a genesis or - system package upgrade transaction. LIVE, the version returned is the most recent for the - object, and it is not deleted or wrapped at that version. HISTORICAL, the object was - referenced at a specific version or checkpoint, so is fetched from historical tables and may - not be the latest version of the object. WRAPPED_OR_DELETED, the object is deleted or - wrapped and only partial information can be loaded." + The current status of the object as read from the off-chain store. The + possible states are: NOT_INDEXED, the object is loaded from + serialized data, such as the contents of a genesis or system package + upgrade transaction. LIVE, the version returned is the most recent for + the object, and it is not deleted or wrapped at that version. + HISTORICAL, the object was referenced at a specific version or + checkpoint, so is fetched from historical tables and may not be the + latest version of the object. WRAPPED_OR_DELETED, the object is deleted + or wrapped and only partial information can be loaded." """ status: ObjectKind! """ - 32-byte hash that identifies the object's contents, encoded as a Base58 string. + 32-byte hash that identifies the object's contents, encoded as a Base58 + string. """ digest: String """ @@ -666,8 +698,9 @@ type CoinMetadata implements IMoveObject & IObject & IOwner { """ previousTransactionBlock: TransactionBlock """ - The amount of IOTA we would rebate if this object gets deleted or mutated. This number is - recalculated based on the present storage gas price. + The amount of IOTA we would rebate if this object gets deleted or + mutated. This number is recalculated based on the present storage + gas price. """ storageRebate: BigInt """ @@ -679,47 +712,49 @@ type CoinMetadata implements IMoveObject & IObject & IOwner { """ bcs: Base64 """ - Displays the contents of the Move object in a JSON string and through GraphQL types. Also - provides the flat representation of the type signature, and the BCS of the corresponding - data. + Displays the contents of the Move object in a JSON string and through + GraphQL types. Also provides the flat representation of the type + signature, and the BCS of the corresponding data. """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the TransferObjects - transaction command or `iota::transfer::public_transfer`, both of which require the object to + Determines whether a transaction can transfer this object, using the + TransferObjects transaction command or + `iota::transfer::public_transfer`, both of which require the object to have the `key` and `store` abilities. """ hasPublicTransfer: Boolean! """ - The set of named templates defined on-chain for the type of this object, to be handled - off-chain. The server substitutes data from the object into these templates to generate a - display string per template. + The set of named templates defined on-chain for the type of this object, + to be handled off-chain. The server substitutes data from the object + into these templates to generate a display string per template. """ display: [DisplayEntry!] """ - Access a dynamic field on an object using its name. Names are arbitrary Move values whose - type have `copy`, `drop`, and `store`, and are specified using their type, and their BCS - contents, Base64 encoded. + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have `copy`, `drop`, and `store`, and are + specified using their type, and their BCS contents, Base64 encoded. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicField(name: DynamicFieldName!): DynamicField """ - Access a dynamic object field on an object using its name. Names are arbitrary Move values - whose type have `copy`, `drop`, and `store`, and are specified using their type, and their - BCS contents, Base64 encoded. The value of a dynamic object field can also be accessed + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have `copy`, `drop`, and `store`, + and are specified using their type, and their BCS contents, Base64 + encoded. The value of a dynamic object field can also be accessed off-chain directly via its address (e.g. using `Query.object`). - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicObjectField(name: DynamicFieldName!): DynamicField """ The dynamic fields and dynamic object fields on an object. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! """ @@ -746,8 +781,9 @@ type CoinMetadata implements IMoveObject & IObject & IOwner { } """ -System transaction that runs at the beginning of a checkpoint, and is responsible for setting -the current value of the clock, based on the timestamp from consensus. +System transaction that runs at the beginning of a checkpoint, and is +responsible for setting the current value of the clock, based on the +timestamp from consensus. """ type ConsensusCommitPrologueTransaction { """ @@ -763,8 +799,8 @@ type ConsensusCommitPrologueTransaction { """ commitTimestamp: DateTime! """ - Digest of consensus output, encoded as a Base58 string (only available from V2 of the - transaction). + Digest of consensus output, encoded as a Base58 string (only available + from V2 of the transaction). """ consensusCommitDigest: String } @@ -830,7 +866,8 @@ enum DomainFormat { type DryRunEffect { """ - Changes made to arguments that were mutably borrowed by each command in this transaction. + Changes made to arguments that were mutably borrowed by each command in + this transaction. """ mutatedReferences: [DryRunMutation!] """ @@ -851,8 +888,8 @@ type DryRunResult { """ error: String """ - The intermediate results for each command of the dry run execution, including - contents of mutated references and return values. + The intermediate results for each command of the dry run execution, + including contents of mutated references and return values. """ results: [DryRunEffect!] """ @@ -867,27 +904,30 @@ type DryRunReturn { } """ -Dynamic fields are heterogeneous fields that can be added or removed at runtime, -and can have arbitrary user-assigned names. There are two sub-types of dynamic -fields: +Dynamic fields are heterogeneous fields that can be added or removed at +runtime, and can have arbitrary user-assigned names. There are two sub-types +of dynamic fields: -1) Dynamic Fields can store any value that has the `store` ability, however an object -stored in this kind of field will be considered wrapped and will not be accessible -directly via its ID by external tools (explorers, wallets, etc) accessing storage. -2) Dynamic Object Fields values must be Iota objects (have the `key` and `store` -abilities, and id: UID as the first field), but will still be directly accessible off-chain -via their object ID after being attached. +1) Dynamic Fields can store any value that has the `store` ability, however +an object stored in this kind of field will be considered wrapped and +will not be accessible directly via its ID by external tools (explorers, +wallets, etc) accessing storage. +2) Dynamic Object Fields values must be Iota objects (have the `key` and +`store` abilities, and id: UID as the first field), but will still be +directly accessible off-chain via their object ID after being attached. """ type DynamicField { """ - The string type, data, and serialized value of the DynamicField's 'name' field. - This field is used to uniquely identify a child of the parent object. + The string type, data, and serialized value of the DynamicField's 'name' + field. This field is used to uniquely identify a child of the parent + object. """ name: MoveValue """ The actual data stored in the dynamic field. - The returned dynamic field is an object if its return type is MoveObject, - in which case it is also accessible off-chain via its address. + The returned dynamic field is an object if its return type is + MoveObject, in which case it is also accessible off-chain via its + address. """ value: DynamicFieldValue } @@ -924,7 +964,8 @@ type DynamicFieldEdge { input DynamicFieldName { """ The string type of the DynamicField's 'name' field. - A string representation of a Move primitive like 'u64', or a struct type like '0x2::kiosk::Listing' + A string representation of a Move primitive like 'u64', or a struct type + like '0x2::kiosk::Listing' """ type: String! """ @@ -936,13 +977,15 @@ input DynamicFieldName { union DynamicFieldValue = MoveObject | MoveValue """ -System transaction that supersedes `ChangeEpochTransaction` as the new way to run transactions -at the end of an epoch. Behaves similarly to `ChangeEpochTransaction` but can accommodate other -optional transactions to run at the end of the epoch. +System transaction that supersedes `ChangeEpochTransaction` as the new way +to run transactions at the end of an epoch. Behaves similarly to +`ChangeEpochTransaction` but can accommodate other optional transactions to +run at the end of the epoch. """ type EndOfEpochTransaction { """ - The list of system transactions that are allowed to run at the end of the epoch. + The list of system transactions that are allowed to run at the end of + the epoch. """ transactions(first: Int, before: String, last: Int, after: String): EndOfEpochTransactionKindConnection! } @@ -979,9 +1022,9 @@ type EndOfEpochTransactionKindEdge { } """ -Operation of the Iota network is temporally partitioned into non-overlapping epochs, -and the network aims to keep epochs roughly the same duration as each other. -During a particular epoch the following data is fixed: +Operation of the Iota network is temporally partitioned into non-overlapping +epochs, and the network aims to keep epochs roughly the same duration as +each other. During a particular epoch the following data is fixed: - the protocol version - the reference gas price @@ -989,11 +1032,13 @@ During a particular epoch the following data is fixed: """ type Epoch { """ - The epoch's id as a sequence number that starts at 0 and is incremented by one at every epoch change. + The epoch's id as a sequence number that starts at 0 and is incremented + by one at every epoch change. """ epochId: Int! """ - The minimum gas price that a quorum of validators are guaranteed to sign a transaction for. + The minimum gas price that a quorum of validators are guaranteed to sign + a transaction for. """ referenceGasPrice: BigInt """ @@ -1044,28 +1089,29 @@ type Epoch { """ fundInflow: BigInt """ - The storage fee rebates paid to users who deleted the data associated with past - transactions. + The storage fee rebates paid to users who deleted the data associated + with past transactions. """ fundOutflow: BigInt """ - The epoch's corresponding protocol configuration, including the feature flags and the - configuration options. + The epoch's corresponding protocol configuration, including the feature + flags and the configuration options. """ protocolConfigs: ProtocolConfigs! """ - IOTA set aside to account for objects stored on-chain, at the start of the epoch. - This is also used for storage rebates. + IOTA set aside to account for objects stored on-chain, at the start of + the epoch. This is also used for storage rebates. """ storageFund: StorageFund """ - Information about whether this epoch was started in safe mode, which happens if the full epoch - change logic fails for some reason. + Information about whether this epoch was started in safe mode, which + happens if the full epoch change logic fails for some reason. """ safeMode: SafeMode """ - The value of the `version` field of `0x5`, the `0x3::iota::IotaSystemState` object. This - version changes whenever the fields contained in the system state object (held in a dynamic + The value of the `version` field of `0x5`, the + `0x3::iota::IotaSystemState` object. This version changes whenever + the fields contained in the system state object (held in a dynamic field attached to `0x5`) change. """ systemStateVersion: Int @@ -1078,8 +1124,9 @@ type Epoch { """ systemStakeSubsidy: StakeSubsidy """ - A commitment by the committee at the end of epoch on the contents of the live object set at - that time. This can be used to verify state snapshots. + A commitment by the committee at the end of epoch on the contents of the + live object set at that time. This can be used to verify state + snapshots. """ liveObjectSetDigest: String """ @@ -1124,7 +1171,8 @@ type Event { """ Representation of a Move value in JSON, where: - - Addresses, IDs, and UIDs are represented in canonical form, as JSON strings. + - Addresses, IDs, and UIDs are represented in canonical form, as JSON + strings. - Bools are represented by JSON boolean literals. - u8, u16, and u32 are represented as JSON numbers. - u64, u128, and u256 are represented as JSON strings. @@ -1132,8 +1180,8 @@ type Event { - Structs are represented by JSON objects. - Empty optional values are represented by `null`. - This form is offered as a less verbose convenience in cases where the layout of the type is - known by the client. + This form is offered as a less verbose convenience in cases where the + layout of the type is known by the client. """ json: JSON! } @@ -1192,7 +1240,8 @@ input EventFilter { } """ -The result of an execution, including errors that occurred during said execution. +The result of an execution, including errors that occurred during said +execution. """ type ExecutionResult { """ @@ -1200,9 +1249,9 @@ type ExecutionResult { """ errors: [String!] """ - The effects of the executed transaction. Since the transaction was just executed - and not indexed yet, fields including `balance_changes`, `timestamp` and `checkpoint` - are not available. + The effects of the executed transaction. Since the transaction was just + executed and not indexed yet, fields including `balance_changes`, + `timestamp` and `checkpoint` are not available. """ effects: TransactionBlockEffects! } @@ -1222,12 +1271,13 @@ enum ExecutionStatus { } """ -Groups of features served by the RPC service. The GraphQL Service can be configured to enable -or disable these features. +Groups of features served by the RPC service. The GraphQL Service can be +configured to enable or disable these features. """ enum Feature { """ - Statistics about how the network was running (TPS, top packages, APY, etc) + Statistics about how the network was running (TPS, top packages, APY, + etc) """ ANALYTICS """ @@ -1255,8 +1305,9 @@ enum Feature { """ -Access to the gas inputs, after they have been smashed into one coin. The gas coin can only be -used by reference, except for with `TransferObjectsTransaction` that can accept it by value. +Access to the gas inputs, after they have been smashed into one coin. The +gas coin can only be used by reference, except for with +`TransferObjectsTransaction` that can accept it by value. """ type GasCoin { """ @@ -1278,20 +1329,22 @@ type GasCostSummary { """ storageCost: BigInt """ - Part of storage cost that can be reclaimed by cleaning up data created by this transaction - (when objects are deleted or an object is modified, which is treated as a deletion followed - by a creation) (in MICROS). + Part of storage cost that can be reclaimed by cleaning up data created + by this transaction (when objects are deleted or an object is + modified, which is treated as a deletion followed by a creation) (in + MICROS). """ storageRebate: BigInt """ - Part of storage cost that is not reclaimed when data created by this transaction is cleaned - up (in MICROS). + Part of storage cost that is not reclaimed when data created by this + transaction is cleaned up (in MICROS). """ nonRefundableStorageFee: BigInt } """ -Effects related to gas (costs incurred and the identity of the smashed gas object returned). +Effects related to gas (costs incurred and the identity of the smashed gas +object returned). """ type GasEffects { gasObject: Object @@ -1299,7 +1352,8 @@ type GasEffects { } """ -Configuration for this transaction's gas price and the coins used to pay for gas. +Configuration for this transaction's gas price and the coins used to pay for +gas. """ type GasInput { """ @@ -1311,18 +1365,20 @@ type GasInput { """ gasPayment(first: Int, after: String, last: Int, before: String): ObjectConnection! """ - An unsigned integer specifying the number of native tokens per gas unit this transaction - will pay (in MICROS). + An unsigned integer specifying the number of native tokens per gas unit + this transaction will pay (in MICROS). """ gasPrice: BigInt """ - The maximum number of gas units that can be expended by executing this transaction + The maximum number of gas units that can be expended by executing this + transaction """ gasBudget: BigInt } """ -System transaction that initializes the network and writes the initial set of objects on-chain. +System transaction that initializes the network and writes the initial set +of objects on-chain. """ type GenesisTransaction { """ @@ -1333,8 +1389,8 @@ type GenesisTransaction { """ -This interface is implemented by types that represent a Move object on-chain (A Move value whose -type has `key`). +This interface is implemented by types that represent a Move object on-chain +(A Move value whose type has `key`). """ interface IMoveObject { """ @@ -1370,8 +1426,8 @@ interface IMoveObject { } """ -Interface implemented by on-chain values that are addressable by an ID (also referred to as its -address). This includes Move objects and packages. +Interface implemented by on-chain values that are addressable by an ID (also +referred to as its address). This includes Move objects and packages. """ interface IObject { version: Int! @@ -1407,10 +1463,11 @@ interface IObject { } """ -Interface implemented by GraphQL types representing entities that can own objects. Object owners -are identified by an address which can represent either the public key of an account or another -object. The same address can only refer to an account or an object, never both, but it is not -possible to know which up-front. +Interface implemented by GraphQL types representing entities that can own +objects. Object owners are identified by an address which can represent +either the public key of an account or another object. The same address can +only refer to an account or an object, never both, but it is not possible to +know which up-front. """ interface IOwner { address: IotaAddress! @@ -1447,15 +1504,16 @@ interface IOwner { } """ -An immutable object is an object that can't be mutated, transferred, or deleted. -Immutable objects have no owner, so anyone can use them. +An immutable object is an object that can't be mutated, transferred, or +deleted. Immutable objects have no owner, so anyone can use them. """ type Immutable { _: Boolean } """ -One of the input objects or primitive values to the programmable transaction block. +One of the input objects or primitive values to the programmable transaction +block. """ type Input { """ @@ -1465,13 +1523,176 @@ type Input { } +""" +String containing 32B hex-encoded address, with a leading "0x". Leading zeroes can be omitted on input but will always appear in outputs (IotaAddress in output is guaranteed to be 66 characters long). +""" +scalar IotaAddress + +type IotansRegistration implements IMoveObject & IObject & IOwner { + address: IotaAddress! + """ + Objects owned by this object, optionally `filter`-ed. + """ + objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! + """ + Total balance of all coins with marker type owned by this object. If + type is not supplied, it defaults to `0x2::iota::IOTA`. + """ + balance(type: String): Balance + """ + The balances of all coin types owned by this object. + """ + balances(first: Int, after: String, last: Int, before: String): BalanceConnection! + """ + The coin objects for this object. + + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. + """ + coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! + """ + The `0x3::staking_pool::StakedIota` objects owned by this object. + """ + stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! + """ + The domain explicitly configured as the default domain pointing to this + object. + """ + defaultIotansName(format: DomainFormat): String + """ + The IotansRegistration NFTs owned by this object. These grant the owner + the capability to manage the associated domain. + """ + iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! + version: Int! + """ + The current status of the object as read from the off-chain store. The + possible states are: NOT_INDEXED, the object is loaded from + serialized data, such as the contents of a genesis or system package + upgrade transaction. LIVE, the version returned is the most recent for + the object, and it is not deleted or wrapped at that version. + HISTORICAL, the object was referenced at a specific version or + checkpoint, so is fetched from historical tables and may not be the + latest version of the object. WRAPPED_OR_DELETED, the object is deleted + or wrapped and only partial information can be loaded." + """ + status: ObjectKind! + """ + 32-byte hash that identifies the object's contents, encoded as a Base58 + string. + """ + digest: String + """ + The owner type of this object: Immutable, Shared, Parent, Address + """ + owner: ObjectOwner + """ + The transaction block that created this version of the object. + """ + previousTransactionBlock: TransactionBlock + """ + The amount of IOTA we would rebate if this object gets deleted or + mutated. This number is recalculated based on the present storage + gas price. + """ + storageRebate: BigInt + """ + The transaction blocks that sent objects to this object. + """ + receivedTransactionBlocks(first: Int, after: String, last: Int, before: String, filter: TransactionBlockFilter): TransactionBlockConnection! + """ + The Base64-encoded BCS serialization of the object's content. + """ + bcs: Base64 + """ + Displays the contents of the Move object in a JSON string and through + GraphQL types. Also provides the flat representation of the type + signature, and the BCS of the corresponding data. + """ + contents: MoveValue + """ + Determines whether a transaction can transfer this object, using the + TransferObjects transaction command or + `iota::transfer::public_transfer`, both of which require the object to + have the `key` and `store` abilities. + """ + hasPublicTransfer: Boolean! + """ + The set of named templates defined on-chain for the type of this object, + to be handled off-chain. The server substitutes data from the object + into these templates to generate a display string per template. + """ + display: [DisplayEntry!] + """ + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have `copy`, `drop`, and `store`, and are + specified using their type, and their BCS contents, Base64 encoded. + + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. + """ + dynamicField(name: DynamicFieldName!): DynamicField + """ + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have `copy`, `drop`, and `store`, + and are specified using their type, and their BCS contents, Base64 + encoded. The value of a dynamic object field can also be accessed + off-chain directly via its address (e.g. using `Query.object`). + + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. + """ + dynamicObjectField(name: DynamicFieldName!): DynamicField + """ + The dynamic fields and dynamic object fields on an object. + + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. + """ + dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! + """ + Domain name of the IotansRegistration object + """ + domain: String! +} + +type IotansRegistrationConnection { + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + """ + A list of edges. + """ + edges: [IotansRegistrationEdge!]! + """ + A list of nodes. + """ + nodes: [IotansRegistration!]! +} + +""" +An edge in a connection. +""" +type IotansRegistrationEdge { + """ + The item at the end of the edge + """ + node: IotansRegistration! + """ + A cursor for use in pagination + """ + cursor: String! +} + """ Arbitrary JSON data. """ scalar JSON """ -Information used by a package to link to a specific version of its dependency. +Information used by a package to link to a specific version of its +dependency. """ type Linkage { """ @@ -1479,7 +1700,8 @@ type Linkage { """ originalId: IotaAddress! """ - The ID on-chain of the version of the dependency that this package depends on. + The ID on-chain of the version of the dependency that this package + depends on. """ upgradedId: IotaAddress! """ @@ -1493,7 +1715,8 @@ Create a vector (possibly empty). """ type MakeMoveVecTransaction { """ - If the elements are not objects, or the vector is empty, a type must be supplied. + If the elements are not objects, or the vector is empty, a type must be + supplied. """ type: MoveType """ @@ -1517,7 +1740,8 @@ type MergeCoinsTransaction { } """ -Abilities are keywords in Iota Move that define how types behave at the compiler level. +Abilities are keywords in Iota Move that define how types behave at the +compiler level. """ enum MoveAbility { """ @@ -1613,20 +1837,21 @@ type MoveFunction { """ isEntry: Boolean """ - Constraints on the function's formal type parameters. Move bytecode does not name type - parameters, so when they are referenced (e.g. in parameter and return types) they are - identified by their index in this list. + Constraints on the function's formal type parameters. Move bytecode + does not name type parameters, so when they are referenced (e.g. in + parameter and return types) they are identified by their index in + this list. """ typeParameters: [MoveFunctionTypeParameter!] """ - The function's parameter types. These types can reference type parameters introduce by this - function (see `typeParameters`). + The function's parameter types. These types can reference type + parameters introduce by this function (see `typeParameters`). """ parameters: [OpenMoveType!] """ - The function's return types. There can be multiple because functions in Move can return - multiple values. These types can reference type parameters introduced by this function (see - `typeParameters`). + The function's return types. There can be multiple because functions in + Move can return multiple values. These types can reference type + parameters introduced by this function (see `typeParameters`). """ return: [OpenMoveType!] } @@ -1682,8 +1907,8 @@ type MoveModule { """ fileFormatVersion: Int! """ - Modules that this module considers friends (these modules can access `public(friend)` - functions from this module). + Modules that this module considers friends (these modules can access + `public(friend)` functions from this module). """ friends(first: Int, after: String, last: Int, before: String): MoveModuleConnection! """ @@ -1742,8 +1967,9 @@ type MoveModuleEdge { } """ -The representation of an object as a Move Object, which exposes additional information -(content, module that governs it, version, is transferrable, etc.) about this object. +The representation of an object as a Move Object, which exposes additional +information (content, module that governs it, version, is transferrable, +etc.) about this object. """ type MoveObject implements IMoveObject & IObject & IOwner { address: IotaAddress! @@ -1752,8 +1978,8 @@ type MoveObject implements IMoveObject & IObject & IOwner { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this object. If type is not supplied, - it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this object. If + type is not supplied, it defaults to `0x2::iota::IOTA`. """ balance(type: String): Balance """ @@ -1763,7 +1989,8 @@ type MoveObject implements IMoveObject & IObject & IOwner { """ The coin objects for this object. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ @@ -1771,27 +1998,31 @@ type MoveObject implements IMoveObject & IObject & IOwner { """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this object. + The domain explicitly configured as the default domain pointing to this + object. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this object. These grant the owner the capability to - manage the associated domain. + The IotansRegistration NFTs owned by this object. These grant the owner + the capability to manage the associated domain. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! version: Int! """ - The current status of the object as read from the off-chain store. The possible states are: - NOT_INDEXED, the object is loaded from serialized data, such as the contents of a genesis or - system package upgrade transaction. LIVE, the version returned is the most recent for the - object, and it is not deleted or wrapped at that version. HISTORICAL, the object was - referenced at a specific version or checkpoint, so is fetched from historical tables and may - not be the latest version of the object. WRAPPED_OR_DELETED, the object is deleted or - wrapped and only partial information can be loaded." + The current status of the object as read from the off-chain store. The + possible states are: NOT_INDEXED, the object is loaded from + serialized data, such as the contents of a genesis or system package + upgrade transaction. LIVE, the version returned is the most recent for + the object, and it is not deleted or wrapped at that version. + HISTORICAL, the object was referenced at a specific version or + checkpoint, so is fetched from historical tables and may not be the + latest version of the object. WRAPPED_OR_DELETED, the object is deleted + or wrapped and only partial information can be loaded." """ status: ObjectKind! """ - 32-byte hash that identifies the object's contents, encoded as a Base58 string. + 32-byte hash that identifies the object's contents, encoded as a Base58 + string. """ digest: String """ @@ -1803,8 +2034,9 @@ type MoveObject implements IMoveObject & IObject & IOwner { """ previousTransactionBlock: TransactionBlock """ - The amount of IOTA we would rebate if this object gets deleted or mutated. This number is - recalculated based on the present storage gas price. + The amount of IOTA we would rebate if this object gets deleted or + mutated. This number is recalculated based on the present storage + gas price. """ storageRebate: BigInt """ @@ -1816,47 +2048,49 @@ type MoveObject implements IMoveObject & IObject & IOwner { """ bcs: Base64 """ - Displays the contents of the Move object in a JSON string and through GraphQL types. Also - provides the flat representation of the type signature, and the BCS of the corresponding - data. + Displays the contents of the Move object in a JSON string and through + GraphQL types. Also provides the flat representation of the type + signature, and the BCS of the corresponding data. """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the TransferObjects - transaction command or `iota::transfer::public_transfer`, both of which require the object to + Determines whether a transaction can transfer this object, using the + TransferObjects transaction command or + `iota::transfer::public_transfer`, both of which require the object to have the `key` and `store` abilities. """ hasPublicTransfer: Boolean! """ - The set of named templates defined on-chain for the type of this object, to be handled - off-chain. The server substitutes data from the object into these templates to generate a - display string per template. + The set of named templates defined on-chain for the type of this object, + to be handled off-chain. The server substitutes data from the object + into these templates to generate a display string per template. """ display: [DisplayEntry!] """ - Access a dynamic field on an object using its name. Names are arbitrary Move values whose - type have `copy`, `drop`, and `store`, and are specified using their type, and their BCS - contents, Base64 encoded. + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have `copy`, `drop`, and `store`, and are + specified using their type, and their BCS contents, Base64 encoded. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicField(name: DynamicFieldName!): DynamicField """ - Access a dynamic object field on an object using its name. Names are arbitrary Move values - whose type have `copy`, `drop`, and `store`, and are specified using their type, and their - BCS contents, Base64 encoded. The value of a dynamic object field can also be accessed + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have `copy`, `drop`, and `store`, + and are specified using their type, and their BCS contents, Base64 + encoded. The value of a dynamic object field can also be accessed off-chain directly via its address (e.g. using `Query.object`). - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicObjectField(name: DynamicFieldName!): DynamicField """ The dynamic fields and dynamic object fields on an object. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! """ @@ -1864,7 +2098,8 @@ type MoveObject implements IMoveObject & IObject & IOwner { """ asCoin: Coin """ - Attempts to convert the Move object into a `0x3::staking_pool::StakedIota`. + Attempts to convert the Move object into a + `0x3::staking_pool::StakedIota`. """ asStakedIota: StakedIota """ @@ -1907,74 +2142,80 @@ type MoveObjectEdge { } """ -A MovePackage is a kind of Move object that represents code that has been published on chain. -It exposes information about its modules, type definitions, functions, and dependencies. +A MovePackage is a kind of Move object that represents code that has been +published on chain. It exposes information about its modules, type +definitions, functions, and dependencies. """ type MovePackage implements IObject & IOwner { address: IotaAddress! """ Objects owned by this package, optionally `filter`-ed. - Note that objects owned by a package are inaccessible, because packages are immutable and - cannot be owned by an address. + Note that objects owned by a package are inaccessible, because packages + are immutable and cannot be owned by an address. """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this package. If type is not supplied, - it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this package. If + type is not supplied, it defaults to `0x2::iota::IOTA`. - Note that coins owned by a package are inaccessible, because packages are immutable and - cannot be owned by an address. + Note that coins owned by a package are inaccessible, because packages + are immutable and cannot be owned by an address. """ balance(type: String): Balance """ The balances of all coin types owned by this package. - Note that coins owned by a package are inaccessible, because packages are immutable and - cannot be owned by an address. + Note that coins owned by a package are inaccessible, because packages + are immutable and cannot be owned by an address. """ balances(first: Int, after: String, last: Int, before: String): BalanceConnection! """ The coin objects owned by this package. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. - Note that coins owned by a package are inaccessible, because packages are immutable and - cannot be owned by an address. + Note that coins owned by a package are inaccessible, because packages + are immutable and cannot be owned by an address. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ The `0x3::staking_pool::StakedIota` objects owned by this package. - Note that objects owned by a package are inaccessible, because packages are immutable and - cannot be owned by an address. + Note that objects owned by a package are inaccessible, because packages + are immutable and cannot be owned by an address. """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this object. + The domain explicitly configured as the default domain pointing to this + object. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this package. These grant the owner the capability to - manage the associated domain. + The IotansRegistration NFTs owned by this package. These grant the owner + the capability to manage the associated domain. - Note that objects owned by a package are inaccessible, because packages are immutable and - cannot be owned by an address. + Note that objects owned by a package are inaccessible, because packages + are immutable and cannot be owned by an address. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! version: Int! """ - The current status of the object as read from the off-chain store. The possible states are: - NOT_INDEXED, the object is loaded from serialized data, such as the contents of a genesis or - system package upgrade transaction. LIVE, the version returned is the most recent for the - object, and it is not deleted or wrapped at that version. HISTORICAL, the object was - referenced at a specific version or checkpoint, so is fetched from historical tables and may - not be the latest version of the object. WRAPPED_OR_DELETED, the object is deleted or - wrapped and only partial information can be loaded." + The current status of the object as read from the off-chain store. The + possible states are: NOT_INDEXED, the object is loaded from + serialized data, such as the contents of a genesis or system package + upgrade transaction. LIVE, the version returned is the most recent for + the object, and it is not deleted or wrapped at that version. + HISTORICAL, the object was referenced at a specific version or + checkpoint, so is fetched from historical tables and may not be the + latest version of the object. WRAPPED_OR_DELETED, the object is deleted + or wrapped and only partial information can be loaded." """ status: ObjectKind! """ - 32-byte hash that identifies the package's contents, encoded as a Base58 string. + 32-byte hash that identifies the package's contents, encoded as a Base58 + string. """ digest: String """ @@ -1987,11 +2228,12 @@ type MovePackage implements IObject & IOwner { """ previousTransactionBlock: TransactionBlock """ - The amount of IOTA we would rebate if this object gets deleted or mutated. This number is - recalculated based on the present storage gas price. + The amount of IOTA we would rebate if this object gets deleted or + mutated. This number is recalculated based on the present storage + gas price. - Note that packages cannot be deleted or mutated, so this number is provided purely for - reference. + Note that packages cannot be deleted or mutated, so this number is + provided purely for reference. """ storageRebate: BigInt """ @@ -2005,8 +2247,8 @@ type MovePackage implements IObject & IOwner { """ bcs: Base64 """ - A representation of the module called `name` in this package, including the - structs and functions it defines. + A representation of the module called `name` in this package, including + the structs and functions it defines. """ module(name: String!): MoveModule """ @@ -2022,8 +2264,9 @@ type MovePackage implements IObject & IOwner { """ typeOrigins: [TypeOrigin!] """ - BCS representation of the package's modules. Modules appear as a sequence of pairs (module - name, followed by module bytes), in alphabetic order by module name. + BCS representation of the package's modules. Modules appear as a + sequence of pairs (module name, followed by module bytes), in + alphabetic order by module name. """ moduleBcs: Base64 } @@ -2074,14 +2317,15 @@ type MoveStruct { """ abilities: [MoveAbility!] """ - Constraints on the struct's formal type parameters. Move bytecode does not name type - parameters, so when they are referenced (e.g. in field types) they are identified by their - index in this list. + Constraints on the struct's formal type parameters. Move bytecode does + not name type parameters, so when they are referenced (e.g. in field + types) they are identified by their index in this list. """ typeParameters: [MoveStructTypeParameter!] """ - The names and types of the struct's fields. Field types reference type parameters, by their - index in the defining struct's `typeParameters` list. + The names and types of the struct's fields. Field types reference type + parameters, by their index in the defining struct's `typeParameters` + list. """ fields: [MoveField!] } @@ -2194,7 +2438,8 @@ type MoveValue { """ Representation of a Move value in JSON, where: - - Addresses, IDs, and UIDs are represented in canonical form, as JSON strings. + - Addresses, IDs, and UIDs are represented in canonical form, as JSON + strings. - Bools are represented by JSON boolean literals. - u8, u16, and u32 are represented as JSON numbers. - u64, u128, and u256 are represented as JSON strings. @@ -2202,15 +2447,16 @@ type MoveValue { - Structs are represented by JSON objects. - Empty optional values are represented by `null`. - This form is offered as a less verbose convenience in cases where the layout of the type is - known by the client. + This form is offered as a less verbose convenience in cases where the + layout of the type is known by the client. """ json: JSON! } """ -The visibility modifier describes which modules can access this module member. -By default, a module member can be called only within the same module. +The visibility modifier describes which modules can access this module +member. By default, a module member can be called only within the same +module. """ enum MoveVisibility { """ @@ -2222,8 +2468,9 @@ enum MoveVisibility { """ PRIVATE """ - A friend member can be accessed in the module it is defined in and any other module in - its package that is explicitly specified in its friend list. + A friend member can be accessed in the module it is defined in and any + other module in its package that is explicitly specified in its + friend list. """ FRIEND } @@ -2235,26 +2482,32 @@ type Mutation { """ Execute a transaction, committing its effects on chain. - - `txBytes` is a `TransactionData` struct that has been BCS-encoded and then Base64-encoded. - - `signatures` are a list of `flag || signature || pubkey` bytes, Base64-encoded. + - `txBytes` is a `TransactionData` struct that has been BCS-encoded and + then Base64-encoded. + - `signatures` are a list of `flag || signature || pubkey` bytes, + Base64-encoded. - Waits until the transaction has reached finality on chain to return its transaction digest, - or returns the error that prevented finality if that was not possible. A transaction is - final when its effects are guaranteed on chain (it cannot be revoked). + Waits until the transaction has reached finality on chain to return its + transaction digest, or returns the error that prevented finality if + that was not possible. A transaction is final when its effects are + guaranteed on chain (it cannot be revoked). - There may be a delay between transaction finality and when GraphQL requests (including the - request that issued the transaction) reflect its effects. As a result, queries that depend - on indexing the state of the chain (e.g. contents of output objects, address-level balance - information at the time of the transaction), must wait for indexing to catch up by polling - for the transaction digest using `Query.transactionBlock`. + There may be a delay between transaction finality and when GraphQL + requests (including the request that issued the transaction) reflect + its effects. As a result, queries that depend on indexing the state + of the chain (e.g. contents of output objects, address-level balance + information at the time of the transaction), must wait for indexing to + catch up by polling for the transaction digest using + `Query.transactionBlock`. """ executeTransactionBlock(txBytes: String!, signatures: [String!]!): ExecutionResult! } """ -An object in Iota is a package (set of Move bytecode modules) or object (typed data structure -with fields) with additional metadata detailing its id, version, transaction digest, owner -field indicating how this object can be accessed. +An object in Iota is a package (set of Move bytecode modules) or object +(typed data structure with fields) with additional metadata detailing its +id, version, transaction digest, owner field indicating how this object can +be accessed. """ type Object implements IObject & IOwner { address: IotaAddress! @@ -2263,8 +2516,8 @@ type Object implements IObject & IOwner { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this object. If type is not supplied, - it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this object. If + type is not supplied, it defaults to `0x2::iota::IOTA`. """ balance(type: String): Balance """ @@ -2274,7 +2527,8 @@ type Object implements IObject & IOwner { """ The coin objects for this object. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ @@ -2282,27 +2536,31 @@ type Object implements IObject & IOwner { """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this object. + The domain explicitly configured as the default domain pointing to this + object. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this object. These grant the owner the capability to - manage the associated domain. + The IotansRegistration NFTs owned by this object. These grant the owner + the capability to manage the associated domain. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! version: Int! """ - The current status of the object as read from the off-chain store. The possible states are: - NOT_INDEXED, the object is loaded from serialized data, such as the contents of a genesis or - system package upgrade transaction. LIVE, the version returned is the most recent for the - object, and it is not deleted or wrapped at that version. HISTORICAL, the object was - referenced at a specific version or checkpoint, so is fetched from historical tables and may - not be the latest version of the object. WRAPPED_OR_DELETED, the object is deleted or - wrapped and only partial information can be loaded." + The current status of the object as read from the off-chain store. The + possible states are: NOT_INDEXED, the object is loaded from + serialized data, such as the contents of a genesis or system package + upgrade transaction. LIVE, the version returned is the most recent for + the object, and it is not deleted or wrapped at that version. + HISTORICAL, the object was referenced at a specific version or + checkpoint, so is fetched from historical tables and may not be the + latest version of the object. WRAPPED_OR_DELETED, the object is deleted + or wrapped and only partial information can be loaded." """ status: ObjectKind! """ - 32-byte hash that identifies the object's current contents, encoded as a Base58 string. + 32-byte hash that identifies the object's current contents, encoded as a + Base58 string. """ digest: String """ @@ -2315,8 +2573,9 @@ type Object implements IObject & IOwner { """ previousTransactionBlock: TransactionBlock """ - The amount of IOTA we would rebate if this object gets deleted or mutated. This number is - recalculated based on the present storage gas price. + The amount of IOTA we would rebate if this object gets deleted or + mutated. This number is recalculated based on the present storage + gas price. """ storageRebate: BigInt """ @@ -2328,35 +2587,36 @@ type Object implements IObject & IOwner { """ bcs: Base64 """ - The set of named templates defined on-chain for the type of this object, to be handled - off-chain. The server substitutes data from the object into these templates to generate a - display string per template. + The set of named templates defined on-chain for the type of this object, + to be handled off-chain. The server substitutes data from the object + into these templates to generate a display string per template. """ display: [DisplayEntry!] """ - Access a dynamic field on an object using its name. Names are arbitrary Move values whose - type have `copy`, `drop`, and `store`, and are specified using their type, and their BCS - contents, Base64 encoded. + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have `copy`, `drop`, and `store`, and are + specified using their type, and their BCS contents, Base64 encoded. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicField(name: DynamicFieldName!): DynamicField """ - Access a dynamic object field on an object using its name. Names are arbitrary Move values - whose type have `copy`, `drop`, and `store`, and are specified using their type, and their - BCS contents, Base64 encoded. The value of a dynamic object field can also be accessed + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have `copy`, `drop`, and `store`, + and are specified using their type, and their BCS contents, Base64 + encoded. The value of a dynamic object field can also be accessed off-chain directly via its address (e.g. using `Query.object`). - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicObjectField(name: DynamicFieldName!): DynamicField """ The dynamic fields and dynamic object fields on an object. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! """ @@ -2454,23 +2714,25 @@ type ObjectEdge { } """ -Constrains the set of objects returned. All filters are optional, and the resulting set of -objects are ones whose +Constrains the set of objects returned. All filters are optional, and the +resulting set of objects are ones whose - Type matches the `type` filter, - AND, whose owner matches the `owner` filter, -- AND, whose ID is in `objectIds` OR whose ID and version is in `objectKeys`. +- AND, whose ID is in `objectIds` OR whose ID and version is in +`objectKeys`. """ input ObjectFilter { """ - This field is used to specify the type of objects that should be included in the query - results. + This field is used to specify the type of objects that should be + included in the query results. - Objects can be filtered by their type's package, package::module, or their fully qualified - type name. + Objects can be filtered by their type's package, package::module, or + their fully qualified type name. - Generic types can be queried by either the generic type name, e.g. `0x2::coin::Coin`, or by - the full type name, such as `0x2::coin::Coin<0x2::iota::IOTA>`. + Generic types can be queried by either the generic type name, e.g. + `0x2::coin::Coin`, or by the full type name, such as + `0x2::coin::Coin<0x2::iota::IOTA>`. """ type: String """ @@ -2482,7 +2744,8 @@ input ObjectFilter { """ objectIds: [IotaAddress!] """ - Filter for live or potentially historical objects by their ID and version. + Filter for live or potentially historical objects by their ID and + version. """ objectKeys: [ObjectKey!] } @@ -2494,7 +2757,8 @@ input ObjectKey { enum ObjectKind { """ - The object is loaded from serialized data, such as the contents of a transaction. + The object is loaded from serialized data, such as the contents of a + transaction. """ NOT_INDEXED """ @@ -2502,13 +2766,13 @@ enum ObjectKind { """ LIVE """ - The object is referenced at some version, and thus is fetched from the snapshot or - historical objects table. + The object is referenced at some version, and thus is fetched from the + snapshot or historical objects table. """ HISTORICAL """ - The object is deleted or wrapped and only partial information can be loaded from the - indexer. + The object is deleted or wrapped and only partial information can be + loaded from the indexer. """ WRAPPED_OR_DELETED } @@ -2534,8 +2798,9 @@ input ObjectRef { } """ -Represents types that could contain references or free type parameters. Such types can appear -as function parameters, in fields of structs, or as actual type parameter. +Represents types that could contain references or free type parameters. +Such types can appear as function parameters, in fields of structs, or as +actual type parameter. """ type OpenMoveType { """ @@ -2586,8 +2851,8 @@ type OwnedOrImmutable { """ version: Int! """ - 32-byte hash that identifies the object's contents at this version, encoded as a Base58 - string. + 32-byte hash that identifies the object's contents at this version, + encoded as a Base58 string. """ digest: String! """ @@ -2597,9 +2862,10 @@ type OwnedOrImmutable { } """ -An Owner is an entity that can own an object. Each Owner is identified by a IotaAddress which -represents either an Address (corresponding to a public key of an account) or an Object, but -never both (it is not known up-front whether a given Owner is an Address or an Object). +An Owner is an entity that can own an object. Each Owner is identified by a +IotaAddress which represents either an Address (corresponding to a public +key of an account) or an Object, but never both (it is not known up-front +whether a given Owner is an Address or an Object). """ type Owner implements IOwner { address: IotaAddress! @@ -2608,8 +2874,8 @@ type Owner implements IOwner { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this object or address. If type is not - supplied, it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this object or + address. If type is not supplied, it defaults to `0x2::iota::IOTA`. """ balance(type: String): Balance """ @@ -2619,45 +2885,52 @@ type Owner implements IOwner { """ The coin objects for this object or address. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ - The `0x3::staking_pool::StakedIota` objects owned by this object or address. + The `0x3::staking_pool::StakedIota` objects owned by this object or + address. """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this object or address. + The domain explicitly configured as the default domain pointing to this + object or address. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this object or address. These grant the owner the - capability to manage the associated domain. + The IotansRegistration NFTs owned by this object or address. These grant + the owner the capability to manage the associated domain. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! asAddress: Address asObject: Object """ - Access a dynamic field on an object using its name. Names are arbitrary Move values whose - type have `copy`, `drop`, and `store`, and are specified using their type, and their BCS - contents, Base64 encoded. + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have `copy`, `drop`, and `store`, and are + specified using their type, and their BCS contents, Base64 encoded. - This field exists as a convenience when accessing a dynamic field on a wrapped object. + This field exists as a convenience when accessing a dynamic field on a + wrapped object. """ dynamicField(name: DynamicFieldName!): DynamicField """ - Access a dynamic object field on an object using its name. Names are arbitrary Move values - whose type have `copy`, `drop`, and `store`, and are specified using their type, and their - BCS contents, Base64 encoded. The value of a dynamic object field can also be accessed + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have `copy`, `drop`, and `store`, + and are specified using their type, and their BCS contents, Base64 + encoded. The value of a dynamic object field can also be accessed off-chain directly via its address (e.g. using `Query.object`). - This field exists as a convenience when accessing a dynamic field on a wrapped object. + This field exists as a convenience when accessing a dynamic field on a + wrapped object. """ dynamicObjectField(name: DynamicFieldName!): DynamicField """ The dynamic fields and dynamic object fields on an object. - This field exists as a convenience when accessing a dynamic field on a wrapped object. + This field exists as a convenience when accessing a dynamic field on a + wrapped object. """ dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! } @@ -2685,9 +2958,10 @@ type PageInfo { } """ -If the object's owner is a Parent, this object is part of a dynamic field (it is the value of -the dynamic field, or the intermediate Field object itself). Also note that if the owner -is a parent, then it's guaranteed to be an object. +If the object's owner is a Parent, this object is part of a dynamic field +(it is the value of the dynamic field, or the intermediate Field object +itself). Also note that if the owner is a parent, then it's guaranteed to be +an object. """ type Parent { parent: Object @@ -2699,8 +2973,9 @@ A single transaction, or command, in the programmable transaction block. union ProgrammableTransaction = MoveCallTransaction | TransferObjectsTransaction | SplitCoinsTransaction | MergeCoinsTransaction | PublishTransaction | UpgradeTransaction | MakeMoveVecTransaction """ -A user transaction that allows the interleaving of native commands (like transfer, split coins, -merge coins, etc) and move calls, executed atomically. +A user transaction that allows the interleaving of native commands (like +transfer, split coins, merge coins, etc) and move calls, executed +atomically. """ type ProgrammableTransactionBlock { """ @@ -2761,23 +3036,27 @@ type ProtocolConfigFeatureFlag { """ Constants that control how the chain operates. -These can only change during protocol upgrades which happen on epoch boundaries. +These can only change during protocol upgrades which happen on epoch +boundaries. """ type ProtocolConfigs { """ - The protocol is not required to change on every epoch boundary, so the protocol version - tracks which change to the protocol these configs are from. + The protocol is not required to change on every epoch boundary, so the + protocol version tracks which change to the protocol these configs + are from. """ protocolVersion: Int! """ - List all available feature flags and their values. Feature flags are a form of boolean - configuration that are usually used to gate features while they are in development. Once a - flag has been enabled, it is rare for it to be disabled. + List all available feature flags and their values. Feature flags are a + form of boolean configuration that are usually used to gate features + while they are in development. Once a flag has been enabled, it is + rare for it to be disabled. """ featureFlags: [ProtocolConfigFeatureFlag!]! """ - List all available configurations and their values. These configurations can take any value - (but they will all be represented in string form), and do not include feature flags. + List all available configurations and their values. These + configurations can take any value (but they will all be represented + in string form), and do not include feature flags. """ configs: [ProtocolConfigAttr!]! """ @@ -2795,7 +3074,8 @@ Publishes a Move Package. """ type PublishTransaction { """ - Bytecode for the modules to be published, BCS serialized and Base64 encoded. + Bytecode for the modules to be published, BCS serialized and Base64 + encoded. """ modules: [Base64!]! """ @@ -2816,8 +3096,8 @@ type Pure { type Query { """ - First four bytes of the network's genesis checkpoint digest (uniquely identifies the - network). + First four bytes of the network's genesis checkpoint digest (uniquely + identifies the network). """ chainIdentifier: String! """ @@ -2851,8 +3131,8 @@ type Query { dryRunTransactionBlock(txBytes: String!, txMeta: TransactionMetadata, skipChecks: Boolean): DryRunResult! owner(address: IotaAddress!): Owner """ - The object corresponding to the given address at the (optionally) given version. - When no version is given, the latest version is returned. + The object corresponding to the given address at the (optionally) given + version. When no version is given, the latest version is returned. """ object(address: IotaAddress!, version: Int): Object """ @@ -2860,8 +3140,8 @@ type Query { """ address(address: IotaAddress!): Address """ - Fetch a structured representation of a concrete type, including its layout information. - Fails if the type is malformed. + Fetch a structured representation of a concrete type, including its + layout information. Fails if the type is malformed. """ type(type: String!): MoveType! """ @@ -2869,8 +3149,8 @@ type Query { """ epoch(id: Int): Epoch """ - Fetch checkpoint information by sequence number or digest (defaults to the latest available - checkpoint). + Fetch checkpoint information by sequence number or digest (defaults to + the latest available checkpoint). """ checkpoint(id: CheckpointId): Checkpoint """ @@ -2880,8 +3160,9 @@ type Query { """ The coin objects that exist in the network. - The type field is a string of the inner type of the coin by which to filter (e.g. - `0x2::iota::IOTA`). If no type is provided, it will default to `0x2::iota::IOTA`. + The type field is a string of the inner type of the coin by which to + filter (e.g. `0x2::iota::IOTA`). If no type is provided, it will + default to `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ @@ -2901,8 +3182,8 @@ type Query { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): ObjectConnection! """ - Fetch the protocol config by protocol version (defaults to the latest protocol - version known to the GraphQL service). + Fetch the protocol config by protocol version (defaults to the latest + protocol version known to the GraphQL service). """ protocolConfig(protocolVersion: Int): ProtocolConfigs! """ @@ -2914,17 +3195,20 @@ type Query { """ coinMetadata(coinType: String!): CoinMetadata """ - Verify a zkLogin signature based on the provided transaction or personal message - based on current epoch, chain id, and latest JWKs fetched on-chain. If the - signature is valid, the function returns a `ZkLoginVerifyResult` with success as - true and an empty list of errors. If the signature is invalid, the function returns + Verify a zkLogin signature based on the provided transaction or personal + message based on current epoch, chain id, and latest JWKs fetched + on-chain. If the signature is valid, the function returns a + `ZkLoginVerifyResult` with success as true and an empty list of + errors. If the signature is invalid, the function returns a `ZkLoginVerifyResult` with success as false with a list of errors. - - `bytes` is either the personal message in raw bytes or transaction data bytes in - BCS-encoded and then Base64-encoded. + - `bytes` is either the personal message in raw bytes or transaction + data bytes in BCS-encoded and then Base64-encoded. - `signature` is a serialized zkLogin signature that is Base64-encoded. - - `intentScope` is an enum that specifies the intent scope to be used to parse bytes. - - `author` is the address of the signer of the transaction or personal msg. + - `intentScope` is an enum that specifies the intent scope to be used to + parse bytes. + - `author` is the address of the signer of the transaction or personal + msg. """ verifyZkloginSignature(bytes: Base64!, signature: Base64!, intentScope: ZkLoginIntentScope!, author: IotaAddress!): ZkLoginVerifyResult! } @@ -2971,8 +3255,8 @@ type Receiving { """ version: Int! """ - 32-byte hash that identifies the object's contents at this version, encoded as a Base58 - string. + 32-byte hash that identifies the object's contents at this version, + encoded as a Base58 string. """ digest: String! """ @@ -2990,8 +3274,9 @@ type Result { """ cmd: Int! """ - If the previous command returns multiple values, this is the index of the individual result - among the multiple results from that command (also 0-indexed). + If the previous command returns multiple values, this is the index of + the individual result among the multiple results from that command + (also 0-indexed). """ ix: Int } @@ -3001,13 +3286,15 @@ Information about whether epoch changes are using safe mode. """ type SafeMode { """ - Whether safe mode was used for the last epoch change. The system will retry a full epoch - change on every epoch boundary and automatically reset this flag if so. + Whether safe mode was used for the last epoch change. The system will + retry a full epoch change on every epoch boundary and automatically + reset this flag if so. """ enabled: Boolean """ - Accumulated fees for computation and cost that have not been added to the various reward - pools, because the full epoch change did not happen. + Accumulated fees for computation and cost that have not been added to + the various reward pools, because the full epoch change did not + happen. """ gasSummary: GasCostSummary } @@ -3029,25 +3316,29 @@ type ServiceConfig { """ maxQueryDepth: Int! """ - The maximum number of nodes (field names) the service will accept in a single query. + The maximum number of nodes (field names) the service will accept in a + single query. """ maxQueryNodes: Int! """ The maximum number of output nodes in a GraphQL response. - Non-connection nodes have a count of 1, while connection nodes are counted as - the specified 'first' or 'last' number of items, or the default_page_size - as set by the server if those arguments are not set. + Non-connection nodes have a count of 1, while connection nodes are + counted as the specified 'first' or 'last' number of items, or the + default_page_size as set by the server if those arguments are not + set. - Counts accumulate multiplicatively down the query tree. For example, if a query starts - with a connection of first: 10 and has a field to a connection with last: 20, the count - at the second level would be 200 nodes. This is then summed to the count of 10 nodes - at the first level, for a total of 210 nodes. + Counts accumulate multiplicatively down the query tree. For example, if + a query starts with a connection of first: 10 and has a field to a + connection with last: 20, the count at the second level would be 200 + nodes. This is then summed to the count of 10 nodes at the first + level, for a total of 210 nodes. """ maxOutputNodes: Int! """ - Maximum estimated cost of a database query used to serve a GraphQL request. This is - measured in the same units that the database uses in EXPLAIN queries. + Maximum estimated cost of a database query used to serve a GraphQL + request. This is measured in the same units that the database uses + in EXPLAIN queries. """ maxDbQueryCost: BigInt! """ @@ -3067,28 +3358,31 @@ type ServiceConfig { """ maxQueryPayloadSize: Int! """ - Maximum nesting allowed in type arguments in Move Types resolved by this service. + Maximum nesting allowed in type arguments in Move Types resolved by this + service. """ maxTypeArgumentDepth: Int! """ - Maximum number of type arguments passed into a generic instantiation of a Move Type resolved - by this service. + Maximum number of type arguments passed into a generic instantiation of + a Move Type resolved by this service. """ maxTypeArgumentWidth: Int! """ - Maximum number of structs that need to be processed when calculating the layout of a single - Move Type. + Maximum number of structs that need to be processed when calculating the + layout of a single Move Type. """ maxTypeNodes: Int! """ - Maximum nesting allowed in struct fields when calculating the layout of a single Move Type. + Maximum nesting allowed in struct fields when calculating the layout of + a single Move Type. """ maxMoveValueDepth: Int! } """ -A shared object is an object that is shared using the 0x2::transfer::share_object function. -Unlike owned objects, once an object is shared, it stays mutable and is accessible by anyone. +A shared object is an object that is shared using the +0x2::transfer::share_object function. Unlike owned objects, once an object +is shared, it stays mutable and is accessible by anyone. """ type Shared { initialSharedVersion: Int! @@ -3104,18 +3398,19 @@ type SharedInput { """ initialSharedVersion: Int! """ - Controls whether the transaction block can reference the shared object as a mutable - reference or by value. This has implications for scheduling: Transactions that just read - shared objects at a certain version (mutable = false) can be executed concurrently, while - transactions that write shared objects (mutable = true) must be executed serially with - respect to each other. + Controls whether the transaction block can reference the shared object + as a mutable reference or by value. This has implications for + scheduling: Transactions that just read shared objects at a certain + version (mutable = false) can be executed concurrently, while + transactions that write shared objects (mutable = true) must be executed + serially with respect to each other. """ mutable: Boolean! } """ -The transaction accepted a shared object as input, but it was deleted before the transaction -executed. +The transaction accepted a shared object as input, but it was deleted before +the transaction executed. """ type SharedObjectDelete { """ @@ -3123,13 +3418,13 @@ type SharedObjectDelete { """ address: IotaAddress! """ - The version of the shared object that was assigned to this transaction during by consensus, - during sequencing. + The version of the shared object that was assigned to this transaction + during by consensus, during sequencing. """ version: Int! """ - Whether this transaction intended to use this shared object mutably or not. See - `SharedInput.mutable` for further details. + Whether this transaction intended to use this shared object mutably or + not. See `SharedInput.mutable` for further details. """ mutable: Boolean! } @@ -3147,8 +3442,8 @@ type SharedObjectRead { """ version: Int! """ - 32-byte hash that identifies the object's contents at this version, encoded as a Base58 - string. + 32-byte hash that identifies the object's contents at this version, + encoded as a Base58 string. """ digest: String! """ @@ -3158,8 +3453,8 @@ type SharedObjectRead { } """ -Splits off coins with denominations in `amounts` from `coin`, returning multiple results (as -many as there are amounts.) +Splits off coins with denominations in `amounts` from `coin`, returning +multiple results (as many as there are amounts.) """ type SplitCoinsTransaction { """ @@ -3177,7 +3472,8 @@ The stake's possible status: active, pending, or unstaked. """ enum StakeStatus { """ - The stake object is active in a staking pool and it is generating rewards. + The stake object is active in a staking pool and it is generating + rewards. """ ACTIVE """ @@ -3195,27 +3491,28 @@ Parameters that control the distribution of the stake subsidy. """ type StakeSubsidy { """ - IOTA set aside for stake subsidies -- reduces over time as stake subsidies are paid out over - time. + IOTA set aside for stake subsidies -- reduces over time as stake + subsidies are paid out over time. """ balance: BigInt """ - Number of times stake subsidies have been distributed subsidies are distributed with other - staking rewards, at the end of the epoch. + Number of times stake subsidies have been distributed subsidies are + distributed with other staking rewards, at the end of the epoch. """ distributionCounter: Int """ - Amount of stake subsidy deducted from the balance per distribution -- decays over time. + Amount of stake subsidy deducted from the balance per distribution -- + decays over time. """ currentDistributionAmount: BigInt """ - Maximum number of stake subsidy distributions that occur with the same distribution amount - (before the amount is reduced). + Maximum number of stake subsidy distributions that occur with the same + distribution amount (before the amount is reduced). """ periodLength: Int """ - Percentage of the current distribution amount to deduct at the end of the current subsidy - period, expressed in basis points. + Percentage of the current distribution amount to deduct at the end of + the current subsidy period, expressed in basis points. """ decreaseRate: Int } @@ -3230,8 +3527,8 @@ type StakedIota implements IMoveObject & IObject & IOwner { """ objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! """ - Total balance of all coins with marker type owned by this object. If type is not supplied, - it defaults to `0x2::iota::IOTA`. + Total balance of all coins with marker type owned by this object. If + type is not supplied, it defaults to `0x2::iota::IOTA`. """ balance(type: String): Balance """ @@ -3241,7 +3538,8 @@ type StakedIota implements IMoveObject & IObject & IOwner { """ The coin objects for this object. - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. + `type` is a filter on the coin's type parameter, defaulting to + `0x2::iota::IOTA`. """ coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! """ @@ -3249,27 +3547,31 @@ type StakedIota implements IMoveObject & IObject & IOwner { """ stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! """ - The domain explicitly configured as the default domain pointing to this object. + The domain explicitly configured as the default domain pointing to this + object. """ defaultIotansName(format: DomainFormat): String """ - The IotansRegistration NFTs owned by this object. These grant the owner the capability to - manage the associated domain. + The IotansRegistration NFTs owned by this object. These grant the owner + the capability to manage the associated domain. """ iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! version: Int! """ - The current status of the object as read from the off-chain store. The possible states are: - NOT_INDEXED, the object is loaded from serialized data, such as the contents of a genesis or - system package upgrade transaction. LIVE, the version returned is the most recent for the - object, and it is not deleted or wrapped at that version. HISTORICAL, the object was - referenced at a specific version or checkpoint, so is fetched from historical tables and may - not be the latest version of the object. WRAPPED_OR_DELETED, the object is deleted or - wrapped and only partial information can be loaded." + The current status of the object as read from the off-chain store. The + possible states are: NOT_INDEXED, the object is loaded from + serialized data, such as the contents of a genesis or system package + upgrade transaction. LIVE, the version returned is the most recent for + the object, and it is not deleted or wrapped at that version. + HISTORICAL, the object was referenced at a specific version or + checkpoint, so is fetched from historical tables and may not be the + latest version of the object. WRAPPED_OR_DELETED, the object is deleted + or wrapped and only partial information can be loaded." """ status: ObjectKind! """ - 32-byte hash that identifies the object's contents, encoded as a Base58 string. + 32-byte hash that identifies the object's contents, encoded as a Base58 + string. """ digest: String """ @@ -3281,8 +3583,9 @@ type StakedIota implements IMoveObject & IObject & IOwner { """ previousTransactionBlock: TransactionBlock """ - The amount of IOTA we would rebate if this object gets deleted or mutated. This number is - recalculated based on the present storage gas price. + The amount of IOTA we would rebate if this object gets deleted or + mutated. This number is recalculated based on the present storage + gas price. """ storageRebate: BigInt """ @@ -3294,47 +3597,49 @@ type StakedIota implements IMoveObject & IObject & IOwner { """ bcs: Base64 """ - Displays the contents of the Move object in a JSON string and through GraphQL types. Also - provides the flat representation of the type signature, and the BCS of the corresponding - data. + Displays the contents of the Move object in a JSON string and through + GraphQL types. Also provides the flat representation of the type + signature, and the BCS of the corresponding data. """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the TransferObjects - transaction command or `iota::transfer::public_transfer`, both of which require the object to + Determines whether a transaction can transfer this object, using the + TransferObjects transaction command or + `iota::transfer::public_transfer`, both of which require the object to have the `key` and `store` abilities. """ hasPublicTransfer: Boolean! """ - The set of named templates defined on-chain for the type of this object, to be handled - off-chain. The server substitutes data from the object into these templates to generate a - display string per template. + The set of named templates defined on-chain for the type of this object, + to be handled off-chain. The server substitutes data from the object + into these templates to generate a display string per template. """ display: [DisplayEntry!] """ - Access a dynamic field on an object using its name. Names are arbitrary Move values whose - type have `copy`, `drop`, and `store`, and are specified using their type, and their BCS - contents, Base64 encoded. + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have `copy`, `drop`, and `store`, and are + specified using their type, and their BCS contents, Base64 encoded. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicField(name: DynamicFieldName!): DynamicField """ - Access a dynamic object field on an object using its name. Names are arbitrary Move values - whose type have `copy`, `drop`, and `store`, and are specified using their type, and their - BCS contents, Base64 encoded. The value of a dynamic object field can also be accessed + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have `copy`, `drop`, and `store`, + and are specified using their type, and their BCS contents, Base64 + encoded. The value of a dynamic object field can also be accessed off-chain directly via its address (e.g. using `Query.object`). - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicObjectField(name: DynamicFieldName!): DynamicField """ The dynamic fields and dynamic object fields on an object. - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. + Dynamic fields on wrapped objects can be accessed by using the same API + under the Owner type. """ dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! """ @@ -3364,7 +3669,8 @@ type StakedIota implements IMoveObject & IObject & IOwner { Or 0, if this value is negative, where: - - `initial_stake_rate` is the stake rate at the epoch this stake was activated at. + - `initial_stake_rate` is the stake rate at the epoch this stake was + activated at. - `current_stake_rate` is the stake rate in the current epoch. This value is only available if the stake is active. @@ -3410,170 +3716,17 @@ type StorageFund { """ totalObjectStorageRebates: BigInt """ - The portion of the storage fund that will never be refunded through storage rebates. + The portion of the storage fund that will never be refunded through + storage rebates. - The system maintains an invariant that the sum of all storage fees into the storage fund is - equal to the sum of of all storage rebates out, the total storage rebates remaining, and the - non-refundable balance. + The system maintains an invariant that the sum of all storage fees into + the storage fund is equal to the sum of of all storage rebates out, + the total storage rebates remaining, and the non-refundable balance. """ nonRefundableBalance: BigInt } -""" -String containing 32B hex-encoded address, with a leading "0x". Leading zeroes can be omitted on input but will always appear in outputs (IotaAddress in output is guaranteed to be 66 characters long). -""" -scalar IotaAddress - -type IotansRegistration implements IMoveObject & IObject & IOwner { - address: IotaAddress! - """ - Objects owned by this object, optionally `filter`-ed. - """ - objects(first: Int, after: String, last: Int, before: String, filter: ObjectFilter): MoveObjectConnection! - """ - Total balance of all coins with marker type owned by this object. If type is not supplied, - it defaults to `0x2::iota::IOTA`. - """ - balance(type: String): Balance - """ - The balances of all coin types owned by this object. - """ - balances(first: Int, after: String, last: Int, before: String): BalanceConnection! - """ - The coin objects for this object. - - `type` is a filter on the coin's type parameter, defaulting to `0x2::iota::IOTA`. - """ - coins(first: Int, after: String, last: Int, before: String, type: String): CoinConnection! - """ - The `0x3::staking_pool::StakedIota` objects owned by this object. - """ - stakedIotas(first: Int, after: String, last: Int, before: String): StakedIotaConnection! - """ - The domain explicitly configured as the default domain pointing to this object. - """ - defaultIotansName(format: DomainFormat): String - """ - The IotansRegistration NFTs owned by this object. These grant the owner the capability to - manage the associated domain. - """ - iotansRegistrations(first: Int, after: String, last: Int, before: String): IotansRegistrationConnection! - version: Int! - """ - The current status of the object as read from the off-chain store. The possible states are: - NOT_INDEXED, the object is loaded from serialized data, such as the contents of a genesis or - system package upgrade transaction. LIVE, the version returned is the most recent for the - object, and it is not deleted or wrapped at that version. HISTORICAL, the object was - referenced at a specific version or checkpoint, so is fetched from historical tables and may - not be the latest version of the object. WRAPPED_OR_DELETED, the object is deleted or - wrapped and only partial information can be loaded." - """ - status: ObjectKind! - """ - 32-byte hash that identifies the object's contents, encoded as a Base58 string. - """ - digest: String - """ - The owner type of this object: Immutable, Shared, Parent, Address - """ - owner: ObjectOwner - """ - The transaction block that created this version of the object. - """ - previousTransactionBlock: TransactionBlock - """ - The amount of IOTA we would rebate if this object gets deleted or mutated. This number is - recalculated based on the present storage gas price. - """ - storageRebate: BigInt - """ - The transaction blocks that sent objects to this object. - """ - receivedTransactionBlocks(first: Int, after: String, last: Int, before: String, filter: TransactionBlockFilter): TransactionBlockConnection! - """ - The Base64-encoded BCS serialization of the object's content. - """ - bcs: Base64 - """ - Displays the contents of the Move object in a JSON string and through GraphQL types. Also - provides the flat representation of the type signature, and the BCS of the corresponding - data. - """ - contents: MoveValue - """ - Determines whether a transaction can transfer this object, using the TransferObjects - transaction command or `iota::transfer::public_transfer`, both of which require the object to - have the `key` and `store` abilities. - """ - hasPublicTransfer: Boolean! - """ - The set of named templates defined on-chain for the type of this object, to be handled - off-chain. The server substitutes data from the object into these templates to generate a - display string per template. - """ - display: [DisplayEntry!] - """ - Access a dynamic field on an object using its name. Names are arbitrary Move values whose - type have `copy`, `drop`, and `store`, and are specified using their type, and their BCS - contents, Base64 encoded. - - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. - """ - dynamicField(name: DynamicFieldName!): DynamicField - """ - Access a dynamic object field on an object using its name. Names are arbitrary Move values - whose type have `copy`, `drop`, and `store`, and are specified using their type, and their - BCS contents, Base64 encoded. The value of a dynamic object field can also be accessed - off-chain directly via its address (e.g. using `Query.object`). - - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. - """ - dynamicObjectField(name: DynamicFieldName!): DynamicField - """ - The dynamic fields and dynamic object fields on an object. - - Dynamic fields on wrapped objects can be accessed by using the same API under the Owner - type. - """ - dynamicFields(first: Int, after: String, last: Int, before: String): DynamicFieldConnection! - """ - Domain name of the IotansRegistration object - """ - domain: String! -} - -type IotansRegistrationConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - """ - A list of edges. - """ - edges: [IotansRegistrationEdge!]! - """ - A list of nodes. - """ - nodes: [IotansRegistration!]! -} - -""" -An edge in a connection. -""" -type IotansRegistrationEdge { - """ - The item at the end of the edge - """ - node: IotansRegistration! - """ - A cursor for use in pagination - """ - cursor: String! -} - """ Details of the system that are decided during genesis. """ @@ -3599,18 +3752,20 @@ type SystemParameters { """ minValidatorJoiningStake: BigInt """ - Validators with stake below this threshold will enter the grace period (see - `validatorLowStakeGracePeriod`), after which they are removed from the active validator set. + Validators with stake below this threshold will enter the grace period + (see `validatorLowStakeGracePeriod`), after which they are removed + from the active validator set. """ validatorLowStakeThreshold: BigInt """ - Validators with stake below this threshold will be removed from the active validator set - at the next epoch boundary, without a grace period. + Validators with stake below this threshold will be removed from the + active validator set at the next epoch boundary, without a grace + period. """ validatorVeryLowStakeThreshold: BigInt """ - The number of epochs that a validator has to recover from having less than - `validatorLowStakeThreshold` stake. + The number of epochs that a validator has to recover from having less + than `validatorLowStakeThreshold` stake. """ validatorLowStakeGracePeriod: BigInt } @@ -3622,45 +3777,50 @@ union TransactionArgument = GasCoin | Input | Result type TransactionBlock { """ - A 32-byte hash that uniquely identifies the transaction block contents, encoded in Base58. - This serves as a unique id for the block on chain. + A 32-byte hash that uniquely identifies the transaction block contents, + encoded in Base58. This serves as a unique id for the block on + chain. """ digest: String """ - The address corresponding to the public key that signed this transaction. System - transactions do not have senders. + The address corresponding to the public key that signed this + transaction. System transactions do not have senders. """ sender: Address """ - The gas input field provides information on what objects were used as gas as well as the - owner of the gas object(s) and information on the gas price and budget. + The gas input field provides information on what objects were used as + gas as well as the owner of the gas object(s) and information on the + gas price and budget. - If the owner of the gas object(s) is not the same as the sender, the transaction block is a - sponsored transaction block. + If the owner of the gas object(s) is not the same as the sender, the + transaction block is a sponsored transaction block. """ gasInput: GasInput """ - The type of this transaction as well as the commands and/or parameters comprising the - transaction of this kind. + The type of this transaction as well as the commands and/or parameters + comprising the transaction of this kind. """ kind: TransactionBlockKind """ - A list of all signatures, Base64-encoded, from senders, and potentially the gas owner if - this is a sponsored transaction. + A list of all signatures, Base64-encoded, from senders, and potentially + the gas owner if this is a sponsored transaction. """ signatures: [Base64!] """ - The effects field captures the results to the chain of executing this transaction. + The effects field captures the results to the chain of executing this + transaction. """ effects: TransactionBlockEffects """ - This field is set by senders of a transaction block. It is an epoch reference that sets a - deadline after which validators will no longer consider the transaction valid. By default, - there is no deadline for when a transaction must execute. + This field is set by senders of a transaction block. It is an epoch + reference that sets a deadline after which validators will no longer + consider the transaction valid. By default, there is no deadline for + when a transaction must execute. """ expiration: Epoch """ - Serialized form of this transaction's `SenderSignedData`, BCS serialized and Base64 encoded. + Serialized form of this transaction's `SenderSignedData`, BCS serialized + and Base64 encoded. """ bcs: Base64 } @@ -3707,8 +3867,9 @@ type TransactionBlockEffects { """ status: ExecutionStatus """ - The latest version of all objects (apart from packages) that have been created or modified - by this transaction, immediately following this transaction. + The latest version of all objects (apart from packages) that have been + created or modified by this transaction, immediately following this + transaction. """ lamportVersion: Int! """ @@ -3724,7 +3885,8 @@ type TransactionBlockEffects { """ gasEffects: GasEffects """ - Shared objects that are referenced by but not changed by this transaction. + Shared objects that are referenced by but not changed by this + transaction. """ unchangedSharedObjects(first: Int, after: String, last: Int, before: String): UnchangedSharedObjectConnection! """ @@ -3732,8 +3894,8 @@ type TransactionBlockEffects { """ objectChanges(first: Int, after: String, last: Int, before: String): ObjectChangeConnection! """ - The effect this transaction had on the balances (sum of coin values per coin type) of - addresses and objects. + The effect this transaction had on the balances (sum of coin values per + coin type) of addresses and objects. """ balanceChanges(first: Int, after: String, last: Int, before: String): BalanceChangeConnection! """ @@ -3741,7 +3903,8 @@ type TransactionBlockEffects { """ events(first: Int, after: String, last: Int, before: String): EventConnection! """ - Timestamp corresponding to the checkpoint this transaction was finalized in. + Timestamp corresponding to the checkpoint this transaction was finalized + in. """ timestamp: DateTime """ @@ -3761,7 +3924,8 @@ type TransactionBlockEffects { input TransactionBlockFilter { function: String """ - An input filter selecting for either system or programmable transactions. + An input filter selecting for either system or programmable + transactions. """ kind: TransactionBlockKindInput afterCheckpoint: Int @@ -3775,7 +3939,8 @@ input TransactionBlockFilter { } """ -The kind of transaction block, either a programmable transaction or a system transaction. +The kind of transaction block, either a programmable transaction or a system +transaction. """ union TransactionBlockKind = ConsensusCommitPrologueTransaction | GenesisTransaction | ChangeEpochTransaction | ProgrammableTransactionBlock | AuthenticatorStateUpdateTransaction | RandomnessStateUpdateTransaction | EndOfEpochTransaction @@ -3827,10 +3992,10 @@ type TransactionInputEdge { """ The optional extra data a user can provide to a transaction dry run. -`sender` defaults to `0x0`. If gasObjects` is not present, or is an empty list, -it is substituted with a mock Coin object, `gasPrice` defaults to the reference -gas price, `gasBudget` defaults to the max gas budget and `gasSponsor` defaults -to the sender. +`sender` defaults to `0x0`. If gasObjects` is not present, or is an empty +list, it is substituted with a mock Coin object, `gasPrice` defaults to the +reference gas price, `gasBudget` defaults to the max gas budget and +`gasSponsor` defaults to the sender. """ input TransactionMetadata { sender: IotaAddress @@ -3841,8 +4006,8 @@ input TransactionMetadata { } """ -Transfers `inputs` to `address`. All inputs must have the `store` ability (allows public -transfer) and must not be previously immutable or shared. +Transfers `inputs` to `address`. All inputs must have the `store` ability +(allows public transfer) and must not be previously immutable or shared. """ type TransferObjectsTransaction { """ @@ -3874,10 +4039,10 @@ type TypeOrigin { } """ -Details pertaining to shared objects that are referenced by but not changed by a transaction. -This information is considered part of the effects, because although the transaction specifies -the shared object as input, consensus must schedule it and pick the version that is actually -used. +Details pertaining to shared objects that are referenced by but not changed +by a transaction. This information is considered part of the effects, +because although the transaction specifies the shared object as input, +consensus must schedule it and pick the version that is actually used. """ union UnchangedSharedObject = SharedObjectRead | SharedObjectDelete @@ -3915,7 +4080,8 @@ Upgrades a Move Package. """ type UpgradeTransaction { """ - Bytecode for the modules to be published, BCS serialized and Base64 encoded. + Bytecode for the modules to be published, BCS serialized and Base64 + encoded. """ modules: [Base64!]! """ @@ -3938,7 +4104,8 @@ type Validator { """ address: Address! """ - Validator's set of credentials such as public keys, network addresses and others. + Validator's set of credentials such as public keys, network addresses + and others. """ credentials: ValidatorCredentials """ @@ -3963,18 +4130,20 @@ type Validator { projectUrl: String """ The validator's current valid `Cap` object. Validators can delegate - the operation ability to another address. The address holding this `Cap` object - can then update the reference gas price and tallying rule on behalf of the validator. + the operation ability to another address. The address holding this `Cap` + object can then update the reference gas price and tallying rule on + behalf of the validator. """ operationCap: MoveObject """ - The validator's current staking pool object, used to track the amount of stake - and to compound staking rewards. + The validator's current staking pool object, used to track the amount of + stake and to compound staking rewards. """ stakingPool: MoveObject """ - The validator's current exchange object. The exchange rate is used to determine - the amount of IOTA tokens that each past IOTA staker can withdraw in the future. + The validator's current exchange object. The exchange rate is used to + determine the amount of IOTA tokens that each past IOTA staker can + withdraw in the future. """ exchangeRates: MoveObject """ @@ -4002,15 +4171,18 @@ type Validator { """ pendingStake: BigInt """ - Pending stake withdrawn during the current epoch, emptied at epoch boundaries. + Pending stake withdrawn during the current epoch, emptied at epoch + boundaries. """ pendingTotalIotaWithdraw: BigInt """ - Pending pool token withdrawn during the current epoch, emptied at epoch boundaries. + Pending pool token withdrawn during the current epoch, emptied at epoch + boundaries. """ pendingPoolTokenWithdraw: BigInt """ - The voting power of this validator in basis points (e.g., 100 = 1% voting power). + The voting power of this validator in basis points (e.g., 100 = 1% + voting power). """ votingPower: Int """ @@ -4098,16 +4270,18 @@ Representation of `0x3::validator_set::ValidatorSet`. """ type ValidatorSet { """ - Total amount of stake for all active validators at the beginning of the epoch. + Total amount of stake for all active validators at the beginning of the + epoch. """ totalStake: BigInt """ - Validators that are pending removal from the active validator set, expressed as indices in - to `activeValidators`. + Validators that are pending removal from the active validator set, + expressed as indices in to `activeValidators`. """ pendingRemovals: [Int!] """ - Object ID of the wrapped object `TableVec` storing the pending active validators. + Object ID of the wrapped object `TableVec` storing the pending active + validators. """ pendingActiveValidatorsId: IotaAddress """ @@ -4115,9 +4289,10 @@ type ValidatorSet { """ pendingActiveValidatorsSize: Int """ - Object ID of the `Table` storing the mapping from staking pool ids to the addresses - of the corresponding validators. This is needed because a validator's address - can potentially change but the object ID of its pool will not. + Object ID of the `Table` storing the mapping from staking pool ids to + the addresses of the corresponding validators. This is needed + because a validator's address can potentially change but the object + ID of its pool will not. """ stakingPoolMappingsId: IotaAddress """ @@ -4147,8 +4322,8 @@ type ValidatorSet { } """ -An enum that specifies the intent scope to be used to parse the bytes for signature -verification. +An enum that specifies the intent scope to be used to parse the bytes for +signature verification. """ enum ZkLoginIntentScope { """ diff --git a/crates/iota-json-rpc-types/src/iota_transaction.rs b/crates/iota-json-rpc-types/src/iota_transaction.rs index 4788d5e7662..bdeb30749d5 100644 --- a/crates/iota-json-rpc-types/src/iota_transaction.rs +++ b/crates/iota-json-rpc-types/src/iota_transaction.rs @@ -1595,7 +1595,7 @@ impl IotaProgrammableTransactionBlock { } fn resolve_input_type( - inputs: &Vec, + inputs: &[CallArg], commands: &[Command], module_cache: &impl GetModule, ) -> Vec> { diff --git a/crates/iota-rosetta/docker/iota-rosetta-devnet/build.sh b/crates/iota-rosetta/docker/iota-rosetta-devnet/build.sh index c3f09ad931a..742ae47b946 100755 --- a/crates/iota-rosetta/docker/iota-rosetta-devnet/build.sh +++ b/crates/iota-rosetta/docker/iota-rosetta-devnet/build.sh @@ -1,7 +1,5 @@ #!/bin/sh # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/crates/iota-rosetta/docker/iota-rosetta-local/build.sh b/crates/iota-rosetta/docker/iota-rosetta-local/build.sh index df199df7d10..0b9fa3235e6 100755 --- a/crates/iota-rosetta/docker/iota-rosetta-local/build.sh +++ b/crates/iota-rosetta/docker/iota-rosetta-local/build.sh @@ -1,7 +1,5 @@ #!/bin/sh # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/crates/iota-rpc-loadgen/src/payload/query_transactions.rs b/crates/iota-rpc-loadgen/src/payload/query_transactions.rs index 0715c75bd2f..834fc7d7f7a 100644 --- a/crates/iota-rpc-loadgen/src/payload/query_transactions.rs +++ b/crates/iota-rpc-loadgen/src/payload/query_transactions.rs @@ -86,7 +86,7 @@ impl<'a> ProcessPayload<'a, &'a QueryTransactionBlocks> for RpcCommandProcessor } }; - results = join_all(clients.iter().enumerate().map(|(_i, client)| { + results = join_all(clients.iter().map(|client| { let with_query = query.clone(); async move { query_transaction_blocks(client, with_query, cursor, None) diff --git a/crates/iota-storage/src/http_key_value_store.rs b/crates/iota-storage/src/http_key_value_store.rs index c0c48fb59ed..f5eebdb174d 100644 --- a/crates/iota-storage/src/http_key_value_store.rs +++ b/crates/iota-storage/src/http_key_value_store.rs @@ -165,12 +165,7 @@ impl HttpKVStore { async fn multi_fetch(&self, uris: Vec) -> Vec>> { let uris_vec = uris.to_vec(); - let fetches = stream::iter( - uris_vec - .into_iter() - .enumerate() - .map(|(_i, uri)| self.fetch(uri)), - ); + let fetches = stream::iter(uris_vec.into_iter().map(|uri| self.fetch(uri))); fetches.buffered(uris.len()).collect::>().await } diff --git a/crates/iota-storage/src/indexes.rs b/crates/iota-storage/src/indexes.rs index cf35f38ac29..4d282b56cdd 100644 --- a/crates/iota-storage/src/indexes.rs +++ b/crates/iota-storage/src/indexes.rs @@ -407,7 +407,7 @@ impl IndexStore { }); let coin = obj.as_coin_maybe().unwrap_or_else(|| { panic!( - "object_id: {:?} in written_coins cannot be deserialzied as a Coin, written_coins: {:?}, tx_digest: {:?}", + "object_id: {:?} in written_coins cannot be deserialized as a Coin, written_coins: {:?}, tx_digest: {:?}", obj_id, written_coins, digest ) }); diff --git a/crates/iota-storage/src/object_store/util.rs b/crates/iota-storage/src/object_store/util.rs index e68c8dca3d7..622e462d464 100644 --- a/crates/iota-storage/src/object_store/util.rs +++ b/crates/iota-storage/src/object_store/util.rs @@ -377,7 +377,7 @@ pub fn get_path(prefix: &str) -> Path { } // Snapshot MANIFEST file is very simple. Just a newline delimited list of all -// paths in the snapshot directory this simplicty enables easy parsing for +// paths in the snapshot directory this simplicity enables easy parsing for // scripts to download snapshots pub async fn write_snapshot_manifest( dir: &Path, diff --git a/crates/iota-transactional-test-runner/src/simulator_persisted_store.rs b/crates/iota-transactional-test-runner/src/simulator_persisted_store.rs index 1a1d47d4cde..24cdef90ae9 100644 --- a/crates/iota-transactional-test-runner/src/simulator_persisted_store.rs +++ b/crates/iota-transactional-test-runner/src/simulator_persisted_store.rs @@ -310,16 +310,12 @@ impl SimulatorStore for PersistedStore { fn insert_committee(&mut self, committee: Committee) { let epoch = committee.epoch as usize; - let mut committees = if let Some(c) = self + let mut committees = self .read_write .epoch_to_committee .get(&()) .expect("Fatal: DB read failed") - { - c - } else { - vec![] - }; + .unwrap_or_default(); if committees.get(epoch).is_some() { return; @@ -394,16 +390,12 @@ impl SimulatorStore for PersistedStore { .live_objects .insert(&object_id, &version) .expect("Fatal: DB write failed"); - let mut q = if let Some(x) = self + let mut q = self .read_write .objects .get(&object_id) .expect("Fatal: DB read failed") - { - x - } else { - BTreeMap::new() - }; + .unwrap_or_default(); q.insert(version, object); self.read_write .objects diff --git a/crates/iota/src/main.rs b/crates/iota/src/main.rs index 167c9cd91cf..8ccf9286351 100644 --- a/crates/iota/src/main.rs +++ b/crates/iota/src/main.rs @@ -24,6 +24,7 @@ const GIT_REVISION: &str = { }; const VERSION: &str = { + #[allow(clippy::const_is_empty)] if GIT_REVISION.is_empty() { env!("CARGO_PKG_VERSION") } else { diff --git a/crates/iota/tests/snapshots/ptb_files_tests__whitespace_handling.ptb.snap b/crates/iota/tests/snapshots/ptb_files_tests__whitespace_handling.ptb.snap index 0901ed4abec..e2612b80b62 100644 --- a/crates/iota/tests/snapshots/ptb_files_tests__whitespace_handling.ptb.snap +++ b/crates/iota/tests/snapshots/ptb_files_tests__whitespace_handling.ptb.snap @@ -3,22 +3,22 @@ source: crates/iota/tests/ptb_files_tests.rs expression: "results.join(\"\\n\")" --- === PREVIEW === -╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ PTB Preview │ -├───────────────┬─────────────────────────────────────────────────────────────────────────────────────────┤ -│ command │ values │ -├───────────────┼─────────────────────────────────────────────────────────────────────────────────────────┤ -│ assign │ x vector[1u64, 2u64, 3u64, 4u64] │ -│ assign │ x vector[1u64, 2u64, 3u64, 4u64] │ -│ assign │ x vector["1", "2, 3", "", "4 "] │ -│ assign │ x vector["1", "2, 3", "", "4 \n "] │ -│ make-move-vec │ [1u64, 2u64, 3u64, 4u64] │ +╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ PTB Preview │ +├───────────────┬──────────────────────────────────────────────────────────────────────────────────────────┤ +│ command │ values │ +├───────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤ +│ assign │ x vector[1u64, 2u64, 3u64, 4u64] │ +│ assign │ x vector[1u64, 2u64, 3u64, 4u64] │ +│ assign │ x vector["1", "2, 3", "", "4 "] │ +│ assign │ x vector["1", "2, 3", "", "4 \n "] │ +│ make-move-vec │ [1u64, 2u64, 3u64, 4u64] │ │ make-move-vec │ [1u64, 2u64, 3u64, 4u64] │ │ make-move-vec │ ["1", "2, 3", "", "4 "] │ │ make-move-vec │ ["1", "2, 3", "", "4 \n "] │ -├───────────────┼─────────────────────────────────────────────────────────────────────────────────────────┤ -│ gas-budget │ 100 │ -╰───────────────┴─────────────────────────────────────────────────────────────────────────────────────────╯ +├───────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤ +│ gas-budget │ 100 │ +╰───────────────┴──────────────────────────────────────────────────────────────────────────────────────────╯ === BUILT PTB === Input 0: Pure([1, 0, 0, 0, 0, 0, 0, 0]) Input 1: Pure([2, 0, 0, 0, 0, 0, 0, 0]) diff --git a/crates/iotaop-cli/src/command.rs b/crates/iotaop-cli/src/command.rs index a1d3efbc09d..2fdbea204c9 100644 --- a/crates/iotaop-cli/src/command.rs +++ b/crates/iotaop-cli/src/command.rs @@ -35,11 +35,7 @@ impl Default for CommandOptions { pub fn run_cmd(cmd_in: Vec<&str>, options: Option) -> Result { debug!("attempting to run {}", cmd_in.join(" ")); - let opts = if let Some(opts) = options { - opts - } else { - CommandOptions::default() - }; + let opts = options.unwrap_or_default(); let mut cmd = Command::new(cmd_in[0]); // add extra args diff --git a/crates/telemetry-subscribers/src/lib.rs b/crates/telemetry-subscribers/src/lib.rs index 036a93fa47b..b1b954facf0 100644 --- a/crates/telemetry-subscribers/src/lib.rs +++ b/crates/telemetry-subscribers/src/lib.rs @@ -505,7 +505,7 @@ impl SamplingFilter { fn clamp(sample_rate: f64) -> f64 { // clamp sample rate to between 0.0001 and 1.0 - sample_rate.max(0.0001).min(1.0) + sample_rate.clamp(0.0001, 1.0) } fn update_sampling_rate(&self, sample_rate: f64) { diff --git a/crates/transaction-fuzzer/scripts/coin_factory_gen.py b/crates/transaction-fuzzer/scripts/coin_factory_gen.py index aa15793e567..ed406038abf 100755 --- a/crates/transaction-fuzzer/scripts/coin_factory_gen.py +++ b/crates/transaction-fuzzer/scripts/coin_factory_gen.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 # Copyright (c) Mysten Labs, Inc. +# Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 # Generates ../data/coin_factory/sources/coin_factory.move to create NUM_VARIANTS of a function returning an N-tuple of coins @@ -8,20 +9,19 @@ NUM_VARIANTS = 64 -factory_file = os.path.join(os.path.dirname(__file__), os.pardir, "data", "coin_factory", "sources", "coin_factory.move") +factory_file = os.path.join(os.path.dirname( + __file__), os.pardir, "data", "coin_factory", "sources", "coin_factory.move") with open(factory_file, 'w') as f: f.write("// Copyright (c) Mysten Labs, Inc.\n") + f.write("// Modifications Copyright (c) 2024 IOTA Stiftung\n") f.write("// SPDX-License-Identifier: Apache-2.0\n") - f.write("// Modifications Copyright (c) 2024 IOTA Stiftung - f.write("// SPDX-License-Identifier: Apache-2.0 - f.write("module coiner::coin_factory {\n") f.write(" use std::option;\n") f.write(" use iota::coin::{Self, Coin, TreasuryCap};\n") f.write(" use iota::transfer;\n") - f.write(" use std::vector;\n"); + f.write(" use std::vector;\n") f.write(" use iota::tx_context::{Self, TxContext};\n") f.write("\n") f.write(" struct COIN_FACTORY has drop {}\n") @@ -29,34 +29,37 @@ f.write(" fun init(witness: COIN_FACTORY, ctx: &mut TxContext) {\n") f.write(" let (treasury, metadata) = coin::create_currency(witness, 6, b\"COIN_FACTORY\", b\"\", b\"\", option::none(), ctx);\n") f.write(" // this actually does not make any sense in real life (metadata should actually be frozen)\n") - f.write(" // but makes it easier to find package object in effects (as it will be the only immutable\n") + f.write( + " // but makes it easier to find package object in effects (as it will be the only immutable\n") f.write(" // object if metadata is not frozen)\n") f.write(" transfer::public_share_object(metadata);\n") f.write(" transfer::public_transfer(treasury, tx_context::sender(ctx))\n") f.write(" }\n") - f.write("\n"); - f.write(" public fun mint_vec(\n"); - f.write(" cap: &mut TreasuryCap,\n"); - f.write(" value: u64,\n"); - f.write(" size: u64,\n"); - f.write(" ctx: &mut TxContext\n"); - f.write(" ): vector> {\n"); - f.write(" let v = vector::empty>();\n"); - f.write(" let i = 0;\n"); - f.write(" while (i < size) {\n"); - f.write(" vector::push_back(&mut v, coin::mint(cap, value, ctx));\n"); - f.write(" i = i + 1;\n"); - f.write(" };\n"); - f.write(" v\n"); - f.write(" }\n\n"); - + f.write("\n") + f.write(" public fun mint_vec(\n") + f.write(" cap: &mut TreasuryCap,\n") + f.write(" value: u64,\n") + f.write(" size: u64,\n") + f.write(" ctx: &mut TxContext\n") + f.write(" ): vector> {\n") + f.write(" let v = vector::empty>();\n") + f.write(" let i = 0;\n") + f.write(" while (i < size) {\n") + f.write(" vector::push_back(&mut v, coin::mint(cap, value, ctx));\n") + f.write(" i = i + 1;\n") + f.write(" };\n") + f.write(" v\n") + f.write(" }\n\n") for i in range(1, NUM_VARIANTS + 1): - f.write(" public fun unpack_" + str(i) +"(v: &mut vector>): (\n") - f.write(',\n'.join([x for x in [" Coin"] for j in range(i)])) + f.write(" public fun unpack_" + str(i) + + "(v: &mut vector>): (\n") + f.write(',\n'.join( + [x for x in [" Coin"] for j in range(i)])) f.write("\n ) {\n") f.write(" (\n") - f.write(',\n'.join([x for x in [" vector::pop_back(v)"] for j in range(i)])) + f.write(',\n'.join( + [x for x in [" vector::pop_back(v)"] for j in range(i)])) f.write("\n )\n") f.write(" }\n\n") diff --git a/crates/typed-store/src/rocks/mod.rs b/crates/typed-store/src/rocks/mod.rs index c52a2b6e70c..e01cfc14e30 100644 --- a/crates/typed-store/src/rocks/mod.rs +++ b/crates/typed-store/src/rocks/mod.rs @@ -2726,7 +2726,7 @@ fn populate_missing_cfs( /// Given a vec, find the value which is one more than the vector /// if the vector was a big endian number. /// If the vector is already minimum, don't change it. -fn big_endian_saturating_add_one(v: &mut Vec) { +fn big_endian_saturating_add_one(v: &mut [u8]) { if is_max(v) { return; } diff --git a/dapps/kiosk/src/context/KioskClientContext.tsx b/dapps/kiosk/src/context/KioskClientContext.tsx index 00622ce7da1..d4ecbe49b55 100644 --- a/dapps/kiosk/src/context/KioskClientContext.tsx +++ b/dapps/kiosk/src/context/KioskClientContext.tsx @@ -3,7 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 import { useIotaClient } from '@iota/dapp-kit'; -import { KioskClient, Network } from '@iota/kiosk'; +import { Network } from '@iota/iota.js/client'; +import { KioskClient } from '@iota/kiosk'; import { createContext, ReactNode, useContext, useMemo } from 'react'; export const KioskClientContext = createContext(undefined); @@ -14,7 +15,7 @@ export function KisokClientProvider({ children }: { children: ReactNode }) { () => new KioskClient({ client: iotaClient, - network: Network.TESTNET, + network: Network.Testnet, }), [iotaClient], ); diff --git a/dapps/multisig-toolkit/src/components/preview-effects/partials/Overview.tsx b/dapps/multisig-toolkit/src/components/preview-effects/partials/Overview.tsx index a5ea23ed741..102e686d84b 100644 --- a/dapps/multisig-toolkit/src/components/preview-effects/partials/Overview.tsx +++ b/dapps/multisig-toolkit/src/components/preview-effects/partials/Overview.tsx @@ -28,7 +28,7 @@ export function Overview({ output }: { output: DryRunTransactionBlockResponse }) network, status: output.effects.status?.status === 'success' - ? '✅ Transaction dry run executed succesfully!' + ? '✅ Transaction dry run executed successfully!' : output.effects.status?.status === 'failure' ? '❌ Transaction failed to execute!' : null, diff --git a/dapps/regulated-token/publish.sh b/dapps/regulated-token/publish.sh index 699d5e28655..76e95b02d32 100755 --- a/dapps/regulated-token/publish.sh +++ b/dapps/regulated-token/publish.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/docker/deterministic-canary/build.sh b/docker/deterministic-canary/build.sh index 320304ecc71..97788c7d5d8 100755 --- a/docker/deterministic-canary/build.sh +++ b/docker/deterministic-canary/build.sh @@ -1,7 +1,5 @@ #!/bin/sh # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/docker/fullnode-x/fullnode/entry.sh b/docker/fullnode-x/fullnode/entry.sh index 3252f7ab8c1..cb27832dbbd 100755 --- a/docker/fullnode-x/fullnode/entry.sh +++ b/docker/fullnode-x/fullnode/entry.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/docker/fullnode-x/indexer/indexer.sh b/docker/fullnode-x/indexer/indexer.sh index 6ce89da8f9e..7f1ab81261a 100755 --- a/docker/fullnode-x/indexer/indexer.sh +++ b/docker/fullnode-x/indexer/indexer.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/docker/iota-graphql-rpc/build.sh b/docker/iota-graphql-rpc/build.sh index 08e0e7e0fc6..7dc6a986ffe 100755 --- a/docker/iota-graphql-rpc/build.sh +++ b/docker/iota-graphql-rpc/build.sh @@ -1,7 +1,5 @@ #!/bin/sh # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/docker/iota-indexer/build.sh b/docker/iota-indexer/build.sh index 8c9a3693922..dc1b9e51b13 100755 --- a/docker/iota-indexer/build.sh +++ b/docker/iota-indexer/build.sh @@ -1,7 +1,5 @@ #!/bin/sh # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/docker/iota-node-deterministic/build.sh b/docker/iota-node-deterministic/build.sh index 08599feb4f6..7856d88ff52 100755 --- a/docker/iota-node-deterministic/build.sh +++ b/docker/iota-node-deterministic/build.sh @@ -1,7 +1,5 @@ #!/bin/sh # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/docker/iota-node/build.sh b/docker/iota-node/build.sh index 24b388c20df..aca5f46ea5c 100755 --- a/docker/iota-node/build.sh +++ b/docker/iota-node/build.sh @@ -1,7 +1,5 @@ #!/bin/sh # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/docker/iota-private-network/README.md b/docker/iota-private-network/README.md new file mode 100644 index 00000000000..ddb7188f7d5 --- /dev/null +++ b/docker/iota-private-network/README.md @@ -0,0 +1,99 @@ +# IOTA Private Network + +## Requirements + +- [Docker Compose](https://docs.docker.com/engine/install/) +- [yq](https://github.com/mikefarah/yq) + +## Steps + +### 1. Build Docker Images + +Run the following commands to build the necessary Docker images: + +#### iota-node + +```bash +../iota-node/build.sh -t iota-node --no-cache +``` + +#### iota-indexer + +```bash +../iota-indexer/build.sh -t iota-indexer --no-cache +``` + +#### iota-tools + +```bash +../iota-tools/build.sh -t iota-tools --no-cache +``` + +### 2. Bootstrap the Network + +Generate the genesis files and validators’ configuration: + +```bash +./bootstrap.sh +``` + +### 3. Start the Network + +The script supports different modes, which can be used individually or in combination. Regardless of the mode chosen, the validators will always be active. + +- faucet: Brings up one fullnode, and faucet. +- backup: Brings up one fullnode with backup features enabled. This includes generating database snapshots, formal snapshots, and enabling archive mode. If you do not want to enable archive mode, comment out the configuration in `configs/fullnode/backup.yaml`. +- indexer: Brings up one fullnode, one indexer, and a PostgreSQL database. +- indexer-cluster: Brings up two fullnodes, two indexers, and a PostgreSQL cluster with a primary and replica database. indexer-1 uses the primary PostgreSQL, while indexer-2 uses the replica. +- all: Brings up all services. + + +#### Example + +To bring up everything: + +```bash +./run.sh all +``` + +To bring up 4 validators, three full nodes (one with the backup feature enabled), one indexer, and one faucet, use the following command: + +``` +./run.sh faucet backup indexer +``` + +### Ports + +- fullnode-1: + - JSON-RPC: http://127.0.0.1:9000 + - Metrics: http://127.0.0.1:9184 + +- fullnode-2: + - JSON-RPC: http://127.0.0.1:9001 + - Metrics: http://127.0.0.1:9185 + +- fullnode-3: + - JSON-RPC: http://127.0.0.1:9002 + - Metrics: http://127.0.0.1:9186 + +- fullnode-4: + - JSON-RPC: http://127.0.0.1:9003 + - Metrics: http://127.0.0.1:9187 + +- faucet-1: + - JSON-RPC: http://127.0.0.1:5003 + - Metrics: http://127.0.0.1:9188 + +- indexer-1: + - JSON-RPC: http://127.0.0.1:9004 + - Metrics: http://127.0.0.1:9181 + +- indexer-2: + - JSON-RPC: http://127.0.0.1:9005 + - Metrics: http://127.0.0.1:9182 + +- postgres_primary: + - PostgreSQL: http://127.0.0.1:5432 + +- postgres_replica: + - PostgreSQL: http://127.0.0.1:5433 \ No newline at end of file diff --git a/docker/iota-private-network/bootstrap.sh b/docker/iota-private-network/bootstrap.sh new file mode 100755 index 00000000000..bd705da6109 --- /dev/null +++ b/docker/iota-private-network/bootstrap.sh @@ -0,0 +1,97 @@ +#!/bin/bash + +# Copyright (c) 2024 IOTA Stiftung +# SPDX-License-Identifier: Apache-2.0 + +set -e + +TEMP_EXPORT_DIR="$(pwd)/configs/temp" +VALIDATOR_CONFIGS_DIR="$(pwd)/configs/validators" +GENESIS_DIR="$(pwd)/configs/genesis" +OVERLAY_PATH="$(pwd)/configs/validator-common.yaml" +GENESIS_TEMPLATE="$(pwd)/configs/genesis-template.yaml" +PRIVATE_DATA_DIR="$(pwd)/data" + +check_docker_image_exist() { + if ! docker image inspect "$1" >/dev/null 2>&1; then + echo "Error: Docker image $1 not found." + exit 1 + fi +} + +check_configs_exist() { + if [ ! -f "$1" ]; then + echo "Error: $(basename "$1") not found at "$1"" + exit 1 + fi +} + +generate_genesis_files() { + mkdir "$TEMP_EXPORT_DIR" + + docker run --rm \ + -v "$(pwd):/iota" \ + -w /iota \ + iota-tools \ + /usr/local/bin/iota genesis --from-config "/iota/configs/genesis-template.yaml" --working-dir "/iota/configs/temp" -f + + for file in "$TEMP_EXPORT_DIR"/validator*.yaml; do + if [ -f "$file" ]; then + yq eval-all ' + select(fileIndex == 1).validator as $overlay | + select(fileIndex == 0) | + .network-address = $overlay.network-address | + .metrics-address = $overlay.metrics-address | + .json-rpc-address = $overlay.json-rpc-address | + .admin-interface-port = $overlay.admin-interface-port | + .genesis.genesis-file-location = $overlay.genesis.genesis-file-location | + .db-path = $overlay.db-path | + .consensus-config.db-path = $overlay.consensus-config.db-path | + .consensus-config.narwhal-config.max_header_delay = $overlay.consensus-config.narwhal-config.max_header_delay | + .expensive-safety-check-config = $overlay.expensive-safety-check-config | + .epoch_duration_ms = $overlay.epoch_duration_ms + ' "$file" "$OVERLAY_PATH" >"${file}.tmp" && mv "${file}.tmp" "$file" + fi + done + + for file in "$TEMP_EXPORT_DIR"/validator*; do + if [ -e "$file" ]; then + mv "$file" "$VALIDATOR_CONFIGS_DIR/" + fi + done + + mv "$TEMP_EXPORT_DIR/genesis.blob" "$GENESIS_DIR/" + + rm -rf "$TEMP_EXPORT_DIR" +} + +create_folder_for_postgres() { + mkdir -p ./data/primary ./data/replica + chown -R 999:999 ./data/primary ./data/replica + chmod 0755 ./data/primary ./data/replica +} + +main() { + if [[ "$OSTYPE" != "darwin"* && "$EUID" -ne 0 ]]; then + echo "Please run as root or with sudo" + exit 1 + fi + [ -d "$TEMP_EXPORT_DIR" ] && rm -rf "$TEMP_EXPORT_DIR" + + [ -d "$PRIVATE_DATA_DIR" ] && ./cleanup.sh + + for config_path in "$GENESIS_TEMPLATE" "$OVERLAY_PATH"; do + check_configs_exist "$config_path" + done + + for image in iota-tools iota-node iota-indexer; do + check_docker_image_exist "$image" + done + + generate_genesis_files + create_folder_for_postgres + + echo "Done" +} + +main diff --git a/docker/iota-private-network/cleanup.sh b/docker/iota-private-network/cleanup.sh new file mode 100755 index 00000000000..1261db0bc77 --- /dev/null +++ b/docker/iota-private-network/cleanup.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Copyright (c) 2024 IOTA Stiftung +# SPDX-License-Identifier: Apache-2.0 + +if [[ "$OSTYPE" != "darwin"* && "$EUID" -ne 0 ]]; then + echo "Please run as root or with sudo" + exit +fi + +docker compose down --remove-orphans +rm -rf data \ No newline at end of file diff --git a/docker/iota-private-network/configs/faucet/client.yaml b/docker/iota-private-network/configs/faucet/client.yaml new file mode 100644 index 00000000000..042edaea50f --- /dev/null +++ b/docker/iota-private-network/configs/faucet/client.yaml @@ -0,0 +1,9 @@ +--- +keystore: + File: /root/.iota/iota_config/iota.keystore +envs: + - alias: iota-private-network + rpc: "http://fullnode-1:9000" + ws: ~ +active_env: iota-private-network +active_address: "0x7cc6ff19b379d305b8363d9549269e388b8c1515772253ed4c868ee80b149ca0" diff --git a/docker/iota-private-network/configs/faucet/iota.aliases b/docker/iota-private-network/configs/faucet/iota.aliases new file mode 100644 index 00000000000..4e8c4768442 --- /dev/null +++ b/docker/iota-private-network/configs/faucet/iota.aliases @@ -0,0 +1,6 @@ +[ + { + "alias": "gracious-avanturine", + "public_key_base64": "AGIzOn+6jdl4oyKox+fsLWU7kq3YOtjTiqAQOCMYp9ad" + } +] \ No newline at end of file diff --git a/docker/iota-private-network/configs/faucet/iota.keystore b/docker/iota-private-network/configs/faucet/iota.keystore new file mode 100644 index 00000000000..83be2b7da92 --- /dev/null +++ b/docker/iota-private-network/configs/faucet/iota.keystore @@ -0,0 +1,3 @@ +[ + "ALR+yixgIvm4dtESP1OCVrMleEwRoI08SYjQOAJuV9Rh" +] \ No newline at end of file diff --git a/docker/iota-private-network/configs/fullnodes/backup.yaml b/docker/iota-private-network/configs/fullnodes/backup.yaml new file mode 100644 index 00000000000..dda42022e91 --- /dev/null +++ b/docker/iota-private-network/configs/fullnodes/backup.yaml @@ -0,0 +1,56 @@ +--- +db-path: /opt/iota/db +network-address: /ip4/0.0.0.0/tcp/8080/http +json-rpc-address: "0.0.0.0:9000" +metrics-address: "0.0.0.0:9184" +admin-interface-port: 1337 +enable-event-processing: true +grpc-load-shed: ~ +grpc-concurrency-limit: ~ +p2p-config: + listen-address: "0.0.0.0:8084" +genesis: + genesis-file-location: /opt/iota/config/genesis.blob +authority-store-pruning-config: + num-latest-epoch-dbs-to-retain: 3 + epoch-db-pruning-period-secs: 3600 + num-epochs-to-retain: 18446744073709551615 + max-checkpoints-in-batch: 5 + max-transactions-in-batch: 1000 + use-range-deletion: true + pruning-run-delay-seconds: 60 +state-debug-dump-config: + dump-file-directory: /opt/iota/state_debug_dump +enable-experimental-rest-api: true +# db_snapshot +db-checkpoint-config: + perform-db-checkpoints-at-epoch-end: true + perform-index-db-checkpoints-at-epoch-end: true + prune-and-compact-before-upload: false + object-store-config: + object-store: "File" + directory: "/opt/iota/db_snapshot" + object-store-connection-limit: 20 + concurrency: 5 +# formal_snapshot +state-snapshot-write-config: + object-store-config: + object-store: "File" + directory: "/opt/iota/formal_snapshot" + object-store-connection-limit: 20 + concurrency: 5 +# archive mode +state-archive-write-config: + object-store-config: + object-store: "File" + directory: "/opt/iota/archive" + object-store-connection-limit: 20 + concurrency: 5 + use-for-pruning-watermark: false +state-archive-read-config: + - object-store-config: + object-store: "File" + directory: "/opt/iota/archive" + object-store-connection-limit: 20 + concurrency: 5 + use-for-pruning-watermark: true \ No newline at end of file diff --git a/docker/iota-private-network/configs/fullnodes/fullnode.yaml b/docker/iota-private-network/configs/fullnodes/fullnode.yaml new file mode 100644 index 00000000000..2be1ae4e5fb --- /dev/null +++ b/docker/iota-private-network/configs/fullnodes/fullnode.yaml @@ -0,0 +1,24 @@ +--- +db-path: /opt/iota/db +network-address: /ip4/0.0.0.0/tcp/8080/http +json-rpc-address: "0.0.0.0:9000" +metrics-address: "0.0.0.0:9184" +admin-interface-port: 1337 +enable-event-processing: true +grpc-load-shed: ~ +grpc-concurrency-limit: ~ +p2p-config: + listen-address: "0.0.0.0:8084" +genesis: + genesis-file-location: /opt/iota/config/genesis.blob +authority-store-pruning-config: + num-latest-epoch-dbs-to-retain: 3 + epoch-db-pruning-period-secs: 3600 + num-epochs-to-retain: 18446744073709551615 + max-checkpoints-in-batch: 5 + max-transactions-in-batch: 1000 + use-range-deletion: true + pruning-run-delay-seconds: 60 +state-debug-dump-config: + dump-file-directory: /opt/iota/state_debug_dump +enable-experimental-rest-api: true \ No newline at end of file diff --git a/docker/iota-private-network/configs/genesis-template.yaml b/docker/iota-private-network/configs/genesis-template.yaml new file mode 100644 index 00000000000..73de21055bf --- /dev/null +++ b/docker/iota-private-network/configs/genesis-template.yaml @@ -0,0 +1,55 @@ +accounts: +- address: '0xd59d79516a4ed5b6825e80826c075a12bdd2759aaeb901df2f427f5f880c8f60' + gas_amounts: + - 750000000000000000 + - 750000000000000000 +- address: '0x160ef6ce4f395208a12119c5011bf8d8ceb760e3159307c819bd0197d154d384' + gas_amounts: + - 20000000000000000 + - 20000000000000000 + - 20000000000000000 + - 20000000000000000 + - 20000000000000000 +- address: '0x7cc6ff19b379d305b8363d9549269e388b8c1515772253ed4c868ee80b149ca0' + gas_amounts: + - 750000000000000000 +parameters: + allow_insertion_of_extra_objects: false + epoch_duration_ms: 120000 +validator_config_info: +- commission_rate: 0 + gas_price: 1000 + name: validator-1 + consensus_address: /ip4/127.0.0.1/tcp/8083/http + narwhal_primary_address: /dns/validator-1/udp/8081 + narwhal_worker_address: /dns/validator-1/udp/8082 + network_address: /dns/validator-1/tcp/8080/http + p2p_address: /dns/validator-1/udp/8084 + stake: 20000000000000000 +- commission_rate: 0 + gas_price: 1000 + name: validator-2 + consensus_address: /ip4/127.0.0.1/tcp/8083/http + narwhal_primary_address: /dns/validator-2/udp/8081 + narwhal_worker_address: /dns/validator-2/udp/8082 + network_address: /dns/validator-2/tcp/8080/http + p2p_address: /dns/validator-2/udp/8084 + stake: 20000000000000000 +- commission_rate: 0 + gas_price: 1000 + name: validator-3 + consensus_address: /ip4/127.0.0.1/tcp/8083/http + narwhal_primary_address: /dns/validator-3/udp/8081 + narwhal_worker_address: /dns/validator-3/udp/8082 + network_address: /dns/validator-3/tcp/8080/http + p2p_address: /dns/validator-3/udp/8084 + stake: 20000000000000000 +- commission_rate: 0 + gas_price: 1000 + name: validator-4 + consensus_address: /ip4/127.0.0.1/tcp/8083/http + narwhal_primary_address: /dns/validator-4/udp/8081 + narwhal_worker_address: /dns/validator-4/udp/8082 + network_address: /dns/validator-4/tcp/8080/http + p2p_address: /dns/validator-4/udp/8084 + stake: 20000000000000000 diff --git a/docker/iota-private-network/configs/genesis/.keep b/docker/iota-private-network/configs/genesis/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/docker/iota-private-network/configs/validator-common.yaml b/docker/iota-private-network/configs/validator-common.yaml new file mode 100644 index 00000000000..7a0fc8f9c69 --- /dev/null +++ b/docker/iota-private-network/configs/validator-common.yaml @@ -0,0 +1,20 @@ +validator: + network-address: /ip4/0.0.0.0/tcp/8080/http + metrics-address: 0.0.0.0:9184 + json-rpc-address: 0.0.0.0:9000 + admin-interface-port: 1337 + genesis: + genesis-file-location: /opt/iota/config/genesis.blob + db-path: /opt/iota/db/authorities_db + consensus-config: + db-path: /opt/iota/db/consensus_db + narwhal-config: + max_header_delay: 2000ms + expensive-safety-check-config: + enable-epoch-iota-conservation-check: false + enable-deep-per-tx-iota-conservation-check: false + force-disable-epoch-iota-conservation-check: false + enable-state-consistency-check: false + force-disable-state-consistency-check: false + enable-move-vm-paranoid-checks: false + epoch_duration_ms: 120000 diff --git a/docker/iota-private-network/configs/validators/.keep b/docker/iota-private-network/configs/validators/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/docker/iota-private-network/docker-compose.yaml b/docker/iota-private-network/docker-compose.yaml new file mode 100644 index 00000000000..fbbc05c29db --- /dev/null +++ b/docker/iota-private-network/docker-compose.yaml @@ -0,0 +1,312 @@ +version: "3" + +x-common-validator: &common-validator + image: iota-node + environment: &common-env + - RUST_BACKTRACE=1 + - RUST_LOG=info,iota_core=debug,iota_network=debug,iota_node=debug,narwhal=debug,narwhal-primary::helper=info,jsonrpsee=error + - RPC_WORKER_THREAD=12 + - NEW_CHECKPOINT_WARNING_TIMEOUT_MS=30000 + - NEW_CHECKPOINT_PANIC_TIMEOUT_MS=60000 + command: &common-command + [ + "/usr/local/bin/iota-node", + "--config-path", + "/opt/iota/config/validator.yaml", + ] + restart: on-failure + logging: &common-logging + driver: "json-file" + options: + max-file: "10" + max-size: "1g" + +x-common-fullnode: &common-fullnode + <<: *common-validator + command: + [ + "/usr/local/bin/iota-node", + "--config-path", + "/opt/iota/config/fullnode.yaml", + ] + +services: + validator-1: + <<: *common-validator + container_name: validator-1 + hostname: validator-1 + networks: + iota-network: + ipv4_address: 10.0.0.11 + volumes: + - ./configs/validators/validator-1-8080.yaml:/opt/iota/config/validator.yaml:ro + - ./configs/genesis/genesis.blob:/opt/iota/config/genesis.blob:ro + - ./data/validator-1:/opt/iota/db:rw + + validator-2: + <<: *common-validator + container_name: validator-2 + hostname: validator-2 + networks: + iota-network: + ipv4_address: 10.0.0.12 + volumes: + - ./configs/validators/validator-2-8080.yaml:/opt/iota/config/validator.yaml:ro + - ./configs/genesis/genesis.blob:/opt/iota/config/genesis.blob:ro + - ./data/validator-2:/opt/iota/db:rw + + validator-3: + <<: *common-validator + container_name: validator-3 + hostname: validator-3 + networks: + iota-network: + ipv4_address: 10.0.0.13 + volumes: + - ./configs/validators/validator-3-8080.yaml:/opt/iota/config/validator.yaml:ro + - ./configs/genesis/genesis.blob:/opt/iota/config/genesis.blob:ro + - ./data/validator-3:/opt/iota/db:rw + + validator-4: + <<: *common-validator + container_name: validator-4 + hostname: validator-4 + networks: + iota-network: + ipv4_address: 10.0.0.14 + volumes: + - ./configs/validators/validator-4-8080.yaml:/opt/iota/config/validator.yaml:ro + - ./configs/genesis/genesis.blob:/opt/iota/config/genesis.blob:ro + - ./data/validator-4:/opt/iota/db:rw + + fullnode-1: + <<: *common-fullnode + container_name: fullnode-1 + hostname: fullnode-1 + networks: + iota-network: + ipv4_address: 10.0.0.15 + volumes: + - ./data/fullnode-1:/opt/iota/db:rw + - ./configs/fullnodes/fullnode.yaml:/opt/iota/config/fullnode.yaml:ro + - ./configs/genesis/genesis.blob:/opt/iota/config/genesis.blob:ro + expose: + - "9000" + ports: + - "127.0.0.1:9000:9000/tcp" + - "127.0.0.1:9184:9184/tcp" + + fullnode-2: + <<: *common-fullnode + container_name: fullnode-2 + hostname: fullnode-2 + networks: + iota-network: + ipv4_address: 10.0.0.16 + volumes: + - ./data/fullnode-2:/opt/iota/db:rw + - ./configs/fullnodes/backup.yaml:/opt/iota/config/fullnode.yaml:ro + - ./configs/genesis/genesis.blob:/opt/iota/config/genesis.blob:ro + ports: + - "127.0.0.1:9001:9000/tcp" + - "127.0.0.1:9185:9184/tcp" + + fullnode-3: + <<: *common-fullnode + container_name: fullnode-3 + hostname: fullnode-3 + networks: + iota-network: + ipv4_address: 10.0.0.17 + volumes: + - ./data/fullnode-3:/opt/iota/db:rw + - ./configs/fullnodes/fullnode.yaml:/opt/iota/config/fullnode.yaml:ro + - ./configs/genesis/genesis.blob:/opt/iota/config/genesis.blob:ro + ports: + - "127.0.0.1:9002:9000/tcp" + - "127.0.0.1:9186:9184/tcp" + + fullnode-4: + <<: *common-fullnode + container_name: fullnode-4 + hostname: fullnode-4 + networks: + iota-network: + ipv4_address: 10.0.0.18 + volumes: + - ./data/fullnode-4:/opt/iota/db:rw + - ./configs/fullnodes/fullnode.yaml:/opt/iota/config/fullnode.yaml:ro + - ./configs/genesis/genesis.blob:/opt/iota/config/genesis.blob:ro + ports: + - "127.0.0.1:9003:9000/tcp" + - "127.0.0.1:9187:9184/tcp" + + indexer-1: + image: iota-indexer + container_name: indexer-1 + hostname: indexer-1 + restart: on-failure + networks: + iota-network: + ipv4_address: 10.0.0.19 + environment: + - RUST_BACKTRACE=1 + - RUST_LOG=info + - RPC_WORKER_THREAD=12 + command: + - /usr/local/bin/iota-indexer + - --db-url=postgres://iota_indexer:iota_indexer@postgres_primary:5432/iota_indexer + - --rpc-client-url=http://fullnode-3:9000 + - --fullnode-sync-worker + - --client-metric-port=9181 + - --reset-db + ports: + - "127.0.0.1:9004:9000/tcp" + - "127.0.0.1:9181:9181/tcp" + volumes: + - ./data/indexer-1:/opt/iota + depends_on: + - fullnode-3 + - postgres_primary + + indexer-2: + image: iota-indexer + container_name: indexer-2 + hostname: indexer-2 + restart: on-failure + networks: + iota-network: + ipv4_address: 10.0.0.20 + environment: + - RUST_BACKTRACE=1 + - RUST_LOG=info + - RPC_WORKER_THREAD=12 + command: + - /usr/local/bin/iota-indexer + - --db-url=postgres://iota_indexer:iota_indexer@postgres_replica:5432/iota_indexer + - --rpc-client-url=http://fullnode-4:9000 + - --rpc-server-worker + - --client-metric-port=9181 + ports: + - "127.0.0.1:9005:9000/tcp" + - "127.0.0.1:9182:9181/tcp" + depends_on: + - fullnode-4 + - postgres_replica + volumes: + - ./data/indexer-2:/opt/iota + + faucet-1: + image: iota-tools + container_name: faucet-1 + hostname: faucet-1 + restart: on-failure + networks: + iota-network: + ipv4_address: 10.0.0.21 + environment: + - RUST_BACKTRACE=1 + - RUST_LOG=info + - RPC_WORKER_THREAD=12 + command: + - /usr/local/bin/iota-faucet + - --port=5003 + - --host-ip=0.0.0.0 + - --write-ahead-log=/wal/faucet.wal + - --num-coins=1 + - --amount=10000000000 + ports: + - "127.0.0.1:5003:5003/tcp" + - "127.0.0.1:9188:9184/tcp" + volumes: + - ./configs/faucet:/root/.iota/iota_config + - ./data/faucet-1:/wal + depends_on: + - fullnode-1 + + postgres_primary: + image: postgres:15 + user: postgres + restart: always + container_name: postgres_primary + hostname: postgres_primary + networks: + iota-network: + ipv4_address: 10.0.0.22 + expose: + - 5432 + ports: + - "127.0.0.1:5432:5432" + environment: + POSTGRES_USER: iota_indexer + POSTGRES_PASSWORD: iota_indexer + POSTGRES_DB: iota_indexer + POSTGRES_HOST_AUTH_METHOD: "scram-sha-256\nhost replication all 0.0.0.0/0 md5" + POSTGRES_INITDB_ARGS: "--auth-host=scram-sha-256" + command: | + postgres + -c wal_level=replica + -c hot_standby=on + -c max_wal_senders=10 + -c max_replication_slots=10 + -c hot_standby_feedback=on + -c 'max_connections=1000' + volumes: + - ./static/init.sql:/docker-entrypoint-initdb.d/init.sql + - ./data/primary:/var/lib/postgresql/data + healthcheck: + test: "pg_isready -p 5432" + interval: 30s + timeout: 15s + retries: 20 + start_period: 10s + + postgres_replica: + image: postgres:15 + user: postgres + restart: always + container_name: postgres_replica + hostname: postgres_replica + networks: + iota-network: + ipv4_address: 10.0.0.23 + expose: + - 5432 + ports: + - "127.0.0.1:5433:5432" + environment: + PGUSER: replicator + PGPASSWORD: replicator + command: | + bash -c " + if [ ! -s /var/lib/postgresql/data/PG_VERSION ]; then + echo 'Initializing replica...' + until pg_basebackup --pgdata=/var/lib/postgresql/data -R --slot=replication_slot --host=postgres_primary --port=5432 + do + echo 'Waiting for primary to connect...' + sleep 1s + done + echo 'Backup done, starting replica...' + else + echo 'Existing data found, starting replica...' + fi + chmod 0700 /var/lib/postgresql/data + postgres -c 'max_connections=1000' + " + depends_on: + - postgres_primary + volumes: + - ./data/replica:/var/lib/postgresql/data + healthcheck: + test: "pg_isready -p 5432" + interval: 30s + timeout: 15s + retries: 20 + start_period: 10s + +networks: + iota-network: + driver: bridge + ipam: + config: + - subnet: 10.0.0.0/24 \ No newline at end of file diff --git a/docker/iota-private-network/run.sh b/docker/iota-private-network/run.sh new file mode 100755 index 00000000000..13cfec99065 --- /dev/null +++ b/docker/iota-private-network/run.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Copyright (c) 2024 IOTA Stiftung +# SPDX-License-Identifier: Apache-2.0 + +if [ ! -d "./data" ]; then + echo "Please run './bootstrap.sh' first" + exit +fi + +function start_services() { + services="$1" + docker compose up -d validator-1 validator-2 validator-3 validator-4 $services +} + +declare -A modes +modes=( + [faucet]="fullnode-1 faucet-1" + [backup]="fullnode-2" + [indexer]="fullnode-3 indexer-1 postgres_primary" + [indexer-cluster]="fullnode-3 indexer-1 postgres_primary fullnode-4 indexer-2 postgres_replica" +) + +services_to_start="" + +if [ $# -eq 0 ]; then + services_to_start="fullnode-1 fullnode-2 fullnode-3 fullnode-4 indexer-1 indexer-2 postgres_primary postgres_replica" +else + for mode in "$@"; do + if [[ $mode == "all" ]]; then + services_to_start="fullnode-1 fullnode-2 fullnode-3 fullnode-4 indexer-1 indexer-2 postgres_primary postgres_replica" + break + else + services_to_start="$services_to_start ${modes[$mode]}" + fi + done +fi + +start_services "$services_to_start" \ No newline at end of file diff --git a/docker/iota-private-network/static/init.sql b/docker/iota-private-network/static/init.sql new file mode 100644 index 00000000000..c5a06a31424 --- /dev/null +++ b/docker/iota-private-network/static/init.sql @@ -0,0 +1,2 @@ +create user replicator with replication encrypted password 'replicator'; +select pg_create_physical_replication_slot('replication_slot'); \ No newline at end of file diff --git a/docker/iota-private-network/static/iota.keystore b/docker/iota-private-network/static/iota.keystore new file mode 100644 index 00000000000..169a8ea5356 --- /dev/null +++ b/docker/iota-private-network/static/iota.keystore @@ -0,0 +1,3 @@ +[ + "ACWkfiQ6x7FxJ74IZAgQYRl67TTtLLDlP2RhJjPI6tTQ" +] diff --git a/docker/iota-services/build.sh b/docker/iota-services/build.sh index a5b48cfba3c..885e131ff0c 100755 --- a/docker/iota-services/build.sh +++ b/docker/iota-services/build.sh @@ -1,7 +1,5 @@ #!/bin/sh # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/docker/iota-source-service/build.sh b/docker/iota-source-service/build.sh index f2f52cc266d..547f766da2b 100755 --- a/docker/iota-source-service/build.sh +++ b/docker/iota-source-service/build.sh @@ -1,7 +1,5 @@ #!/bin/sh # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/docker/iota-tools/build.sh b/docker/iota-tools/build.sh index b26777b20e1..c59b98cae28 100755 --- a/docker/iota-tools/build.sh +++ b/docker/iota-tools/build.sh @@ -1,7 +1,5 @@ #!/bin/sh # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/external-crates/move/crates/move-analyzer/editors/code/scripts/create.sh b/external-crates/move/crates/move-analyzer/editors/code/scripts/create.sh index 3a42ffc9cb6..9102fff8e8d 100755 --- a/external-crates/move/crates/move-analyzer/editors/code/scripts/create.sh +++ b/external-crates/move/crates/move-analyzer/editors/code/scripts/create.sh @@ -1,7 +1,5 @@ #!/bin/zsh # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/external-crates/move/crates/move-analyzer/prettier-plugin/scripts/treesitter-wasm-gen.sh b/external-crates/move/crates/move-analyzer/prettier-plugin/scripts/treesitter-wasm-gen.sh index 2ac2b0bce84..cb2aee5b5e2 100755 --- a/external-crates/move/crates/move-analyzer/prettier-plugin/scripts/treesitter-wasm-gen.sh +++ b/external-crates/move/crates/move-analyzer/prettier-plugin/scripts/treesitter-wasm-gen.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/external-crates/move/crates/move-binary-format/src/check_bounds.rs b/external-crates/move/crates/move-binary-format/src/check_bounds.rs index 61b7511207b..a416fbd5131 100644 --- a/external-crates/move/crates/move-binary-format/src/check_bounds.rs +++ b/external-crates/move/crates/move-binary-format/src/check_bounds.rs @@ -205,7 +205,7 @@ impl<'a> BoundsChecker<'a> { check_bounds_impl(self.view.identifiers(), function_handle.name)?; check_bounds_impl(self.view.signatures(), function_handle.parameters)?; check_bounds_impl(self.view.signatures(), function_handle.return_)?; - // function signature type paramters must be in bounds to the function type + // function signature type parameters must be in bounds to the function type // parameters let type_param_count = function_handle.type_parameters.len(); if let Some(sig) = self diff --git a/external-crates/move/crates/move-binary-format/src/compatibility.rs b/external-crates/move/crates/move-binary-format/src/compatibility.rs index 41e8842925e..0f728f238c1 100644 --- a/external-crates/move/crates/move-binary-format/src/compatibility.rs +++ b/external-crates/move/crates/move-binary-format/src/compatibility.rs @@ -332,7 +332,7 @@ fn type_parameter_phantom_decl_compatible( // phantom/non-phantom cannot change from one version to the next. old_type_parameter.is_phantom == new_type_parameter.is_phantom } else { - // old_type_paramter.is_phantom => new_type_parameter.is_phantom + // old_type_parameter.is_phantom => new_type_parameter.is_phantom !old_type_parameter.is_phantom || new_type_parameter.is_phantom } } diff --git a/external-crates/move/crates/move-bytecode-utils/src/dependency_graph.rs b/external-crates/move/crates/move-bytecode-utils/src/dependency_graph.rs index 13b3e57c673..0102aacb1a1 100644 --- a/external-crates/move/crates/move-bytecode-utils/src/dependency_graph.rs +++ b/external-crates/move/crates/move-bytecode-utils/src/dependency_graph.rs @@ -22,7 +22,7 @@ struct ModuleIndex(usize); impl<'a> DependencyGraph<'a> { /// Construct a dependency graph from a set of `modules`. /// Panics if `modules` contains duplicates or is not closed under the - /// depedency relation + /// dependency relation pub fn new(module_iter: impl IntoIterator) -> Self { let mut modules = vec![]; let mut reverse_modules = BTreeMap::new(); diff --git a/external-crates/move/crates/move-bytecode-verifier/src/check_duplication.rs b/external-crates/move/crates/move-bytecode-verifier/src/check_duplication.rs index 427dd3963b7..d4f6fac5b4a 100644 --- a/external-crates/move/crates/move-bytecode-verifier/src/check_duplication.rs +++ b/external-crates/move/crates/move-bytecode-verifier/src/check_duplication.rs @@ -51,7 +51,7 @@ impl<'a> DuplicationChecker<'a> { let checker = Self { module }; checker.check_field_handles()?; checker.check_field_instantiations()?; - checker.check_function_defintions()?; + checker.check_function_definitions()?; checker.check_struct_definitions()?; checker.check_struct_instantiations() } @@ -263,7 +263,7 @@ impl<'a> DuplicationChecker<'a> { Ok(()) } - fn check_function_defintions(&self) -> PartialVMResult<()> { + fn check_function_definitions(&self) -> PartialVMResult<()> { // FunctionDefinition - contained FunctionHandle defines uniqueness if let Some(idx) = Self::first_duplicate_element(self.module.function_defs().iter().map(|x| x.function)) diff --git a/external-crates/move/crates/move-cli/README.md b/external-crates/move/crates/move-cli/README.md index 7dae2bdb455..4ca15207445 100644 --- a/external-crates/move/crates/move-cli/README.md +++ b/external-crates/move/crates/move-cli/README.md @@ -4,17 +4,21 @@ The Move command-line interface (Move CLI) is a tool that provides an easy way t with writing and running Move code, and to experiment with developing new tools useful for Move development. To reflect this, the Move CLI commands are grouped into three main subcommands: -* **package commands**: are commands to create, compile, and test Move packages, as well as perform other operations related to packages. These do not rely on a Move Adapter implementation nor an implementation of storage. -* **sandbox commands**: are commands that allow you to write Move modules and scripts, write and run scripts and tests, and view the resulting state of execution in a local sandboxed environment. -* **experimental commands**: are experimental commands that are currently in development. + +- **package commands**: are commands to create, compile, and test Move packages, as well as perform other operations related to packages. These do not rely on a Move Adapter implementation nor an implementation of storage. +- **sandbox commands**: are commands that allow you to write Move modules and scripts, write and run scripts and tests, and view the resulting state of execution in a local sandboxed environment. +- **experimental commands**: are experimental commands that are currently in development. Every Move CLI command, with the exception of `package create`, is expected to be run within the context of a [Move package](https://move-language.github.io/move/packages.html). ## Installation + ```shell $ cargo install --path move/language/tools/move-cli ``` + or + ```shell $ cargo install --git https://github.com/move-language/move move-cli --branch main ``` @@ -37,7 +41,7 @@ USAGE: We'll go through the most common Move CLI commands and flags here, however you can find the complete list of commands available by calling `move ---help`. Additionally, the complete list of flags and options available +--help`. Additionally, the complete list of flags and options available for each Move CLI command can be found by passing the `--help` flag to it, i.e., `move --help`. @@ -47,12 +51,14 @@ Package commands provide wrappers with sane defaults around other commands that are provided either by various Move tools, compiler, or prover. The `move new` command will create a new empty Move package: + ```shell $ move new # Create a Move package under the current dir $ move new -p # Create a Move package under path ``` From within a package's root directory, you can build the modules and/or scripts that you have written in the package with: + ```shell $ move build # Builds the Move package you are currently in $ move build -p # Builds the Move package at @@ -85,6 +91,7 @@ You can also run unit tests in a package using the `test` command $ move test # Run Move unit tests in the current package $ move test -p # Run Move unit tests in the package at ``` + ## Sandbox Commands The sandbox allows you to experiment with writing and running Move code without @@ -147,11 +154,12 @@ single-`signer` script will trigger a type error. ### Passing arguments The CLI supports passing non-`signer` arguments to `move sandbox run` via `--args`. The following argument types are supported: -* `bool` literals (`true`, `false`) -* `u64` literals (e.g., `10`, `58`) -* `address` literals (e.g., `0x12`, `0x0000000000000000000000000000000f`) -* hexadecimal strings (e.g., `'x"0012"'` will parse as the `vector` value `[00, 12]`) -* ASCII strings (e.g., `'b"hi"'` will parse as the `vector` value `[68, 69]`) + +- `bool` literals (`true`, `false`) +- `u64` literals (e.g., `10`, `58`) +- `address` literals (e.g., `0x12`, `0x0000000000000000000000000000000f`) +- hexadecimal strings (e.g., `'x"0012"'` will parse as the `vector` value `[00, 12]`) +- ASCII strings (e.g., `'b"hi"'` will parse as the `vector` value `[68, 69]`) ### Publishing new modules @@ -355,7 +363,7 @@ key 0x2::Test::Resource { #### Cleaning state Since state persists from one call to the Move CLI to another, there will -frequently be times where you want to start again at a clean state. This +frequently be times where you want to start again at a clean state. This can be done using the `move sandbox clean` command which will remove the `storage` and `build` directories: @@ -456,6 +464,7 @@ Note: To view coverage information, the Move CLI must be installed with the `--d i.e., `cargo install --debug --path move/language/tools/move-cli`. Using our running example to illustrate: + ```shell $ move sandbox exp-test -p readme --track-cov 1 / 1 test(s) passed. @@ -476,7 +485,7 @@ Module 00000000000000000000000000000002::Test ``` The output indicates that not only the test is passed, but also that 100% -instruction coverage is observed in the `publish` funciton. This is expected +instruction coverage is observed in the `publish` function. This is expected as the whole purpose of our `test_script.move` is to run the `publish` function. At the same time, the other two functions, `unpublish` and `write`, are never executed, making the average coverage 27.78% for the whole `Test` module. @@ -503,11 +512,13 @@ fun test_unpublish_script(account: signer) { We further add a new command to the end of `args.txt` (`args.exp` needs to be updated too). + ```shell sandbox run sources/test_unpublish_script.move --signers 0xf -v ``` Now we can re-test the `readme` again + ```shell $ move sandbox exp-test -p readme --track-cov 1 / 1 test(s) passed. @@ -535,9 +546,9 @@ overall module coverage is boosted to 61.11%. The `move sandbox publish` command automatically detects when upgrading a module may lead to a breaking change. There are two kinds of breaking changes: -* Linking compatibility (e.g., removing or changing the signature of a public function that is invoked by other modules, removing a -struct or resource type used by other modules) -* Layout compatibility (e.g., adding/removing a resource or struct field) +- Linking compatibility (e.g., removing or changing the signature of a public function that is invoked by other modules, removing a + struct or resource type used by other modules) +- Layout compatibility (e.g., adding/removing a resource or struct field) The breaking changes analysis performed by `move sandbox publish` is necessarily conservative. For example, say we `move sandbox publish` the following module: @@ -570,7 +581,8 @@ Error: Layout API for structs of module 00000000000000000000000000000002::M has In this case, we know we have not published any instances of `S` in global storage, so it is safe to re-run `move sandbox publish --ignore-breaking-changes` (as recommended). We can double-check that this was not a breaking change by running `move sandbox doctor`. This handy command runs exhaustive sanity checks on global storage to detect any breaking changes that occurred in the past: -* All modules pass the bytecode verifier -* All modules link against their dependencies -* All resources deserialize according to their declared types -* All events deserialize according to their declared types + +- All modules pass the bytecode verifier +- All modules link against their dependencies +- All resources deserialize according to their declared types +- All events deserialize according to their declared types diff --git a/external-crates/move/crates/move-cli/src/sandbox/cli.rs b/external-crates/move/crates/move-cli/src/sandbox/cli.rs index eb169bbf5f2..41af0ba1edf 100644 --- a/external-crates/move/crates/move-cli/src/sandbox/cli.rs +++ b/external-crates/move/crates/move-cli/src/sandbox/cli.rs @@ -99,7 +99,7 @@ pub enum SandboxCommand { )] type_args: Vec, /// Maximum number of gas units to be consumed by execution. - /// When the budget is exhaused, execution will abort. + /// When the budget is exhausted, execution will abort. /// By default, no `gas-budget` is specified and gas metering is /// disabled. #[clap(long = "gas-budget", short = 'g')] diff --git a/external-crates/move/crates/move-cli/src/sandbox/commands/publish.rs b/external-crates/move/crates/move-cli/src/sandbox/commands/publish.rs index b02e4a2711f..9164f8bfd30 100644 --- a/external-crates/move/crates/move-cli/src/sandbox/commands/publish.rs +++ b/external-crates/move/crates/move-cli/src/sandbox/commands/publish.rs @@ -121,7 +121,7 @@ pub fn publish( if let Err(err) = res { println!("Invalid multi-module publishing: {}", err); if let Location::Module(module_id) = err.location() { - // find the module where error occures and explain + // find the module where error occurres and explain if let Some(unit) = modules_to_publish .into_iter() .find(|&x| x.unit.name().as_str() == module_id.name().as_str()) diff --git a/external-crates/move/crates/move-cli/tests/build_tests/migration/backup_sources/mod1.move b/external-crates/move/crates/move-cli/tests/build_tests/migration/backup_sources/mod1.move index 4d1a91ca01d..b5faeb0b843 100644 --- a/external-crates/move/crates/move-cli/tests/build_tests/migration/backup_sources/mod1.move +++ b/external-crates/move/crates/move-cli/tests/build_tests/migration/backup_sources/mod1.move @@ -3,7 +3,7 @@ module A::mod1 { public fun t(x: u64, yip: u64, s: S): u64 { let yes = 0; let S { f: fin } = s; - // these four assignments necessiate mut annotations above + // these four assignments necessitate mut annotations above yip = 0; x = yes + 1; fin = fin + 1; diff --git a/external-crates/move/crates/move-cli/tests/build_tests/migration/backup_sources/mod2.move b/external-crates/move/crates/move-cli/tests/build_tests/migration/backup_sources/mod2.move index 83b28164367..e28c9e73272 100644 --- a/external-crates/move/crates/move-cli/tests/build_tests/migration/backup_sources/mod2.move +++ b/external-crates/move/crates/move-cli/tests/build_tests/migration/backup_sources/mod2.move @@ -3,7 +3,7 @@ module A::mod2 { public fun t(x: u64, yip: u64, s: S): u64 { let yes = 0; let S { f: fin } = s; - // these four assignments necessiate mut annotations above + // these four assignments necessitate mut annotations above yip = 0; x = yes + 1; fin = fin + 1; diff --git a/external-crates/move/crates/move-cli/tests/build_tests/migration/backup_sources/mod3_4.move b/external-crates/move/crates/move-cli/tests/build_tests/migration/backup_sources/mod3_4.move index 44ecf45101a..1a884d48a67 100644 --- a/external-crates/move/crates/move-cli/tests/build_tests/migration/backup_sources/mod3_4.move +++ b/external-crates/move/crates/move-cli/tests/build_tests/migration/backup_sources/mod3_4.move @@ -22,7 +22,7 @@ module A::mod4 { public fun t(x: u64, yip: u64, s: S): u64 { let yes = 0; let S { f: fin } = s; - // these four assignments necessiate mut annotations above + // these four assignments necessitate mut annotations above yip = 0; x = yes + 1; fin = fin + 1; diff --git a/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_sources/mod1.move b/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_sources/mod1.move index 58d7f7ba908..399dc0a6139 100644 --- a/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_sources/mod1.move +++ b/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_sources/mod1.move @@ -3,7 +3,7 @@ module A::mod1 { public fun t(mut x: u64, mut yip: u64, s: S): u64 { let mut yes = 0; let S { f: mut fin } = s; - // these four assignments necessiate mut annotations above + // these four assignments necessitate mut annotations above yip = 0; x = yes + 1; fin = fin + 1; diff --git a/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_sources/mod2.move b/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_sources/mod2.move index 8927fcfd89c..9e7263c2d6b 100644 --- a/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_sources/mod2.move +++ b/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_sources/mod2.move @@ -3,7 +3,7 @@ module A::mod2 { public fun t(mut x: u64, mut yip: u64, s: S): u64 { let mut yes = 0; let S { f: mut fin } = s; - // these four assignments necessiate mut annotations above + // these four assignments necessitate mut annotations above yip = 0; x = yes + 1; fin = fin + 1; diff --git a/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_sources/mod3_4.move b/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_sources/mod3_4.move index 562cf1cf3ee..cae4b891318 100644 --- a/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_sources/mod3_4.move +++ b/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_sources/mod3_4.move @@ -22,7 +22,7 @@ module A::mod4 { public fun t(mut x: u64, mut yip: u64, s: S): u64 { let mut yes = 0; let S { f: mut fin } = s; - // these four assignments necessiate mut annotations above + // these four assignments necessitate mut annotations above yip = 0; x = yes + 1; fin = fin + 1; diff --git a/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_tests/test0.move b/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_tests/test0.move index e910c153f72..c8518c74ef6 100644 --- a/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_tests/test0.move +++ b/external-crates/move/crates/move-cli/tests/build_tests/migration/migration_tests/test0.move @@ -425,9 +425,9 @@ module A::vector_tests { assert!(index == 1, 1); } - // index_of will return the index first occurence that is equal + // index_of will return the index first occurrence that is equal #[test] - fun index_of_nonempty_has_multiple_occurences() { + fun index_of_nonempty_has_multiple_occurrences() { let mut v = V::empty(); V::push_back(&mut v, false); V::push_back(&mut v, true); diff --git a/external-crates/move/crates/move-cli/tests/build_tests/migration/sources/mod1.move b/external-crates/move/crates/move-cli/tests/build_tests/migration/sources/mod1.move index 4d1a91ca01d..b5faeb0b843 100644 --- a/external-crates/move/crates/move-cli/tests/build_tests/migration/sources/mod1.move +++ b/external-crates/move/crates/move-cli/tests/build_tests/migration/sources/mod1.move @@ -3,7 +3,7 @@ module A::mod1 { public fun t(x: u64, yip: u64, s: S): u64 { let yes = 0; let S { f: fin } = s; - // these four assignments necessiate mut annotations above + // these four assignments necessitate mut annotations above yip = 0; x = yes + 1; fin = fin + 1; diff --git a/external-crates/move/crates/move-cli/tests/build_tests/migration/sources/mod2.move b/external-crates/move/crates/move-cli/tests/build_tests/migration/sources/mod2.move index 83b28164367..e28c9e73272 100644 --- a/external-crates/move/crates/move-cli/tests/build_tests/migration/sources/mod2.move +++ b/external-crates/move/crates/move-cli/tests/build_tests/migration/sources/mod2.move @@ -3,7 +3,7 @@ module A::mod2 { public fun t(x: u64, yip: u64, s: S): u64 { let yes = 0; let S { f: fin } = s; - // these four assignments necessiate mut annotations above + // these four assignments necessitate mut annotations above yip = 0; x = yes + 1; fin = fin + 1; diff --git a/external-crates/move/crates/move-cli/tests/build_tests/migration/sources/mod3_4.move b/external-crates/move/crates/move-cli/tests/build_tests/migration/sources/mod3_4.move index 44ecf45101a..1a884d48a67 100644 --- a/external-crates/move/crates/move-cli/tests/build_tests/migration/sources/mod3_4.move +++ b/external-crates/move/crates/move-cli/tests/build_tests/migration/sources/mod3_4.move @@ -22,7 +22,7 @@ module A::mod4 { public fun t(x: u64, yip: u64, s: S): u64 { let yes = 0; let S { f: fin } = s; - // these four assignments necessiate mut annotations above + // these four assignments necessitate mut annotations above yip = 0; x = yes + 1; fin = fin + 1; diff --git a/external-crates/move/crates/move-cli/tests/build_tests/migration/tests/test0.move b/external-crates/move/crates/move-cli/tests/build_tests/migration/tests/test0.move index e3b67d8ea09..afa94b6d0eb 100644 --- a/external-crates/move/crates/move-cli/tests/build_tests/migration/tests/test0.move +++ b/external-crates/move/crates/move-cli/tests/build_tests/migration/tests/test0.move @@ -425,9 +425,9 @@ module A::vector_tests { assert!(index == 1, 1); } - // index_of will return the index first occurence that is equal + // index_of will return the index first occurrence that is equal #[test] - fun index_of_nonempty_has_multiple_occurences() { + fun index_of_nonempty_has_multiple_occurrences() { let v = V::empty(); V::push_back(&mut v, false); V::push_back(&mut v, true); diff --git a/external-crates/move/crates/move-compiler/src/command_line/compiler.rs b/external-crates/move/crates/move-compiler/src/command_line/compiler.rs index b6d9fd22116..023af308574 100644 --- a/external-crates/move/crates/move-compiler/src/command_line/compiler.rs +++ b/external-crates/move/crates/move-compiler/src/command_line/compiler.rs @@ -287,7 +287,7 @@ impl Compiler { /// canonicalized when converted to virtual file system paths /// and would show up as absolute in the test output /// which wouldn't be machine-agnostic. We need to relativize using - /// `vfs_root` beacuse it was also used during canonicalization + /// `vfs_root` because it was also used during canonicalization /// and might have altered path prefix in a non-standard way /// (e.g., this can happen on Windows). fn relativize_path(vsf_root: &VfsPath, path: Symbol) -> Symbol { diff --git a/external-crates/move/crates/move-compiler/src/expansion/translate.rs b/external-crates/move/crates/move-compiler/src/expansion/translate.rs index ef4eeb5d5da..ed6fb95fb42 100644 --- a/external-crates/move/crates/move-compiler/src/expansion/translate.rs +++ b/external-crates/move/crates/move-compiler/src/expansion/translate.rs @@ -4115,7 +4115,7 @@ fn check_restricted_name_all_cases( if Var::is_syntax_identifier_name(n.value) { let msg = format!( "Invalid {} name '{}'. Identifiers starting with '$' can be used only for \ - parameters and type paramters", + parameters and type parameters", case.name(), n, ); diff --git a/external-crates/move/crates/move-compiler/src/hlir/detect_dead_code.rs b/external-crates/move/crates/move-compiler/src/hlir/detect_dead_code.rs index 44965a7fcd1..1eb5f0f6cfc 100644 --- a/external-crates/move/crates/move-compiler/src/hlir/detect_dead_code.rs +++ b/external-crates/move/crates/move-compiler/src/hlir/detect_dead_code.rs @@ -25,7 +25,7 @@ use crate::{ // flow. It tracks control flow in a somewhat fine-grained way, and when it // finds a position that diverges it reports that as an error. // -// For simplicity, it aims to satify the following requirements: +// For simplicity, it aims to satisfy the following requirements: // // 1. For each block, if we discover a divergent instruction either at the // top level or embedded in a value position (e.g., the RHS of a let, or diff --git a/external-crates/move/crates/move-compiler/src/hlir/translate.rs b/external-crates/move/crates/move-compiler/src/hlir/translate.rs index 03d5b9304e2..a128afbc2ed 100644 --- a/external-crates/move/crates/move-compiler/src/hlir/translate.rs +++ b/external-crates/move/crates/move-compiler/src/hlir/translate.rs @@ -2433,7 +2433,7 @@ fn freeze(context: &mut Context, expected_type: &H::Type, e: H::Exp) -> (Block, T::Single(s) => s.clone(), _ => { let msg = format!( - "ICE list item has Multple type: {}", + "ICE list item has Multiple type: {}", debug_display_verbose!(e.ty) ); context.env.add_diag(ice!((e.ty.loc, msg))); diff --git a/external-crates/move/crates/move-compiler/src/typing/core.rs b/external-crates/move/crates/move-compiler/src/typing/core.rs index 6a84c7e9fd3..0d99a895a8a 100644 --- a/external-crates/move/crates/move-compiler/src/typing/core.rs +++ b/external-crates/move/crates/move-compiler/src/typing/core.rs @@ -1457,7 +1457,7 @@ fn solve_ability_constraint( let constraint_msg = match &given_msg_opt { Some(s) => s.clone(), - None => format!("'{}' constraint not satisifed", constraint), + None => format!("'{}' constraint not satisfied", constraint), }; let mut diag = diag!(AbilitySafety::Constraint, (loc, constraint_msg)); ability_not_satisfied_tips( diff --git a/external-crates/move/crates/move-compiler/tests/iota_mode/entry_points/receiving_non_object_type.exp b/external-crates/move/crates/move-compiler/tests/iota_mode/entry_points/receiving_non_object_type.exp index f8e0e7d2c9a..315f04c87b7 100644 --- a/external-crates/move/crates/move-compiler/tests/iota_mode/entry_points/receiving_non_object_type.exp +++ b/external-crates/move/crates/move-compiler/tests/iota_mode/entry_points/receiving_non_object_type.exp @@ -5,7 +5,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^ │ │ │ │ │ The type 'u64' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied · 10 │ struct Receiving has drop { │ --- 'key' constraint declared here diff --git a/external-crates/move/crates/move-compiler/tests/move_2024/expansion/macro_identifier_invalid_position.exp b/external-crates/move/crates/move-compiler/tests/move_2024/expansion/macro_identifier_invalid_position.exp index eab40b8b85e..a356fcb6d10 100644 --- a/external-crates/move/crates/move-compiler/tests/move_2024/expansion/macro_identifier_invalid_position.exp +++ b/external-crates/move/crates/move-compiler/tests/move_2024/expansion/macro_identifier_invalid_position.exp @@ -2,11 +2,11 @@ error[E02010]: invalid name ┌─ tests/move_2024/expansion/macro_identifier_invalid_position.move:1:8 │ 1 │ module $a::m {} - │ ^^ Invalid address name '$a'. Identifiers starting with '$' can be used only for parameters and type paramters + │ ^^ Invalid address name '$a'. Identifiers starting with '$' can be used only for parameters and type parameters error[E02010]: invalid name ┌─ tests/move_2024/expansion/macro_identifier_invalid_position.move:2:8 │ 2 │ module $b::m {} - │ ^^ Invalid address name '$b'. Identifiers starting with '$' can be used only for parameters and type paramters + │ ^^ Invalid address name '$b'. Identifiers starting with '$' can be used only for parameters and type parameters diff --git a/external-crates/move/crates/move-compiler/tests/move_2024/expansion/unnecessary_alias_implicit.exp b/external-crates/move/crates/move-compiler/tests/move_2024/expansion/unnecessary_alias_implicit.exp index 8bb732f38a8..bbff60a5425 100644 --- a/external-crates/move/crates/move-compiler/tests/move_2024/expansion/unnecessary_alias_implicit.exp +++ b/external-crates/move/crates/move-compiler/tests/move_2024/expansion/unnecessary_alias_implicit.exp @@ -4,7 +4,7 @@ warning[W02021]: duplicate alias 2 │ public struct S() │ - The same alias was previously declared here 3 │ public fun foo() { -4 │ use a::m::S; // unused and duplciate +4 │ use a::m::S; // unused and duplicate │ ^ Unnecessary alias 'S' for module member 'a::m::S'. It was already in scope │ = This warning can be suppressed with '#[allow(duplicate_alias)]' applied to the 'module' or module member ('const', 'fun', or 'struct') @@ -12,7 +12,7 @@ warning[W02021]: duplicate alias warning[W09001]: unused alias ┌─ tests/move_2024/expansion/unnecessary_alias_implicit.move:4:19 │ -4 │ use a::m::S; // unused and duplciate +4 │ use a::m::S; // unused and duplicate │ ^ Unused 'use' of alias 'S'. Consider removing it │ = This warning can be suppressed with '#[allow(unused_use)]' applied to the 'module' or module member ('const', 'fun', or 'struct') @@ -22,8 +22,8 @@ warning[W02021]: duplicate alias │ 3 │ public fun foo() { │ --- The same alias was previously declared here -4 │ use a::m::S; // unused and duplciate -5 │ use a::m::foo; // unused and duplciate +4 │ use a::m::S; // unused and duplicate +5 │ use a::m::foo; // unused and duplicate │ ^^^ Unnecessary alias 'foo' for module member 'a::m::foo'. It was already in scope │ = This warning can be suppressed with '#[allow(duplicate_alias)]' applied to the 'module' or module member ('const', 'fun', or 'struct') @@ -31,7 +31,7 @@ warning[W02021]: duplicate alias warning[W09001]: unused alias ┌─ tests/move_2024/expansion/unnecessary_alias_implicit.move:5:19 │ -5 │ use a::m::foo; // unused and duplciate +5 │ use a::m::foo; // unused and duplicate │ ^^^ Unused 'use' of alias 'foo'. Consider removing it │ = This warning can be suppressed with '#[allow(unused_use)]' applied to the 'module' or module member ('const', 'fun', or 'struct') diff --git a/external-crates/move/crates/move-compiler/tests/move_2024/expansion/unnecessary_alias_implicit.move b/external-crates/move/crates/move-compiler/tests/move_2024/expansion/unnecessary_alias_implicit.move index 864a22c8c43..1379b64c76f 100644 --- a/external-crates/move/crates/move-compiler/tests/move_2024/expansion/unnecessary_alias_implicit.move +++ b/external-crates/move/crates/move-compiler/tests/move_2024/expansion/unnecessary_alias_implicit.move @@ -1,7 +1,7 @@ module a::m { public struct S() public fun foo() { - use a::m::S; // unused and duplciate - use a::m::foo; // unused and duplciate + use a::m::S; // unused and duplicate + use a::m::foo; // unused and duplicate } } diff --git a/external-crates/move/crates/move-compiler/tests/move_2024/migration/let_mut_migrate.move b/external-crates/move/crates/move-compiler/tests/move_2024/migration/let_mut_migrate.move index 448921b66d4..0467a471038 100644 --- a/external-crates/move/crates/move-compiler/tests/move_2024/migration/let_mut_migrate.move +++ b/external-crates/move/crates/move-compiler/tests/move_2024/migration/let_mut_migrate.move @@ -3,7 +3,7 @@ module a::m { public fun t(x: u64, yip: u64, s: S): u64 { let yes = 0; let S { f: fin } = s; - // these four assignments necessiate mut annotations above + // these four assignments necessitate mut annotations above yip = 0; x = yes + 1; fin = fin + 1; diff --git a/external-crates/move/crates/move-compiler/tests/move_2024/typing/index_call_constraints_unsatisfied.exp b/external-crates/move/crates/move-compiler/tests/move_2024/typing/index_call_constraints_unsatisfied.exp index 37f8d2c5f80..9d2afd27138 100644 --- a/external-crates/move/crates/move-compiler/tests/move_2024/typing/index_call_constraints_unsatisfied.exp +++ b/external-crates/move/crates/move-compiler/tests/move_2024/typing/index_call_constraints_unsatisfied.exp @@ -9,7 +9,7 @@ error[E05001]: ability constraint not satisfied │ │ │ To satisfy the constraint, the 'copy' ability would need to be added here 18 │ let _b_val = b[]; - │ ^^^ 'copy' constraint not satisifed + │ ^^^ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/index_call_constraints_unsatisfied.move:18:18 @@ -22,7 +22,7 @@ error[E05001]: ability constraint not satisfied │ │ │ To satisfy the constraint, the 'drop' ability would need to be added here 18 │ let _b_val = b[]; - │ ^^^ 'drop' constraint not satisifed + │ ^^^ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/index_call_constraints_unsatisfied.move:18:18 @@ -57,7 +57,7 @@ error[E05001]: ability constraint not satisfied │ │ │ To satisfy the constraint, the 'copy' ability would need to be added here 23 │ let _b_val = &b[]; - │ ^^^^ 'copy' constraint not satisifed + │ ^^^^ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/index_call_constraints_unsatisfied.move:23:18 @@ -70,7 +70,7 @@ error[E05001]: ability constraint not satisfied │ │ │ To satisfy the constraint, the 'drop' ability would need to be added here 23 │ let _b_val = &b[]; - │ ^^^^ 'drop' constraint not satisifed + │ ^^^^ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/index_call_constraints_unsatisfied.move:23:19 @@ -83,7 +83,7 @@ error[E05001]: ability constraint not satisfied │ │ │ To satisfy the constraint, the 'copy' ability would need to be added here 23 │ let _b_val = &b[]; - │ ^^^ 'copy' constraint not satisifed + │ ^^^ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/index_call_constraints_unsatisfied.move:23:19 @@ -96,7 +96,7 @@ error[E05001]: ability constraint not satisfied │ │ │ To satisfy the constraint, the 'drop' ability would need to be added here 23 │ let _b_val = &b[]; - │ ^^^ 'drop' constraint not satisifed + │ ^^^ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/index_call_constraints_unsatisfied.move:28:18 @@ -109,7 +109,7 @@ error[E05001]: ability constraint not satisfied │ │ │ To satisfy the constraint, the 'copy' ability would need to be added here 28 │ let _b_val = &mut b[]; - │ ^^^^^^^^ 'copy' constraint not satisifed + │ ^^^^^^^^ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/index_call_constraints_unsatisfied.move:28:23 @@ -122,7 +122,7 @@ error[E05001]: ability constraint not satisfied │ │ │ To satisfy the constraint, the 'copy' ability would need to be added here 28 │ let _b_val = &mut b[]; - │ ^^^ 'copy' constraint not satisifed + │ ^^^ 'copy' constraint not satisfied error[E01013]: invalid 'move' or 'copy' ┌─ tests/move_2024/typing/index_call_constraints_unsatisfied.move:33:18 @@ -143,7 +143,7 @@ error[E05001]: ability constraint not satisfied │ │ │ To satisfy the constraint, the 'drop' ability would need to be added here 38 │ let _b_val = &b[]; // invalid - │ ^^^^ 'drop' constraint not satisifed + │ ^^^^ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/index_call_constraints_unsatisfied.move:38:19 @@ -156,7 +156,7 @@ error[E05001]: ability constraint not satisfied │ │ │ To satisfy the constraint, the 'drop' ability would need to be added here 38 │ let _b_val = &b[]; // invalid - │ ^^^ 'drop' constraint not satisifed + │ ^^^ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/index_call_constraints_unsatisfied.move:39:19 @@ -170,7 +170,7 @@ error[E05001]: ability constraint not satisfied │ To satisfy the constraint, the 'copy' ability would need to be added here 38 │ let _b_val = &b[]; // invalid 39 │ let _mb_val = &mut mb[]; // invalid - │ ^^^^^^^^^ 'copy' constraint not satisifed + │ ^^^^^^^^^ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/index_call_constraints_unsatisfied.move:39:24 @@ -184,7 +184,7 @@ error[E05001]: ability constraint not satisfied │ To satisfy the constraint, the 'copy' ability would need to be added here 38 │ let _b_val = &b[]; // invalid 39 │ let _mb_val = &mut mb[]; // invalid - │ ^^^^ 'copy' constraint not satisifed + │ ^^^^ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/index_call_constraints_unsatisfied.move:44:18 @@ -197,7 +197,7 @@ error[E05001]: ability constraint not satisfied │ │ │ To satisfy the constraint, the 'copy' ability would need to be added here 44 │ let _b_val = &b[]; - │ ^^^^ 'copy' constraint not satisifed + │ ^^^^ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/index_call_constraints_unsatisfied.move:44:19 @@ -210,7 +210,7 @@ error[E05001]: ability constraint not satisfied │ │ │ To satisfy the constraint, the 'copy' ability would need to be added here 44 │ let _b_val = &b[]; - │ ^^^ 'copy' constraint not satisifed + │ ^^^ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/index_call_constraints_unsatisfied.move:45:19 @@ -224,7 +224,7 @@ error[E05001]: ability constraint not satisfied │ To satisfy the constraint, the 'drop' ability would need to be added here 44 │ let _b_val = &b[]; 45 │ let _mb_val = &mut mb[]; - │ ^^^^^^^^^ 'drop' constraint not satisifed + │ ^^^^^^^^^ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/index_call_constraints_unsatisfied.move:45:24 @@ -238,5 +238,5 @@ error[E05001]: ability constraint not satisfied │ To satisfy the constraint, the 'drop' ability would need to be added here 44 │ let _b_val = &b[]; 45 │ let _mb_val = &mut mb[]; - │ ^^^^ 'drop' constraint not satisifed + │ ^^^^ 'drop' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_2024/typing/let_mut_assign.move b/external-crates/move/crates/move-compiler/tests/move_2024/typing/let_mut_assign.move index 889604bb18f..7d88e0d39a0 100644 --- a/external-crates/move/crates/move-compiler/tests/move_2024/typing/let_mut_assign.move +++ b/external-crates/move/crates/move-compiler/tests/move_2024/typing/let_mut_assign.move @@ -3,7 +3,7 @@ module a::m { public fun t(x: u64, s: S): u64 { let y = 0; let S { f } = s; - // these three assignments necessiate mut annotations above + // these three assignments necessitate mut annotations above x = y + 1; f = f + 1; y = x + f; diff --git a/external-crates/move/crates/move-compiler/tests/move_2024/typing/let_mut_borrow_mut.move b/external-crates/move/crates/move-compiler/tests/move_2024/typing/let_mut_borrow_mut.move index 38d50260853..dda0b89005c 100644 --- a/external-crates/move/crates/move-compiler/tests/move_2024/typing/let_mut_borrow_mut.move +++ b/external-crates/move/crates/move-compiler/tests/move_2024/typing/let_mut_borrow_mut.move @@ -3,7 +3,7 @@ module a::m { public fun t(x: u64, s: S) { let y = 0; let S { f } = s; - // these three borrows necessiate mut annotations above + // these three borrows necessitate mut annotations above foo(&mut x); foo(&mut y); foo(&mut f); diff --git a/external-crates/move/crates/move-compiler/tests/move_2024/typing/let_mut_borrow_mut_dot_call.move b/external-crates/move/crates/move-compiler/tests/move_2024/typing/let_mut_borrow_mut_dot_call.move index 09741d55465..b951d8c8c0e 100644 --- a/external-crates/move/crates/move-compiler/tests/move_2024/typing/let_mut_borrow_mut_dot_call.move +++ b/external-crates/move/crates/move-compiler/tests/move_2024/typing/let_mut_borrow_mut_dot_call.move @@ -4,7 +4,7 @@ module a::m { public fun t(x: S, r: R) { let y = S { f: 0 }; let R { s } = r; - // these three borrows necessiate mut annotations above + // these three borrows necessitate mut annotations above x.foo(); y.foo(); s.foo(); diff --git a/external-crates/move/crates/move-compiler/tests/move_2024/typing/macro_duck_typing_constraint_invalid.exp b/external-crates/move/crates/move-compiler/tests/move_2024/typing/macro_duck_typing_constraint_invalid.exp index 8c01e08517e..ea9eb2b2020 100644 --- a/external-crates/move/crates/move-compiler/tests/move_2024/typing/macro_duck_typing_constraint_invalid.exp +++ b/external-crates/move/crates/move-compiler/tests/move_2024/typing/macro_duck_typing_constraint_invalid.exp @@ -7,7 +7,7 @@ error[E05001]: ability constraint not satisfied │ ---- To satisfy the constraint, the 'copy' ability would need to be added here · 9 │ macro fun needs_copy<$T, $U, $V>(_: X<$T>, _: $U, $v: $V): X<$U> { - │ ^^^^^ 'copy' constraint not satisifed + │ ^^^^^ 'copy' constraint not satisfied · 17 │ needs_copy!(X(), None(), None()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -21,7 +21,7 @@ error[E05001]: ability constraint not satisfied │ ---- To satisfy the constraint, the 'copy' ability would need to be added here · 9 │ macro fun needs_copy<$T, $U, $V>(_: X<$T>, _: $U, $v: $V): X<$U> { - │ ^^^^^ 'copy' constraint not satisifed + │ ^^^^^ 'copy' constraint not satisfied · 17 │ needs_copy!(X(), None(), None()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -36,7 +36,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 11 │ mycopy(&v); - │ ^^^^^^^^^^ 'copy' constraint not satisifed + │ ^^^^^^^^^^ 'copy' constraint not satisfied · 17 │ needs_copy!(X(), None(), None()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -50,7 +50,7 @@ error[E05001]: ability constraint not satisfied │ ---- To satisfy the constraint, the 'copy' ability would need to be added here · 12 │ X() - │ ^^^ 'copy' constraint not satisifed + │ ^^^ 'copy' constraint not satisfied · 17 │ needs_copy!(X(), None(), None()); │ ---- The type 'a::m::None' does not have the ability 'copy' diff --git a/external-crates/move/crates/move-compiler/tests/move_2024/typing/macro_subst_tparams_invalid.exp b/external-crates/move/crates/move-compiler/tests/move_2024/typing/macro_subst_tparams_invalid.exp index b4ce70e9039..7847c438d13 100644 --- a/external-crates/move/crates/move-compiler/tests/move_2024/typing/macro_subst_tparams_invalid.exp +++ b/external-crates/move/crates/move-compiler/tests/move_2024/typing/macro_subst_tparams_invalid.exp @@ -7,7 +7,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 10 │ macro fun useless<$U>($x: X<$U>): X<$U> { - │ ^^^^^ 'copy' constraint not satisifed + │ ^^^^^ 'copy' constraint not satisfied · 27 │ useless!(X()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -21,7 +21,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 10 │ macro fun useless<$U>($x: X<$U>): X<$U> { - │ ^^^^^ 'copy' constraint not satisifed + │ ^^^^^ 'copy' constraint not satisfied · 27 │ useless!(X()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -35,7 +35,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 12 │ freeze>(&mut X()); - │ ^^^^^ 'copy' constraint not satisifed + │ ^^^^^ 'copy' constraint not satisfied · 27 │ useless!(X()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -49,7 +49,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 12 │ freeze>(&mut X()); - │ ^^^ 'copy' constraint not satisifed + │ ^^^ 'copy' constraint not satisfied · 27 │ useless!(X()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -64,7 +64,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 13 │ f<$U>(X()); - │ ^^^^^^^^^^ 'copy' constraint not satisifed + │ ^^^^^^^^^^ 'copy' constraint not satisfied · 27 │ useless!(X()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -78,7 +78,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 13 │ f<$U>(X()); - │ ^^^ 'copy' constraint not satisifed + │ ^^^ 'copy' constraint not satisfied · 27 │ useless!(X()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -92,7 +92,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 14 │ X<$U>(); - │ ^^^^^^^ 'copy' constraint not satisifed + │ ^^^^^^^ 'copy' constraint not satisfied · 27 │ useless!(X()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -107,7 +107,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 15 │ x.f<$U>(); - │ ^^^^^^^^^ 'copy' constraint not satisifed + │ ^^^^^^^^^ 'copy' constraint not satisfied · 27 │ useless!(X()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -121,7 +121,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 16 │ apply!(x, |_: X<$U>| ()); - │ ^^^^^ 'copy' constraint not satisifed + │ ^^^^^ 'copy' constraint not satisfied · 27 │ useless!(X()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -135,7 +135,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 17 │ X<$U>() = x; - │ ^^^^^^^ 'copy' constraint not satisifed + │ ^^^^^^^ 'copy' constraint not satisfied · 27 │ useless!(X()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -149,7 +149,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 18 │ let _: X<$U> = x; - │ ^^^^^ 'copy' constraint not satisifed + │ ^^^^^ 'copy' constraint not satisfied · 27 │ useless!(X()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -163,7 +163,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 19 │ let X<$U>() = x; - │ ^^^^^^^ 'copy' constraint not satisifed + │ ^^^^^^^ 'copy' constraint not satisfied · 27 │ useless!(X()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -186,7 +186,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 21 │ (x: X<$U>); - │ ^^^^^ 'copy' constraint not satisifed + │ ^^^^^ 'copy' constraint not satisfied · 27 │ useless!(X()); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -200,7 +200,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 27 │ useless!(X()); - │ ---- ^^^ 'copy' constraint not satisifed + │ ---- ^^^ 'copy' constraint not satisfied │ │ │ The type 'a::m::None' does not have the ability 'copy' diff --git a/external-crates/move/crates/move-compiler/tests/move_2024/typing/macros_types_checked_invalid_constraints.exp b/external-crates/move/crates/move-compiler/tests/move_2024/typing/macros_types_checked_invalid_constraints.exp index 9b194ced897..82c428250f4 100644 --- a/external-crates/move/crates/move-compiler/tests/move_2024/typing/macros_types_checked_invalid_constraints.exp +++ b/external-crates/move/crates/move-compiler/tests/move_2024/typing/macros_types_checked_invalid_constraints.exp @@ -7,7 +7,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 8 │ $_n: NeedsCopy<$T>, - │ ^^^^^^^^^^^^^ 'copy' constraint not satisifed + │ ^^^^^^^^^^^^^ 'copy' constraint not satisfied · 24 │ foo!>(0, &mut 1, NeedsCopy {}); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -21,7 +21,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 10 │ let _: NeedsCopy<$U> = NeedsCopy {}; - │ ^^^^^^^^^^^^^ 'copy' constraint not satisifed + │ ^^^^^^^^^^^^^ 'copy' constraint not satisfied · 26 │ foo!(0, &mut 1, NeedsCopy {}); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -35,7 +35,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 10 │ let _: NeedsCopy<$U> = NeedsCopy {}; - │ ^^^^^^^^^^^^ 'copy' constraint not satisifed + │ ^^^^^^^^^^^^ 'copy' constraint not satisfied · 26 │ foo!(0, &mut 1, NeedsCopy {}); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -55,7 +55,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 17 │ macro fun ret2<$T>(): NeedsCopy<$T> { - │ ^^^^^^^^^^^^^ 'copy' constraint not satisifed + │ ^^^^^^^^^^^^^ 'copy' constraint not satisfied · 28 │ ret2!(); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -69,7 +69,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 18 │ NeedsCopy {} - │ ^^^^^^^^^^^^ 'copy' constraint not satisifed + │ ^^^^^^^^^^^^ 'copy' constraint not satisfied · 28 │ ret2!(); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -87,7 +87,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type 'a::m::None' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/macros_types_checked_invalid_constraints.move:25:19 @@ -101,7 +101,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^ │ │ │ │ │ The type 'a::m::None' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_2024/typing/macros_types_checked_invalid_constraints.move:27:9 diff --git a/external-crates/move/crates/move-compiler/tests/move_2024/typing/macros_types_checked_invalid_constraints_simple.exp b/external-crates/move/crates/move-compiler/tests/move_2024/typing/macros_types_checked_invalid_constraints_simple.exp index 2de9b2db720..42ecdc0db3c 100644 --- a/external-crates/move/crates/move-compiler/tests/move_2024/typing/macros_types_checked_invalid_constraints_simple.exp +++ b/external-crates/move/crates/move-compiler/tests/move_2024/typing/macros_types_checked_invalid_constraints_simple.exp @@ -7,7 +7,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 7 │ macro fun bar<$T>(_: NeedsCopy<$T>) {} - │ ^^^^^^^^^^^^^ 'copy' constraint not satisifed + │ ^^^^^^^^^^^^^ 'copy' constraint not satisfied · 14 │ bar!(NeedsCopy {}); │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -21,7 +21,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'copy' constraint declared here · 9 │ macro fun baz<$T>(): NeedsCopy<$T> { abort 0 } - │ ^^^^^^^^^^^^^ 'copy' constraint not satisifed + │ ^^^^^^^^^^^^^ 'copy' constraint not satisfied · 18 │ baz!(); // TODO do not complain about dead code? │ ---- The type 'a::m::None' does not have the ability 'copy' @@ -47,5 +47,5 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^ │ │ │ │ │ The type 'a::m::None' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_generic_in_field.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_generic_in_field.exp index 28ae29e45e5..c7168d30d38 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_generic_in_field.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_generic_in_field.exp @@ -7,7 +7,7 @@ error[E05001]: ability constraint not satisfied │ - ^^^^ │ │ │ │ │ │ │ The type 'T' does not have the ability 'copy' - │ │ 'copy' constraint not satisifed + │ │ 'copy' constraint not satisfied │ To satisfy the constraint, the 'copy' ability would need to be added here error[E05001]: ability constraint not satisfied @@ -22,5 +22,5 @@ error[E05001]: ability constraint not satisfied │ ^^^^ │ │ │ │ │ The type 'T' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_prims_invalid.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_prims_invalid.exp index 152e2bda505..3cbea626dab 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_prims_invalid.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_prims_invalid.exp @@ -8,7 +8,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^ │ │ │ │ │ The type 'signer' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:21:9 @@ -21,7 +21,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector' can have the ability 'copy' but the type argument 'signer' does not have the required ability 'copy' │ │ The type 'vector' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:22:9 @@ -34,7 +34,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector<0x42::M::NoC>' can have the ability 'copy' but the type argument '0x42::M::NoC' does not have the required ability 'copy' │ │ The type 'vector<0x42::M::NoC>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:23:9 @@ -46,7 +46,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^ │ │ │ │ │ The type 'u64' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:24:9 @@ -58,7 +58,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^ │ │ │ │ │ The type 'signer' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:25:9 @@ -70,7 +70,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^ │ │ │ │ │ The type 'vector<0x42::M::NoC>' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:26:9 @@ -82,7 +82,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^ │ │ │ │ │ The type 'vector<0x42::M::NoK>' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:27:9 @@ -94,7 +94,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^ │ │ │ │ │ The type 'signer' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:27:9 @@ -106,7 +106,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^ │ │ │ │ │ The type 'signer' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:28:9 @@ -119,7 +119,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector<0x42::M::NoC>' can have the ability 'copy' but the type argument '0x42::M::NoC' does not have the required ability 'copy' │ │ The type 'vector<0x42::M::NoC>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:29:9 @@ -132,7 +132,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector<0x42::M::Cup>' can have the ability 'copy' but the type argument '0x42::M::Cup' does not have the required ability 'copy' │ │ The type 'vector<0x42::M::Cup>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:29:9 @@ -145,7 +145,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector<0x42::M::Cup>' can have the ability 'drop' but the type argument '0x42::M::Cup' does not have the required ability 'drop' │ │ The type 'vector<0x42::M::Cup>' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:29:9 @@ -158,7 +158,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector<0x42::M::Cup>' can have the ability 'store' but the type argument '0x42::M::Cup' does not have the required ability 'store' │ │ The type 'vector<0x42::M::Cup>' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:30:13 @@ -169,7 +169,7 @@ error[E05001]: ability constraint not satisfied 30 │ let Sc {} = Sc {}; │ ^^^^^ ------ The type 'signer' does not have the ability 'copy' │ │ - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:30:21 @@ -181,7 +181,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^ │ │ │ │ │ The type 'signer' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:31:13 @@ -194,7 +194,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector' can have the ability 'copy' but the type argument 'signer' does not have the required ability 'copy' │ │ The type 'vector' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:31:21 @@ -207,7 +207,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector' can have the ability 'copy' but the type argument 'signer' does not have the required ability 'copy' │ │ The type 'vector' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:32:13 @@ -220,7 +220,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector<0x42::M::NoC>' can have the ability 'copy' but the type argument '0x42::M::NoC' does not have the required ability 'copy' │ │ The type 'vector<0x42::M::NoC>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:32:21 @@ -233,7 +233,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector<0x42::M::NoC>' can have the ability 'copy' but the type argument '0x42::M::NoC' does not have the required ability 'copy' │ │ The type 'vector<0x42::M::NoC>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:33:13 @@ -244,7 +244,7 @@ error[E05001]: ability constraint not satisfied 33 │ let Sk {} = Sk {}; │ ^^^^^ --- The type 'u64' does not have the ability 'key' │ │ - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:33:21 @@ -256,7 +256,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^ │ │ │ │ │ The type 'u64' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:34:13 @@ -267,7 +267,7 @@ error[E05001]: ability constraint not satisfied 34 │ let Sk {} = Sk {}; │ ^^^^^ ------ The type 'signer' does not have the ability 'key' │ │ - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:34:21 @@ -279,7 +279,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^ │ │ │ │ │ The type 'signer' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:35:13 @@ -290,7 +290,7 @@ error[E05001]: ability constraint not satisfied 35 │ let Sk {} = Sk> {}; │ ^^^^^ ----------- The type 'vector<0x42::M::NoC>' does not have the ability 'key' │ │ - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:35:21 @@ -302,7 +302,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type 'vector<0x42::M::NoC>' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:36:13 @@ -313,7 +313,7 @@ error[E05001]: ability constraint not satisfied 36 │ let Sk {} = Sk> {}; │ ^^^^^ ----------- The type 'vector<0x42::M::NoK>' does not have the ability 'key' │ │ - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:36:21 @@ -325,7 +325,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type 'vector<0x42::M::NoK>' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:37:13 @@ -336,7 +336,7 @@ error[E05001]: ability constraint not satisfied 37 │ let Scds {} = Scds {}; │ ^^^^^^^ ------ The type 'signer' does not have the ability 'copy' │ │ - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:37:13 @@ -347,7 +347,7 @@ error[E05001]: ability constraint not satisfied 37 │ let Scds {} = Scds {}; │ ^^^^^^^ ------ The type 'signer' does not have the ability 'store' │ │ - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:37:23 @@ -359,7 +359,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^ │ │ │ │ │ The type 'signer' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:37:23 @@ -371,7 +371,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^ │ │ │ │ │ The type 'signer' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:38:13 @@ -384,7 +384,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector<0x42::M::NoC>' can have the ability 'copy' but the type argument '0x42::M::NoC' does not have the required ability 'copy' │ │ The type 'vector<0x42::M::NoC>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:38:23 @@ -397,7 +397,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector<0x42::M::NoC>' can have the ability 'copy' but the type argument '0x42::M::NoC' does not have the required ability 'copy' │ │ The type 'vector<0x42::M::NoC>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:39:13 @@ -410,7 +410,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector<0x42::M::Cup>' can have the ability 'copy' but the type argument '0x42::M::Cup' does not have the required ability 'copy' │ │ The type 'vector<0x42::M::Cup>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:39:13 @@ -423,7 +423,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector<0x42::M::Cup>' can have the ability 'drop' but the type argument '0x42::M::Cup' does not have the required ability 'drop' │ │ The type 'vector<0x42::M::Cup>' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:39:13 @@ -436,7 +436,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector<0x42::M::Cup>' can have the ability 'store' but the type argument '0x42::M::Cup' does not have the required ability 'store' │ │ The type 'vector<0x42::M::Cup>' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:39:23 @@ -449,7 +449,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector<0x42::M::Cup>' can have the ability 'copy' but the type argument '0x42::M::Cup' does not have the required ability 'copy' │ │ The type 'vector<0x42::M::Cup>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:39:23 @@ -462,7 +462,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector<0x42::M::Cup>' can have the ability 'drop' but the type argument '0x42::M::Cup' does not have the required ability 'drop' │ │ The type 'vector<0x42::M::Cup>' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_prims_invalid.move:39:23 @@ -475,5 +475,5 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type 'vector<0x42::M::Cup>' can have the ability 'store' but the type argument '0x42::M::Cup' does not have the required ability 'store' │ │ The type 'vector<0x42::M::Cup>' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_structs_invalid.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_structs_invalid.exp index 7d71e664c68..71b91b72b0c 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_structs_invalid.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_structs_invalid.exp @@ -11,7 +11,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^ │ │ │ │ │ The type '0x42::M::NoC' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:20:9 @@ -26,7 +26,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:21:9 @@ -39,7 +39,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Box<0x42::M::NoC>' can have the ability 'copy' but the type argument '0x42::M::NoC' does not have the required ability 'copy' │ │ The type '0x42::M::Box<0x42::M::NoC>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:22:9 @@ -54,7 +54,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^ │ │ │ │ │ The type '0x42::M::NoK' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:23:9 @@ -69,7 +69,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:24:9 @@ -82,7 +82,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Box<0x42::M::Cup>' can have the ability 'key' but the type argument '0x42::M::Cup' does not have the required ability 'store' │ │ The type '0x42::M::Box<0x42::M::Cup>' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:25:9 @@ -97,7 +97,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::NoC' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:26:9 @@ -112,7 +112,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:26:9 @@ -127,7 +127,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:26:9 @@ -142,7 +142,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:27:9 @@ -157,7 +157,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup<0x42::M::NoC>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:27:9 @@ -172,7 +172,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup<0x42::M::NoC>' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:27:9 @@ -187,7 +187,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup<0x42::M::NoC>' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:28:9 @@ -200,7 +200,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Pair' can have the ability 'copy' but the type argument '0x42::M::NoC' does not have the required ability 'copy' │ │ The type '0x42::M::Pair' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:29:13 @@ -214,7 +214,7 @@ error[E05001]: ability constraint not satisfied 29 │ let Sc {} = Sc {}; │ ^^^^^ --- The type '0x42::M::NoC' does not have the ability 'copy' │ │ - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:29:21 @@ -229,7 +229,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::NoC' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:30:13 @@ -243,7 +243,7 @@ error[E05001]: ability constraint not satisfied 30 │ let Sc {} = Sc> {}; │ ^^^^^ -------- The type '0x42::M::Cup' does not have the ability 'copy' │ │ - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:30:21 @@ -258,7 +258,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:31:13 @@ -271,7 +271,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Box<0x42::M::NoC>' can have the ability 'copy' but the type argument '0x42::M::NoC' does not have the required ability 'copy' │ │ The type '0x42::M::Box<0x42::M::NoC>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:31:21 @@ -284,7 +284,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Box<0x42::M::NoC>' can have the ability 'copy' but the type argument '0x42::M::NoC' does not have the required ability 'copy' │ │ The type '0x42::M::Box<0x42::M::NoC>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:32:13 @@ -298,7 +298,7 @@ error[E05001]: ability constraint not satisfied 32 │ let Sk {} = Sk {}; │ ^^^^^ --- The type '0x42::M::NoK' does not have the ability 'key' │ │ - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:32:21 @@ -313,7 +313,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::NoK' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:33:13 @@ -327,7 +327,7 @@ error[E05001]: ability constraint not satisfied 33 │ let Sk {} = Sk> {}; │ ^^^^^ -------- The type '0x42::M::Cup' does not have the ability 'key' │ │ - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:33:21 @@ -342,7 +342,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:34:13 @@ -355,7 +355,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Box<0x42::M::Cup>' can have the ability 'key' but the type argument '0x42::M::Cup' does not have the required ability 'store' │ │ The type '0x42::M::Box<0x42::M::Cup>' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:34:21 @@ -368,7 +368,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Box<0x42::M::Cup>' can have the ability 'key' but the type argument '0x42::M::Cup' does not have the required ability 'store' │ │ The type '0x42::M::Box<0x42::M::Cup>' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:35:13 @@ -382,7 +382,7 @@ error[E05001]: ability constraint not satisfied 35 │ let Scds {} = Scds {}; │ ^^^^^^^ --- The type '0x42::M::NoC' does not have the ability 'copy' │ │ - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:35:23 @@ -397,7 +397,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::NoC' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:36:13 @@ -411,7 +411,7 @@ error[E05001]: ability constraint not satisfied 36 │ let Scds {} = Scds> {}; │ ^^^^^^^ -------- The type '0x42::M::Cup' does not have the ability 'copy' │ │ - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:36:13 @@ -425,7 +425,7 @@ error[E05001]: ability constraint not satisfied 36 │ let Scds {} = Scds> {}; │ ^^^^^^^ -------- The type '0x42::M::Cup' does not have the ability 'drop' │ │ - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:36:13 @@ -439,7 +439,7 @@ error[E05001]: ability constraint not satisfied 36 │ let Scds {} = Scds> {}; │ ^^^^^^^ -------- The type '0x42::M::Cup' does not have the ability 'store' │ │ - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:36:23 @@ -454,7 +454,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:36:23 @@ -469,7 +469,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:36:23 @@ -484,7 +484,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:37:13 @@ -498,7 +498,7 @@ error[E05001]: ability constraint not satisfied 37 │ let Scds {} = Scds> {}; │ ^^^^^^^ -------- The type '0x42::M::Cup<0x42::M::NoC>' does not have the ability 'copy' │ │ - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:37:13 @@ -512,7 +512,7 @@ error[E05001]: ability constraint not satisfied 37 │ let Scds {} = Scds> {}; │ ^^^^^^^ -------- The type '0x42::M::Cup<0x42::M::NoC>' does not have the ability 'drop' │ │ - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:37:13 @@ -526,7 +526,7 @@ error[E05001]: ability constraint not satisfied 37 │ let Scds {} = Scds> {}; │ ^^^^^^^ -------- The type '0x42::M::Cup<0x42::M::NoC>' does not have the ability 'store' │ │ - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:37:23 @@ -541,7 +541,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup<0x42::M::NoC>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:37:23 @@ -556,7 +556,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup<0x42::M::NoC>' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:37:23 @@ -571,7 +571,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup<0x42::M::NoC>' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:38:13 @@ -584,7 +584,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Pair' can have the ability 'copy' but the type argument '0x42::M::NoC' does not have the required ability 'copy' │ │ The type '0x42::M::Pair' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_structs_invalid.move:38:23 @@ -597,5 +597,5 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Pair' can have the ability 'copy' but the type argument '0x42::M::NoC' does not have the required ability 'copy' │ │ The type '0x42::M::Pair' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_tparams_invalid.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_tparams_invalid.exp index 3060f5e037e..8630345a6ec 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_tparams_invalid.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/ability_constraint_tparams_invalid.exp @@ -11,7 +11,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^ │ │ │ │ │ The type 'TnoC' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:22:9 @@ -26,7 +26,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:23:9 @@ -39,7 +39,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Box' can have the ability 'copy' but the type argument 'TnoC' does not have the required ability 'copy' │ │ The type '0x42::M::Box' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:24:9 @@ -54,7 +54,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^ │ │ │ │ │ The type 'TnoK' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:25:9 @@ -69,7 +69,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:26:9 @@ -82,7 +82,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Box<0x42::M::Cup>' can have the ability 'key' but the type argument '0x42::M::Cup' does not have the required ability 'store' │ │ The type '0x42::M::Box<0x42::M::Cup>' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:27:9 @@ -97,7 +97,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^ │ │ │ │ │ The type 'TnoC' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:28:9 @@ -112,7 +112,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:28:9 @@ -127,7 +127,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:28:9 @@ -142,7 +142,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:29:9 @@ -157,7 +157,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:29:9 @@ -172,7 +172,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:29:9 @@ -187,7 +187,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:30:9 @@ -200,7 +200,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Pair' can have the ability 'copy' but the type argument 'TnoC' does not have the required ability 'copy' │ │ The type '0x42::M::Pair' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:31:13 @@ -214,7 +214,7 @@ error[E05001]: ability constraint not satisfied 31 │ let Sc {} = Sc {}; │ ^^^^^ ---- The type 'TnoC' does not have the ability 'copy' │ │ - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:31:21 @@ -229,7 +229,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^ │ │ │ │ │ The type 'TnoC' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:32:13 @@ -243,7 +243,7 @@ error[E05001]: ability constraint not satisfied 32 │ let Sc {} = Sc> {}; │ ^^^^^ --------- The type '0x42::M::Cup' does not have the ability 'copy' │ │ - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:32:21 @@ -258,7 +258,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:33:13 @@ -271,7 +271,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Box' can have the ability 'copy' but the type argument 'TnoC' does not have the required ability 'copy' │ │ The type '0x42::M::Box' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:33:21 @@ -284,7 +284,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Box' can have the ability 'copy' but the type argument 'TnoC' does not have the required ability 'copy' │ │ The type '0x42::M::Box' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:34:13 @@ -298,7 +298,7 @@ error[E05001]: ability constraint not satisfied 34 │ let Sk {} = Sk {}; │ ^^^^^ ---- The type 'TnoK' does not have the ability 'key' │ │ - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:34:21 @@ -313,7 +313,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^ │ │ │ │ │ The type 'TnoK' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:35:13 @@ -327,7 +327,7 @@ error[E05001]: ability constraint not satisfied 35 │ let Sk {} = Sk> {}; │ ^^^^^ --------- The type '0x42::M::Cup' does not have the ability 'key' │ │ - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:35:21 @@ -342,7 +342,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:36:13 @@ -355,7 +355,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Box<0x42::M::Cup>' can have the ability 'key' but the type argument '0x42::M::Cup' does not have the required ability 'store' │ │ The type '0x42::M::Box<0x42::M::Cup>' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:36:21 @@ -368,7 +368,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Box<0x42::M::Cup>' can have the ability 'key' but the type argument '0x42::M::Cup' does not have the required ability 'store' │ │ The type '0x42::M::Box<0x42::M::Cup>' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:37:13 @@ -382,7 +382,7 @@ error[E05001]: ability constraint not satisfied 37 │ let Scds {} = Scds {}; │ ^^^^^^^ ---- The type 'TnoC' does not have the ability 'copy' │ │ - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:37:23 @@ -397,7 +397,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^ │ │ │ │ │ The type 'TnoC' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:38:13 @@ -411,7 +411,7 @@ error[E05001]: ability constraint not satisfied 38 │ let Scds {} = Scds> {}; │ ^^^^^^^ --------- The type '0x42::M::Cup' does not have the ability 'copy' │ │ - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:38:13 @@ -425,7 +425,7 @@ error[E05001]: ability constraint not satisfied 38 │ let Scds {} = Scds> {}; │ ^^^^^^^ --------- The type '0x42::M::Cup' does not have the ability 'drop' │ │ - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:38:13 @@ -439,7 +439,7 @@ error[E05001]: ability constraint not satisfied 38 │ let Scds {} = Scds> {}; │ ^^^^^^^ --------- The type '0x42::M::Cup' does not have the ability 'store' │ │ - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:38:23 @@ -454,7 +454,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:38:23 @@ -469,7 +469,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:38:23 @@ -484,7 +484,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:39:13 @@ -498,7 +498,7 @@ error[E05001]: ability constraint not satisfied 39 │ let Scds {} = Scds> {}; │ ^^^^^^^ --------- The type '0x42::M::Cup' does not have the ability 'copy' │ │ - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:39:13 @@ -512,7 +512,7 @@ error[E05001]: ability constraint not satisfied 39 │ let Scds {} = Scds> {}; │ ^^^^^^^ --------- The type '0x42::M::Cup' does not have the ability 'drop' │ │ - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:39:13 @@ -526,7 +526,7 @@ error[E05001]: ability constraint not satisfied 39 │ let Scds {} = Scds> {}; │ ^^^^^^^ --------- The type '0x42::M::Cup' does not have the ability 'store' │ │ - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:39:23 @@ -541,7 +541,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:39:23 @@ -556,7 +556,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:39:23 @@ -571,7 +571,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x42::M::Cup' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:40:13 @@ -584,7 +584,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Pair' can have the ability 'copy' but the type argument 'TnoC' does not have the required ability 'copy' │ │ The type '0x42::M::Pair' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/ability_constraint_tparams_invalid.move:40:23 @@ -597,5 +597,5 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::Pair' can have the ability 'copy' but the type argument 'TnoC' does not have the required ability 'copy' │ │ The type '0x42::M::Pair' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_all_cases.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_all_cases.exp index eeb37808c80..a0b3e2dcdea 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_all_cases.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_all_cases.exp @@ -8,7 +8,7 @@ error[E05001]: ability constraint not satisfied │ - ^^^^^^^ │ │ │ │ │ │ │ The type 'T' does not have the ability 'copy' - │ │ 'copy' constraint not satisifed + │ │ 'copy' constraint not satisfied │ To satisfy the constraint, the 'copy' ability would need to be added here error[E05001]: ability constraint not satisfied @@ -21,7 +21,7 @@ error[E05001]: ability constraint not satisfied │ - ^^^^^^^ │ │ │ │ │ │ │ The type 'T' does not have the ability 'key' - │ │ 'key' constraint not satisifed + │ │ 'key' constraint not satisfied │ To satisfy the constraint, the 'key' ability would need to be added here error[E05001]: ability constraint not satisfied @@ -34,7 +34,7 @@ error[E05001]: ability constraint not satisfied │ - ^^^^^^^ │ │ │ │ │ │ │ The type 'T' does not have the ability 'copy' - │ │ 'copy' constraint not satisifed + │ │ 'copy' constraint not satisfied │ To satisfy the constraint, the 'copy' ability would need to be added here error[E05001]: ability constraint not satisfied @@ -47,7 +47,7 @@ error[E05001]: ability constraint not satisfied │ - ^^^^^^^ │ │ │ │ │ │ │ The type 'T' does not have the ability 'key' - │ │ 'key' constraint not satisifed + │ │ 'key' constraint not satisfied │ To satisfy the constraint, the 'key' ability would need to be added here error[E05001]: ability constraint not satisfied @@ -62,7 +62,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^ │ │ │ │ │ The type '0x8675309::M::R' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/constraints_not_satisfied_all_cases.move:15:28 @@ -77,5 +77,5 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^ │ │ │ │ │ The type '0x8675309::M::C' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_function_parameter.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_function_parameter.exp index 764660a69f3..a6fbda04110 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_function_parameter.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_function_parameter.exp @@ -10,5 +10,5 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^ │ │ │ │ │ The type '0x8675309::M::R' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_function_return_type.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_function_return_type.exp index 7ccbfef4025..44ead01f7c8 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_function_return_type.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_function_return_type.exp @@ -10,5 +10,5 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^ │ │ │ │ │ The type '0x8675309::M::R' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_lvalues_bind_type.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_lvalues_bind_type.exp index 20bef8e20c4..e9ae461f8f8 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_lvalues_bind_type.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_lvalues_bind_type.exp @@ -10,7 +10,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^ │ │ │ │ │ The type '0x8675309::M::R' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied warning[W09005]: dead or unreachable code ┌─ tests/move_check/typing/constraints_not_satisfied_lvalues_bind_type.move:6:27 diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_lvalues_decl_type.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_lvalues_decl_type.exp index c524b45d170..c34c0a52c67 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_lvalues_decl_type.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_lvalues_decl_type.exp @@ -10,5 +10,5 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^ │ │ │ │ │ The type '0x8675309::M::R' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_lvalues_pack_type_args.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_lvalues_pack_type_args.exp index 906ea6b17c5..39a054ed75f 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_lvalues_pack_type_args.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_lvalues_pack_type_args.exp @@ -10,7 +10,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^ │ │ │ │ │ The type '0x8675309::M::R' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied warning[W09005]: dead or unreachable code ┌─ tests/move_check/typing/constraints_not_satisfied_lvalues_pack_type_args.move:8:29 @@ -32,5 +32,5 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^ │ │ │ │ │ The type '0x8675309::M::R' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_struct_field.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_struct_field.exp index dea7b7bd6e1..8636333230b 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_struct_field.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_struct_field.exp @@ -10,5 +10,5 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^ │ │ │ │ │ The type '0x8675309::M::R' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_type_annotation.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_type_annotation.exp index 55b49a84ce1..c793f2172bc 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_type_annotation.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_type_annotation.exp @@ -19,5 +19,5 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^ │ │ │ │ │ The type '0x8675309::M::R' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_type_arguments_internal_call.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_type_arguments_internal_call.exp index c0c475af892..c647140c1f9 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_type_arguments_internal_call.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_type_arguments_internal_call.exp @@ -10,5 +10,5 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^ │ │ │ │ │ The type '0x8675309::M::R' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_type_arguments_internal_pack.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_type_arguments_internal_pack.exp index cf7f38e712f..9f21541de58 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_type_arguments_internal_pack.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/constraints_not_satisfied_type_arguments_internal_pack.exp @@ -20,7 +20,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^ │ │ │ │ │ The type '0x8675309::M::R' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied warning[W09005]: dead or unreachable code ┌─ tests/move_check/typing/constraints_not_satisfied_type_arguments_internal_pack.move:8:26 diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/instantiate_signatures.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/instantiate_signatures.exp index 737f559892f..972e709777f 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/instantiate_signatures.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/instantiate_signatures.exp @@ -10,7 +10,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^ │ │ │ │ │ The type '0x42::M::R' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E04004]: expected a single non-reference type ┌─ tests/move_check/typing/instantiate_signatures.move:12:13 @@ -60,7 +60,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^ │ │ │ │ │ The type '0x42::M::R' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E04004]: expected a single non-reference type ┌─ tests/move_check/typing/instantiate_signatures.move:19:14 @@ -101,7 +101,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^ │ │ │ │ │ The type '0x42::M::R' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E04004]: expected a single non-reference type ┌─ tests/move_check/typing/instantiate_signatures.move:24:9 @@ -142,7 +142,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^ │ │ │ │ │ The type '0x42::M::R' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E04004]: expected a single non-reference type ┌─ tests/move_check/typing/instantiate_signatures.move:33:18 @@ -193,7 +193,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^ │ │ │ │ │ The type '0x42::M::R' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E04004]: expected a single non-reference type ┌─ tests/move_check/typing/instantiate_signatures.move:38:12 @@ -242,7 +242,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::S<0x42::M::R>' can have the ability 'drop' but the type argument '0x42::M::R' does not have the required ability 'drop' │ │ The type '0x42::M::S<0x42::M::R>' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/instantiate_signatures.move:42:9 @@ -266,7 +266,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^ │ │ │ │ │ The type '0x42::M::R' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E04004]: expected a single non-reference type ┌─ tests/move_check/typing/instantiate_signatures.move:43:11 diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/module_call_constraints_not_satisfied.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/module_call_constraints_not_satisfied.exp index 93c3ea62cce..6f5c4c4a765 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/module_call_constraints_not_satisfied.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/module_call_constraints_not_satisfied.exp @@ -11,7 +11,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::S' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:28:9 @@ -26,7 +26,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Coin' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:29:9 @@ -38,7 +38,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^ │ │ │ │ │ The type 'u64' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:29:9 @@ -53,7 +53,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Coin' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:33:9 @@ -68,7 +68,7 @@ error[E05001]: ability constraint not satisfied │ --- 'key' constraint declared here · 33 │ both(new_box(), new_box()) - │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 'key' constraint not satisifed + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:33:9 @@ -83,7 +83,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Box' can have the ability 'copy' but the type argument 'R' does not have the required ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:37:9 @@ -98,7 +98,7 @@ error[E05001]: ability constraint not satisfied │ --- 'key' constraint declared here · 37 │ rsrc(new_box3()); - │ ^^^^^^^^^^^^^^^^^^^^^^^^^ 'key' constraint not satisifed + │ ^^^^^^^^^^^^^^^^^^^^^^^^^ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:39:9 @@ -113,7 +113,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Box3' can have the ability 'copy' but the type argument 'R' does not have the required ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:40:9 @@ -128,7 +128,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Box3' can have the ability 'copy' but the type argument 'C' does not have the required ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:41:9 @@ -143,7 +143,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Box3' can have the ability 'copy' but the type argument 'C' does not have the required ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:43:9 @@ -158,7 +158,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Box3' can have the ability 'copy' but the type argument 'C' does not have the required ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:44:9 @@ -173,7 +173,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Box3' can have the ability 'copy' but the type argument 'R' does not have the required ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:45:9 @@ -188,7 +188,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Box3' can have the ability 'copy' but the type argument 'R' does not have the required ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:47:9 @@ -203,7 +203,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Box3' can have the ability 'copy' but the type argument 'R' does not have the required ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:51:9 @@ -218,7 +218,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Box3' can have the ability 'copy' but the type argument 'U' does not have the required ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:52:9 @@ -233,7 +233,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Box3' can have the ability 'copy' but the type argument 'C' does not have the required ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:53:9 @@ -248,7 +248,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Box3' can have the ability 'copy' but the type argument 'C' does not have the required ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:55:9 @@ -263,7 +263,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Box3' can have the ability 'copy' but the type argument 'C' does not have the required ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:56:9 @@ -278,7 +278,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Box3' can have the ability 'copy' but the type argument 'U' does not have the required ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:57:9 @@ -293,7 +293,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Box3' can have the ability 'copy' but the type argument 'U' does not have the required ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/module_call_constraints_not_satisfied.move:59:9 @@ -308,5 +308,5 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Box3' can have the ability 'copy' but the type argument 'U' does not have the required ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/module_call_entry_function_was_invalid.move b/external-crates/move/crates/move-compiler/tests/move_check/typing/module_call_entry_function_was_invalid.move index 3d9fe2f0364..7da1aca5925 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/module_call_entry_function_was_invalid.move +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/module_call_entry_function_was_invalid.move @@ -1,6 +1,6 @@ address 0x2 { -// entry functions (previously public(script)) used to have visbility restrictions. +// entry functions (previously public(script)) used to have visibility restrictions. // These have been removed module X { diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/pack_constraint_not_satisfied.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/pack_constraint_not_satisfied.exp index 118a0b52a34..2611b8e6abb 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/pack_constraint_not_satisfied.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/pack_constraint_not_satisfied.exp @@ -7,7 +7,7 @@ error[E05001]: ability constraint not satisfied 7 │ R {r:_ } = R { r: 0 }; │ ^^^^^^^^ - The type 'u64' does not have the ability 'key' │ │ - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/pack_constraint_not_satisfied.move:7:20 @@ -19,7 +19,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^ │ │ │ │ │ The type 'u64' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/pack_constraint_not_satisfied.move:8:9 @@ -34,7 +34,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Coin' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/pack_constraint_not_satisfied.move:8:9 @@ -57,7 +57,7 @@ error[E05001]: ability constraint not satisfied 12 │ R {r: R { r: _ } } = R { r: R { r: 0 }}; │ ^^^^^^^^^^^^^^^^^^ ---------- The type '0x8675309::M::R' does not have the ability 'key' │ │ - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/pack_constraint_not_satisfied.move:12:15 @@ -68,7 +68,7 @@ error[E05001]: ability constraint not satisfied 12 │ R {r: R { r: _ } } = R { r: R { r: 0 }}; │ ^^^^^^^^^^ - The type 'u64' does not have the ability 'key' │ │ - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/pack_constraint_not_satisfied.move:12:30 @@ -82,7 +82,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::R' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/pack_constraint_not_satisfied.move:12:37 @@ -94,7 +94,7 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^ │ │ │ │ │ The type 'u64' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/pack_constraint_not_satisfied.move:13:9 @@ -107,7 +107,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x8675309::M::S<0x8675309::M::Coin>' can have the ability 'drop' but the type argument '0x8675309::M::Coin' does not have the required ability 'drop' │ │ The type '0x8675309::M::S<0x8675309::M::Coin>' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/pack_constraint_not_satisfied.move:13:9 @@ -132,5 +132,5 @@ error[E05001]: ability constraint not satisfied │ ^^^^^^^^^^^^^^^^ │ │ │ │ │ The type '0x8675309::M::Coin' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/phantom_param_op_abilities_invalid.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/phantom_param_op_abilities_invalid.exp index 24413e10c9b..a7d83bf8fa8 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/phantom_param_op_abilities_invalid.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/phantom_param_op_abilities_invalid.exp @@ -54,7 +54,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::HasStore<0x42::M::NoAbilities, 0x42::M::NoAbilities>' can have the ability 'store' but the type argument '0x42::M::NoAbilities' does not have the required ability 'store' │ │ The type '0x42::M::HasStore<0x42::M::NoAbilities, 0x42::M::NoAbilities>' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_param_op_abilities_invalid.move:30:9 @@ -67,5 +67,5 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::HasStore<0x42::M::NoAbilities, 0x42::M::NoAbilities>' can have the ability 'store' but the type argument '0x42::M::NoAbilities' does not have the required ability 'store' │ │ The type '0x42::M::HasStore<0x42::M::NoAbilities, 0x42::M::NoAbilities>' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/phantom_param_struct_decl_invalid.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/phantom_param_struct_decl_invalid.exp index ac8f85e668c..2e64240f6c0 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/phantom_param_struct_decl_invalid.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/phantom_param_struct_decl_invalid.exp @@ -52,5 +52,5 @@ error[E05001]: ability constraint not satisfied │ ^^^^^ │ │ │ │ │ The type 'T' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/phantom_params_constraint_abilities_invalid.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/phantom_params_constraint_abilities_invalid.exp index 4c3b52b9ff6..ec60be40b93 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/phantom_params_constraint_abilities_invalid.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/phantom_params_constraint_abilities_invalid.exp @@ -9,7 +9,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' can have the ability 'copy' but the type argument '0x42::M::NoAbilities' does not have the required ability 'copy' │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_params_constraint_abilities_invalid.move:11:12 @@ -22,7 +22,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' can have the ability 'drop' but the type argument '0x42::M::NoAbilities' does not have the required ability 'drop' │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_params_constraint_abilities_invalid.move:11:12 @@ -35,7 +35,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' can have the ability 'store' but the type argument '0x42::M::NoAbilities' does not have the required ability 'store' │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_params_constraint_abilities_invalid.move:11:12 @@ -48,7 +48,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' can have the ability 'key' but the type argument '0x42::M::NoAbilities' does not have the required ability 'store' │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_params_constraint_abilities_invalid.move:16:12 @@ -66,7 +66,7 @@ error[E05001]: ability constraint not satisfied 18 │ │ HasStore, 19 │ │ HasKey 20 │ │ > - │ ╰──────────────^ 'drop' constraint not satisifed + │ ╰──────────────^ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_params_constraint_abilities_invalid.move:16:12 @@ -84,7 +84,7 @@ error[E05001]: ability constraint not satisfied 18 │ │ HasStore, 19 │ │ HasKey 20 │ │ > - │ ╰──────────────^ 'copy' constraint not satisifed + │ ╰──────────────^ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_params_constraint_abilities_invalid.move:16:12 @@ -102,7 +102,7 @@ error[E05001]: ability constraint not satisfied │ │ The type '0x42::M::HasStore<0x42::M::NoAbilities, 0x42::M::NoAbilities>' does not have the ability 'store' 19 │ │ HasKey 20 │ │ > - │ ╰──────────────^ 'store' constraint not satisifed + │ ╰──────────────^ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_params_constraint_abilities_invalid.move:16:12 @@ -120,7 +120,7 @@ error[E05001]: ability constraint not satisfied │ │ │ The type '0x42::M::HasKey<0x42::M::NoAbilities, 0x42::M::NoAbilities>' can have the ability 'key' but the type argument '0x42::M::NoAbilities' does not have the required ability 'store' │ │ The type '0x42::M::HasKey<0x42::M::NoAbilities, 0x42::M::NoAbilities>' does not have the ability 'key' 20 │ │ > - │ ╰──────────────^ 'key' constraint not satisifed + │ ╰──────────────^ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_params_constraint_abilities_invalid.move:25:9 @@ -133,7 +133,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' can have the ability 'copy' but the type argument '0x42::M::NoAbilities' does not have the required ability 'copy' │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' does not have the ability 'copy' - │ 'copy' constraint not satisifed + │ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_params_constraint_abilities_invalid.move:25:9 @@ -146,7 +146,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' can have the ability 'drop' but the type argument '0x42::M::NoAbilities' does not have the required ability 'drop' │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' does not have the ability 'drop' - │ 'drop' constraint not satisifed + │ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_params_constraint_abilities_invalid.move:25:9 @@ -159,7 +159,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' can have the ability 'store' but the type argument '0x42::M::NoAbilities' does not have the required ability 'store' │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' does not have the ability 'store' - │ 'store' constraint not satisifed + │ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_params_constraint_abilities_invalid.move:25:9 @@ -172,7 +172,7 @@ error[E05001]: ability constraint not satisfied │ │ │ │ │ │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' can have the ability 'key' but the type argument '0x42::M::NoAbilities' does not have the required ability 'store' │ │ The type '0x42::M::HasAbilities<0x42::M::NoAbilities, 0x42::M::NoAbilities>' does not have the ability 'key' - │ 'key' constraint not satisifed + │ 'key' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_params_constraint_abilities_invalid.move:30:9 @@ -189,7 +189,7 @@ error[E05001]: ability constraint not satisfied 32 │ │ HasStore, 33 │ │ HasKey 34 │ │ >(); - │ ╰─────────────^ 'drop' constraint not satisifed + │ ╰─────────────^ 'drop' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_params_constraint_abilities_invalid.move:30:9 @@ -206,7 +206,7 @@ error[E05001]: ability constraint not satisfied 32 │ │ HasStore, 33 │ │ HasKey 34 │ │ >(); - │ ╰─────────────^ 'copy' constraint not satisifed + │ ╰─────────────^ 'copy' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_params_constraint_abilities_invalid.move:30:9 @@ -223,7 +223,7 @@ error[E05001]: ability constraint not satisfied │ │ The type '0x42::M::HasStore<0x42::M::NoAbilities, 0x42::M::NoAbilities>' does not have the ability 'store' 33 │ │ HasKey 34 │ │ >(); - │ ╰─────────────^ 'store' constraint not satisifed + │ ╰─────────────^ 'store' constraint not satisfied error[E05001]: ability constraint not satisfied ┌─ tests/move_check/typing/phantom_params_constraint_abilities_invalid.move:30:9 @@ -240,5 +240,5 @@ error[E05001]: ability constraint not satisfied │ │ │ The type '0x42::M::HasKey<0x42::M::NoAbilities, 0x42::M::NoAbilities>' can have the ability 'key' but the type argument '0x42::M::NoAbilities' does not have the required ability 'store' │ │ The type '0x42::M::HasKey<0x42::M::NoAbilities, 0x42::M::NoAbilities>' does not have the ability 'key' 34 │ │ >(); - │ ╰─────────────^ 'key' constraint not satisifed + │ ╰─────────────^ 'key' constraint not satisfied diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/type_variable_join_threaded_pack_invalid.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/type_variable_join_threaded_pack_invalid.exp index 827465e0385..4272c14b10f 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/type_variable_join_threaded_pack_invalid.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/type_variable_join_threaded_pack_invalid.exp @@ -20,7 +20,7 @@ error[E05001]: ability constraint not satisfied │ --- To satisfy the constraint, the 'drop' ability would need to be added here · 47 │ let x = Container::get(&v); - │ ^^^^^^^^^^^^^^^^^^ 'drop' constraint not satisifed + │ ^^^^^^^^^^^^^^^^^^ 'drop' constraint not satisfied 48 │ let b = Box { f1: x, f2: x }; 49 │ Container::put(&mut v, Box {f1: R{}, f2: R{}}); │ ---------------------- The type '0x2::M::Box<0x2::M::R>' does not have the ability 'drop' diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/type_variable_join_threaded_unpack_assign_invalid.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/type_variable_join_threaded_unpack_assign_invalid.exp index 50e8a4f7eca..e3c3e16726f 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/type_variable_join_threaded_unpack_assign_invalid.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/type_variable_join_threaded_unpack_assign_invalid.exp @@ -17,7 +17,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'drop' constraint declared here · 43 │ Box { f1, f2 } = Container::get(&v); - │ -------------- ^^^^^^^^^^^^^^^^^^ 'drop' constraint not satisifed + │ -------------- ^^^^^^^^^^^^^^^^^^ 'drop' constraint not satisfied │ │ │ The type '0x2::M::Box<0x2::M::R>' does not have the ability 'drop' │ The type '0x2::M::Box<0x2::M::R>' can have the ability 'drop' but the type argument '0x2::M::R' does not have the required ability 'drop' diff --git a/external-crates/move/crates/move-compiler/tests/move_check/typing/type_variable_join_threaded_unpack_invalid.exp b/external-crates/move/crates/move-compiler/tests/move_check/typing/type_variable_join_threaded_unpack_invalid.exp index da3765cc36c..eb824042cf1 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/typing/type_variable_join_threaded_unpack_invalid.exp +++ b/external-crates/move/crates/move-compiler/tests/move_check/typing/type_variable_join_threaded_unpack_invalid.exp @@ -17,7 +17,7 @@ error[E05001]: ability constraint not satisfied │ ---- 'drop' constraint declared here · 39 │ let Box { f1, f2 } = Container::get(&v); - │ -------------- ^^^^^^^^^^^^^^^^^^ 'drop' constraint not satisifed + │ -------------- ^^^^^^^^^^^^^^^^^^ 'drop' constraint not satisfied │ │ │ The type '0x2::M::Box<0x2::M::R>' does not have the ability 'drop' │ The type '0x2::M::Box<0x2::M::R>' can have the ability 'drop' but the type argument '0x2::M::R' does not have the required ability 'drop' diff --git a/external-crates/move/crates/move-coverage/src/summary.rs b/external-crates/move/crates/move-coverage/src/summary.rs index 71456b368a9..aa4172c0008 100644 --- a/external-crates/move/crates/move-coverage/src/summary.rs +++ b/external-crates/move/crates/move-coverage/src/summary.rs @@ -139,7 +139,7 @@ pub fn summarize_inst_cov_by_module( let fn_handle = module.function_handle_at(function_def.function); let fn_name = module.identifier_at(fn_handle.name).to_owned(); - let fn_summmary = match &function_def.code { + let fn_summary = match &function_def.code { None => FunctionSummary { fn_is_native: true, total: 0, @@ -163,7 +163,7 @@ pub fn summarize_inst_cov_by_module( } }; - (fn_name, fn_summmary) + (fn_name, fn_summary) }) .collect(); @@ -421,7 +421,7 @@ pub fn summarize_path_cov(module: &CompiledModule, trace_map: &TraceMap) -> Modu let fn_handle = module.function_handle_at(function_def.function); let fn_name = module.identifier_at(fn_handle.name).to_owned(); - let fn_summmary = match &function_def.code { + let fn_summary = match &function_def.code { None => FunctionSummary { fn_is_native: true, total: 0, @@ -437,7 +437,7 @@ pub fn summarize_path_cov(module: &CompiledModule, trace_map: &TraceMap) -> Modu }, }; - (fn_name, fn_summmary) + (fn_name, fn_summary) }) .collect(); diff --git a/external-crates/move/crates/move-package/src/compilation/compiled_package.rs b/external-crates/move/crates/move-package/src/compilation/compiled_package.rs index 9027b3e87e7..4249d23febb 100644 --- a/external-crates/move/crates/move-package/src/compilation/compiled_package.rs +++ b/external-crates/move/crates/move-package/src/compilation/compiled_package.rs @@ -612,7 +612,7 @@ impl CompiledPackage { // We take the (restrictive) view that all filesystems are case insensitive to // maximize portability of packages. fn check_filepaths_ok(&self) -> Result<()> { - // A mapping of (lowercase_name => [info_for_each_occurence] + // A mapping of (lowercase_name => [info_for_each_occurrence] let mut insensitive_mapping = BTreeMap::new(); for compiled_unit in &self.root_compiled_units { let name = compiled_unit.unit.name.as_str(); @@ -626,9 +626,9 @@ impl CompiledPackage { } let errs = insensitive_mapping .into_iter() - .filter_map(|(insensitive_name, occurence_infos)| { - if occurence_infos.len() > 1 { - let name_conflict_error_msg = occurence_infos + .filter_map(|(insensitive_name, occurrence_infos)| { + if occurrence_infos.len() > 1 { + let name_conflict_error_msg = occurrence_infos .into_iter() .map(|(name, fpath)| { format!( diff --git a/external-crates/move/crates/move-package/src/resolution/dependency_graph.rs b/external-crates/move/crates/move-package/src/resolution/dependency_graph.rs index 65ab63c51cc..08a5a181bcb 100644 --- a/external-crates/move/crates/move-package/src/resolution/dependency_graph.rs +++ b/external-crates/move/crates/move-package/src/resolution/dependency_graph.rs @@ -197,7 +197,7 @@ pub enum DependencyMode { } /// Wrapper struct to display a package as an inline table in the lock file -/// (matching the convention in the source manifest). This is necessary becase +/// (matching the convention in the source manifest). This is necessary because /// the `toml` crate does not currently support serializing types as inline /// tables. struct PackageTOML<'a>(&'a Package); diff --git a/external-crates/move/crates/move-package/tests/test_sources/diamond_problem_dep_incorrect_nested/Move.toml b/external-crates/move/crates/move-package/tests/test_sources/diamond_problem_dep_incorrect_nested/Move.toml index e838b2b90a9..b723a318b6b 100644 --- a/external-crates/move/crates/move-package/tests/test_sources/diamond_problem_dep_incorrect_nested/Move.toml +++ b/external-crates/move/crates/move-package/tests/test_sources/diamond_problem_dep_incorrect_nested/Move.toml @@ -1,5 +1,5 @@ # Dependency graph and an override (ov) - technically, override in the root is capable of resolving -# a conflict in the sub-graph for A but becase we expect sub-graphs to be correct as standalone +# a conflict in the sub-graph for A but because we expect sub-graphs to be correct as standalone # entities (and our algorithm proceeds by constructing sub-graphs independently), this will result # in a failure. # diff --git a/external-crates/move/crates/move-stdlib/tests/vector_tests.move b/external-crates/move/crates/move-stdlib/tests/vector_tests.move index 5480f6b685d..f67a3f245fb 100644 --- a/external-crates/move/crates/move-stdlib/tests/vector_tests.move +++ b/external-crates/move/crates/move-stdlib/tests/vector_tests.move @@ -425,9 +425,9 @@ module std::vector_tests { assert!(index == 1, 1); } - // index_of will return the index first occurence that is equal + // index_of will return the index first occurrence that is equal #[test] - fun index_of_nonempty_has_multiple_occurences() { + fun index_of_nonempty_has_multiple_occurrences() { let v = V::empty(); V::push_back(&mut v, false); V::push_back(&mut v, true); diff --git a/external-crates/move/crates/move-vm-integration-tests/src/tests/exec_func_effects_tests.rs b/external-crates/move/crates/move-vm-integration-tests/src/tests/exec_func_effects_tests.rs index 31c3f979fd9..6466248a73b 100644 --- a/external-crates/move/crates/move-vm-integration-tests/src/tests/exec_func_effects_tests.rs +++ b/external-crates/move/crates/move-vm-integration-tests/src/tests/exec_func_effects_tests.rs @@ -54,8 +54,8 @@ fn fail_arg_deserialize() { } } -// check happy path for writing to mut ref args - may be unecessary / covered by -// other tests +// check happy path for writing to mut ref args - may be unnecessary / covered +// by other tests #[test] fn mutref_output_success() { let mod_code = setup_module(); diff --git a/external-crates/move/crates/move-vm-runtime/src/loader.rs b/external-crates/move/crates/move-vm-runtime/src/loader.rs index 4a3c2af08a9..b09d25614e6 100644 --- a/external-crates/move/crates/move-vm-runtime/src/loader.rs +++ b/external-crates/move/crates/move-vm-runtime/src/loader.rs @@ -1610,7 +1610,7 @@ pub(crate) struct LoadedModule { // `SignatureToken`, and hence, a single type. single_signature_token_map: BTreeMap, - // a map from signatures in instantiations to the `Vec` that reperesent it. + // a map from signatures in instantiations to the `Vec` that represent it. instantiation_signatures: BTreeMap>, } diff --git a/external-crates/move/crates/move-vm-types/src/natives/function.rs b/external-crates/move/crates/move-vm-types/src/natives/function.rs index 22d45aefb19..6fa4de4620b 100644 --- a/external-crates/move/crates/move-vm-types/src/natives/function.rs +++ b/external-crates/move/crates/move-vm-types/src/natives/function.rs @@ -52,7 +52,7 @@ impl NativeResult { /// Failed execution. The failure is a runtime failure in the function and /// not an invariant failure of the VM which would raise a - /// `PartialVMError` error directly. The only thing the funciton can + /// `PartialVMError` error directly. The only thing the function can /// specify is its abort code, as if it had invoked the `Abort` bytecode /// instruction pub fn err(cost: InternalGas, abort_code: u64) -> Self { diff --git a/external-crates/move/crates/test-generation/src/transitions.rs b/external-crates/move/crates/test-generation/src/transitions.rs index 3d2407d2c17..898b031dda3 100644 --- a/external-crates/move/crates/test-generation/src/transitions.rs +++ b/external-crates/move/crates/test-generation/src/transitions.rs @@ -101,9 +101,9 @@ impl Subst { pub fn abilities_for_token( state: &AbstractState, token: &SignatureToken, - type_paramters: &[AbilitySet], + type_parameters: &[AbilitySet], ) -> AbilitySet { - abilities(&state.module.module, token, type_paramters) + abilities(&state.module.module, token, type_parameters) } /// Given a locals signature index, determine the abilities for each signature diff --git a/external-crates/move/documentation/coding_guidelines.md b/external-crates/move/documentation/coding_guidelines.md index b61341878d8..c44d4393e49 100644 --- a/external-crates/move/documentation/coding_guidelines.md +++ b/external-crates/move/documentation/coding_guidelines.md @@ -7,7 +7,7 @@ This document describes the coding guidelines for the Move Rust codebase. ## Code formatting -All code formatting is enforced with [rustfmt](https://github.com/rust-lang/rustfmt) with a project-specific configuration. Below is an example command to adhere to the Move project conventions. +All code formatting is enforced with [rustfmt](https://github.com/rust-lang/rustfmt) with a project-specific configuration. Below is an example command to adhere to the Move project conventions. ``` $ cargo xfmt @@ -15,27 +15,27 @@ $ cargo xfmt ## Code analysis -[Clippy](https://github.com/rust-lang/rust-clippy) is used to catch common mistakes and is run as a part of continuous integration. Before submitting your code for review, you can run clippy with our configuration: +[Clippy](https://github.com/rust-lang/rust-clippy) is used to catch common mistakes and is run as a part of continuous integration. Before submitting your code for review, you can run clippy with our configuration: ``` $ cargo ci-clippy ``` -In general, we follow the recommendations from [rust-lang-nursery](https://rust-lang.github.io/api-guidelines/) and [The Rust Programming Language](https://doc.rust-lang.org/book/). The remainder of this guide provides detailed guidelines on specific topics in order to achieve uniformity of the codebase. +In general, we follow the recommendations from [rust-lang-nursery](https://rust-lang.github.io/api-guidelines/) and [The Rust Programming Language](https://doc.rust-lang.org/book/). The remainder of this guide provides detailed guidelines on specific topics in order to achieve uniformity of the codebase. ## Code documentation Any public fields, functions, and methods should be documented with [Rustdoc](https://doc.rust-lang.org/book/ch14-02-publishing-to-crates-io.html#making-useful-documentation-comments). - Please follow the conventions as detailed below for modules, structs, enums, and functions. The *single line* is used as a preview when navigating Rustdoc. As an example, see the 'Structs' and 'Enums' sections in the [collections](https://doc.rust-lang.org/std/collections/index.html) Rustdoc. +Please follow the conventions as detailed below for modules, structs, enums, and functions. The _single line_ is used as a preview when navigating Rustdoc. As an example, see the 'Structs' and 'Enums' sections in the [collections](https://doc.rust-lang.org/std/collections/index.html) Rustdoc. - ``` - /// [Single line] One line summary description - /// - /// [Longer description] Multiple lines, inline code - /// examples, invariants, purpose, usage, etc. - [Attributes] If attributes exist, add after Rustdoc - ``` +``` +/// [Single line] One line summary description +/// +/// [Longer description] Multiple lines, inline code +/// examples, invariants, purpose, usage, etc. +[Attributes] If attributes exist, add after Rustdoc +``` Example below: @@ -53,11 +53,12 @@ struct Point { ### Terminology -The Move codebase uses inclusive terminology (similar to other projects such as [the Linux kernel](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=49decddd39e5f6132ccd7d9fdc3d7c470b0061bb)). The terms below are recommended when appropriate. -* allowlist - a set of entities allowed access -* blocklist - a set of entities that are blocked from access -* primary/leader/main - a primary entity -* secondary/replica/follower - a secondary entity +The Move codebase uses inclusive terminology (similar to other projects such as [the Linux kernel](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=49decddd39e5f6132ccd7d9fdc3d7c470b0061bb)). The terms below are recommended when appropriate. + +- allowlist - a set of entities allowed access +- blocklist - a set of entities that are blocked from access +- primary/leader/main - a primary entity +- secondary/replica/follower - a secondary entity ### Constants and fields @@ -67,12 +68,12 @@ Describe the purpose and definition of this data. If the unit is a measurement o Document the following for each function: -* The action the method performs - “This method *adds* a new transaction to the mempool.” Use *active voice* and *present tense* (i.e. adds/creates/checks/updates/deletes). -* Describe how and why to use this method. -* Any condition that must be met _before_ calling the method. -* State conditions under which the function will `panic!()` or returns an `Error` -* Brief description of return values. -* Any special behavior that is not obvious +- The action the method performs - “This method _adds_ a new transaction to the mempool.” Use _active voice_ and _present tense_ (i.e. adds/creates/checks/updates/deletes). +- Describe how and why to use this method. +- Any condition that must be met _before_ calling the method. +- State conditions under which the function will `panic!()` or returns an `Error` +- Brief description of return values. +- Any special behavior that is not obvious ### README.md for top-level directories and other major components @@ -80,10 +81,10 @@ Each major component of Move needs to have a `README.md` file. This file should contain: - * The *conceptual* *documentation* of the component. - * A link to the external API documentation for the component. - * A link to the main license of the project. - * A link to the main contributing guide for the project. +- The _conceptual_ _documentation_ of the component. +- A link to the external API documentation for the component. +- A link to the main license of the project. +- A link to the main contributing guide for the project. A template for readmes: @@ -94,19 +95,19 @@ A template for readmes: ## Overview -* Describe the purpose of this component and how the code in -this directory works. -* Describe the interaction of the code in this directory with -the other components. -* Describe the security model and assumptions about the crates -in this directory. Examples of how to describe the security -assumptions will be added in the future. +- Describe the purpose of this component and how the code in + this directory works. +- Describe the interaction of the code in this directory with + the other components. +- Describe the security model and assumptions about the crates + in this directory. Examples of how to describe the security + assumptions will be added in the future. ## Implementation Details -* Describe how the component is modeled. For example, why is the - code organized the way it is? -* Other relevant implementation details. +- Describe how the component is modeled. For example, why is the + code organized the way it is? +- Other relevant implementation details. ## Binary, Argument, and Crate Naming @@ -127,14 +128,13 @@ In the following sections, we have suggested some best practices for a uniform c ### Attributes Make sure to use the appropriate attributes for handling dead code: - ``` -// For code that is intended for production usage in the future -#[allow(dead_code)] + +// For code that is intended for production usage in the future #[allow(dead_code)] // For code that is only intended for testing and -// has no intended production use -#[cfg(test)] -``` +// has no intended production use #[cfg(test)] + +```` ### Avoid Deref polymorphism @@ -201,35 +201,35 @@ impl Foo { self.key_to_value.get(&key) } } -``` +```` ### Integer Arithmetic As every integer operation (`+`, `-`, `/`, `*`, etc.) implies edge-cases (e.g. overflows `u64::MAX + 1`, underflows `0u64 -1`, division by zero, etc.), we use checked arithmetic instead of directly using math symbols. -It forces us to think of edge-cases, and handle them explicitely. +It forces us to think of edge-cases, and handle them explicitly. This is a brief and simplified mini guide of the different functions that exist to handle integer arithmetic: -* [checked_](https://doc.rust-lang.org/std/primitive.u32.html#method.checked_add): use this function if you want to handle overflows and underflows as a special edge-case. It returns `None` if an underflow or overflow has happened, and `Some(operation_result)` otherwise. -* [overflowing_](https://doc.rust-lang.org/std/primitive.u32.html#method.overflowing_add): use this function if you want the result of an overflow to potentially wrap around (e.g. `u64::MAX.overflow_add(10) == (9, true)`). It returns the underflowed or overflowed result as well as a flag indicating if an overflow has occured or not. -* [wrapping_](https://doc.rust-lang.org/std/primitive.u32.html#method.wrapping_add): this is similar to overflowing operations, except that it returns the result directly. Use this function if you are sure that you want to handle underflows and overflows by wrapping around. -* [saturating_](https://doc.rust-lang.org/std/primitive.u32.html#method.saturating_add): if an overflow occurs, the result is kept within the boundary of the type (e.g. `u64::MAX.saturating_add(1) == u64::MAX`). +- [checked\_](https://doc.rust-lang.org/std/primitive.u32.html#method.checked_add): use this function if you want to handle overflows and underflows as a special edge-case. It returns `None` if an underflow or overflow has happened, and `Some(operation_result)` otherwise. +- [overflowing\_](https://doc.rust-lang.org/std/primitive.u32.html#method.overflowing_add): use this function if you want the result of an overflow to potentially wrap around (e.g. `u64::MAX.overflow_add(10) == (9, true)`). It returns the underflowed or overflowed result as well as a flag indicating if an overflow has occured or not. +- [wrapping\_](https://doc.rust-lang.org/std/primitive.u32.html#method.wrapping_add): this is similar to overflowing operations, except that it returns the result directly. Use this function if you are sure that you want to handle underflows and overflows by wrapping around. +- [saturating\_](https://doc.rust-lang.org/std/primitive.u32.html#method.saturating_add): if an overflow occurs, the result is kept within the boundary of the type (e.g. `u64::MAX.saturating_add(1) == u64::MAX`). ### Logging We currently use [log](https://docs.rs/log/) for logging. -* [error!](https://docs.rs/log/0.4.14/log/macro.error.html) - Error-level messages have the highest urgency in [log](https://docs.rs/log/). An unexpected error has occurred (e.g. exceeded the maximum number of retries to complete an RPC or inability to store data to local storage). -* [warn!](https://docs.rs/log/0.4.14/log/macro.warn.html) - Warn-level messages help notify admins about automatically handled issues (e.g. retrying a failed network connection or receiving the same message multiple times, etc.). -* [info!](https://docs.rs/log/0.4.14/log/macro.info.html) - Info-level messages are well iotated for "one-time" events (such as logging state on one-time startup and shutdown) or periodic events that are not frequently occurring - e.g. changing the validator set every day. -* [debug!](https://docs.rs/log/0.4.14/log/macro.debug.html) - Debug-level messages can occur frequently (i.e. potentially > 1 message per second) and are not typically expected to be enabled in production. -* [trace!](https://docs.rs/log/0.4.14/log/macro.trace.html) - Trace-level logging is typically only used for function entry/exit. +- [error!](https://docs.rs/log/0.4.14/log/macro.error.html) - Error-level messages have the highest urgency in [log](https://docs.rs/log/). An unexpected error has occurred (e.g. exceeded the maximum number of retries to complete an RPC or inability to store data to local storage). +- [warn!](https://docs.rs/log/0.4.14/log/macro.warn.html) - Warn-level messages help notify admins about automatically handled issues (e.g. retrying a failed network connection or receiving the same message multiple times, etc.). +- [info!](https://docs.rs/log/0.4.14/log/macro.info.html) - Info-level messages are well iotated for "one-time" events (such as logging state on one-time startup and shutdown) or periodic events that are not frequently occurring - e.g. changing the validator set every day. +- [debug!](https://docs.rs/log/0.4.14/log/macro.debug.html) - Debug-level messages can occur frequently (i.e. potentially > 1 message per second) and are not typically expected to be enabled in production. +- [trace!](https://docs.rs/log/0.4.14/log/macro.trace.html) - Trace-level logging is typically only used for function entry/exit. ### Testing -*Unit tests* +_Unit tests_ -We follow the general guidance provided [here](https://doc.rust-lang.org/book/ch11-03-test-organization.html). Ideally, all code should be unit tested. Unit tests should be in the same file as the code it is testing though in a distinct module, using the following syntax: +We follow the general guidance provided [here](https://doc.rust-lang.org/book/ch11-03-test-organization.html). Ideally, all code should be unit tested. Unit tests should be in the same file as the code it is testing though in a distinct module, using the following syntax: ```rust struct Foo { @@ -250,39 +250,40 @@ mod tests { } ``` -*Property-based tests* +_Property-based tests_ -Move contains [property-based tests](https://blog.jessitron.com/2013/04/25/property-based-testing-what-is-it/) written in Rust using the [`proptest` framework](https://github.com/AltSysrq/proptest). Property-based tests generate random test cases and assert that invariants, also called *properties*, hold for the code under test. +Move contains [property-based tests](https://blog.jessitron.com/2013/04/25/property-based-testing-what-is-it/) written in Rust using the [`proptest` framework](https://github.com/AltSysrq/proptest). Property-based tests generate random test cases and assert that invariants, also called _properties_, hold for the code under test. Some examples of properties tested in Move: -* Every serializer and deserializer pair is tested for correctness with random inputs to the serializer. Any pair of functions that are inverses of each other can be tested this way. -* The results of executing common transactions through the VM are tested using randomly generated scenarios and verified with an *Oracle*. +- Every serializer and deserializer pair is tested for correctness with random inputs to the serializer. Any pair of functions that are inverses of each other can be tested this way. +- The results of executing common transactions through the VM are tested using randomly generated scenarios and verified with an _Oracle_. A tutorial for `proptest` can be found in the [`proptest` book](https://altsysrq.github.io/proptest-book/proptest/getting-started.html). References: -* [What is Property Based Testing?](https://hypothesis.works/articles/what-is-property-based-testing/) (includes a comparison with fuzzing) -* [An introduction to property-based testing](https://fsharpforfunandprofit.com/posts/property-based-testing/) -* [Choosing properties for property-based testing](https://fsharpforfunandprofit.com/posts/property-based-testing-2/) +- [What is Property Based Testing?](https://hypothesis.works/articles/what-is-property-based-testing/) (includes a comparison with fuzzing) +- [An introduction to property-based testing](https://fsharpforfunandprofit.com/posts/property-based-testing/) +- [Choosing properties for property-based testing](https://fsharpforfunandprofit.com/posts/property-based-testing-2/) ### Conditional compilation of tests Move [conditionally compiles](https://doc.rust-lang.org/stable/reference/conditional-compilation.html) -code that is *only relevant for tests, but does not consist of tests* (unitary +code that is _only relevant for tests, but does not consist of tests_ (unitary or otherwise). Examples of this include proptest strategies, implementations and derivations of specific traits (e.g. the occasional `Clone`), helper functions, etc. Since Cargo is [currently not equipped for automatically activating features in tests/benchmarks](https://github.com/rust-lang/cargo/issues/2911), we rely on two conditions to perform this conditional compilation: -- the test flag, which is activated by dependent test code in the same crate - as the conditional test-only code. -- the `fuzzing` custom feature, which is used to enable fuzzing and testing -related code in downstream crates. Note that this must be passed explicitly to -`cargo xtest` and `cargo x bench`. Never use this in `[dependencies]` unless -the crate is only for testing. + +- the test flag, which is activated by dependent test code in the same crate + as the conditional test-only code. +- the `fuzzing` custom feature, which is used to enable fuzzing and testing + related code in downstream crates. Note that this must be passed explicitly to + `cargo xtest` and `cargo x bench`. Never use this in `[dependencies]` unless + the crate is only for testing. As a consequence, it is recommended that you set up your test-only code in the following fashion. @@ -330,14 +331,14 @@ directly. foo_crate = { path = "...", features = ["fuzzing"] } ``` -*A final note on integration tests*: All tests that use conditional test-only +_A final note on integration tests_: All tests that use conditional test-only elements in another crate need to activate the "fuzzing" feature through the `[features]` section in their `Cargo.toml`. [Integration tests](https://doc.rust-lang.org/rust-by-example/testing/integration_testing.html) can neither rely on the `test` flag nor do they have a proper `Cargo.toml` for feature activation. In the Move codebase, we therefore recommend that -*integration tests which depend on test-only code in their tested crate* be +_integration tests which depend on test-only code in their tested crate_ be extracted to their own test-only crate. See `language/move-binary-format/serializer_tests` for an example of such an extracted integration test. -*Note for developers*: The reason we use a feature re-export (in the `[features]` section of the `Cargo.toml` is that a profile is not enough to activate the `"fuzzing"` feature flag. See [cargo-issue #291](https://github.com/rust-lang/cargo/issues/2911) for details). +_Note for developers_: The reason we use a feature re-export (in the `[features]` section of the `Cargo.toml` is that a profile is not enough to activate the `"fuzzing"` feature flag. See [cargo-issue #291](https://github.com/rust-lang/cargo/issues/2911) for details). diff --git a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/check_duplication.rs b/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/check_duplication.rs index 427dd3963b7..d4f6fac5b4a 100644 --- a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/check_duplication.rs +++ b/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/check_duplication.rs @@ -51,7 +51,7 @@ impl<'a> DuplicationChecker<'a> { let checker = Self { module }; checker.check_field_handles()?; checker.check_field_instantiations()?; - checker.check_function_defintions()?; + checker.check_function_definitions()?; checker.check_struct_definitions()?; checker.check_struct_instantiations() } @@ -263,7 +263,7 @@ impl<'a> DuplicationChecker<'a> { Ok(()) } - fn check_function_defintions(&self) -> PartialVMResult<()> { + fn check_function_definitions(&self) -> PartialVMResult<()> { // FunctionDefinition - contained FunctionHandle defines uniqueness if let Some(idx) = Self::first_duplicate_element(self.module.function_defs().iter().map(|x| x.function)) diff --git a/external-crates/move/move-execution/v0/crates/move-vm-runtime/src/loader.rs b/external-crates/move/move-execution/v0/crates/move-vm-runtime/src/loader.rs index 1fcde70c640..9ad91629014 100644 --- a/external-crates/move/move-execution/v0/crates/move-vm-runtime/src/loader.rs +++ b/external-crates/move/move-execution/v0/crates/move-vm-runtime/src/loader.rs @@ -1610,7 +1610,7 @@ pub(crate) struct LoadedModule { // `SignatureToken`, and hence, a single type. single_signature_token_map: BTreeMap, - // a map from signatures in instantiations to the `Vec` that reperesent it. + // a map from signatures in instantiations to the `Vec` that represent it. instantiation_signatures: BTreeMap>, } diff --git a/iota-execution/latest/iota-adapter/src/programmable_transactions/context.rs b/iota-execution/latest/iota-adapter/src/programmable_transactions/context.rs index e7957b7a871..6986ff6966d 100644 --- a/iota-execution/latest/iota-adapter/src/programmable_transactions/context.rs +++ b/iota-execution/latest/iota-adapter/src/programmable_transactions/context.rs @@ -1535,7 +1535,7 @@ mod checked { } fn publish_module(&mut self, _module_id: &ModuleId, _blob: Vec) -> VMResult<()> { - // we cannot panic here because during executon and publishing this is + // we cannot panic here because during execution and publishing this is // currently called from the publish flow in the Move runtime Ok(()) } diff --git a/iota-execution/latest/iota-adapter/src/programmable_transactions/execution.rs b/iota-execution/latest/iota-adapter/src/programmable_transactions/execution.rs index ef294e5fac5..dd68d2fbe3d 100644 --- a/iota-execution/latest/iota-adapter/src/programmable_transactions/execution.rs +++ b/iota-execution/latest/iota-adapter/src/programmable_transactions/execution.rs @@ -499,7 +499,7 @@ mod checked { let package = context.new_package(&modules, dependencies.iter().map(|p| p.move_package()))?; - // Here we optimistacally push the package that is being published/upgraded + // Here we optimistically push the package that is being published/upgraded // and if there is an error of any kind (verification or module init) we // remove it. // The call to `pop_last_package` later is fine because we cannot re-enter and diff --git a/iota-execution/latest/iota-move-natives/src/lib.rs b/iota-execution/latest/iota-move-natives/src/lib.rs index 4e3913821ae..fe420d5def3 100644 --- a/iota-execution/latest/iota-move-natives/src/lib.rs +++ b/iota-execution/latest/iota-move-natives/src/lib.rs @@ -929,7 +929,7 @@ pub fn get_object_id(object: Value) -> Result { get_nested_struct_field(object, &[0, 0, 0]) } -// Extract a field valye that's nested inside value `v`. The offset of each +// Extract a field value that's nested inside value `v`. The offset of each // nesting is determined by `offsets`. pub fn get_nested_struct_field(mut v: Value, offsets: &[usize]) -> Result { for offset in offsets { diff --git a/iota-execution/v0/iota-adapter/src/programmable_transactions/context.rs b/iota-execution/v0/iota-adapter/src/programmable_transactions/context.rs index e7957b7a871..6986ff6966d 100644 --- a/iota-execution/v0/iota-adapter/src/programmable_transactions/context.rs +++ b/iota-execution/v0/iota-adapter/src/programmable_transactions/context.rs @@ -1535,7 +1535,7 @@ mod checked { } fn publish_module(&mut self, _module_id: &ModuleId, _blob: Vec) -> VMResult<()> { - // we cannot panic here because during executon and publishing this is + // we cannot panic here because during execution and publishing this is // currently called from the publish flow in the Move runtime Ok(()) } diff --git a/iota-execution/v0/iota-adapter/src/programmable_transactions/execution.rs b/iota-execution/v0/iota-adapter/src/programmable_transactions/execution.rs index ef294e5fac5..dd68d2fbe3d 100644 --- a/iota-execution/v0/iota-adapter/src/programmable_transactions/execution.rs +++ b/iota-execution/v0/iota-adapter/src/programmable_transactions/execution.rs @@ -499,7 +499,7 @@ mod checked { let package = context.new_package(&modules, dependencies.iter().map(|p| p.move_package()))?; - // Here we optimistacally push the package that is being published/upgraded + // Here we optimistically push the package that is being published/upgraded // and if there is an error of any kind (verification or module init) we // remove it. // The call to `pop_last_package` later is fine because we cannot re-enter and diff --git a/iota-execution/v0/iota-move-natives/src/lib.rs b/iota-execution/v0/iota-move-natives/src/lib.rs index 4e3913821ae..fe420d5def3 100644 --- a/iota-execution/v0/iota-move-natives/src/lib.rs +++ b/iota-execution/v0/iota-move-natives/src/lib.rs @@ -929,7 +929,7 @@ pub fn get_object_id(object: Value) -> Result { get_nested_struct_field(object, &[0, 0, 0]) } -// Extract a field valye that's nested inside value `v`. The offset of each +// Extract a field value that's nested inside value `v`. The offset of each // nesting is determined by `offsets`. pub fn get_nested_struct_field(mut v: Value, offsets: &[usize]) -> Result { for offset in offsets { diff --git a/narwhal/Docker/build.sh b/narwhal/Docker/build.sh index c6a7a20020d..6ca0d7b7583 100755 --- a/narwhal/Docker/build.sh +++ b/narwhal/Docker/build.sh @@ -1,7 +1,5 @@ #!/bin/sh # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/narwhal/Docker/entry.sh b/narwhal/Docker/entry.sh index bb2f2124176..aabe0ab76f4 100755 --- a/narwhal/Docker/entry.sh +++ b/narwhal/Docker/entry.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/narwhal/Docker/gen.validators.sh b/narwhal/Docker/gen.validators.sh index 9c14bdf9bef..65fc025cfef 100755 --- a/narwhal/Docker/gen.validators.sh +++ b/narwhal/Docker/gen.validators.sh @@ -1,7 +1,5 @@ #!/usr/bin/env bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 set -e diff --git a/narwhal/Docker/scripts/gen.committee.py b/narwhal/Docker/scripts/gen.committee.py index a6b53d0328b..ae87124f21b 100755 --- a/narwhal/Docker/scripts/gen.committee.py +++ b/narwhal/Docker/scripts/gen.committee.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 """Generate a committee.json file @@ -35,7 +33,6 @@ def main(): k = open("{}/validator-{:02d}/network-key.json".format(args.d, i)).read() network_keys.append(json.loads(k)) - temp = {} for i, (k, nk) in enumerate(zip(keys, network_keys)): temp[k['name']] = { diff --git a/narwhal/Docker/scripts/gen.compose.py b/narwhal/Docker/scripts/gen.compose.py index 89ab567dfab..ddb63f89275 100755 --- a/narwhal/Docker/scripts/gen.compose.py +++ b/narwhal/Docker/scripts/gen.compose.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 """Create a docker-compose.yaml file to stdout for --num # of nodes diff --git a/narwhal/Docker/scripts/gen.workers.py b/narwhal/Docker/scripts/gen.workers.py index d4b6b0d071a..81b6f83bc3e 100755 --- a/narwhal/Docker/scripts/gen.workers.py +++ b/narwhal/Docker/scripts/gen.workers.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 """Generate a workers.json file diff --git a/narwhal/benchmark/benchmark/aggregate.py b/narwhal/benchmark/benchmark/aggregate.py index 27313c8f198..46526cb665e 100644 --- a/narwhal/benchmark/benchmark/aggregate.py +++ b/narwhal/benchmark/benchmark/aggregate.py @@ -1,7 +1,5 @@ # Copyright(C) Facebook, Inc. and its affiliates. # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 from re import search diff --git a/narwhal/benchmark/benchmark/commands.py b/narwhal/benchmark/benchmark/commands.py index 38bc5e886db..97cfda8e7cd 100644 --- a/narwhal/benchmark/benchmark/commands.py +++ b/narwhal/benchmark/benchmark/commands.py @@ -1,7 +1,5 @@ # Copyright(C) Facebook, Inc. and its affiliates. # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 from os.path import join @@ -47,7 +45,7 @@ def get_pub_key(filename): def generate_network_key(filename): assert isinstance(filename, str) return f'./narwhal-node generate_network_keys --filename {filename}' - + @staticmethod def run_primary(primary_keys, primary_network_keys, worker_keys, committee, workers, store, parameters, debug=False): assert isinstance(primary_keys, str) diff --git a/narwhal/benchmark/benchmark/config.py b/narwhal/benchmark/benchmark/config.py index 7e7c1d9c843..746d7cba8d3 100644 --- a/narwhal/benchmark/benchmark/config.py +++ b/narwhal/benchmark/benchmark/config.py @@ -1,7 +1,5 @@ # Copyright(C) Facebook, Inc. and its affiliates. # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 from json import dump, load @@ -12,6 +10,7 @@ class ConfigError(Exception): pass + class WorkerCache: ''' The worker cache looks as follows: "workers: { diff --git a/narwhal/benchmark/benchmark/full_demo.py b/narwhal/benchmark/benchmark/full_demo.py index 00525222668..ffbec1b248d 100644 --- a/narwhal/benchmark/benchmark/full_demo.py +++ b/narwhal/benchmark/benchmark/full_demo.py @@ -1,7 +1,5 @@ # Copyright(C) Facebook, Inc. and its affiliates. # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 import subprocess @@ -97,7 +95,8 @@ def run(self, debug=False): pk = subprocess.check_output(cmd_pk, encoding='utf-8').strip() primary_network_names += [pk] - committee = LocalCommittee(primary_names, primary_network_names, self.BASE_PORT) + committee = LocalCommittee( + primary_names, primary_network_names, self.BASE_PORT) committee.print(PathMaker.committee_file()) worker_names = [] diff --git a/narwhal/benchmark/benchmark/instance.py b/narwhal/benchmark/benchmark/instance.py index 2693a8b1166..fb42b367308 100644 --- a/narwhal/benchmark/benchmark/instance.py +++ b/narwhal/benchmark/benchmark/instance.py @@ -1,7 +1,5 @@ # Copyright(C) Facebook, Inc. and its affiliates. # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 import boto3 diff --git a/narwhal/benchmark/benchmark/local.py b/narwhal/benchmark/benchmark/local.py index 7642cbb6c5b..6e1a92b6fb8 100644 --- a/narwhal/benchmark/benchmark/local.py +++ b/narwhal/benchmark/benchmark/local.py @@ -1,7 +1,5 @@ # Copyright(C) Facebook, Inc. and its affiliates. # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 import subprocess diff --git a/narwhal/benchmark/benchmark/logs.py b/narwhal/benchmark/benchmark/logs.py index 7bed929724e..2781ce9a9bb 100644 --- a/narwhal/benchmark/benchmark/logs.py +++ b/narwhal/benchmark/benchmark/logs.py @@ -1,7 +1,5 @@ # Copyright(C) Facebook, Inc. and its affiliates. # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 from datetime import datetime, timezone diff --git a/narwhal/benchmark/benchmark/plot.py b/narwhal/benchmark/benchmark/plot.py index e07f9fc018c..1b3aa6e8551 100644 --- a/narwhal/benchmark/benchmark/plot.py +++ b/narwhal/benchmark/benchmark/plot.py @@ -1,7 +1,5 @@ # Copyright(C) Facebook, Inc. and its affiliates. # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 from re import findall, search, split diff --git a/narwhal/benchmark/benchmark/remote.py b/narwhal/benchmark/benchmark/remote.py index cf7ffab7752..97359bdaa0f 100644 --- a/narwhal/benchmark/benchmark/remote.py +++ b/narwhal/benchmark/benchmark/remote.py @@ -1,7 +1,5 @@ # Copyright(C) Facebook, Inc. and its affiliates. # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 from collections import OrderedDict diff --git a/narwhal/benchmark/benchmark/seed.py b/narwhal/benchmark/benchmark/seed.py index d083c4d7de9..1cc64a74b6b 100644 --- a/narwhal/benchmark/benchmark/seed.py +++ b/narwhal/benchmark/benchmark/seed.py @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 import subprocess diff --git a/narwhal/benchmark/benchmark/settings.py b/narwhal/benchmark/benchmark/settings.py index af8923748f4..028ebbc2ced 100644 --- a/narwhal/benchmark/benchmark/settings.py +++ b/narwhal/benchmark/benchmark/settings.py @@ -1,7 +1,5 @@ # Copyright(C) Facebook, Inc. and its affiliates. # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 from json import load, JSONDecodeError diff --git a/narwhal/benchmark/benchmark/utils.py b/narwhal/benchmark/benchmark/utils.py index 395632d8245..eda39311389 100644 --- a/narwhal/benchmark/benchmark/utils.py +++ b/narwhal/benchmark/benchmark/utils.py @@ -1,7 +1,5 @@ # Copyright (c) 2021, Facebook, Inc. and its affiliates. # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 import multiaddr diff --git a/narwhal/benchmark/data/paper-data/plot-script.py b/narwhal/benchmark/data/paper-data/plot-script.py index 5ad24fc5dfd..3f1a1321966 100644 --- a/narwhal/benchmark/data/paper-data/plot-script.py +++ b/narwhal/benchmark/data/paper-data/plot-script.py @@ -1,7 +1,5 @@ # Copyright(C) Facebook, Inc. and its affiliates. # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/narwhal/benchmark/data/paper-data/summary-plot.py b/narwhal/benchmark/data/paper-data/summary-plot.py index 8d361d83858..0bc356a8bc6 100644 --- a/narwhal/benchmark/data/paper-data/summary-plot.py +++ b/narwhal/benchmark/data/paper-data/summary-plot.py @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 import matplotlib.pyplot as plt diff --git a/narwhal/benchmark/fabfile.py b/narwhal/benchmark/fabfile.py index 4bc603657bf..5f1100a7176 100644 --- a/narwhal/benchmark/fabfile.py +++ b/narwhal/benchmark/fabfile.py @@ -1,7 +1,5 @@ # Copyright(C) Facebook, Inc. and its affiliates. # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 from fabric import task diff --git a/narwhal/scripts/changed-files.sh b/narwhal/scripts/changed-files.sh index a3855a50bb2..7f9b36966ee 100755 --- a/narwhal/scripts/changed-files.sh +++ b/narwhal/scripts/changed-files.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/narwhal/scripts/update_dependencies.sh b/narwhal/scripts/update_dependencies.sh index c1be452be2b..82f85700df3 100755 --- a/narwhal/scripts/update_dependencies.sh +++ b/narwhal/scripts/update_dependencies.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/narwhal/storage/src/certificate_store.rs b/narwhal/storage/src/certificate_store.rs index 2d478a4a374..87d7e17e277 100644 --- a/narwhal/storage/src/certificate_store.rs +++ b/narwhal/storage/src/certificate_store.rs @@ -612,17 +612,13 @@ impl CertificateStore { /// Retrieves the highest round number in the store. /// Returns 0 if there is no certificate in the store. pub fn highest_round_number(&self) -> Round { - if let Some(((round, _), _)) = self - .certificate_id_by_round + self.certificate_id_by_round .unbounded_iter() .skip_to_last() .reverse() .next() - { - round - } else { - 0 - } + .map(|((round, _), _)| round) + .unwrap_or_default() } /// Retrieves the last round number of the given origin. diff --git a/narwhal/worker/src/handlers.rs b/narwhal/worker/src/handlers.rs index 622d7f28692..d1710f84811 100644 --- a/narwhal/worker/src/handlers.rs +++ b/narwhal/worker/src/handlers.rs @@ -116,6 +116,7 @@ impl WorkerToWorker for WorkerReceiverHandler { /// Defines how the network receiver handles incoming primary messages. pub struct PrimaryReceiverHandler { // The id of this authority. + #[allow(dead_code)] pub authority_id: AuthorityIdentifier, // The id of this worker. pub id: WorkerId, @@ -129,6 +130,7 @@ pub struct PrimaryReceiverHandler { // Timeout on RequestBatches RPC. pub request_batches_timeout: Duration, // Number of random nodes to query when retrying batch requests. + #[allow(dead_code)] pub request_batches_retry_nodes: usize, // Synchronize header payloads from other workers. pub network: Option, diff --git a/nre/download_and_verify_private_binary.sh b/nre/download_and_verify_private_binary.sh index 607791f3a9d..10079a8a5da 100755 --- a/nre/download_and_verify_private_binary.sh +++ b/nre/download_and_verify_private_binary.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/nre/download_private.sh b/nre/download_private.sh index c9ac51fb9ca..3bb92f29ff6 100644 --- a/nre/download_private.sh +++ b/nre/download_private.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b38b1e9d977..2dc3f845862 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1554,52 +1554,6 @@ importers: specifier: ^0.33.0 version: 0.33.0(@vitest/ui@0.33.0)(happy-dom@10.5.1)(jsdom@23.0.0)(sass@1.63.6)(terser@5.31.0) - sdk/enoki: - dependencies: - '@iota/iota.js': - specifier: workspace:* - version: link:../typescript - '@iota/zklogin': - specifier: workspace:* - version: link:../zklogin - '@nanostores/react': - specifier: ^0.7.1 - version: 0.7.1(nanostores@0.9.3)(react@18.2.0) - jose: - specifier: ^5.2.3 - version: 5.3.0 - nanostores: - specifier: ^0.9.3 - version: 0.9.3 - devDependencies: - '@iota/build-scripts': - specifier: workspace:* - version: link:../build-scripts - '@types/node': - specifier: ^20.4.2 - version: 20.4.2 - '@types/react': - specifier: ^18.2.15 - version: 18.2.15 - '@types/react-dom': - specifier: ^18.2.7 - version: 18.2.7 - '@vitejs/plugin-react-swc': - specifier: ^3.3.2 - version: 3.4.0(@swc/helpers@0.5.5)(vite@4.4.11(@types/node@20.4.2)(sass@1.63.6)(terser@5.31.0)) - react: - specifier: ^18.2.0 - version: 18.2.0 - react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) - typescript: - specifier: ^5.3.3 - version: 5.3.3 - vite: - specifier: ^4.4.4 - version: 4.4.11(@types/node@20.4.2)(sass@1.63.6)(terser@5.31.0) - sdk/graphql-transport: dependencies: '@graphql-typed-document-node/core': @@ -4318,13 +4272,6 @@ packages: resolution: {integrity: sha512-4LVGt03RobMH/7ZrbHqRxQrS9cc2uh+iNKSj8UWr8M26A2i793ju+csaB5zaqYltqJmA2jUq4VeYfKmVqvsXQg==} engines: {node: '>=14'} - '@nanostores/react@0.7.1': - resolution: {integrity: sha512-EXQg9N4MdI4eJQz/AZLIx3hxQ6BuBmV4Q55bCd5YCSgEOAW7tGTsIZxpRXxvxLXzflNvHTBvfrDNY38TlSVBkQ==} - engines: {node: ^16.0.0 || ^18.0.0 || >=20.0.0} - peerDependencies: - nanostores: ^0.9.0 - react: '>=18.0.0' - '@ndelangen/get-tarball@3.0.9': resolution: {integrity: sha512-9JKTEik4vq+yGosHYhZ1tiH/3WpUS0Nh0kej4Agndhox8pAdWhEx5knFVRcb/ya9knCRCs1rPxNrSXTDdfVqpA==} @@ -11423,10 +11370,6 @@ packages: nanospinner@1.1.0: resolution: {integrity: sha512-yFvNYMig4AthKYfHFl1sLj7B2nkHL4lzdig4osvl9/LdGbXwrdFRoqBS98gsEsOakr0yH+r5NZ/1Y9gdVB8trA==} - nanostores@0.9.3: - resolution: {integrity: sha512-KobZjcVyNndNrb5DAjfs0WG0lRcZu5Q1BOrfTOxokFLi25zFrWPjg+joXC6kuDqNfSt9fQwppyjUBkRPtsL+8w==} - engines: {node: ^16.0.0 || ^18.0.0 || >=20.0.0} - natural-compare-lite@1.4.0: resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} @@ -18589,11 +18532,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@nanostores/react@0.7.1(nanostores@0.9.3)(react@18.2.0)': - dependencies: - nanostores: 0.9.3 - react: 18.2.0 - '@ndelangen/get-tarball@3.0.9': dependencies: gunzip-maybe: 1.4.2 @@ -28263,8 +28201,6 @@ snapshots: dependencies: picocolors: 1.0.0 - nanostores@0.9.3: {} - natural-compare-lite@1.4.0: {} natural-compare@1.4.0: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index d3063ef4e08..5c71c37361b 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -17,7 +17,6 @@ packages: - '!sdk/typescript/utils' - '!sdk/typescript/bcs' - '!sdk/typescript/zklogin' - - '!sdk/enoki/react' - '!sdk/move-bytecode-template/pkg' - '!sdk/move-bytecode-template/pkg' - '!sdk/typescript/graphql' diff --git a/scripts/bench_sweep.py b/scripts/bench_sweep.py index b48f16ea24e..ff07522d579 100644 --- a/scripts/bench_sweep.py +++ b/scripts/bench_sweep.py @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 from time import sleep @@ -12,6 +10,7 @@ cmd_template = Template( "../target/release/bench microbench latency --period-us $period_us --chunk-size $chunk_size --num-chunks $num_chunks") + def get_avg_latency(period_us, chunk_size, num_chunks): cmd = cmd_template.substitute( period_us=period_us, chunk_size=chunk_size, num_chunks=num_chunks) @@ -34,6 +33,7 @@ def plot(vals): plt.xlabel("Throughput") plt.show() + lats = [] for i in range(10): chunk_size = 200 * (i+1) diff --git a/scripts/changed-files.sh b/scripts/changed-files.sh index a3855a50bb2..7f9b36966ee 100755 --- a/scripts/changed-files.sh +++ b/scripts/changed-files.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/scripts/check-framework-compat.sh b/scripts/check-framework-compat.sh index cad7fba869f..e1ede35e13d 100755 --- a/scripts/check-framework-compat.sh +++ b/scripts/check-framework-compat.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 # diff --git a/scripts/compatibility/check-protocol-compatibility.sh b/scripts/compatibility/check-protocol-compatibility.sh index 5c58340e740..02cff338859 100755 --- a/scripts/compatibility/check-protocol-compatibility.sh +++ b/scripts/compatibility/check-protocol-compatibility.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/scripts/compatibility/fullnode-sync.sh b/scripts/compatibility/fullnode-sync.sh index cd21afdaca7..17232012e9d 100755 --- a/scripts/compatibility/fullnode-sync.sh +++ b/scripts/compatibility/fullnode-sync.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/scripts/compatibility/monitor_synced.py b/scripts/compatibility/monitor_synced.py index 325945bf8a9..7eb4906446a 100755 --- a/scripts/compatibility/monitor_synced.py +++ b/scripts/compatibility/monitor_synced.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/scripts/compatibility/split-cluster-check.sh b/scripts/compatibility/split-cluster-check.sh index 37ca1a15870..3299ef61225 100755 --- a/scripts/compatibility/split-cluster-check.sh +++ b/scripts/compatibility/split-cluster-check.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/scripts/dependency.py b/scripts/dependency.py index 5c81efb0f51..7c778ca278e 100644 --- a/scripts/dependency.py +++ b/scripts/dependency.py @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 @@ -11,6 +9,7 @@ ROOT = os.path.join(os.path.dirname(__file__), "../") PATTERN = None + def parse_args(): parser = argparse.ArgumentParser() parser.add_argument("--project", default="move") @@ -32,6 +31,7 @@ def parse_args(): upgrade_group.add_argument("--branch") return parser.parse_args() + def scan_file(file, process_line, depth=0): new_content = [] with open(file) as f: @@ -64,6 +64,7 @@ def try_match_line(line): return (name, extra) return None + def switch_to_local(project): default_path_map = { "move": "move/language", @@ -122,6 +123,7 @@ def process_line(line, depth): def upgrade_revision(project, repo, rev, branch): assert (args.rev is None) != (args.branch is None) + def process_line(line, _): m = try_match_line(line) if m: @@ -138,10 +140,11 @@ def process_line(line, _): args = parse_args() -assert(args.project == "move" or args.project == "narwhal") +assert (args.project == "move" or args.project == "narwhal") PATTERN = re.compile( - '(.+)={git="https://github.com/.+/' + args.project + '",(?:rev|branch)="[^"]+"(,.*)?}' + '(.+)={git="https://github.com/.+/' + + args.project + '",(?:rev|branch)="[^"]+"(,.*)?}' ) if args.command == "local": diff --git a/scripts/execution_layer.py b/scripts/execution_layer.py index 352258e840a..13db268328a 100755 --- a/scripts/execution_layer.py +++ b/scripts/execution_layer.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/scripts/generate-release-notes.sh b/scripts/generate-release-notes.sh index f9bf16ac2b0..d13b374aa50 100755 --- a/scripts/generate-release-notes.sh +++ b/scripts/generate-release-notes.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 # diff --git a/scripts/lldb_frame_sizes.py b/scripts/lldb_frame_sizes.py index 20823b04f88..51c4c8aba84 100644 --- a/scripts/lldb_frame_sizes.py +++ b/scripts/lldb_frame_sizes.py @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 @@ -17,11 +15,12 @@ # (lldb) command script import ./iota/scripts/lldb_frame_sizes # Loaded "frame-sizes" command. # (lldb) ... -# +# # Process XXXXX stopped # ... # (lldb) frame-sizes + def frame_sizes(debugger, command, result, internal_dict): """Estimates the sizes of stack frames in the current backtrace. @@ -59,6 +58,7 @@ def frame_sizes(debugger, command, result, internal_dict): file=result, ) + def __lldb_init_module(debugger, internal_dict): debugger.HandleCommand( 'command script add -f lldb_frame_sizes.frame_sizes frame-sizes', diff --git a/scripts/rename-to-iota/rename.py b/scripts/rename-to-iota/rename.py index bd3b850ad84..c39ce02d8c6 100755 --- a/scripts/rename-to-iota/rename.py +++ b/scripts/rename-to-iota/rename.py @@ -277,7 +277,7 @@ def main(): parser.add_argument('--path', '-p', help='The path of the folder to process, defaults to the main folder of the project if left out') parser.add_argument('--execute', action='store_true', default=False, help='Flag to execute the replacements, if omitted it will just be a dry-run') parser.add_argument('--respect-gitignore', action='store_true', default=True, help='Respect what is set in .gitignore to be ignored, defaults to True') - parser.add_argument('--skip-filemod', action='store_true', default=False, help='Skip file modifcation and only do the rename part') + parser.add_argument('--skip-filemod', action='store_true', default=False, help='Skip file modification and only do the rename part') parser.add_argument('--use-git-mv', action='store_true', default=False, help='Use git mv instead of a normal mv, for same repo modifications') args = parser.parse_args() diff --git a/scripts/rotate_snapshots.py b/scripts/rotate_snapshots.py index 0a891d64eab..51a497c9b4e 100755 --- a/scripts/rotate_snapshots.py +++ b/scripts/rotate_snapshots.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 @@ -30,12 +28,13 @@ def usage(): print( f' --dir= Base directory for iota. Must contain /snapshots and /instances dirs') print(' --help Print this help message') - + def is_referenced(root_dir, filepath): instances_dir = os.path.join(root_dir, 'instances') try: - result = subprocess.check_output(['find', '-L', instances_dir, '-samefile', filepath]) + result = subprocess.check_output( + ['find', '-L', instances_dir, '-samefile', filepath]) except subprocess.CalledProcessError as e: print(f'find command failed with error {e.returncode}: {e.output}') exit(1) @@ -63,21 +62,24 @@ def main(argv): elif opt == '--dir': root_dir = arg env = arg - + os.chdir(root_dir) snapshots_dir = os.path.join(root_dir, 'snapshots') contents = os.listdir(snapshots_dir) epoch_dirs = [path for path in contents if 'epoch_' in path] epochs = [int(epoch_dir.split('epoch_')[1]) for epoch_dir in epoch_dirs] latest_epoch = max(epochs) - paths_to_rotate = [epoch_dir for epoch_dir in epoch_dirs if str(latest_epoch) not in epoch_dir] + paths_to_rotate = [epoch_dir for epoch_dir in epoch_dirs if str( + latest_epoch) not in epoch_dir] for path in paths_to_rotate: snapshot_path = os.path.join(snapshots_dir, path) if not is_referenced(root_dir, snapshot_path): - print(f'Old snapshot at {snapshot_path} is not referenced by any running processes. Deleting...') + print( + f'Old snapshot at {snapshot_path} is not referenced by any running processes. Deleting...') shutil.rmtree(snapshot_path, ignore_errors=True) print('Finished rotating snapshots on host') exit(0) + if __name__ == "__main__": main(sys.argv[1:]) diff --git a/scripts/update_all_snapshots.sh b/scripts/update_all_snapshots.sh index 20bfda7b5fe..b8a39921c21 100755 --- a/scripts/update_all_snapshots.sh +++ b/scripts/update_all_snapshots.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 # diff --git a/scripts/update_fastcrypto.sh b/scripts/update_fastcrypto.sh index 8491008dc0c..342a525beb9 100755 --- a/scripts/update_fastcrypto.sh +++ b/scripts/update_fastcrypto.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/scripts/update_move.sh b/scripts/update_move.sh index b4f2303b9b3..2aafeb16105 100755 --- a/scripts/update_move.sh +++ b/scripts/update_move.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/scripts/update_narwhal.sh b/scripts/update_narwhal.sh index 803105f6207..30f5d7b0536 100755 --- a/scripts/update_narwhal.sh +++ b/scripts/update_narwhal.sh @@ -1,7 +1,5 @@ #!/bin/bash # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/bcs/CHANGELOG.md b/sdk/bcs/CHANGELOG.md index bce23578078..8cbfeb1e135 100644 --- a/sdk/bcs/CHANGELOG.md +++ b/sdk/bcs/CHANGELOG.md @@ -104,7 +104,7 @@ Similar approach applies to `bcs.ser()` and `bcs.de()` as well as to other register\* methods - a0955c479: Switch from 20 to 32-byte address. Match Secp256k1.deriveKeypair with Ed25519. -- 0a7b42a6d: This changes almost all occurences of "delegate", "delegation" (and various capitalizations/forms) to their equivalent "stake"-based name. Function names, function argument names, RPC endpoints, Move functions, and object fields have been updated with this new naming convention. +- 0a7b42a6d: This changes almost all occurrences of "delegate", "delegation" (and various capitalizations/forms) to their equivalent "stake"-based name. Function names, function argument names, RPC endpoints, Move functions, and object fields have been updated with this new naming convention. - 77bdf907f: When parsing u64, u128, and u256 values with bcs, they are now string encoded. ## 0.6.1 diff --git a/sdk/docs/package.json b/sdk/docs/package.json index 63be2bae1be..c38db00d033 100644 --- a/sdk/docs/package.json +++ b/sdk/docs/package.json @@ -25,7 +25,6 @@ "dependencies": { "@iota/bcs": "workspace:*", "@iota/dapp-kit": "workspace:*", - "@iota/enoki": "workspace:*", "@iota/graphql-transport": "workspace:*", "@iota/kiosk": "workspace:*", "@iota/iota.js": "workspace:*", diff --git a/sdk/docs/typedoc.json b/sdk/docs/typedoc.json index c72f3d28e1b..825c2463f9b 100644 --- a/sdk/docs/typedoc.json +++ b/sdk/docs/typedoc.json @@ -2,7 +2,6 @@ "entryPoints": [ "../bcs", "../dapp-kit", - "../enoki", "../graphql-transport", "../kiosk", "../typescript", diff --git a/sdk/enoki/.prettierignore b/sdk/enoki/.prettierignore deleted file mode 100644 index f44447b8ce9..00000000000 --- a/sdk/enoki/.prettierignore +++ /dev/null @@ -1,2 +0,0 @@ -CHANGELOG.md -dist/ diff --git a/sdk/enoki/CHANGELOG.md b/sdk/enoki/CHANGELOG.md deleted file mode 100644 index f6f5a2fcd4e..00000000000 --- a/sdk/enoki/CHANGELOG.md +++ /dev/null @@ -1,124 +0,0 @@ -# @iota/enoki - -## 0.2.1 - -### Patch Changes - -- Updated dependencies [6984dd1e38] - - @iota/iota.js@0.51.1 - - @iota/zklogin@0.5.1 - -## 0.2.0 - -### Minor Changes - -- 3b1da3967a: Add support for secret key authentication - -## 0.1.4 - -### Patch Changes - -- f704211291: Add EnokiClientError to expose error details -- Updated dependencies [0cafa94027] -- Updated dependencies [3a84c3ab21] - - @iota/iota.js@0.51.0 - - @iota/zklogin@0.5.0 - -## 0.1.3 - -### Patch Changes - -- 4830361fa4: Updated typescript version -- Updated dependencies [4830361fa4] - - @iota/iota.js@0.50.1 - - @iota/zklogin@0.4.3 - -## 0.1.2 - -### Patch Changes - -- 33752daf9c: Fix decoding of ephemeral keypair secret -- 4bf3e0060b: Update to latest Enoki API changes -- Updated dependencies [a34f1cb67d] -- Updated dependencies [c08e3569ef] -- Updated dependencies [9a14e61db4] -- Updated dependencies [13e922d9b1] -- Updated dependencies [a34f1cb67d] -- Updated dependencies [220a766d86] - - @iota/iota.js@0.50.0 - - @iota/zklogin@0.4.2 - -## 0.1.1 - -### Patch Changes - -- Updated dependencies [9ac0a4ec01] - - @iota/iota.js@0.49.1 - - @iota/zklogin@0.4.1 - -## 0.1.0 - -### Minor Changes - -- e5f9e3ba21: Replace tsup based build to fix issues with esm/cjs dual publishing - -### Patch Changes - -- Updated dependencies [e5f9e3ba21] - - @iota/iota.js@0.49.0 - - @iota/zklogin@0.4.0 - -## 0.0.8 - -### Patch Changes - -- Updated dependencies [dd362ec1d6] - - @iota/iota.js@0.48.1 - - @iota/zklogin@0.3.10 - -## 0.0.7 - -### Patch Changes - -- dd485449a7: Update to new two-step API -- Updated dependencies [cdcfa76c43] - - @iota/iota.js@0.48.0 - - @iota/zklogin@0.3.9 - -## 0.0.6 - -### Patch Changes - -- 0eb6fa61b: Hydrate the session on mount - -## 0.0.5 - -### Patch Changes - -- Updated dependencies [0e3d0dfae] - - @iota/zklogin@0.3.8 - -## 0.0.4 - -### Patch Changes - -- 732fdbb5b: Make enoki flow session observable. Expose state parameter on useAuthCallback. - -## 0.0.3 - -### Patch Changes - -- dfa523c77: Key storage off of the API key, and add APIs for transaction block sponsorship - -## 0.0.2 - -### Patch Changes - -- 180616bef: Rewrite the encryption layer -- 9ac7e2f3d: Introduce Enoki SDK -- Updated dependencies [194c980cb] -- Updated dependencies [9ac7e2f3d] -- Updated dependencies [0259aec82] -- Updated dependencies [64d45ba27] - - @iota/iota.js@0.47.0 - - @iota/zklogin@0.3.7 diff --git a/sdk/enoki/README.md b/sdk/enoki/README.md deleted file mode 100644 index 852ec11a000..00000000000 --- a/sdk/enoki/README.md +++ /dev/null @@ -1 +0,0 @@ -# `@iota/enoki` diff --git a/sdk/enoki/demo/App.tsx b/sdk/enoki/demo/App.tsx deleted file mode 100644 index 03fdd3656a2..00000000000 --- a/sdk/enoki/demo/App.tsx +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import { getFullnodeUrl, IotaClient } from '@iota/iota.js/client'; -import { TransactionBlock } from '@iota/iota.js/transactions'; -import { useState } from 'react'; - -import { useAuthCallback, useEnokiFlow, useZkLogin } from '../src/react.tsx'; - -export function App() { - const flow = useEnokiFlow(); - const zkLogin = useZkLogin(); - const [result, setResult] = useState(null); - - useAuthCallback(); - - return ( -
-
Address: {zkLogin.address}
-
Provider: {zkLogin.provider}
- {!zkLogin.address ? ( - - ) : ( - - )} - - {zkLogin.address && ( - - )} - - {result &&
{JSON.stringify(result)}
} -
- ); -} diff --git a/sdk/enoki/demo/index.html b/sdk/enoki/demo/index.html deleted file mode 100644 index afc05b723b0..00000000000 --- a/sdk/enoki/demo/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - -
- - - diff --git a/sdk/enoki/demo/main.tsx b/sdk/enoki/demo/main.tsx deleted file mode 100644 index 7f25a847b16..00000000000 --- a/sdk/enoki/demo/main.tsx +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import React from 'react'; -import ReactDOM from 'react-dom/client'; - -import { EnokiFlowProvider } from '../src/react.tsx'; -import { App } from './App.tsx'; - -ReactDOM.createRoot(document.getElementById('root')!).render( - - - {/* */} - - - , -); diff --git a/sdk/enoki/demo/tsconfig.json b/sdk/enoki/demo/tsconfig.json deleted file mode 100644 index af53f16b4b2..00000000000 --- a/sdk/enoki/demo/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "useDefineForClassFields": true, - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "module": "ESNext", - "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "react-jsx", - - /* Linting */ - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true - }, - "include": ["."], - "references": [{ "path": "../tsconfig.json" }, { "path": "../../typescript/" }] -} diff --git a/sdk/enoki/demo/vite.config.ts b/sdk/enoki/demo/vite.config.ts deleted file mode 100644 index eda96a7d2b2..00000000000 --- a/sdk/enoki/demo/vite.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import react from '@vitejs/plugin-react-swc'; -import { defineConfig } from 'vite'; - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [react()], -}); diff --git a/sdk/enoki/package.json b/sdk/enoki/package.json deleted file mode 100644 index c1afea46525..00000000000 --- a/sdk/enoki/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "@iota/enoki", - "version": "0.2.1", - "description": "TODO: Description", - "license": "Apache-2.0", - "author": "Mysten Labs ", - "type": "commonjs", - "main": "./dist/cjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/cjs/index.d.ts", - "exports": { - ".": { - "import": "./dist/esm/index.js", - "require": "./dist/cjs/index.js" - }, - "./react": { - "import": "./dist/esm/react.js", - "require": "./dist/cjs/react.js" - } - }, - "files": [ - "CHANGELOG.md", - "dist", - "react" - ], - "scripts": { - "clean": "rm -rf tsconfig.tsbuildinfo ./dist", - "build": "build-package", - "demo": "vite ./demo", - "prepublishOnly": "pnpm build", - "prettier:check": "prettier -c --ignore-unknown .", - "prettier:fix": "prettier -w --ignore-unknown .", - "eslint:check": "eslint --max-warnings=0 .", - "eslint:fix": "pnpm run eslint:check --fix", - "lint": "pnpm run eslint:check && pnpm run prettier:check", - "lint:fix": "pnpm run eslint:fix && pnpm run prettier:fix" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/iotaledger/iota.git" - }, - "bugs": { - "url": "https://github.com/iotaledger/iota/issues" - }, - "homepage": "https://github.com/iotaledger/iota#readme", - "devDependencies": { - "@iota/build-scripts": "workspace:*", - "@types/node": "^20.4.2", - "@types/react": "^18.2.15", - "@types/react-dom": "^18.2.7", - "@vitejs/plugin-react-swc": "^3.3.2", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "typescript": "^5.3.3", - "vite": "^4.4.4" - }, - "dependencies": { - "@iota/iota.js": "workspace:*", - "@iota/zklogin": "workspace:*", - "@nanostores/react": "^0.7.1", - "jose": "^5.2.3", - "nanostores": "^0.9.3" - }, - "peerDependencies": { - "@types/react": ">=17.0.0", - "react": ">=17.0.0" - }, - "peerDependenciesMeta": { - "react": { - "optional": true - }, - "@types/react": { - "optional": true - } - } -} diff --git a/sdk/enoki/react/package.json b/sdk/enoki/react/package.json deleted file mode 100644 index d41cd9d925e..00000000000 --- a/sdk/enoki/react/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "private": true, - "import": "../dist/esm/react.js", - "main": "../dist/cjs/react.js" -} diff --git a/sdk/enoki/src/EnokiClient/index.ts b/sdk/enoki/src/EnokiClient/index.ts deleted file mode 100644 index 21ffb31529f..00000000000 --- a/sdk/enoki/src/EnokiClient/index.ts +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import type { - CreateSponsoredTransactionBlockApiInput, - CreateSponsoredTransactionBlockApiResponse, - CreateZkLoginNonceApiInput, - CreateZkLoginNonceApiResponse, - CreateZkLoginZkpApiInput, - CreateZkLoginZkpApiResponse, - ExecuteSponsoredTransactionBlockApiInput, - ExecuteSponsoredTransactionBlockApiResponse, - GetAppApiInput, - GetAppApiResponse, - GetZkLoginApiInput, - GetZkLoginApiResponse, -} from './type.js'; - -const DEFAULT_API_URL = 'https://api.enoki.mystenlabs.com'; -const ZKLOGIN_HEADER = 'zklogin-jwt'; - -export interface EnokiClientConfig { - /** The API key for the Enoki app, available in the Enoki Portal. */ - apiKey: string; - - /** The API URL for Enoki. In most cases, this should not be set. */ - apiUrl?: string; -} - -export class EnokiClientError extends Error { - errors: { code: string; message: string; data: unknown }[] = []; - - constructor(status: number, response: string) { - let errors; - try { - const parsedResponse = JSON.parse(response) as { - errors: { code: string; message: string; data: unknown }[]; - }; - errors = parsedResponse.errors; - } catch (e) { - // Ignore - } - const cause = errors?.[0] ? new Error(errors[0].message) : undefined; - super(`Request to Enoki API failed (status: ${status})`, { - cause, - }); - this.errors = errors ?? []; - this.name = 'EnokiClientError'; - } -} - -/** - * A low-level client for interacting with the Enoki API. - */ -export class EnokiClient { - #version: string; - #apiUrl: string; - #apiKey: string; - - constructor(config: EnokiClientConfig) { - this.#version = 'v1'; - this.#apiUrl = config.apiUrl ?? DEFAULT_API_URL; - this.#apiKey = config.apiKey; - } - - getApp(_input?: GetAppApiInput) { - return this.#fetch('app', { - method: 'GET', - }); - } - - getZkLogin(input: GetZkLoginApiInput) { - return this.#fetch('zklogin', { - method: 'GET', - headers: { - [ZKLOGIN_HEADER]: input.jwt, - }, - }); - } - - createZkLoginNonce(input: CreateZkLoginNonceApiInput) { - return this.#fetch('zklogin/nonce', { - method: 'POST', - body: JSON.stringify({ - network: input.network, - ephemeralPublicKey: input.ephemeralPublicKey.toIotaPublicKey(), - additionalEpochs: input.additionalEpochs, - }), - }); - } - - createZkLoginZkp(input: CreateZkLoginZkpApiInput) { - return this.#fetch('zklogin/zkp', { - method: 'POST', - headers: { - [ZKLOGIN_HEADER]: input.jwt, - }, - body: JSON.stringify({ - network: input.network, - ephemeralPublicKey: input.ephemeralPublicKey.toIotaPublicKey(), - maxEpoch: input.maxEpoch, - randomness: input.randomness, - }), - }); - } - - createSponsoredTransactionBlock(input: CreateSponsoredTransactionBlockApiInput) { - return this.#fetch( - 'transaction-blocks/sponsor', - { - method: 'POST', - headers: input.jwt - ? { - [ZKLOGIN_HEADER]: input.jwt, - } - : {}, - body: JSON.stringify({ - sender: input.sender, - network: input.network, - transactionBlockKindBytes: input.transactionBlockKindBytes, - allowedAddresses: input.allowedAddresses, - allowedMoveCallTargets: input.allowedMoveCallTargets, - }), - }, - ); - } - - executeSponsoredTransactionBlock(input: ExecuteSponsoredTransactionBlockApiInput) { - return this.#fetch( - `transaction-blocks/sponsor/${input.digest}`, - { - method: 'POST', - body: JSON.stringify({ - signature: input.signature, - }), - }, - ); - } - - async #fetch(path: string, init: RequestInit): Promise { - const res = await fetch(`${this.#apiUrl}/${this.#version}/${path}`, { - ...init, - headers: { - ...init.headers, - Authorization: `Bearer ${this.#apiKey}`, - 'Content-Type': 'application/json', - 'Request-Id': crypto.randomUUID(), - }, - }); - - if (!res.ok) { - throw new EnokiClientError(res.status, await res.text()); - } - - const { data } = await res.json(); - - return data as T; - } -} diff --git a/sdk/enoki/src/EnokiClient/type.ts b/sdk/enoki/src/EnokiClient/type.ts deleted file mode 100644 index 0bfc748e991..00000000000 --- a/sdk/enoki/src/EnokiClient/type.ts +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import type { PublicKey } from '@iota/iota.js/cryptography'; -import type { ZkLoginSignatureInputs } from '@iota/iota.js/zklogin'; - -import type { AuthProvider } from '../EnokiFlow.js'; - -export type EnokiNetwork = 'mainnet' | 'testnet' | 'devnet'; - -export interface GetAppApiInput {} -export interface GetAppApiResponse { - authenticationProviders: { - providerType: AuthProvider; - clientId: string; - }[]; -} - -export interface GetZkLoginApiInput { - jwt: string; -} -export interface GetZkLoginApiResponse { - address: string; - salt: string; -} - -export interface CreateZkLoginNonceApiInput { - network?: EnokiNetwork; - ephemeralPublicKey: PublicKey; - additionalEpochs?: number; -} -export interface CreateZkLoginNonceApiResponse { - nonce: string; - randomness: string; - epoch: number; - maxEpoch: number; - estimatedExpiration: number; -} - -export interface CreateZkLoginZkpApiInput { - network?: EnokiNetwork; - jwt: string; - ephemeralPublicKey: PublicKey; - randomness: string; - maxEpoch: number; -} -export interface CreateZkLoginZkpApiResponse extends ZkLoginSignatureInputs {} - -export type CreateSponsoredTransactionBlockApiInput = { - network?: EnokiNetwork; - transactionBlockKindBytes: string; -} & ( - | { - jwt: string; - sender?: never; - allowedAddresses?: never; - allowedMoveCallTargets?: never; - } - | { - sender: string; - allowedAddresses?: string[]; - allowedMoveCallTargets?: string[]; - jwt?: never; - } -); - -export interface CreateSponsoredTransactionBlockApiResponse { - bytes: string; - digest: string; -} - -export interface ExecuteSponsoredTransactionBlockApiInput { - digest: string; - signature: string; -} - -export interface ExecuteSponsoredTransactionBlockApiResponse { - digest: string; -} diff --git a/sdk/enoki/src/EnokiFlow.ts b/sdk/enoki/src/EnokiFlow.ts deleted file mode 100644 index e9f4577cf31..00000000000 --- a/sdk/enoki/src/EnokiFlow.ts +++ /dev/null @@ -1,391 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import type { IotaClient } from '@iota/iota.js/client'; -import { decodeIotaPrivateKey } from '@iota/iota.js/cryptography'; -import { Ed25519Keypair } from '@iota/iota.js/keypairs/ed25519'; -import type { TransactionBlock } from '@iota/iota.js/transactions'; -import { fromB64, toB64 } from '@iota/iota.js/utils'; -import type { ZkLoginSignatureInputs } from '@iota/iota.js/zklogin'; -import { decodeJwt } from 'jose'; -import type { WritableAtom } from 'nanostores'; -import { atom, onMount, onSet } from 'nanostores'; - -import type { Encryption } from './encryption.js'; -import { createDefaultEncryption } from './encryption.js'; -import type { EnokiClientConfig } from './EnokiClient/index.js'; -import { EnokiClient } from './EnokiClient/index.js'; -import { EnokiKeypair } from './EnokiKeypair.js'; -import type { SyncStore } from './stores.js'; -import { createSessionStorage } from './stores.js'; - -export interface EnokiFlowConfig extends EnokiClientConfig { - /** - * The storage interface to persist Enoki data locally. - * If not provided, it will use a sessionStorage-backed store. - */ - store?: SyncStore; - /** - * The encryption interface that will be used to encrypt data before storing it locally. - * If not provided, it will use a default encryption interface. - */ - encryption?: Encryption; -} - -// State that is not bound to a session, and is encrypted. -export interface ZkLoginState { - provider?: AuthProvider; - address?: string; - salt?: string; -} - -// State that session-bound, and is encrypted in storage. -export interface ZkLoginSession { - ephemeralKeyPair: string; - maxEpoch: number; - randomness: string; - expiresAt: number; - - jwt?: string; - proof?: ZkLoginSignatureInputs; -} - -export type AuthProvider = 'google' | 'facebook' | 'twitch'; - -const createStorageKeys = (apiKey: string) => ({ - STATE: `@enoki/flow/state/${apiKey}`, - SESSION: `@enoki/flow/session/${apiKey}`, -}); - -export class EnokiFlow { - #storageKeys: { STATE: string; SESSION: string }; - #enokiClient: EnokiClient; - #encryption: Encryption; - #encryptionKey: string; - #store: SyncStore; - - $zkLoginSession: WritableAtom<{ initialized: boolean; value: ZkLoginSession | null }>; - $zkLoginState: WritableAtom; - - constructor(config: EnokiFlowConfig) { - this.#enokiClient = new EnokiClient({ - apiKey: config.apiKey, - apiUrl: config.apiUrl, - }); - this.#encryptionKey = config.apiKey; - this.#encryption = config.encryption ?? createDefaultEncryption(); - this.#store = config.store ?? createSessionStorage(); - this.#storageKeys = createStorageKeys(config.apiKey); - - let storedState = null; - try { - const rawStoredValue = this.#store.get(this.#storageKeys.STATE); - if (rawStoredValue) { - storedState = JSON.parse(rawStoredValue); - } - } catch { - // Ignore errors - } - - this.$zkLoginState = atom(storedState || {}); - this.$zkLoginSession = atom({ initialized: false, value: null }); - - // Hydrate the session on mount: - onMount(this.$zkLoginSession, () => { - this.getSession(); - }); - - onSet(this.$zkLoginState, ({ newValue }) => { - this.#store.set(this.#storageKeys.STATE, JSON.stringify(newValue)); - }); - } - - get enokiClient() { - return this.#enokiClient; - } - - async createAuthorizationURL(input: { - provider: AuthProvider; - clientId: string; - redirectUrl: string; - extraParams?: Record; - }) { - const ephemeralKeyPair = new Ed25519Keypair(); - const { nonce, randomness, maxEpoch, estimatedExpiration } = - await this.#enokiClient.createZkLoginNonce({ - ephemeralPublicKey: ephemeralKeyPair.getPublicKey(), - }); - - const params = new URLSearchParams({ - ...input.extraParams, - nonce, - client_id: input.clientId, - redirect_uri: input.redirectUrl, - response_type: 'id_token', - // TODO: Eventually fetch the scopes for this client ID from the Enoki service: - scope: [ - 'openid', - // Merge the requested scopes in with the required openid scopes: - ...(input.extraParams && 'scope' in input.extraParams - ? (input.extraParams.scope as string[]) - : []), - ] - .filter(Boolean) - .join(' '), - }); - - let oauthUrl: string; - switch (input.provider) { - case 'google': { - oauthUrl = `https://accounts.google.com/o/oauth2/v2/auth?${params}`; - break; - } - - case 'facebook': { - oauthUrl = `https://www.facebook.com/v17.0/dialog/oauth?${params}`; - break; - } - - case 'twitch': { - params.set('force_verify', 'true'); - oauthUrl = `https://id.twitch.tv/oauth2/authorize?${params}`; - break; - } - - default: - throw new Error(`Invalid provider: ${input.provider}`); - } - - this.$zkLoginState.set({ provider: input.provider }); - await this.#setSession({ - expiresAt: estimatedExpiration, - maxEpoch, - randomness, - ephemeralKeyPair: toB64( - decodeIotaPrivateKey(ephemeralKeyPair.getSecretKey()).secretKey, - ), - }); - - return oauthUrl; - } - - // TODO: Should our SDK manage this automatically in addition to exposing a method? - async handleAuthCallback(hash: string = window.location.hash) { - const params = new URLSearchParams(hash.startsWith('#') ? hash.slice(1) : hash); - - // Before we handle the auth redirect and get the state, we need to restore it: - const zkp = await this.getSession(); - - if (!zkp || !zkp.ephemeralKeyPair || !zkp.maxEpoch || !zkp.randomness) { - throw new Error( - 'Start of sign-in flow could not be found. Ensure you have started the sign-in flow before calling this.', - ); - } - - const jwt = params.get('id_token'); - if (!jwt) { - throw new Error('Missing ID Token'); - } - - const decodedJwt = decodeJwt(jwt); - if (!decodedJwt.sub || !decodedJwt.aud || typeof decodedJwt.aud !== 'string') { - throw new Error('Missing JWT data'); - } - - const { address, salt } = await this.#enokiClient.getZkLogin({ jwt }); - - this.$zkLoginState.set({ - ...this.$zkLoginState.get(), - salt, - address, - }); - await this.#setSession({ - ...zkp, - jwt, - }); - - return params.get('state'); - } - - async #setSession(newValue: ZkLoginSession | null) { - if (newValue) { - const storedValue = await this.#encryption.encrypt( - this.#encryptionKey, - JSON.stringify(newValue), - ); - - this.#store.set(this.#storageKeys.SESSION, storedValue); - } else { - this.#store.delete(this.#storageKeys.SESSION); - } - - this.$zkLoginSession.set({ initialized: true, value: newValue }); - } - - async getSession() { - if (this.$zkLoginSession.get().initialized) { - return this.$zkLoginSession.get().value; - } - - try { - const storedValue = this.#store.get(this.#storageKeys.SESSION); - if (!storedValue) return null; - - const state: ZkLoginSession = JSON.parse( - await this.#encryption.decrypt(this.#encryptionKey, storedValue), - ); - - // TODO: Rather than having expiration act as a logout, we should keep the state that still is relevant, - // and just clear out the expired session, but keep the other zkLogin state. - if (state?.expiresAt && Date.now() > state.expiresAt) { - await this.logout(); - } else { - this.$zkLoginSession.set({ initialized: true, value: state }); - } - } catch { - this.$zkLoginSession.set({ initialized: true, value: null }); - } - - return this.$zkLoginSession.get().value; - } - - async logout() { - this.$zkLoginState.set({}); - this.#store.delete(this.#storageKeys.STATE); - - await this.#setSession(null); - } - - // TODO: Should this return the proof if it already exists? - async getProof() { - const zkp = await this.getSession(); - const { salt } = this.$zkLoginState.get(); - - if (zkp?.proof) { - if (zkp.expiresAt && Date.now() > zkp.expiresAt) { - throw new Error('Stored proof is expired.'); - } - - return zkp.proof; - } - - if (!salt || !zkp || !zkp.jwt) { - throw new Error('Missing required parameters for proof generation'); - } - - const ephemeralKeyPair = Ed25519Keypair.fromSecretKey(fromB64(zkp.ephemeralKeyPair)); - - const proof = await this.#enokiClient.createZkLoginZkp({ - jwt: zkp.jwt, - maxEpoch: zkp.maxEpoch, - randomness: zkp.randomness, - ephemeralPublicKey: ephemeralKeyPair.getPublicKey(), - }); - - await this.#setSession({ - ...zkp, - proof, - }); - - return proof; - } - - async getKeypair() { - // Get the proof, so that we ensure it exists in state: - await this.getProof(); - - const zkp = await this.getSession(); - - // Check to see if we have the essentials for a keypair: - const { address } = this.$zkLoginState.get(); - if (!address || !zkp || !zkp.proof) { - throw new Error('Missing required data for keypair generation.'); - } - - if (Date.now() > zkp.expiresAt) { - throw new Error('Stored proof is expired.'); - } - - return new EnokiKeypair({ - address, - maxEpoch: zkp.maxEpoch, - proof: zkp.proof, - ephemeralKeypair: Ed25519Keypair.fromSecretKey(fromB64(zkp.ephemeralKeyPair)), - }); - } - - async sponsorTransactionBlock({ - network, - transactionBlock, - client, - }: { - network?: 'mainnet' | 'testnet'; - transactionBlock: TransactionBlock; - client: IotaClient; - }) { - const session = await this.getSession(); - - if (!session || !session.jwt) { - throw new Error('Missing required data for sponsorship.'); - } - - const transactionBlockKindBytes = await transactionBlock.build({ - onlyTransactionKind: true, - client, - // Theses limits will get verified during the final transaction construction, so we can safely ignore them here: - limits: { - maxGasObjects: Infinity, - maxPureArgumentSize: Infinity, - maxTxGas: Infinity, - maxTxSizeBytes: Infinity, - }, - }); - - return await this.#enokiClient.createSponsoredTransactionBlock({ - jwt: session.jwt, - network, - transactionBlockKindBytes: toB64(transactionBlockKindBytes), - }); - } - - async executeTransactionBlock({ - bytes, - digest, - client, - }: { - bytes: string; - digest: string; - client: IotaClient; - }) { - const keypair = await this.getKeypair(); - const userSignature = await keypair.signTransactionBlock(fromB64(bytes)); - - await this.#enokiClient.executeSponsoredTransactionBlock({ - digest, - signature: userSignature.signature, - }); - - // TODO: Should the parent just do this? - await client.waitForTransactionBlock({ digest }); - - return { digest }; - } - - async sponsorAndExecuteTransactionBlock({ - network, - transactionBlock, - client, - }: { - network?: 'mainnet' | 'testnet'; - transactionBlock: TransactionBlock; - client: IotaClient; - }) { - const { bytes, digest } = await this.sponsorTransactionBlock({ - network, - transactionBlock, - client, - }); - return await this.executeTransactionBlock({ bytes, digest, client }); - } -} diff --git a/sdk/enoki/src/EnokiKeypair.ts b/sdk/enoki/src/EnokiKeypair.ts deleted file mode 100644 index a85c82e0023..00000000000 --- a/sdk/enoki/src/EnokiKeypair.ts +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import type { SignatureWithBytes } from '@iota/iota.js/cryptography'; -import { Keypair, PublicKey, SIGNATURE_SCHEME_TO_FLAG } from '@iota/iota.js/cryptography'; -import type { Ed25519Keypair, Ed25519PublicKey } from '@iota/iota.js/keypairs/ed25519'; -import type { ZkLoginSignatureInputs } from '@iota/iota.js/zklogin'; -import { getZkLoginSignature } from '@iota/zklogin'; - -export class EnokiPublicKey extends PublicKey { - #address: string; - #ephemeralPublicKey: Ed25519PublicKey; - - constructor(input: { address: string; ephemeralPublicKey: Ed25519PublicKey }) { - super(); - this.#address = input.address; - this.#ephemeralPublicKey = input.ephemeralPublicKey; - } - - flag(): number { - return SIGNATURE_SCHEME_TO_FLAG['ZkLogin']; - } - - toIotaAddress(): string { - return this.#address; - } - - verify(): never { - throw new Error('Verification for EnokiPublicKey is not supported'); - } - - toRawBytes(): Uint8Array { - return this.#ephemeralPublicKey.toRawBytes(); - } -} - -export class EnokiKeypair extends Keypair { - #proof: ZkLoginSignatureInputs; - #maxEpoch: number; - #ephemeralKeypair: Ed25519Keypair; - #publicKey: EnokiPublicKey; - - constructor(input: { - address: string; - maxEpoch: number; - proof: ZkLoginSignatureInputs; - ephemeralKeypair: Ed25519Keypair; - }) { - super(); - this.#proof = input.proof; - this.#maxEpoch = input.maxEpoch; - this.#ephemeralKeypair = input.ephemeralKeypair; - this.#publicKey = new EnokiPublicKey({ - address: input.address, - ephemeralPublicKey: input.ephemeralKeypair.getPublicKey(), - }); - } - - signData(data: Uint8Array) { - return this.#ephemeralKeypair.signData(data); - } - - async sign(data: Uint8Array) { - return this.#ephemeralKeypair.sign(data); - } - - signPersonalMessage(): never { - throw new Error('Signing personal messages is not supported'); - } - - async signTransactionBlock(bytes: Uint8Array): Promise { - const { bytes: signedBytes, signature: userSignature } = - await this.#ephemeralKeypair.signTransactionBlock(bytes); - - const zkSignature = getZkLoginSignature({ - inputs: this.#proof, - maxEpoch: this.#maxEpoch, - userSignature, - }); - - return { - bytes: signedBytes, - signature: zkSignature, - }; - } - - getKeyScheme() { - return this.#ephemeralKeypair.getKeyScheme(); - } - - getPublicKey() { - return this.#publicKey; - } - - export(): never { - throw new Error('EnokiKeypair does not support exporting'); - } - - getSecretKey(): never { - throw new Error('EnokiKeypair does not support get secret key'); - } -} diff --git a/sdk/enoki/src/encryption.ts b/sdk/enoki/src/encryption.ts deleted file mode 100644 index 4f6d84aba8f..00000000000 --- a/sdk/enoki/src/encryption.ts +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import { fromB64, toB64 } from '@iota/iota.js/utils'; - -/** - * An interface - */ -export interface Encryption { - encrypt(password: string, data: string): Promise; - decrypt(password: string, data: string): Promise; -} - -/** - * Create the default encryption interface, which uses the browsers built-in crypto primitives. - */ -export function createDefaultEncryption(): Encryption { - type EncryptedJSON = { - payload: string; - iv: string; - salt: string; - }; - - async function keyFromPassword(password: string, salt: Uint8Array) { - const key = await crypto.subtle.importKey( - 'raw', - new TextEncoder().encode(password), - { name: 'PBKDF2' }, - false, - ['deriveBits', 'deriveKey'], - ); - - const derivedKey = await crypto.subtle.deriveKey( - { - name: 'PBKDF2', - salt, - iterations: 900_000, - hash: 'SHA-256', - }, - key, - { name: 'AES-GCM', length: 256 }, - false, - ['encrypt', 'decrypt'], - ); - - return { key, derivedKey }; - } - - return { - async encrypt(password, data) { - const salt = crypto.getRandomValues(new Uint8Array(16)); - const iv = crypto.getRandomValues(new Uint8Array(12)); - - const { derivedKey } = await keyFromPassword(password, salt); - - const payload = await crypto.subtle.encrypt( - { - name: 'AES-GCM', - iv, - }, - derivedKey, - new TextEncoder().encode(data), - ); - - return JSON.stringify({ - payload: toB64(new Uint8Array(payload)), - iv: toB64(iv), - salt: toB64(salt), - } satisfies EncryptedJSON); - }, - async decrypt(password, data) { - const parsed = JSON.parse(data) as EncryptedJSON; - if (!parsed.payload || !parsed.iv || !parsed.salt) { - throw new Error('Invalid encrypted data'); - } - - const { derivedKey } = await keyFromPassword(password, fromB64(parsed.salt)); - - const decryptedContent = await crypto.subtle.decrypt( - { - name: 'AES-GCM', - iv: fromB64(parsed.iv), - }, - derivedKey, - fromB64(parsed.payload), - ); - - return new TextDecoder().decode(decryptedContent); - }, - }; -} - -/** - * Create a passthrough encryption interface, which does not encrypt or decrypt data. - */ -export function createPassthroughEncryption(): Encryption { - return { - async encrypt(_password, data) { - return data; - }, - async decrypt(_password, data) { - return data; - }, - }; -} diff --git a/sdk/enoki/src/index.ts b/sdk/enoki/src/index.ts deleted file mode 100644 index f3fb10e3f3d..00000000000 --- a/sdk/enoki/src/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -export { EnokiClient, type EnokiClientConfig } from './EnokiClient/index.js'; -export { EnokiFlow, type AuthProvider, type EnokiFlowConfig } from './EnokiFlow.js'; -export { - createLocalStorage, - createSessionStorage, - createInMemoryStorage, - type SyncStore, -} from './stores.js'; -export { createDefaultEncryption, type Encryption } from './encryption.js'; -export { EnokiKeypair, EnokiPublicKey } from './EnokiKeypair.js'; diff --git a/sdk/enoki/src/react.tsx b/sdk/enoki/src/react.tsx deleted file mode 100644 index a2f041fa57a..00000000000 --- a/sdk/enoki/src/react.tsx +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import { useStore } from '@nanostores/react'; -import type { ReactNode } from 'react'; -import { createContext, useContext, useEffect, useState } from 'react'; - -import type { EnokiFlowConfig } from './EnokiFlow.js'; -import { EnokiFlow } from './EnokiFlow.js'; - -const EnokiFlowContext = createContext(null); - -export interface EnokiFlowProviderProps extends EnokiFlowConfig { - children: ReactNode; -} - -export function EnokiFlowProvider({ children, ...config }: EnokiFlowProviderProps) { - const [enokiFlow] = useState(() => new EnokiFlow(config)); - return {children}; -} - -export function useEnokiFlow() { - const context = useContext(EnokiFlowContext); - if (!context) { - throw new Error('Missing `EnokiFlowContext` provider'); - } - return context; -} - -export function useZkLogin() { - const flow = useEnokiFlow(); - return useStore(flow.$zkLoginState); -} - -export function useZkLoginSession() { - const flow = useEnokiFlow(); - return useStore(flow.$zkLoginSession).value; -} - -export function useAuthCallback() { - const flow = useEnokiFlow(); - const [state, setState] = useState(null); - const [handled, setHandled] = useState(false); - const [hash, setHash] = useState(null); - - useEffect(() => { - const listener = () => setHash(window.location.hash.slice(1).trim()); - listener(); - - window.addEventListener('hashchange', listener); - return () => window.removeEventListener('hashchange', listener); - }, []); - - useEffect(() => { - if (!hash) return; - - (async () => { - try { - setState(await flow.handleAuthCallback(hash)); - - window.location.hash = ''; - } finally { - setHandled(true); - } - })(); - }, [hash, flow]); - - return { handled, state }; -} diff --git a/sdk/enoki/src/stores.ts b/sdk/enoki/src/stores.ts deleted file mode 100644 index 3f29ab1ae76..00000000000 --- a/sdk/enoki/src/stores.ts +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -/** - * An sync key-value store. - */ -export interface SyncStore { - get(key: string): string | null; - set(key: string, value: string): void; - delete(key: string): void; -} - -function createWebStorage(storage: Storage): SyncStore { - return { - get(key: string) { - return storage.getItem(key); - }, - set(key: string, value: string) { - storage.setItem(key, value); - }, - delete(key: string) { - storage.removeItem(key); - }, - }; -} - -/** - * Create a storage interface backed by memory. - * This is generally useful for server-side rendering, and test environments. - */ -export function createInMemoryStorage(): SyncStore { - const store = new Map(); - return { - get(key) { - return store.get(key) ?? null; - }, - set(key, value) { - store.set(key, value); - }, - delete(key) { - store.delete(key); - }, - }; -} - -/** - * Create a store backed by `localStorage`. - */ -export function createLocalStorage(): SyncStore { - if (typeof window === 'undefined') { - console.warn('`window.localStorage` is not available, falling back to in-memory storage'); - return createInMemoryStorage(); - } - - return createWebStorage(window.localStorage); -} - -/** - * Create a store backed by `sessionStorage`. - */ -export function createSessionStorage(): SyncStore { - if (typeof window === 'undefined') { - console.warn('`window.sessionStorage` is not available, falling back to in-memory storage'); - return createInMemoryStorage(); - } - - return createWebStorage(window.sessionStorage); -} diff --git a/sdk/enoki/tsconfig.esm.json b/sdk/enoki/tsconfig.esm.json deleted file mode 100644 index df141cc11d4..00000000000 --- a/sdk/enoki/tsconfig.esm.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "ESNext", - "outDir": "dist/esm" - } -} diff --git a/sdk/enoki/tsconfig.json b/sdk/enoki/tsconfig.json deleted file mode 100644 index a17fccb1b23..00000000000 --- a/sdk/enoki/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../build-scripts/tsconfig.shared.json", - "include": ["src"], - "compilerOptions": { - "module": "CommonJS", - "outDir": "dist/cjs", - "isolatedModules": true, - "jsx": "react-jsx", - "rootDir": "src" - }, - "references": [{ "path": "../typescript" }, { "path": "../zklogin" }] -} diff --git a/sdk/enoki/typedoc.json b/sdk/enoki/typedoc.json deleted file mode 100644 index a58ce5a936e..00000000000 --- a/sdk/enoki/typedoc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "entryPoints": ["src"], - "excludeInternal": true, - "excludePrivate": true, - "intentionallyNotExported": [] -} diff --git a/sdk/graphql-transport/src/queries/checkpoint.graphql b/sdk/graphql-transport/src/queries/checkpoint.graphql index e7c478f0a48..2c8d0c0fbed 100644 --- a/sdk/graphql-transport/src/queries/checkpoint.graphql +++ b/sdk/graphql-transport/src/queries/checkpoint.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/devInspectTransactionBlock.graphql b/sdk/graphql-transport/src/queries/devInspectTransactionBlock.graphql index 2b5c1ad6392..d53a49fb43d 100644 --- a/sdk/graphql-transport/src/queries/devInspectTransactionBlock.graphql +++ b/sdk/graphql-transport/src/queries/devInspectTransactionBlock.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/dryRunTransactionBlock.graphql b/sdk/graphql-transport/src/queries/dryRunTransactionBlock.graphql index 9ddede5c47b..f4bd11086e4 100644 --- a/sdk/graphql-transport/src/queries/dryRunTransactionBlock.graphql +++ b/sdk/graphql-transport/src/queries/dryRunTransactionBlock.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/executeTransactionBlock.graphql b/sdk/graphql-transport/src/queries/executeTransactionBlock.graphql index bfb4606e760..119f6b077ee 100644 --- a/sdk/graphql-transport/src/queries/executeTransactionBlock.graphql +++ b/sdk/graphql-transport/src/queries/executeTransactionBlock.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getAllBalances.graphql b/sdk/graphql-transport/src/queries/getAllBalances.graphql index ba9f402c7e7..962a064a96c 100644 --- a/sdk/graphql-transport/src/queries/getAllBalances.graphql +++ b/sdk/graphql-transport/src/queries/getAllBalances.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getBalance.graphql b/sdk/graphql-transport/src/queries/getBalance.graphql index 9d207129c62..4835e0525c0 100644 --- a/sdk/graphql-transport/src/queries/getBalance.graphql +++ b/sdk/graphql-transport/src/queries/getBalance.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getChainIdentifier.graphql b/sdk/graphql-transport/src/queries/getChainIdentifier.graphql index 6c343a46094..ff046721bdf 100644 --- a/sdk/graphql-transport/src/queries/getChainIdentifier.graphql +++ b/sdk/graphql-transport/src/queries/getChainIdentifier.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getCoinMetadata.graphql b/sdk/graphql-transport/src/queries/getCoinMetadata.graphql index 50ed39e5603..7bd73111aec 100644 --- a/sdk/graphql-transport/src/queries/getCoinMetadata.graphql +++ b/sdk/graphql-transport/src/queries/getCoinMetadata.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getCoins.graphql b/sdk/graphql-transport/src/queries/getCoins.graphql index fd64bcfe3a5..d1dffea0db0 100644 --- a/sdk/graphql-transport/src/queries/getCoins.graphql +++ b/sdk/graphql-transport/src/queries/getCoins.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getCommitteeInfo.graphql b/sdk/graphql-transport/src/queries/getCommitteeInfo.graphql index 641670dc7d8..a74a2f87873 100644 --- a/sdk/graphql-transport/src/queries/getCommitteeInfo.graphql +++ b/sdk/graphql-transport/src/queries/getCommitteeInfo.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getCurrentEpoch.graphql b/sdk/graphql-transport/src/queries/getCurrentEpoch.graphql index 3684315faf1..7b516d40edc 100644 --- a/sdk/graphql-transport/src/queries/getCurrentEpoch.graphql +++ b/sdk/graphql-transport/src/queries/getCurrentEpoch.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getDynamicFieldObject.graphql b/sdk/graphql-transport/src/queries/getDynamicFieldObject.graphql index e472cf4f3fa..ab5f0ab9837 100644 --- a/sdk/graphql-transport/src/queries/getDynamicFieldObject.graphql +++ b/sdk/graphql-transport/src/queries/getDynamicFieldObject.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getDynamicFields.graphql b/sdk/graphql-transport/src/queries/getDynamicFields.graphql index a3656566c23..8a15b7380ba 100644 --- a/sdk/graphql-transport/src/queries/getDynamicFields.graphql +++ b/sdk/graphql-transport/src/queries/getDynamicFields.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getLatestCheckpointSequenceNumber.graphql b/sdk/graphql-transport/src/queries/getLatestCheckpointSequenceNumber.graphql index 3bc049a15e4..0c4d402bf10 100644 --- a/sdk/graphql-transport/src/queries/getLatestCheckpointSequenceNumber.graphql +++ b/sdk/graphql-transport/src/queries/getLatestCheckpointSequenceNumber.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getLatestIotaSystemState.graphql b/sdk/graphql-transport/src/queries/getLatestIotaSystemState.graphql index 63caa110da0..4e4be9b88aa 100644 --- a/sdk/graphql-transport/src/queries/getLatestIotaSystemState.graphql +++ b/sdk/graphql-transport/src/queries/getLatestIotaSystemState.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getMoveFunctionArgTypes.graphql b/sdk/graphql-transport/src/queries/getMoveFunctionArgTypes.graphql index 75e292aecb4..92776076eec 100644 --- a/sdk/graphql-transport/src/queries/getMoveFunctionArgTypes.graphql +++ b/sdk/graphql-transport/src/queries/getMoveFunctionArgTypes.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getNormalizedMoveFunction.graphql b/sdk/graphql-transport/src/queries/getNormalizedMoveFunction.graphql index 4d31a75daaa..c2890985b07 100644 --- a/sdk/graphql-transport/src/queries/getNormalizedMoveFunction.graphql +++ b/sdk/graphql-transport/src/queries/getNormalizedMoveFunction.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getNormalizedMoveModule.graphql b/sdk/graphql-transport/src/queries/getNormalizedMoveModule.graphql index 26d0a99cf84..9decb9e50d8 100644 --- a/sdk/graphql-transport/src/queries/getNormalizedMoveModule.graphql +++ b/sdk/graphql-transport/src/queries/getNormalizedMoveModule.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getNormalizedMoveModulesByPackage.graphql b/sdk/graphql-transport/src/queries/getNormalizedMoveModulesByPackage.graphql index 57f0c17f452..9a10fb69256 100644 --- a/sdk/graphql-transport/src/queries/getNormalizedMoveModulesByPackage.graphql +++ b/sdk/graphql-transport/src/queries/getNormalizedMoveModulesByPackage.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getNormalizedMoveStruct.graphql b/sdk/graphql-transport/src/queries/getNormalizedMoveStruct.graphql index 75ae077136d..867f6ac3313 100644 --- a/sdk/graphql-transport/src/queries/getNormalizedMoveStruct.graphql +++ b/sdk/graphql-transport/src/queries/getNormalizedMoveStruct.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getProtocolConfig.graphql b/sdk/graphql-transport/src/queries/getProtocolConfig.graphql index 75242a6d745..b560647f424 100644 --- a/sdk/graphql-transport/src/queries/getProtocolConfig.graphql +++ b/sdk/graphql-transport/src/queries/getProtocolConfig.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getReferenceGasPrice.graphql b/sdk/graphql-transport/src/queries/getReferenceGasPrice.graphql index 31a822416ad..91f7b3927dd 100644 --- a/sdk/graphql-transport/src/queries/getReferenceGasPrice.graphql +++ b/sdk/graphql-transport/src/queries/getReferenceGasPrice.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getTotalSupply.graphql b/sdk/graphql-transport/src/queries/getTotalSupply.graphql index 034fd477f97..8e4ad646cef 100644 --- a/sdk/graphql-transport/src/queries/getTotalSupply.graphql +++ b/sdk/graphql-transport/src/queries/getTotalSupply.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getTotalTransactionBlocks.graphql b/sdk/graphql-transport/src/queries/getTotalTransactionBlocks.graphql index 8e222333eab..2717e6322fb 100644 --- a/sdk/graphql-transport/src/queries/getTotalTransactionBlocks.graphql +++ b/sdk/graphql-transport/src/queries/getTotalTransactionBlocks.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/getValidatorsApy.graphql b/sdk/graphql-transport/src/queries/getValidatorsApy.graphql index d7348e67195..caa3f3e8f40 100644 --- a/sdk/graphql-transport/src/queries/getValidatorsApy.graphql +++ b/sdk/graphql-transport/src/queries/getValidatorsApy.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/nameService.graphql b/sdk/graphql-transport/src/queries/nameService.graphql index 3237330da59..ebd7234f1c1 100644 --- a/sdk/graphql-transport/src/queries/nameService.graphql +++ b/sdk/graphql-transport/src/queries/nameService.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/objects.graphql b/sdk/graphql-transport/src/queries/objects.graphql index 83029f220e4..7a75406f855 100644 --- a/sdk/graphql-transport/src/queries/objects.graphql +++ b/sdk/graphql-transport/src/queries/objects.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/queryEvents.graphql b/sdk/graphql-transport/src/queries/queryEvents.graphql index 000ab590e32..366e1108fb9 100644 --- a/sdk/graphql-transport/src/queries/queryEvents.graphql +++ b/sdk/graphql-transport/src/queries/queryEvents.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/stakes.graphql b/sdk/graphql-transport/src/queries/stakes.graphql index aeb42f8e395..18251bd711c 100644 --- a/sdk/graphql-transport/src/queries/stakes.graphql +++ b/sdk/graphql-transport/src/queries/stakes.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/graphql-transport/src/queries/transactions.graphql b/sdk/graphql-transport/src/queries/transactions.graphql index f97c8fad92c..0b0e22ec67b 100644 --- a/sdk/graphql-transport/src/queries/transactions.graphql +++ b/sdk/graphql-transport/src/queries/transactions.graphql @@ -1,6 +1,4 @@ # Copyright (c) Mysten Labs, Inc. -# SPDX-License-Identifier: Apache-2.0 - # Modifications Copyright (c) 2024 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 diff --git a/sdk/ledgerjs-hw-app-iota/CHANGELOG.md b/sdk/ledgerjs-hw-app-iota/CHANGELOG.md index 7cb22055774..dcb03d12d6e 100644 --- a/sdk/ledgerjs-hw-app-iota/CHANGELOG.md +++ b/sdk/ledgerjs-hw-app-iota/CHANGELOG.md @@ -23,5 +23,5 @@ ### Minor Changes - a6690ac7d: Changed the default behavior of `publish` to publish an upgreadeable-by-sender package instead of immutable. -- 0a7b42a6d: This changes almost all occurences of "delegate", "delegation" (and various capitalizations/forms) to their equivalent "stake"-based name. Function names, function argument names, RPC endpoints, Move functions, and object fields have been updated with this new naming convention. +- 0a7b42a6d: This changes almost all occurrences of "delegate", "delegation" (and various capitalizations/forms) to their equivalent "stake"-based name. Function names, function argument names, RPC endpoints, Move functions, and object fields have been updated with this new naming convention. - 3709957cf: Published initial version of library diff --git a/sdk/move-bytecode-template/Cargo.lock b/sdk/move-bytecode-template/Cargo.lock index a682fedca38..bb9e50dc2dd 100644 --- a/sdk/move-bytecode-template/Cargo.lock +++ b/sdk/move-bytecode-template/Cargo.lock @@ -684,9 +684,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -694,9 +694,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", @@ -709,9 +709,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -719,9 +719,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", @@ -732,9 +732,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "winnow" diff --git a/sdk/move-bytecode-template/Cargo.toml b/sdk/move-bytecode-template/Cargo.toml index b06d2fe3f58..752f67ed1dd 100644 --- a/sdk/move-bytecode-template/Cargo.toml +++ b/sdk/move-bytecode-template/Cargo.toml @@ -15,7 +15,7 @@ move-core-types = { path = "../../external-crates/move/crates/move-core-types", serde = { version = "1.0.124", default-features = false } serde-wasm-bindgen = "0.5.0" serde_json = "1.0.64" -wasm-bindgen = "0.2.62" +wasm-bindgen = "0.2.92" [lib] crate-type = ["cdylib"] diff --git a/sdk/typescript/CHANGELOG.md b/sdk/typescript/CHANGELOG.md index 73a8e538685..d93d49f680a 100644 --- a/sdk/typescript/CHANGELOG.md +++ b/sdk/typescript/CHANGELOG.md @@ -178,7 +178,7 @@ - Added pure helpers (`txb.pure.address()`, `txb.bool()`, and `txb.pure.u{8-256}()`) to simplify serialization of pure values - Deprecated using `txb.pure` with raw JavaScript values, or an explicit type argument. -- 1bc430161: Updated BCS defintions to use new BCS schema builder +- 1bc430161: Updated BCS definitions to use new BCS schema builder ### Patch Changes @@ -534,7 +534,7 @@ - a0955c479: Switch from 20 to 32-byte address. Match Secp256k1.deriveKeypair with Ed25519. - 0c9047698: Remove all gas selection APIs from the json rpc provider. - d5ef1b6e5: Added dependencies to publish command, dependencies now also returned from the iota move CLI with the `--dump-bytecode-as-base64` flag -- 0a7b42a6d: This changes almost all occurences of "delegate", "delegation" (and various capitalizations/forms) to their equivalent "stake"-based name. Function names, function argument names, RPC endpoints, Move functions, and object fields have been updated with this new naming convention. +- 0a7b42a6d: This changes almost all occurrences of "delegate", "delegation" (and various capitalizations/forms) to their equivalent "stake"-based name. Function names, function argument names, RPC endpoints, Move functions, and object fields have been updated with this new naming convention. - 3de8de361: Remove `getValidators` API. Use `getLatestIotaSystemState` instead. - dd348cf03: Refactor `getTransactions` to `queryTransactions` - 57c17e02a: Removed `JsonRpcProviderWithCache`, use `JsonRpcProvider` instead. @@ -543,7 +543,7 @@ - fe335e6ba: Removed usage of `cross-fetch` in the TypeScript SDK. If you are running in an environment that does not have `fetch` defined, you will need to polyfill it. - 5dc25faad: Remove getTransactionDigestsInRange from the SDK - 64234baaf: added combined `getCheckpoint` endpoint for retrieving information about a checkpoint -- d3170ba41: All JSON-RPC APIs now accept objects instead of positional arugments. +- d3170ba41: All JSON-RPC APIs now accept objects instead of positional arguments. - a6ffb8088: Removed events from transaction effects, TransactionEvents will now be provided in the TransactionResponse, along side TransactionEffects. - 3304eb83b: Refactor Rust IotaTransactionBlockKind to be internally tagged for Json serialization with tag="type" and IotaEvent to be adjacently tagged with tag="type" and content="content" - 4189171ef: Adds support for validator candidate. @@ -704,7 +704,7 @@ - renames `newTransferTx` function from framework Coin to `newPayTransaction`. Also it's now a public method and without the need of signer so a dapp can use it - fixes edge cases with pay txs - bb14ffdc5: Remove ImmediateReturn and WaitForTxCert from ExecuteTransactionRequestType -- d2015f815: Rebuilt type-narrowing utilties (e.g. `isIotaObject`) on top of Superstruct, which should make them more reliable. +- d2015f815: Rebuilt type-narrowing utilities (e.g. `isIotaObject`) on top of Superstruct, which should make them more reliable. The type-narrowing functions are no longer exported, instead a Superstruct schema is exported, in addition to an `is` and `assert` function, both of which can be used to replace the previous narrowing functions. For example, `isIotaObject(data)` becomes `is(data, IotaObject)`. - 7d0f25b61: Add devInspectTransaction, which is similar to dryRunTransaction, but lets you call any Move function(including non-entry function) with arbitrary values. diff --git a/sdk/typescript/src/transactions/__tests__/Transaction.test.ts b/sdk/typescript/src/transactions/__tests__/Transaction.test.ts index ab1f1730734..0b9688c4689 100644 --- a/sdk/typescript/src/transactions/__tests__/Transaction.test.ts +++ b/sdk/typescript/src/transactions/__tests__/Transaction.test.ts @@ -9,7 +9,7 @@ import { bcs } from '../../bcs/index.js'; import { TransactionBlock, Transactions } from '../index.js'; import { Inputs } from '../Inputs.js'; -it('can construct and serialize an empty tranaction', () => { +it('can construct and serialize an empty transaction', () => { const tx = new TransactionBlock(); expect(() => tx.serialize()).not.toThrow(); }); diff --git a/sdk/wallet-standard/CHANGELOG.md b/sdk/wallet-standard/CHANGELOG.md index 4671f448413..e3d9784512c 100644 --- a/sdk/wallet-standard/CHANGELOG.md +++ b/sdk/wallet-standard/CHANGELOG.md @@ -366,7 +366,7 @@ - 3d9a04648: Adds `deactivation_epoch` to staking pool object, and adds `inactive_pools` to the validator set object. - da72e73a9: Change the address of Move package for staking and validator related Move modules. - 0672b5990: The Wallet Standard now only supports the `Transaction` type, instead of the previous `SignableTransaction` type. -- 0a7b42a6d: This changes almost all occurences of "delegate", "delegation" (and various capitalizations/forms) to their equivalent "stake"-based name. Function names, function argument names, RPC endpoints, Move functions, and object fields have been updated with this new naming convention. +- 0a7b42a6d: This changes almost all occurrences of "delegate", "delegation" (and various capitalizations/forms) to their equivalent "stake"-based name. Function names, function argument names, RPC endpoints, Move functions, and object fields have been updated with this new naming convention. - c718deef4: wallet-standard: changes iota:signAndExecuteTransaction and iota:signTransaction features to support account and chain options wallet-adapter-wallet-standard: change signAndExecuteTransaction and signTransaction signatures to support account and chain options wallet-adapter-wallet-standard: ensure version compatibility for of the wallet signAndExecuteTransaction and signTransaction features before using them (same major version)