I'm on a Mac, and working through the Hello World contract.
I managed to create the Hello.cpp file using the touch command in Terminal... but how do I find this file, and/or how do I edit it?
EOS.IO Stack Exchange is a question and answer site for users and developers of distributed applications built on top of the blockchain operating system, EOS.IO. It only takes a minute to sign up.
Sign up to join this communityOpen terminal and go to your home directory because it is the root directory of your all work directories . Go through this sequence
1.open terminal
2.# cd
3.#locate hello.cpp
and you will find your file . now open your file like this using vim like this
vim hello.cpp
press i (to edit your file ) after editing press Esc than Ctrl+Shift+: and press wq (to save your file ) this will work if you have vim install to your system .
It is recommended to use eosiocpp
for the purpose of initiating your contract.
Just run:
eosiocpp -n hello
Then:
cd hello && ls
And you will see two files hello.cpp
and hello.hpp
.
This is the good way to start writing your contract from scratch.
eosio-cpp
should be the replacement (see todd fleming's telegram posts) but haven't checked yet if they still have the -n
flag
Aug 14, 2018 at 21:05
touch
creates an empty file wherever you specify in the argument. you edit it with a text editor, but it'll be empty