-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature : EVM Support #54
Comments
How to calculate the gas cost of XDAG and the fee of the transaction? |
1.Define the smallest unit of xdag gas
Sub-units of Xdager:
For ease of use, we tentatively set (1 NANO_XDAG == 1 wei) 2.Each OP_CODE Standard Gas Prices 3.Estimating transaction costs
Total cost = gasUsed * gasPrice 4.ERC-20 Token Gas for Example
Fair Price Calculation:
|
It is planned to stabilize the network first, improve network stability, and then support for evm |
Is the plan still ongoing? |
Please read this article, I think there are too many chains about evm, and it is too complicated for community projects, we are looking for a more suitable way for XDAG to realize defi capabilities |
The biggest source of Ethereum on the chain and the success of smart contracts, we see that the key to the success of the Ethereum ecosystem is the creation of an EVM virtual machine. At present, the realization of a virtual machine is very important for XDAG. The reasons are as follows:
EVM Illustrated
EVM INSTRUCTIONS
The EVM executes as a stack machine with a depth of 1024 items. Each item is a 256-bit word, which was chosen for the ease of use with 256-bit cryptography (such as Keccak-256 hashes or secp256k1 signatures).
During execution, the EVM maintains a transient memory (as a word-addressed byte array), which does not persist between transactions.
Contracts, however, do contain a Merkle Patricia storage trie (as a word-addressable word array), associated with the account in question and part of the global state.
Compiled smart contract bytecode executes as a number of EVM opcodes, which perform standard stack operations like XOR, AND, ADD, SUB, etc. The EVM also implements a number of blockchain-specific stack operations, such as ADDRESS, BALANCE, KECCAK256, BLOCKHASH, etc.
![ethereum evm illustrated-2](https://github.com/camo/a2096a7027289ce03bf4b2cd17a6074a1143317432b64d1def9ad4795087a414/68747470733a2f2f657468657265756d2e6f72672f7374617469632f39363238616239306266643032663634636638373334343663626463366337302f33303261342f6761732e706e67)
The text was updated successfully, but these errors were encountered: