Advanced calls: `coins` or `amount`?

In the sway book example, it uses amount to specify the asset amount to send with the function call


abi MyContract {
    fn foo(field_1: bool, field_2: u64);

fn main() {
    let x = abi(MyContract, 0x79fa8779bed2f36c3581d01c79df8da45eee09fac1fd76a5a656e16326317ef0);
    let asset_id = 0x7777_7777_7777_7777_7777_7777_7777_7777_7777_7777_7777_7777_7777_7777_7777_7777; {
        gas: 5000, asset_id: asset_id, amount: 5000
    (true, 3);

However, the compiler is expecting coins rather than amount when I try the code.
Unrecognized contract ABI method parameter "amount". The only available parameters are "gas", "coins", and "asset_id"


Oh good catch. This is a bug in the book. Will fix asap.


This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.