I am trying to call a mint function on a token contract from another contract. While passing mint function args as :
amount:u32) {
let mut mint_fn_args: Vec<Val> = Vec::new(&env);
mint_fn_args.push_back(contract_addr.to_val());
mint_fn_args.push_back(i128::from(amount).as_val());
let mint_fn : Symbol = Symbol::new(&env, "mint");
// call mint function on token contract
env.invoke_contract::<Val>(&token_address, &mint_fn, mint_fn_args);
}```
getting below error :
error[E0599]: no method named `as_val` found for type `i128` in the current scope
--> src/lib.rs:51:55
|
51 | mint_fn_args.push_back(i128::from(amount).as_val());
| ^^^^^^ method not found in `i128