I am looking for a way to automate MetaMask transactions for testing.
The most straightforward way would be to be able to run MetaMask through the CLI, the same way Electrum allows it.
That would allow me to write terminal scripts.
Is this possible? I haven’t seen anything in the docs which hint that I can.
Hello @Divinity1 !
Welcome to MetaMask community )
Yes, you can use the Truffle tool) A short extract from the documentation:
Quickly build, test, debug, and deploy using the Truffle CLI. Write scripts and plugins to automate common processes. Interact directly with the blockchain using the Truffle console. Write tests in Solidity, JavaScript, and TypeScript.
I’ve looked into it, seems a bit overkill for my needs, but I think I can work with that!
Worst case, I guess I could also fork MetaMask source code to add a “main” file which takes CLI parameters to call existing MetaMask functions. But I’ll first see what I can do with Truffle!