I am new in blockchain tech. In all videos or documentation, people write tons of things about blockchain and smart contract and I think no one knows exactly what the smart contract means. Because they are not explaining it in an easy way.
When I create a smart contract in Solidity
and publish in blockchain, am I creating a new coin in blockchain environment?
If so, people could see my coin and invest in it. But I am not creating my smart contract like Bitcoin
or Shibacoin
. I want to create it just for storing for example people's todo app data
.
And also a bonus question:
I am creating a todo
app in Solidity
and publishing it publicly in blockchain. I published my app in Android Studio
so users can add their todo
list data.
Data is stored in, I think, every node distributed. Meaning everybody's computer who has blockchain technology stores todo
app data. If someone closes his/her computer, this means that I can't see some of this data in his/here computer?
The reasoning being that, if people have todo app data of other people
in their computer, other people's data cannot be hacked?
If your contract follows a token standard (eg ERC-20 ), then it effectively represents a token. In other cases, it does not represent any token.
So if you create a ToDo app contract without implementing the token standard functions, then it's not a token.
Solidity code effectively runs in EVM (Ethereum Virtual Machine), which is part of a distributed system. By design, every node of the.network holds the same copy of all data across the system.
Applied to your example: All nodes of the.network hold all ToDo notes of all users.
You can distinguish the data on the application level:
struct Note {
uint datetime;
bool done;
string note;
}
mapping (address => Note[]) notesPerUser;
But if the nature of the data is not meant to be readable by anyone, you might want to use a private EVM.network (eg Hyperledger) instead of a public one (eg Ethereum). Or a completely different architecture (eg a centralized database instead of a smart contract).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.