Abstract
Smart contracts are the key component in Ethereum. They hold the logic to be executed on the network, keep track of their own state, and can interact with other smart contracts as well. However, they have some limitations, such as limited computation per transaction and expensive storage costs. They also cannot initiate new transactions – they depend on external accounts to trigger them. And since they run on the Ethereum network, they cannot directly interact with anything outside it. In this chapter, we will
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Nick Szabo, “Formalizing and Securing Relationships on Public Networks,” 1997.
- 2.
- 3.
See https://github.com/OpenZeppelin/openzeppelin-sdk for a development framework that provides out-of-the-box upgradeability for smart contracts. We will also briefly touch contract upgrades in Chapter 7.
- 4.
Technically, these functions are not implemented as assembly opcodes, but as precompiled contracts with reduced execution cost.
- 5.
- 6.
- 7.
However, as we will see later, not all nodes actually persist all historical data, so this feature may not always be available.
- 8.
- 9.
- 10.
- 11.
Solidity uses the same notation as npm for specifying version restrictions. See https://docs.npmjs.com/misc/semver for more info.
- 12.
“I call it my billion-dollar mistake. It was the invention of the null reference in 1965.” —Tony Hoare, QCon London, 2009.
- 13.
- 14.
- 15.
- 16.
At the time of this writing, EIP 1047 is in draft state, and includes a proposal for JSON metadata to be associated with a token.
- 17.
We typically use the term off-chain to refer to actions that occur outside the Ethereum network. This is not inside a smart contract or as part of a transaction, but in a front-end application or a script interacting with the blockchain.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Santiago Palladino
About this chapter
Cite this chapter
Palladino, S. (2019). A Crash Course on Smart Contracts. In: Ethereum for Web Developers. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-5278-9_3
Download citation
DOI: https://doi.org/10.1007/978-1-4842-5278-9_3
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-5277-2
Online ISBN: 978-1-4842-5278-9
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books