Smart Contract

From /tech/ Wiki
Jump to navigationJump to search

A smart contract is a type of stored precedure on a distributed ledger. It does not necessarily resemble a formal contract. The HyperLedger project uses the term chaincode instead.

Ethereum tokens are smart contracts. Most tokens implement a common set of functions from a token standard like ERC-20 or ERC-721.

Before running a smart contract ensure that its published code compiles to the bytecode run on the EVM. Services like Etherscan are useful for finding pre-compiled contract code and will do the verification for you.

Examples

  • Ethereum Smart Contracts written in Solidity, Serpent, Vyper, LLL, execute in the Ethereum Virtual Machine (EVM).
  • "Chaincode" in HypderLedger.
  • Bitcoin provides limited contracts such as HTLCs used in the Lightning Network.
  • Various other projects of lesser importance: EOS, Tron, Cardano, Aion