Skip to content

Commit

Permalink
chore: rename FastX -> Sui
Browse files Browse the repository at this point in the history
  • Loading branch information
huitseeker committed Feb 25, 2022
1 parent 0a66ffe commit fd22a12
Show file tree
Hide file tree
Showing 57 changed files with 151 additions and 151 deletions.
6 changes: 3 additions & 3 deletions doc/move.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ more about them in the Move
if immediately interested):

```rust
module FastX::GAS {
module Sui::GAS {
...
}
```

As we can see, when defining a module we specify the module name
(`GAS`), preceded by the name of the package where this module resides
(`FastX`). The combination of the package name and the module name
(`Sui`). The combination of the package name and the module name
is used to uniquely identify a module in Move source code (e.g., to be
able to use if from other modules) - the package name is globally
unique, but different packages can contain modules with the same name.
Expand All @@ -106,7 +106,7 @@ framework packages this address is assigned in the manifest file:

```
[addresses]
FastX = "0x2"
Sui = "0x2"
```

### First look at Move function definition
Expand Down
2 changes: 1 addition & 1 deletion doc/wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ one-by-one:
- `--package` - ID of the package object where the module containing
the function is located (please
[remember](#a-quick-look-at-the-gas-module) that the ID of the
genesis FastX package containing the GAS module is defined in its
genesis Sui package containing the GAS module is defined in its
manifest file, and is equal to 0x2)
- `object-args` - a list of arguments of Sui object type (in this case
there is only one representing the `c` parameter of the `transfer`
Expand Down
4 changes: 2 additions & 2 deletions sui/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use sui::shell::{AsyncHandler, CommandStructure, Shell};
use sui::wallet_commands::*;
use tracing::error;

const FAST_X: &str = " _____ _ _ __ ____ __
const SUI: &str = " _____ _ _ __ ____ __
/ ___/__ __(_) | | / /___ _/ / /__ / /_
\\__ \\/ / / / / | | /| / / __ `/ / / _ \\/ __/
___/ / /_/ / / | |/ |/ / /_/ / / / __/ /_
Expand Down Expand Up @@ -70,7 +70,7 @@ async fn main() -> Result<(), anyhow::Error> {

if !options.no_shell {
let app: App = WalletCommands::clap();
println!("{}", FAST_X.cyan().bold());
println!("{}", SUI.cyan().bold());
print!("--- Sui");
app.write_long_version(&mut io::stdout())?;
println!(" ---");
Expand Down
2 changes: 1 addition & 1 deletion sui/src/wallet_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub enum WalletCommands {
/// Pure arguments to the functions, which conform to move_core_types::transaction_argument
/// Special case formatting rules:
/// Use one string with CSV token embedded, for example "54u8,0x43"
/// When specifying FastX addresses, specify as vector. Example x\"01FE4E6F9F57935C5150A486B5B78AC2B94E2C5CD9352C132691D99B3E8E095C\"
/// When specifying Sui addresses, specify as vector. Example x\"01FE4E6F9F57935C5150A486B5B78AC2B94E2C5CD9352C132691D99B3E8E095C\"
#[structopt(long, parse(try_from_str = parse_transaction_argument))]
pure_args: Vec<TransactionArgument>,
/// ID of the gas object for gas payment, in 20 bytes Hex string
Expand Down
2 changes: 1 addition & 1 deletion sui_core/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pub struct ClientState<A> {
// Operations are considered successful when they successfully reach a quorum of authorities.
#[async_trait]
pub trait Client {
/// Send object to a FastX account.
/// Send object to a Sui account.
async fn transfer_object(
&mut self,
object_id: ObjectID,
Expand Down
2 changes: 1 addition & 1 deletion sui_core/src/unit_tests/authority_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,7 @@ async fn test_hero() {
let player_gas_object_ref = player_gas_object.to_object_reference();
let authority = init_state_with_objects(vec![admin_gas_object, player_gas_object]).await;

// 3. Publish the Hero modules to FastX.
// 3. Publish the Hero modules to Sui.
let all_module_bytes = modules
.iter()
.map(|m| {
Expand Down
2 changes: 1 addition & 1 deletion sui_programmability/adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "sui-adapter"
version = "0.1.0"
authors = ["Mysten Labs <[email protected]>"]
description = "Adapter and accompanying CLI for local fastX development"
description = "Adapter and accompanying CLI for local sui development"
license = "Apache-2.0"
publish = false
edition = "2021"
Expand Down
14 changes: 7 additions & 7 deletions sui_programmability/adapter/src/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ fn execute_internal<
// we already checked that the function had no return types in resolve_and_type_check--it should
// also not return any values at runtime
debug_assert!(return_values.is_empty());
// FastX Move programs should never touch global state, so ChangeSet should be empty
// Sui Move programs should never touch global state, so ChangeSet should be empty
debug_assert!(change_set.accounts().is_empty());
// Input ref parameters we put in should be the same number we get out, plus one for the &mut TxContext
debug_assert!(mutable_ref_objects.len() + 1 == mutable_ref_values.len());
Expand Down Expand Up @@ -366,7 +366,7 @@ pub fn publish<E: Debug, S: ResourceResolver<Error = E> + ModuleResolver<Error =

/// Given a list of `modules`, links each module against its
/// dependencies and runs each module with both the Move VM verifier
/// and the FastX verifier.
/// and the Sui verifier.
pub fn verify_and_link<
E: Debug,
S: ResourceResolver<Error = E> + ModuleResolver<Error = E> + Storage,
Expand All @@ -377,7 +377,7 @@ pub fn verify_and_link<
natives: NativeFunctionTable,
) -> Result<MoveVM, SuiError> {
// Run the Move bytecode verifier and linker.
// It is important to do this before running the FastX verifier, since the fastX
// It is important to do this before running the Sui verifier, since the sui
// verifier may assume well-formedness conditions enforced by the Move verifier hold
let vm = MoveVM::new(natives)
.expect("VM creation only fails if natives are invalid, and we created the natives");
Expand Down Expand Up @@ -405,9 +405,9 @@ pub fn verify_and_link<
error: e.to_string(),
})?;

// run the FastX verifier
// run the Sui verifier
for module in modules.iter() {
// Run FastX bytecode verifier, which runs some additional checks that assume the Move bytecode verifier has passed.
// Run Sui bytecode verifier, which runs some additional checks that assume the Move bytecode verifier has passed.
verifier::verify_module(module)?;
}
Ok(vm)
Expand Down Expand Up @@ -541,8 +541,8 @@ fn process_successful_execution<
}

// any object left in `by_value_objects` is an input passed by value that was not transferred or frozen.
// this means that either the object was (1) deleted from the FastX system altogether, or
// (2) wrapped inside another object that is in the FastX object pool
// this means that either the object was (1) deleted from the Sui system altogether, or
// (2) wrapped inside another object that is in the Sui object pool
// in either case, we want to delete it
let mut gas_refund: u64 = 0;
for (id, object) in by_value_objects.iter() {
Expand Down
2 changes: 1 addition & 1 deletion sui_programmability/adapter/src/bytecode_rewriter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl ModuleHandleRewriter {
// also check this later, but it's easier to understand what's going on if we raise the alarm
// here.
// TODO: if we wanted to, we could support rewriting the tables to eliminate duplicates,
// but this is more involved + will never happen in FastX's usage of the rewriter
// but this is more involved + will never happen in Sui's usage of the rewriter
// (modulo hash collisions in ID generation).
#[cfg(debug_assertions)]
{
Expand Down
2 changes: 1 addition & 1 deletion sui_programmability/adapter/src/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub fn clone_genesis_modules() -> Vec<Object> {
genesis.objects.clone()
}

/// Create and return objects wrapping the genesis modules for fastX
/// Create and return objects wrapping the genesis modules for sui
fn create_genesis_module_objects(lib_dir: &Path) -> SuiResult<Genesis> {
let sui_modules = sui_framework::get_sui_framework_modules(lib_dir)?;
let std_modules =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl ResourceResolver for InMemoryStorage {
_address: &AccountAddress,
_struct_tag: &StructTag,
) -> Result<Option<Vec<u8>>, Self::Error> {
unreachable!("Should never be called in FastX")
unreachable!("Should never be called in Sui")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Test = "0x0"

[dependencies]
MoveStdlib = { local = "../../../../../framework/deps/move-stdlib/" }
FastX = { local = "../../../../../framework" }
Sui = { local = "../../../../../framework" }
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Test::M1 {
use FastX::ID::VersionedID;
use FastX::TxContext::{Self, TxContext};
use FastX::Transfer;
use Sui::ID::VersionedID;
use Sui::TxContext::{Self, TxContext};
use Sui::Transfer;

struct Object has key, store {
id: VersionedID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Test = "0x0"

[dependencies]
MoveStdlib = { local = "../../../../../framework/deps/move-stdlib/" }
FastX = { local = "../../../../../framework" }
Sui = { local = "../../../../../framework" }
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Test::M1 {
use FastX::ID::VersionedID;
use FastX::TxContext::{Self, TxContext};
use FastX::Transfer;
use Sui::ID::VersionedID;
use Sui::TxContext::{Self, TxContext};
use Sui::Transfer;

struct Object has key, store {
id: VersionedID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Test = "0x0"

[dependencies]
MoveStdlib = { local = "../../../../../framework/deps/move-stdlib/" }
FastX = { local = "../../../../../framework" }
Sui = { local = "../../../../../framework" }
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Test::M1 {
use FastX::ID::VersionedID;
use FastX::TxContext::{Self, TxContext};
use FastX::Transfer;
use Sui::ID::VersionedID;
use Sui::TxContext::{Self, TxContext};
use Sui::Transfer;

struct Object has key, store {
id: VersionedID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Test = "0x0"

[dependencies]
MoveStdlib = { local = "../../../../../framework/deps/move-stdlib/" }
FastX = { local = "../../../../../framework" }
Sui = { local = "../../../../../framework" }
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Test::M1 {
use FastX::ID::VersionedID;
use FastX::TxContext::{Self, TxContext};
use FastX::Transfer;
use Sui::ID::VersionedID;
use Sui::TxContext::{Self, TxContext};
use Sui::Transfer;

struct Object has key, store {
id: VersionedID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Test = "0x0"

[dependencies]
MoveStdlib = { local = "../../../../../framework/deps/move-stdlib/" }
FastX = { local = "../../../../../framework" }
Sui = { local = "../../../../../framework" }



Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module Test::M1 {
use FastX::ID::VersionedID;
use FastX::TxContext::{Self, TxContext};
use FastX::Transfer;
use FastX::Coin::Coin;
use Sui::ID::VersionedID;
use Sui::TxContext::{Self, TxContext};
use Sui::Transfer;
use Sui::Coin::Coin;

struct Object has key, store {
id: VersionedID,
Expand Down
2 changes: 1 addition & 1 deletion sui_programmability/examples/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "Examples"
version = "0.0.1"

[dependencies]
FastX = { local = "../framework" }
Sui = { local = "../framework" }

[addresses]
Examples = "0x0"
Expand Down
8 changes: 4 additions & 4 deletions sui_programmability/examples/sources/CombinableObjects.move
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/// new objects
module Examples::CombinableObjects {
use Examples::TrustedCoin::EXAMPLE;
use FastX::Coin::{Self, Coin};
use FastX::ID::{Self, VersionedID};
use FastX::Transfer;
use FastX::TxContext::{Self, TxContext};
use Sui::Coin::{Self, Coin};
use Sui::ID::{Self, VersionedID};
use Sui::Transfer;
use Sui::TxContext::{Self, TxContext};

struct Ham has key {
id: VersionedID
Expand Down
16 changes: 8 additions & 8 deletions sui_programmability/examples/sources/CustomObjectTemplate.move
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/// An example of a custom object with comments explaining the relevant bits
module Examples::CustomObjectTemplate {
use FastX::ID::VersionedID;
use FastX::Transfer;
use FastX::TxContext::{Self, TxContext};
use Sui::ID::VersionedID;
use Sui::Transfer;
use Sui::TxContext::{Self, TxContext};

/// A custom fastX object. Every object must have the `key` attribute
/// (indicating that it is allowed to be a key in the fastX global object
/// pool), and must have a field `id: ID` corresponding to its fastX ObjId.
/// A custom sui object. Every object must have the `key` attribute
/// (indicating that it is allowed to be a key in the sui global object
/// pool), and must have a field `id: ID` corresponding to its sui ObjId.
/// Other object attributes present at the protocol level (authenticator,
/// sequence number, TxDigest, ...) are intentionally not exposed here.
struct Object has key {
Expand Down Expand Up @@ -65,14 +65,14 @@ module Examples::CustomObjectTemplate {
}
}

/// Example of an entrypoint function to be embedded in a FastX
/// Example of an entrypoint function to be embedded in a Sui
/// transaction. The first argument of an entrypoint is always a
/// special `TxContext` created by the runtime that is useful for deriving
/// new id's or determining the sender of the transaction.
/// After the `TxContext`, entrypoints can take struct types with the `key`
/// attribute as input, as well as primitive types like ints, bools, ...
///
/// A FastX transaction must declare the ID's of each object it will
/// A Sui transaction must declare the ID's of each object it will
/// access + any primitive inputs. The runtime that processes the
/// transaction fetches the values associated with the ID's, type-checks
/// the values + primitive inputs against the function signature of the
Expand Down
8 changes: 4 additions & 4 deletions sui_programmability/examples/sources/EconMod.move
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
module Examples::EconMod {
use Examples::HeroMod::{Self, SeaMonster, RUM};
use Examples::Hero::Hero;
use FastX::Coin::{Self, Coin};
use FastX::ID::{Self, VersionedID};
use FastX::Transfer;
use FastX::TxContext::{Self, TxContext};
use Sui::Coin::{Self, Coin};
use Sui::ID::{Self, VersionedID};
use Sui::Transfer;
use Sui::TxContext::{Self, TxContext};

/// Created by `monster_owner`, a player with a monster that's too strong
/// for them to slay + transferred to a player who can slay the monster.
Expand Down
16 changes: 8 additions & 8 deletions sui_programmability/examples/sources/Hero.move
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
/// associated logic.
module Examples::Hero {
use Examples::TrustedCoin::EXAMPLE;
use FastX::Coin::{Self, Coin};
use FastX::Event;
use FastX::ID::{Self, VersionedID, IDBytes};
use FastX::Math;
use FastX::Transfer;
use FastX::TxContext::{Self, TxContext};
use Sui::Coin::{Self, Coin};
use Sui::Event;
use Sui::ID::{Self, VersionedID, IDBytes};
use Sui::Math;
use Sui::Transfer;
use Sui::TxContext::{Self, TxContext};
use Std::Option::{Self, Option};

/// Our hero!
Expand Down Expand Up @@ -294,8 +294,8 @@ module Examples::Hero {
#[test]
public fun slay_boar_test() {
use Examples::TrustedCoin::{Self, EXAMPLE};
use FastX::Coin::{Self, TreasuryCap};
use FastX::TestScenario;
use Sui::Coin::{Self, TreasuryCap};
use Sui::TestScenario;

let admin = ADMIN;
let player = @0x0;
Expand Down
8 changes: 4 additions & 4 deletions sui_programmability/examples/sources/HeroMod.move
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
/// anyone is free to create a mod like this.
module Examples::HeroMod {
use Examples::Hero::{Self, Hero};
use FastX::ID::{Self, VersionedID};
use FastX::Coin::{Self, Coin, TreasuryCap };
use FastX::Transfer;
use FastX::TxContext::{Self, TxContext};
use Sui::ID::{Self, VersionedID};
use Sui::Coin::{Self, Coin, TreasuryCap };
use Sui::Transfer;
use Sui::TxContext::{Self, TxContext};

/// A new kind of monster for the hero to fight
struct SeaMonster has key, store {
Expand Down
8 changes: 4 additions & 4 deletions sui_programmability/examples/sources/TicTacToe.move
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ module Examples::TicTacToe {
use Std::Option::{Self, Option};
use Std::Vector;

use FastX::ID::{Self, VersionedID, IDBytes};
use FastX::Event;
use FastX::Transfer;
use FastX::TxContext::{Self, TxContext};
use Sui::ID::{Self, VersionedID, IDBytes};
use Sui::Event;
use Sui::Transfer;
use Sui::TxContext::{Self, TxContext};

// Game status
const IN_PROGRESS: u8 = 0;
Expand Down
Loading

0 comments on commit fd22a12

Please sign in to comment.