Immortal Diary of Dario Anongba Varela and Nativity Carol. Most important moments of our live. Use it wisely, as you cannot go back and cannot delete it!
If one day I'm not here anymore to tell you how to add stuff to the diary
I recommend you to install this tools before starting :
Folder | Description |
---|---|
contracts | Smart Contracts in Solidity |
migrations | Migrations files |
test | Smart Contract tests |
- Install npm dependencies :
cd immortaldiary
npm install
- Create an
.env
file using.env.example
as example. Use the right mnemonic or you won't be able to add stuff to the diary! Even if someone helps you, don't give them the key! Only if you really trust them.
- Connect to the desired network defined in
truffle.js
:
truffle console --network mainnet
- Compile the smart contracts:
compile
- Create an instance of the ImmortalDiary :
const diary = ImmortalDiary.at(/* Add the address of the diary here */)
- Add an event to the diary :
diary.addEvent('Event short description': string, date: Datetime, location: string, by: string)
Example:
diary.addEvent("Nati je t'aime", now(), 'Lausanne, Suisse', 'Dario')
Files will be stored in the
build/contracts
folder in JSON form, containing the ABI and other informations.