address jyunth_addr {
module PriceOracle {
public fun btc_price(): u128 {
return 62000
}
}
module CastingDemo{
use jyunth_addr::PriceOracle;
use std::debug::print;
fun calculate_swap() {
let price = PriceOracle::btc_price();
let price_w_fee: u64 = (price as u64) + 5;
print(&price_w_fee);
}
#[test]
fun swap_test() {
calculate_swap();
}
}
}