Skip to content

Replace {{ NODE_RPC_URL }} on .cairo.template files only #2074

@tomek0123456789

Description

@tomek0123456789

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)

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions