Standalone
Brainfuck VM
Part II
Brainfuck VM
With Brainfuck programs implemented in Cairo, how can we port them over to Starknet?
VM Contract
We want to deploy a Starknet contract that will act as an on-chain Brainfuck VM. Through this contract, we will be able to deploy and execute arbitrary Brainfuck programs.
Every deployed program will have a u8 id
. We can assume that the VM will not need to store more than 255 programs!
The VM contract will support the following three entry points.
Function | Description |
| Deploy a new |
| Returns the |
| Execute the program at the given |
Here are some important constraints:
You can assume that the maximum size of a program is 256 short strings.
Your Task
Implement BrainfuckVM
in src/contracts/brainfuck_vm.cairo
.
Run tests in Questplay
Submit work in Questplay
You’ve got it! At least, you think you have. But can you and Seraphina figure out a way to transcribe this writing into the common tongue…?