Anatomy of smart contracts | ethereum.org
A smart contract is a program that runs at an address on Ethereum. They're made up of data and functions that can execute upon receiving a transaction. Here's an overview of what makes up a smart contract. Make sure you've read about smart contracts first. This document assumes you're already familiar with programming languages such as JavaScript or Python. Any contract data must be assigned to a location: either to storage or memory. It's costly to modify storage in a smart contract so you need to consider where your data should live. Persistent data is referred to as storage and is represented by state variables. These values get stored permanently on the blockchain. You need to declare the type so that the contract can keep track of how much storage on the blockchain it needs when it compiles. If you've already programmed object-oriented languages, you'll likely be familiar with most types. However address should be new to you if you're new to Ethereum development. An address type c
Anatomy of smart contracts Copy .md Copy .md Edit page (opens in a new tab) On this page A smart contract is a program that runs at an address on Ethereum. They're made up of data and functions that can execute upon receiving a transaction. Here's an overview of what makes up a smart contract. Prerequisites Make sure you've read about smart contracts first. This document assumes you're already familiar with programming languages such as JavaScript or Python. Data Any contract data must be assigned to a location: either to storage or memory . It's costly to modify storage in a smart contract so
related reading
- Introduction to Smart Contracts — Solidity 0.8.38-develop documentationdocs.soliditylang.org
- What Are Smart Contracts and How Do They Work?academy.binance.com
- The Ethereum Virtual Machine — How does it work? | by Luit | MyCrypto | Mediummedium.com
- Ethereum development documentation | ethereum.orgethereum.org
- Solidity Patternsfravoll.github.io
- Introduction to Smart Contracts - Solidity 0.8.24 documentationdocs.soliditylang.org
- How does Ethereum work, anyway?preethikasireddy.com
- Program the Blockchain | Understanding Ethereum Smart Contract Storageprogramtheblockchain.com
- Contract ABI Specification — Solidity 0.8.38-develop documentationdocs.soliditylang.org
- Smart contracts: What are they and their benefits | ethereum.orgethereum.org
- Solidity by Examplesolidity-by-example.org
- How do Smart Contracts Actually Work?rightclicksave.com