vm.py
We write our codes for this section in this file.
trace and dependencies:
- depend to the kv file storage
- it get used when a miner wants to create new block during the each transaction proccessing
contract language design:
variable_types: uint, string, address, mapping
tasks:
- in this file first we check we need to fire the vm or not. conditions:
a. the destination address is zero address (nobi00000)
b. the destination address has code storage- if it was just simple coin transfer we rturning true and current state root and let the codes continue the proccsess
- if the destination was zero address (nobi000) thats means we have new contract to deploy. so we push the contract on the code storage space of the account and run constructor and imply the result on the storage of the account .
- if it was contract call we should first load the destination code and sotrage and get the call data and the code and start the interprate the contract code and apply the result on the destination contract storage.
- we should also design the data read api in this file for reading the storage of the contracts
- we should impelement the state root approach to commit the state root in each new block and for doing this after each function the vm run it should return the new state root
- we should implement the interpretur for our language
fungible token contract in Nobi Language (erc20 like)
Instrutions
Fungible token Contract with nobi assembly