0

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?

0

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.

| improve this answer | |
0

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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