I’m declaring canisters in my repository as “custom” and define the url where to fetch them, in particular for the ICRC1 ledger indexer deployment guide.
The dfx.json file then looks like this
{
"canisters": {
"icrc1_index_canister": {
"type": "custom",
"candid": "https://raw.githubusercontent.com/dfinity/ic/d87954601e4b22972899e9957e800406a0a6b929/rs/rosetta-api/icrc1/index-ng/index-ng.did",
"wasm": "https://download.dfinity.systems/ic/d87954601e4b22972899e9957e800406a0a6b929/canisters/ic-icrc1-index-ng.wasm.gz",
},
"icrc1_ledger_canister": {
"type": "custom",
"candid": "https://raw.githubusercontent.com/dfinity/ic/d87954601e4b22972899e9957e800406a0a6b929/rs/rosetta-api/icrc1/ledger/ledger.did",
"wasm": "https://download.dfinity.systems/ic/d87954601e4b22972899e9957e800406a0a6b929/canisters/ic-icrc1-ledger.wasm.gz",
}
},
"output_env_file": ".env",
"version": 1
}
The deployment works fine and I would like to use dfx generate to create the js bindings for the candid. When I simply run dfx generate it throws me an error that it can’t find the did file in the .dfx/local folder. It makes sense because I didn’t deploy locally.
Is there a way to run dfx generate and create my js bindings without having to deploy locally? Can this work from the remote url directly?