parallel_cross

Attribute Macro parallel_cross 

Source
#[parallel_cross]
Expand description

Used while cross call the parallel the attribute has three fields. address: cross contract address address_index: if address is empty, then you should declare the cross address in function params, this is the index of params. methods: the name of cross call the methods cns_name: CNS of contract. cns_index: CNS of contract index.

use fvm_std::types::Address;
use fvm_macros::parallel_cross;

#[parallel_cross(address="0x0", methods="call")]
fn demo1() {}

#[parallel_cross(address_index=1, methods="call")]
fn demo2(addr: Address) {}

#[parallel_cross(cns_name="Demo", methods="call")]
fn demo3(addr: Address) {}

#[parallel_cross(cns_index=1, methods="call")]
fn demo4(addr: Address) {}