Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Doris Benda <[email protected]>
  • Loading branch information
Bargsteen and DOBEN authored Oct 12, 2023
1 parent 03fba11 commit a03ecd0
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/auction/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ fn test_multiple_scenarios() {
///
/// CAROL is the owner of the auction, which ends at `1000` milliseconds after
/// the unix epoch. The 'microCCD per euro' exchange rate is set to `1_000_000`,
/// so 1CCD = 1 euro.
/// so 1 CCD = 1 euro.
fn initialize_chain_and_auction() -> (Chain, ContractAddress) {
let mut chain = Chain::builder()
.micro_ccd_per_euro(
Expand Down
10 changes: 4 additions & 6 deletions examples/cis2-multi-royalties/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,8 @@ fn test_royalty_payment() {
]);
}

// Helper function that sets up the contract with two types of tokens minted to
// Alice. She has 400 of `TOKEN_0` and 1 of `TOKEN_1`.
//
// The royalty percentage is set to 10%.
/// Helper function that sets up the contract with two types of tokens minted to
/// Alice. She has 400 of `TOKEN_0` and 1 of `TOKEN_1`.
fn initialize_contract_with_alice_tokens(
royalty_percentage: u8,
) -> (Chain, ContractAddress, ContractInvokeSuccess) {
Expand All @@ -493,7 +491,7 @@ fn initialize_contract_with_alice_tokens(
royalty_percentage,
};

// Mint two tokens for which Alice is the owner.
// Mint two tokens to Alice.
let update = chain
.contract_update(SIGNER, ALICE, ALICE_ADDR, Energy::from(10000), UpdateContractPayload {
amount: Amount::zero(),
Expand All @@ -515,7 +513,7 @@ fn initialize_contract_with_alice_tokens(
fn initialize_chain_and_contract() -> (Chain, ContractAddress) {
let mut chain = Chain::new();

// Create some accounts accounts on the chain.
// Create some accounts on the chain.
chain.create_account(Account::new(ALICE, ACC_INITIAL_BALANCE));
chain.create_account(Account::new(BOB, ACC_INITIAL_BALANCE));
chain.create_account(Account::new(CHARLIE, ACC_INITIAL_BALANCE));
Expand Down
2 changes: 1 addition & 1 deletion examples/cis2-nft/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ fn initialize_contract_with_alice_tokens() -> (Chain, ContractAddress, ContractI
tokens: BTreeSet::from_iter(vec![TOKEN_0, TOKEN_1]),
};

// Mint two tokens for which Alice is the owner.
// Mint two tokens to Alice.
let update = chain
.contract_update(SIGNER, ALICE, ALICE_ADDR, Energy::from(10000), UpdateContractPayload {
amount: Amount::zero(),
Expand Down
6 changes: 3 additions & 3 deletions examples/cis2-wccd/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn test_set_metadata_url() {
hash: None,
};

// Try to set the metadata URL as Bob, who is not the admin.
// Try to set the metadata URL from Bob's account, who is not the admin.
let update = chain
.contract_update(SIGNER, BOB, BOB_ADDR, Energy::from(10000), UpdateContractPayload {
amount: Amount::zero(),
Expand All @@ -81,7 +81,7 @@ fn test_set_metadata_url() {
.expect("Parsing ContractError");
assert_eq!(rv, ContractError::Unauthorized);

// Set the metadata URL as Alice, who is the admin.
// Set the metadata URL from Alice's account, who is the admin.
let update = chain
.contract_update(SIGNER, ALICE, ALICE_ADDR, Energy::from(10000), UpdateContractPayload {
amount: Amount::zero(),
Expand Down Expand Up @@ -141,7 +141,7 @@ fn test_account_transfer() {
}

/// Test that you can add an operator.
/// Initialize the contract with two tokens owned by Alice.
/// Initialize the contract with one token owned by Alice.
/// Then add Bob as an operator for Alice.
#[test]
fn test_add_operator() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cis3-nft-sponsored-txs/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ fn test_operator_can_transfer() {
]);
}

/// Helper function that sets up the contract with twp tokens minted to
/// Helper function that sets up the contract with two tokens minted to
/// Alice, `TOKEN_0` and `TOKEN_1`.
///
/// Only one token can be minted per update, so two updates are made.
Expand Down
2 changes: 1 addition & 1 deletion examples/nametoken/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ fn deserialize_update_events(
fn initialize_chain_and_contract() -> (Chain, ContractAddress) {
let mut chain = Chain::new();

// Create some accounts accounts on the chain.
// Create some accounts on the chain.
chain.create_account(Account::new(ALICE, ACC_INITIAL_BALANCE));
chain.create_account(Account::new(BOB, ACC_INITIAL_BALANCE));
chain.create_account(Account::new(CHARLIE, ACC_INITIAL_BALANCE));
Expand Down

0 comments on commit a03ecd0

Please sign in to comment.