-
Notifications
You must be signed in to change notification settings - Fork 58
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.
The text was updated successfully, but these errors were encountered: