Ethereum

Celo for Ethereum Developers | Celo Documentation

summary of the similarities and differences between the zeal and ethereum blockchains.

what is the heat relationship with ethereum?

celo is a layer 1 protocol and blockchain platform, and the celo mainnet is completely separate from the ethereum network. While the celo client originated as a fork of the ethereum go language client, go-ethereum (or geth), it has several significant differences, including a pbft consensus mechanism based on proof-of-stake. all rutting crypto assets have erc-20 compatible interfaces, which means that while they are not erc-20 tokens on the ethereum mainnet, all the familiar tools and code that support erc-20 tokens can be easily adapted to zeal assets, including active zeal native (zeal) and zeal dollar (cusd).

Reading: Celo ethereum 20m 65msinclaircoindesk

In terms of programmability, zeal is similar to ethereum. Both networks run Ethereum Virtual Machine (EVM) to support smart contract functionality. This means that all programming languages, developer tools, and standards that point to evm are relevant to both zeal and ethereum. zeal-based developers can robustly write smart contracts, use truffle for smart contract management, and take advantage of smart contract standards that have already been developed for ethereum.

the erc-20 token standard

the erc20 token standard is a standard api for tokens inside smart contracts. this standard interface allows different applications to reuse any token. the erc20 token standard is blockchain independent, so erc20 tokens can be implemented on any blockchain.

the standard includes the optional

functions

and the required

functions

and includes the following events

an erc20 compliant contract must include the required functions and events as a minimum. can include additional functions and events and still be erc20 compliant.

the zeal native asset and the zeal dollar​

See also: 3 Environmentally Friendly Alternatives to Bitcoin | The Motley Fool

This interface is relevant to two important assets in the zeal network, the zeal native asset (zeal) and the zeal dollar (cusd).

celo was called celo gold (cgld) when the contract was implemented, so you’ll often see references to celo gold in the code base. zeal and cgld are the same. you can see the zeal implementation here.

celo has an erc20 interface, so users can interact with celo via the standard token, but it’s important to note that not all celo transfers need to go through the token contract. zeal can also be transferred by specifying the value field of a transaction, in the same way that eth can be transferred in ethereum. To properly monitor celo balance forex trades, it can be helpful to use celo rosetta. celo rosetta provides an easy way to get changes that cannot be easily queried with the celo-blockchain rpc.

the zeal dollar (cusd) is implemented solely as a smart contract, so all actions of cusd are mediated by the smart contract. you can see the implementation here.

key differences between zeal and ethereum

exclusive characteristics of heat

  1. zeal allows users to pay transaction fees in crypto assets other than the native asset. On ethereum, users must pay transaction fees in ether. for example, users can send cusd and then pay any transaction fees in cusd as well.
  2. the celo protocol uses bft proof-of-stake to maintain consensus. this allows hot blocks to be created in 5 seconds, compared to ~12+ seconds on ethereum. also, all blocks are finished immediately, so there is no need to wait more than 1 confirmation block to make sure a transaction is not rolled back.

things to keep in mind

  1. As mentioned above, estrus transfers do not need to be done through the erc20 interface. a user’s zeal balance can change without any interaction with the zeal contract, since they can transfer zeal natively.

    zealous transaction objects are slightly different from transaction objects in ethereum. ethereum transaction objects include fields for, value, gas, gas price, data, nonce, signature (v,r,s). zeal transaction objects include the same fields as ethereum transaction objects, plus feecurrency, gatewayfee, and gatewayfeerecipient. These additional fields are included to provide full node incentives and to allow users to pay transaction fees in different currencies. As of May 19, 2021, with the donut hardfork, the celo network accepts celo transaction objects and ethereum transaction objects as valid celo transactions. This means you can use most ethereum tools with zeal, right out of the box (just point them to the zeal network). when sending ethereum formatted transactions in heat, you will not be able to use the heat features to specify transaction fee currencies or full node incentives.

    1. When using mnemonic seed phrases (or secret phrases), escrow accounts (a private key and corresponding address) are derived differently than ethereum accounts. zeal key derivation path is m/44’/52752’/0’/0 while ethereum’s is m/44’/60’/0’/0. this means that going from a seed phrase to accounts will be different when using ethereum vs zeal wallets.

      the valora wallet uses two types of accounts: external property accounts and metatransaction wallets. There are major consequences for wallet developers and dapp developers relying on zeal, as valora is one of the main interfaces for zeal users. you can find more information about valora accounts here.

      deploying ethereum contracts to heat

      See also: Ether Bull Shares Two Emerging Blockchain Opportunities on Her Radar

      celo runs the evm which means smart contracts written for ethereum can be easily implemented on celo, the main difference is that you only need to connect to a celo node instead of an ethereum node. You can connect to your own celo node or to a celo node service provider like figment datahub.

      This tutorial explains how to start an ultralight node running locally and use it to deploy a contract to the alfajore testnet using truffle.

      This tutorial explains how to connect to a remote node and use contractkit to implement a contract on alfajores using truffle.

      protocol differences

      opcodes & block headers

      zeal does not support gas limit or difficulty opcodes. these fields are also absent from the heat block headers.

      precompiled contracts​

      zeal includes all precompiled contracts on ethereum, but also adds additional contracts. here is the list of precompiled zeal contracts as of zeal version 1.3.2. you can find the latest updates by selecting the latest release tag.

      basic contract calls

      the blockchain client makes some core contract calls at the end of a block, outside of transactions. many are done in epoch blocks (epoch rewards, validator elections, etc.), but not all. for example, the minimum gas price update can occur in any block. The records created by these contract changes are included in a single additional receipt in that block, which references the block hash as its transaction hash, even though there is no transaction with this hash. if such calls did not create records in that block, no receipt is added.

      node management apis

      celo nodes have a slightly different rpc interface than geth nodes. there are some additional rpc endpoints to help validators manage their nodes, they can be found here and here.

      You can find the full list of rpc api endpoints in this file.

      See also: William Hinman Archives – CryptoLaw

Related Articles

Leave a Reply

Your email address will not be published.

Back to top button