ehtereal is a takedown-resistant decentralized c2 framework
$ anvil
use one of the private keys there
$ export PRIVATE_KEY=<ANVIL_PRIVATEKEY>
$ forge script script/Deploy.s.sol --rpc-url http://127.0.0.1:8545 --broadcast
note the adress to which the contract was deployed to
$ export TASK_MANAGER_ADDRESS=<DEPLOYED_CONTRACT_ADRESS>
$ forge script script/PostTask.s.sol --rpc-url http://127.0.0.1:8545 --broadcast
$ cd script
$ bun i
$ bun client.js
to see if the client has submitted the result to the contract we can query it like so:
$ cast call $TASK_MANAGER_ADDRESS "getTask(uint256)(string,bool)" 1 --rpc-url http://127.0.0.1:8545