| Crates.io | blocknative-flows |
| lib.rs | blocknative-flows |
| version | 0.1.2 |
| created_at | 2023-01-31 10:39:07.664644+00 |
| updated_at | 2023-02-01 08:23:00.816449+00 |
| description | Block Native extension for flows.network |
| homepage | |
| repository | |
| max_upload_size | |
| id | 772581 |
| size | 7,373 |
This is a library for integrating Block Native in your flow function for test.flows.network.
use blocknative_flows::listen_to_address;
use slack_flows::send_message_to_channel;
#[no_mangle]
pub fn run() {
let address = "0xC8a8f0C656D21bd619FB06904626255af19663ff";
listen_to_address(address, |bnm| {
send_message_to_channel("ham-5b68442", "general", bnm.hash);
});
}
In run() the listen_to_address will create a listener
for new event from address: 0xC8a8f0C656D21bd619FB06904626255af19663ff.
The send_message_to_channel is from slack-flows
The whole document is here.