Skip to content

Commit

Permalink
rename: fix capitalization (Iota to IOTA) (#4812)
Browse files Browse the repository at this point in the history
* rename: fix capitalization (`Iota` to `IOTA`)

* rename: `a IOTA` to `an IOTA`

* rename: undo some changes, because they refer to the name in the source code

* fix: rustfmt

* fix: Rename `IOTA-xxx` to `iota-xxx`

* update: iota-rust-sdk version to fix generated specs

* fix: small cleanups

* fix: Another `A IOTA` to `An IOTA` round
  • Loading branch information
muXxer authored Jan 16, 2025
1 parent c12831d commit cdc9a4c
Show file tree
Hide file tree
Showing 449 changed files with 1,028 additions and 1,027 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_rust_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,6 @@ jobs:
cargo nextest run --no-fail-fast --test-threads 8 --package iota-graphql-e2e-tests --features pg_integration
cargo nextest run --no-fail-fast --test-threads 1 --package iota-cluster-test --test local_cluster_test --features pg_integration
cargo nextest run --no-fail-fast --test-threads 1 --package iota-indexer --test ingestion_tests --features pg_integration
# Iota-indexer's RPC tests, which depend on a shared runtime, are incompatible with nextest due to its process-per-test execution model.
# iota-indexer's RPC tests, which depend on a shared runtime, are incompatible with nextest due to its process-per-test execution model.
# cargo test, on the other hand, allows tests to share state and resources by default.
cargo test --profile simulator --package iota-indexer --test rpc-tests --features shared_test_runtime
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ iota-rosetta = { path = "crates/iota-rosetta" }
iota-rpc-loadgen = { path = "crates/iota-rpc-loadgen" }
iota-sdk = { path = "crates/iota-sdk" }
# core-types with json format for REST API
iota-sdk2 = { package = "iota-rust-sdk", git = "https://github.com/iotaledger/iota-rust-sdk.git", rev = "d605da95029e74376f0f39a95526bb1a5c0ebd7a", features = ["hash", "serde", "schemars"] }
iota-sdk2 = { package = "iota-rust-sdk", git = "https://github.com/iotaledger/iota-rust-sdk.git", rev = "2ba6b293bdede769a1d9b4d1aecaede2ff7682dd", features = ["hash", "serde", "schemars"] }
iota-simulator = { path = "crates/iota-simulator" }
iota-snapshot = { path = "crates/iota-snapshot" }
iota-source-validation = { path = "crates/iota-source-validation" }
Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/src/components/validator/ValidatorStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function ValidatorStats({
tooltipText={
!tallyingScore
? 'Coming soon'
: 'A score created by validators to assess each other’s performance during Iota’s standard operations.'
: 'A score created by validators to assess each other’s performance during IOTA’s standard operations.'
}
tooltipPosition={TooltipPosition.Right}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function TransactionCard({ txn, address }: TransactionCardProps) {
recognizedPackagesList,
});

// we only show IOTA Transfer amount or the first non-Iota transfer amount
// we only show IOTA Transfer amount or the first non-IOTA transfer amount
// Get the balance changes for the transaction and the amount
const balanceChanges = getBalanceChangeSummary(txn, recognizedPackagesList);
const [formatAmount, symbol] = useFormatCoin(
Expand Down
6 changes: 3 additions & 3 deletions bridge/evm/contracts/BridgeConfig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "./interfaces/IBridgeConfig.sol";

/// @title BridgeConfig
/// @notice This contract manages a registry of supported tokens and supported chain IDs for the IotaBridge.
/// It also provides functions to convert token amounts to Iota decimal adjusted amounts and vice versa.
/// It also provides functions to convert token amounts to IOTA decimal adjusted amounts and vice versa.
contract BridgeConfig is IBridgeConfig, CommitteeUpgradeable {
/* ========== STATE VARIABLES ========== */

Expand Down Expand Up @@ -166,11 +166,11 @@ contract BridgeConfig is IBridgeConfig, CommitteeUpgradeable {
bool native
) private {
require(tokenAddress != address(0), "BridgeConfig: Invalid token address");
require(iotaDecimal > 0, "BridgeConfig: Invalid Iota decimal");
require(iotaDecimal > 0, "BridgeConfig: Invalid IOTA decimal");
require(tokenPrice > 0, "BridgeConfig: Invalid token price");

uint8 erc20Decimals = IERC20Metadata(tokenAddress).decimals();
require(erc20Decimals >= iotaDecimal, "BridgeConfig: Invalid Iota decimal");
require(erc20Decimals >= iotaDecimal, "BridgeConfig: Invalid IOTA decimal");

supportedTokens[tokenID] = Token(tokenAddress, iotaDecimal, native);
tokenPrices[tokenID] = tokenPrice;
Expand Down
4 changes: 2 additions & 2 deletions bridge/evm/contracts/IotaBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import "./interfaces/IWETH9.sol";
/// @title IotaBridge
/// @notice This contract implements a token bridge that enables users to deposit and withdraw
/// supported tokens to and from other chains. The bridge supports the transfer of Ethereum and ERC20
/// tokens. Bridge operations are managed by a committee of Iota validators that are responsible
/// tokens. Bridge operations are managed by a committee of IOTA validators that are responsible
/// for verifying and processing bridge messages. The bridge is designed to be upgradeable and
/// can be paused in case of an emergency. The bridge also enforces limits on the amount of
/// assets that can be withdrawn to prevent abuse.
Expand Down Expand Up @@ -131,7 +131,7 @@ contract IotaBridge is IIotaBridge, CommitteeUpgradeable, PausableUpgradeable {
/// have approved this contract to transfer the given token.
/// @param tokenID The ID of the token to be bridged.
/// @param amount The amount of tokens to be bridged.
/// @param recipientAddress The address on the Iota chain where the tokens will be sent.
/// @param recipientAddress The address on the IOTA chain where the tokens will be sent.
/// @param destinationChainID The ID of the destination chain.
function bridgeERC20(
uint8 tokenID,
Expand Down
4 changes: 2 additions & 2 deletions bridge/evm/contracts/interfaces/IIotaBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
pragma solidity ^0.8.20;

/// @title IIotaBridge
/// @dev Interface for the Iota Bridge contract.
/// @dev Interface for the IOTA Bridge contract.
interface IIotaBridge {
/// @notice Emitted when tokens are deposited to be bridged.
/// @param sourceChainID The ID of the source chain (this chain).
/// @param nonce The nonce of the transaction on source chain.
/// @param destinationChainID The ID of the destination chain.
/// @param tokenID The code of the token.
/// @param iotaAdjustedAmount The amount of tokens to transfer, adjusted for Iota decimals.
/// @param iotaAdjustedAmount The amount of tokens to transfer, adjusted for IOTA decimals.
/// @param senderAddress The address of the sender.
/// @param recipientAddress The address of the sender.
event TokensDeposited(
Expand Down
22 changes: 11 additions & 11 deletions bridge/evm/contracts/utils/BridgeUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pragma solidity ^0.8.20;

/// @title BridgeUtils
/// @notice This library defines the message format and constants for the Iota native bridge. It also
/// @notice This library defines the message format and constants for the IOTA native bridge. It also
/// provides functions to encode and decode bridge messages and their payloads.
/// @dev This library only utilizes internal functions to enable upgradeability via the OpenZeppelin
/// UUPS proxy pattern (external libraries are not supported).
Expand Down Expand Up @@ -118,11 +118,11 @@ library BridgeUtils {
}
}

/// @notice Converts the provided token amount to the Iota decimal adjusted amount.
/// @notice Converts the provided token amount to the IOTA decimal adjusted amount.
/// @param erc20Decimal The erc20 decimal value for the token.
/// @param iotaDecimal The iota decimal value for the token.
/// @param amount The ERC20 amount of the tokens to convert to Iota.
/// @return Iota converted amount.
/// @param amount The ERC20 amount of the tokens to convert to IOTA.
/// @return IOTA converted amount.
function convertERC20ToIotaDecimal(uint8 erc20Decimal, uint8 iotaDecimal, uint256 amount)
internal
pure
Expand All @@ -136,7 +136,7 @@ library BridgeUtils {
return uint64(amount);
}

require(erc20Decimal > iotaDecimal, "BridgeUtils: Invalid Iota decimal");
require(erc20Decimal > iotaDecimal, "BridgeUtils: Invalid IOTA decimal");

// Difference in decimal places
uint256 factor = 10 ** (erc20Decimal - iotaDecimal);
Expand All @@ -151,10 +151,10 @@ library BridgeUtils {
return uint64(amount);
}

/// @notice Converts the provided Iota decimal adjusted amount to the ERC20 token amount.
/// @notice Converts the provided IOTA decimal adjusted amount to the ERC20 token amount.
/// @param erc20Decimal The erc20 decimal value for the token.
/// @param iotaDecimal The iota decimal value for the token.
/// @param amount The Iota amount of the tokens to convert to ERC20.
/// @param amount The IOTA amount of the tokens to convert to ERC20.
/// @return ERC20 converted amount.
function convertIotaToERC20Decimal(uint8 erc20Decimal, uint8 iotaDecimal, uint64 amount)
internal
Expand All @@ -165,7 +165,7 @@ library BridgeUtils {
return uint256(amount);
}

require(erc20Decimal > iotaDecimal, "BridgeUtils: Invalid Iota decimal");
require(erc20Decimal > iotaDecimal, "BridgeUtils: Invalid IOTA decimal");

// Difference in decimal places
uint256 factor = 10 ** (erc20Decimal - iotaDecimal);
Expand All @@ -176,7 +176,7 @@ library BridgeUtils {
/// @dev The function will revert if the payload length is invalid.
/// TokenTransfer payload is 64 bytes.
/// byte 0 : sender address length
/// bytes 1-32 : sender address (as we only support Iota now, it has to be 32 bytes long)
/// bytes 1-32 : sender address (as we only support IOTA now, it has to be 32 bytes long)
/// bytes 33 : target chain id
/// byte 34 : target address length
/// bytes 35-54 : target address
Expand All @@ -195,7 +195,7 @@ library BridgeUtils {

require(
senderAddressLength == 32,
"BridgeUtils: Invalid sender address length, Iota address must be 32 bytes"
"BridgeUtils: Invalid sender address length, IOTA address must be 32 bytes"
);

// used to offset already read bytes
Expand Down Expand Up @@ -391,7 +391,7 @@ library BridgeUtils {
/// @return native whether the token is native to the chain.
/// @return tokenIDs the token ID to be added.
/// @return tokenAddresses the address of the token to be added.
/// @return iotaDecimals the Iota decimal places of the tokens to be added.
/// @return iotaDecimals the IOTA decimal places of the tokens to be added.
/// @return tokenPrices the price of the tokens to be added.
function decodeAddTokensPayload(bytes memory _payload)
internal
Expand Down
4 changes: 2 additions & 2 deletions bridge/evm/script/deploy_bridge.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ contract DeployBridge is Script {
}

// deploy bridge config
// price of Iota (id = 0) should not be included in tokenPrices
// price of IOTA (id = 0) should not be included in tokenPrices
require(
deployConfig.supportedTokens.length == deployConfig.tokenPrices.length,
"supportedTokens.length + 1 != tokenPrices.length"
Expand Down Expand Up @@ -149,7 +149,7 @@ contract DeployBridge is Script {
uint8[] memory _destinationChains = new uint8[](1);
_destinationChains[0] = 1;

// deploy Iota Bridge ========================================================================
// deploy IOTA Bridge ========================================================================

address iotaBridge = Upgrades.deployUUPSProxy(
"IotaBridge.sol",
Expand Down
2 changes: 1 addition & 1 deletion bridge/evm/test/BridgeConfigTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ contract BridgeConfigTest is BridgeBaseTest {
signatures[3] = getSignature(messageHash, committeeMemberPkD);

// add token should fail because the iota decimal is greater than the eth decimal
vm.expectRevert(bytes("BridgeConfig: Invalid Iota decimal"));
vm.expectRevert(bytes("BridgeConfig: Invalid IOTA decimal"));
config.addTokensWithSignatures(signatures, message);
}

Expand Down
4 changes: 2 additions & 2 deletions bridge/evm/test/BridgeUtilsTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ contract BridgeUtilsTest is BridgeBaseTest {
}

function testConvertERC20ToIotaDecimalInvalidIotaDecimal() public {
vm.expectRevert(bytes("BridgeUtils: Invalid Iota decimal"));
vm.expectRevert(bytes("BridgeUtils: Invalid IOTA decimal"));
BridgeUtils.convertERC20ToIotaDecimal(10, 11, 100);
}

function testconvertIotaToERC20DecimalInvalidIotaDecimal() public {
vm.expectRevert(bytes("BridgeUtils: Invalid Iota decimal"));
vm.expectRevert(bytes("BridgeUtils: Invalid IOTA decimal"));
BridgeUtils.convertIotaToERC20Decimal(10, 11, 100);
}

Expand Down
4 changes: 2 additions & 2 deletions bridge/evm/test/IotaBridgeTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ contract IotaBridgeTest is BridgeBaseTest, IIotaBridge {
recipientAddressLength: 0,
recipientAddress: bridgerA,
tokenID: BridgeUtils.ETH,
// This is Iota amount (eth decimal 8)
// This is IOTA amount (eth decimal 8)
amount: 100_000_000
});
BridgeUtils.Message memory message = BridgeUtils.Message({
Expand Down Expand Up @@ -131,7 +131,7 @@ contract IotaBridgeTest is BridgeBaseTest, IIotaBridge {
recipientAddressLength: 0,
recipientAddress: bridgerA,
tokenID: BridgeUtils.ETH,
// This is Iota amount (eth decimal 8)
// This is IOTA amount (eth decimal 8)
amount: 100_000_000
});
BridgeUtils.Message memory message = BridgeUtils.Message({
Expand Down
4 changes: 2 additions & 2 deletions chocolatey/iota.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ enclosed in quotation marks, you should use an editor that supports UTF-8, not t
<id>iota</id>
<version>$version$</version>
<owners>iota</owners>
<title>Main Iota Binary</title>
<title>Main IOTA Binary</title>
<authors>iota</authors>
<projectUrl>https://iota.org/</projectUrl>
<licenseUrl>https://github.com/iotaledger/iota/blob/develop/LICENSE</licenseUrl>
Expand All @@ -16,7 +16,7 @@ enclosed in quotation marks, you should use an editor that supports UTF-8, not t
<tags>iota</tags>
<packageSourceUrl>https://community.chocolatey.org/packages/iota.portable</packageSourceUrl>
<summary>Run a local iota binary</summary>
<description>Iota is the first internet-scale programmable blockchain platform</description>
<description>IOTA is the first internet-scale programmable blockchain platform</description>
<releaseNotes>https://github.com/iotaledger/iota/releases/tag/mainnet-v$version$</releaseNotes>
</metadata>
<files>
Expand Down
2 changes: 1 addition & 1 deletion consensus/config/src/committee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{AuthorityPublicKey, NetworkPublicKey, ProtocolPublicKey};
pub type Epoch = u64;

/// Voting power of an authority, roughly proportional to the actual amount of
/// Iota staked by the authority.
/// IOTA staked by the authority.
/// Total stake / voting power of all authorities should sum to 10,000.
pub type Stake = u64;

Expand Down
2 changes: 1 addition & 1 deletion consensus/config/src/parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize};
/// Operational configurations of a consensus authority.
///
/// All fields should tolerate inconsistencies among authorities, without
/// affecting safety of the protocol. Otherwise, they need to be part of Iota
/// affecting safety of the protocol. Otherwise, they need to be part of IOTA
/// protocol config or epoch state on-chain.
///
/// NOTE: fields with default values are specified in the serde default
Expand Down
2 changes: 1 addition & 1 deletion consensus/core/src/authority_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use crate::{
transaction::{TransactionClient, TransactionConsumer, TransactionVerifier},
};

/// ConsensusAuthority is used by Iota to manage the lifetime of AuthorityNode.
/// ConsensusAuthority is used by IOTA to manage the lifetime of AuthorityNode.
/// It hides the details of the implementation from the caller,
/// MysticetiManager.
pub enum ConsensusAuthority {
Expand Down
2 changes: 1 addition & 1 deletion consensus/core/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub(crate) const GENESIS_ROUND: Round = 0;
/// Block proposal as epoch UNIX timestamp in milliseconds.
pub type BlockTimestampMs = u64;

/// Iota transaction in serialised bytes
/// IOTA transaction in serialised bytes
#[derive(Clone, Eq, PartialEq, Serialize, Deserialize, Default, Debug)]
pub struct Transaction {
data: Bytes,
Expand Down
2 changes: 1 addition & 1 deletion consensus/core/src/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ pub struct CommittedSubDag {
/// a index incremented by 1.
pub commit_ref: CommitRef,
/// Optional scores that are provided as part of the consensus output to
/// Iota that can then be used by Iota for future submission to
/// IOTA that can then be used by IOTA for future submission to
/// consensus.
pub reputation_scores_desc: Vec<(AuthorityIndex, u64)>,
}
Expand Down
2 changes: 1 addition & 1 deletion consensus/core/src/commit_syncer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//! when blocks are included in commits with >= 2f+1 certifiers by stake, these
//! blocks must have passed verifications on some honest validators, so
//! re-verifying them is unnecessary. In fact, the quorum certified commits
//! themselves can be trusted to be sent to Iota directly, but for simplicity
//! themselves can be trusted to be sent to IOTA directly, but for simplicity
//! this is not done. Blocks from trusted commits still go through Core and
//! committer.
//!
Expand Down
2 changes: 1 addition & 1 deletion consensus/core/src/linearizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl Linearizer {
committed_sub_dags.push(sub_dag);
}

// Committed blocks must be persisted to storage before sending them to Iota and
// Committed blocks must be persisted to storage before sending them to IOTA and
// executing their transactions.
// Commit metadata can be persisted more lazily because they are recoverable.
// Uncommitted blocks can wait to persist too.
Expand Down
2 changes: 1 addition & 1 deletion consensus/core/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ impl TransactionClient {
}
}

/// `TransactionVerifier` implementation is supplied by Iota to validate
/// `TransactionVerifier` implementation is supplied by IOTA to validate
/// transactions in a block, before acceptance of the block.
pub trait TransactionVerifier: Send + Sync + 'static {
/// Determines if this batch can be voted on
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-adapter-transactional-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["IOTA Foundation <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
publish = false
description = "Transactional tests for Iota Adapter"
description = "Transactional tests for IOTA Adapter"

[dev-dependencies]
# external dependencies
Expand Down
Loading

0 comments on commit cdc9a4c

Please sign in to comment.