diff --git a/contracts/tokenwrapper/src/contract.rs b/contracts/tokenwrapper/src/contract.rs index ea151f1..2f5373f 100644 --- a/contracts/tokenwrapper/src/contract.rs +++ b/contracts/tokenwrapper/src/contract.rs @@ -66,7 +66,7 @@ pub fn instantiate( let fee_recipient = deps.api.addr_validate(msg.fee_recipient.as_str())?; if msg.fee_percentage > WRAP_FEE_CALC_DENOMINATOR { return Err(ContractError::Std(StdError::generic_err( - "Fee percenage cannot be greater than 100", + "Fee percentage cannot be greater than 10000", ))); } let fee_percentage = msg.fee_percentage; @@ -458,7 +458,7 @@ fn update_config( governor: Option, is_native_allowed: Option, wrapping_limit: Option, - fee_percentage: Option, + fee_percentage: Option, fee_recipient: Option, ) -> Result { let mut config = CONFIG.load(deps.storage)?; @@ -483,7 +483,7 @@ fn update_config( if let Some(fee_percentage) = fee_percentage { if fee_percentage > WRAP_FEE_CALC_DENOMINATOR { return Err(ContractError::Std(StdError::generic_err( - "Fee percenage cannot be greater than 100", + "Fee percentage cannot be greater than 10000", ))); } config.fee_percentage = fee_percentage; diff --git a/contracts/tokenwrapper/src/state.rs b/contracts/tokenwrapper/src/state.rs index 8abff49..69e6a7e 100644 --- a/contracts/tokenwrapper/src/state.rs +++ b/contracts/tokenwrapper/src/state.rs @@ -11,7 +11,7 @@ pub struct Config { pub governor: Addr, pub native_token_denom: String, pub fee_recipient: Addr, - pub fee_percentage: u8, + pub fee_percentage: u16, pub is_native_allowed: bool, pub wrapping_limit: Uint128, pub proposal_nonce: u64, diff --git a/contracts/tokenwrapper/src/tests.rs b/contracts/tokenwrapper/src/tests.rs index 19d78a5..f7cd347 100644 --- a/contracts/tokenwrapper/src/tests.rs +++ b/contracts/tokenwrapper/src/tests.rs @@ -16,7 +16,7 @@ const NAME: &str = "Webb-WRAP"; const SYMBOL: &str = "WWRP"; const DECIMALS: u8 = 6; const FEE_RECIPIENT: &str = "terra1qca9hs2qk2w29gqduaq9k720k9293qt7q8nszl"; -const FEE_PERCENTAGE: u8 = 1_u8; +const FEE_PERCENTAGE: u16 = 1_u16; const NATIVE_TOKEN_DENOM: &str = "uusd"; const CW20_TOKEN: &str = "cw20_token"; const WRAPPING_LIMIT: u128 = 5000000; @@ -90,7 +90,7 @@ fn test_wrap_native() { let mut deps = init_tokenwrapper([].to_vec()); // Try the wrapping the native token - let info = mock_info("anyone", &coins(100, "uusd")); + let info = mock_info("anyone", &coins(10000, "uusd")); let wrap_msg = ExecuteMsg::Wrap { sender: Some("owner".to_string()), recipient: Some("recipient".to_string()), @@ -104,7 +104,7 @@ fn test_wrap_native() { attr("from", "anyone"), attr("owner", "owner"), attr("to", "recipient"), - attr("minted", "99"), + attr("minted", "9999"), attr("fee", "1"), ] ); @@ -121,7 +121,7 @@ fn test_wrap_native() { ) .unwrap(); let token_balance: BalanceResponse = from_binary(&query).unwrap(); - assert_eq!(token_balance.balance.u128(), 99); + assert_eq!(token_balance.balance.u128(), 9999); } #[test] @@ -130,7 +130,7 @@ fn test_unwrap_native() { let mut deps = init_tokenwrapper(ctx_coins); // Try the wrapping the native token - let info = mock_info("anyone", &coins(100, "uusd")); + let info = mock_info("anyone", &coins(10000, "uusd")); let wrap_msg = ExecuteMsg::Wrap { sender: None, recipient: None, @@ -141,7 +141,7 @@ fn test_unwrap_native() { let info = mock_info("anyone", &[]); let unwrap_msg = ExecuteMsg::Unwrap { token: None, - amount: Uint128::from(80_u128), + amount: Uint128::from(8000_u128), sender: None, recipient: None, }; @@ -154,8 +154,8 @@ fn test_unwrap_native() { attr("from", "anyone"), attr("owner", "anyone"), attr("to", "anyone"), - attr("unwrap", "80"), - attr("refund", "80"), + attr("unwrap", "8000"), + attr("refund", "8000"), ] ); @@ -169,7 +169,7 @@ fn test_unwrap_native() { ) .unwrap(); let token_balance: BalanceResponse = from_binary(&query).unwrap(); - assert_eq!(token_balance.balance.u128(), 19); + assert_eq!(token_balance.balance.u128(), 1999); } #[test] @@ -188,7 +188,7 @@ fn test_wrap_cw20() { let info = mock_info(CW20_TOKEN, &[]); let wrap_msg = ExecuteMsg::Receive(Cw20ReceiveMsg { sender: "anyone".to_string(), - amount: Uint128::from(100_u128), + amount: Uint128::from(10000_u128), msg: to_binary(&Cw20HookMsg::Wrap { sender: None, recipient: None, @@ -204,7 +204,7 @@ fn test_wrap_cw20() { attr("from", "anyone"), attr("owner", "anyone"), attr("to", "anyone"), - attr("minted", "99"), + attr("minted", "9999"), attr("fee", "1") ] ); @@ -219,7 +219,7 @@ fn test_wrap_cw20() { ) .unwrap(); let token_balance: BalanceResponse = from_binary(&query).unwrap(); - assert_eq!(token_balance.balance.u128(), 99); + assert_eq!(token_balance.balance.u128(), 9999); } #[test] @@ -238,7 +238,7 @@ fn test_unwrap_cw20() { let info = mock_info(CW20_TOKEN, &[]); let wrap_msg = ExecuteMsg::Receive(Cw20ReceiveMsg { sender: "anyone".to_string(), - amount: Uint128::from(100_u128), + amount: Uint128::from(10000_u128), msg: to_binary(&Cw20HookMsg::Wrap { sender: None, recipient: None, @@ -251,7 +251,7 @@ fn test_unwrap_cw20() { let info = mock_info("anyone", &[]); let unwrap_msg = ExecuteMsg::Unwrap { token: Some(Addr::unchecked(CW20_TOKEN.to_string())), - amount: Uint128::from(80_u128), + amount: Uint128::from(8000_u128), sender: None, recipient: None, }; @@ -264,8 +264,8 @@ fn test_unwrap_cw20() { attr("from", "anyone"), attr("owner", "anyone"), attr("to", "anyone"), - attr("unwrap", "80"), - attr("refund", "80"), + attr("unwrap", "8000"), + attr("refund", "8000"), ] ); @@ -279,7 +279,7 @@ fn test_unwrap_cw20() { ) .unwrap(); let token_balance: BalanceResponse = from_binary(&res).unwrap(); - assert_eq!(token_balance.balance.u128(), 19); + assert_eq!(token_balance.balance.u128(), 1999); } #[test] @@ -291,13 +291,13 @@ fn test_query_fee_from_wrap_amt() { deps.as_ref(), mock_env(), QueryMsg::FeeFromAmount { - amount_to_wrap: "222".to_string(), + amount_to_wrap: "10000".to_string(), }, ) .unwrap(); let fee_response: FeeFromAmountResponse = from_binary(&query_bin).unwrap(); - assert_eq!(fee_response.amount_to_wrap, "222".to_string()); - assert_eq!(fee_response.fee_amt, "2".to_string()); + assert_eq!(fee_response.amount_to_wrap, "10000".to_string()); + assert_eq!(fee_response.fee_amt, "1".to_string()); } #[test] @@ -309,13 +309,13 @@ fn test_query_amt_to_wrap_from_target_amount() { deps.as_ref(), mock_env(), QueryMsg::GetAmountToWrap { - target_amount: "222".to_string(), + target_amount: "10000".to_string(), }, ) .unwrap(); let fee_response: GetAmountToWrapResponse = from_binary(&query_bin).unwrap(); - assert_eq!(fee_response.target_amount, "222".to_string()); - assert_eq!(fee_response.amount_to_wrap, "224".to_string()); + assert_eq!(fee_response.target_amount, "10000".to_string()); + assert_eq!(fee_response.amount_to_wrap, "10001".to_string()); } #[test] diff --git a/contracts/tokenwrapper/src/utils.rs b/contracts/tokenwrapper/src/utils.rs index 99dab77..78ffd5d 100644 --- a/contracts/tokenwrapper/src/utils.rs +++ b/contracts/tokenwrapper/src/utils.rs @@ -30,12 +30,12 @@ pub fn is_valid_unwrap_amount(deps: DepsMut, sender: &str, amount: Uint128) -> b } // Calculates the "fee" from "wrap_amount". -pub fn get_fee_from_amount(amount_to_wrap: Uint128, fee_perc: u8) -> Uint128 { +pub fn get_fee_from_amount(amount_to_wrap: Uint128, fee_perc: u16) -> Uint128 { amount_to_wrap.multiply_ratio(fee_perc, WRAP_FEE_CALC_DENOMINATOR) } // Calculate the "amount_to_send" from "deposit_target" amount. -pub fn get_amount_to_wrap(target_amount: Uint128, fee_perc: u8) -> Uint128 { +pub fn get_amount_to_wrap(target_amount: Uint128, fee_perc: u16) -> Uint128 { target_amount.multiply_ratio( WRAP_FEE_CALC_DENOMINATOR, WRAP_FEE_CALC_DENOMINATOR - fee_perc, diff --git a/packages/protocol_cosmwasm/src/token_wrapper.rs b/packages/protocol_cosmwasm/src/token_wrapper.rs index 620a2c9..a7156b3 100644 --- a/packages/protocol_cosmwasm/src/token_wrapper.rs +++ b/packages/protocol_cosmwasm/src/token_wrapper.rs @@ -3,7 +3,7 @@ use cw20::{Cw20ReceiveMsg, Expiration}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -pub const WRAP_FEE_CALC_DENOMINATOR: u8 = 100_u8; +pub const WRAP_FEE_CALC_DENOMINATOR: u16 = 10_000_u16; #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct InstantiateMsg { /// name of the Wrapping target token @@ -18,8 +18,8 @@ pub struct InstantiateMsg { pub governor: Option, /// addr of fee recipient pub fee_recipient: String, - /// fee_percentage( 0 ~ 100 ) - pub fee_percentage: u8, + /// fee_percentage( 0 ~ 10,000 ) + pub fee_percentage: u16, /// native token denom string to be wrapped pub native_token_denom: String, /// flag of is_native_allowed @@ -65,7 +65,7 @@ pub enum ExecuteMsg { ConfigureFeeRecipient { fee_recipient: Option }, /// Update the `fee_percentage` - ConfigureFeePercentage { fee_percentage: Option }, + ConfigureFeePercentage { fee_percentage: Option }, /// Add cw20 token address to wrapping list AddCw20TokenAddr { token: String, nonce: u64 }, diff --git a/packages/protocol_cosmwasm/src/treasury.rs b/packages/protocol_cosmwasm/src/treasury.rs index 723d045..3981fea 100644 --- a/packages/protocol_cosmwasm/src/treasury.rs +++ b/packages/protocol_cosmwasm/src/treasury.rs @@ -2,7 +2,6 @@ use cosmwasm_std::Uint128; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -pub const WRAP_FEE_CALC_DENOMINATOR: u8 = 100_u8; #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct InstantiateMsg { /// Address of "treasury_handler" diff --git a/test-scripts/src/processes/tests/mixer.ts b/test-scripts/src/processes/tests/mixer.ts index 1a7b3fd..2fe486b 100644 --- a/test-scripts/src/processes/tests/mixer.ts +++ b/test-scripts/src/processes/tests/mixer.ts @@ -6,9 +6,9 @@ import chaiAsPromised from "chai-as-promised"; import chalk from "chalk"; import { localjuno } from "../../config/localjunoConstants"; -import { datetimeStringToUTC,toEncodedBinary } from "../../utils/helpers"; +import { datetimeStringToUTC, toEncodedBinary } from "../../utils/helpers"; -import { JsNoteBuilder, MTBn254X5, OutputUtxoConfig, setupKeys, verify_js_proof } from '../../utils/wasm-utils/njs/wasm-utils-njs'; +import { JsNoteBuilder, MTBn254X5, setupKeys, verify_js_proof } from '../../utils/wasm-utils/njs/wasm-utils-njs'; import { hexToU8a, u8aToHex } from '@polkadot/util'; chai.use(chaiAsPromised); @@ -22,121 +22,120 @@ const { expect } = chai; // 2. Check if the state/config matches the setup input // ------------------------------------------------ export async function testMixerInitialize( - junod: SigningCosmWasmClient, - mixer: string, - ): Promise { - process.stdout.write("Test - Mixer should initialize"); - const result: any = await junod.queryContractSmart(mixer, { - config: {}, - }); - - expect(result.native_token_denom == localjuno.contractsConsts.nativeTokenDenom); - expect(result.cw20_address == ""); - expect(result.deposit_size == localjuno.contractsConsts.depositSize); - - console.log(chalk.green(" Passed!")); - } - - // ----------------------------------------------- - // TEST: Mixer - // - // SCENARIO: - // 1. Wallet3 deposit the "ucosm" tokens to mixer - // ------------------------------------------------ - export async function testMixerDepositNativeToken( - junod: SigningCosmWasmClient, - mixer: string, - wallet3: DirectSecp256k1HdWallet, - ucosm_amount: string, - ): Promise { - process.stdout.write(`Test - Wallet3 deposit ${ucosm_amount} ucosm to mixer`); - - let wallet3_client = await SigningCosmWasmClient.connectWithSigner( - localjuno.networkInfo.url, - wallet3, - {gasPrice: GasPrice.fromString("0.1ujunox")}, - ); - - // Fail to "deposit" since no "commitment" - await expect( - wallet3_client.execute(localjuno.addresses.wallet3, mixer, { - deposit: { - commitment: undefined, - }, - }, "auto", undefined, [coin(ucosm_amount, "ucosm")]) - ).to.be.rejected; // rejectedWith("Commitment not found"); - - // Succeed to "deposit" - const result = await wallet3_client.execute(localjuno.addresses.wallet3, mixer, { + junod: SigningCosmWasmClient, + mixer: string, +): Promise { + process.stdout.write("Test - Mixer should initialize"); + const result: any = await junod.queryContractSmart(mixer, { + config: {}, + }); + + expect(result.native_token_denom == localjuno.contractsConsts.nativeTokenDenom); + expect(result.cw20_address == ""); + expect(result.deposit_size == localjuno.contractsConsts.depositSize); + + console.log(chalk.green(" Passed!")); +} + +// ----------------------------------------------- +// TEST: Mixer +// +// SCENARIO: +// 1. Wallet3 deposit the "ucosm" tokens to mixer +// ------------------------------------------------ +export async function testMixerDepositNativeToken( + junod: SigningCosmWasmClient, + mixer: string, + wallet3: DirectSecp256k1HdWallet, + ucosm_amount: string, +): Promise { + process.stdout.write(`Test - Wallet3 deposit ${ucosm_amount} ucosm to mixer`); + + let wallet3_client = await SigningCosmWasmClient.connectWithSigner( + localjuno.networkInfo.url, + wallet3, + { gasPrice: GasPrice.fromString("0.1ujunox") }, + ); + + // Fail to "deposit" since no "commitment" + await expect( + wallet3_client.execute(localjuno.addresses.wallet3, mixer, { deposit: { - commitment: [60, 193, 57, 161, 207, 107, 11, 192, 51, 187, 64, 70, 168, 216, 155, 216, 187, 112, 123, 6, 14, 101, 174, 89, 250, 120, 41, 24, 101, 151, 110, 24], - } - }, "auto", undefined, [coin(ucosm_amount, "ucosm")]); - - console.log(chalk.green(" Passed!")); - } - - // ----------------------------------------------- - // TEST: Mixer - // - // SCENARIO: - // 1. Wallet2 withdraw the "ucosm" tokens to mixer - // ------------------------------------------------ + commitment: undefined, + }, + }, "auto", undefined, [coin(ucosm_amount, "ucosm")]) + ).to.be.rejected; // rejectedWith("Commitment not found"); + + // Succeed to "deposit" + const result = await wallet3_client.execute(localjuno.addresses.wallet3, mixer, { + deposit: { + commitment: [60, 193, 57, 161, 207, 107, 11, 192, 51, 187, 64, 70, 168, 216, 155, 216, 187, 112, 123, 6, 14, 101, 174, 89, 250, 120, 41, 24, 101, 151, 110, 24], + } + }, "auto", undefined, [coin(ucosm_amount, "ucosm")]); + + console.log(chalk.green(" Passed!")); +} + +// ----------------------------------------------- +// TEST: Mixer +// +// SCENARIO: +// 1. Wallet2 withdraw the "ucosm" tokens to mixer +// ------------------------------------------------ export async function testMixerWithdrawNativeToken( - junod: SigningCosmWasmClient, - mixer: string, - wallet1: DirectSecp256k1HdWallet, - wallet2: DirectSecp256k1HdWallet, - wallet3: DirectSecp256k1HdWallet, - ucosm_amount: string, - ): Promise { - process.stdout.write(`Test - Wallet2 withdraw ${ucosm_amount} ucosm from mixer`); - - let wallet2_client = await SigningCosmWasmClient.connectWithSigner( - localjuno.networkInfo.url, - wallet2, - {gasPrice: GasPrice.fromString("0.1ujunox")}, - ); - - // Fail to "withdraw" since no "commitment" - await expect( - wallet2_client.execute(localjuno.addresses.wallet2, mixer, { - withdraw: { - proof_bytes: [171, 78, 91, 39, 195, 136, 25, 239, 54, 52, 122, 184, 250, 174, 86, 201, 15, 212, 162, 6, 172, 35, 88, 216, 105, 141, 206, 241, 161, 143, 106, 33, 110, 194, 247, 183, 7, 179, 197, 11, 117, 153, 201, 44, 24, 204, 171, 120, 246, 61, 240, 100, 230, 5, 56, 207, 143, 160, 180, 20, 66, 164, 183, 29, 228, 215, 232, 241, 176, 233, 48, 1, 230, 80, 81, 75, 124, 187, 249, 143, 42, 251, 94, 129, 130, 135, 11, 188, 129, 79, 246, 70, 154, 79, 154, 131, 54, 121, 242, 112, 167, 81, 122, 180, 61, 115, 248, 65, 96, 62, 87, 21, 42, 108, 237, 81, 181, 163, 129, 56, 124, 89, 206, 139, 62, 230, 16, 37], - root: undefined, - nullifier_hash: [183, 160, 141, 89, 98, 241, 220, 87, 120, 249, 242, 56, 92, 41, 28, 230, 247, 111, 155, 7, 94, 2, 142, 101, 0, 243, 39, 32, 59, 235, 198, 31], - recipient: localjuno.addresses.wallet2, - relayer: localjuno.addresses.wallet3, - fee: "0", - refund: "0", - cw20_address: undefined, - }, - }, "auto", undefined, [coin(ucosm_amount, "ucosm")]) - ).to.be.rejected; // rejectedWith("Root is not known"); - - // Succeed to "withdraw" - const beforeBalance: Coin = await junod.getBalance(localjuno.addresses.wallet2, "ucosm"); - const beforeUcosm = beforeBalance.amount; - - const result = await wallet2_client.execute(localjuno.addresses.wallet2, mixer, { + junod: SigningCosmWasmClient, + mixer: string, + wallet1: DirectSecp256k1HdWallet, + wallet2: DirectSecp256k1HdWallet, + wallet3: DirectSecp256k1HdWallet, + ucosm_amount: string, +): Promise { + process.stdout.write(`Test - Wallet2 withdraw ${ucosm_amount} ucosm from mixer`); + + let wallet2_client = await SigningCosmWasmClient.connectWithSigner( + localjuno.networkInfo.url, + wallet2, + { gasPrice: GasPrice.fromString("0.1ujunox") }, + ); + + // Fail to "withdraw" since no "commitment" + await expect( + wallet2_client.execute(localjuno.addresses.wallet2, mixer, { withdraw: { proof_bytes: [171, 78, 91, 39, 195, 136, 25, 239, 54, 52, 122, 184, 250, 174, 86, 201, 15, 212, 162, 6, 172, 35, 88, 216, 105, 141, 206, 241, 161, 143, 106, 33, 110, 194, 247, 183, 7, 179, 197, 11, 117, 153, 201, 44, 24, 204, 171, 120, 246, 61, 240, 100, 230, 5, 56, 207, 143, 160, 180, 20, 66, 164, 183, 29, 228, 215, 232, 241, 176, 233, 48, 1, 230, 80, 81, 75, 124, 187, 249, 143, 42, 251, 94, 129, 130, 135, 11, 188, 129, 79, 246, 70, 154, 79, 154, 131, 54, 121, 242, 112, 167, 81, 122, 180, 61, 115, 248, 65, 96, 62, 87, 21, 42, 108, 237, 81, 181, 163, 129, 56, 124, 89, 206, 139, 62, 230, 16, 37], - root: [82, 25, 2, 85, 65, 173, 18, 5, 74, 175, 108, 14, 232, 197, 174, 9, 242, 59, 105, 48, 104, 169, 204, 128, 253, 150, 15, 102, 108, 214, 81, 33], + root: undefined, nullifier_hash: [183, 160, 141, 89, 98, 241, 220, 87, 120, 249, 242, 56, 92, 41, 28, 230, 247, 111, 155, 7, 94, 2, 142, 101, 0, 243, 39, 32, 59, 235, 198, 31], recipient: localjuno.addresses.wallet2, relayer: localjuno.addresses.wallet3, - fee: "0", - refund: "0", + fee: "0", + refund: "0", cw20_address: undefined, }, - }, "auto", undefined, [coin(ucosm_amount, "ucosm")]); - - const afterBalance: Coin = await junod.getBalance(localjuno.addresses.wallet2, "ucosm"); - const afterUcosm = afterBalance.amount; - - expect(parseInt(beforeUcosm) + parseInt(ucosm_amount) == parseInt(afterUcosm)); - - console.log(chalk.green(" Passed!")); - } - - \ No newline at end of file + }, "auto", undefined, [coin(ucosm_amount, "ucosm")]) + ).to.be.rejected; // rejectedWith("Root is not known"); + + // Succeed to "withdraw" + const beforeBalance: Coin = await junod.getBalance(localjuno.addresses.wallet2, "ucosm"); + const beforeUcosm = beforeBalance.amount; + + const result = await wallet2_client.execute(localjuno.addresses.wallet2, mixer, { + withdraw: { + proof_bytes: [171, 78, 91, 39, 195, 136, 25, 239, 54, 52, 122, 184, 250, 174, 86, 201, 15, 212, 162, 6, 172, 35, 88, 216, 105, 141, 206, 241, 161, 143, 106, 33, 110, 194, 247, 183, 7, 179, 197, 11, 117, 153, 201, 44, 24, 204, 171, 120, 246, 61, 240, 100, 230, 5, 56, 207, 143, 160, 180, 20, 66, 164, 183, 29, 228, 215, 232, 241, 176, 233, 48, 1, 230, 80, 81, 75, 124, 187, 249, 143, 42, 251, 94, 129, 130, 135, 11, 188, 129, 79, 246, 70, 154, 79, 154, 131, 54, 121, 242, 112, 167, 81, 122, 180, 61, 115, 248, 65, 96, 62, 87, 21, 42, 108, 237, 81, 181, 163, 129, 56, 124, 89, 206, 139, 62, 230, 16, 37], + root: [82, 25, 2, 85, 65, 173, 18, 5, 74, 175, 108, 14, 232, 197, 174, 9, 242, 59, 105, 48, 104, 169, 204, 128, 253, 150, 15, 102, 108, 214, 81, 33], + nullifier_hash: [183, 160, 141, 89, 98, 241, 220, 87, 120, 249, 242, 56, 92, 41, 28, 230, 247, 111, 155, 7, 94, 2, 142, 101, 0, 243, 39, 32, 59, 235, 198, 31], + recipient: localjuno.addresses.wallet2, + relayer: localjuno.addresses.wallet3, + fee: "0", + refund: "0", + cw20_address: undefined, + }, + }, "auto", undefined, [coin(ucosm_amount, "ucosm")]); + + const afterBalance: Coin = await junod.getBalance(localjuno.addresses.wallet2, "ucosm"); + const afterUcosm = afterBalance.amount; + + expect(parseInt(beforeUcosm) + parseInt(ucosm_amount) == parseInt(afterUcosm)); + + console.log(chalk.green(" Passed!")); +} +