use-ink / ink

Polkadot's ink! to write smart contracts.
https://use.ink
Apache License 2.0
1.35k stars 428 forks source link

`[E2E]` change node url backend config #2101

Closed ascjones closed 8 months ago

ascjones commented 9 months ago

Modifies the e2e configuration for backend node from node_url = "<url>" to backend(node(url = "<url>")).

The previous configuration allowed node_url to be set even if using backend(runtime_only) which uses no node at all so the url is not used at all.

Follows up https://github.com/paritytech/ink/pull/2047

SkymanOne commented 9 months ago

Maybe we can make the url an optional param?

- backend(node(url = "<URL>"))
+ backend(node = "<URL>")
ascjones commented 9 months ago

Maybe we can make the url an optional param?

- backend(node(url = "<URL>"))
+ backend(node = "<URL>")

I'm not sure exactly how to achieve that using Darling. Would have to make node a property of Backend, but that is an enum not a struct hence the derive produces the enum(variant) syntax.

I've played around a little bit and can't immediately find a nice way to do that. I'm sure it is possible but I will leave it for now.

SkymanOne commented 9 months ago

Maybe we can make the url an optional param?

- backend(node(url = "<URL>"))
+ backend(node = "<URL>")

I'm not sure exactly how to achieve that using Darling. Would have to make node a property of Backend, but that is an enum not a struct hence the derive produces the enum(variant) syntax.

I've played around a little bit and can't immediately find a nice way to do that. I'm sure it is possible but I will leave it for now.

It is not critical ofc, just nice to have less verbose syntax