diff --git a/packages/core/src/contracts/solver.cairo b/packages/core/src/contracts/solver.cairo index 158eafa..eac1221 100644 --- a/packages/core/src/contracts/solver.cairo +++ b/packages/core/src/contracts/solver.cairo @@ -1009,7 +1009,9 @@ pub mod SolverComponent { let base_symbol = erc20_versioned_call::get_symbol(market_info.base_token); let quote_symbol = erc20_versioned_call::get_symbol(market_info.quote_token); let name: ByteArray = format!("Haiko {} {}-{}", self.name(), base_symbol, quote_symbol); - let symbol: ByteArray = format!("HAIKO-{}-{}-{}", self.symbol(), base_symbol, quote_symbol); + let symbol: ByteArray = format!( + "HAIKO-{}-{}-{}", self.symbol(), base_symbol, quote_symbol + ); let decimals: u8 = 18; let owner = get_contract_address(); diff --git a/packages/core/src/tests/solver/test_create_market.cairo b/packages/core/src/tests/solver/test_create_market.cairo index 67fd96a..d98264c 100644 --- a/packages/core/src/tests/solver/test_create_market.cairo +++ b/packages/core/src/tests/solver/test_create_market.cairo @@ -61,7 +61,7 @@ fn test_create_public_market_initialises_immutables_and_deploys_vault_token() { let vault_token = ERC20ABIDispatcher { contract_address: vault_token_opt.unwrap() }; let vault_token_alt = IVaultTokenDispatcher { contract_address: vault_token_opt.unwrap() }; assert(vault_token.name() == "Haiko Mock ETH-USDC", 'Vault token: name'); - assert(vault_token.symbol() == "MOCK-ETH-USDC", 'Vault token: name'); + assert(vault_token.symbol() == "HAIKO-MOCK-ETH-USDC", 'Vault token: name'); assert(vault_token.decimals() == 18, 'Vault token: decimal'); assert(vault_token_alt.owner() == solver.contract_address, 'Vault token: owner'); } diff --git a/packages/core/src/tests/solver/test_deploy.cairo b/packages/core/src/tests/solver/test_deploy.cairo index d0badcf..0fa6dac 100644 --- a/packages/core/src/tests/solver/test_deploy.cairo +++ b/packages/core/src/tests/solver/test_deploy.cairo @@ -46,7 +46,7 @@ fn test_deploy_vault_token_initialises_immutables() { let vault_token_alt = IVaultTokenDispatcher { contract_address: vault_token_opt.unwrap() }; assert(vault_token.name() == "Haiko Mock ETH-USDC", 'Vault token: name'); - assert(vault_token.symbol() == "MOCK-ETH-USDC", 'Vault token: name'); + assert(vault_token.symbol() == "HAIKO-MOCK-ETH-USDC", 'Vault token: name'); assert(vault_token.decimals() == 18, 'Vault token: decimal'); assert(vault_token_alt.owner() == solver.contract_address, 'Vault token: owner'); } diff --git a/packages/core/src/tests/solver/test_deposit.cairo b/packages/core/src/tests/solver/test_deposit.cairo index 6c42887..5bcea38 100644 --- a/packages/core/src/tests/solver/test_deposit.cairo +++ b/packages/core/src/tests/solver/test_deposit.cairo @@ -262,12 +262,13 @@ fn test_deposit_public_vault_multiple_lps_capped_at_available() { // Spy on events. let mut spy = spy_events(SpyOn::One(solver.contract_address)); - + // Deposit. start_prank(CheatTarget::One(solver.contract_address), alice()); let base_deposit = to_e18(40000); let quote_deposit = to_e18(20); - let (base_amount, quote_amount, shares) = solver.deposit(market_id, base_deposit, quote_deposit); + let (base_amount, quote_amount, shares) = solver + .deposit(market_id, base_deposit, quote_deposit); assert(base_amount == base_available, 'Base deposit'); assert(quote_amount == quote_available, 'Quote deposit'); @@ -276,7 +277,9 @@ fn test_deposit_public_vault_multiple_lps_capped_at_available() { let vault_token = ERC20ABIDispatcher { contract_address: vault_token_addr }; let owner_vault_bal = vault_token.balanceOf(owner()); let lp_vault_bal = vault_token.balanceOf(alice()); - assert(approx_eq(lp_vault_bal, math::mul_div(owner_vault_bal, 3, 2, false), 1000), 'Vault shares'); + assert( + approx_eq(lp_vault_bal, math::mul_div(owner_vault_bal, 3, 2, false), 1000), 'Vault shares' + ); // Check events emitted with correct amounts spy @@ -286,11 +289,7 @@ fn test_deposit_public_vault_multiple_lps_capped_at_available() { solver.contract_address, SolverComponent::Event::Deposit( SolverComponent::Deposit { - market_id, - caller: alice(), - base_amount, - quote_amount, - shares + market_id, caller: alice(), base_amount, quote_amount, shares } ) )