... blocks.
let sub = provider.subscribe_blocks().await?;
// Wait and take the next 4 blocks.
let mut stream = sub.into_stream().take(4);
// let mut stream = sub.into_stream();
println!("Awaiting block headers...");
// Take the stream and print the block number upon ...
...: string,
amount: string,
gasPrice: string
): Promise {
try {
// Construct URL - QUICKNODE_RPC_URL has `/` at the end in default
let url = `${QUICKNODE_RPC_URL}addon/${ADDON_ID}/v4/${CHAIN}/quote?inTokenAddress=${inTokenAddress}&outTokenAddress=${outTokenAddress}&amount=${amount}`;
...