This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Solidity smart contracts are run on:
Ethereum blockchain
The Ethereum Virtual Machine
Any virtual machine
Any sandbox environment
Events describe actions that are taken in a contract. Which syntax defines an event?
event PurchasedItem
event PurchasedItem(address buyer, uint price);
emit PurchasedItem(address buyer, uint price);
PurchasedItem(address buyer, uint price);
What is an example of a user-defined type in Solidity?
Structs
State variables
Addresses
Arrays
What is typically the first line of a smart contract source file?
A contract definition
A pragma directive
A Solidity version
An event
You must answer all questions before checking your work.
Was this page helpful?