Error when interacting with Bitcoin integration API

Hello. I’m building a canister that can receive btc and also send btc. The first thing I’ve done is create a p2pkh address for the canister and that’s working. Now I have this method called get_utxos


pub async fn get_utxos(network: BitcoinNetwork, address: String) -> GetUtxosResponse {
    let filter = None;
    let utxos_res = bitcoin_get_utxos(GetUtxosRequest {
        address,
        network,
        filter,
    })
    .await;

    utxos_res.unwrap().0
}


I’m using bitcoin api from ic-cdk crate.
When I call this method , I get , CanisterError:IC0539: Error from canister g4xu7-ji… Canister exceeded it’s current Wasm memory limit if 4026531840 bytes… I believe this canister is the bitcoin integration canister… How do I solve this?

I tried this on the ICP dashboard and it doesn’t work. I think theres an issue with the canister when you provide a p2pkh as an argument

There are many issues with the current Bitcoin testnet, independent of ICPs integration, which also causes issues for the bitcoin canister. The bitcoin community therefore has proposed a new testnet, called testnet4. DFINITY plans on changing the bitcoin testnet canister to work with testnet4. You can read more about it here.

In the mean time, you can use bitcoin mainnet.

Thanks. It works fine on mainnet