- What is it?
- Why is it needed?
- Smart contracts
- A smart contract is a blockchain-deployed code
- Solidity code looks like this
- Transactions begin at an EOA (externally owned account)
- Transactions occur sequentially
- Transactions set a gas limit
- Transactions send calldata, targeting a contract method
- Similarly smart contracts can call each other within the one transaction
- Gas → When you run an operation, you get charged that gas and you pay with the native currency of the blockchain
contract Agreement {
address recipient;
bool conditionIsMet;
function payout() external {
if(conditionIsMet) {
sendValue(recipient);
}
}
// ...
}