Zero to Web3: Writing Your First Smart Contract
Deploy Your First Contract in 5 Minutes
The Contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract HelloWeb3 {
string public message;
constructor(string memory _msg) {
message = _msg;
}
function update(string memory _msg) public {
message = _msg;
}
}
Deploy with Remix
- Open remix.ethereum.org
- Paste the code
- Compile (Ctrl+S)
- Deploy to testnet
- Call
message()to verify
Full Tutorial Series
We publish free Solidity tutorials weekly. Check our GitHub for production-ready examples.
Powered by Tianka Web3 Engine
Donate (USDT TRC-20): TU8NBT5iGyMNkLwWmWmgy7tFMbKnafLHcu
Top comments (0)