Learning scopes of function and the friend attribute
address jyunth_addr{
module one {
friend jyunth_addr::two;
public(friend) fun get_value(): u64 {
return 100
}
}
module two {
#[test_only]
use std::debug::print;
#[test]
fun test_function(){
let result = jyunth_addr::one::get_value();
print(&result);
}
}
module three {
#[test_only]
use std::debug::print;
#[test]
fun test_function2(){
let result = jyunth_addr::one::get_value();
print(&result);
}
}
}