starknet-foundry icon indicating copy to clipboard operation
starknet-foundry copied to clipboard

Replace `{{ NODE_RPC_URL }}` on `.cairo.template` files only

Open tomek0123456789 opened this issue 10 months ago • 2 comments

Which components does the task require to be changed? (think hard pls)

snforge

Description

replace_node_rpc_url_placeholders is called whenever a test package (from crates/forge/tests/data/) is being set up for a test. It then processes all the files inside that set up package, no matter their extension. Because of that, it searches for {{ NODE_RPC_URL }} in all of the project files, making unnecessary overhead - it should only read from files that have .cairo.template extension.

  1. Change function implementation to replace contents of only those files that have the .cairo.template extension.
  2. Change extension of .cairo files in /crates/forge/tests/data/ that contain {{ NODE_RPC_URL }} string to .cairo.template.

Original discussion here.

Search in code by TODO (#2074)

tomek0123456789 avatar Apr 25 '24 15:04 tomek0123456789

Hey! I would like to work on this. Could you assign it to me?

SourishBiswas23 avatar Apr 27 '24 07:04 SourishBiswas23

@SourishBiswas23 feel free to submit a PR 👍

Arcticae avatar Apr 29 '24 10:04 Arcticae