I am building a state channel battleship game. I have a stateless contract which contains all my gameplay logic and another statechannels contract which contains all the dispute logic.

Ideally, I shouldn't be deploying either contract until there is a dispute. To move through the game states, my contract accepts a AppState argument and applies the passed Action argument to return a new state. All my functions are pure.

Is there any way to run the contract code without deploying it on any chain?

2 Answers 2


It sounds like you are looking for an abstraction of the Ethereum Virtual Machine for your smart contracts and you don't need to deploy them until something worth recording happens. At the same time, your game logic is in the form of smart contracts.

Check this out. Ethereumjs-vm.


I think the answer's got to be Remix. JavascriptVM is the default simulation environment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.