Blockchain transaction example10/3/2023 These transactions are referred to as internal transactions. For example, the transfer of an ERC20 token or an NFT first involves a call by the EOA to the approval function of the token contract and, if successful, a subsequent call to the transfer function.īetween Contract Accounts. These transactions are initiated by the EOA and invoke some smart contract function calls. These types of transactions are referred to as external transactions.īetween EOAs and Contract Accounts. ETH on Ethereum) without any smart contracts involved. This is usually a payment transaction between EOAs involving the transfer of a blockchain’s native token (e.g. Different ways that transactions can occurīetween EOAs directly. Contract accounts do not execute on their own. The code is commonly referred to as a smart contract and is an automated program that runs when it receives a transaction from another EOA or contract account.Īny transaction ultimately originates from an EOA. These are accounts containing code and identified by a public key. An EOA can be thought of as an individual’s bank account that can be used to send funds using password verification.Ĭontract Accounts. Transactions are signed by the private key to prove ownership of the EOA. The public key is the identifier of the account. These are accounts controlled by human users through public and private keys. There are two main types of accounts involved in transactions:Įxternally Owned Accounts (EOA). Sending a transaction is the only way to trigger the change of state of an account. The Ethereum blockchain keeps track of all the accounts and their balances in something called the state. Ethereum and other virtual machines are like computers that can run programs like this, while other blockchains like Bitcoin can only handle payments. This message could either be a payment or a request to run some sort of program on the blockchain. So, you give the account a message, which is signed to show that it's from you. If you want to make a transaction on a blockchain, for example, sending a payment to someone you know, you can’t just write down a transaction in a block - you need an entity called an account to do it for you. Each block within a blockchain contains a bunch of transactions. Transactions are signed messages recorded on blockchains.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |