Smart-Contract
Fleeting- External reference: https://opentezos.com/tezos-basics/smart-contracts
- External reference: https://opentezos.com/blockchain-basics/smart-contracts/
- External reference: https://opentezos.com/blockchain-basics/smart-contracts
Technology of a blockchain allowing to manipulate the underlying ledger. Some are event based, meaning transactions may be generated depending on what is happening on the blockchain.
They generally are composed of a smart-contract storage and entrypoints to get access to their functions.
We’ll define what Smart Contracts are and how they are already present on Bitcoin
Bitcoin Script is willingly non-turing complete
a Bitcoin script is unable to know and handle the transaction amount insidea Bitcoin script is unaware of anything happening outside the stack. It can’t access the blockchain data
you can’t use the balance of a private key inside the code
significant difference with systems like Ethereum, which have an account point of view:
smart contract is a piece of code stored inside the blockchain. It executes a set of pre-defined instructions (promises). Once deployed (stored), it becomes immutable. A smart contract is deployed using a transaction, so we embed spending conditions inside it, which are then immutable.
Strictly speaking, a Bitcoin transaction is a smart contract. The promise to open the vault from one party is fulfilled, given that the other party has the right key to open it. Note that the way this key is provided is also meaningful here. It must follow protocols.
If we can’t control the halt of the machine, it can start an endless loop.So the idea in Ethereum was to introduce another variable to stop the machine: Gas
machine running on gas can’t move endlessly without enough gas
Gas is the fuel of the Ethereum system and a sub-unit of the Ether currency. It is consumed with each operation
miners who also execute these operations receive the Gas as fees for using their computational power
Like in Ethereum, Tezos uses 2 types of accounts:Classic accounts with a primary address, to store tez (ꜩ)Smart contract accounts with an address, storing code and tez (ꜩ)In Tezos vocabulary, “contracts” refers to both types in general. Actually each contract has a “manager”. Precisely, a classic account has an “owner”. If a contract has the “spendable” property, the manager is the entity allowed to spend funds from it.
The deployment of a Tezos smart contract is named “origination
When a smart contract is deployed, an address and a corresponding persistent space called “storage” are allocated to this smart contract. The smart contract address is like its identity and where it lives on the ledger. Its storage is its usable space
Notes linking here
- beginner to expert ethereum python tutorial
- blockchain wallet
- chaincode
- cryptocurrency token
- ekiden: a platform for confidentiality-preserving, trustworthy, and performant smart contracts
- entrypoint
- FA1.2
- FA2
- get balances of a tezo smartcontract
- identify the type of a tezos smart contract
- issuing a token
- multi-token
- semi-fongibilité
- smart-contract
- smart-contract storage
- smartpy
- solidity, blockchain, and smart contract course – beginner to expert python tutorial
- tezos
- tezos API gateway
- tezos smartcontract calls are transactions
- transaction
- truffle
- ways to upgrade a smartcontract