-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Environment script to be ran by Truffle when starting a console. #2472
Comments
Hm we can probably hook up the module.exports = {
/* ... rest of config ... */
console: {
exec: "<path/to/script.js>"
}
} something like that maybe? |
@gnidan I think your suggestion is pretty much what would be needed for a first iteration - as long as the script receives proper environment (particularly |
Bump - was there any progress on this - or similar? |
This would be a feature I would use! @gnidan would love to discuss progressing this. |
For example, every single time I open my truffle console, I have to copy-paste this in it:
Then I have to wait for all the promises to resolve, and then paste this in it:
It'd be nice to have a JS or TS script "sourced" by Ganache console. |
@hickscorp Thanks for bumping this! I want to have this as well. |
cc: @hickscorp |
@cds-amal and @haltman-at Just realised that there were progress on this outside of this issue. I'll check and see if it's suitable. |
Note that this is not an issue, but rather a feature request. I asked a question on the Truffle's Gitter and I was pointed at opening an issue here.
The original question was:
Let me expand on that - when in a truffle console, it'd be great to have a way to have some "environmental" setup done per-project. For instance, having a set of functions automatically loaded from a module. From this standpoint, the module would expose a function that would receive important things (Like a regular Truffle script) - one of the important one being
artifacts
.The text was updated successfully, but these errors were encountered: