sway
sway copied to clipboard
Global access to configurable variables in contracts
A configurable block exists in the entry point of a contract or script.
The variables inside the block are accessible in the commonly named main.sw file.
These variables are not accessible in any other file alongside main.sw therefore functions need to take additional parameters to pass these variables around.
It would be useful to forego having to pass them and make them global otherwise they're not particularly useful if you can create a constants file and import that library.