Smart Contracts will only be as Smart as the data they are provided with enables them to be.
Dapps enable people to make transactions via their Wallets to a decentralized blockchain database through a Smart Contract Interface.
Interacting with a smart contract is done via it's ABI. Application Binary Interface in the context of computer science is an interface between two program modules, often between operating systems and user programs.
A Smart Contract's ABI is the product of compiling Solidity code (in the case of Ethereum).
To execute functions on a smart contract, you need to have:
- Contract ABI (Interaction Blueprint)
- Function (to be called)
- node connection (metamask)
Metamask to Infura most common
Alternatives Alchemy, Moralis see Web3 Tech Stack
Smart Contract source code should be available for all to see.
- Distributed and robust
- Native built-in payments
Basic steps in Ethereum development:
- Write a Contract's business logic in Solidity
- Compile Solidity to produce the ABI
- Load the ABI in a frontend application (e.g. React)
- Use libaries to interact with the ABI
Hybrid Smart contracts hold the key to unlocking real value for across traditional business sectors and processes. Read more about business case for Smart Contracts
Hybrid contracts are dependent on:
- Data Integrity of ETL Pipelines
- Machine Learning / AI analysis
- Deployment as blockchain node
Reactive Smart Contracts
What questions to choose the best developer tools?
- Smart Contracts must have strict security checks
- Enforcing Strict security checks takes strong domain knowledge
- Dev tools that enforce strict security checks are essential
- Running tests must be as fast possible to save money
- Test Smart Contracts using same language to code them
- avoids context shifting
- shortens time to language mastery
Contracts exist on a single network, but EVM code can be copied and pasted
Deploying a contract is a one way decision. You can't change the contract after it's deployed. Therefore Security/Trust is vitally important in the blockchain programming.
- Cost (Ether Gas) money
- Take time to execute - UX Implications
- Returns a transaction hash
Anatomy of a Smart Contract:
|Balance||Amount of ether this account owns|
|Storage||Data stored on the contract|
|Code||Machine Code logic for how to process transactions that change the balance|
The most popular token standards on Ethereum:
- ERC-20: A standard interface for fungible (interchangeable) tokens, like voting tokens, staking tokens or virtual currencies.
- ERC-721: A standard interface for non-fungible tokens, like a deed for artwork or a song.
- ERC-777: Allows people to build extra functionality on top of tokens such as a mixer contract for improved transaction privacy or an emergency recover function to bail you out if you lose your private keys.
- ERC-1155: Enables more efficient trades and bundling of transactions to save costs. This standard enables creating both utility tokens (such as $BNB or $BAT) and Non-Fungible Tokens like CryptoPunks.
- ERC-725: Identity
Outline general approach to Smart Contract testing here with links to specifc code explanations under Solidity or alternative Smart Contract language.
📄️ NFT Marketplace
A Standardised Visual Language for Diagraming Blockchain Components?
|DAO Ventures||ETF Investing|
|Collection of Smart Contract patterns with tutorials||Collection|